Skip to contentSkip to conversation

lua: add a recipe from meta-oe

RFC PATCH In review Alexander Kanavin 2 participants 12 messages Aug 30, 2021 – Sep 8, 2021

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/7 lua: add a recipe from meta-oe

Lua is a hard dependency in rpm 4.17.

---
 meta/conf/distro/include/maintainers.inc      |   1 +
 .../distro/include/ptest-packagelists.inc     |   1 +
 ...ilding-lua-without-readline-on-Linux.patch |  59 +++++++
 ...rriers-cannot-be-active-during-sweep.patch |  90 ++++++++++
 .../lua/lua/CVE-2020-15888.patch              |  45 +++++
 .../lua/lua/CVE-2020-15945.patch              | 167 ++++++++++++++++++
 meta/recipes-devtools/lua/lua/lua.pc.in       |  10 ++
 meta/recipes-devtools/lua/lua/run-ptest       |  19 ++
 meta/recipes-devtools/lua/lua_5.3.6.bb        |  67 +++++++
 9 files changed, 459 insertions(+)
 create mode 100644 meta/recipes-devtools/lua/lua/0001-Allow-building-lua-without-readline-on-Linux.patch
 create mode 100644 meta/recipes-devtools/lua/lua/0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch
 create mode 100644 meta/recipes-devtools/lua/lua/CVE-2020-15888.patch
 create mode 100644 meta/recipes-devtools/lua/lua/CVE-2020-15945.patch
 create mode 100644 meta/recipes-devtools/lua/lua/lua.pc.in
 create mode 100644 meta/recipes-devtools/lua/lua/run-ptest
 create mode 100644 meta/recipes-devtools/lua/lua_5.3.6.bb
meta/conf/distro/include/maintainers.inc +1 -0
index 0e8185f4e3..d9d57459cf 100644
@@ -467,6 +467,7 @@ RECIPE_MAINTAINER:pn-ltp = "Yi Zhao <[email protected]>"
 RECIPE_MAINTAINER:pn-lttng-modules = "Richard Purdie <[email protected]>"
 RECIPE_MAINTAINER:pn-lttng-tools = "Richard Purdie <[email protected]>"
 RECIPE_MAINTAINER:pn-lttng-ust = "Richard Purdie <[email protected]>"
+RECIPE_MAINTAINER:pn-lua = "Alexander Kanavin <[email protected]>"
 RECIPE_MAINTAINER:pn-lz4 = "Denys Dmytriyenko <[email protected]>"
 RECIPE_MAINTAINER:pn-lzo = "Denys Dmytriyenko <[email protected]>"
 RECIPE_MAINTAINER:pn-lzip = "Denys Dmytriyenko <[email protected]>"
meta/conf/distro/include/ptest-packagelists.inc +1 -0
index e0ae1dd971..3709998f29 100644
@@ -40,6 +40,7 @@ PTESTS_FAST = "\
     libxml-sax-base-perl-ptest \
     libxml-simple-perl-ptest \
     libxml2-ptest \
+    lua-ptest \
     lzo-ptest \
     m4-ptest \
     nettle-ptest \
meta/recipes-devtools/lua/lua/0001-Allow-building-lua-without-readline-on-Linux.patch new file +59 -0

59 lines not on this page · raw message

meta/recipes-devtools/lua/lua/0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch new file +90 -0

90 lines not on this page · raw message

meta/recipes-devtools/lua/lua/CVE-2020-15888.patch new file +45 -0

45 lines not on this page · raw message

meta/recipes-devtools/lua/lua/CVE-2020-15945.patch new file +167 -0

167 lines not on this page · raw message

meta/recipes-devtools/lua/lua/lua.pc.in new file +10 -0
new file mode 100644
index 0000000000..c27e86e85d
@@ -0,0 +1,10 @@
+prefix=/usr
+libdir=${prefix}/lib
+includedir=${prefix}/include
+
+Name: Lua
+Description: Lua language engine
+Version: @VERSION@
+Requires:
+Libs: -L${libdir} -llua -lm -ldl
+Cflags: -I${includedir}
meta/recipes-devtools/lua/lua/run-ptest new file +19 -0
new file mode 100644
index 0000000000..8e085e1af9
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+cd test
+lua -e"_U=true" all.lua > lua-test.tmp
+
+echo "--- test output ---"
+cat lua-test.tmp
+echo ""
+echo ""
+echo "--- ptest result ---"
+
+grep "final OK \!\!\!" lua-test.tmp > /dev/null
+if [ $? -eq 0 ]; then
+   echo "PASS: lua"
+else
+   echo "FAIL: lua"
+fi
+
+rm -f lua-test.tmp
meta/recipes-devtools/lua/lua_5.3.6.bb new file +67 -0

67 lines not on this page · raw message

Signature · 1 line
2.31.1
#1 lore raw

RFC PATCH 2/7 lua: update 5.3.6 -> 5.4.3

Drop three backports and 0001-Allow-building-lua-without-readline-on-Linux.patch (feature added upstream, adjust the recipe accordingly).

Adjust ar/ranlib flags for reproducibility on liblua.a.

License-Update: lines moved around, formatting

---
 ...ilding-lua-without-readline-on-Linux.patch |  59 -------
 ...rriers-cannot-be-active-during-sweep.patch |  90 ----------
 .../lua/lua/CVE-2020-15888.patch              |  45 -----
 .../lua/lua/CVE-2020-15945.patch              | 167 ------------------
 .../lua/{lua_5.3.6.bb => lua_5.4.3.bb}        |  28 +--
 5 files changed, 9 insertions(+), 380 deletions(-)
 delete mode 100644 meta/recipes-devtools/lua/lua/0001-Allow-building-lua-without-readline-on-Linux.patch
 delete mode 100644 meta/recipes-devtools/lua/lua/0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch
 delete mode 100644 meta/recipes-devtools/lua/lua/CVE-2020-15888.patch
 delete mode 100644 meta/recipes-devtools/lua/lua/CVE-2020-15945.patch
 rename meta/recipes-devtools/lua/{lua_5.3.6.bb => lua_5.4.3.bb} (58%)
meta/recipes-devtools/lua/lua/0001-Allow-building-lua-without-readline-on-Linux.patch deleted +0 -59
deleted file mode 100644
index e767900864..0000000000
@@ -1,59 +0,0 @@
-From 601ef636fc4dfb2af3e7fda88d8ea1c1d92affe4 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <[email protected]>
-Date: Wed, 2 Oct 2019 17:54:15 +0200
-Subject: [PATCH] Allow building lua without readline on Linux
-
-Upstream-Status: Pending
-Signed-off-by: Alexander Kanavin <[email protected]>
----
- Makefile      | 2 +-
- src/Makefile  | 3 +++
- src/luaconf.h | 5 +++++
- 3 files changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index 119110d..9f6df45 100644
---- a/Makefile
-+++ b/Makefile
-@@ -36,7 +36,7 @@ RM= rm -f
- # == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
- 
- # Convenience platforms targets.
--PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris
-+PLATS= aix bsd c89 freebsd generic linux linux-no-readline macosx mingw posix solaris
- 
- # What to install.
- TO_BIN= lua luac
-diff --git a/src/Makefile b/src/Makefile
-index 64c78f7..5c0428a 100644
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -109,6 +109,9 @@ generic: $(ALL)
- linux:
- 	$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
- 
-+linux-no-readline:
-+	$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX_NO_READLINE" SYSLIBS="-Wl,-E -ldl"
-+
- macosx:
- 	$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline"
- 
-diff --git a/src/luaconf.h b/src/luaconf.h
-index 9eeeea6..d71ca25 100644
---- a/src/luaconf.h
-+++ b/src/luaconf.h
-@@ -64,6 +64,11 @@
- #define LUA_USE_READLINE	/* needs some extra libraries */
- #endif
- 
-+#if defined(LUA_USE_LINUX_NO_READLINE)
-+#define LUA_USE_POSIX
-+#define LUA_USE_DLOPEN		/* needs an extra library: -ldl */
-+#endif
-+
- 
- #if defined(LUA_USE_MACOSX)
- #define LUA_USE_POSIX
--- 
-2.17.1
-
meta/recipes-devtools/lua/lua/0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch deleted +0 -90

90 lines not on this page · raw message

meta/recipes-devtools/lua/lua/CVE-2020-15888.patch deleted +0 -45

45 lines not on this page · raw message

meta/recipes-devtools/lua/lua/CVE-2020-15945.patch deleted +0 -167

167 lines not on this page · raw message

meta/recipes-devtools/lua/lua_5.4.3.bb renamed from meta/recipes-devtools/lua/lua_5.3.6.bb +9 -19
similarity index 58%
rename from meta/recipes-devtools/lua/lua_5.3.6.bb
rename to meta/recipes-devtools/lua/lua_5.4.3.bb
index f830e09259..b887ee9e03 100644
@@ -1,29 +1,19 @@
 DESCRIPTION = "Lua is a powerful light-weight programming language designed \
 for extending applications."
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://doc/readme.html;beginline=318;endline=352;md5=f43d8ee6bc4df18ef8b276439cc4a153"
+LIC_FILES_CHKSUM = "file://doc/readme.html;beginline=307;endline=330;md5=79c3f6b19ad05efe24c1681f025026bb"
 HOMEPAGE = "http://www.lua.org/"
 
 SRC_URI = "http://www.lua.org/ftp/lua-${PV}.tar.gz;name=tarballsrc \
            file://lua.pc.in \
-           file://0001-Allow-building-lua-without-readline-on-Linux.patch \
-           file://CVE-2020-15888.patch \
-           file://CVE-2020-15945.patch \
-           file://0001-Fixed-bug-barriers-cannot-be-active-during-sweep.patch \
+           ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'http://www.lua.org/tests/lua-${PV_testsuites}-tests.tar.gz;name=tarballtest file://run-ptest ', '', d)} \
            "
 
 # if no test suite matches PV release of Lua exactly, download the suite for the closest Lua release.
-PV_testsuites = "5.3.4"
+PV_testsuites = "5.4.3"
 
-SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', \
-           'http://www.lua.org/tests/lua-${PV_testsuites}-tests.tar.gz;name=tarballtest \
-            file://run-ptest \
-           ', '', d)}"
-
-SRC_URI[tarballsrc.md5sum] = "83f23dbd5230140a3770d5f54076948d"
-SRC_URI[tarballsrc.sha256sum] = "fc5fd69bb8736323f026672b1b7235da613d7177e72558893a0bdcd320466d60"
-SRC_URI[tarballtest.md5sum] = "b14fe3748c1cb2d74e3acd1943629ba3"
-SRC_URI[tarballtest.sha256sum] = "b80771238271c72565e5a1183292ef31bd7166414cd0d43a8eb79845fa7f599f"
+SRC_URI[tarballsrc.sha256sum] = "f8612276169e3bfcbcfb8f226195bfc6e466fe13042f1076cbde92b7ec96bbfb"
+SRC_URI[tarballtest.sha256sum] = "5d29c3022897a8290f280ebe1c6853248dfa35a668e1fc02ba9c8cde4e7bf110"
 
 inherit pkgconfig binconfig ptest
 
@@ -31,7 +21,7 @@ PACKAGECONFIG ??= "readline"
 PACKAGECONFIG[readline] = ",,readline"
 
 TARGET_CC_ARCH += " -fPIC ${LDFLAGS}"
-EXTRA_OEMAKE = "'CC=${CC} -fPIC' 'MYCFLAGS=${CFLAGS} -fPIC' MYLDFLAGS='${LDFLAGS}'"
+EXTRA_OEMAKE = "'CC=${CC} -fPIC' 'MYCFLAGS=${CFLAGS} -fPIC' MYLDFLAGS='${LDFLAGS}' 'AR=ar rcD' 'RANLIB=ranlib -D'"
 
 do_configure:prepend() {
     sed -i -e s:/usr/local:${prefix}:g src/luaconf.h
@@ -39,7 +29,7 @@ do_configure:prepend() {
 }
 
 do_compile () {
-    oe_runmake ${@bb.utils.contains('PACKAGECONFIG', 'readline', 'linux', 'linux-no-readline', d)}
+    oe_runmake ${@bb.utils.contains('PACKAGECONFIG', 'readline', 'linux-readline', 'linux', d)}
 }
 
 do_install () {
@@ -50,13 +40,13 @@ do_install () {
         'INSTALL_MAN=${D}${mandir}/man1' \
         'INSTALL_SHARE=${D}${datadir}/lua' \
         'INSTALL_LIB=${D}${libdir}' \
-        'INSTALL_CMOD=${D}${libdir}/lua/5.3' \
+        'INSTALL_CMOD=${D}${libdir}/lua/5.4' \
         install
     install -d ${D}${libdir}/pkgconfig
 
     sed -e s/@VERSION@/${PV}/ ${WORKDIR}/lua.pc.in > ${WORKDIR}/lua.pc
     install -m 0644 ${WORKDIR}/lua.pc ${D}${libdir}/pkgconfig/
-    rmdir ${D}${datadir}/lua/5.3
+    rmdir ${D}${datadir}/lua/5.4
     rmdir ${D}${datadir}/lua
 }
 
Signature · 1 line
2.31.1
#2 lore raw

RFC PATCH 3/7 rpm: update 4.16.1.3 -> 4.17.0

In reply to Alexander Kanavin

The flagship features are migration from bdb to sqlite and zstd support, both are enabled and taken into use. The relationship and upstream preference between sqlite and ndb formats isn't quite clear.

Lua is now a hard dependency.

Added packageconfig option for r/o support for bdb (that doesn't need bdb itself), but not enabled it as upstream marks it EXPERIMENTAL in capital letters.

Drop sed adjustment for a file that is not anymore installed.

Adjust oeqa test to check for sqlite database instead of bdb.

Drop
0001-Fix-build-with-musl-C-library.patch (nss support removed upstream) 0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch (difficult to undersand and rebase; obsolete with the move to zstd) 0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch (upstream made the same change)

Portions of 0001-tools-Add-error.h-for-non-glibc-case.patch dropped (upstream moved the files to a separate component).

Added 0001-docs-do-not-build-manpages-requires-pandoc.patch to avoid pandoc dependency.

---
 meta/lib/oeqa/runtime/cases/rpm.py            |  6 +-
 ...lib-rpm-as-the-installation-path-for.patch | 14 ++--
 .../0001-Fix-build-with-musl-C-library.patch  | 22 -------
 ...o-not-build-manpages-requires-pandoc.patch | 26 ++++++++
 ...rict-virtual-memory-usage-if-limit-s.patch | 65 -------------------
 ...tools-Add-error.h-for-non-glibc-case.patch | 59 ++---------------
 ...hat-ELF-binaries-are-executable-to-b.patch | 33 ----------
 .../rpm/{rpm_4.16.1.3.bb => rpm_4.17.0.bb}    | 21 +++---
 8 files changed, 52 insertions(+), 194 deletions(-)
 delete mode 100644 meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch
 create mode 100644 meta/recipes-devtools/rpm/files/0001-docs-do-not-build-manpages-requires-pandoc.patch
 delete mode 100644 meta/recipes-devtools/rpm/files/0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch
 delete mode 100644 meta/recipes-devtools/rpm/files/0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch
 rename meta/recipes-devtools/rpm/{rpm_4.16.1.3.bb => rpm_4.17.0.bb} (91%)
meta/lib/oeqa/runtime/cases/rpm.py +3 -3
index 7a9d62c003..a4339116bf 100644
@@ -116,12 +116,12 @@ class RpmInstallRemoveTest(OERuntimeTestCase):
         Author:      Alexander Kanavin <[email protected]>
         AutomatedBy: Daniel Istrate <[email protected]>
         """
-        db_files_cmd = 'ls /var/lib/rpm/__db.*'
+        db_files_cmd = 'ls /var/lib/rpm/rpmdb.sqlite*'
         check_log_cmd = "grep RPM /var/log/messages | wc -l"
 
-        # Make sure that some database files are under /var/lib/rpm as '__db.xxx'
+        # Make sure that some database files are under /var/lib/rpm as 'rpmdb.sqlite'
         status, output = self.target.run(db_files_cmd)
-        msg =  'Failed to find database files under /var/lib/rpm/ as __db.xxx'
+        msg =  'Failed to find database files under /var/lib/rpm/ as rpmdb.sqlite'
         self.assertEqual(0, status, msg=msg)
 
         self.tc.target.copyTo(self.test_file, self.dst)
meta/recipes-devtools/rpm/files/0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch +7 -7
index d8fcc16729..6d236ac400 100644
@@ -1,4 +1,4 @@
-From 7b2dd83d8fcd06af8e583b53da79ed0033793d46 Mon Sep 17 00:00:00 2001
+From 8d013fe154a162305f76141151baf767dd04b598 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <[email protected]>
 Date: Mon, 27 Feb 2017 09:43:30 +0200
 Subject: [PATCH] Do not hardcode "lib/rpm" as the installation path for
@@ -14,10 +14,10 @@ Signed-off-by: Alexander Kanavin <[email protected]>
  3 files changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index fe35a90fa..b2faec6f3 100644
+index eb7d6941b..10a889b5d 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -966,7 +966,7 @@ else
+@@ -871,7 +871,7 @@ else
      usrprefix=$prefix
  fi
  
@@ -27,10 +27,10 @@ index fe35a90fa..b2faec6f3 100644
  
  AC_SUBST(OBJDUMP)
 diff --git a/macros.in b/macros.in
-index 35c8cf9df..9d8b2825c 100644
+index a1f795e5f..689e784ef 100644
 --- a/macros.in
 +++ b/macros.in
-@@ -996,7 +996,7 @@ package or when debugging this package.\
+@@ -933,7 +933,7 @@ package or when debugging this package.\
  %_sharedstatedir	%{_prefix}/com
  %_localstatedir		%{_prefix}/var
  %_lib			lib
@@ -40,7 +40,7 @@ index 35c8cf9df..9d8b2825c 100644
  %_infodir		%{_datadir}/info
  %_mandir		%{_datadir}/man
 diff --git a/rpm.am b/rpm.am
-index 8e1dc2184..3d889ec86 100644
+index 7b57f433b..9bbb9ee96 100644
 --- a/rpm.am
 +++ b/rpm.am
 @@ -1,10 +1,10 @@
@@ -55,4 +55,4 @@ index 8e1dc2184..3d889ec86 100644
 +rpmconfigdir = $(libdir)/rpm
  
  # Libtool version (current-revision-age) for all our libraries
- rpm_version_info = 10:3:1
+ rpm_version_info = 11:0:2
meta/recipes-devtools/rpm/files/0001-Fix-build-with-musl-C-library.patch deleted +0 -22
deleted file mode 100644
index b960da6c31..0000000000
@@ -1,22 +0,0 @@
-From d076de030deb9cafd9b2e82be5d506cebdefad0b Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <[email protected]>
-Date: Mon, 27 Feb 2017 14:43:21 +0200
-Subject: [PATCH 1/9] Fix build with musl C library.
-
-Upstream-Status: Pending
-Signed-off-by: Alexander Kanavin <[email protected]>
-
----
- configure.ac       | 3 ++-
- rpmio/digest_nss.c | 1 +
- 2 files changed, 3 insertions(+), 1 deletion(-)
-
---- a/rpmio/digest_nss.c
-+++ b/rpmio/digest_nss.c
-@@ -1,5 +1,6 @@
- #include "system.h"
- 
-+#include <signal.h>
- #include <pthread.h>
- #include <nss.h>
- #include <sechash.h>
meta/recipes-devtools/rpm/files/0001-docs-do-not-build-manpages-requires-pandoc.patch new file +26 -0
new file mode 100644
index 0000000000..ced52d1007
@@ -0,0 +1,26 @@
+From 9bf1693092385eba9841614613313010221ca01f Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <[email protected]>
+Date: Tue, 29 Jun 2021 20:11:26 +0200
+Subject: [PATCH] docs: do not build manpages (requires pandoc)
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <[email protected]>
+---
+ docs/Makefile.am | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/docs/Makefile.am b/docs/Makefile.am
+index 5a6bd203a..6257767fd 100644
+--- a/docs/Makefile.am
++++ b/docs/Makefile.am
+@@ -1,7 +1,5 @@
+ ## Process this file with automake to produce Makefile.in
+ 
+-SUBDIRS = man
+-
+ EXTRA_DIST =
+ 
+ EXTRA_DIST += \
+-- 
+2.32.0
+
meta/recipes-devtools/rpm/files/0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch deleted +0 -65

65 lines not on this page · raw message

meta/recipes-devtools/rpm/files/0001-tools-Add-error.h-for-non-glibc-case.patch +6 -53

75 lines not on this page · raw message

meta/recipes-devtools/rpm/files/0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch deleted +0 -33
deleted file mode 100644
index 4ac5c38f06..0000000000
@@ -1,33 +0,0 @@
-From 5141d50d7b3d3c209a22c53deedb4ceef014401d Mon Sep 17 00:00:00 2001
-From: Peter Kjellerstedt <[email protected]>
-Date: Mon, 15 May 2017 10:21:08 +0200
-Subject: [PATCH 09/15] Do not require that ELF binaries are executable to be
- identifiable
-
-There is nothing that requires, e.g., a DSO to be executable, but it
-is still an ELF binary and should be identified as such.
-
-Upstream probably expects all ELF binaries to be marked as executable,
-but rather than imposing such a limitation for OE, allow any file to
-be identified as an ELF binary regardless of whether it is executable
-or not.
-
-Upstream-Status: Inappropriate
-Signed-off-by: Peter Kjellerstedt <[email protected]>
-
----
- fileattrs/elf.attr | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/fileattrs/elf.attr b/fileattrs/elf.attr
-index 5805dd0ee..3516f309d 100644
---- a/fileattrs/elf.attr
-+++ b/fileattrs/elf.attr
-@@ -1,4 +1,3 @@
- %__elf_provides		%{_rpmconfigdir}/elfdeps --provides %{?__filter_GLIBC_PRIVATE:--filter-private}
- %__elf_requires		%{_rpmconfigdir}/elfdeps --requires %{?__filter_GLIBC_PRIVATE:--filter-private}
- %__elf_magic		^(setuid,? )?(setgid,? )?(sticky )?ELF (32|64)-bit.*$
--%__elf_flags		exeonly
--- 
-2.14.2
-
meta/recipes-devtools/rpm/rpm_4.17.0.bb renamed from meta/recipes-devtools/rpm/rpm_4.16.1.3.bb +10 -11
similarity index 91%
rename from meta/recipes-devtools/rpm/rpm_4.16.1.3.bb
rename to meta/recipes-devtools/rpm/rpm_4.17.0.bb
index 189da92436..6bb3700a6e 100644
@@ -24,7 +24,7 @@ HOMEPAGE = "http://www.rpm.org"
 LICENSE = "GPL-2.0"
 LIC_FILES_CHKSUM = "file://COPYING;md5=c4eec0c20c6034b9407a09945b48a43f"
 
-SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.16.x \
+SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.17.x \
            file://environment.d-rpm.sh \
            file://0001-Do-not-add-an-unsatisfiable-dependency-when-building.patch \
            file://0001-Do-not-read-config-files-from-HOME.patch \
@@ -32,22 +32,20 @@ SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.16.x \
            file://0001-Do-not-reset-the-PATH-environment-variable-before-ru.patch \
            file://0002-Add-support-for-prefixing-etc-from-RPM_ETCCONFIGDIR-.patch \
            file://0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch \
-           file://0001-Fix-build-with-musl-C-library.patch \
            file://0001-Add-a-color-setting-for-mips64_n32-binaries.patch \
-           file://0011-Do-not-require-that-ELF-binaries-are-executable-to-b.patch \
            file://0001-perl-disable-auto-reqs.patch \
-           file://0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch \
            file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \
            file://0001-lib-transaction.c-fix-file-conflicts-for-MIPS64-N32.patch \
            file://0001-tools-Add-error.h-for-non-glibc-case.patch \
+           file://0001-docs-do-not-build-manpages-requires-pandoc.patch \
            "
 
 PE = "1"
-SRCREV = "3659b8a04f5b8bacf6535e0124e7fe23f15286bd"
+SRCREV = "bcb9baf088f895d623755539a7aa0b5d01f475dc"
 
 S = "${WORKDIR}/git"
 
-DEPENDS = "libgcrypt file popt xz bzip2 elfutils python3"
+DEPENDS = "lua libgcrypt file popt xz bzip2 elfutils python3"
 DEPENDS:append:class-native = " file-replacement-native bzip2-replacement-native"
 
 inherit autotools gettext pkgconfig python3native
@@ -58,7 +56,7 @@ AUTOTOOLS_AUXDIR = "${S}/build-aux"
 # OE-core patches autoreconf to additionally run gnu-configize, which fails with this recipe
 EXTRA_AUTORECONF:append = " --exclude=gnu-configize"
 
-EXTRA_OECONF:append = " --without-lua --enable-python --with-crypto=libgcrypt"
+EXTRA_OECONF:append = " --enable-python --with-crypto=libgcrypt"
 EXTRA_OECONF:append:libc-musl = " --disable-nls --disable-openmp"
 
 # --sysconfdir prevents rpm from attempting to access machine-specific configuration in sysroot/etc; we need to have it in rootfs
@@ -70,15 +68,18 @@ EXTRA_OECONF:append:class-nativesdk = " --sysconfdir=/etc --disable-plugins"
 
 BBCLASSEXTEND = "native nativesdk"
 
-PACKAGECONFIG ??= "bdb ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'inhibit', '', d)}"
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'inhibit', '', d)} sqlite zstd"
 # The inhibit plugin serves no purpose outside of the target
 PACKAGECONFIG:remove:class-native = "inhibit"
 PACKAGECONFIG:remove:class-nativesdk = "inhibit"
 
-PACKAGECONFIG[bdb] = "--enable-bdb,--disable-bdb,db"
 PACKAGECONFIG[imaevm] = "--with-imaevm,,ima-evm-utils"
 PACKAGECONFIG[inhibit] = "--enable-inhibit-plugin,--disable-inhibit-plugin,dbus"
 PACKAGECONFIG[rpm2archive] = "--with-archive,--without-archive,libarchive"
+PACKAGECONFIG[sqlite] = "--enable-sqlite=yes,--enable-sqlite=no,sqlite3"
+PACKAGECONFIG[ndb] = "--enable-ndb,--disable-ndb"
+PACKAGECONFIG[bdb-ro] = "--enable-bdb-ro,--disable-bdb-ro"
+PACKAGECONFIG[zstd] = "--enable-zstd=yes,--enable-zstd=no,zstd"
 
 ASNEEDED = ""
 
@@ -136,8 +137,6 @@ do_install:append () {
 	sed -i -e 's:${HOSTTOOLS_DIR}/::g' \
 	    ${D}/${libdir}/rpm/macros
 
-	sed -i -e 's|/usr/bin/python|${USRBINPATH}/env ${PYTHON_PN}|' \
-	    ${D}${libdir}/rpm/pythondistdeps.py
 }
 
 FILES:${PN} += "${libdir}/rpm-plugins/*.so \
Signature · 1 line
2.31.1
#3 lore raw

RFC PATCH 4/7 libdnf: fix the rpm sqlite-only target setup

In reply to Alexander Kanavin
---
 ...xt.cpp-do-not-try-to-access-BDB-data.patch | 37 +++++++++++++++++++
 meta/recipes-devtools/libdnf/libdnf_0.63.1.bb |  1 +
 2 files changed, 38 insertions(+)
 create mode 100644 meta/recipes-devtools/libdnf/libdnf/0001-libdnf-dnf-context.cpp-do-not-try-to-access-BDB-data.patch
meta/recipes-devtools/libdnf/libdnf/0001-libdnf-dnf-context.cpp-do-not-try-to-access-BDB-data.patch new file +37 -0
new file mode 100644
index 0000000000..6f8a3dcb50
@@ -0,0 +1,37 @@
+From 2f7382b35d59fe08034603497e82ffb943fedef1 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <[email protected]>
+Date: Wed, 30 Jun 2021 15:31:16 +0200
+Subject: [PATCH] libdnf/dnf-context.cpp: do not try to access BDB database
+
+Upstream-Status: Inappropriate [upstream needs to rework this to support
+sqlite]
+Signed-off-by: Alexander Kanavin <[email protected]>
+---
+ libdnf/dnf-context.cpp | 14 --------------
+ 1 file changed, 14 deletions(-)
+
+diff --git a/libdnf/dnf-context.cpp b/libdnf/dnf-context.cpp
+index 86f71a79..9cdcf769 100644
+--- a/libdnf/dnf-context.cpp
++++ b/libdnf/dnf-context.cpp
+@@ -2264,20 +2264,6 @@ dnf_context_setup(DnfContext *context,
+         !dnf_context_set_os_release(context, error))
+         return FALSE;
+ 
+-    /* setup a file monitor on the rpmdb, if we're operating on the native / */
+-    if (g_strcmp0(priv->install_root, "/") == 0) {
+-        rpmdb_path = g_build_filename(priv->install_root, "var/lib/rpm/Packages", NULL);
+-        file_rpmdb = g_file_new_for_path(rpmdb_path);
+-        priv->monitor_rpmdb = g_file_monitor_file(file_rpmdb,
+-                               G_FILE_MONITOR_NONE,
+-                               NULL,
+-                               error);
+-        if (priv->monitor_rpmdb == NULL)
+-            return FALSE;
+-        g_signal_connect(priv->monitor_rpmdb, "changed",
+-                         G_CALLBACK(dnf_context_rpmdb_changed_cb), context);
+-    }
+-
+     /* copy any vendor distributed cached metadata */
+     if (!dnf_context_copy_vendor_cache(context, error))
+         return FALSE;
meta/recipes-devtools/libdnf/libdnf_0.63.1.bb +1 -0
index 282c28e2c4..a9f393e722 100644
@@ -13,6 +13,7 @@ SRC_URI = "git://github.com/rpm-software-management/libdnf;branch=dnf-4-master \
            file://enable_test_data_dir_set.patch \
            file://0001-libdnf-config.h-avoid-the-use-of-non-portable-__WORD.patch \
            file://0001-drop-FindPythonInstDir.cmake.patch \
+           file://0001-libdnf-dnf-context.cpp-do-not-try-to-access-BDB-data.patch \
            "
 
 SRCREV = "8e451380bf84bd76e3925cbae2a06bb0e56f5cd9"
Signature · 1 line
2.31.1
#4 lore raw

RFC PATCH 5/7 libsolv: disable rpm bdb format support

In reply to Alexander Kanavin

Otherwise this causes runtime errors when only sqlite is present.

---
 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 bb925073ed..d30e61e9d9 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,,db rpm"
+PACKAGECONFIG[rpm] = "-DENABLE_RPMMD=ON -DENABLE_RPMDB=ON,,rpm"
 
 EXTRA_OECMAKE = "-DMULTI_SEMANTICS=ON -DENABLE_COMPLEX_DEPS=ON"
 
Signature · 1 line
2.31.1
#5 lore raw

RFC PATCH 6/7 perl: do not build berkeley db module by default

In reply to Alexander Kanavin

Bdb is unmaintained and altogether obsolete, the less dependencies we have on it, the better.

This leaves only apt (specifically, apt-ftparchive) in core as a bdb consumer, sadly it has a hard dependency that isn't easy to patch out. Maybe apt upstream will get to it at some point.

---
 meta/recipes-devtools/perl/perl_5.34.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/perl/perl_5.34.0.bb +1 -1
index ab19a8d0be..a12a0be2f2 100644
@@ -35,7 +35,7 @@ DEPENDS += "perlcross-native zlib virtual/crypt"
 
 PERL_LIB_VER = "${@'.'.join(d.getVar('PV').split('.')[0:2])}.0"
 
-PACKAGECONFIG ??= "bdb gdbm"
+PACKAGECONFIG ??= "gdbm"
 PACKAGECONFIG[bdb] = ",-Ui_db,db"
 PACKAGECONFIG[gdbm] = ",-Ui_gdbm,gdbm"
 
Signature · 1 line
2.31.1
#6 lore raw

RFC PATCH 7/7 package_rpm: use zstd instead of xz

In reply to Alexander Kanavin

zstd has similar time and space performance in compression but is vastly faster in decompression, which benefits rootfs creation (especially when installing very large packages) and on-target package installation.

---
 meta/classes/package_rpm.bbclass | 4 ++--
 meta/conf/bitbake.conf           | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)
meta/classes/package_rpm.bbclass +2 -2
index 88d861c0e7..fc1e4b3a4a 100644
@@ -684,8 +684,8 @@ python do_package_rpm () {
     cmd = cmd + " --define '_use_internal_dependency_generator 0'"
     cmd = cmd + " --define '_binaries_in_noarch_packages_terminate_build 0'"
     cmd = cmd + " --define '_build_id_links none'"
-    cmd = cmd + " --define '_binary_payload w6T%d.xzdio'" % int(d.getVar("XZ_THREADS"))
-    cmd = cmd + " --define '_source_payload w6T%d.xzdio'" % int(d.getVar("XZ_THREADS"))
+    cmd = cmd + " --define '_binary_payload w19T%d.zstdio'" % int(d.getVar("ZSTD_THREADS"))
+    cmd = cmd + " --define '_source_payload w19T%d.zstdio'" % int(d.getVar("ZSTD_THREADS"))
     cmd = cmd + " --define 'clamp_mtime_to_source_date_epoch 1'"
     cmd = cmd + " --define 'use_source_date_epoch_as_buildtime 1'"
     cmd = cmd + " --define '_buildhost reproducible'"
meta/conf/bitbake.conf +3 -0
index 2140d498f7..52d40738f4 100644
@@ -814,6 +814,9 @@ XZ_THREADS ?= "${@oe.utils.cpu_count(at_least=2)}"
 XZ_DEFAULTS ?= "--memlimit=${XZ_MEMLIMIT} --threads=${XZ_THREADS}"
 XZ_DEFAULTS[vardepsexclude] += "XZ_MEMLIMIT XZ_THREADS"
 
+# Default parallelism for zstd
+ZSTD_THREADS ?= "${@oe.utils.cpu_count(at_least=2)}"
+
 # Limit the number of threads that OpenMP libraries will use. Otherwise they
 # may fallback to using all CPUs
 export OMP_NUM_THREADS = "${BB_NUMBER_THREADS}"
Signature · 1 line
2.31.1
#7 lore raw

Re: [OE-core] [RFC PATCH 7/7] package_rpm: use zstd instead of xz

Hello Alex,

Quoted 5 lines · Alexander Kanavin

zstd has similar time and space performance in compression but is vastly faster in decompression, which benefits rootfs creation (especially when installing very large packages) and on-target package installation.

I believe this caused the following repo failures:

https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20210907-bv62etev/packages/diff-html/

I started a subsequent build without the patch and it have the issue.

Quoted 42 lines
---
 meta/classes/package_rpm.bbclass | 4 ++--
 meta/conf/bitbake.conf           | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)
meta/classes/package_rpm.bbclass +2 -2
index 88d861c0e7..fc1e4b3a4a 100644
@@ -684,8 +684,8 @@ python do_package_rpm () {
     cmd = cmd + " --define '_use_internal_dependency_generator 0'"
     cmd = cmd + " --define '_binaries_in_noarch_packages_terminate_build 0'"
     cmd = cmd + " --define '_build_id_links none'"
-    cmd = cmd + " --define '_binary_payload w6T%d.xzdio'" % int(d.getVar("XZ_THREADS"))
-    cmd = cmd + " --define '_source_payload w6T%d.xzdio'" % int(d.getVar("XZ_THREADS"))
+    cmd = cmd + " --define '_binary_payload w19T%d.zstdio'" % int(d.getVar("ZSTD_THREADS"))
+    cmd = cmd + " --define '_source_payload w19T%d.zstdio'" % int(d.getVar("ZSTD_THREADS"))
     cmd = cmd + " --define 'clamp_mtime_to_source_date_epoch 1'"
     cmd = cmd + " --define 'use_source_date_epoch_as_buildtime 1'"
     cmd = cmd + " --define '_buildhost reproducible'"
meta/conf/bitbake.conf +3 -0
index 2140d498f7..52d40738f4 100644
@@ -814,6 +814,9 @@ XZ_THREADS ?= "${@oe.utils.cpu_count(at_least=2)}"
 XZ_DEFAULTS ?= "--memlimit=${XZ_MEMLIMIT} --threads=${XZ_THREADS}"
 XZ_DEFAULTS[vardepsexclude] += "XZ_MEMLIMIT XZ_THREADS"
 
+# Default parallelism for zstd
+ZSTD_THREADS ?= "${@oe.utils.cpu_count(at_least=2)}"
+
 # Limit the number of threads that OpenMP libraries will use. Otherwise they
 # may fallback to using all CPUs
 export OMP_NUM_THREADS = "${BB_NUMBER_THREADS}"
Signature · 1 line
2.31.1
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#8 lore raw

Re: [OE-core] [RFC PATCH 7/7] package_rpm: use zstd instead of xz

Quoted 7 lines · Alexandre Belloni
Quoted 5 lines · Alexander Kanavin

zstd has similar time and space performance in compression but is vastly faster in decompression, which benefits rootfs creation (especially when installing very large packages) and on-target package installation.

Quoted 7 lines

I believe this caused the following repo failures:

https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20210907-bv62etev/packages/diff-html/

I started a subsequent build without the patch and it have the issue.

Can you provide the link to the build itself please?

Alex

#9 lore raw

Re: [OE-core] [RFC PATCH 7/7] package_rpm: use zstd instead of xz

Quoted 13 lines · Alexander Kanavin
Quoted 10 lines · Alexandre Belloni
Quoted 5 lines · Alexander Kanavin

zstd has similar time and space performance in compression but is vastly faster in decompression, which benefits rootfs creation (especially when installing very large packages) and on-target package installation.

I believe this caused the following repo failures:

Quoted 7 lines
Quoted 4 lines

https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20210907-bv62etev/packages/diff-html/

I started a subsequent build without the patch and it have the issue.

Can you provide the link to the build itself please?

Sure:
https://autobuilder.yoctoproject.org/typhoon/#/builders/115/builds/641/steps/13/logs/stdio

I also have this one with the patch removed but with the previous lua patches and it only has a lua issue:
https://autobuilder.yoctoproject.org/typhoon/#/builders/118/builds/628/steps/12/logs/stdio

Quoted 3 lines
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#10 lore raw

Re: [OE-core] [RFC PATCH 7/7] package_rpm: use zstd instead of xz

Quoted 10 lines · Alexandre Belloni

Sure:

https://autobuilder.yoctoproject.org/typhoon/#/builders/115/builds/641/steps/13/logs/stdio

I also have this one with the patch removed but with the previous lua patches and it only has a lua issue:

https://autobuilder.yoctoproject.org/typhoon/#/builders/118/builds/628/steps/12/logs/stdio

This patchset was not completely tested and I had sent it with [RFC PATCH] in the subject which I hoped would result only in comments and feedback on the content, and not maintainers pulling it into various -next builds :) Please drop, I have everything fixed locally, and will resend.

Alex

#11 lore raw

Re: [OE-core] [RFC PATCH 7/7] package_rpm: use zstd instead of xz

Quoted 11 lines · Alexander Kanavin
Quoted 8 lines · Alexandre Belloni

Sure:

https://autobuilder.yoctoproject.org/typhoon/#/builders/115/builds/641/steps/13/logs/stdio

I also have this one with the patch removed but with the previous lua patches and it only has a lua issue:

Quoted 8 lines
Quoted 2 lines

https://autobuilder.yoctoproject.org/typhoon/#/builders/118/builds/628/steps/12/logs/stdio

This patchset was not completely tested and I had sent it with [RFC PATCH] in the subject which I hoped would result only in comments and feedback on the content, and not maintainers pulling it into various -next builds :) Please drop, I have everything fixed locally, and will resend.

No problem, I dropped it but at least, now it is tested ;)

Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com