Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src all:



details:   https://anonhg.NetBSD.org/src/rev/9bffbcfe05cc
branches:  trunk
changeset: 543296:9bffbcfe05cc
user:      lukem <lukem%NetBSD.org@localhost>
date:      Sat Feb 22 03:20:45 2003 +0000

description:
all:
        Use /var/db/obsolete instead of /etc/obsolete

etc/Makefile:
        Create separate target "install-obsolete-files" to populate
        /var/db/obsolete, instead of using "install-etc-files".

Makefile:
        Add do-obsolete target, to run "cd etc && make install-obsolete-files",
        and add this to BUILDTARGETS.
        This moves the "obsolete files" creation from "distribution" to "build".


Per discussion with Andrew Brown.

diffstat:

 Makefile                            |   6 +++++-
 distrib/common/list.sysinst         |   4 ++--
 distrib/common/mtree.common         |  30 +++++++++++++++---------------
 distrib/sets/lists/base/mi          |   4 ++--
 distrib/sets/lists/base/obsolete.mi |   3 ++-
 distrib/sets/lists/etc/mi           |  16 ++++++++--------
 distrib/sets/lists/etc/obsolete.mi  |   9 ++++++++-
 distrib/utils/sysinst/util.c        |   6 +++---
 etc/Makefile                        |  15 +++++++++++----
 etc/mtree/NetBSD.dist               |   4 ++--
 etc/postinstall                     |   4 ++--
 11 files changed, 60 insertions(+), 41 deletions(-)

diffs (300 lines):

diff -r ea1ee0f81cdc -r 9bffbcfe05cc Makefile
--- a/Makefile  Sat Feb 22 01:52:25 2003 +0000
+++ b/Makefile  Sat Feb 22 03:20:45 2003 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.199 2003/01/26 06:19:12 lukem Exp $
+#      $NetBSD: Makefile,v 1.200 2003/02/22 03:20:45 lukem Exp $
 
 #
 # This is the top-level makefile for building NetBSD. For an outline of
@@ -162,6 +162,7 @@
 BUILDTARGETS+= includes
 .endif
 BUILDTARGETS+= do-lib-csu do-lib-libc do-lib do-gnu-lib do-ld.so do-build
+BUILDTARGETS+= do-obsolete
 
 #
 # Enforce proper ordering of some rules.
@@ -308,6 +309,9 @@
        (cd ${.CURDIR} && ${MAKE} ${targ} BUILD_tools=no BUILD_lib=no)
 .endfor
 
+do-obsolete:
+       (cd ${.CURDIR}/etc && ${MAKE} install-obsolete-lists)
+
 #
 # Speedup stubs for some subtrees that don't need to run these rules.
 # (Tells <bsd.subdir.mk> not to recurse for them.)
diff -r ea1ee0f81cdc -r 9bffbcfe05cc distrib/common/list.sysinst
--- a/distrib/common/list.sysinst       Sat Feb 22 01:52:25 2003 +0000
+++ b/distrib/common/list.sysinst       Sat Feb 22 03:20:45 2003 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: list.sysinst,v 1.7 2003/02/20 12:06:54 lukem Exp $
+#      $NetBSD: list.sysinst,v 1.8 2003/02/22 03:20:47 lukem Exp $
 #
 # list file (c.f. parselist.awk) for sysinst-using install media.
 #
@@ -11,4 +11,4 @@
 SPECIAL        sysinst srcdir  distrib/utils/sysinst/arch/${MACHINE}
 
 # generate the lists of obsolete files used by sysinst
-CMD    sh ${DISTRIBDIR}/sets/makeobsolete -b -s ${DISTRIBDIR}/sets -t ./etc/obsolete
+CMD    sh ${DISTRIBDIR}/sets/makeobsolete -b -s ${DISTRIBDIR}/sets -t ./var/db/obsolete
diff -r ea1ee0f81cdc -r 9bffbcfe05cc distrib/common/mtree.common
--- a/distrib/common/mtree.common       Sat Feb 22 01:52:25 2003 +0000
+++ b/distrib/common/mtree.common       Sat Feb 22 03:20:45 2003 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: mtree.common,v 1.2 2003/02/20 12:06:54 lukem Exp $
+#      $NetBSD: mtree.common,v 1.3 2003/02/22 03:20:47 lukem Exp $
 
 /set                           type=dir uname=root gname=wheel mode=0755
 
@@ -6,20 +6,6 @@
 ./bin
 ./dev
 ./etc
-./etc/obsolete
-./etc/obsolete/base            type=file mode=644 optional
-./etc/obsolete/comp            type=file mode=644 optional
-./etc/obsolete/etc             type=file mode=644 optional
-./etc/obsolete/games           type=file mode=644 optional
-./etc/obsolete/man             type=file mode=644 optional
-./etc/obsolete/misc            type=file mode=644 optional
-./etc/obsolete/text            type=file mode=644 optional
-./etc/obsolete/xbase           type=file mode=644 optional
-./etc/obsolete/xcomp           type=file mode=644 optional
-./etc/obsolete/xcontrib                type=file mode=644 optional
-./etc/obsolete/xfont           type=file mode=644 optional
-./etc/obsolete/xserver         type=file mode=644 optional
-./etc/obsolete/xmisc           type=file mode=644 optional
 ./mnt
 ./mnt2
 ./kern
@@ -33,6 +19,20 @@
 ./usr/share/misc
 ./var
 ./var/db
+./var/db/obsolete
+./var/db/obsolete/base         type=file mode=644 optional
+./var/db/obsolete/comp         type=file mode=644 optional
+./var/db/obsolete/etc          type=file mode=644 optional
+./var/db/obsolete/games                type=file mode=644 optional
+./var/db/obsolete/man          type=file mode=644 optional
+./var/db/obsolete/misc         type=file mode=644 optional
+./var/db/obsolete/text         type=file mode=644 optional
+./var/db/obsolete/xbase                type=file mode=644 optional
+./var/db/obsolete/xcomp                type=file mode=644 optional
+./var/db/obsolete/xcontrib     type=file mode=644 optional
+./var/db/obsolete/xfont                type=file mode=644 optional
+./var/db/obsolete/xserver      type=file mode=644 optional
+./var/db/obsolete/xmisc                type=file mode=644 optional
 ./var/run
 ./var/log
 ./var/spool
diff -r ea1ee0f81cdc -r 9bffbcfe05cc distrib/sets/lists/base/mi
--- a/distrib/sets/lists/base/mi        Sat Feb 22 01:52:25 2003 +0000
+++ b/distrib/sets/lists/base/mi        Sat Feb 22 03:20:45 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.382 2003/02/20 11:40:30 lukem Exp $
+# $NetBSD: mi,v 1.383 2003/02/22 03:20:47 lukem Exp $
 .                      base-sys-root
 ./altroot              base-sys-root
 ./bin                  base-sys-root
@@ -51,7 +51,7 @@
 ./etc/mail             base-sendmail-root
 ./etc/mtree            base-sys-root
 ./etc/namedb           base-bind-root
-./etc/obsolete         base-sys-root
+./var/db/obsolete      base-sys-root
 ./etc/openssl          base-crypto-root
 ./etc/openssl/certs    base-crypto-root
 ./etc/openssl/misc     base-crypto-root
diff -r ea1ee0f81cdc -r 9bffbcfe05cc distrib/sets/lists/base/obsolete.mi
--- a/distrib/sets/lists/base/obsolete.mi       Sat Feb 22 01:52:25 2003 +0000
+++ b/distrib/sets/lists/base/obsolete.mi       Sat Feb 22 03:20:45 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: obsolete.mi,v 1.65 2002/12/21 23:44:05 wiz Exp $
+# $NetBSD: obsolete.mi,v 1.66 2003/02/22 03:20:47 lukem Exp $
 ./bin/rcorder
 ./dev/i4b
 ./dev/i4bctl
@@ -9,6 +9,7 @@
 ./dev/i4btrc0
 ./dev/i4btrc1
 ./etc/disklabels
+./etc/obsolete
 ./sbin/dumpfs
 ./sbin/dumplfs
 ./sbin/ispppcontrol
diff -r ea1ee0f81cdc -r 9bffbcfe05cc distrib/sets/lists/etc/mi
--- a/distrib/sets/lists/etc/mi Sat Feb 22 01:52:25 2003 +0000
+++ b/distrib/sets/lists/etc/mi Sat Feb 22 03:20:45 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.114 2003/02/20 11:40:30 lukem Exp $
+# $NetBSD: mi,v 1.115 2003/02/22 03:20:48 lukem Exp $
 ./.cshrc                               etc-util-etc
 ./.profile                             etc-util-etc
 ./dev/MAKEDEV                          etc-sys-etc
@@ -54,13 +54,6 @@
 ./etc/newsyslog.conf                   etc-sysutil-etc
 ./etc/nsswitch.conf                    etc-net-etc
 ./etc/ntp.conf                         etc-ntp-etc
-./etc/obsolete/base                    etc-sys-etc
-./etc/obsolete/comp                    etc-sys-etc
-./etc/obsolete/etc                     etc-sys-etc
-./etc/obsolete/games                   etc-sys-etc
-./etc/obsolete/man                     etc-sys-etc
-./etc/obsolete/misc                    etc-sys-etc
-./etc/obsolete/text                    etc-sys-etc
 ./etc/passwd                           etc-sys-etc
 ./etc/passwd.conf                      etc-sys-etc
 ./etc/phones                           etc-uucp-etc
@@ -204,6 +197,13 @@
 ./var/cron/log                         etc-cron-log
 ./var/cron/tabs/root                   etc-cron-root
 ./var/db/locate.database               etc-sys-root
+./var/db/obsolete/base                 etc-sys-etc
+./var/db/obsolete/comp                 etc-sys-etc
+./var/db/obsolete/etc                  etc-sys-etc
+./var/db/obsolete/games                        etc-sys-etc
+./var/db/obsolete/man                  etc-sys-etc
+./var/db/obsolete/misc                 etc-sys-etc
+./var/db/obsolete/text                 etc-sys-etc
 ./var/games/atc_scores                 etc-games-scores
 ./var/games/battlestar.log             etc-games-scores
 ./var/games/cfscores                   etc-games-scores
diff -r ea1ee0f81cdc -r 9bffbcfe05cc distrib/sets/lists/etc/obsolete.mi
--- a/distrib/sets/lists/etc/obsolete.mi        Sat Feb 22 01:52:25 2003 +0000
+++ b/distrib/sets/lists/etc/obsolete.mi        Sat Feb 22 03:20:45 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: obsolete.mi,v 1.13 2003/01/16 22:04:50 lukem Exp $
+# $NetBSD: obsolete.mi,v 1.14 2003/02/22 03:20:48 lukem Exp $
 ./etc/default
 ./etc/default/daily.conf
 ./etc/default/monthly.conf
@@ -18,6 +18,13 @@
 ./etc/fstab.sd7
 ./etc/fstab.tmp
 ./etc/fstab.wd
+./etc/obsolete/base
+./etc/obsolete/comp
+./etc/obsolete/etc
+./etc/obsolete/games
+./etc/obsolete/man
+./etc/obsolete/misc
+./etc/obsolete/text
 ./etc/primes
 ./etc/rc.d/NETWORK
 ./etc/rc.d/fsck.sh
diff -r ea1ee0f81cdc -r 9bffbcfe05cc distrib/utils/sysinst/util.c
--- a/distrib/utils/sysinst/util.c      Sat Feb 22 01:52:25 2003 +0000
+++ b/distrib/utils/sysinst/util.c      Sat Feb 22 03:20:45 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: util.c,v 1.87 2003/02/20 22:21:25 lukem Exp $  */
+/*     $NetBSD: util.c,v 1.88 2003/02/22 03:20:48 lukem Exp $  */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -556,7 +556,7 @@
 
 /*
  * Do pre-extract cleanup for set 'name':
- * open a file named '/etc/obsolete/<name>', which contain a list of
+ * open a file named '/var/db/obsolete/<name>', which contain a list of
  * files to kill from the target. For each file, test if it is present on
  * the target. Then display the list of files which will be removed,
  * ask user for confirmation, and process.
@@ -585,7 +585,7 @@
        int retval = 1;
        int needok = 0;
 
-       snprintf(file_path, MAXPATHLEN, "/etc/obsolete/%s", name);
+       snprintf(file_path, MAXPATHLEN, "/var/db/obsolete/%s", name);
        list_file = fopen(file_path, "r");
        if (list_file == NULL) {
                saved_errno = errno;
diff -r ea1ee0f81cdc -r 9bffbcfe05cc etc/Makefile
--- a/etc/Makefile      Sat Feb 22 01:52:25 2003 +0000
+++ b/etc/Makefile      Sat Feb 22 03:20:45 2003 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.246 2003/02/20 11:40:28 lukem Exp $
+#      $NetBSD: Makefile,v 1.247 2003/02/22 03:20:46 lukem Exp $
 #      from: @(#)Makefile      8.7 (Berkeley) 5/25/95
 
 # Environment variables without default values:
@@ -134,8 +134,6 @@
 TARGET_ENDIANNESS=
 .endif
 .endif # install-etc-files                                             # }
-OBSOLETE.dir=          ${.OBJDIR}/obsolete.dir
-OBSOLETE.files=                base comp etc games man misc text
 
 
 # distribution --
@@ -281,11 +279,20 @@
 .if !defined(NO_SENDMAIL) || ${NO_SENDMAIL} == "no"
        (cd ${NETBSDSRCDIR}/gnu/usr.sbin/sendmail/cf/cf; ${MAKE} distribution)
 .endif
+
+
+# install-obsolete-lists --
+#      Install var/db/obsolete set lists; this is performed by "make build"
+#
+OBSOLETE.dir=          ${.OBJDIR}/obsolete.dir
+OBSOLETE.files=                base comp etc games man misc text
+
+install-obsolete-lists:
        mkdir -p ${OBSOLETE.dir}
        (cd ${NETBSDSRCDIR}/distrib/sets; sh ./makeobsolete -t ${OBSOLETE.dir})
 .for file in ${OBSOLETE.files}
        ${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 644 \
-           ${OBSOLETE.dir}/${file} ${DESTDIR}/etc/obsolete
+           ${OBSOLETE.dir}/${file} ${DESTDIR}/var/db/obsolete
 .endfor
 
 
diff -r ea1ee0f81cdc -r 9bffbcfe05cc etc/mtree/NetBSD.dist
--- a/etc/mtree/NetBSD.dist     Sat Feb 22 01:52:25 2003 +0000
+++ b/etc/mtree/NetBSD.dist     Sat Feb 22 03:20:45 2003 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: NetBSD.dist,v 1.216 2003/02/20 11:40:29 lukem Exp $
+#      $NetBSD: NetBSD.dist,v 1.217 2003/02/22 03:20:46 lukem Exp $
 #      @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93
 
 /set type=dir uname=root gname=wheel mode=0755
@@ -17,7 +17,6 @@
 ./etc/mail
 ./etc/mtree
 ./etc/namedb
-./etc/obsolete
 ./etc/openssl
 ./etc/openssl/certs
 ./etc/openssl/misc
@@ -819,6 +818,7 @@
 ./var/cron/tabs                        mode=0700
 ./var/db
 ./var/db/ns
+./var/db/obsolete
 ./var/games                    uname=games gname=games mode=0775
 ./var/games/hackdir            uname=games gname=games mode=0775
 ./var/games/hackdir/save       uname=games gname=games mode=0770
diff -r ea1ee0f81cdc -r 9bffbcfe05cc etc/postinstall
--- a/etc/postinstall   Sat Feb 22 01:52:25 2003 +0000
+++ b/etc/postinstall   Sat Feb 22 03:20:45 2003 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall,v 1.52 2003/02/20 12:47:29 lukem Exp $
+# $NetBSD: postinstall,v 1.53 2003/02/22 03:20:46 lukem Exp $
 #
 # Copyright (c) 2002-2003 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -629,7 +629,7 @@
        failed=0
 
        find_file_in_dirlist base "obsolete set lists" \
-           ${SRC_DIR}/etc/obsolete ${DEST_DIR}/etc/obsolete \
+           ${SRC_DIR}/var/db/obsolete ${DEST_DIR}/var/db/obsolete \
            || return 1
 
        for obssrcfile in ${dir}/*; do



Home | Main Index | Thread Index | Old Index