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:
parent
b622d2b795
commit
d6bc6cb44b
6 changed files with 26 additions and 17 deletions
1
Makefile
1
Makefile
|
@ -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}"
|
||||
|
|
|
@ -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
|
||||
|
|
29
etc/Makefile
29
etc/Makefile
|
@ -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
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
# which architecture to compile for
|
||||
ARCH=i386
|
||||
MAKEVERBOSE?= 1
|
||||
|
||||
.ifdef BSD_PKG_MK
|
0
etc/mtab
0
etc/mtab
|
@ -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}"
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue