From owner-freebsd-audit Wed Aug 8 7:33:14 2001 Delivered-To: freebsd-audit@freebsd.org Received: from alpo.whistle.com (s206m1.whistle.com [207.76.206.1]) by hub.freebsd.org (Postfix) with ESMTP id CB3D937B403 for ; Wed, 8 Aug 2001 07:33:11 -0700 (PDT) (envelope-from mark@whistle.com) Received: from [207.76.207.129] (PBG4.whistle.com [207.76.207.129]) by alpo.whistle.com (8.9.1a/8.9.1) with ESMTP id HAA62365; Wed, 8 Aug 2001 07:31:05 -0700 (PDT) Mime-Version: 1.0 X-Sender: mark-ml@207.76.206.1 Message-Id: In-Reply-To: <20010808123139.G534@ringworld.oblivion.bg> References: <20010808183309.M6269-100000@besplex.bde.org> <20010808123139.G534@ringworld.oblivion.bg> Date: Wed, 8 Aug 2001 07:30:55 -0700 To: Peter Pentchev , Bruce Evans From: Mark Peek Subject: Re: [PATCH] fix a file(1) minor POLA stretching Cc: audit@FreeBSD.ORG Content-Type: text/plain; charset="us-ascii" ; format="flowed" 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 At 12:31 PM +0300 8/8/01, Peter Pentchev wrote: >On Wed, Aug 08, 2001 at 06:45:44PM +1000, Bruce Evans wrote: > > Building at install time breaks installing from readonly object trees > > (if the sources somehow become out of date). Bruce, thanks for catching my mistake. You're right, my patch would break readonly object trees. >True. Then how about just generating the magic DB at install time, >right into the destination directory? >Patch attached. Given the constraints of cross platform builds and readonly object trees (phase of the moon anyone? :-) ), I believe your updated patch is on the right track. > beforeinstall: > $(INSTALL) $(COPY) -o $(BINOWN) -g $(BINGRP) -m $(MAGICMODE) \ > magic $(DESTDIR)$(MAGICFILE) >+ cd ${DESTDIR}${MAGICFILE:H} && \ >+ ${.OBJDIR}/file -C -m ${DESTDIR}${MAGICFILE} > I don't believe the "cd" is necessary and you could get away with: ./file -C -m ${DESTDIR}${MAGICFILE} Mark To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message