Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Aug 2001 12:31:39 +0300
From:      Peter Pentchev <roam@ringlet.net>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        Mark Peek <mark@whistle.com>, audit@FreeBSD.ORG
Subject:   Re: [PATCH] fix a file(1) minor POLA stretching
Message-ID:  <20010808123139.G534@ringworld.oblivion.bg>
In-Reply-To: <20010808183309.M6269-100000@besplex.bde.org>; from bde@zeta.org.au on Wed, Aug 08, 2001 at 06:45:44PM %2B1000
References:  <p0510030bb795ce34d864@[207.76.207.129]> <20010808183309.M6269-100000@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Aug 08, 2001 at 06:45:44PM +1000, Bruce Evans wrote:
> 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).

True.  Then how about just generating the magic DB at install time,
right into the destination directory?
Patch attached.

G'luck,
Peter

-- 
Hey, out there - is it *you* reading me, or is it someone else?

Index: src/usr.bin/file/Makefile
===================================================================
RCS file: /home/ncvs/src/usr.bin/file/Makefile,v
retrieving revision 1.18
diff -u -r1.18 Makefile
--- src/usr.bin/file/Makefile	2001/07/30 03:50:04	1.18
+++ src/usr.bin/file/Makefile	2001/08/08 09:13:22
@@ -58,5 +58,7 @@
 beforeinstall:
 	$(INSTALL) $(COPY) -o $(BINOWN) -g $(BINGRP) -m $(MAGICMODE) \
 	    magic $(DESTDIR)$(MAGICFILE)
+	cd ${DESTDIR}${MAGICFILE:H} && \
+	    ${.OBJDIR}/file -C -m ${DESTDIR}${MAGICFILE}
 
 .include <bsd.prog.mk>

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?20010808123139.G534>