All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] gnupg: Split gpg and gpg-agent into a minimal gnupg-gpg package
@ 2019-11-07 22:04 Haris Okanovic
  2019-11-07 22:04 ` [PATCH 2/2] opkg: RDEPEND "gnupg-gpg" instead of "gnupg" Haris Okanovic
  0 siblings, 1 reply; 2+ messages in thread
From: Haris Okanovic @ 2019-11-07 22:04 UTC (permalink / raw
  To: openembedded-core; +Cc: haris.okanovic, ken.sharp

Add minimal "gnupg-gpg" package containing just enough binaries to run
gpg and gpg-agent. Add dependency in normal "gnupg" package to preserve
old behavior.

Some applications like opkg don't need all functionality provided by
normal gnupg installations. This minimal package provides just enough
functionality to verify and manage keys in opkg, in order to minimize
disk overhead.

Signed-off-by: Haris Okanovic <haris.okanovic@ni.com>
---
 meta/recipes-support/gnupg/gnupg_2.2.17.bb | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/meta/recipes-support/gnupg/gnupg_2.2.17.bb b/meta/recipes-support/gnupg/gnupg_2.2.17.bb
index 689cf8a75e..ab19a1ad11 100644
--- a/meta/recipes-support/gnupg/gnupg_2.2.17.bb
+++ b/meta/recipes-support/gnupg/gnupg_2.2.17.bb
@@ -29,6 +29,21 @@ EXTRA_OECONF = "--disable-ldap \
 		--with-readline=${STAGING_LIBDIR}/.. \
 		--enable-gpg-is-gpg2 \
                "
+
+# A minimal package containing just enough to run gpg+gpgagent (E.g. use gpgme in opkg)
+PACKAGES =+ "${PN}-gpg"
+FILES_${PN}-gpg = " \
+	${bindir}/gpg \
+	${bindir}/gpg2 \
+	${bindir}/gpg-agent \
+"
+
+# Normal package (gnupg) should depend on minimal package (gnupg-gpg)
+# to ensure all tools are included. This is done only in non-native
+# builds. Native builds don't have sub-packages, so appending RDEPENDS
+# in this case breaks recipe parsing.
+RDEPENDS_${PN} += "${@ "" if ("native" in d.getVar("PN")) else (d.getVar("PN") + "-gpg")}"
+
 RRECOMMENDS_${PN} = "pinentry"
 
 do_configure_prepend () {
-- 
2.24.0



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

* [PATCH 2/2] opkg: RDEPEND "gnupg-gpg" instead of "gnupg"
  2019-11-07 22:04 [PATCH 1/2] gnupg: Split gpg and gpg-agent into a minimal gnupg-gpg package Haris Okanovic
@ 2019-11-07 22:04 ` Haris Okanovic
  0 siblings, 0 replies; 2+ messages in thread
From: Haris Okanovic @ 2019-11-07 22:04 UTC (permalink / raw
  To: openembedded-core; +Cc: haris.okanovic, ken.sharp

gnupg-gpg is a minimal installation of gnupg with enough functionality
to verify signatures and manage keys. Use this package instead of full
gnupg to slim down opkg installations with "--enable-gpg".

Signed-off-by: Haris Okanovic <haris.okanovic@ni.com>
---
 meta/recipes-devtools/opkg/opkg_0.4.1.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/opkg/opkg_0.4.1.bb b/meta/recipes-devtools/opkg/opkg_0.4.1.bb
index 104f07fda8..149ee3ca19 100644
--- a/meta/recipes-devtools/opkg/opkg_0.4.1.bb
+++ b/meta/recipes-devtools/opkg/opkg_0.4.1.bb
@@ -32,7 +32,10 @@ OPKGLIBDIR ??= "${target_localstatedir}/lib"
 
 PACKAGECONFIG ??= "libsolv"
 
-PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,gpgme libgpg-error,gnupg"
+PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,\
+    gnupg gpgme libgpg-error,\
+    ${@ "gnupg" if ("native" in d.getVar("PN")) else "gnupg-gpg"}\
+    "
 PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
 PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl"
 PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
-- 
2.24.0



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

end of thread, other threads:[~2019-11-07 22:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-07 22:04 [PATCH 1/2] gnupg: Split gpg and gpg-agent into a minimal gnupg-gpg package Haris Okanovic
2019-11-07 22:04 ` [PATCH 2/2] opkg: RDEPEND "gnupg-gpg" instead of "gnupg" Haris Okanovic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.