source_password = example2
[gpg]
+home = ~/.gnupg
keyid = 626471F1
passfile = ./gpg-passphrase.txt
comment = Unattended build signature
rsync_src_url = ini.get("rsync", "source_url")
rsync_src_key = ini.get("rsync", "source_password")
+gpg_home = "~/.gnupg"
gpg_keyid = None
gpg_comment = "Unattended build signature"
gpg_passfile = "/dev/null"
+if ini.has_option("gpg", "home"):
+ gpg_home = ini.get("gpg", "home")
+
if ini.has_option("gpg", "keyid"):
gpg_keyid = ini.get("gpg", "keyid")
factory.addStep(MasterShellCommand(
name = "signfiles",
description = "Signing files",
- command = ["%s/signall.sh" %(home_dir), "%s/signing/%s.%s.tar.gz" %(home_dir, ts[0], ts[1]), gpg_keyid, gpg_passfile, gpg_comment],
- haltOnFailure = True
+ command = ["%s/signall.sh" %(home_dir), "%s/signing/%s.%s.tar.gz" %(home_dir, ts[0], ts[1]), gpg_keyid, gpg_comment],
+ env = {'GNUPGHOME': gpg_home, 'PASSFILE': gpg_passfile},
+ haltOnFailure = True,
+ logEnviron = False
))
factory.addStep(FileDownload(
tarball="$1"
keyid="$2"
-passfile="$3"
-comment="$4"
+comment="$3"
tmpdir="signall.$$"
tarball="$(readlink -f "$tarball")"
trap "finish 255" HUP INT TERM
if [ ! -f "$tarball" ]; then
- echo "Usage: $0 <tarball> [<keyid> [<passfile> [<comment>]]]"
+ echo "Usage: [GNUPGHOME=... [PASSFILE=...]] $0 <tarball> [<keyid> [<comment>]]"
finish 1
fi
mkdir "$tmpdir" || finish 2
tar -C "$tmpdir/" -xzf "$tarball" || finish 3
-find "$tmpdir/" -type f -not -name "*.gpg" -exec gpg --no-version --batch --yes -a -b ${keyid:+-u "$keyid"} ${comment:+--comment="$comment"} ${passfile:+--passphrase-file "$passfile"} -o "{}.gpg" "{}" \; || finish 4
+
+find "$tmpdir/" -type f -not -name "*.gpg" -exec gpg \
+ --no-version --batch --yes -a -b \
+ ${keyid:+-u "$keyid"} \
+ ${comment:+--comment="$comment"} \
+ ${GNUPGHOME:+--homedir "$GNUPGHOME"} \
+ ${PASSFILE:+--passphrase-file "$PASSFILE"} \
+ -o "{}.gpg" "{}" \; || finish 4
+
tar -C "$tmpdir/" -czf "$tarball" . || finish 5
finish 0
sdk_pattern = lede-sdk-*.tar.xz
[gpg]
+home = ~/.gnupg
keyid = 626471F1
passfile = ./gpg-passphrase.txt
comment = Unattended build signature
if ini.has_option("rsync", "sdk_pattern"):
rsync_sdk_pat = ini.get("rsync", "sdk_pattern")
+gpg_home = "~/.gnupg"
gpg_keyid = None
gpg_comment = "Unattended build signature"
gpg_passfile = "/dev/null"
+if ini.has_option("gpg", "home"):
+ gpg_home = ini.get("gpg", "home")
+
if ini.has_option("gpg", "keyid"):
gpg_keyid = ini.get("gpg", "keyid")
factory.addStep(MasterShellCommand(
name = "signfiles",
description = "Signing files",
- command = ["%s/signall.sh" %(home_dir), "%s/signing/%s.tar.gz" %(home_dir, arch[0]), gpg_keyid, gpg_passfile, gpg_comment],
- haltOnFailure = True
+ command = ["%s/signall.sh" %(home_dir), "%s/signing/%s.tar.gz" %(home_dir, arch[0]), gpg_keyid, gpg_comment],
+ env = {'GNUPGHOME': gpg_home, 'PASSFILE': gpg_passfile},
+ haltOnFailure = True,
+ logEnviron = False
))
factory.addStep(FileDownload(