Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] gpg_sign: perform rpm signing serially
@ 2017-08-15 21:40 leonardo.sandoval.gonzalez
  2017-08-15 23:53 ` Mark Hatle
  0 siblings, 1 reply; 9+ messages in thread
From: leonardo.sandoval.gonzalez @ 2017-08-15 21:40 UTC (permalink / raw)
  To: openembedded-core

From: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>

gpg signing in file batches (which was default to 100) is a memory expensive
computation, causing trouble in some host machines (even on production AB
as seen on the bugzilla ID). Also, in terms of performance, there is no real
gain when rpm signing is done in batches. Considering the latter issues, perform the
rpm signing serially.

Log showing errors observed recently at AB workers:

    | gpg: signing failed: Cannot allocate memory
    | gpg: signing failed: Cannot allocate memory
    | error: gpg exec failed (2)
    | /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/core2-64-poky-linux/base-passwd/3.5.29-r0/deploy-rpms/core2_64/base-passwd-dev-3.5.29-r0.core2_64.rpm:

[YOCTO #11914]

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
---
 meta/lib/oe/gpg_sign.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/lib/oe/gpg_sign.py b/meta/lib/oe/gpg_sign.py
index f4d8b10e4b..5c7985a856 100644
--- a/meta/lib/oe/gpg_sign.py
+++ b/meta/lib/oe/gpg_sign.py
@@ -45,9 +45,9 @@ class LocalSigner(object):
             if fsk_password:
                 cmd += "--define '_file_signing_key_password %s' " % fsk_password
 
-        # Sign in chunks of 100 packages
-        for i in range(0, len(files), 100):
-            status, output = oe.utils.getstatusoutput(cmd + ' '.join(files[i:i+100]))
+        # Sign packages
+        for f in files:
+            status, output = oe.utils.getstatusoutput(cmd + ' ' + f)
             if status:
                 raise bb.build.FuncFailed("Failed to sign RPM packages: %s" % output)
 
-- 
2.12.3



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-08-18 14:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-15 21:40 [PATCH] gpg_sign: perform rpm signing serially leonardo.sandoval.gonzalez
2017-08-15 23:53 ` Mark Hatle
2017-08-16 12:28   ` Markus Lehtonen
2017-08-16 15:36     ` Andre McCurdy
2017-08-16 16:00     ` Leonardo Sandoval
2017-08-17  7:50       ` Markus Lehtonen
2017-08-17 14:52         ` Leonardo Sandoval
2017-08-18  8:04           ` Markus Lehtonen
2017-08-18 14:25             ` Leonardo Sandoval

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox