The Linux Foundation is a non-profit consortium dedicated to fostering the growth of Linux.
Assorted comments on setting up online package repositories for the test suites, for the various package managers (apt, yum, urpmi, etc). We've talked about doing this for 3.1.1 and 3.2, and I thought I'd get the ball rolling a little. (Stew)
Contents |
To simplify things, I've created a metapackage, task-lsb-test, that pulls in the testing suite.
Name: task-lsb-test
Version: 3.1.0
Release: 1
Summary: Metapackage for LSB distribution (runtime) testing
Group: Development/Tools
License: Artistic
#
# ideally I'd put -%%version, but there are inconsistancies
# in the package names and provides
Requires: lsb-runtime-test
Requires: lsb-test-vsw4
Requires: lsb-test-desktop
Requires: qmtest_libstdcpp
Requires: lsb-cmdchk
Requires: lsb-libchk
Requires: lsb-test
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
This package is a meta-package, meaning that its purpose is to contain
dependencies for installing the LSB distribution (runtime) tests.
%files
%changelog
* Mon Dec 25 2006 Stew Benedict <sbenedict@mandriva.com> 3.1.0-1
- First packaging
I'll start with urpmi because I'm familiar with it. On Mandriva, we also have an lsb subpackage called "lsb-test", which pulls in the packages that the runtime tests need for execution, but may not be required by the spec.
I took the runtime kit tarball and pulled the rpm packages out:
tar -xzf ~/Mandrake/LSB/3.1-final/lsb-runtime-tests-3.1.0-3.i486.tar.gz rm install.sh inst-config
Then dropped in task-lsb-test and ran genhdlist:
[stew@norris lsb-test]$ genhdlist . parsing . /home/stew/tmp/.build_hdlist/lsb-cmdchk-3.1.1-1.i486 /home/stew/tmp/.build_hdlist/lsb-libchk-3.1.1-1.i486 /home/stew/tmp/.build_hdlist/lsb-python-2.4.3-3.lsb3.i486 /home/stew/tmp/.build_hdlist/lsb-runtime-test-3.1.0-6.i486 /home/stew/tmp/.build_hdlist/lsb-test-desktop-3.1.0-10.i486 /home/stew/tmp/.build_hdlist/lsb-test-vsw4-3.1.0-2.i486 /home/stew/tmp/.build_hdlist/lsb-tet3-lite-3.7-4.lsb3.i486 /home/stew/tmp/.build_hdlist/lsb-tet3-lite-devel-3.7-4.lsb3.i486 /home/stew/tmp/.build_hdlist/qm-2.2-3.i486 /home/stew/tmp/.build_hdlist/qmtest_libstdcpp-3.4.3-5.lsb3.i486 /home/stew/tmp/.build_hdlist/task-lsb-test-3.1.0-1.noarch choosing compression method with "gzip -9" for archive hdlist.cz real archive size of hdlist.cz is 392073 [stew@norris lsb-test]$ ls -1 hdlist.cz list lsb-cmdchk-3.1.1-1.i486.rpm lsb-libchk-3.1.1-1.i486.rpm lsb-python-2.4.3-3.lsb3.i486.rpm lsb-runtime-test-3.1.0-6.i486.rpm lsb-test-desktop-3.1.0-10.i486.rpm lsb-test-vsw4-3.1.0-2.i486.rpm lsb-tet3-lite-3.7-4.lsb3.i486.rpm lsb-tet3-lite-devel-3.7-4.lsb3.i486.rpm qm-2.2-3.i486.rpm qmtest_libstdcpp-3.4.3-5.lsb3.i486.rpm synthesis.hdlist.cz task-lsb-test-3.1.0-1.noarch.rpm
On the client side, we just add the "lsb-test" media to our existing media sources:
[root@larry ~]# urpmi.addmedia lsb-test http://www.e-artisan.org/~stew/downloads/lsb-test with hdlist.cz
added medium lsb-test
wrote config file [/etc/urpmi/urpmi.cfg]
examining synthesis file [/var/lib/urpmi/synthesis.hdlist.secteam.cz]
examining synthesis file [/var/lib/urpmi/synthesis.hdlist.main.cz]
examining synthesis file [/var/lib/urpmi/synthesis.hdlist.contrib.cz]
examining synthesis file [/var/lib/urpmi/synthesis.hdlist.updates.cz]
retrieving source hdlist (or synthesis) of "lsb-test"...
http://www.e-artisan.org/~stew/downloads/lsb-test/hdlist.cz
found probed hdlist (or synthesis) as hdlist.cz
...retrieving done
examining hdlist file [/var/cache/urpmi/partial/hdlist.lsb-test.cz]
writing list file for medium "lsb-test"
built hdlist synthesis file for medium "lsb-test"
found 0 headers in cache
removing 0 obsolete headers in cache
wrote config file [/etc/urpmi/urpmi.cfg]
Now we can install the test suites with one command:
[root@larry ~]# urpmi task-lsb-test To satisfy dependencies, the following packages are going to be installed: glibc-i18ndata-2.4-4mdk.i586 glibc_lsb-2.3.6-1mdk.i586 locales-de-2.4-2mdv2007.0.i586 locales-es-2.4-2mdv2007.0.i586 locales-fr-2.4-2mdv2007.0.i586 locales-it-2.4-2mdv2007.0.i586 lsb-3.1-7mdv2007.0.i586 lsb-cmdchk-3.1.1-1.i486 lsb-core-3.1-7mdv2007.0.i586 lsb-libchk-3.1.1-1.i486 lsb-python-2.4.3-3.lsb3.i486 lsb-release-2.0-4mdk.i586 lsb-runtime-test-3.1.0-6.i486 lsb-test-3.1-7mdv2007.0.i586 lsb-test-desktop-3.1.0-10.i486 lsb-test-vsw4-3.1.0-2.i486 lsb-tet3-lite-3.7-4.lsb3.i486 qm-2.2-3.i486 qmtest_libstdcpp-3.4.3-5.lsb3.i486 task-lsb-test-3.1.0-1.noarch tcsh-6.14-2mdk.i586 x11-server-xvfb-1.1.1-11mdv2007.0.i586 xorg-x11-100dpi-fonts-7.1.0-6mdv2007.0.i586 xorg-x11-75dpi-fonts-7.1.0-6mdv2007.0.i586 Proceed with the installation of the 24 packages? (326 MB) (Y/n)
Answering "y", the installation proceeds, pulling the test suite from the "lsb-test" repository and the distribution components from my other, pre-defined "2007" sources. (The lsb test packages give warnings about signatures, ideally these packages should all be signed and and appropriate "pubkey" should be in the directory with the packages. Urpmi would then import the key when the media is added.
I'll start with a disclaimer here, I haven't used yum since my PPC days on YellowDog Linux. Yum is available on Mandriva, and I'll just cover what I did on Mandriva 2007.0 to be able to use the lsb-test repository. Yum experts please feel free to clean this up as needed.
On Mandriva, you need to install yum and createrepo
urpmi yum createrepo
Then create the repository structure (I'm using the same repository I previously setup for urpmi).
[stew@larry lsb-test]$ createrepo . 11/11 - task-lsb-test-3.1.0-1.noarch.rpm Saving Primary metadata Saving file lists metadata Saving other metadata
[stew@larry lsb-test]$ ls -l repodata/ total 100 -rwxrwxr-x 1 stew stew 79203 Dec 25 10:47 filelists.xml.gz* -rwxrwxr-x 1 stew stew 3239 Dec 25 10:47 other.xml.gz* -rwxrwxr-x 1 stew stew 4157 Dec 25 10:47 primary.xml.gz* -rwxrwxr-x 1 stew stew 951 Dec 25 10:47 repomd.xml*
I install yum and create a repository definition:
urpmi yum cd /etc/ install -d yum.repos.d cd yum.repos.d/ vim lsb-test.repo
lsb-test.repo:
[lsb-test] name=LSB Distribution (runtime) Tests baseurl=http://www.e-artisan.org/~stew/downloads/lsb-test/
I can now query the repo:
[root@larry ~]# yum info task-lsb-test Warning, could not load sqlite, falling back to pickle Setting up repositories lsb-test [1/1] Reading repository metadata in from local files lsb-test : ################################################## 11/11 Installed Packages Name : task-lsb-test Arch : noarch Version: 3.1.0 Release: 1 Size : 0.0 Repo : installed Summary: Metapackage for LSB distribution (runtime) testing Description: This package is a meta-package, meaning that its purpose is to contain dependencies for installing the LSB distribution (runtime) tests.
If I remove qmtest_libstdcpp (as an example), I can now refresh the task-lst-test using yum:
[root@larry ~]# urpme qmtest_libstdcpp To satisfy dependencies, the following 2 packages will be removed (138 MB): qmtest_libstdcpp-3.4.3-5.lsb3.i486 task-lsb-test-3.1.0-1.noarch (due to missing qmtest_libstdcpp) Remove 2 packages? (y/N) y removing qmtest_libstdcpp-3.4.3-5.lsb3.i486 task-lsb-test-3.1.0-1.noarch [root@larry ~]# yum install task-lsb-test Warning, could not load sqlite, falling back to pickle Setting up Install Process Setting up repositories lsb-test [1/1] Reading repository metadata in from local files lsb-test : ################################################## 11/11 Parsing package install arguments Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Downloading header for task-lsb-test to pack into transaction set. task-lsb-test-3.1.0-1.noa 100% |=========================| 1.5 kB 00:00 ---> Package task-lsb-test.noarch 0:3.1.0-1 set to be updated --> Running transaction check --> Processing Dependency: qmtest_libstdcpp for package: task-lsb-test --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Downloading header for qmtest_libstdcpp to pack into transaction set. qmtest_libstdcpp-3.4.3-5. 100% |=========================| 356 kB 00:00 ---> Package qmtest_libstdcpp.i486 0:3.4.3-5.lsb3 set to be updated --> Running transaction check Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: task-lsb-test noarch 3.1.0-1 lsb-test 1.8 k Installing for dependencies: qmtest_libstdcpp i486 3.4.3-5.lsb3 lsb-test 43 M Transaction Summary ============================================================================= Install 2 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 43 M Is this ok [y/N]: y Downloading Packages: (1/2): qmtest_libstdcpp-3 100% |=========================| 43 MB 00:08 (2/2): task-lsb-test-3.1. 100% |=========================| 1.8 kB 00:00 Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing: qmtest_libstdcpp ######################### [1/2] Before running the test script, please figure out the triplet for the system under test. Normally you can use "gcc -dumpmachine" to get this. The test script will make a guess which is probably okay, correct it if it is not. This step cannot be automated as a compiler is not required in the test environment and other methods are imprecise. After this, you can run the test by executing /opt/lsb/test/share/qmtest_libstdcpp_3.4.3/run_tests Installing: task-lsb-test ######################### [2/2] Installed: task-lsb-test.noarch 0:3.1.0-1 Dependency Installed: qmtest_libstdcpp.i486 0:3.4.3-5.lsb3 Complete!