tags 668721 patch thanks On Sat, Apr 14, 2012 at 09:10:51AM +0200, Andreas Beckmann wrote: > during a test with piuparts I noticed your package left unowned files on > the system after purge, which is a violation of policy 6.8 (or 10.8): > > http://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#s-removedetails > > Filing this as important as having a piuparts clean archive is a release > goal since lenny. > > >>From the attached log (scroll to the bottom...): > > 0m20.5s ERROR: FAIL: Package purging left files on system: > /etc/csh.login not owned > /etc/services not owned
The attached patch fixes both issues by checking if the files exists before changing them. It also adds a dependency to update-inetd, as the postinst script requires that. > Raising severity to serious as this creates/modifies/... /etc/services > which is owned by netbase (but there is no dependency on netbase). > And csh.login might be owned by osomeone else, too. The changes to /etc/profile and /etc/csh.login are probably obsolete, as sendfile includes /etc/profile.d/sendfile and /etc/csh/login.d/sendfile. Cheers, Ivo
diff -Nur sendfile-2.1b.20080616/debian/control sendfile-2.1b.20080616.ivo/debian/control --- sendfile-2.1b.20080616/debian/control 2012-07-08 22:45:46.000000000 +0200 +++ sendfile-2.1b.20080616.ivo/debian/control 2012-07-08 23:22:02.942532040 +0200 @@ -9,7 +9,7 @@ Section: net Priority: optional Architecture: any -Depends: ${shlibs:Depends}, openbsd-inetd | inet-superserver, perl | perl5 +Depends: ${shlibs:Depends}, openbsd-inetd | inet-superserver, perl | perl5, update-inetd Suggests: pgp-i Description: Simple Asynchronous File Transfer Sendfile is an asynchronous file transfer service for the Internet, diff -Nur sendfile-2.1b.20080616/debian/postinst sendfile-2.1b.20080616.ivo/debian/postinst --- sendfile-2.1b.20080616/debian/postinst 2012-07-08 22:45:46.000000000 +0200 +++ sendfile-2.1b.20080616.ivo/debian/postinst 2012-07-08 23:44:41.310127731 +0200 @@ -5,16 +5,18 @@ # First modify the services file -open(SERVICES, "/etc/services"); - @services=<SERVICES>; -close(SERVICES); - -if (! grep(/^saft.*/, @services)) { - push (@services, "saft 487/tcp # simple asynchronous file transfer\n"); - open(SERVICES, ">/etc/services.new"); - print SERVICES @services; - close (SERVICES); - system ("mv -f /etc/services.new /etc/services"); +if (-e "/etc/services") { + open(SERVICES, "/etc/services"); + @services=<SERVICES>; + close(SERVICES); + + if (! grep(/^saft.*/, @services)) { + push (@services, "saft 487/tcp # simple asynchronous file transfer\n"); + open(SERVICES, ">/etc/services.new"); + print SERVICES @services; + close (SERVICES); + system ("mv -f /etc/services.new /etc/services"); + } } # Now modify the inetd.conf file @@ -40,14 +42,16 @@ } for $profile (('/etc/csh.login')) { - open(PROFILE, "$profile"); - @profile=<PROFILE>; - close(PROFILE); - - if (grep(/^.*check-sendfile/, @profile)) { - open(PROFILE, ">$profile"); - printf PROFILE "%s", join ('', grep (!/^.*check-sendfile/, @profile)); - close(PROFILE); + if (-e $profile) { + open(PROFILE, "$profile"); + @profile=<PROFILE>; + close(PROFILE); + + if (grep(/^.*check-sendfile/, @profile)) { + open(PROFILE, ">$profile"); + printf PROFILE "%s", join ('', grep (!/^.*check-sendfile/, @profile)); + close(PROFILE); + } } } diff -Nur sendfile-2.1b.20080616/debian/postrm sendfile-2.1b.20080616.ivo/debian/postrm --- sendfile-2.1b.20080616/debian/postrm 2012-07-08 22:45:46.000000000 +0200 +++ sendfile-2.1b.20080616.ivo/debian/postrm 2012-07-08 23:45:21.724381310 +0200 @@ -7,8 +7,11 @@ then for profile in /etc/profile /etc/csh.login do - grep -v 'check-sendfile' $profile > $profile.new || true - mv -f $profile.new $profile + if [ -e $profile ] + then + grep -v 'check-sendfile' $profile > $profile.new || true + mv -f $profile.new $profile + fi done fi