diff options
author | Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> | 2017-08-17 10:12:27 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-08-18 23:46:37 +0100 |
commit | e461f32d6823aeecbe3ee8090588737c9d67e91f (patch) | |
tree | 8e510c444a4c62b5b84e1b2fa9ce2a0f6682911b /meta/classes | |
parent | c0a7913bfe784f011b50b172cfe37c2002888043 (diff) | |
download | poky-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.bbclass | 7 |
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 | |
25 | inherit sanity | 28 | inherit sanity |
26 | 29 | ||
27 | RPM_SIGN_PACKAGES='1' | 30 | RPM_SIGN_PACKAGES='1' |
@@ -29,6 +32,7 @@ RPM_SIGN_FILES ?= '0' | |||
29 | RPM_GPG_BACKEND ?= 'local' | 32 | RPM_GPG_BACKEND ?= 'local' |
30 | # SHA-256 is used by default | 33 | # SHA-256 is used by default |
31 | RPM_FILE_CHECKSUM_DIGEST ?= '8' | 34 | RPM_FILE_CHECKSUM_DIGEST ?= '8' |
35 | RPM_GPG_SIGN_CHUNK ?= "${BB_NUMBER_THREADS}" | ||
32 | 36 | ||
33 | 37 | ||
34 | python () { | 38 | python () { |
@@ -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 | } |