Skip to contentSkip to conversation

rpm: turn Berkeley DB hard dependency into PACKAGECONFIG

PATCH In review Ross Burton 2 participants 3 messages May 17, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 rpm: turn Berkeley DB hard dependency into PACKAGECONFIG

In the future we hope to switch to sqlite instead of Berkeley DB, so prepare for this by adding an (enabled by default) PACKAGECONFIG for Berkeley DB.

---
 meta/recipes-devtools/rpm/rpm_4.16.1.3.bb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
meta/recipes-devtools/rpm/rpm_4.16.1.3.bb +3 -2
index 2857cd730c4..2baa23944e6 100644
@@ -51,7 +51,7 @@ S = "${WORKDIR}/git"
 # included in 4.16.1.3
 CVE_CHECK_WHIETLIST += "CVE-2021-20271"
 
-DEPENDS = "libgcrypt db file popt xz bzip2 elfutils python3"
+DEPENDS = "libgcrypt file popt xz bzip2 elfutils python3"
 DEPENDS_append_class-native = " file-replacement-native bzip2-replacement-native"
 
 inherit autotools gettext pkgconfig python3native
@@ -74,7 +74,7 @@ EXTRA_OECONF_append_class-nativesdk = " --sysconfdir=/etc --disable-plugins"
 
 BBCLASSEXTEND = "native nativesdk"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'inhibit', '', d)}"
+PACKAGECONFIG ??= "bdb ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'inhibit', '', d)}"
 # The inhibit plugin serves no purpose outside of the target
 PACKAGECONFIG_remove_class-native = "inhibit"
 PACKAGECONFIG_remove_class-nativesdk = "inhibit"
@@ -82,6 +82,7 @@ PACKAGECONFIG_remove_class-nativesdk = "inhibit"
 PACKAGECONFIG[imaevm] = "--with-imaevm,,ima-evm-utils"
 PACKAGECONFIG[inhibit] = "--enable-inhibit-plugin,--disable-inhibit-plugin,dbus"
 PACKAGECONFIG[rpm2archive] = "--with-archive,--without-archive,libarchive"
+PACKAGECONFIG[bdb] = "--enable-bdb,--disable-bdb,db"
 
 ASNEEDED = ""
 
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/2 libsolv: add missing db dependency

The RPM option currently enables ENABLE_RPMDB_BDB which means libsolv depends on db.

---
 meta/recipes-extended/libsolv/libsolv_0.7.19.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-extended/libsolv/libsolv_0.7.19.bb +1 -1
index 98e106f6f8a..0c69636323b 100644
@@ -20,7 +20,7 @@ S = "${WORKDIR}/git"
 inherit cmake
 
 PACKAGECONFIG ??= "${@bb.utils.contains('PACKAGE_CLASSES','package_rpm','rpm','',d)}"
-PACKAGECONFIG[rpm] = "-DENABLE_RPMMD=ON -DENABLE_RPMDB=ON -DENABLE_RPMDB_BDB=ON,,rpm"
+PACKAGECONFIG[rpm] = "-DENABLE_RPMMD=ON -DENABLE_RPMDB=ON -DENABLE_RPMDB_BDB=ON,,db rpm"
 
 EXTRA_OECMAKE = "-DMULTI_SEMANTICS=ON -DENABLE_COMPLEX_DEPS=ON"
 
Signature · 1 line
2.25.1
#2 lore raw
In reply to Ross Burton
Quoted 39 lines

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Ross Burton
Sent: den 17 maj 2021 13:58
To: [email protected]
Subject: [OE-core] [PATCH 1/2] rpm: turn Berkeley DB hard dependency into PACKAGECONFIG

In the future we hope to switch to sqlite instead of Berkeley DB, so prepare for this by adding an (enabled by default) PACKAGECONFIG for Berkeley DB.

---
 meta/recipes-devtools/rpm/rpm_4.16.1.3.bb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
meta/recipes-devtools/rpm/rpm_4.16.1.3.bb +1 -1
index 2857cd730c4..2baa23944e6 100644
@@ -51,7 +51,7 @@ S = "${WORKDIR}/git"
 # included in 4.16.1.3
 CVE_CHECK_WHIETLIST += "CVE-2021-20271"
 
-DEPENDS = "libgcrypt db file popt xz bzip2 elfutils python3"
+DEPENDS = "libgcrypt file popt xz bzip2 elfutils python3"
 DEPENDS_append_class-native = " file-replacement-native bzip2-replacement-native"
 
 inherit autotools gettext pkgconfig python3native
@@ -74,7 +74,7 @@ EXTRA_OECONF_append_class-nativesdk = " --

sysconfdir=/etc --disable-plugins"

BBCLASSEXTEND = "native nativesdk"

meta/recipes-devtools/rpm/rpm_4.16.1.3.bb +1 -1
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'inhibit', '', d)}"
+PACKAGECONFIG ??= "bdb ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'inhibit', '', d)}"
 # The inhibit plugin serves no purpose outside of the target
 PACKAGECONFIG_remove_class-native = "inhibit"
 PACKAGECONFIG_remove_class-nativesdk = "inhibit"

meta/recipes-devtools/rpm/rpm_4.16.1.3.bb PACKAGECONFIG_remove_class-nativesdk = "inhibit" · line 85

Quoted 4 lines
meta/recipes-devtools/rpm/rpm_4.16.1.3.bb +1 -0
@@ -82,6 +82,7 @@ PACKAGECONFIG_remove_class-nativesdk = "inhibit"
 PACKAGECONFIG[imaevm] = "--with-imaevm,,ima-evm-utils"
 PACKAGECONFIG[inhibit] = "--enable-inhibit-plugin,--disable-inhibit-plugin,dbus"
 PACKAGECONFIG[rpm2archive] = "--with-archive,--without-archive,libarchive"
+PACKAGECONFIG[bdb] = "--enable-bdb,--disable-bdb,db"

Please keep the PACKAGECONFIGs sorted.

Quoted 5 lines
meta/recipes-devtools/rpm/rpm_4.16.1.3.bb +0 -1
 ASNEEDED = ""
 
--

2.25.1

//Peter