cmd/dist,release/dist: expose RPM signing hook (#8789)

Plumb a signing callback function to `unixpkgs.rpmTarget` to allow
signing RPMs. This callback is optional and RPMs will build unsigned if
not set, just as before.

Updates https://github.com/tailscale/tailscale/issues/1882

Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
This commit is contained in:
Andrew Lytvynov
2023-08-03 15:27:06 -07:00
committed by GitHub
parent eb6883bb5a
commit 371e1ebf07
4 changed files with 44 additions and 31 deletions

5
cmd/dist/dist.go vendored
View File

@@ -6,7 +6,6 @@ package main
import (
"context"
"crypto"
"errors"
"flag"
"log"
@@ -20,10 +19,10 @@ import (
var synologyPackageCenter bool
func getTargets(tgzSigner crypto.Signer) ([]dist.Target, error) {
func getTargets(signers unixpkgs.Signers) ([]dist.Target, error) {
var ret []dist.Target
ret = append(ret, unixpkgs.Targets(tgzSigner)...)
ret = append(ret, unixpkgs.Targets(signers)...)
// Synology packages can be built either for sideloading, or for
// distribution by Synology in their package center. When
// distributed through the package center, apps can request