python3-pyudev: provide native
PATCH 1/2 python3-pyudev: provide native
From: Kai Kang <[email protected]>
Add 'native' to BBCLASSEXTEND to provides python3-pyudev-native which is required by lvm2 when package config 'dbus' is enabled.
--- meta-python/recipes-devtools/python/python3-pyudev_0.24.1.bb | 2 ++ 1 file changed, 2 insertions(+)
meta-python/recipes-devtools/python/python3-pyudev_0.24.1.bb +2 -0
@@ -20,3 +20,5 @@ RDEPENDS:${PN} = "\ ${PYTHON_PN}-fcntl \ libudev \ " + +BBCLASSEXTEND = "native"
Signature · 1 line
2.34.1
PATCH 2/2 lvm2: 2.03.16 -> 2.03.22
From: Kai Kang <[email protected]>
Update lvm2 from 2.03.16 to 2.03.22.
* remove 0002-Guard-use-of-mallinfo-with-__GLIBC__.patch which has done in upstream already
* add patch to check egrep & grep
* rebase patches
* add package config 'dbus' and fix errors about it
---
.../files/0001-configure.ac-check-egrep.patch | 33 +++++++++++++++++
...Guard-use-of-mallinfo-with-__GLIBC__.patch | 29 ---------------
...tweak-MODPROBE_CMD-for-cross-compile.patch | 10 +++---
...per_2.03.16.bb => libdevmapper_2.03.22.bb} | 0
meta-oe/recipes-support/lvm2/lvm2.inc | 4 +--
...findmnt-bin-lsblk-bin-sort-not-found.patch | 12 +++----
...1-lvmdbusd-create-dirs-for-lock-file.patch | 29 +++++++++++++++
.../tweak-installation-for-lvmdbusd.patch | 36 +++++++++++++++++++
.../lvm2/{lvm2_2.03.16.bb => lvm2_2.03.22.bb} | 19 ++++++++--
9 files changed, 128 insertions(+), 44 deletions(-)
create mode 100644 meta-oe/recipes-support/lvm2/files/0001-configure.ac-check-egrep.patch
delete mode 100644 meta-oe/recipes-support/lvm2/files/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch
rename meta-oe/recipes-support/lvm2/{libdevmapper_2.03.16.bb => libdevmapper_2.03.22.bb} (100%)
create mode 100644 meta-oe/recipes-support/lvm2/lvm2/0001-lvmdbusd-create-dirs-for-lock-file.patch
create mode 100644 meta-oe/recipes-support/lvm2/lvm2/tweak-installation-for-lvmdbusd.patch
rename meta-oe/recipes-support/lvm2/{lvm2_2.03.16.bb => lvm2_2.03.22.bb} (78%)meta-oe/recipes-support/lvm2/files/0001-configure.ac-check-egrep.patch new file +33 -0
@@ -0,0 +1,33 @@ +configure.ac: check egrep + +The macro AC_HEADER_STDC which requires AC_PROG_EGREP has been removed +from configure.ac, then it fails to substitute '@EGREP@': + +| [GEN] command-lines-input.h +| /bin/bash: line 2: @EGREP@: command not found +| [GEN] command-count.h + +Call AC_PROG_EGREP to fix the error. + +Upstream-Status: Submitted [https://gitlab.com/lvmteam/lvm2/-/merge_requests/4] + +Signed-off-by: Kai Kang <[email protected]> +--- + configure.ac | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configure.ac b/configure.ac +index 2e52498f9..d9462e22c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -78,6 +78,7 @@ AC_PROG_LN_S + AC_PROG_MAKE_SET + AC_PROG_MKDIR_P + AC_PROG_RANLIB ++AC_PROG_EGREP + AC_CHECK_TOOL([READELF], [readelf]) + AC_CHECK_TOOL(AR, ar) + AC_PATH_TOOL(CFLOW_CMD, cflow) +-- +2.34.1 +
meta-oe/recipes-support/lvm2/files/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch deleted +0 -29
@@ -1,29 +0,0 @@ -From 3ae9c0b607ec33fb07f32a41e9d28cc9068dd39a Mon Sep 17 00:00:00 2001 -From: Dengke Du <[email protected]> -Date: Tue, 25 Oct 2016 11:52:44 +0000 -Subject: [PATCH] Guard use of mallinfo() with __GLIBC__ - -This API is glibc-only - -Signed-off-by: Khem Raj <[email protected]> -Signed-off-by: Dengke Du <[email protected]> - ---- -Upstream-Status: Pending - - lib/mm/memlock.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: LVM2.2.02.177/lib/mm/memlock.c -=================================================================== ---- LVM2.2.02.177.orig/lib/mm/memlock.c -+++ LVM2.2.02.177/lib/mm/memlock.c -@@ -151,7 +151,7 @@ static void _touch_memory(void *mem, siz - - static void _allocate_memory(void) - { --#ifndef VALGRIND_POOL -+#if !defined(VALGRIND_POOL) && defined(__GLIBC__) - void *stack_mem; - struct rlimit limit; - int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks;
meta-oe/recipes-support/lvm2/files/0004-tweak-MODPROBE_CMD-for-cross-compile.patch +5 -5
@@ -21,18 +21,18 @@ Signed-off-by: Hongxu Jia <[email protected]> 1 file changed, 2 deletions(-) diff --git a/configure.ac b/configure.ac -index e427708..aa374ea 100644 +index b43d8b9be..efe3062c1 100644 --- a/configure.ac +++ b/configure.ac -@@ -1791,8 +1791,6 @@ if test "$BUILD_DMFILEMAPD" = yes; then - fi +@@ -1646,8 +1646,6 @@ AS_IF([test "$BUILD_DMFILEMAPD" = "yes"], [ + ]) ################################################################################ -AC_PATH_TOOL(MODPROBE_CMD, modprobe, [], [$PATH_SBIN]) - - if test -n "$MODPROBE_CMD"; then + AS_IF([test -n "$MODPROBE_CMD"], [ AC_DEFINE_UNQUOTED([MODPROBE_CMD], ["$MODPROBE_CMD"], [The path to 'modprobe', if available.]) - fi + ]) -- 2.7.4
meta-oe/recipes-support/lvm2/libdevmapper_2.03.22.bb renamed from meta-oe/recipes-support/lvm2/libdevmapper_2.03.16.bb +0 -0
meta-oe/recipes-support/lvm2/lvm2.inc +2 -2
@@ -10,15 +10,15 @@ DEPENDS += "libaio" SRC_URI = "git://sourceware.org/git/lvm2.git;branch=main \ file://lvm.conf \ file://0001-implement-libc-specific-reopen_stream.patch \ - file://0002-Guard-use-of-mallinfo-with-__GLIBC__.patch \ file://0004-tweak-MODPROBE_CMD-for-cross-compile.patch \ file://0001-Avoid-bashisms-in-init-scripts.patch \ file://0005-do-not-build-manual.patch \ file://0006-start-lvm2-monitor.service-after-tmp.mount.patch \ file://reproducible-build.patch \ + file://0001-configure.ac-check-egrep.patch \ " -SRCREV = "6d1e894a867681af7a811ed63bc435f3aa55fec8" +SRCREV = "016e469caf856f1eb8dde39df0d1aa2e74225aed" S = "${WORKDIR}/git" UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\_\d+)+)"
meta-oe/recipes-support/lvm2/lvm2/0001-fix-command-bin-findmnt-bin-lsblk-bin-sort-not-found.patch +6 -6
@@ -15,10 +15,10 @@ Signed-off-by: Hongxu Jia <[email protected]> 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac -index 4811d4a3d..137b31a82 100644 +index 991a0cf85..e59c82472 100644 --- a/configure.ac +++ b/configure.ac -@@ -1611,6 +1611,8 @@ fi +@@ -1660,6 +1660,8 @@ AS_IF([test -n "$MODPROBE_CMD"], [ SYSCONFDIR="$(eval echo $(eval echo $sysconfdir))"
@@ -27,10 +27,10 @@ index 4811d4a3d..137b31a82 100644 SBINDIR="$(eval echo $(eval echo $sbindir))" LVM_PATH="$SBINDIR/lvm" AC_DEFINE_UNQUOTED(LVM_PATH, ["$LVM_PATH"], [Path to lvm binary.]) -@@ -1829,6 +1831,7 @@ AC_SUBST(SACKPT_CFLAGS) - AC_SUBST(SACKPT_LIBS) - AC_SUBST(SALCK_CFLAGS) - AC_SUBST(SALCK_LIBS) +@@ -1886,6 +1888,7 @@ AC_SUBST(PYTHON2DIR) + AC_SUBST(PYTHON3) + AC_SUBST(PYTHON3DIR) + AC_SUBST(RT_LIBS) +AC_SUBST(BINDIR) AC_SUBST(SBINDIR) AC_SUBST(SELINUX_LIBS)
meta-oe/recipes-support/lvm2/lvm2/0001-lvmdbusd-create-dirs-for-lock-file.patch new file +29 -0
@@ -0,0 +1,29 @@ +lvmdbusd: create dirs for lock file + +Create leading dirs for lvmdbusd lock file, otherwise it fails to start: + +| systemd[1]: Starting LVM2 D-Bus service... +| lvmdbusd[1602]: [1602]: Error during creation of lock file(/var/lock/lvm/lvmdbusd): errno(2), exiting! + +Upstream-Status: Submitted [https://gitlab.com/lvmteam/lvm2/-/merge_requests/7] + +Signed-off-by: Kai Kang <[email protected]> +--- + daemons/lvmdbusd/utils.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/daemons/lvmdbusd/utils.py b/daemons/lvmdbusd/utils.py +index d479175f6..830648659 100644 +--- a/daemons/lvmdbusd/utils.py ++++ b/daemons/lvmdbusd/utils.py +@@ -778,6 +778,7 @@ class LockFile(object): + + def __enter__(self): + try: ++ os.makedirs(os.path.dirname(self.lock_file)) + self.fd = os.open(self.lock_file, os.O_CREAT | os.O_RDWR, stat.S_IRUSR | stat.S_IWUSR) + + # Get and set the close on exec and lock the file +-- +2.34.1 +
meta-oe/recipes-support/lvm2/lvm2/tweak-installation-for-lvmdbusd.patch new file +36 -0
@@ -0,0 +1,36 @@ +Remove $(DESTDIR) from install destination that it is not suitable for oe. And +no generate python cache files too. + +Upstream-Status: Pending [oe specific] + +Signed-off-by: Kai Kang <[email protected]> +--- + daemons/lvmdbusd/Makefile.in | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/daemons/lvmdbusd/Makefile.in b/daemons/lvmdbusd/Makefile.in +index 9c2629279..a79daabf7 100644 +--- a/daemons/lvmdbusd/Makefile.in ++++ b/daemons/lvmdbusd/Makefile.in +@@ -16,7 +16,7 @@ top_srcdir = @top_srcdir@ + top_builddir = @top_builddir@ + + lvmdbuspydir = $(python3dir)/lvmdbusd +-lvmdbusdir = $(DESTDIR)$(lvmdbuspydir) ++lvmdbusdir = $(lvmdbuspydir) + + LVMDBUS_SRCDIR_FILES = \ + automatedproperties.py \ +@@ -55,11 +55,9 @@ install_lvmdbusd: $(LVMDBUSD) + @echo " [INSTALL] $<" + $(Q) $(INSTALL_DIR) $(sbindir) + $(Q) $(INSTALL_SCRIPT) $(LVMDBUSD) $(sbindir) +- $(Q) $(INSTALL_DIR) $(lvmdbusdir) $(lvmdbusdir)/__pycache__ ++ $(Q) $(INSTALL_DIR) $(lvmdbusdir) + $(Q) (cd $(srcdir); $(INSTALL_DATA) $(LVMDBUS_SRCDIR_FILES) $(lvmdbusdir)) + $(Q) $(INSTALL_DATA) $(LVMDBUS_BUILDDIR_FILES) $(lvmdbusdir) +- $(Q) PYTHON=$(PYTHON3) $(PYCOMPILE) --destdir "$(DESTDIR)" --basedir "$(lvmdbuspydir)" $(LVMDBUS_SRCDIR_FILES) $(LVMDBUS_BUILDDIR_FILES) +- $(Q) $(CHMOD) 444 $(lvmdbusdir)/__pycache__/*.py[co] + + install_lvm2: install_lvmdbusd +
meta-oe/recipes-support/lvm2/lvm2_2.03.22.bb renamed from meta-oe/recipes-support/lvm2/lvm2_2.03.16.bb +17 -2
@@ -2,11 +2,13 @@ require lvm2.inc SRC_URI += " \ file://0001-fix-command-bin-findmnt-bin-lsblk-bin-sort-not-found.patch \ + file://tweak-installation-for-lvmdbusd.patch \ + file://0001-lvmdbusd-create-dirs-for-lock-file.patch \ " DEPENDS += "autoconf-archive-native" -inherit multilib_script +inherit multilib_script python3native MULTILIB_SCRIPTS = "${PN}:${sysconfdir}/lvm/lvm.conf"
@@ -28,13 +30,22 @@ do_install:append() { rm -rf ${D}${sysconfdir}/rc.d fi fi + + # following files only exist when package config `dbus` enabled + sed -i -e '1s,#!.*python.*,#!${USRBINPATH}/env python3,' \ + ${D}${sbindir}/lvmdbusd \ + ${D}${PYTHON_SITEPACKAGES_DIR}/lvmdbusd/lvmdb.py \ + ${D}${PYTHON_SITEPACKAGES_DIR}/lvmdbusd/lvm_shell_proxy.py \ + || true } PACKAGE_BEFORE_PN = "${PN}-scripts ${PN}-udevrules" SYSTEMD_PACKAGES = "${PN}" SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'dmeventd', 'lvm2-monitor.service dm-event.socket dm-event.service', '', d)} \ - blk-availability.service" + ${@bb.utils.contains('PACKAGECONFIG', 'dbus', 'lvm2-lvmdbusd.service', '', d)} \ + blk-availability.service \ + " SYSTEMD_AUTO_ENABLE = "disable" TARGET_CC_ARCH += "${LDFLAGS}"
@@ -45,6 +56,8 @@ DEPENDS += "util-linux" LVM2_PACKAGECONFIG:append:class-target = " \ udev \ " + +PACKAGECONFIG[dbus] = "--enable-dbus-service,--disable-dbus-service,python3-dbus-native python3-pyudev-native " PACKAGECONFIG[udev] = "--enable-udev_sync --enable-udev_rules --with-udevdir=${nonarch_base_libdir}/udev/rules.d,--disable-udev_sync --disable-udev_rules,udev,${PN}-udevrules" PACKAGES =+ "libdevmapper"
@@ -57,6 +70,8 @@ FILES:libdevmapper = " \ FILES:${PN} += " \ ${libdir}/device-mapper/*.so \ ${systemd_system_unitdir}/[email protected] \ + ${PYTHON_SITEPACKAGES_DIR}/lvmdbusd \ + ${datadir}/dbus-1/system-services/com.redhat.lvmdbus1.service \ " FILES:${PN}-scripts = " \
Signature · 1 line
2.34.1
Hi,
Le 05/12/2023 à 15:50, Kai Kang a écrit :
Quoted 17 lines
From: Kai Kang <[email protected]>
Add 'native' to BBCLASSEXTEND to provides python3-pyudev-native which is required by lvm2 when package config 'dbus' is enabled.
Signed-off-by Kai Kang <[email protected]>--- meta-python/recipes-devtools/python/python3-pyudev_0.24.1.bb | 2 ++ 1 file changed, 2 insertions(+)meta-python/recipes-devtools/python/python3-pyudev_0.24.1.bb +0
-0
meta-python/recipes-devtools/python/python3-pyudev_0.24.1.bb RDEPENDS:${PN} = "\ · line 24
Quoted 5 lines
meta-python/recipes-devtools/python/python3-pyudev_0.24.1.bb +2
-0@@ -20,3 +20,5 @@ RDEPENDS:${PN} = "\ ${PYTHON_PN}-fcntl \ libudev \ " + +BBCLASSEXTEND = "native"
On my setup, this fails with:
$ bitbake python3-pyudev-native Loading cache: 100% |##########################################################################################################################################################| Time: 0:00:00 Loaded 4996 entries from dependency cache. Parsing recipes: 100% |########################################################################################################################################################| Time: 0:00:59 Parsing of 3129 .bb files complete (98 cached, 3031 parsed). 4997 targets, 140 skipped, 0 masked, 0 errors. NOTE: Resolving any missing task queue dependencies ERROR: Nothing RPROVIDES 'libudev-native' (but virtual:native:/.../yocto/poky/meta-openembedded/meta-python/recipes-devtools/python/python3-pyudev_0.24.1.bb RDEPENDS on or otherwise requires it) NOTE: Runtime target 'libudev-native' is unbuildable, removing... Missing or unbuildable dependency chain was: ['libudev-native'] ERROR: Required build target 'python3-pyudev-native' has no buildable providers. Missing or unbuildable dependency chain was: ['python3-pyudev-native', 'libudev-native']
FYI, the native support was removed precisely to avoid this error on the autobuilder. See:
https://git.openembedded.org/meta-openembedded/commit/?id=d4aa17dc436beb96a804860bc6d18cf72283709e
In this case, I suppose, we would need to either add -native support for libudev or somehow cut the dependency python3-pyudev->libudev.
Maybe this is something you have locally and not pushed yet?
Regards,
Signature · 2 lines
Yoann Congal Smile ECS - Tech Expert
Quoted 38 lines · Yoann Congal
Hi,
Le 05/12/2023 à 15:50, Kai Kang a écrit :
Quoted 17 lines
From: Kai Kang <[email protected]>
Add 'native' to BBCLASSEXTEND to provides python3-pyudev-native which is required by lvm2 when package config 'dbus' is enabled.
Signed-off-by Kai Kang <[email protected]>--- meta-python/recipes-devtools/python/python3-pyudev_0.24.1.bb | 2 ++ 1 file changed, 2 insertions(+)meta-python/recipes-devtools/python/python3-pyudev_0.24.1.bb +0
-0meta-python/recipes-devtools/python/python3-pyudev_0.24.1.bb RDEPENDS:${PN} = "\ · line 24
Quoted 5 lines
meta-python/recipes-devtools/python/python3-pyudev_0.24.1.bb +2
-0@@ -20,3 +20,5 @@ RDEPENDS:${PN} = "\ ${PYTHON_PN}-fcntl \ libudev \ " + +BBCLASSEXTEND = "native"On my setup, this fails with:
$ bitbake python3-pyudev-native Loading cache: 100% |##########################################################################################################################################################| Time: 0:00:00 Loaded 4996 entries from dependency cache. Parsing recipes: 100% |########################################################################################################################################################| Time: 0:00:59 Parsing of 3129 .bb files complete (98 cached, 3031 parsed). 4997 targets, 140 skipped, 0 masked, 0 errors. NOTE: Resolving any missing task queue dependencies ERROR: Nothing RPROVIDES 'libudev-native' (but virtual:native:/.../yocto/poky/meta-openembedded/meta-python/recipes-devtools/python/python3-pyudev_0.24.1.bb RDEPENDS on or otherwise requires it) NOTE: Runtime target 'libudev-native' is unbuildable, removing... Missing or unbuildable dependency chain was: ['libudev-native'] ERROR: Required build target 'python3-pyudev-native' has no buildable providers. Missing or unbuildable dependency chain was: ['python3-pyudev-native', 'libudev-native']
Quoted 7 lines
FYI, the native support was removed precisely to avoid this error on the autobuilder. See:
https://git.openembedded.org/meta-openembedded/commit/?id=d4aa17dc436beb96a804860bc6d18cf72283709eIn this case, I suppose, we would need to either add -native support for libudev or somehow cut the dependency python3-pyudev->libudev.
Maybe this is something you have locally and not pushed yet?
Hi Yoann,
I am using 'systemd' as init manager and it RPROVIDES libudev-native. I haven't finger out the reason, but I'll try to remove this dependency chain.
$ bitbake libudev-native -e >be ERROR: Nothing PROVIDES 'libudev-native'. Close matches: libdnet-native libev-native libuv-native systemd RPROVIDES libudev-native
Regards,
Kai
Quoted 2 lines
Regards,
Signature · 2 lines
Kai Kang Wind River Linux
Khem Raj
AppliedQuoted 4 lines · On Tue, 05 Dec 2023 22:50:31 +0800, [email protected] wrote:
Add 'native' to BBCLASSEXTEND to provides python3-pyudev-native which is required by lvm2 when package config 'dbus' is enabled.
Applied, thanks!
[1/2] python3-pyudev: provide native
(no commit info)
[2/2] lvm2: 2.03.16 -> 2.03.22
commit: 02f460c5e379b3b0980374b3f89d55bc195d03d3
Best regards,
Signature · 1 line
Khem Raj <[email protected]>
Hi,
Le 13/12/2023 à 08:07, Khem Raj a écrit :
Quoted 6 lines · On Tue, 05 Dec 2023 22:50:31 +0800, [email protected] wrote:
Quoted 4 lines
Add 'native' to BBCLASSEXTEND to provides python3-pyudev-native which is required by lvm2 when package config 'dbus' is enabled.
Quoted 6 lines
Applied, thanks!
[1/2] python3-pyudev: provide native
(no commit info)
[2/2] lvm2: 2.03.16 -> 2.03.22commit: 02f460c5e379b3b0980374b3f89d55bc195d03d3
I just check on the git repo, this means that only the lvm2 patch was applied (but not the pyudev one)
Maybe this case (partial application of a patch series) could be made more explicit in your template answer?
Thanks!
Quoted 12 lines
Best regards,
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#107351): https://lists.openembedded.org/g/openembedded-devel/message/107351
Mute This Topic: https://lists.openembedded.org/mt/102992734/4316185
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 2 lines
Yoann Congal Smile ECS - Tech Expert
Quoted 10 lines · Yoann Congal
Hi,
Le 13/12/2023 à 08:07, Khem Raj a écrit :
Quoted 7 lines · On Tue, 05 Dec 2023 22:50:31 +0800, [email protected] wrote:
Quoted 4 lines
Add 'native' to BBCLASSEXTEND to provides python3-pyudev-native which is required by lvm2 when package config 'dbus' is enabled.
Applied, thanks!
Quoted 7 lines
Quoted 4 lines
[1/2] python3-pyudev: provide native
(no commit info)
[2/2] lvm2: 2.03.16 -> 2.03.22commit: 02f460c5e379b3b0980374b3f89d55bc195d03d3I just check on the git repo, this means that only the lvm2 patch was applied (but not the pyudev one)
Maybe this case (partial application of a patch series) could be made more explicit in your template answer?
The v2 thread is also replied. I suppose it may be need to skip the revision thread before final version.
Regards,
Kai
Quoted 15 lines
Thanks!
Quoted 12 lines
Best regards,
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#107351): https://lists.openembedded.org/g/openembedded-devel/message/107351
Mute This Topic: https://lists.openembedded.org/mt/102992734/4316185
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 2 lines
Kai Kang Wind River Linux