You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by fr...@apache.org on 2024/09/27 08:54:41 UTC
(logging-log4net) branch master updated: #189 separate review instructions for log4net (#190)
This is an automated email from the ASF dual-hosted git repository.
freeandnil pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4net.git
The following commit(s) were added to refs/heads/master by this push:
new 910e2c3f #189 separate review instructions for log4net (#190)
910e2c3f is described below
commit 910e2c3f48548fbf3dc47b1d844d3aaf94305c1f
Author: Jan Friedrich <43...@users.noreply.github.com>
AuthorDate: Fri Sep 27 10:54:37 2024 +0200
#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
---
doc/MailTemplate.Announce.txt | Bin 868 -> 427 bytes
doc/MailTemplate.Result.txt | Bin 1082 -> 400 bytes
doc/MailTemplate.txt | Bin 2556 -> 850 bytes
doc/RELEASING.md | 14 ++-
scripts/verify-release.ps1 | 59 ++++++++++++
src/log4net/Core/Serializable.cs | 18 ++++
src/site/site.xml | 1 +
src/site/xdoc/release/manual/installation.xml | 8 +-
.../xdoc/release/release-review-instructions.xml | 99 +++++++++++++++++++++
9 files changed, 187 insertions(+), 12 deletions(-)
diff --git a/doc/MailTemplate.Announce.txt b/doc/MailTemplate.Announce.txt
index cfc9f081..7c974769 100644
Binary files a/doc/MailTemplate.Announce.txt and b/doc/MailTemplate.Announce.txt differ
diff --git a/doc/MailTemplate.Result.txt b/doc/MailTemplate.Result.txt
index d5b6053e..d52577b6 100644
Binary files a/doc/MailTemplate.Result.txt and b/doc/MailTemplate.Result.txt differ
diff --git a/doc/MailTemplate.txt b/doc/MailTemplate.txt
index 24fa0453..942c4c75 100644
Binary files a/doc/MailTemplate.txt and b/doc/MailTemplate.txt differ
diff --git a/doc/RELEASING.md b/doc/RELEASING.md
index 30a265dd..a2f75368 100644
--- a/doc/RELEASING.md
+++ b/doc/RELEASING.md
@@ -27,9 +27,6 @@ release version 2.0.123:
- currently, this _must_ happen on a windows machine because of older
.net framework requirements which cannot be met on a Linux machine
(or at least, I haven't figured out how - in particular CF)
- - TODO: the following are still manual and need to be built into the `release` script:
- - log4net.build: update package.version property
- - pom.xml: update version
4. Sign release artifacts (zips & nupkg) under `build/artifacts`
- eg `gpg --armor --output log4net-2.0.123.nupkg.asc --detach-sig log4net-2.0.123.nupkg`
- 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:
- `svn co https://dist.apache.org/repos/dist/dev/logging -N apache-dist-logging-dev`
- `cd apache-dist-logging-dev`
- `svn up log4net`
- - copy in source & binary artifacts to respective locations
- `svn delete *`
+ - `mkdir 2.0.123`
+ - copy all artifacts to the new folder
- `svn add *`
- - `svn commit`
- - check https://dist.apache.org/repos/dist/dev/logging/log4net/binaries/
- and https://dist.apache.org/repos/dist/dev/logging/log4net/source/
+ - `svn commit -m 'log4net 2.0.123'`
+ - check https://dist.apache.org/repos/dist/dev/logging/log4net/2.0.123/
13. raise a vote on the log4net mailing list (dev@logging.apache.org) - see MailTemplate.txt
14. wait
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:
- `git pull --rebase`
- `git merge asf-staging`
18. rename the release at github, eg to `rel/2.0.123`
- - double-check that the `rel` tag is created
\ No newline at end of file
+ - double-check that the `rel` tag is created
+19. apply the next version by calling `./scripts/update-version.ps1 2.0.123 2.0.124`
\ No newline at end of file
diff --git a/scripts/verify-release.ps1 b/scripts/verify-release.ps1
new file mode 100644
index 00000000..6eb46861
--- /dev/null
+++ b/scripts/verify-release.ps1
@@ -0,0 +1,59 @@
+Param (
+ [Parameter()]
+ [System.IO.DirectoryInfo]$Directory
+)
+
+Set-StrictMode -Version Latest
+$ErrorActionPreference = 'Stop'
+if (!$Directory)
+{
+ $Directory = $PSScriptRoot
+}
+
+function Verify-Hash
+{
+ param
+ (
+ [Parameter(Mandatory=$true, HelpMessage='The file containing the hash.')]
+ [System.IO.FileInfo]$File
+ )
+ $Line = @(Get-Content $File.FullName)[0]
+ $Fields = $Line -split '\s+'
+ $Hash = $Fields[0].Trim().ToUpper()
+ $Filename = $Fields[1].Trim()
+ if ($Filename.StartsWith("*"))
+ {
+ $Filename = $Filename.Substring(1).Trim()
+ }
+
+ $ComputedHash = (Get-FileHash -Algorithm 'SHA512' "$($File.DirectoryName)/$Filename").Hash.ToUpper()
+
+ if($Hash -eq $ComputedHash)
+ {
+ "$($Filename): Passed"
+ }
+ else
+ {
+ Write-Error "$($Filename): Not Passed" -ErrorAction Continue
+ Write-Error "Read from file: $Hash" -ErrorAction Continue
+ Write-Error "Computed: $ComputedHash" -ErrorAction Continue
+ }
+}
+
+foreach ($File in Get-ChildItem $Directory *.sha512)
+{
+ Verify-Hash $File
+}
+
+Invoke-WebRequest https://downloads.apache.org/logging/KEYS -OutFile $Directory/KEYS
+gpg --import -q $Directory/KEYS
+
+foreach ($File in Get-ChildItem $Directory *.asc)
+{
+ gpg --verify $File
+}
+
+Expand-Archive $Directory/*source*.zip -DestinationPath $Directory/src
+$VersionDirectory = "$Directory/src/$(@(Get-ChildItem $Directory/src)[0])"
+$VersionDirectory
+pushd $VersionDirectory
\ No newline at end of file
diff --git a/src/log4net/Core/Serializable.cs b/src/log4net/Core/Serializable.cs
index b88f0612..cfef7ed5 100644
--- a/src/log4net/Core/Serializable.cs
+++ b/src/log4net/Core/Serializable.cs
@@ -1,3 +1,21 @@
+#region Apache License
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to you under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#endregion
#if NET462_OR_GREATER
global using Log4NetSerializableAttribute = System.SerializableAttribute;
global using ILog4NetSerializable = System.Runtime.Serialization.ISerializable;
diff --git a/src/site/site.xml b/src/site/site.xml
index ebe6e7a3..8ddf83ea 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -31,6 +31,7 @@
<item name="Download" href="/release/download.html"/>
<item name="Support" href="https://logging.apache.org/support.html" />
<item name="Release Notes" href="/release/release-notes.html"/>
+ <item name="Release Review" href="/release/release-review-instructions.html"/>
<item name="License" href="/license.html"/>
</menu>
diff --git a/src/site/xdoc/release/manual/installation.xml b/src/site/xdoc/release/manual/installation.xml
index 94738fe0..ef17642b 100644
--- a/src/site/xdoc/release/manual/installation.xml
+++ b/src/site/xdoc/release/manual/installation.xml
@@ -1,13 +1,13 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
+contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
+The ASF licenses this file to you under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
+the License. You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
+http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/src/site/xdoc/release/release-review-instructions.xml b/src/site/xdoc/release/release-review-instructions.xml
new file mode 100644
index 00000000..c6ea2c65
--- /dev/null
+++ b/src/site/xdoc/release/release-review-instructions.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<document>
+ <properties>
+ <title>Apache log4net release verification</title>
+ </properties>
+
+ <body>
+ <section id ="release.verification" name="Release verification">
+ <p>
+ Releases of log4net can be verified with following steps:
+ </p>
+ <ul>
+ <li>
+ Windows (PowerShell)
+ <ol>
+ <li>
+ Prerequisites
+ <pre class="code">winget install -e --id GnuPG.Gpg4win
+winget install -e --id TortoiseSVN.TortoiseSVN</pre>
+ </li>
+ <li>
+ Check out the release distribution
+ <pre class="code">svn co https://dist.apache.org/repos/dist/dev/logging/log4net/source/{releaseVersion} log4net-{releaseVersion}
+pushd log4net-{releaseVersion}</pre>
+ </li>
+ <li>
+ Verify and extract
+ <pre class="code">& ./verify-release.ps1</pre>
+ </li>
+ <li>
+ <p>Verify the build</p>
+ <pre class="code">winget install -e --id Mono.Mono
+winget install Microsoft.DotNet.SDK.8
+dotnet test ./src/log4net.sln</pre>
+ </li>
+ </ol>
+ </li>
+ <li>
+ Linux
+ <ol>
+ <li>
+ <p>Check out the release distribution</p>
+ <pre class="code">svn co https://dist.apache.org/repos/dist/dev/logging/log4net/{releaseVersion} log4net-{releaseVersion} && cd $_</pre>
+ </li>
+ <li>
+ <p>Verify checksums</p>
+ <pre class="code">sha512sum --check *.sha512</pre>
+ </li>
+ <li>
+ <p>Import the release manager GPG keys, unless you haven’t earlier done so</p>
+ <pre class="code">wget -O - https://downloads.apache.org/logging/KEYS | gpg --import</pre>
+ </li>
+ <li>
+ <p>Verify signatures</p>
+ <pre class="code">for sigFile in *.asc; do gpg --verify $sigFile; done</pre>
+ </li>
+ <li>
+ <p>Extract sources</p>
+ <pre class="code">umask 0022
+unzip -q *-src.zip -d src
+cd src</pre>
+ </li>
+ <li>
+ <p>Verify the build</p>
+ <ul>
+ <li>install <a href="https://docs.docker.com/engine/install/">docker</a> (if you haven't already) </li>
+ <li>
+ <pre class="code">docker build -t log4net-builder .
+docker run -it log4net-builder
+# this will
+# - install all dependencies in the container
+# - build src/log4net.sln
+# inside the container run
+dotnet test /logging-log4net/src/log4net.sln</pre>
+ </li>
+ </ul>
+ </li>
+ </ol>
+ </li>
+ </ul>
+ </section>
+ </body>
+</document>
\ No newline at end of file