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 @@ + 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 @@ + + + Apache log4net release verification + + + +
+

+ Releases of log4net can be verified with following steps: +

+
    +
  • + Windows (PowerShell) +
      +
    1. + Prerequisites +
      winget install -e --id GnuPG.Gpg4win
      +winget install -e --id TortoiseSVN.TortoiseSVN
      +
    2. +
    3. + Check out the release distribution +
      svn co https://dist.apache.org/repos/dist/dev/logging/log4net/source/{releaseVersion} log4net-{releaseVersion}
      +pushd log4net-{releaseVersion}
      +
    4. +
    5. + Verify and extract +
      & ./verify-release.ps1
      +
    6. +
    7. +

      Verify the build

      +
      winget install -e --id Mono.Mono
      +winget install Microsoft.DotNet.SDK.8
      +dotnet test ./src/log4net.sln
      +
    8. +
    +
  • +
  • + Linux +
      +
    1. +

      Check out the release distribution

      +
      svn co https://dist.apache.org/repos/dist/dev/logging/log4net/{releaseVersion} log4net-{releaseVersion} && cd $_
      +
    2. +
    3. +

      Verify checksums

      +
      sha512sum --check *.sha512
      +
    4. +
    5. +

      Import the release manager GPG keys, unless you haven’t earlier done so

      +
      wget -O - https://downloads.apache.org/logging/KEYS | gpg --import
      +
    6. +
    7. +

      Verify signatures

      +
      for sigFile in *.asc; do gpg --verify $sigFile; done
      +
    8. +
    9. +

      Extract sources

      +
      umask 0022
      +unzip -q *-src.zip -d src
      +cd src
      +
    10. +
    11. +

      Verify the build

      +
        +
      • install docker (if you haven't already)
      • +
      • +
        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
        +
      • +
      +
    12. +
    +
  • +
+
+ +
\ No newline at end of file