pkgsrc-Bugs archive

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

pkg/42328: setting PKG_SYSCONFDIR.minicom creates directory permission problems



>Number:         42328
>Category:       pkg
>Synopsis:       setting PKG_SYSCONFDIR.minicom creates directory permission 
>problems
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 16 00:05:01 +0000 2009
>Originator:     Steven Drake
>Release:        pkgsrc-2009Q3
>Organization:
>Environment:
System: Linux idran 2.6.30 #2 PREEMPT Sun Aug 9 18:32:44 NZST 2009 i686 
pentium4 i386 GNU/Linux
Architecture: pentium4
Machine: i686
C library: GNU C Library stable release version 2.10.1, by Roland McGrath et al.

>Description:
With "PKG_SYSCONFDIR.minicom= /etc" in mk.conf this message appears when
build/installing minicom:

===========================================================================
The following directories are used by minicom-2.1nb3 and
have the wrong ownership and/or permissions:

        /etc (m=755, o=root, g=root)

===========================================================================

when delete the package:

===========================================================================
The following directories are no longer being used by minicom-2.1nb3,
and they can be removed if no other packages are using them:

        /etc

===========================================================================

and 
# ls -ld /etc
drwxr-xr-x 13 uucp uucp 4096 Nov 15 01:46 /etc

The offender is the following line from the Makefile:
OWN_DIRS_PERMS=         ${PKG_SYSCONFDIR} ${UUCP_USER} ${DIALER_GROUP} 0755

This line assumes ${PKG_SYSCONFDIR} is its separate directory.
ie. "${PKG_SYSCONFBASE}/${PKG_SYSCONFSUBDIR}"

>Fix:
This patch will disable OWN_DIRS_PERMS in the above case but will include it
if PKG_SYSCONFDIR.minicom is undefine or "/etc/minicom" for example.

Index: pkgsrc/comms/minicom/Makefile
===================================================================
--- pkgsrc.orig/comms/minicom/Makefile
+++ pkgsrc/comms/minicom/Makefile
@@ -32,7 +32,6 @@ PKG_GROUPS_VARS+=     DIALER_GROUP UUCP_GROU
 PKG_USERS_VARS+=       UUCP_USER
 
 SPECIAL_PERMS=         ${PREFIX}/bin/minicom ${UUCP_USER} ${DIALER_GROUP} 4555
-OWN_DIRS_PERMS=                ${PKG_SYSCONFDIR} ${UUCP_USER} ${DIALER_GROUP} 
0755
 CONF_FILES_PERMS=      ${EGDIR}/minicom.users ${PKG_SYSCONFDIR}/minicom.users \
                        ${UUCP_USER} ${DIALER_GROUP} 0644
 
@@ -50,3 +49,7 @@ post-install:
 
 .include "../../devel/gettext-lib/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
+## Guard aganst someone setting PKG_SYSCONFDIR.minicom
+.if !empty(PKG_SYSCONFDIR:C/^.*\/${PKG_SYSCONFSUBDIR}$/YES/:MYES)
+OWN_DIRS_PERMS=                ${PKG_SYSCONFDIR} ${UUCP_USER} ${DIALER_GROUP} 
0755
+.endif

-- 
Steven



Home | Main Index | Thread Index | Old Index