]> Zhao Yanbai Git Server - minix.git/commitdiff
some etc fixes 54/454/5
authorBen Gras <ben@minix3.org>
Tue, 2 Apr 2013 22:42:17 +0000 (22:42 +0000)
committerBen Gras <ben@minix3.org>
Thu, 4 Apr 2013 12:50:12 +0000 (12:50 +0000)
. 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

Makefile
distrib/sets/lists/minix/mi
etc/Makefile
etc/mk.conf [moved from etc/make.conf with 70% similarity]
etc/mtab [deleted file]
share/mk/bsd.own.mk

index 02ffe19b04c4504f753fa3625069b98aab7dc80e..bbe2ccdb4dd1dd2b63464bc79f7db998393ed4ae 100644 (file)
--- 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}"
index b4449a085bf81cbe59919fa70f769930ff4b648a..d9a1eb97de4b514f37ede4f3d1ae43a8f3d6eb38 100644 (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
index 69314baeeca0a1031d0769d11fd800ec414f1d08..54905473083034ab955eb369235c375fb85e6acc 100644 (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 
similarity index 70%
rename from etc/make.conf
rename to etc/mk.conf
index e50b6e32b1eb902eb0a0a98e5230fd3962761c6b..f8ea31c882db2e6633e244341b0ffe81c202574c 100644 (file)
@@ -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 (executable)
index e69de29..0000000
index 9e7482dbb27086b6c3103958d10b18d8f3b29a03..c67e9a4175299aa4e4e419c47aee666a957753d1 100644 (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"
+.endif # defined(__MINIX)
 
-.else
 MAKECONF?=     /etc/mk.conf
-.endif # defined(__MINIX)
 .-include "${MAKECONF}"
 
 #