some etc fixes

. split user-editable and system-owned files in etc/Makefile
	. mtab is a symlink, not a file now; remove it
	. force-install of certain system-controlled /etc files from
	  top Makefile
	. rename /etc/make.conf to /etc/mk.conf; and don't set $ARCH;
	  reduce difference in bsd.own.mk

Change-Id: I9f4bbb8d37ba80cba7dcfcf1a9a89e934910f579
This commit is contained in:
Ben Gras 2013-04-02 22:42:17 +00:00
parent b622d2b795
commit d6bc6cb44b
6 changed files with 26 additions and 17 deletions

View file

@ -297,6 +297,7 @@ build: .PHONY .MAKE
.endfor
${MAKEDIRTARGET} etc install-etc-release
.if defined(__MINIX)
${MAKEDIRTARGET} etc install-etc-files-safe DESTDIR=${DESTDIR:U/}
${MAKEDIRTARGET} releasetools do-hdboot
.endif # defined(__MINIX)
@echo "Build started at: ${START_TIME}"

View file

@ -75,7 +75,8 @@
./etc/group minix-sys
./etc/hostname.file minix-sys
./etc/inet.conf minix-sys
./etc/make.conf minix-sys
./etc/make.conf minix-sys obsolete
./etc/mk.conf minix-sys
./etc/man.conf minix-sys
./etc/master.passwd minix-sys
./etc minix-sys

View file

@ -92,14 +92,9 @@ BINOWN= root
BINGRP= operator
UTMPGRP= utmp
.if defined(__MINIX)
BIN1+= \
boot.cfg.default \
group hostname.file inet.conf \
make.conf man.conf \
motd mtab \
profile protocols \
resolv.conf \
rc rc.conf rc.cd rc.subr \
BIN1+= boot.cfg.default \
man.conf \
protocols rc rc.cd rc.subr \
rc.daemons.dist rs.inet rs.single \
services shells syslog.conf \
termcap utmp
@ -331,10 +326,28 @@ install-etc-files: .PHONY .MAKE check_DESTDIR MAKEDEV
) | ${METALOG.add}
.endif # MKUNPRIVED != no
.if defined(__MINIX)
# BJG: Unsafe (i.e. user-editable) files for Minix
.for owner group mode sdir tdir files in \
${BINOWN} ${BINGRP} ${BINMODE} ${NETBSDSRCDIR}/etc/ ${DESTDIR}/etc/ group \
${BINOWN} ${BINGRP} ${BINMODE} ${NETBSDSRCDIR}/etc/ ${DESTDIR}/etc/ hostname.file \
${BINOWN} ${BINGRP} ${BINMODE} ${NETBSDSRCDIR}/etc/ ${DESTDIR}/etc/ inet.conf \
${BINOWN} ${BINGRP} ${BINMODE} ${NETBSDSRCDIR}/etc/ ${DESTDIR}/etc/ mk.conf \
${BINOWN} ${BINGRP} ${BINMODE} ${NETBSDSRCDIR}/etc/ ${DESTDIR}/etc/ resolv.conf \
${BINOWN} ${BINGRP} ${BINMODE} ${NETBSDSRCDIR}/etc/ ${DESTDIR}/etc/ motd \
${BINOWN} ${BINGRP} ${BINMODE} ${NETBSDSRCDIR}/etc/ ${DESTDIR}/etc/ rc.conf \
${BINOWN} ${BINGRP} ${BINMODE} ${NETBSDSRCDIR}/etc/ ${DESTDIR}/etc/ profile
${_MKMSG_INSTALL} ${DESTDIR}${_dir}${file}
if [ ! -e ${tdir} ]; then \
${INSTALL_DIR} ${tdir}; \
fi; \
${INSTALL_FILE} -o ${owner} -g ${group} -m ${mode} ${sdir}${files} ${tdir};
.endfor
# LSC: We need a safe install target for etc files, as this is expected from
# our current user base. This safe version only leaves out the master.passwd
# file in order not to loose any user account created.
#
# BJG: For Minix, the -safe target *is* performed by "make build"
#
# LSC: To ensure minimal modifications, the logic is a bit contrived, i.e. the
# NetBSD build system expect install-etc-files to be unsafe, so what was done
# is to separate that step into two steps, with the unsafe version refering

View file

@ -1,5 +1,3 @@
# which architecture to compile for
ARCH=i386
MAKEVERBOSE?= 1
.ifdef BSD_PKG_MK

View file

View file

@ -10,9 +10,6 @@ _BSD_OWN_MK_=1
.if defined(__MINIX)
# LSC FIXME: Useless difference, Should use the mk.conf
MAKECONF?= /etc/make.conf
# Some Minix deviations from NetBSD
LDSTATIC?= -static
MKDYNAMICROOT?= no
@ -56,10 +53,9 @@ MACHINE:= i386
. endif
. endif # !defined(HOSTPROG) && !defined(HOSTLIB)
.endif # __uname_s == "Minix"
.else
MAKECONF?= /etc/mk.conf
.endif # defined(__MINIX)
MAKECONF?= /etc/mk.conf
.-include "${MAKECONF}"
#