From 66c0f78da21efeb937d910ee918044498b117383 Mon Sep 17 00:00:00 2001 From: Packet Please Date: Thu, 14 Nov 2024 05:02:42 +0100 Subject: [PATCH] buildbot: sign APK index file --- roles/buildbot/files/packages.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/roles/buildbot/files/packages.py b/roles/buildbot/files/packages.py index a26da0f..2a7424a 100644 --- a/roles/buildbot/files/packages.py +++ b/roles/buildbot/files/packages.py @@ -111,6 +111,15 @@ def branchToFalterBranch(props): return o2f.get(props["branch"]) +@util.renderer +def signCommand(props, wwwdir): + match props["branch"]: + case "openwrt-24.10" | "openwrt-23.05" | "openwrt-22.03" | "openwrt-21.02": + return f"signify-openbsd -S -m {wwwdir}/falter/Packages -s packagefeed_master.sec" + case _: + return f"apk adbsign --allow-untrusted --sign-key apk.snapshot.PRIVATE.pem {wwwdir}/falter/packages.adb" + + # Fans out to one builder per arch and blocks for the results. def packagesFactory(f, wwwPrefix): f.buildClass = AsyncBuild @@ -289,14 +298,7 @@ def packagesArchFactory(f, wwwPrefix, wwwURL, alpineVersion): steps.MasterShellCommand( name="sign", haltOnFailure=True, - command=[ - "sh", - "-c", - util.Interpolate( - "signify-openbsd -S -m %(kw:wwwdir)s/falter/Packages -s packagefeed_master.sec", - wwwdir=wwwdir, - ), - ], + command=["sh", "-c", signCommand.withArgs(wwwdir)], ) ) f.addStep(