summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorLeonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>2017-08-17 10:12:27 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-18 23:46:37 +0100
commite461f32d6823aeecbe3ee8090588737c9d67e91f (patch)
tree8e510c444a4c62b5b84e1b2fa9ce2a0f6682911b /meta/classes
parentc0a7913bfe784f011b50b172cfe37c2002888043 (diff)
downloadpoky-e461f32d6823aeecbe3ee8090588737c9d67e91f.tar.gz
sign_rpm: Allow pkg signing by chunks through RPM_GPG_SIGN_CHUNK
Commit d58b1d196 moved from chunk to serial signing, but neither of both approaches allowed the user to select the chunks size. This patch allows the user to select a chunk size through RPM_GPG_SIGN_CHUNK defaulting to BB_NUMBER_THREADS, considered a good default. Indirectly, this change reduces the number of processes spawn to number-of-packages/RPM_GPG_SIGN_CHUNK. (From OE-Core rev: f7f78e73f1cd15f4233a231364b14438af758628) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/sign_rpm.bbclass7
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/classes/sign_rpm.bbclass b/meta/classes/sign_rpm.bbclass
index c49406c74d..6796780ee4 100644
--- a/meta/classes/sign_rpm.bbclass
+++ b/meta/classes/sign_rpm.bbclass
@@ -19,9 +19,12 @@
19# GPG_BIN 19# GPG_BIN
20# Optional variable for specifying the gpg binary/wrapper to use for 20# Optional variable for specifying the gpg binary/wrapper to use for
21# signing. 21# signing.
22# RPM_GPG_SIGN_CHUNK
23# Optional variable indicating the number of packages used per gpg
24# invocation
22# GPG_PATH 25# GPG_PATH
23# Optional variable for specifying the gnupg "home" directory: 26# Optional variable for specifying the gnupg "home" directory:
24# 27
25inherit sanity 28inherit sanity
26 29
27RPM_SIGN_PACKAGES='1' 30RPM_SIGN_PACKAGES='1'
@@ -29,6 +32,7 @@ RPM_SIGN_FILES ?= '0'
29RPM_GPG_BACKEND ?= 'local' 32RPM_GPG_BACKEND ?= 'local'
30# SHA-256 is used by default 33# SHA-256 is used by default
31RPM_FILE_CHECKSUM_DIGEST ?= '8' 34RPM_FILE_CHECKSUM_DIGEST ?= '8'
35RPM_GPG_SIGN_CHUNK ?= "${BB_NUMBER_THREADS}"
32 36
33 37
34python () { 38python () {
@@ -56,6 +60,7 @@ python sign_rpm () {
56 d.getVar('RPM_GPG_NAME'), 60 d.getVar('RPM_GPG_NAME'),
57 d.getVar('RPM_GPG_PASSPHRASE'), 61 d.getVar('RPM_GPG_PASSPHRASE'),
58 d.getVar('RPM_FILE_CHECKSUM_DIGEST'), 62 d.getVar('RPM_FILE_CHECKSUM_DIGEST'),
63 int(d.getVar('RPM_GPG_SIGN_CHUNK')),
59 d.getVar('RPM_FSK_PATH'), 64 d.getVar('RPM_FSK_PATH'),
60 d.getVar('RPM_FSK_PASSWORD')) 65 d.getVar('RPM_FSK_PASSWORD'))
61} 66}