You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by dr...@apache.org on 2018/02/24 11:38:37 UTC
svn commit: r1825219 - /httpd/site/trunk/tools/release.sh
Author: druggeri
Date: Sat Feb 24 11:38:37 2018
New Revision: 1825219
URL: http://svn.apache.org/viewvc?rev=1825219&view=rev
Log:
Add option to interrogate APX download URL for best version
Modified:
httpd/site/trunk/tools/release.sh
Modified: httpd/site/trunk/tools/release.sh
URL: http://svn.apache.org/viewvc/httpd/site/trunk/tools/release.sh?rev=1825219&r1=1825218&r2=1825219&view=diff
==============================================================================
--- httpd/site/trunk/tools/release.sh (original)
+++ httpd/site/trunk/tools/release.sh Sat Feb 24 11:38:37 2018
@@ -3,7 +3,8 @@
# release.sh : build a release tarball
#
# USAGE: release.sh [--security] [--tag TAG POSTFIX] [--postfix POSTFIX]
-# [--rev REV] [--europe] PROJECT VERSION [SIGNING-USER]
+# [--rev REV] [--europe] [--latestapxxx]
+# PROJECT VERSION [SIGNING-USER]
#
# The project is either 'httpd-2.2', 'httpd-2.4, httpd-2.5'
#
@@ -13,6 +14,10 @@
# directory). Next, it will run the appropriate commands to prepare and
# construct the tarball. The subdirectory will be cleaned up upon exit.
#
+# If latestapxxx is specified, the apr/apu download URL is checked with
+# curl to determine the best available version. This assumes access to
+# the Internet is available directly or via proxy (as used by curl)
+#
# The "signing user" is the name of the key that you'll be signing the
# release with.
#
@@ -59,6 +64,21 @@ do
shift
;;
+ --latestapxxx)
+ get_latest_aprxxx=1
+ shift
+
+ if ! curl --version >/dev/null 2>&1;then
+ echo "ERROR: curl must be available to use latestapxxx option."
+ exit 1
+ fi
+
+ if test "`echo 'test-1.2.3' | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+'`" != "1.2.3";then
+ echo "ERROR: your system must support 'grep -o' to use latestapxxx option."
+ exit 1
+ fi
+ ;;
+
--*)
echo "Unknown option '$1'" >&2
echo "USAGE: $0 [--security] [--tag TAG POSTFIX] [--postfix POSTFIX] [--rev REV] [--europe] PROJECT VERSION [SIGNING-USER]" >&2
@@ -137,6 +157,29 @@ case "$1" in
exit 1
esac
+if test $get_latest_aprxxx; then
+ download_url="https://apr.apache.org/download.cgi"
+ echo "Determining latest APR and APU versions from $download_url..."
+
+ apr_tag=''
+ apr_tag=`curl -s $download_url | grep 'APR [0-9].*is the best available version' | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+'`
+ if test -z "$apr_tag"; then
+ echo "ERROR: Failed to determine latest APR version from $download_url"
+ exit 1
+ else
+ echo " APR: $apr_tag"
+ fi
+
+ apu_tag=''
+ apu_tag=`curl -s $download_url | grep 'APR-util [0-9].*is the best available version' | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+'`
+ if test -z "$apu_tag"; then
+ echo "ERROR: Failed to determine latest APR version from $download_url"
+ exit 1
+ else
+ echo " APU: $apu_tag"
+ fi
+fi
+
major="`echo ${version} | sed 's/\..*$//'`"
minor="`echo ${version} | sed 's/^[0-9]*\.\([0-9]*\)\..*$/\1/'`"
patch="`echo ${version} | sed 's/^.*\.//'`"
Re: svn commit: r1825219 - /httpd/site/trunk/tools/release.sh
Posted by William A Rowe Jr <wr...@rowe-clan.net>.
My approach has been to skim the http://www.apache.org/dist/apr/ tree
for the version-sorted latest number. Your solution also seems sound.
But we should mention to dev@apr that we are counting on these behaviors :)
On Sat, Feb 24, 2018 at 5:43 AM, Daniel Ruggeri <DR...@primary.net> wrote:
> Just dropping a line to point this out and seek feedback since I know we have several folks on the APR project here as well.
>
> With this option, I assume the APR/APU download URL...
> * Is stable
> * Will always point out which version is best to use
> * Is updated along with the release process
>
> It's a bit clunky, but this method has worked for me for a long time in my own builds, so I figured I would share the recipe. The goal, of course, is to remove as much manual care and feeding of files needed to do a release. If any of the above assumptions are awful, I can revert or take a different tact.
>
> --
> Daniel Ruggeri
>
>> -----Original Message-----
>> From: druggeri@apache.org [mailto:druggeri@apache.org]
>> Sent: Saturday, February 24, 2018 5:39 AM
>> To: cvs@httpd.apache.org
>> Subject: svn commit: r1825219 - /httpd/site/trunk/tools/release.sh
>>
>> Author: druggeri
>> Date: Sat Feb 24 11:38:37 2018
>> New Revision: 1825219
>>
>> URL: http://svn.apache.org/viewvc?rev=1825219&view=rev
>> Log:
>> Add option to interrogate APX download URL for best version
>>
>> Modified:
>> httpd/site/trunk/tools/release.sh
>>
>> Modified: httpd/site/trunk/tools/release.sh
>> URL:
>> http://svn.apache.org/viewvc/httpd/site/trunk/tools/release.sh?rev=18252
>> 19&r1=1825218&r2=1825219&view=diff
>> ==========================================================
>> ====================
>> --- httpd/site/trunk/tools/release.sh (original)
>> +++ httpd/site/trunk/tools/release.sh Sat Feb 24 11:38:37 2018
>> @@ -3,7 +3,8 @@
>> # release.sh : build a release tarball
>> #
>> # USAGE: release.sh [--security] [--tag TAG POSTFIX] [--postfix POSTFIX]
>> -# [--rev REV] [--europe] PROJECT VERSION [SIGNING-USER]
>> +# [--rev REV] [--europe] [--latestapxxx]
>> +# PROJECT VERSION [SIGNING-USER]
>> #
>> # The project is either 'httpd-2.2', 'httpd-2.4, httpd-2.5'
>> #
>> @@ -13,6 +14,10 @@
>> # directory). Next, it will run the appropriate commands to prepare and
>> # construct the tarball. The subdirectory will be cleaned up upon exit.
>> #
>> +# If latestapxxx is specified, the apr/apu download URL is checked with
>> +# curl to determine the best available version. This assumes access to
>> +# the Internet is available directly or via proxy (as used by curl)
>> +#
>> # The "signing user" is the name of the key that you'll be signing the
>> # release with.
>> #
>> @@ -59,6 +64,21 @@ do
>> shift
>> ;;
>>
>> + --latestapxxx)
>> + get_latest_aprxxx=1
>> + shift
>> +
>> + if ! curl --version >/dev/null 2>&1;then
>> + echo "ERROR: curl must be available to use latestapxxx option."
>> + exit 1
>> + fi
>> +
>> + if test "`echo 'test-1.2.3' | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+'`" !=
>> "1.2.3";then
>> + echo "ERROR: your system must support 'grep -o' to use latestapxxx
>> option."
>> + exit 1
>> + fi
>> + ;;
>> +
>> --*)
>> echo "Unknown option '$1'" >&2
>> echo "USAGE: $0 [--security] [--tag TAG POSTFIX] [--postfix POSTFIX] [--
>> rev REV] [--europe] PROJECT VERSION [SIGNING-USER]" >&2
>> @@ -137,6 +157,29 @@ case "$1" in
>> exit 1
>> esac
>>
>> +if test $get_latest_aprxxx; then
>> + download_url="https://apr.apache.org/download.cgi"
>> + echo "Determining latest APR and APU versions from $download_url..."
>> +
>> + apr_tag=''
>> + apr_tag=`curl -s $download_url | grep 'APR [0-9].*is the best available
>> version' | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+'`
>> + if test -z "$apr_tag"; then
>> + echo "ERROR: Failed to determine latest APR version from
>> $download_url"
>> + exit 1
>> + else
>> + echo " APR: $apr_tag"
>> + fi
>> +
>> + apu_tag=''
>> + apu_tag=`curl -s $download_url | grep 'APR-util [0-9].*is the best available
>> version' | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+'`
>> + if test -z "$apu_tag"; then
>> + echo "ERROR: Failed to determine latest APR version from
>> $download_url"
>> + exit 1
>> + else
>> + echo " APU: $apu_tag"
>> + fi
>> +fi
>> +
>> major="`echo ${version} | sed 's/\..*$//'`"
>> minor="`echo ${version} | sed 's/^[0-9]*\.\([0-9]*\)\..*$/\1/'`"
>> patch="`echo ${version} | sed 's/^.*\.//'`"
>>
>
>
Re: svn commit: r1825219 - /httpd/site/trunk/tools/release.sh
Posted by William A Rowe Jr <wr...@rowe-clan.net>.
My approach has been to skim the http://www.apache.org/dist/apr/ tree
for the version-sorted latest number. Your solution also seems sound.
But we should mention to dev@apr that we are counting on these behaviors :)
On Sat, Feb 24, 2018 at 5:43 AM, Daniel Ruggeri <DR...@primary.net> wrote:
> Just dropping a line to point this out and seek feedback since I know we have several folks on the APR project here as well.
>
> With this option, I assume the APR/APU download URL...
> * Is stable
> * Will always point out which version is best to use
> * Is updated along with the release process
>
> It's a bit clunky, but this method has worked for me for a long time in my own builds, so I figured I would share the recipe. The goal, of course, is to remove as much manual care and feeding of files needed to do a release. If any of the above assumptions are awful, I can revert or take a different tact.
>
> --
> Daniel Ruggeri
>
>> -----Original Message-----
>> From: druggeri@apache.org [mailto:druggeri@apache.org]
>> Sent: Saturday, February 24, 2018 5:39 AM
>> To: cvs@httpd.apache.org
>> Subject: svn commit: r1825219 - /httpd/site/trunk/tools/release.sh
>>
>> Author: druggeri
>> Date: Sat Feb 24 11:38:37 2018
>> New Revision: 1825219
>>
>> URL: http://svn.apache.org/viewvc?rev=1825219&view=rev
>> Log:
>> Add option to interrogate APX download URL for best version
>>
>> Modified:
>> httpd/site/trunk/tools/release.sh
>>
>> Modified: httpd/site/trunk/tools/release.sh
>> URL:
>> http://svn.apache.org/viewvc/httpd/site/trunk/tools/release.sh?rev=18252
>> 19&r1=1825218&r2=1825219&view=diff
>> ==========================================================
>> ====================
>> --- httpd/site/trunk/tools/release.sh (original)
>> +++ httpd/site/trunk/tools/release.sh Sat Feb 24 11:38:37 2018
>> @@ -3,7 +3,8 @@
>> # release.sh : build a release tarball
>> #
>> # USAGE: release.sh [--security] [--tag TAG POSTFIX] [--postfix POSTFIX]
>> -# [--rev REV] [--europe] PROJECT VERSION [SIGNING-USER]
>> +# [--rev REV] [--europe] [--latestapxxx]
>> +# PROJECT VERSION [SIGNING-USER]
>> #
>> # The project is either 'httpd-2.2', 'httpd-2.4, httpd-2.5'
>> #
>> @@ -13,6 +14,10 @@
>> # directory). Next, it will run the appropriate commands to prepare and
>> # construct the tarball. The subdirectory will be cleaned up upon exit.
>> #
>> +# If latestapxxx is specified, the apr/apu download URL is checked with
>> +# curl to determine the best available version. This assumes access to
>> +# the Internet is available directly or via proxy (as used by curl)
>> +#
>> # The "signing user" is the name of the key that you'll be signing the
>> # release with.
>> #
>> @@ -59,6 +64,21 @@ do
>> shift
>> ;;
>>
>> + --latestapxxx)
>> + get_latest_aprxxx=1
>> + shift
>> +
>> + if ! curl --version >/dev/null 2>&1;then
>> + echo "ERROR: curl must be available to use latestapxxx option."
>> + exit 1
>> + fi
>> +
>> + if test "`echo 'test-1.2.3' | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+'`" !=
>> "1.2.3";then
>> + echo "ERROR: your system must support 'grep -o' to use latestapxxx
>> option."
>> + exit 1
>> + fi
>> + ;;
>> +
>> --*)
>> echo "Unknown option '$1'" >&2
>> echo "USAGE: $0 [--security] [--tag TAG POSTFIX] [--postfix POSTFIX] [--
>> rev REV] [--europe] PROJECT VERSION [SIGNING-USER]" >&2
>> @@ -137,6 +157,29 @@ case "$1" in
>> exit 1
>> esac
>>
>> +if test $get_latest_aprxxx; then
>> + download_url="https://apr.apache.org/download.cgi"
>> + echo "Determining latest APR and APU versions from $download_url..."
>> +
>> + apr_tag=''
>> + apr_tag=`curl -s $download_url | grep 'APR [0-9].*is the best available
>> version' | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+'`
>> + if test -z "$apr_tag"; then
>> + echo "ERROR: Failed to determine latest APR version from
>> $download_url"
>> + exit 1
>> + else
>> + echo " APR: $apr_tag"
>> + fi
>> +
>> + apu_tag=''
>> + apu_tag=`curl -s $download_url | grep 'APR-util [0-9].*is the best available
>> version' | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+'`
>> + if test -z "$apu_tag"; then
>> + echo "ERROR: Failed to determine latest APR version from
>> $download_url"
>> + exit 1
>> + else
>> + echo " APU: $apu_tag"
>> + fi
>> +fi
>> +
>> major="`echo ${version} | sed 's/\..*$//'`"
>> minor="`echo ${version} | sed 's/^[0-9]*\.\([0-9]*\)\..*$/\1/'`"
>> patch="`echo ${version} | sed 's/^.*\.//'`"
>>
>
>
RE: svn commit: r1825219 - /httpd/site/trunk/tools/release.sh
Posted by Daniel Ruggeri <DR...@primary.net>.
Just dropping a line to point this out and seek feedback since I know we have several folks on the APR project here as well.
With this option, I assume the APR/APU download URL...
* Is stable
* Will always point out which version is best to use
* Is updated along with the release process
It's a bit clunky, but this method has worked for me for a long time in my own builds, so I figured I would share the recipe. The goal, of course, is to remove as much manual care and feeding of files needed to do a release. If any of the above assumptions are awful, I can revert or take a different tact.
--
Daniel Ruggeri
> -----Original Message-----
> From: druggeri@apache.org [mailto:druggeri@apache.org]
> Sent: Saturday, February 24, 2018 5:39 AM
> To: cvs@httpd.apache.org
> Subject: svn commit: r1825219 - /httpd/site/trunk/tools/release.sh
>
> Author: druggeri
> Date: Sat Feb 24 11:38:37 2018
> New Revision: 1825219
>
> URL: http://svn.apache.org/viewvc?rev=1825219&view=rev
> Log:
> Add option to interrogate APX download URL for best version
>
> Modified:
> httpd/site/trunk/tools/release.sh
>
> Modified: httpd/site/trunk/tools/release.sh
> URL:
> http://svn.apache.org/viewvc/httpd/site/trunk/tools/release.sh?rev=18252
> 19&r1=1825218&r2=1825219&view=diff
> ==========================================================
> ====================
> --- httpd/site/trunk/tools/release.sh (original)
> +++ httpd/site/trunk/tools/release.sh Sat Feb 24 11:38:37 2018
> @@ -3,7 +3,8 @@
> # release.sh : build a release tarball
> #
> # USAGE: release.sh [--security] [--tag TAG POSTFIX] [--postfix POSTFIX]
> -# [--rev REV] [--europe] PROJECT VERSION [SIGNING-USER]
> +# [--rev REV] [--europe] [--latestapxxx]
> +# PROJECT VERSION [SIGNING-USER]
> #
> # The project is either 'httpd-2.2', 'httpd-2.4, httpd-2.5'
> #
> @@ -13,6 +14,10 @@
> # directory). Next, it will run the appropriate commands to prepare and
> # construct the tarball. The subdirectory will be cleaned up upon exit.
> #
> +# If latestapxxx is specified, the apr/apu download URL is checked with
> +# curl to determine the best available version. This assumes access to
> +# the Internet is available directly or via proxy (as used by curl)
> +#
> # The "signing user" is the name of the key that you'll be signing the
> # release with.
> #
> @@ -59,6 +64,21 @@ do
> shift
> ;;
>
> + --latestapxxx)
> + get_latest_aprxxx=1
> + shift
> +
> + if ! curl --version >/dev/null 2>&1;then
> + echo "ERROR: curl must be available to use latestapxxx option."
> + exit 1
> + fi
> +
> + if test "`echo 'test-1.2.3' | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+'`" !=
> "1.2.3";then
> + echo "ERROR: your system must support 'grep -o' to use latestapxxx
> option."
> + exit 1
> + fi
> + ;;
> +
> --*)
> echo "Unknown option '$1'" >&2
> echo "USAGE: $0 [--security] [--tag TAG POSTFIX] [--postfix POSTFIX] [--
> rev REV] [--europe] PROJECT VERSION [SIGNING-USER]" >&2
> @@ -137,6 +157,29 @@ case "$1" in
> exit 1
> esac
>
> +if test $get_latest_aprxxx; then
> + download_url="https://apr.apache.org/download.cgi"
> + echo "Determining latest APR and APU versions from $download_url..."
> +
> + apr_tag=''
> + apr_tag=`curl -s $download_url | grep 'APR [0-9].*is the best available
> version' | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+'`
> + if test -z "$apr_tag"; then
> + echo "ERROR: Failed to determine latest APR version from
> $download_url"
> + exit 1
> + else
> + echo " APR: $apr_tag"
> + fi
> +
> + apu_tag=''
> + apu_tag=`curl -s $download_url | grep 'APR-util [0-9].*is the best available
> version' | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+'`
> + if test -z "$apu_tag"; then
> + echo "ERROR: Failed to determine latest APR version from
> $download_url"
> + exit 1
> + else
> + echo " APU: $apu_tag"
> + fi
> +fi
> +
> major="`echo ${version} | sed 's/\..*$//'`"
> minor="`echo ${version} | sed 's/^[0-9]*\.\([0-9]*\)\..*$/\1/'`"
> patch="`echo ${version} | sed 's/^.*\.//'`"
>