pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/bootstrap



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.


To generate a diff of this commit:
cvs rdiff -u -r1.266 -r1.267 pkgsrc/bootstrap/bootstrap

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/bootstrap/bootstrap
diff -u pkgsrc/bootstrap/bootstrap:1.266 pkgsrc/bootstrap/bootstrap:1.267
--- pkgsrc/bootstrap/bootstrap:1.266    Thu Jun 20 09:11:26 2019
+++ pkgsrc/bootstrap/bootstrap  Tue Jul  2 16:27:04 2019
@@ -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@localhost>
 # 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
 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



Home | Main Index | Thread Index | Old Index