switching to _pbuild is tricky, you can't take it back.
authorespie <espie@openbsd.org>
Sat, 2 Dec 2017 00:52:47 +0000 (00:52 +0000)
committerespie <espie@openbsd.org>
Sat, 2 Dec 2017 00:52:47 +0000 (00:52 +0000)
in particular, disable future PORTS_PRIVSEP mechanisms under
pkg_create, because we should already be running as _pbuild
by this point.

usr.sbin/pkg_add/OpenBSD/PkgCreate.pm

index 524784a..68ec4fb 100644 (file)
@@ -1,6 +1,6 @@
 #! /usr/bin/perl
 # ex:ts=8 sw=4:
-# $OpenBSD: PkgCreate.pm,v 1.128 2017/11/07 16:21:59 ajacoutot Exp $
+# $OpenBSD: PkgCreate.pm,v 1.129 2017/12/02 00:52:47 espie Exp $
 #
 # Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
 #
@@ -890,6 +890,9 @@ sub ask_tree
                delete $ENV{SUBPACKAGE};
                $ENV{SUBDIR} = $dep->{pkgpath};
                $ENV{ECHO_MSG} = ':';
+               # XXX we're already running as ${BUILD_USER}
+               # so we can't do this again
+               push(@action, 'PORTS_PRIVSEP=No');
                exec $make ('make', @action);
        }
        my $plist = OpenBSD::PackingList->read($fh,