Skip to content

Commit ff9bdad

Browse files
committed
system / packages - allow bypassing signing when creating binaries for testing
Also moved the retropie email used for checking to __gpg_retropie_key and use this rather than __gpg_signing_key as we hardcode the install of the actual key - so the logic didn't make sense in the case of wanting to sign with another key. But __gpg_signing_key can now be set to an empty string to bypass signing of binaries as used by the build scripts. This is only useful for developers/testing binary creation on systems without our signing key.
1 parent 348c105 commit ff9bdad

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

scriptmodules/packages.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -692,14 +692,18 @@ function rp_createBin() {
692692
local archive="$md_id.tar.gz"
693693
local dest="$__tmpdir/archives/$__binary_path/$md_type"
694694
mkdir -p "$dest"
695-
rm -f "$dest/$archive"
695+
rm -f "$dest/$archive" "$dest/$archive.asc"
696696
if tar cvzf "$dest/$archive" -C "$rootdir/$md_type" "$md_id"; then
697-
if signFile "$dest/$archive"; then
698-
chown $user:$user "$dest/$archive" "$dest/$archive.asc"
697+
if [[ -n "$__gpg_signing_key" ]]; then
698+
if signFile "$dest/$archive"; then
699+
chown $user:$user "$dest/$archive" "$dest/$archive.asc"
700+
return 0
701+
fi
702+
else
699703
return 0
700704
fi
701705
fi
702-
rm -f "$dest/$archive" "$dest/$archive.asc"
706+
rm -f "$dest/$archive"
703707
return 1
704708
}
705709

scriptmodules/system.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,14 @@ function conf_binary_vars() {
7474

7575
__archive_url="https://files.retropie.org.uk/archives"
7676

77-
[[ -z "$__gpg_signing_key" ]] && __gpg_signing_key="[email protected]"
78-
if ! gpg --list-keys "$__gpg_signing_key" &>/dev/null; then
77+
# set the gpg key used by RetroPie
78+
__gpg_retropie_key="[email protected]"
79+
80+
# if __gpg_signing_key is not set, set to __gpg_retropie_key
81+
[[ ! -v __gpg_signing_key ]] && __gpg_signing_key="$__gpg_retropie_key"
82+
83+
# if the RetroPie public key is not installed, install it.
84+
if ! gpg --list-keys "$__gpg_retropie_key" &>/dev/null; then
7985
gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys DC9D77FF8208FFC51D8F50CCF1B030906A3B0D31
8086
fi
8187
}

0 commit comments

Comments
 (0)