Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add APK signing logic #46

Merged
merged 2 commits into from
Aug 10, 2024
Merged

add APK signing logic #46

merged 2 commits into from
Aug 10, 2024

Conversation

aparcar
Copy link
Member

@aparcar aparcar commented Aug 6, 2024

With this commit it's possible to sign APK package indexes (packages.adb) via the signall.sh script, which is run on the buildmaster. As a consequence apk must be available on the buildmaster. This is the final step to replace OPKG with APK.

@aparcar aparcar force-pushed the apksign branch 2 times, most recently from 64bab90 to bbe70a1 Compare August 7, 2024 12:49
With this commit it's possible to sign APK package indexes
(packages.adb) via the `signall.sh` script, which is run on the
buildmaster. As a consequence `apk` must be available on the
buildmaster. This is the final step to replace OPKG with APK.

Signed-off-by: Paul Spooren <[email protected]>
@aparcar
Copy link
Member Author

aparcar commented Aug 8, 2024

@ynezz tested and works, I'm happy to give you access to the setup I'm running.

@aparcar
Copy link
Member Author

aparcar commented Aug 10, 2024

Tested for phase1 and phase2, merging

@aparcar aparcar merged commit f1a1a62 into openwrt:main Aug 10, 2024
5 checks passed
@ynezz
Copy link
Member

ynezz commented Sep 23, 2024

As a consequence apk must be available on the buildmaster.

Ok, did you perhaps missed to commit your apk changes for docker/buildmaster/Dockerfile ?


umask 022
find "$tmpdir/tar/" -type f -name "packages.adb" -exec \
"${APK_BIN:-apk}" adbsign --allow-untrusted --sign-key "$(readlink -f "$tmpdir/apk.pem")" "{}" \; || finish 6
Copy link
Member

@ynezz ynezz Sep 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason this fails https://buildbot.staging.openwrt.org/images/#/builders/1/builds/21/steps/47/logs/stdio:

/scripts/signall.sh /master/signing/mediatek.filogic.tar.gz master

** RUNNING ON BUILDMASTER **
 in dir /master
 argv: ['/scripts/signall.sh', '/master/signing/mediatek.filogic.tar.gz', 'master']
 env: {'CONFIG_INI': '/config/config.ini'}
gpg: keybox '/master/signall.4246/gpg/pubring.kbx' created
gpg: /master/signall.4246/gpg/trustdb.gpg: trustdb created
gpg: key CD84BCED626471F1: public key "OpenWrt Build System (PGP key for unattended snapshot builds) <[email protected]>" imported
gpg: key CD84BCED626471F1: secret key imported
gpg: Total number processed: 1
gpg:               imported: 1
gpg:       secret keys read: 1
gpg:   secret keys imported: 1
find: ‘apk’: No such file or directory
find: ‘apk’: No such file or directory

but the signfiles step is marked as successful, although there is haltOnFailure=True defined for this step, so in this case the build should fail. Probably some issue with exit code handling/passing somewhere?

ynezz added a commit to ynezz/openwrt that referenced this pull request Sep 28, 2024
apk/openwrt-snapshots.pem contains Elliptic Curve based public key which
is going to be used for signing of apk's package.adb package indexes
after the builds using `apk adbsign --sign-key <key> packages.adb`
command on the buildbot.

References: openwrt/buildbot#46
Signed-off-by: Petr Štetiar <[email protected]>
ynezz added a commit to ynezz/openwrt that referenced this pull request Sep 28, 2024
apk/openwrt-snapshots.pem contains Elliptic Curve based public key which
is going to be used for signing of apk's package.adb package indexes
after the builds using `apk adbsign --sign-key <key> packages.adb`
command on the buildbot.

References: openwrt/buildbot#46
Signed-off-by: Petr Štetiar <[email protected]>
ynezz added a commit to ynezz/openwrt that referenced this pull request Oct 12, 2024
apk/openwrt-snapshots.pem contains Elliptic Curve based public key which
is going to be used for signing of apk's package.adb package indexes
after the builds using `apk adbsign --sign-key <key> packages.adb`
command on the buildbot.

References: openwrt/buildbot#46
Link: openwrt#16539
Signed-off-by: Petr Štetiar <[email protected]>
ynezz added a commit to ynezz/openwrt that referenced this pull request Oct 12, 2024
apk/openwrt-snapshots.pem contains Elliptic Curve based public key which
is going to be used for signing of apk's package.adb package indexes
after the builds using `apk adbsign --sign-key <key> packages.adb`
command on the buildbot.

References: openwrt/buildbot#46
Link: openwrt#16539
Link: openwrt#16539
Signed-off-by: Petr Štetiar <[email protected]>
ynezz added a commit to ynezz/openwrt that referenced this pull request Oct 12, 2024
apk/openwrt-snapshots.pem contains Elliptic Curve based public key which
is going to be used for signing of apk's package.adb package indexes
after the builds using `apk adbsign --sign-key <key> packages.adb`
command on the buildbot.

References: openwrt/buildbot#46
Signed-off-by: Petr Štetiar <[email protected]>
ynezz added a commit to ynezz/openwrt that referenced this pull request Oct 12, 2024
apk/openwrt-snapshots.pem contains Elliptic Curve based public key which
is going to be used for signing of apk's package.adb package indexes
after the builds using `apk adbsign --sign-key <key> packages.adb`
command on the buildbot.

References: openwrt/buildbot#46
Link: openwrt#16539
Signed-off-by: Petr Štetiar <[email protected]>
Vladdrako pushed a commit to Vladdrako/openwrt that referenced this pull request Oct 13, 2024
apk/openwrt-snapshots.pem contains Elliptic Curve based public key which
is going to be used for signing of apk's package.adb package indexes
after the builds using `apk adbsign --sign-key <key> packages.adb`
command on the buildbot.

References: openwrt/buildbot#46
Link: openwrt#16539
Signed-off-by: Petr Štetiar <[email protected]>
kimocoder pushed a commit to kimocoder/openwrt-ipq that referenced this pull request Oct 15, 2024
apk/openwrt-snapshots.pem contains Elliptic Curve based public key which
is going to be used for signing of apk's package.adb package indexes
after the builds using `apk adbsign --sign-key <key> packages.adb`
command on the buildbot.

References: openwrt/buildbot#46
Link: openwrt/openwrt#16539
Signed-off-by: Petr Štetiar <[email protected]>
liudf0716 pushed a commit to liudf0716/openwrt that referenced this pull request Oct 17, 2024
apk/openwrt-snapshots.pem contains Elliptic Curve based public key which
is going to be used for signing of apk's package.adb package indexes
after the builds using `apk adbsign --sign-key <key> packages.adb`
command on the buildbot.

References: openwrt/buildbot#46
Link: openwrt#16539
Signed-off-by: Petr Štetiar <[email protected]>
vincejv pushed a commit to vincejv/openwrt that referenced this pull request Oct 27, 2024
apk/openwrt-snapshots.pem contains Elliptic Curve based public key which
is going to be used for signing of apk's package.adb package indexes
after the builds using `apk adbsign --sign-key <key> packages.adb`
command on the buildbot.

References: openwrt/buildbot#46
Link: openwrt#16539
Signed-off-by: Petr Štetiar <[email protected]>
vincejv pushed a commit to vincejv/openwrt that referenced this pull request Oct 27, 2024
apk/openwrt-snapshots.pem contains Elliptic Curve based public key which
is going to be used for signing of apk's package.adb package indexes
after the builds using `apk adbsign --sign-key <key> packages.adb`
command on the buildbot.

References: openwrt/buildbot#46
Link: openwrt#16539
Signed-off-by: Petr Štetiar <[email protected]>
kimocoder pushed a commit to thisiskimocoder/openwrt that referenced this pull request Oct 29, 2024
apk/openwrt-snapshots.pem contains Elliptic Curve based public key which
is going to be used for signing of apk's package.adb package indexes
after the builds using `apk adbsign --sign-key <key> packages.adb`
command on the buildbot.

References: openwrt/buildbot#46
Link: openwrt#16539
Signed-off-by: Petr Štetiar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants