diff options
author | bsiegert <bsiegert@pkgsrc.org> | 2019-07-06 16:23:36 +0000 |
---|---|---|
committer | bsiegert <bsiegert@pkgsrc.org> | 2019-07-06 16:23:36 +0000 |
commit | c4273c651cb6139db201ff7b7ae75745b507cfa5 (patch) | |
tree | d8fee71d5a1913b97c0746e1c590c80a4ee4b252 | |
parent | 3f4f5e62e099e8fb6bea254129b8199a70767a65 (diff) | |
download | pkgsrc-c4273c651cb6139db201ff7b7ae75745b507cfa5.tar.gz |
Pullup ticket #5987 - requested by sevan
bootstrap: macOS build fix
Revisions pulled up:
- bootstrap/bootstrap 1.267
---
Module Name: pkgsrc
Committed By: rillig
Date: Tue Jul 2 16:27:04 UTC 2019
Modified Files:
pkgsrc/bootstrap: bootstrap
Log Message:
bootstrap/bootstrap: allow the working directory to be a symlink
The working directory is only needed for bootstrapping pkgsrc, therefore
there aren't too many packages that can fail.
Loosening this check is needed for macOS, where /etc, /tmp and /var are
symlinks to /private, and using /tmp as the workdir for bootstrapping is
a sane choice.
-rwxr-xr-x | bootstrap/bootstrap | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap index 035665e9e95..d7f86b32ebd 100755 --- a/bootstrap/bootstrap +++ b/bootstrap/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh -# $NetBSD: bootstrap,v 1.266 2019/06/20 09:11:26 jperkin Exp $ +# $NetBSD: bootstrap,v 1.266.2.1 2019/07/06 16:23:36 bsiegert Exp $ # # Copyright (c) 2001-2011 Alistair Crooks <agc@NetBSD.org> # All rights reserved. @@ -353,7 +353,8 @@ checkarg_sane_absolute_path() */) die "ERROR: The argument to $2 must not end in /." ;; *//* | */. | */./* | */.. | */../*) die "ERROR: The path $1 (from $2) must be canonical." ;; - /*) checkarg_no_symlink_path "$1" "$2" ;; + /*) [ "${3-}" = "may-be-symlink" ] \ + || checkarg_no_symlink_path "$1" "$2" ;; *) die "ERROR: The argument to $2 must be an absolute path." ;; esac } @@ -505,7 +506,7 @@ checkarg_sane_absolute_path "$sysconfdir" "--sysconfdir" checkarg_sane_absolute_path "$varbase" "--varbase" checkarg_sane_relative_path "$pkginfodir" "--pkginfodir" checkarg_sane_relative_path "$pkgmandir" "--pkgmandir" -checkarg_sane_absolute_path "$wrkdir" "--workdir" +checkarg_sane_absolute_path "$wrkdir" "--workdir" may-be-symlink # set defaults for system locations if not already set by the user wrkobjdir=${wrkdir}/pkgsrc |