pkgsrc-Bugs archive

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

pkg/45717: print/LPRng-core requests chown and chgrp incorrectly (or, bad interaction between UNPRIVILEGED=yes and USE_TOOLS+= chown:run)



>Number:         45717
>Category:       pkg
>Synopsis:       print/LPRng-core requests chown and chgrp incorrectly (or, bad 
>interaction between UNPRIVILEGED=yes and USE_TOOLS+= chown:run)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 16 21:20:00 +0000 2011
>Originator:     Taylor R Campbell <campbell+pkgsrc%mumble.net@localhost>
>Release:        pkgsrc-2011Q3 (problem persists in HEAD)
>Organization:
>Environment:
System: NetBSD oberon.local 5.99.58 NetBSD 5.99.58 (RIAMONOHACK) #4: Sat Dec 10 
23:18:29 UTC 2011 
root@oberon.local:/home/riastradh/netbsd/current/obj/sys/arch/i386/compile/RIAMONOHACK
 i386
Architecture: i386
Machine: i386
>Description:

        print/LPRng-core fails the work-directory references check if
        built with UNPRIVILEGED=yes PKG_DEVELOPER=yes:

=> Checking for work-directory references in LPRng-core-3.8.28nb3
ERROR: /pkg/2011Q3/pkg/sbin/checkpc:    Binary file 
/tmp/pkg/2011Q3/work/print/LPRng-core/work/.destdir/pkg/2011Q3/pkg/sbin/checkpc 
matches
ERROR: *** The above files still have references to the build directory.
ERROR:     This is possibly an error that should be fixed by unwrapping
ERROR:     the files or adding missing tools to the package makefile!

        This is because it requests the chown and chgrp tools for
        build-time with `USE_TOOLS+= chown chgrp', and then remembers
        the tooldir pathnames.  Instead, it should request the tools
        for run-time with `USE_TOOLS+= chown:run chgrp:run'.  However,
        that's not enough to fix the problem -- it still fails the
        work-directory references check.

        I believe this is a symptom of a more general problem.  In
        particular, unprivileged.mk sets `TOOLS_PLATFORM.chown=${TRUE}
        chown', and likewise for chgrp.  This has the effect that
        ${CHOWN} (and ${TOOLS_CHOWN}, and ${TOOLS_CMDLINE_CHOWN}, and
        ${TOOLS_PLATFORM.chown}) are all wrong when I've requested the
        chown tool at run-time with `USE_TOOLS+= chown:run'.

>How-To-Repeat:

        Try to build print/LPRng-core with UNPRIVILEGED=yes and
        PKG_DEVELOPER=yes.  Or,

% cd /usr/pkgsrc/print/LPRng-core
% make show-vars 'VARNAMES=CHOWN TOOLS_CHOWN TOOLS_CMDLINE_CHOWN 
TOOLS_PLATFORM.chown' MAKECONF=/dev/null
/usr/sbin/chown
/usr/sbin/chown
/usr/sbin/chown
/usr/sbin/chown
% make show-vars 'VARNAMES=CHOWN TOOLS_CHOWN TOOLS_CMDLINE_CHOWN 
TOOLS_PLATFORM.chown' UNPRIVILEGED=yes MAKECONF=/dev/null
true chown
true
true
true chown

>Fix:

        Yes, please!



Home | Main Index | Thread Index | Old Index