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

Bunch of various apk and phase2 related fixes #53

Merged
merged 6 commits into from
Oct 11, 2024

Conversation

ynezz
Copy link
Member

@ynezz ynezz commented Sep 28, 2024

scripts: signall: fix wrong GPG signature on apk packages.adb index

Currently the GPG signature verification of apk's packages.adb index
fails as the file is modified with apk adbsign after its GPG signed.

So lets fix it by moving the apk adbsign before the GPG signing step.

Fixes: a94d4e1 ("add APK signing logic")

buildworker: start: fix leaking BUILDWORKER_TLS env variable

I've noticed leakage of BUILDWORKER_TLS environment variable in build
logs, so lets fix it in a generic way via new
cleanup_buildworker_env_variables() by using Bash's parameter
expansion and unset all environment variables starting with BUILDWORKER_
prefix.

scripts: sha2rsync: fix missing feeds in additional_files list

Currently only packages feeds are being handled in phase2, so lets add the
other missing feeds.

Fixes: c3ddb0d ("phase2: use sha2rsync.pl for 'targetupload'")

scripts: sha2rsync: add apk package index signature files

Currently additional_files list is missing signature files for apk's
package index, so lets add those to get them rsync-ed as well.

scripts: signall: fix wrong sha256sum on apk packages.adb index

Currently the sha256sum verification of apk's packages.adb index
fails as the file is modified with apk adbsign.

So lets update sha256sum of all packages.adb indexes after they were
signed with apk adbsign.

While at it fix formatting.

Fixes: a94d4e1 ("add APK signing logic")

scripts: signall: fix finish function not called when apk adbsign failed

The finish 3 was not being called when the apk adbsign command
failed within the find command using -exec. This happened because
find does not exit with a non-zero status when the command executed by
-exec fails, so the || finish 3 condition was not triggered.

So lets replace the find ... -exec ... construct with a loop and call
finish 3 immediately if it fails.

Fixes: a94d4e1 ("add APK signing logic")

Currently the GPG signature verification of apk's packages.adb index
fails as the file is modified with `apk adbsign` after its GPG signed.

So lets fix it by moving the `apk adbsign` before the GPG signing step.

Fixes: a94d4e1 ("add APK signing logic")
Signed-off-by: Petr Štetiar <[email protected]>
I've noticed leakage of BUILDWORKER_TLS environment variable in build
logs, so lets fix it in a generic way via new
`cleanup_buildworker_env_variables()` by using Bash's parameter
expansion and unset all environment variables starting with BUILDWORKER_
prefix.

Signed-off-by: Petr Štetiar <[email protected]>
Currently only packages feeds are being handled in phase2, so lets add the
other missing feeds.

Fixes: c3ddb0d ("phase2: use sha2rsync.pl for 'targetupload'")
Signed-off-by: Petr Štetiar <[email protected]>
Currently additional_files list is missing signature files for apk's
package index, so lets add those to get them rsync-ed as well.

Signed-off-by: Petr Štetiar <[email protected]>
Currently the sha256sum verification of apk's packages.adb index
fails as the file is modified with `apk adbsign`.

So lets update sha256sum of all packages.adb indexes after they were
signed with `apk adbsign`.

While at it fix formatting.

Fixes: a94d4e1 ("add APK signing logic")
Signed-off-by: Petr Štetiar <[email protected]>
The `finish 3` was not being called when the `apk adbsign` command
failed within the `find` command using `-exec`. This happened because
`find` does not exit with a non-zero status when the command executed by
`-exec` fails, so the `|| finish 3` condition was not triggered.

So lets replace the `find ... -exec ...` construct with a loop and call
`finish 3` immediately if it fails.

Fixes: a94d4e1 ("add APK signing logic")
Signed-off-by: Petr Štetiar <[email protected]>
@ynezz ynezz changed the title scripts: signall: fix wrong GPG signature on apk packages.adb index Bunch of various apk and phase2 related fixes Sep 30, 2024
@openwrt-bot openwrt-bot merged commit 117e151 into openwrt:main Oct 11, 2024
4 checks passed
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