diff options
author | rillig <rillig@pkgsrc.org> | 2019-07-02 16:27:04 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2019-07-02 16:27:04 +0000 |
commit | 5d7110ba6a091319d52c86f8ec1e6c6f6388a6da (patch) | |
tree | ff65a32971b68a51bc5d217be34031d417b98d89 /bootstrap/bootstrap | |
parent | da144f3de5f7e478af5cd6b466f31e1ba56122b3 (diff) | |
download | pkgsrc-5d7110ba6a091319d52c86f8ec1e6c6f6388a6da.tar.gz |
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.
Diffstat (limited to 'bootstrap/bootstrap')
-rwxr-xr-x | bootstrap/bootstrap | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap index 035665e9e95..6b84b32ac5c 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.267 2019/07/02 16:27:04 rillig 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 |