This is a patch against filelist-10.3 to verify that (parts of) the
proposed library packaging policy are followed. It's non-fatal right now
as nearly every package fails it :P
A few examples:
> ~/bin/filelist-10.3 /work/built/dists/all/x86_64/packs-x86_64/libelf
... checking filelist
libelf: "/usr/lib64/libelf.so" is not allowed in a non-devel package
WARNING: Your package would fail here!
libelf: "/usr/lib64/libelf.so.0" should be in a lib package with the
.so version 0 appended, like libelf0
libelf: "/usr/lib64/libelf.so.0.8.9" should be in a lib package with the
.so version 0 appended, like libelf0
> ~/bin/filelist-10.3
/work/built/dists/all/x86_64/packs-x86_64/libapparmor
... checking filelist
libapparmor: "/lib64/libapparmor-2.0-45.so.1" should be in a lib package
with the
.so version 1 appended, like libapparmor1
libapparmor: "/lib64/libapparmor.so.1" should be in a lib package with the
.so version 1 appended, like libapparmor1
libapparmor: "/lib64/libimmunix.so.1" should be in a lib package with the
.so version 1 appended, like libapparmor1
libapparmor: "/usr/lib64/libapparmor.so" is not allowed in a non-devel
package
WARNING: Your package would fail here!
But of course we also have conforming packages!
> ~/bin/filelist-10.3 /work/built/dists/all/x86_64/packs-x86_64/libapr1
... checking filelist
Can we enable this in BETA now and STABLE soon?
Thanks,
Richard.
--
Richard Guenther <[EMAIL PROTECTED]>
Novell / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 - GF: Markus Rex
--- filelist-10.3 2007-03-07 22:36:02.000000000 +0100
+++ /suse/rguenther/bin/filelist-10.3 2007-04-03 11:45:14.126405000 +0200
@@ -280,6 +280,70 @@
echo "Adding new SuSEconfig scripts is not accepted for openSUSE 10.2
and newer"
UNVALID_FILE_FOUND=true
;;
+ # library packaging policy, first a whitelist
+ */libz.so*|\
+ */libbz2.so*|\
+ */libgnarl-*.so|\
+ */libgnat-*.so)
+ ;;
+ # .so and .la files not in /, glibc is an exception
+ /lib/lib*.so|\
+ /lib64/lib*.so|\
+ /lib/lib*.la|\
+ /lib64/lib*.la)
+ PRPM=`package_name $RPM`
+ case $PRPM in
+ glibc)
+ ;;
+ *)
+ echo $PRPM: \""$LINE"\" shall be beyond /usr
+ UNVALID_FILE_FOUND=true
+ ;;
+ esac
+ ;;
+ # .so files and .la files only in -devel subpackages
+ */lib/lib*.so|\
+ */lib64/lib*.so|\
+ */lib/lib*.la|\
+ */lib64/lib*.la)
+ PRPM=`package_name $RPM`
+ case $PRPM in
+ *-devel)
+ ;;
+ *)
+ echo $PRPM: \""$LINE"\" is not allowed in a non-devel package
+ echo WARNING: Your package would fail here!
+ #UNVALID_FILE_FOUND=true
+ ;;
+ esac
+ ;;
+ # shared libaries only in lib* packages with the .so version
+ # appended
+ */lib/lib*.so.*|\
+ */lib64/lib*.so.*)
+ SOVER=`echo $LINE | sed -e 's/^.*\.so\.\([0-9]\+\).*$/\1/'`
+ PRPM=`package_name $RPM`
+ case $PRPM in
+ glibc|\
+ pam|\
+ lib*$SOVER|\
+ lib*$SOVER-32bit|\
+ lib*$SOVER-64bit|\
+ lib*[0-9]|\
+ lib*[0-9]-32bit|\
+ lib*[0-9]-64bit)
+ ;;
+ lib*)
+ echo $PRPM: \""$LINE"\" should be in a lib package with the
+ echo .so version $SOVER appended, like $PRPM$SOVER
+ ;;
+ *)
+ echo $PRPM: \""$LINE"\" is not allowed in a non-lib package
+ echo WARNING: Your package would fail here!
+ #UNVALID_FILE_FOUND=true
+ ;;
+ esac
+ ;;
# allowed, but not nice to have:
/afs|\
/afs/*|\