From fb957be6e69ec350417c8b587e31dc877135b4e3 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 27 Apr 2021 13:15:07 +0200 Subject: [PATCH 1/3] Fix ./makedist wrt. to GH move We can no longer export from git.php.net, and apparently exporting from Github is not supported. We apply a quick fix to export from the local clone by default, still leaving an option to export from some other repo. This is, unfortunately, a minor BC break in a security release. --- makedist | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/makedist b/makedist index 452768683aa46..5106eeca801c9 100755 --- a/makedist +++ b/makedist @@ -40,8 +40,8 @@ if test "${2}" -lt "13" -o "${2}" -eq "13" -a "${3}" -lt "5"; then fi IFS="$old_IFS" -if test "x$PHPROOT" = "x"; then - PHPROOT=git@git.php.net:php-src.git; +if test "x$PHPROOT" -ne "x"; then + PHPROOT=--remote=$PHPROOT fi LT_TARGETS='ltconfig ltmain.sh config.guess config.sub' @@ -72,7 +72,7 @@ fi # Export PHP $ECHO_N "makedist: exporting tag 'php-$VER' from '$PHPROOT'...$ECHO_C" -git archive --format=tar --remote=$PHPROOT refs/tags/php-$VER --prefix=php-$VER/ | (cd $MY_OLDPWD; tar xvf -) || exit 4 +git archive --format=tar $PHPROOT refs/tags/php-$VER --prefix=php-$VER/ | (cd $MY_OLDPWD; tar xvf -) || exit 4 echo "" cd $DIR || exit 5 From e1fd6a8d4f83ab6c53b8c8549cc12e6d43d87fa1 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 27 Apr 2021 15:19:02 +0200 Subject: [PATCH 2/3] Use proper comparison operator `-ne` is for integer comparison. Thanks @remicollet! --- makedist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makedist b/makedist index 5106eeca801c9..c826a34e66d31 100755 --- a/makedist +++ b/makedist @@ -40,7 +40,7 @@ if test "${2}" -lt "13" -o "${2}" -eq "13" -a "${3}" -lt "5"; then fi IFS="$old_IFS" -if test "x$PHPROOT" -ne "x"; then +if test "x$PHPROOT" != "x"; then PHPROOT=--remote=$PHPROOT fi From 4d69627674346740819eb0f302f82e226090f57b Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Tue, 27 Apr 2021 15:21:54 +0200 Subject: [PATCH 3/3] Don't modify PHPROOT --- makedist | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/makedist b/makedist index c826a34e66d31..c0861b4aab1d7 100755 --- a/makedist +++ b/makedist @@ -41,7 +41,9 @@ fi IFS="$old_IFS" if test "x$PHPROOT" != "x"; then - PHPROOT=--remote=$PHPROOT + remote_option=--remote=$PHPROOT +else + remote_option= fi LT_TARGETS='ltconfig ltmain.sh config.guess config.sub' @@ -72,7 +74,7 @@ fi # Export PHP $ECHO_N "makedist: exporting tag 'php-$VER' from '$PHPROOT'...$ECHO_C" -git archive --format=tar $PHPROOT refs/tags/php-$VER --prefix=php-$VER/ | (cd $MY_OLDPWD; tar xvf -) || exit 4 +git archive --format=tar $remote_option refs/tags/php-$VER --prefix=php-$VER/ | (cd $MY_OLDPWD; tar xvf -) || exit 4 echo "" cd $DIR || exit 5