From e50c8f0c0bce2847af8b5a6ac29d10540daa24bb Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Wed, 19 Nov 2003 01:05:32 +0000 Subject: [PATCH] Redo the 'upgrade' target. Get rid of the old elf stuff and change the definition of 'upgrade'. Upgrade will not update all files that are supposed to be 'static' (i.e. not modified by the user). For example, most /etc/rc* and most files in /etc/rc.d. --- Makefile | 10 +++++++-- etc/Makefile | 61 +++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 57 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 5b83760f77..ab3dbd521a 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # # $FreeBSD: src/Makefile,v 1.234.2.19 2003/04/16 09:59:40 ru Exp $ -# $DragonFly: src/Makefile,v 1.2 2003/06/17 04:21:10 dillon Exp $ +# $DragonFly: src/Makefile,v 1.3 2003/11/19 01:05:31 dillon Exp $ # # The user-driven targets are: # @@ -219,7 +219,13 @@ UPGRADE= aout-to-elf aout-to-elf-build aout-to-elf-install \ # Handle the upgrade targets, using the source relative mk files. # -upgrade: aout-to-elf +upgrade: upgrade_etc + +# +# Handle post-installworld updating of static files (e.g. like /etc/rc) +# +upgrade_etc: + @cd ${.CURDIR}/etc; make upgrade_etc ${UPGRADE} : upgrade_checks @cd ${.CURDIR}; \ diff --git a/etc/Makefile b/etc/Makefile index 5ebb6b993b..fe7c2a871f 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -1,28 +1,33 @@ # from: @(#)Makefile 5.11 (Berkeley) 5/21/91 # $FreeBSD: src/etc/Makefile,v 1.219.2.38 2003/03/04 09:49:00 ru Exp $ -# $DragonFly: src/etc/Makefile,v 1.6 2003/08/01 03:48:33 rob Exp $ +# $DragonFly: src/etc/Makefile,v 1.7 2003/11/19 01:05:32 dillon Exp $ .if !defined(NO_SENDMAIL) SUBDIR= sendmail .endif -BIN1= amd.map apmd.conf auth.conf \ - crontab csh.cshrc csh.login csh.logout \ - dhclient.conf dm.conf fbtab ftpusers gettytab group \ - hosts hosts.allow host.conf hosts.equiv hosts.lpd \ - inetd.conf login.access login.conf \ - motd modems networks network.subr newsyslog.conf \ - pam.conf phones printcap profile protocols \ +BINUPDATE= apmd.conf fbtab gettytab network.subr \ + protocols \ rc rc.firewall rc.firewall6 \ rc.sendmail rc.shutdown \ - rc.subr remote rpc services \ - shells sysctl.conf syslog.conf usbd.conf \ + rc.subr rpc services \ etc.${MACHINE_ARCH}/disktab \ - etc.${MACHINE_ARCH}/ttys \ - ${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config \ ${.CURDIR}/../usr.bin/mail/misc/mail.rc \ ${.CURDIR}/../usr.bin/locate/locate/locate.rc +BIN1= ${BINUPDATE} \ + amd.map auth.conf \ + crontab csh.cshrc csh.login csh.logout \ + dhclient.conf dm.conf ftpusers group \ + hosts hosts.allow host.conf hosts.equiv hosts.lpd \ + inetd.conf login.access login.conf \ + motd modems networks newsyslog.conf \ + pam.conf phones printcap profile \ + remote \ + shells sysctl.conf syslog.conf usbd.conf \ + etc.${MACHINE_ARCH}/ttys \ + ${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config + .if exists(${.CURDIR}/../crypto) && !defined(NO_OPENSSL) .if !defined(NO_OPENSSH) SSH= ${.CURDIR}/../crypto/openssh/ssh_config \ @@ -60,6 +65,38 @@ distribute: echo OBJFORMAT=${OBJFORMAT} > ${DISTDIR}/${DISTRIBUTION}/etc/objformat .endif +upgrade_etc: + cd ${.CURDIR}; \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ + ${BINUPDATE} ${DESTDIR}/etc; \ + cap_mkdb ${DESTDIR}/etc/login.conf; \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \ + ${BIN2} ${DESTDIR}/etc; + cd ${.CURDIR}/defaults; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ + ${DEFAULTS} ${DESTDIR}/etc/defaults + cd ${.CURDIR}/periodic; ${MAKE} install + cd ${.CURDIR}/rc.d; ${MAKE} install + cd ${.CURDIR}/../gnu/usr.bin/send-pr; ${MAKE} etc-gnats-freefall + cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap + cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt +.if !defined(NO_I4B) + cd ${.CURDIR}/isdn; ${MAKE} install +.endif +.if !defined(NO_MAKEDEV) + cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 555 \ + MAKEDEV.local MAKEDEV ${DESTDIR}/dev +.if !defined(NO_MAKEDEV_RUN) + cd ${DESTDIR}/dev; sh MAKEDEV all +.endif +.endif + cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ + ${MTREE} ${DESTDIR}/etc/mtree + cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ + ${FREEBSD} ${DESTDIR}/ +.if !defined(NOMAN) + cd ${.CURDIR}/../share/man; ${MAKE} makedb +.endif + distribution: cd ${.CURDIR}; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ -- 2.41.0