pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/42035: security/mirrordir bad handling of CONF_FILES leads to PLIST error



>Number:         42035
>Category:       pkg
>Synopsis:       security/mirrordir bad handling of CONF_FILES leads to PLIST 
>error
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 10 11:35:00 +0000 2009
>Originator:     Robert Elz
>Release:        NetBSD 4.0 / i386   pkgsrc current (2009-09-09)
>Organization:
        Prince of Songkla University
>Environment:
System: NetBSD jade.coe.psu.ac.th 4.0_STABLE NetBSD 4.0_STABLE 
(JADE-1.696-20080517) #9: Fri May 23 18:55:13 ICT 2008 
kre%jade.coe.psu.ac.th@localhost:/usr/obj/4/kernels/JADE i386
Architecture: i386
Machine: i386
>Description:
        With PKG_SYSCONFBASE set to a non-standard location,
        security/mirrordir installs its config file directly to
        that place, whereas its PLIST file expects the file to
        be found under the default SYSCONFBASE (/usr/pkg/etc).

        When I have seen this previously, it has meant that the
        package is not handling the config files properly - the file
        should be installed into /usr/pkg/etc/whatever then
        copied into PKG_SYSCONFBASE as part of the pkg_add process
        (otherwise the binary package never correctly gets the
        config file).

        pkgsrc has all the machinery needed to make this happen if
        it is used correctly - here it obviously isn't.

>How-To-Repeat:
        I use pkg_comp with libkver and NetBER 4.0 release sets
        (except x* - I use pkgsrc modular xorg) to get a 4.0 release
        environment - none of that is relevant to this problem, other
        than pkg_comp forces PKG_DEVELOPER=yes which enables the
        file-check tests, which locates the problem.

        I have
                PKG_SYSCONFBASE=/etc/conf
        in /etc/mk.conf (insde the pkg_conf sandbox).

        In that environment I see ...

Making install in pam
/bin/sh ../mkinstalldirs /usr/pkg/share/examples/mirrordir
mkdir /usr/pkg/share/examples
mkdir /usr/pkg/share/examples/mirrordir
 /usr/bin/install -c -o root -g wheel -m 444 ./secure-mcservusers 
/usr/pkg/share/examples/mirrordir/secure-mcservusers
/bin/sh ../mkinstalldirs /etc/conf/pam.d
mkdir /etc/conf/pam.d
 /usr/bin/install -c -o root -g wheel -m 444 ./secure-mcserv 
/etc/conf/pam.d/secure-mcserv
Making install in scripts
/bin/sh ../mkinstalldirs /usr/pkg/etc/ssocket
mkdir /usr/pkg/etc
mkdir /usr/pkg/etc/ssocket
 /usr/bin/install -c -o root -g wheel -m 444 ./accept.cs 
/usr/pkg/etc/ssocket/accept.cs
 /usr/bin/install -c -o root -g wheel -m 444 ./connect.cs 
/usr/pkg/etc/ssocket/connect.cs
 /usr/bin/install -c -o root -g wheel -m 444 ./arcencrypt.cs 
/usr/pkg/etc/ssocket/arcencrypt.cs
 /usr/bin/install -c -o root -g wheel -m 444 ./arcinit.cs 
/usr/pkg/etc/ssocket/arcinit.cs
=> Automatic manual page handling
=> Generating post-install file lists
=> Running POST-INSTALL script actions
mirrordir-0.10.49nb1: copying 
/usr/pkg/share/examples/mirrordir/secure-mcservusers to 
/etc/conf/secure-mcservusers
Full pathname symlink `/usr/pkg/bin/mirrordir' is target of 
`/usr/pkg/bin/copydir' - adjusting to `../bin/mirrordir'
Full pathname symlink `/usr/pkg/bin/mirrordir' is target of 
`/usr/pkg/bin/recursdir' - adjusting to `../bin/mirrordir'
Full pathname symlink `/usr/pkg/bin/mirrordir' is target of 
`/usr/pkg/bin/pslogin' - adjusting to `../bin/mirrordir'
pkg_create: can't stat `/usr/pkg/etc/pam.d/secure-mcserv'
=> Registering installation for mirrordir-0.10.49nb1
pkg_admin: mirrordir-0.10.49nb1: File `/usr/pkg/etc/pam.d/secure-mcserv' is in 
+CONTENTS but not on filesystem!
=> Checking file-check results for mirrordir-0.10.49nb1
ERROR: ************************************************************
ERROR: The following files are in the PLIST but not in /usr/pkg:
ERROR:         /usr/pkg/etc/pam.d/secure-mcserv
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/security/mirrordir
*** Error code 1

Stop.

        note that the package, as part of its install process,
        installed directly into /etc/conf/* (it shouldn't), but
        its PLIST file is expecting the file to be in /usr/pkg/etc
        (where it actually should be, so pkg_add could copy it
        for the binary package to the non standard SYSCONFBASE).

>Fix:
        Use the CONF_FILES mechanisms correctly.

        Revbump the package when this is fixed, as anyone who
        built a binary package with a non-standard PKG_SYSCONFBASE
        but without PKG_DEVELOPER=yes would have a defective package.



Home | Main Index | Thread Index | Old Index