On Sun, Sep 25, 2016 at 01:14:17AM +0200, Theo Buehler wrote:
> usr/share/mandoc.db is currently installed as the build user:
>
> -rw-r--r-- 1 builder wheel 396748 Sep 24 23:07 mandoc.db
>
> bsd.own.mk defines MANOWN=root, MANGRP=bin, MANMODE=444 and uses these
> for installing the manpages themselves. Therefore I think we should use
> these variables rather than using BINOWN, BINGRP and hardcoded 444 for
> /usr/share/man/COPYRIGHT, and it makes more sense to me to have the
> mandoc.db owned by root:bin as well. The diff below does this.
>
> However, the /etc/weekly script will change the ownership of mandoc.db
> to root:wheel (the current owner of the parent /usr/share/man), so I
> wonder if the entire man hierarchies should be switched to be owned by
> root:bin in the /etc/mtree/*BSD*.dist files. But that's a lot of churn
> and the benefit is unclear to me.
>
> On the other hand, just doing 'chown root:wheel' for mandoc.db and be
> done with it would be a lot simpler...
>
> Index: share/man/Makefile
> ===================================================================
> RCS file: /cvs/src/share/man/Makefile,v
> retrieving revision 1.10
> diff -u -p -r1.10 Makefile
> --- share/man/Makefile 18 Apr 2014 10:00:48 -0000 1.10
> +++ share/man/Makefile 24 Sep 2016 22:39:03 -0000
> @@ -4,10 +4,11 @@
> SUBDIR= man1 man3 man4 man5 man6 man7 man8 man9
>
> afterinstall:
> - ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 man0/COPYRIGHT \
> - ${DESTDIR}/usr/share/man/COPYRIGHT
> + ${INSTALL} ${INSTALL_COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \
> + man0/COPYRIGHT ${DESTDIR}/usr/share/man/COPYRIGHT
>
> makedb:
> /usr/sbin/makewhatis -Qv ${DESTDIR}/usr/share/man
> + chown ${MANOWN}:${MANGRP} ${DESTDIR}/usr/share/man/mandoc.db
I think this should be root:wheel as long as /etc/weekly will reset it
to that. With root:wheel: OK.
>
> .include <bsd.subdir.mk>
>