diff --git a/infrastructure/install/make-plist b/infrastructure/install/make-plist index d816ba58dee..7aa714a40c4 100755 --- a/infrastructure/install/make-plist +++ b/infrastructure/install/make-plist @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -# $OpenBSD: make-plist,v 1.31 2003/07/16 22:07:40 espie Exp $ +# $OpenBSD: make-plist,v 1.32 2003/12/26 00:26:01 espie Exp $ # Copyright (c) 1999 Marc Espie # @@ -345,6 +345,29 @@ while (($name, $fh) = each %out) { # compare all files against those dates my @date = (stat $ENV{INSTALL_PRE_COOKIE})[9, 10]; +my %okay_files=map { $_=>1 } split(/\s+/, $ENV{'OKAY_FILES'}); + +# check the installation directory, try to make certain there is +# no file or directory outside of $base +find( + sub { + if ($File::Find::name eq $base) { + $File::Find::prune = 1; + return; + } + if (-d $_) { + return if $File::Find::name eq $destdir; + if (defined $mtree->{$File::Find::name}) { + return; + } else { + print STDERR "Bogus directory: $File::Find::name\n"; + } + } else { + return if defined $okay_files{$File::Find::name}; + print STDERR "Bogus file: $File::Find::name\n"; + } + }, $destdir); + # recursive traversal: mark specific `info' dirs, `ldconfig' dirs, # and potentially modified dirs diff --git a/infrastructure/mk/bsd.port.mk b/infrastructure/mk/bsd.port.mk index 33eb24c7524..ddbb232e22f 100644 --- a/infrastructure/mk/bsd.port.mk +++ b/infrastructure/mk/bsd.port.mk @@ -1,6 +1,6 @@ #-*- mode: Makefile; tab-width: 4; -*- # ex:ts=4 sw=4 filetype=make: -# $OpenBSD: bsd.port.mk,v 1.593 2003/12/24 00:08:48 espie Exp $ +# $OpenBSD: bsd.port.mk,v 1.594 2003/12/26 00:26:01 espie Exp $ # $FreeBSD: bsd.port.mk,v 1.264 1996/12/25 02:27:44 imp Exp $ # $NetBSD: bsd.port.mk,v 1.62 1998/04/09 12:47:02 hubertf Exp $ # @@ -1871,6 +1871,7 @@ plist update-plist: fake ${_DEPrun_COOKIES} PLIST=${PLIST} \ PFRAG=${PKGDIR}/PFRAG \ FLAVORS='${FLAVORS}' MULTI_PACKAGES='${MULTI_PACKAGES}' \ + OKAY_FILES='${_FAKE_COOKIE} ${_INSTALL_PRE_COOKIE}' \ perl ${PORTSDIR}/infrastructure/install/make-plist ${PKGDIR} ${_tmp} .endif