From owner-freebsd-audit Wed Aug 8 1:48:28 2001 Delivered-To: freebsd-audit@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id D5B3937B403 for ; Wed, 8 Aug 2001 01:48:24 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id SAA32140; Wed, 8 Aug 2001 18:48:13 +1000 Date: Wed, 8 Aug 2001 18:45:44 +1000 (EST) From: Bruce Evans X-X-Sender: To: Mark Peek Cc: Peter Pentchev , Subject: Re: [PATCH] fix a file(1) minor POLA stretching In-Reply-To: Message-ID: <20010808183309.M6269-100000@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 7 Aug 2001, Mark Peek wrote: > >The fix is simple: build and install the new magic database along > >with the old file. Patch attached. Building at install time breaks installing from readonly object trees (if the sources somehow become out of date). > Index: Makefile > =================================================================== > RCS file: /cvs/freebsd/src/usr.bin/file/Makefile,v > retrieving revision 1.18 > diff -u -r1.18 Makefile > --- Makefile 2001/07/30 03:50:04 1.18 > +++ Makefile 2001/08/07 17:11:47 > @@ -25,6 +25,7 @@ > # Hacked and dismembered for bmake (Geoff Rehmet). > > MAGICFILE= /usr/share/misc/magic > +MAGICDB= ${MAGICFILE}.mgc > MAGICMODE= 444 > > SRCDIR= ${.CURDIR}/../../contrib/file > @@ -51,12 +52,17 @@ > magic: $(MAGFILES) > cat $(MAGFILES) > $(.TARGET) > > +magic.mgc: file magic > + ./file -C -m magic > + > CLEANFILES+= print-hacked.c > print-hacked.c: print.c > sed -e 's|daylight|0/*daylight*/|g' ${.ALLSRC} > ${.TARGET} > > -beforeinstall: > +beforeinstall: magic.mgc > $(INSTALL) $(COPY) -o $(BINOWN) -g $(BINGRP) -m $(MAGICMODE) \ > magic $(DESTDIR)$(MAGICFILE) > + $(INSTALL) $(COPY) -o $(BINOWN) -g $(BINGRP) -m $(MAGICMODE) \ > + magic.mgc $(DESTDIR)$(MAGICDB) > > .include It is always a bug for beforeinstall to depend on a file. This bug is currently only in the following Makefiles: ./kerberos5/Makefile.inc:beforeinstall: ${INCLUDES} ./kerberosIV/Makefile.inc:beforeinstall: ${INCLUDES} ./lib/libncurses/Makefile:beforeinstall: ${HEADERS} ./secure/lib/libcrypto/Makefile:beforeinstall: openssl/opensslconf.h openssl/evp.h ./secure/lib/libssl/Makefile:beforeinstall: openssl/opensslconf.h openssl/evp.h Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message