Revert r245316. Systems with non-standard uids/gids are more prevalent
that I'd feared. Discussion is ongoing about the scope of a safer solution.
This commit is contained in:
parent
f30498a04b
commit
0fc1aae5e2
@ -340,14 +340,12 @@ LIB32WMAKEFLAGS+= \
|
|||||||
|
|
||||||
LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} ${LIB32WMAKEFLAGS} \
|
LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} ${LIB32WMAKEFLAGS} \
|
||||||
-DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO -DWITHOUT_HTML
|
-DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO -DWITHOUT_HTML
|
||||||
LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*:N_LDSCRIPTROOT=*} -DNO_INCS \
|
LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*:N_LDSCRIPTROOT=*} -DNO_INCS
|
||||||
INSTALL="install -N ${.CURDIR}/etc"
|
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
# install stage
|
||||||
IMAKEENV= ${CROSSENV:N_LDSCRIPTROOT=*}
|
IMAKEENV= ${CROSSENV:N_LDSCRIPTROOT=*}
|
||||||
IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1 \
|
IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1
|
||||||
INSTALL="install -N ${.CURDIR}/etc" \
|
|
||||||
MTREE_CMD="nmtree -N ${.CURDIR}/etc"
|
|
||||||
.if empty(.MAKEFLAGS:M-n)
|
.if empty(.MAKEFLAGS:M-n)
|
||||||
IMAKEENV+= PATH=${STRICTTMPPATH}:${INSTALLTMP} \
|
IMAKEENV+= PATH=${STRICTTMPPATH}:${INSTALLTMP} \
|
||||||
LD_LIBRARY_PATH=${INSTALLTMP} \
|
LD_LIBRARY_PATH=${INSTALLTMP} \
|
||||||
@ -610,6 +608,34 @@ installcheck_DESTDIR:
|
|||||||
.endif
|
.endif
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check for missing UIDs/GIDs.
|
||||||
|
#
|
||||||
|
CHECK_UIDS= auditdistd
|
||||||
|
CHECK_GIDS= audit
|
||||||
|
.if ${MK_SENDMAIL} != "no"
|
||||||
|
CHECK_UIDS+= smmsp
|
||||||
|
CHECK_GIDS+= smmsp
|
||||||
|
.endif
|
||||||
|
.if ${MK_PF} != "no"
|
||||||
|
CHECK_UIDS+= proxy
|
||||||
|
CHECK_GIDS+= proxy authpf
|
||||||
|
.endif
|
||||||
|
installcheck: installcheck_UGID
|
||||||
|
installcheck_UGID:
|
||||||
|
.for uid in ${CHECK_UIDS}
|
||||||
|
@if ! `id -u ${uid} >/dev/null 2>&1`; then \
|
||||||
|
echo "ERROR: Required ${uid} user is missing, see /usr/src/UPDATING."; \
|
||||||
|
false; \
|
||||||
|
fi
|
||||||
|
.endfor
|
||||||
|
.for gid in ${CHECK_GIDS}
|
||||||
|
@if ! `find / -prune -group ${gid} >/dev/null 2>&1`; then \
|
||||||
|
echo "ERROR: Required ${gid} group is missing, see /usr/src/UPDATING."; \
|
||||||
|
false; \
|
||||||
|
fi
|
||||||
|
.endfor
|
||||||
|
|
||||||
#
|
#
|
||||||
# Required install tools to be saved in a scratch dir for safety.
|
# Required install tools to be saved in a scratch dir for safety.
|
||||||
#
|
#
|
||||||
@ -666,7 +692,6 @@ distributeworld installworld: installcheck
|
|||||||
done); \
|
done); \
|
||||||
cp $$libs $$progs ${INSTALLTMP}
|
cp $$libs $$progs ${INSTALLTMP}
|
||||||
cp -R $${PATH_LOCALE:-"/usr/share/locale"} ${INSTALLTMP}/locale
|
cp -R $${PATH_LOCALE:-"/usr/share/locale"} ${INSTALLTMP}/locale
|
||||||
rm -f ${METALOG}
|
|
||||||
.if make(distributeworld)
|
.if make(distributeworld)
|
||||||
.for dist in ${EXTRA_DISTRIBUTIONS}
|
.for dist in ${EXTRA_DISTRIBUTIONS}
|
||||||
-mkdir ${DESTDIR}/${DISTDIR}/${dist}
|
-mkdir ${DESTDIR}/${DISTDIR}/${dist}
|
||||||
@ -728,8 +753,7 @@ redistribute:
|
|||||||
.endif
|
.endif
|
||||||
|
|
||||||
distrib-dirs distribution:
|
distrib-dirs distribution:
|
||||||
cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \
|
cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} ${.TARGET}
|
||||||
INSTALL="install -N ${.CURDIR}/etc" ${.TARGET}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# buildkernel and installkernel
|
# buildkernel and installkernel
|
||||||
@ -1035,11 +1059,6 @@ _lex= usr.bin/lex
|
|||||||
_yacc= usr.bin/yacc
|
_yacc= usr.bin/yacc
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.if ${BOOTSTRAPPING} < 1000026
|
|
||||||
_nmtree= lib/libnetbsd \
|
|
||||||
usr.sbin/nmtree
|
|
||||||
.endif
|
|
||||||
|
|
||||||
.if ${BOOTSTRAPPING} >= 900040 && ${BOOTSTRAPPING} < 900041
|
.if ${BOOTSTRAPPING} >= 900040 && ${BOOTSTRAPPING} < 900041
|
||||||
_awk= usr.bin/awk
|
_awk= usr.bin/awk
|
||||||
.endif
|
.endif
|
||||||
@ -1101,8 +1120,7 @@ bootstrap-tools:
|
|||||||
${_lex} \
|
${_lex} \
|
||||||
usr.bin/xinstall \
|
usr.bin/xinstall \
|
||||||
${_gensnmptree} \
|
${_gensnmptree} \
|
||||||
usr.sbin/config \
|
usr.sbin/config
|
||||||
${_nmtree}
|
|
||||||
${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \
|
${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \
|
||||||
cd ${.CURDIR}/${_tool}; \
|
cd ${.CURDIR}/${_tool}; \
|
||||||
${MAKE} DIRPRFX=${_tool}/ obj; \
|
${MAKE} DIRPRFX=${_tool}/ obj; \
|
||||||
|
18
etc/Makefile
18
etc/Makefile
@ -291,27 +291,25 @@ distribution:
|
|||||||
${DESTDIR}/etc/nsswitch.conf
|
${DESTDIR}/etc/nsswitch.conf
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
MTREE_CMD?= mtree
|
|
||||||
|
|
||||||
distrib-dirs:
|
distrib-dirs:
|
||||||
${MTREE_CMD} -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
|
mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
|
||||||
${MTREE_CMD} -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
|
mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
|
||||||
${MTREE_CMD} -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
|
mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
|
||||||
${MTREE_CMD} -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \
|
mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \
|
||||||
-p ${DESTDIR}/usr/include
|
-p ${DESTDIR}/usr/include
|
||||||
.if ${MK_BIND_LIBS} != "no"
|
.if ${MK_BIND_LIBS} != "no"
|
||||||
${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.include.dist \
|
mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.include.dist \
|
||||||
-p ${DESTDIR}/usr/include
|
-p ${DESTDIR}/usr/include
|
||||||
.endif
|
.endif
|
||||||
.if ${MK_BIND_MTREE} != "no"
|
.if ${MK_BIND_MTREE} != "no"
|
||||||
${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.chroot.dist \
|
mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.chroot.dist \
|
||||||
-p ${DESTDIR}/var/named
|
-p ${DESTDIR}/var/named
|
||||||
.endif
|
.endif
|
||||||
.if ${MK_GROFF} != "no"
|
.if ${MK_GROFF} != "no"
|
||||||
${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.groff.dist -p ${DESTDIR}/usr
|
mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.groff.dist -p ${DESTDIR}/usr
|
||||||
.endif
|
.endif
|
||||||
.if ${MK_SENDMAIL} != "no"
|
.if ${MK_SENDMAIL} != "no"
|
||||||
${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/
|
mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/
|
||||||
.endif
|
.endif
|
||||||
cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
|
cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
|
||||||
cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* .
|
cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* .
|
||||||
|
Loading…
Reference in New Issue
Block a user