|
@@ -101,6 +101,9 @@ python do_swuimage () {
|
|
|
fetch = bb.fetch2.Fetch([], d)
|
|
fetch = bb.fetch2.Fetch([], d)
|
|
|
list_for_cpio = ["sw-description"]
|
|
list_for_cpio = ["sw-description"]
|
|
|
|
|
|
|
|
|
|
+ if d.getVar('SWUPDATE_SIGNING', True) == '1':
|
|
|
|
|
+ list_for_cpio.append('sw-description.sig')
|
|
|
|
|
+
|
|
|
for url in fetch.urls:
|
|
for url in fetch.urls:
|
|
|
local = fetch.localpath(url)
|
|
local = fetch.localpath(url)
|
|
|
filename = os.path.basename(local)
|
|
filename = os.path.basename(local)
|
|
@@ -110,9 +113,6 @@ python do_swuimage () {
|
|
|
|
|
|
|
|
deploydir = d.getVar('DEPLOY_DIR_IMAGE', True)
|
|
deploydir = d.getVar('DEPLOY_DIR_IMAGE', True)
|
|
|
|
|
|
|
|
- if d.getVar('SWUPDATE_SIGNING', True) == '1':
|
|
|
|
|
- list_for_cpio.append('sw-description.sig')
|
|
|
|
|
-
|
|
|
|
|
for image in images:
|
|
for image in images:
|
|
|
imagename = image + '-' + d.getVar('MACHINE', True)
|
|
imagename = image + '-' + d.getVar('MACHINE', True)
|
|
|
fstypes = (d.getVarFlag("SWUPDATE_IMAGES_FSTYPES", image, True) or "").split()
|
|
fstypes = (d.getVarFlag("SWUPDATE_IMAGES_FSTYPES", image, True) or "").split()
|
|
@@ -135,8 +135,12 @@ python do_swuimage () {
|
|
|
bb.fatal("SWUPDATE_PRIVATE_KEY isn't set")
|
|
bb.fatal("SWUPDATE_PRIVATE_KEY isn't set")
|
|
|
if not os.path.exists(privkey):
|
|
if not os.path.exists(privkey):
|
|
|
bb.fatal("SWUPDATE_PRIVATE_KEY %s doesn't exist" % (privkey))
|
|
bb.fatal("SWUPDATE_PRIVATE_KEY %s doesn't exist" % (privkey))
|
|
|
- signcmd = "openssl dgst -sha256 -sign '%s' -out '%s' '%s'" % (
|
|
|
|
|
|
|
+ passout = d.getVar('SWUPDATE_PASSWORD_FILE', True)
|
|
|
|
|
+ if passout:
|
|
|
|
|
+ passout = "-passin file:'%s' " % (passout)
|
|
|
|
|
+ signcmd = "openssl dgst -sha256 -sign '%s' %s -out '%s' '%s'" % (
|
|
|
privkey,
|
|
privkey,
|
|
|
|
|
+ passout,
|
|
|
os.path.join(s, 'sw-description.sig'),
|
|
os.path.join(s, 'sw-description.sig'),
|
|
|
os.path.join(s, 'sw-description'))
|
|
os.path.join(s, 'sw-description'))
|
|
|
if os.system(signcmd) != 0:
|
|
if os.system(signcmd) != 0:
|