[opensuse-packaging] RPM dependencies vs. post-install scripts
Hi, I've found that some packages containing post-install scripts might not have defined RPM dependencies correctly. All those commands used in post-scripts should be explicitly requested. Please, correct me if I'm wrong :) --- examples --- 2007-10-31 19:20:46 lukemftp-1.5-660.x86_64.rpm installed ok Additional rpm output: /var/tmp/rpm-tmp.16471: line 1: rm: command not found 2007-10-31 19:21:50 preload-0.2-110.x86_64.rpm installed ok Additional rpm output: /var/tmp/rpm-tmp.11270: line 16: sed: command not found --- examples --- Please, check and fix your packages. Thanks Maybe someone could extend our 'build' scripts to check the post-install scripts whether they contain only commands (binaries) mentioned in RPM dependencies? Bye Lukas -- Lukas Ocilka, YaST Developer (xn--luk-gla45d) ----------------------------------------------------------------- SUSE LINUX, s. r. o., Lihovarska 1060/12, Praha 9, Czech Republic
Am Donnerstag 01 November 2007 schrieb Lukas Ocilka:
Hi,
I've found that some packages containing post-install scripts might not have defined RPM dependencies correctly. All those commands used in post-scripts should be explicitly requested. Please, correct me if I'm wrong :)
--- examples --- 2007-10-31 19:20:46 lukemftp-1.5-660.x86_64.rpm installed ok Additional rpm output: /var/tmp/rpm-tmp.16471: line 1: rm: command not found
2007-10-31 19:21:50 preload-0.2-110.x86_64.rpm installed ok Additional rpm output: /var/tmp/rpm-tmp.11270: line 16: sed: command not found --- examples ---
Please, check and fix your packages. Thanks
Maybe someone could extend our 'build' scripts to check the post-install scripts whether they contain only commands (binaries) mentioned in RPM dependencies?
Do you speak python? Extend rpmlint's PostCheck.py Greetings, Stephan --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Stephan Kulow napsal(a):
Am Donnerstag 01 November 2007 schrieb Lukas Ocilka:
Hi,
I've found that some packages containing post-install scripts might not have defined RPM dependencies correctly. All those commands used in post-scripts should be explicitly requested. Please, correct me if I'm wrong :)
--- examples --- 2007-10-31 19:20:46 lukemftp-1.5-660.x86_64.rpm installed ok Additional rpm output: /var/tmp/rpm-tmp.16471: line 1: rm: command not found
2007-10-31 19:21:50 preload-0.2-110.x86_64.rpm installed ok Additional rpm output: /var/tmp/rpm-tmp.11270: line 16: sed: command not found --- examples ---
Please, check and fix your packages. Thanks
Maybe someone could extend our 'build' scripts to check the post-install scripts whether they contain only commands (binaries) mentioned in RPM dependencies?
Do you speak python? Extend rpmlint's PostCheck.py
It's a shame but I don't ;) I hope, there's someone who does and is willing to help. Any volunteer? Bye Lukas
On Fri, Nov 02, 2007 at 10:26:12AM +0100, Lukas Ocilka wrote:
Stephan Kulow napsal(a):
Do you speak python? Extend rpmlint's PostCheck.py
It's a shame but I don't ;)
Neither do I, but ...
I hope, there's someone who does and is willing to help. Any volunteer?
here's a patch, untested. -- Martin Vidner, YaST developer http://en.opensuse.org/User:Mvidner Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu
On Friday 02 November 2007, Martin Vidner wrote:
I hope, there's someone who does and is willing to help. Any volunteer? here's a patch, untested.
Many thanks, Martin! There was a small bug in it (\b has to be escaped, e.g. \\b). I`ve added a --info description and enabled the fix in BETA. Greetings, Dirk -- RPMLINT information under http://en.opensuse.org/Packaging/RpmLint --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Fri 02 Nov 2007 23:11:41 NZDT +1300, Martin Vidner wrote:
here's a patch, untested.
--- PostCheck.py.orig 2006-11-08 20:34:35.000000000 +0100 +++ PostCheck.py 2007-11-02 11:10:04.000000000 +0100
+ ['cp', ('coreutils', '/bin/cp')], + ['ln', ('coreutils', '/bin/ln')], + ['mv', ('coreutils', '/bin/mv')], + ['rm', ('coreutils', '/bin/rm')], + ['sed', ('sed', '/bin/sed')],
I know nothing about nothing, but looking at that list makes me want to check whether awk/gawk/nawk are missing. Volker -- Volker Kuhlmann is list0570 with the domain in header http://volker.dnsalias.net/ Please do not CC list postings to me. --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Volker Kuhlmann wrote:
On Fri 02 Nov 2007 23:11:41 NZDT +1300, Martin Vidner wrote:
here's a patch, untested.
--- PostCheck.py.orig 2006-11-08 20:34:35.000000000 +0100 +++ PostCheck.py 2007-11-02 11:10:04.000000000 +0100
+ ['cp', ('coreutils', '/bin/cp')], + ['ln', ('coreutils', '/bin/ln')], + ['mv', ('coreutils', '/bin/mv')], + ['rm', ('coreutils', '/bin/rm')], + ['sed', ('sed', '/bin/sed')],
I know nothing about nothing, but looking at that list makes me want to check whether awk/gawk/nawk are missing.
Oh, good point! Thanks. Maybe also these, just quessing... /bin/rmdir, /bin/mknod, /bin/ls, /bin/touch, /bin/chmod, /bin/chown, /bin/cat, /usr/bin/cut, /usr/bin/md5sum (all in coreutils.rpm) Any other (e.g., better) ideas ;)? Thanks && Bye Lukas -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFHK6bZVSqMdRCqTiwRAhuiAJ4z03T5GywupxIClhCYFEQAj8aCjQCbBiL+ t2ie24hTPVxeG11rde7KXO0= =KP3N -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Lukas Ocilka escribió:
Any other (e.g., better) ideas ;)?
I got some more ;) Index: PostCheck.py =================================================================== --- PostCheck.py.orig 2007-08-12 20:18:40.000000000 +0200 +++ PostCheck.py 2007-11-05 09:25:02.000000000 +0100 @@ -48,6 +48,9 @@ prereq_assoc = ( # ['chkconfig', ('chkconfig', '/sbin/chkconfig')], ['chkfontpath', ('chkfontpath', '/usr/sbin/chkfontpath')], ['rpm-helper', ('rpm-helper',)], + ['pear',('php5-pear','/usr/bin/pear')], + ['update-alternatives',('update-alternatives','/usr/sbin/update-alternatives')], + ['a2enmod',('apache2','/usr/sbin/a2enmod')], ) for p in prereq_assoc: also, useradd and groupadd (pwdutils) are very common in the %pre section. --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org -- "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." --Albert Einstein Cristian Rodríguez R, Core Services SUSE LINUX Products GmbH Research & Development http://www.opensuse.org/ --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Cristian Rodriguez escribió:
Lukas Ocilka escribió:
Any other (e.g., better) ideas ;)?
odbcinst from package unixODBC located in /usr/bin/odbcinst may be also called while installing drivers on %post rpmlint may also enforce people using %install_info* macros to PreReq: %install_info_prereq ;) I have also seen packages using: chroot gpg HTH. -- "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." --Albert Einstein Cristian Rodríguez R, Core Services SUSE LINUX Products GmbH Research & Development http://www.opensuse.org/ --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Tuesday 06 November 2007, Cristian Rodriguez wrote:
odbcinst from package unixODBC located in /usr/bin/odbcinst may be also called while installing drivers on %post
rpmlint may also enforce people using %install_info* macros to PreReq: %install_info_prereq ;)
thanks for all the suggestions in this thread, they`re now implemented and will move to factory soon. Greetings, Dirk -- RPMLINT information under http://en.opensuse.org/Packaging/RpmLint --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (6)
-
Cristian Rodriguez
-
Dirk Mueller
-
Lukas Ocilka
-
Martin Vidner
-
Stephan Kulow
-
Volker Kuhlmann