Date: Wed, 8 Aug 2001 18:45:44 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: Mark Peek <mark@whistle.com> Cc: Peter Pentchev <roam@ringlet.net>, <audit@FreeBSD.ORG> Subject: Re: [PATCH] fix a file(1) minor POLA stretching Message-ID: <20010808183309.M6269-100000@besplex.bde.org> In-Reply-To: <p0510030bb795ce34d864@[207.76.207.129]>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <bsd.prog.mk> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010808183309.M6269-100000>