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.
This commit is contained in:
parent
1dd4645db4
commit
4f6381b784
6
Makefile
6
Makefile
|
@ -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+= do-distrib-dirs
|
|||
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 @@ do-build:
|
|||
(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.)
|
||||
|
|
|
@ -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 @@ PROG usr/bin/progress
|
|||
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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 @@ extract_dist()
|
|||
|
||||
/*
|
||||
* 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 @@ cleanup_dist(name)
|
|||
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;
|
||||
|
|
15
etc/Makefile
15
etc/Makefile
|
@ -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= -B
|
|||
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 @@ install-etc-files: check_DESTDIR
|
|||
.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
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 @@ do_obsolete()
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue