Skip to content

Commit 910e2c3

Browse files
authored
#189 separate review instructions for log4net (#190)
* #189 separate review instructions for log4net * implemented release verification in powershell for windows #189 * added missing license header #189 * #189 separate Vote result from announcement * #189 Link to Github rc no longer needed
1 parent 8bf4313 commit 910e2c3

File tree

9 files changed

+187
-12
lines changed

9 files changed

+187
-12
lines changed

doc/MailTemplate.Announce.txt

-441 Bytes
Binary file not shown.

doc/MailTemplate.Result.txt

-682 Bytes
Binary file not shown.

doc/MailTemplate.txt

-1.67 KB
Binary file not shown.

doc/RELEASING.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ release version 2.0.123:
2727
- currently, this _must_ happen on a windows machine because of older
2828
.net framework requirements which cannot be met on a Linux machine
2929
(or at least, I haven't figured out how - in particular CF)
30-
- TODO: the following are still manual and need to be built into the `release` script:
31-
- log4net.build: update package.version property
32-
- pom.xml: update version
3330
4. Sign release artifacts (zips & nupkg) under `build/artifacts`
3431
- eg `gpg --armor --output log4net-2.0.123.nupkg.asc --detach-sig log4net-2.0.123.nupkg`
3532
- there is an accompanying `sign-log4net-libraries.sh/ps1` under scripts which you could invoke if you cd
@@ -58,12 +55,12 @@ release version 2.0.123:
5855
- `svn co https://dist.apache.org/repos/dist/dev/logging -N apache-dist-logging-dev`
5956
- `cd apache-dist-logging-dev`
6057
- `svn up log4net`
61-
- copy in source & binary artifacts to respective locations
6258
- `svn delete *`
59+
- `mkdir 2.0.123`
60+
- copy all artifacts to the new folder
6361
- `svn add *`
64-
- `svn commit`
65-
- check https://dist.apache.org/repos/dist/dev/logging/log4net/binaries/
66-
and https://dist.apache.org/repos/dist/dev/logging/log4net/source/
62+
- `svn commit -m 'log4net 2.0.123'`
63+
- check https://dist.apache.org/repos/dist/dev/logging/log4net/2.0.123/
6764
13. raise a vote on the log4net mailing list ([email protected]) - see MailTemplate.txt
6865
14. wait
6966
15. when the vote has 3 or more +1's, it's time to go live!
@@ -82,4 +79,5 @@ release version 2.0.123:
8279
- `git pull --rebase`
8380
- `git merge asf-staging`
8481
18. rename the release at github, eg to `rel/2.0.123`
85-
- double-check that the `rel` tag is created
82+
- double-check that the `rel` tag is created
83+
19. apply the next version by calling `./scripts/update-version.ps1 2.0.123 2.0.124`

scripts/verify-release.ps1

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
Param (
2+
[Parameter()]
3+
[System.IO.DirectoryInfo]$Directory
4+
)
5+
6+
Set-StrictMode -Version Latest
7+
$ErrorActionPreference = 'Stop'
8+
if (!$Directory)
9+
{
10+
$Directory = $PSScriptRoot
11+
}
12+
13+
function Verify-Hash
14+
{
15+
param
16+
(
17+
[Parameter(Mandatory=$true, HelpMessage='The file containing the hash.')]
18+
[System.IO.FileInfo]$File
19+
)
20+
$Line = @(Get-Content $File.FullName)[0]
21+
$Fields = $Line -split '\s+'
22+
$Hash = $Fields[0].Trim().ToUpper()
23+
$Filename = $Fields[1].Trim()
24+
if ($Filename.StartsWith("*"))
25+
{
26+
$Filename = $Filename.Substring(1).Trim()
27+
}
28+
29+
$ComputedHash = (Get-FileHash -Algorithm 'SHA512' "$($File.DirectoryName)/$Filename").Hash.ToUpper()
30+
31+
if($Hash -eq $ComputedHash)
32+
{
33+
"$($Filename): Passed"
34+
}
35+
else
36+
{
37+
Write-Error "$($Filename): Not Passed" -ErrorAction Continue
38+
Write-Error "Read from file: $Hash" -ErrorAction Continue
39+
Write-Error "Computed: $ComputedHash" -ErrorAction Continue
40+
}
41+
}
42+
43+
foreach ($File in Get-ChildItem $Directory *.sha512)
44+
{
45+
Verify-Hash $File
46+
}
47+
48+
Invoke-WebRequest https://downloads.apache.org/logging/KEYS -OutFile $Directory/KEYS
49+
gpg --import -q $Directory/KEYS
50+
51+
foreach ($File in Get-ChildItem $Directory *.asc)
52+
{
53+
gpg --verify $File
54+
}
55+
56+
Expand-Archive $Directory/*source*.zip -DestinationPath $Directory/src
57+
$VersionDirectory = "$Directory/src/$(@(Get-ChildItem $Directory/src)[0])"
58+
$VersionDirectory
59+
pushd $VersionDirectory

src/log4net/Core/Serializable.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
#region Apache License
2+
//
3+
// Licensed to the Apache Software Foundation (ASF) under one or more
4+
// contributor license agreements. See the NOTICE file distributed with
5+
// this work for additional information regarding copyright ownership.
6+
// The ASF licenses this file to you under the Apache License, Version 2.0
7+
// (the "License"); you may not use this file except in compliance with
8+
// the License. You may obtain a copy of the License at
9+
//
10+
// http://www.apache.org/licenses/LICENSE-2.0
11+
//
12+
// Unless required by applicable law or agreed to in writing, software
13+
// distributed under the License is distributed on an "AS IS" BASIS,
14+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
// See the License for the specific language governing permissions and
16+
// limitations under the License.
17+
//
18+
#endregion
119
#if NET462_OR_GREATER
220
global using Log4NetSerializableAttribute = System.SerializableAttribute;
321
global using ILog4NetSerializable = System.Runtime.Serialization.ISerializable;

src/site/site.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
<item name="Download" href="/release/download.html"/>
3232
<item name="Support" href="https://logging.apache.org/support.html" />
3333
<item name="Release Notes" href="/release/release-notes.html"/>
34+
<item name="Release Review" href="/release/release-review-instructions.html"/>
3435
<item name="License" href="/license.html"/>
3536
</menu>
3637

src/site/xdoc/release/manual/installation.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?xml version="1.0"?>
22
<!--
33
Licensed to the Apache Software Foundation (ASF) under one or more
4-
contributor license agreements. See the NOTICE file distributed with
4+
contributor license agreements. See the NOTICE file distributed with
55
this work for additional information regarding copyright ownership.
6-
The ASF licenses this file to You under the Apache License, Version 2.0
6+
The ASF licenses this file to you under the Apache License, Version 2.0
77
(the "License"); you may not use this file except in compliance with
8-
the License. You may obtain a copy of the License at
8+
the License. You may obtain a copy of the License at
99
10-
http://www.apache.org/licenses/LICENSE-2.0
10+
http://www.apache.org/licenses/LICENSE-2.0
1111
1212
Unless required by applicable law or agreed to in writing, software
1313
distributed under the License is distributed on an "AS IS" BASIS,
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
Licensed to the Apache Software Foundation (ASF) under one or more
4+
contributor license agreements. See the NOTICE file distributed with
5+
this work for additional information regarding copyright ownership.
6+
The ASF licenses this file to you under the Apache License, Version 2.0
7+
(the "License"); you may not use this file except in compliance with
8+
the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
-->
18+
<document>
19+
<properties>
20+
<title>Apache log4net release verification</title>
21+
</properties>
22+
23+
<body>
24+
<section id ="release.verification" name="Release verification">
25+
<p>
26+
Releases of log4net can be verified with following steps:
27+
</p>
28+
<ul>
29+
<li>
30+
Windows (PowerShell)
31+
<ol>
32+
<li>
33+
Prerequisites
34+
<pre class="code">winget install -e --id GnuPG.Gpg4win
35+
winget install -e --id TortoiseSVN.TortoiseSVN</pre>
36+
</li>
37+
<li>
38+
Check out the release distribution
39+
<pre class="code">svn co https://dist.apache.org/repos/dist/dev/logging/log4net/source/{releaseVersion} log4net-{releaseVersion}
40+
pushd log4net-{releaseVersion}</pre>
41+
</li>
42+
<li>
43+
Verify and extract
44+
<pre class="code">&amp; ./verify-release.ps1</pre>
45+
</li>
46+
<li>
47+
<p>Verify the build</p>
48+
<pre class="code">winget install -e --id Mono.Mono
49+
winget install Microsoft.DotNet.SDK.8
50+
dotnet test ./src/log4net.sln</pre>
51+
</li>
52+
</ol>
53+
</li>
54+
<li>
55+
Linux
56+
<ol>
57+
<li>
58+
<p>Check out the release distribution</p>
59+
<pre class="code">svn co https://dist.apache.org/repos/dist/dev/logging/log4net/{releaseVersion} log4net-{releaseVersion} &amp;&amp; cd $_</pre>
60+
</li>
61+
<li>
62+
<p>Verify checksums</p>
63+
<pre class="code">sha512sum --check *.sha512</pre>
64+
</li>
65+
<li>
66+
<p>Import the release manager GPG keys, unless you haven’t earlier done so</p>
67+
<pre class="code">wget -O - https://downloads.apache.org/logging/KEYS | gpg --import</pre>
68+
</li>
69+
<li>
70+
<p>Verify signatures</p>
71+
<pre class="code">for sigFile in *.asc; do gpg --verify $sigFile; done</pre>
72+
</li>
73+
<li>
74+
<p>Extract sources</p>
75+
<pre class="code">umask 0022
76+
unzip -q *-src.zip -d src
77+
cd src</pre>
78+
</li>
79+
<li>
80+
<p>Verify the build</p>
81+
<ul>
82+
<li>install <a href="https://docs.docker.com/engine/install/">docker</a> (if you haven't already) </li>
83+
<li>
84+
<pre class="code">docker build -t log4net-builder .
85+
docker run -it log4net-builder
86+
# this will
87+
# - install all dependencies in the container
88+
# - build src/log4net.sln
89+
# inside the container run
90+
dotnet test /logging-log4net/src/log4net.sln</pre>
91+
</li>
92+
</ul>
93+
</li>
94+
</ol>
95+
</li>
96+
</ul>
97+
</section>
98+
</body>
99+
</document>

0 commit comments

Comments
 (0)