You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ruediger Pluem <rp...@apache.org> on 2019/08/30 09:57:51 UTC
Re: svn commit: r1865191 - /httpd/site/trunk/tools/announce.sh
On 08/14/2019 11:01 PM, druggeri@apache.org wrote:
> Author: druggeri
> Date: Wed Aug 14 21:01:56 2019
> New Revision: 1865191
>
> URL: http://svn.apache.org/viewvc?rev=1865191&view=rev
> Log:
> Try to be more accomodating
>
> Modified:
> httpd/site/trunk/tools/announce.sh
>
> Modified: httpd/site/trunk/tools/announce.sh
> URL: http://svn.apache.org/viewvc/httpd/site/trunk/tools/announce.sh?rev=1865191&r1=1865190&r2=1865191&view=diff
> ==============================================================================
> --- httpd/site/trunk/tools/announce.sh (original)
> +++ httpd/site/trunk/tools/announce.sh Wed Aug 14 21:01:56 2019
> @@ -93,30 +93,29 @@ echo "Checking $dir..."
> #Flip the bit
> is_security_release=1
>
> - #If this is in the section not-yet-ready for announce, apply the
> - # patch before moving on to announcement generation
> - if echo "$SHORT_STATUS" | sed -n '/CHANGES READY FOR REPLACEMENT/,/##/p' | grep "$dir" >/dev/null;then
> - #Apply our CHANGES updates via CHANGES.diff or CHANGES
> - #TODO: Verify that one and only one of the two options will be present at all times
> - if test -f "$private_base"/SECURITY/$dir/CHANGES.diff;then
> - patch -p0 -d "$branch_base" < "$private_base"/SECURITY/$dir/CHANGES.diff
> - patch -p0 -d "$release_base" < "$private_base"/SECURITY/$dir/CHANGES.diff
> - elif test -f "$private_base"/SECURITY/$dir/CHANGES;then
> - for UPDATE_FILE in "$branch_base"/CHANGES "$release_base"/CHANGES;do
> - VERSION="$version" UPDATE_FILE="$UPDATE_FILE" STATUS_UPDATE=`cat "$private_base"/SECURITY/$dir/CHANGES` perl -e '
> - $ENV{STATUS_UPDATE} =~ s/^\s*$//g;
> - die "Status update not found!" if !$ENV{STATUS_UPDATE};
> - open(CHANGES, "$ENV{UPDATE_FILE}"); my @content=<CHANGES>; close(CHANGES);
> - foreach my $line (@content) {
> - print "$line";
> - if (!$added && $line =~ /Changes with Apache $ENV{VERSION}/i) {
> - print "\n$ENV{STATUS_UPDATE}\n";
> - }
> + #Opportunisticly apply patches to CHANGES regardless of section (announce ready vs changes ready)
> + #because sometimes things are placed in announce ready even though they haven't had the CHANGES fix applied
> + if test -f "$private_base"/SECURITY/$dir/CHANGES.diff;then
> + patch -p0 -d "$branch_base" < "$private_base"/SECURITY/$dir/CHANGES.diff
> + patch -p0 -d "$release_base" < "$private_base"/SECURITY/$dir/CHANGES.diff
> + elif test -f "$private_base"/SECURITY/$dir/CHANGES;then
> + for UPDATE_FILE in "$branch_base"/CHANGES "$release_base"/CHANGES;do
> + VERSION="$version" UPDATE_FILE="$UPDATE_FILE" STATUS_UPDATE=`cat "$private_base"/SECURITY/$dir/CHANGES` perl -e '
> + $ENV{STATUS_UPDATE} =~ s/^\s*$//g;
> + die "Status update not found!" if !$ENV{STATUS_UPDATE};
> + open(CHANGES, "$ENV{UPDATE_FILE}"); my @content=<CHANGES>; close(CHANGES);
> + foreach my $line (@content) {
> + print "$line";
> + if (!$added && $line =~ /Changes with Apache $ENV{VERSION}/i) {
What is the purpose of the $added variable?
> + print "\n$ENV{STATUS_UPDATE}\n";
> }
> - ' > "$scratch"/tmp_status
> - mv "$scratch"/tmp_status "$UPDATE_FILE"
> - done
> - else
> + }
> + ' > "$scratch"/tmp_status
> + mv "$scratch"/tmp_status "$UPDATE_FILE"
> + done
> + else
> + #Fail if this is in the changes ready section, but we didn't find a change
> + if echo "$SHORT_STATUS" | sed -n '/CHANGES READY FOR REPLACEMENT/,/##/p' | grep "$dir" >/dev/null;then
> echo "Missing CHANGES.diff or CHANGES file for $dir"
> exit 1
> fi
>
Regards
RĂ¼diger
Re: svn commit: r1865191 - /httpd/site/trunk/tools/announce.sh
Posted by Daniel Ruggeri <dr...@primary.net>.
On 8/30/2019 4:57 AM, Ruediger Pluem wrote:
>
> On 08/14/2019 11:01 PM, druggeri@apache.org wrote:
>> Author: druggeri
>> Date: Wed Aug 14 21:01:56 2019
>> New Revision: 1865191
>>
>> URL: http://svn.apache.org/viewvc?rev=1865191&view=rev
>> Log:
>> Try to be more accomodating
>>
>> Modified:
>> httpd/site/trunk/tools/announce.sh
>>
>> Modified: httpd/site/trunk/tools/announce.sh
>> URL: http://svn.apache.org/viewvc/httpd/site/trunk/tools/announce.sh?rev=1865191&r1=1865190&r2=1865191&view=diff
>> ==============================================================================
>> --- httpd/site/trunk/tools/announce.sh (original)
>> +++ httpd/site/trunk/tools/announce.sh Wed Aug 14 21:01:56 2019
>> @@ -93,30 +93,29 @@ echo "Checking $dir..."
>> #Flip the bit
>> is_security_release=1
>>
>> - #If this is in the section not-yet-ready for announce, apply the
>> - # patch before moving on to announcement generation
>> - if echo "$SHORT_STATUS" | sed -n '/CHANGES READY FOR REPLACEMENT/,/##/p' | grep "$dir" >/dev/null;then
>> - #Apply our CHANGES updates via CHANGES.diff or CHANGES
>> - #TODO: Verify that one and only one of the two options will be present at all times
>> - if test -f "$private_base"/SECURITY/$dir/CHANGES.diff;then
>> - patch -p0 -d "$branch_base" < "$private_base"/SECURITY/$dir/CHANGES.diff
>> - patch -p0 -d "$release_base" < "$private_base"/SECURITY/$dir/CHANGES.diff
>> - elif test -f "$private_base"/SECURITY/$dir/CHANGES;then
>> - for UPDATE_FILE in "$branch_base"/CHANGES "$release_base"/CHANGES;do
>> - VERSION="$version" UPDATE_FILE="$UPDATE_FILE" STATUS_UPDATE=`cat "$private_base"/SECURITY/$dir/CHANGES` perl -e '
>> - $ENV{STATUS_UPDATE} =~ s/^\s*$//g;
>> - die "Status update not found!" if !$ENV{STATUS_UPDATE};
>> - open(CHANGES, "$ENV{UPDATE_FILE}"); my @content=<CHANGES>; close(CHANGES);
>> - foreach my $line (@content) {
>> - print "$line";
>> - if (!$added && $line =~ /Changes with Apache $ENV{VERSION}/i) {
>> - print "\n$ENV{STATUS_UPDATE}\n";
>> - }
>> + #Opportunisticly apply patches to CHANGES regardless of section (announce ready vs changes ready)
>> + #because sometimes things are placed in announce ready even though they haven't had the CHANGES fix applied
>> + if test -f "$private_base"/SECURITY/$dir/CHANGES.diff;then
>> + patch -p0 -d "$branch_base" < "$private_base"/SECURITY/$dir/CHANGES.diff
>> + patch -p0 -d "$release_base" < "$private_base"/SECURITY/$dir/CHANGES.diff
>> + elif test -f "$private_base"/SECURITY/$dir/CHANGES;then
>> + for UPDATE_FILE in "$branch_base"/CHANGES "$release_base"/CHANGES;do
>> + VERSION="$version" UPDATE_FILE="$UPDATE_FILE" STATUS_UPDATE=`cat "$private_base"/SECURITY/$dir/CHANGES` perl -e '
>> + $ENV{STATUS_UPDATE} =~ s/^\s*$//g;
>> + die "Status update not found!" if !$ENV{STATUS_UPDATE};
>> + open(CHANGES, "$ENV{UPDATE_FILE}"); my @content=<CHANGES>; close(CHANGES);
>> + foreach my $line (@content) {
>> + print "$line";
>> + if (!$added && $line =~ /Changes with Apache $ENV{VERSION}/i) {
> What is the purpose of the $added variable?
Yikes! This fell between the cracks. Sorry for the really slow reply.
The $added variable was intended to use as a failsafe signal. If we
attempt to add the CHANGES entry, but didn't do so for some reason, the
perl script should fail. I somehow crossed my wires and missed the
important part of bailing out when that happens.
This has been fixed in r1872959
--
Daniel Ruggeri
>
>> + print "\n$ENV{STATUS_UPDATE}\n";
>> }
>> - ' > "$scratch"/tmp_status
>> - mv "$scratch"/tmp_status "$UPDATE_FILE"
>> - done
>> - else
>> + }
>> + ' > "$scratch"/tmp_status
>> + mv "$scratch"/tmp_status "$UPDATE_FILE"
>> + done
>> + else
>> + #Fail if this is in the changes ready section, but we didn't find a change
>> + if echo "$SHORT_STATUS" | sed -n '/CHANGES READY FOR REPLACEMENT/,/##/p' | grep "$dir" >/dev/null;then
>> echo "Missing CHANGES.diff or CHANGES file for $dir"
>> exit 1
>> fi
>>
> Regards
>
> RĂ¼diger
>