summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2017-03-03 14:37:25 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-14 15:21:07 +0000
commit5e874ac0b1fa8c13f2abd906b27f55509cba2ef9 (patch)
tree2375714524bb3598ee26f6077f086d38d7a54152
parentfd78c35086036bc3fd981bc25a51fc9ce6cc66f5 (diff)
downloadpoky-5e874ac0b1fa8c13f2abd906b27f55509cba2ef9.tar.gz
rpm: support customizing gpg command line
Add a new %_gpg_sign_cmd_extra_args macro that allows customizing the gpg options used when signing rpm packages. This is needed to be able to sign packages with gpg 2.1 which requires "--pinentry-mode loopback" to allow non-interactive signing. [YOCTO #11054] (From OE-Core rev: 5cbba2c4016ad84a54f83531868aa6e66eef468e) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 373a7146d596d27376a003014df0d06f3df5348d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/rpm/rpm/0001-macros-add-_gpg_sign_cmd_extra_args.patch43
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4.16.bb1
2 files changed, 44 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rpm/rpm/0001-macros-add-_gpg_sign_cmd_extra_args.patch b/meta/recipes-devtools/rpm/rpm/0001-macros-add-_gpg_sign_cmd_extra_args.patch
new file mode 100644
index 0000000000..eb43a87346
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/0001-macros-add-_gpg_sign_cmd_extra_args.patch
@@ -0,0 +1,43 @@
1From fa9726ff69f86d6a87c4c4bd7e3d2881999a872a Mon Sep 17 00:00:00 2001
2From: Markus Lehtonen <markus.lehtonen@linux.intel.com>
3Date: Thu, 23 Feb 2017 11:14:20 +0200
4Subject: [PATCH] macros: add %_gpg_sign_cmd_extra_args
5
6Similar to what rpm4 has. This macro can be used to customize the
7gpg command line options when signing packages. This is needed for
8gpg 2.1 which requires "--pinentry-mode loopback" to allow
9non-interactive signing.
10
11Upstream-Status: Pending
12
13Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
14---
15 macros/macros.in | 5 ++++-
16 1 file changed, 4 insertions(+), 1 deletion(-)
17
18diff --git a/macros/macros.in b/macros/macros.in
19index 8bc5840..fda3c66 100644
20--- a/macros/macros.in
21+++ b/macros/macros.in
22@@ -524,7 +524,9 @@ $_arbitrary_tags_tests Foo:Bar
23 %_gpg_passphrase_way %{?_gpg_passphrase:--passphrase "%{_gpg_passphrase}"}%{!?_gpg_passphrase:--passphrase-fd 3}
24
25 %__gpg_check_password_cmd %{__gpg} \
26- gpg --batch --no-verbose %{_gpg_passphrase_way} -u "%{_gpg_name}" -so -
27+ gpg --batch --no-verbose %{_gpg_passphrase_way} \
28+ %{?_gpg_sign_cmd_extra_args:%{_gpg_sign_cmd_extra_args}} \
29+ -u "%{_gpg_name}" -so -
30 #%__pgp_check_password_cmd %{__pgp} \
31 # pgp +batchmode=on +verbose=0 "%{_pgp_name}" -sf
32 #%__pgp5_check_password_cmd %{__pgp} \
33@@ -532,6 +534,7 @@ $_arbitrary_tags_tests Foo:Bar
34
35 %__gpg_sign_cmd %{__gpg} \
36 gpg --batch --no-verbose --no-armor %{_gpg_passphrase_way} --no-secmem-warning \
37+ %{?_gpg_sign_cmd_extra_args:%{_gpg_sign_cmd_extra_args}} \
38 -u "%{_gpg_name}" -sbo %{__signature_filename} %{__plaintext_filename}
39 #%__pgp_sign_cmd %{__pgp} \
40 # pgp +batchmode=on +verbose=0 +armor=off \
41--
422.10.2
43
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.16.bb b/meta/recipes-devtools/rpm/rpm_5.4.16.bb
index 85eb5fef1e..497af8e055 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.16.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.16.bb
@@ -119,6 +119,7 @@ SRC_URI += " \
119 file://gcc6-stdlib.patch \ 119 file://gcc6-stdlib.patch \
120 file://0001-system.h-query.c-support-nosignature.patch \ 120 file://0001-system.h-query.c-support-nosignature.patch \
121 file://rpm-ensure-rpm2cpio-call-rpm-relocation-code.patch \ 121 file://rpm-ensure-rpm2cpio-call-rpm-relocation-code.patch \
122 file://0001-macros-add-_gpg_sign_cmd_extra_args.patch \
122" 123"
123 124
124# OE specific changes 125# OE specific changes