lvm2: Remove the lvm2-udevrules package

Add the specific udev rules needed for device mapper notifications to
the libdevmapper package. This is needed to get notifications for
device mapping to work with systemd.

Move the remaining udev rules files to the lvm2 package as there is no
real reason to have them packaged separately.

List all udev files explicitly in the FILES variables so that someone
will have to make an active decision where to package any new udev files
added in the future.

Co-authored-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Fredrik Hugosson <fredrik.hugosson@axis.com>
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Fredrik Hugosson 2024-10-08 13:55:25 +02:00 committed by Khem Raj
parent c036f746ad
commit c37c867e1a
No known key found for this signature in database
GPG Key ID: BB053355919D3314

View File

@ -57,13 +57,16 @@ LVM2_PACKAGECONFIG:append:class-target = " \
"
PACKAGECONFIG[dbus] = "--enable-dbus-service,--disable-dbus-service,,python3-dbus python3-pyudev"
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"
PACKAGECONFIG[udev] = "--enable-udev_sync --enable-udev_rules --with-udevdir=${nonarch_base_libdir}/udev/rules.d,--disable-udev_sync --disable-udev_rules,udev,"
PACKAGES =+ "libdevmapper"
FILES:libdevmapper = " \
${libdir}/libdevmapper.so.* \
${sbindir}/dmsetup \
${sbindir}/dmstats \
${nonarch_base_libdir}/udev/rules.d/10-dm.rules \
${nonarch_base_libdir}/udev/rules.d/13-dm-disk.rules \
${nonarch_base_libdir}/udev/rules.d/95-dm-notify.rules \
"
FILES:${PN} += " \
@ -71,7 +74,13 @@ FILES:${PN} += " \
${systemd_system_unitdir} \
${PYTHON_SITEPACKAGES_DIR}/lvmdbusd \
${datadir}/dbus-1/system-services/com.redhat.lvmdbus1.service \
${nonarch_base_libdir}/udev/rules.d/11-dm-lvm.rules \
${nonarch_base_libdir}/udev/rules.d/69-dm-lvm.rules \
"
# Remove /lib/udev from FILES:${PN} so that any new rules files that are added
# upstream will have to be explicitly added to either FILES:${PN} or
# FILES:libdevmapper.
FILES:${PN}:remove = "${nonarch_base_libdir}/udev"
FILES:${PN}-scripts = " \
${sbindir}/blkdeactivate \
@ -79,11 +88,8 @@ FILES:${PN}-scripts = " \
${sbindir}/lvmconf \
${sbindir}/lvmdump \
"
# Specified explicitly for the udev rules, just in case that it does not get picked
# up automatically:
FILES:${PN}-udevrules = "${nonarch_base_libdir}/udev/rules.d"
RDEPENDS:${PN} = "bash"
RDEPENDS:${PN}-udevrules = "libdevmapper"
RDEPENDS:${PN}:append:class-target = " libdevmapper"
RDEPENDS:${PN}:append:class-nativesdk = " libdevmapper"