>Number:         157062
>Category:       misc
>Synopsis:       [build] Add new owner variable: CONF(OWN|GROUP|MODE)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 15 14:30:07 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Chris Rees
>Release:        
>Organization:
>Environment:
>Description:
At the moment there are macros for ownership and permissions for files of class 
BIN, LIB, KMOD, LIBDATA, SHARE, MAN, NLS and INFO, but not for the class CONF.

This leads to some anomalies, such as src/etc/Makefile hardcoding mode 644 for 
config files in /etc, and (worse) config files are installed as DATA 
(SHAREMODE?=${NOBINMODE} by ports.

This means that all config files installed by ports are read-only, unlike their 
base counterparts -- not only is this inconsistent it also means that editing 
config files in vi forces me to use :wq! rather than ZZ to quit.
>How-To-Repeat:
Install a port with a config file.

# ls -l `make -V PREFIX`/etc/`make -V PORTNAME`.conf*

-r--r--r--  1 root  wheel  13467 Apr 22 12:14 /usr/local/etc/musicpd.conf
-r--r--r--  1 root  wheel  13482 May  7 10:02 /usr/local/etc/musicpd.conf.sample

Why are the config files read-only????
>Fix:
The attached patch lays the necessary groundwork for a new macro or routine in 
bsd.port.mk .

With suggestions on how to make sure the correct version of bsd.own.mk is 
sourced in buildworld I'll submit patches for src/etc as well.

Patch attached with submission follows:

Index: share/mk/bsd.own.mk
===================================================================
RCS file: /exports/cvsroot-freebsd/src/share/mk/bsd.own.mk,v
retrieving revision 1.103
diff -u -r1.103 bsd.own.mk
--- share/mk/bsd.own.mk 10 May 2011 11:00:40 -0000      1.103
+++ share/mk/bsd.own.mk 14 May 2011 15:25:48 -0000
@@ -63,6 +63,15 @@
 # SHAREMODE    ASCII text file mode. [${NOBINMODE}]
 #
 #
+# CONFDIR      Base path for configuration files. [/etc]
+#
+# CONFOWN      Configuration file owner. [root]
+#
+# CONFGRP      Configuration file group. [wheel]
+#
+# CONFMODE     Configuration file mode. [644]
+#
+#
 # DOCDIR       Base path for system documentation (e.g. PSD, USD,
 #              handbook, FAQ etc.). [${SHAREDIR}/doc]
 #
@@ -145,6 +154,11 @@
 SHAREGRP?=     wheel
 SHAREMODE?=    ${NOBINMODE}
 
+CONFDIR?=      /etc
+CONFOWN?=      root
+CONFGRP?=      wheel
+CONFMODE?=     644
+
 MANDIR?=       ${SHAREDIR}/man/man
 MANOWN?=       ${SHAREOWN}
 MANGRP?=       ${SHAREGRP}


>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to