tech-pkg archive

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

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



On Mon, 16 Nov 2009, OBATA Akio wrote:

>  But remains one problem, related to the situation of this PR.
>  Using PKG_SYSCONFDIR.${PKG_SYSCONFVAR} on package contains PKG_SYSCONFSUBDIR.
>  Currently, PKG_SYSCONFDIR_PERMS is ignored if PKG_SYSCONFSUBDIR is empty,
>  probably, to avoid changing permission of PKG_SYSCONFBASEDIR accidently.
>  But if PKG_SYSCONFDIR.${PKG_SYSCONFVAR} is set, PKG_SYSCONFSUBDIR is ignored.
>  So on the situation of this PR, /etc will be changed to own by dialer:uucp 
>  silently.
>  
>  Probably, PKG_SYSCONFSUBDIR should be reset if 
>  PKG_SYSCONFDIR.${PKG_SYSCONFVAR} is defined,

Defiantly!

--- bsd.pkg.mk  10 Sep 2009 21:46:57 -0000      1.1959
+++ bsd.pkg.mk  
@@ -376,6 +376,7 @@
 PKG_SYSCONFDIR=                ${PKG_SYSCONFDIR.${PKG_SYSCONFVAR}}
 PKG_SYSCONFBASEDIR=    ${PKG_SYSCONFDIR.${PKG_SYSCONFVAR}}
 PKG_SYSCONFDEPOTBASE=  # empty
+PKG_SYSCONFSUBDIR=     # empty
 .endif
 PKG_SYSCONFDIR_PERMS?= ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 755

>  or honor PKG_SYSCONFSUBDIR even if PKG_SYSCONFDIR.${PKG_SYSCONFVAR} is 
>  defined.
>  IMO, later is prefered, because some packages expect that config files are
>   in certain subdir
>  of specified directory to configure, ex PR#42327 .

In my situation I set PKG_SYSCONFDIR.${PKG_SYSCONFVAR} to /etc so that the
package will find its config file in the same location as the old os binary
package did.  Always honoring PKG_SYSCONFSUBDIR would completely defeat
setting it.

Perhaps a variable like PKG_SYSCONFBASE.${PKG_SYSCONFVAR} that honors
PKG_SYSCONFSUBDIR could be added to the infrastructure.  The pkgsrc users
guide could mention both and give a strong warning about using
PKG_SYSCONFDIR.${PKG_SYSCONFVAR} because of situations like PR#42327.

On the same subject why not  PKG_SYSCONFSUBDIR.${PKG_SYSCONFVAR}?
eg. PKG_SYSCONFSUBDIR.slp=slp

--- bsd.pkg.mk  10 Sep 2009 21:46:57 -0000      1.1959
+++ bsd.pkg.mk
@@ -352,7 +352,10 @@
${PKGSRCDIR}/mk/scripts/f
 # Config file related settings - see doc/pkgsrc.txt
 #
 PKG_SYSCONFVAR?=       ${PKGBASE}
-PKG_SYSCONFSUBDIR?=    # empty
+.if !empty(PKG_SYSCONFBASE.${PKG_SYSCONFVAR})
+PKG_SYSCONFBASE=       ${PKG_SYSCONFBASE.${PKG_SYSCONFVAR}}
+.endif
+PKG_SYSCONFSUBDIR?=    ${PKG_SYSCONFSUBDIR.${PKG_SYSCONFVAR}}
 .if ${PKG_INSTALLATION_TYPE} == "overwrite"
 PKG_SYSCONFDEPOTBASE=  # empty
 PKG_SYSCONFBASEDIR=    ${PKG_SYSCONFBASE}

-- 
Steven
UNIX is basically a simple operating system, 
but you have to be a genius to understand the simplicity  --- dmr


Home | Main Index | Thread Index | Old Index