svn commit: r289085 - head/share/mk

Jan Beich jbeich at vfemail.net
Sun Oct 11 20:41:48 UTC 2015


Baptiste Daroussin <bapt at FreeBSD.org> writes:

> +++ head/share/mk/bsd.confs.mk	Fri Oct  9 21:57:42 2015	(r289085)
[...]
> +CONFGROUPS?=	CONFS
[...]
> +.error bsd.conf.mk cannot be included directly.
> +.for group in ${CONFSGROUPS}

Typo: plural vs. singular

[...]
> +${group}OWN?=	${SHAREOWN}
> +${group}GRP?=	${SHAREGRP}
> +${group}MODE?=	${SHAREMODE}
> +${group}DIR?=	${ETCDIR}/

Have you considered patching bsd.files.mk instead of copying it just to
modify a few defaults? For one, bsd.confs.mk lacks r257095, r267276,
r284345, r287185 - anything from a few years ago.

Here's a quick attempt to merge changes back. Due to .mk files being
out of sync I may have missed some.

$ svn patch /path/to/below.diff
$ rm -f /usr/share/mk/bsd.files.mk
$ make -s install -C share/mk
$ make -sj2 all -C libexec/dma/dmagent
$ make -j2 install -C libexec/dma/dmagent
--- _proginstall ---
--- _FILESINS ---
--- _proginstall ---
install -s -o root -g mail -m 2555   dma /usr/libexec/dma
--- _FILESINS ---
install -o root -g wheel  -m 444 mailer.conf /usr/share/examples/dma
--- _CONFSINS ---
install -o root -g wheel  -m 644 dma.conf /etc/dma
--- _maninstall ---
install -o root -g wheel -m 444 dma.8.gz  /usr/share/man/man8

Index: share/mk/bsd.prog.mk
===================================================================
--- share/mk/bsd.prog.mk	(revision 289150)
+++ share/mk/bsd.prog.mk	(working copy)
@@ -249,7 +249,6 @@ _SCRIPTSINS_${script:T}: ${script}
 NLSNAME?=	${PROG}
 .include <bsd.nls.mk>
 
-.include <bsd.confs.mk>
 .include <bsd.files.mk>
 .include <bsd.incs.mk>
 .include <bsd.links.mk>
Index: share/mk/bsd.files.mk
===================================================================
--- share/mk/bsd.files.mk	(revision 289150)
+++ share/mk/bsd.files.mk	(working copy)
@@ -7,7 +7,8 @@
 .if !target(__<bsd.files.mk>__)
 __<bsd.files.mk>__:
 
-FILESGROUPS?=	FILES
+FILESGROUPS?=	FILES CONFS
+FILESVARPREFIX?=FILES.SHARE CONFS.CONF
 
 .for group in ${FILESGROUPS}
 # Add in foo.yes and remove duplicates from all the groups
@@ -22,10 +23,10 @@ all: buildfiles
 .if defined(${group}) && !empty(${group})
 installfiles: installfiles-${group}
 
-${group}OWN?=	${SHAREOWN}
-${group}GRP?=	${SHAREGRP}
-${group}MODE?=	${SHAREMODE}
-${group}DIR?=	${BINDIR}
+${group}OWN?=	${${FILESVARPREFIX:M${group}.*:E}OWN}
+${group}GRP?=	${${FILESVARPREFIX:M${group}.*:E}GRP}
+${group}MODE?=	${${FILESVARPREFIX:M${group}.*:E}MODE}
+${group}DIR?=	${${FILESVARPREFIX:M${group}.*:E}DIR}
 .if !make(buildincludes)
 STAGE_SETS+=	${group}
 .endif
@@ -56,7 +57,7 @@ stage_as.${file:T}: ${file}
 
 installfiles-${group}: _${group}INS_${file:T}
 _${group}INS_${file:T}: ${file}
-	${INSTALL} -o ${${group}OWN_${.ALLSRC:T}} \
+	${INSTALL} -C -o ${${group}OWN_${.ALLSRC:T}} \
 	    -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \
 	    ${.ALLSRC} \
 	    ${DESTDIR}${${group}DIR_${.ALLSRC:T}}/${${group}NAME_${.ALLSRC:T}}
@@ -70,11 +71,11 @@ stage_files.${group}: ${_${group}FILES}
 installfiles-${group}: _${group}INS
 _${group}INS: ${_${group}FILES}
 .if defined(${group}NAME)
-	${INSTALL} -o ${${group}OWN} -g ${${group}GRP} \
+	${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} \
 	    -m ${${group}MODE} ${.ALLSRC} \
 	    ${DESTDIR}${${group}DIR}/${${group}NAME}
 .else
-	${INSTALL} -o ${${group}OWN} -g ${${group}GRP} \
+	${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} \
 	    -m ${${group}MODE} ${.ALLSRC} ${DESTDIR}${${group}DIR}
 .endif
 .endif
Index: share/mk/bsd.lib.mk
===================================================================
--- share/mk/bsd.lib.mk	(revision 289150)
+++ share/mk/bsd.lib.mk	(working copy)
@@ -390,7 +390,6 @@ _libinstall:
 .include <bsd.nls.mk>
 .include <bsd.files.mk>
 .include <bsd.incs.mk>
-.include <bsd.confs.mk>
 .endif
 
 .include <bsd.links.mk>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 602 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20151011/89a94ffa/attachment.bin>


More information about the svn-src-head mailing list