From: Ben Gras Date: Tue, 2 Apr 2013 22:42:17 +0000 (+0000) Subject: some etc fixes X-Git-Tag: v3.3.0~1060 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zlib_tech.html?a=commitdiff_plain;h=refs%2Fchanges%2F54%2F454%2F5;p=minix.git 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 --- diff --git a/Makefile b/Makefile index 02ffe19b0..bbe2ccdb4 100644 --- a/Makefile +++ b/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}" diff --git a/distrib/sets/lists/minix/mi b/distrib/sets/lists/minix/mi index b4449a085..d9a1eb97d 100644 --- a/distrib/sets/lists/minix/mi +++ b/distrib/sets/lists/minix/mi @@ -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 diff --git a/etc/Makefile b/etc/Makefile index 69314baee..549054730 100644 --- a/etc/Makefile +++ b/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 diff --git a/etc/make.conf b/etc/mk.conf similarity index 70% rename from etc/make.conf rename to etc/mk.conf index e50b6e32b..f8ea31c88 100644 --- a/etc/make.conf +++ b/etc/mk.conf @@ -1,5 +1,3 @@ -# which architecture to compile for -ARCH=i386 MAKEVERBOSE?= 1 .ifdef BSD_PKG_MK diff --git a/etc/mtab b/etc/mtab deleted file mode 100755 index e69de29bb..000000000 diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index 9e7482dbb..c67e9a417 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -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" +.endif # defined(__MINIX) -.else MAKECONF?= /etc/mk.conf -.endif # defined(__MINIX) .-include "${MAKECONF}" #