Commit 5fe0de9bb3b573f049f6185b20b4433adc1c4efc

Authored by Jay Berkenbilt
1 parent 52a4253c

Document new release signing procedure

README-maintainer.md
... ... @@ -607,31 +607,33 @@ When done, the following should happen:
607 607  
608 608 ## CREATING A RELEASE
609 609  
  610 +* Releases are signed using
  611 + [cosign](https://docs.sigstore.dev/quickstart/quickstart-cosign/)
  612 + using your GitHub identity. If you are creating a release, please
  613 + make sure your correct identity is listed in README.md under
  614 + "Verifying Distributions."
  615 +
610 616 * Push to main. This will create an artifact called distribution
611 617 which will contain all the distribution files. Download these,
612 618 verify the checksums from the job output, rename to remove -ci from
613   - the names, and extract to the release archive area.
  619 + the names, and extract to an empty directory, which we will call the
  620 + "release directory."
614 621  
615   -* From the release area, sign the source distribution:
  622 +* Set the shell variable `version`, which is used in several steps.
616 623  
617   -```
  624 +```sh
618 625 version=x.y.z
619   -gpg --detach-sign --armor qpdf-$version.tar.gz
620 626 ```
621 627  
622   -* Build and test the debian package. This includes running autopkgtest.
623   -
624   -* Add a calendar reminder to check the status of the debian package to
625   - make sure it is transitioning properly and to resolve any issues.
  628 +* From the release directory, sign the releases. You need
  629 + [cosign](https://docs.sigstore.dev/cosign/system_config/installation/).
  630 + When prompted, use your GitHub identity to sign the release.
626 631  
627   -* From the release archive area, sign the releases.
628   -
629   -```
  632 +```sh
630 633 \rm -f *.sha256
631 634 files=(*)
632 635 sha256sum ${files[*]} >| qpdf-$version.sha256
633   -gpg --clearsign --armor qpdf-$version.sha256
634   -mv qpdf-$version.sha256.asc qpdf-$version.sha256
  636 +cosign sign-blob qpdf-$version.sha256 --bundle qpdf-$version.sha256.sigstore
635 637 chmod 444 *
636 638 chmod 555 *.AppImage
637 639 ```
... ... @@ -645,7 +647,7 @@ chmod 555 *.AppImage
645 647 for all its arguments. Create and push a signed tag. This should be
646 648 run with HEAD pointing to the tip of main.
647 649  
648   -```
  650 +```sh
649 651 git rev-parse qpdf/main @
650 652 git tag -s v$version @ -m"qpdf $version"
651 653 git push qpdf v$version
... ... @@ -653,7 +655,7 @@ git push qpdf v$version
653 655  
654 656 * Update documentation branches
655 657  
656   -```
  658 +```sh
657 659 git push qpdf @:$(echo $version | sed -E 's/\.[^\.]+$//')
658 660 git push qpdf @:stable
659 661 ```
... ... @@ -665,13 +667,13 @@ git push qpdf @:stable
665 667 * Create a github release after pushing the tag. `gcurl` is an alias
666 668 that includes the auth token.
667 669  
668   -```
  670 +```sh
669 671 # Create release
670 672  
671 673 GITHUB_TOKEN=$(qdata-show cred github-token)
672 674 function gcurl() { curl -H "Authorization: token $GITHUB_TOKEN" ${1+"$@"}; }
673 675  
674   -url=$(gcurl -s -XPOST https://api.github.com/repos/qpdf/qpdf/releases -d'{"tag_name": "v'$version'", "name": "qpdf '$version'", "draft": true}' | jq -r '.url')
  676 +url=$(gcurl -s -XPOST https://api.github.com/repos/qpdf/qpdf/releases -d'{"tag_name": "v'$version'", "name": "qpdf '$ver
675 677  
676 678 # Get upload url
677 679 upload_url=$(gcurl -s $url | jq -r '.upload_url' | sed -E -e 's/\{.*\}//')
... ... @@ -680,7 +682,7 @@ echo $upload_url
680 682  
681 683 * From the release area, Upload all the files.
682 684  
683   -```
  685 +```sh
684 686 for i in *; do
685 687 mime=$(file -b --mime-type $i)
686 688 gcurl -H "Content-Type: $mime" --data-binary @$i "$upload_url?name=$i"
... ... @@ -694,22 +696,24 @@ Here is a template for the release notes. Change
694 696 `README-what-to-download` to just a file reference for SourceForge
695 697 since there is no relative link target from the news area.
696 698  
697   -```
  699 +```markdown
698 700 This is qpdf version x.y.z. (Brief description, summary of highlights)
699 701  
700 702 For a full list of changes from previous releases, please see the [release notes](https://qpdf.readthedocs.io/en/stable/release-notes.html). See also [README-what-to-download](./README-what-to-download.md) for details about the available source and binary distributions.
701 703 ```
702 704  
703   -* Publish release.
  705 +* Publish release. This can be done most easily directly from the
  706 + GitHub UI. As an alternative, or you can run
704 707  
705   -```
  708 +```sh
706 709 gcurl -XPOST $url -d'{"draft": false}'
707 710 ```
708 711  
709   -* Upload files to sourceforge.
  712 +* Upload files to sourceforge. Replace `sourceforge_login` with your
  713 + SourceForge login.
710 714  
711   -```
712   -rsync -vrlcO ./ jay_berkenbilt,qpdf@frs.sourceforge.net:/home/frs/project/q/qp/qpdf/qpdf/$version/
  715 +```sh
  716 +rsync -vrlcO ./ sourceforge_login,qpdf@frs.sourceforge.net:/home/frs/project/q/qp/qpdf/qpdf/$version/
713 717 ```
714 718  
715 719 * On sourceforge, make the source package the default for all but
... ...
README.md
... ... @@ -15,9 +15,20 @@ is https://qpdf.sourceforge.io. The source code repository is hosted at GitHub:
15 15  
16 16 # Verifying Distributions
17 17  
18   -The public key used to sign qpdf source distributions has
19   -fingerprint `C2C9 6B10 011F E009 E6D1 DF82 8A75 D109 9801 2C7E` and can be found at https://q.ql.org/pubkey.asc or
20   -downloaded from a public key server.
  18 +Official qpdf releases are signed using [cosign](https://docs.sigstore.dev/quickstart/quickstart-cosign/). Each release includes a `sha256` file containing sha256 checksums of all the release files. To verify a release, use `cosign verify-blob`. Example:
  19 +
  20 +```
  21 +cosign verify-blob qpdf-x.y.z.sha256 --bundle qpdf-x.y.z.sha256.sigstore \
  22 + --certificate-identity=signer-identity@qpdf.org \
  23 + --certificate-oidc-issuer=https://github.com/login/oauth
  24 +```
  25 +
  26 +The identity `signer-identity@qpdf.org` should be replaced with the name of the person who signed the release. This will be indicated in the release notes. Valid signers are
  27 +
  28 +* Jay Berkenbilt <ejb@ql.org>
  29 +* Manfred Holger <manfred.holger@qpdf.org>
  30 +
  31 +qpdf versions prior to version 13 were also signed using Jay Berkenbilt's GPG key, which has fingerprint `C2C9 6B10 011F E009 E6D1 DF82 8A75 D109 9801 2C7E` and can be found at https://q.ql.org/pubkey.asc or downloaded from a public key server. Starting with qpdf 13, releases are signed only using cosign.
21 32  
22 33 # Copyright, License
23 34  
... ...
manual/installation.rst
... ... @@ -3,7 +3,10 @@
3 3 Building and Installing qpdf
4 4 ============================
5 5  
6   -This chapter describes how to build and install qpdf.
  6 +This chapter describes how to build and install qpdf. For information
  7 +about installing a pre-built copy of qpdf, see
  8 +[README.md](https://github.com/qpdf/qpdf/blob/main/README.md), the
  9 +top-level README.md in the repository and source distribution.
7 10  
8 11 .. _prerequisites:
9 12  
... ...
manual/release-notes.rst
... ... @@ -14,6 +14,14 @@ more detail.
14 14 .. x.y.z: not yet released
15 15  
16 16 12.3.0: not yet released
  17 + - Release changes
  18 +
  19 + - Starting with version 12.3.0, we use
  20 + `cosign<https://docs.sigstore.dev/cosign/>__`, rather than GPG,
  21 + to sign releases. See the top-level README.md for instructions.
  22 + We will continue to use GPG for the 12.x series. Starting with
  23 + qpdf version 13, only cosign will be used.
  24 +
17 25 - Build changes
18 26  
19 27 - A C++-20 compiler is now required.
... ...