Version 7 (modified by 15 years ago) ( diff ) | ,
---|
Here is a method to create LSB compliant packages
The Linux Foundation is hosting a set of LSB chroot that can be used in order to test LSB compliance of software as part of their Linux Standard Base Sample Implementation Downloads page. Also look at LSB SI Tools Getting Started
You need to get the packages they propose and install them onto your distribution (which is rpm compliant if LSB compliant !)
$ cd $HOME $ wget http://ftp.linux-foundation.org/pub/lsb/impl/beta/binary/amd64/lsbsi-chroot-4.0.1-1.x86_64.rpm $ wget http://ftp.linux-foundation.org/pub/lsb/impl/beta/binary/ia32/lsbsi-chroot-4.0.1-1.i586.rpm
As these packages contain overlapping content, if you want to generate for the i386 and x86_64 arches, I propose to you the following installation means, providing the following project-builder configureation:
$ grep vepath ~/.pbrc vepath default = /home/rinse $ mkdir -p /home/rinse/lsb/4.0.1/i386 /home/rinse/lsb/4.0.1/x86_64 $ cd /home/rinse $ rpm2cpio ~/lsbsi-chroot-4.0.1-1.i586.rpm | cpio -ivdum $ mv ./opt/lsb/si/chroot/* lsb/4.0.1/i386 $ rm -rf opt $ rpm2cpio ~/lsbsi-chroot-4.0.1-1.x86_64.rpm | cpio -ivdum $ mv ./opt/lsb/si/chroot/* lsb/4.0.1/x86_64 $ rm -rf opt
The vepath entry in your default configuration project-builder file tells to pb where to look for Virtual Environments (VEs) on your system. In that directory, you have another file describing relevant information for all VEs. Especially, you need to ensure that pb will build now for your newly created VR:
$ grep velist .pbrc velist default = centos-4-i386,centos-5-i386,centos-4-x86_64,centos-5-x86_64,debian-5.0-x86_64,lsb-4.0.1-i386,lsb-4.0.1-x86_64
There are still manual tasks you need to perform as we didn't install the rpm, but just used the content (I can not recommend to apply blindly the rpm which deals with your sudo conf locally and also pb normally does it for you in newve, but as we're creating it another way, we have to finish the work ourselves):
# chroot /home/rinse/lsb/4.0.1/i386 /sbin/fix-filemodes.sh (optional) # chroot /home/rinse/lsb/4.0.1/i386 chown root /bin/su # chroot /home/rinse/lsb/4.0.1/i386 chmod +s /bin/root # chroot /home/rinse/lsb/4.0.1/x86_64 /sbin/fix-filemodes.sh (optional) # chroot /home/rinse/lsb/4.0.1/x86_64 chown root /bin/su # chroot /home/rinse/lsb/4.0.1/x86_64 chmod +s /bin/root
NOTE: LSB chroot is not provided with 2 mandatory components for pb: sudo and make. THis has to be solved before goind further.
Once all this is done, pb is now able to generate packages for those LSB chroots. Of course, you first need to setup your chroot for pb usage:
$ pb -p pb -m lsb-4.0.1-i386 setupve