All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4] udev-extraconf: Split automount and autonet into seperate packages
@ 2025-11-25  9:07 Vivek Puar
  2025-11-25 10:31 ` [OE-core] " Alexander Kanavin
  0 siblings, 1 reply; 3+ messages in thread
From: Vivek Puar @ 2025-11-25  9:07 UTC (permalink / raw)
  To: openembedded-core; +Cc: Vivek Puar

Created two subpackages (${PN}-automount and ${PN}-autonet) to separate
udev rules and scripts for automount and autonet functionality.

If the image only needs storage devices to be auto-mounted or just needs
network hotplug handling, splitting the packages let us choose automount or
autonet package without having to care about other rules. This change does not
save much space but helps avoid installing unnecessary scripts and rules.

Signed-off-by: Vivek Puar <vpuar@qti.qualcomm.com>
---
 meta/recipes-core/udev/udev-extraconf_1.1.bb | 25 ++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-core/udev/udev-extraconf_1.1.bb b/meta/recipes-core/udev/udev-extraconf_1.1.bb
index 2ba6606c05..1353d35de2 100644
--- a/meta/recipes-core/udev/udev-extraconf_1.1.bb
+++ b/meta/recipes-core/udev/udev-extraconf_1.1.bb
@@ -40,22 +40,39 @@ do_install() {
     install -m 0755 ${S}/network.sh ${D}${sysconfdir}/udev/scripts
 }
 
-pkg_postinst:${PN} () {
+PACKAGES =+ "${PN}-automount ${PN}-autonet"
+
+FILES:${PN}-automount = " \
+    ${sysconfdir}/udev/rules.d/automount.rules \
+    ${sysconfdir}/udev/scripts/mount.sh \
+    ${sysconfdir}/udev/mount.ignorelist \
+"
+
+RDEPENDS:${PN}-automount = "udev util-linux-blkid ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'util-linux-lsblk', '', d)}"
+CONFFILES:${PN}-automount = "${sysconfdir}/udev/mount.ignorelist"
+
+pkg_postinst:${PN}-automount () {
 	if [ -e $D${systemd_unitdir}/system/systemd-udevd.service ]; then
 		sed -i "/\[Service\]/aMountFlags=shared" $D${systemd_unitdir}/system/systemd-udevd.service
 	fi
 }
 
-pkg_postrm:${PN} () {
+pkg_postrm:${PN}-automount () {
 	if [ -e $D${systemd_unitdir}/system/systemd-udevd.service ]; then
 		sed -i "/MountFlags=shared/d" $D${systemd_unitdir}/system/systemd-udevd.service
 	fi
 }
 
-RDEPENDS:${PN} = "udev util-linux-blkid ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'util-linux-lsblk', '', d)}"
-CONFFILES:${PN} = "${sysconfdir}/udev/mount.ignorelist"
+FILES:${PN}-autonet = " \
+    ${sysconfdir}/udev/rules.d/autonet.rules \
+    ${sysconfdir}/udev/scripts/network.sh \
+"
+
+RDEPENDS:${PN}-autonet = "udev"
 
 # to replace udev-extra-rules from meta-oe
 RPROVIDES:${PN} = "udev-extra-rules"
 RREPLACES:${PN} = "udev-extra-rules"
 RCONFLICTS:${PN} = "udev-extra-rules"
+
+RDEPENDS:${PN} = "${PN}-automount ${PN}-autonet"
-- 
2.34.1



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

* Re: [OE-core] [PATCH v4] udev-extraconf: Split automount and autonet into seperate packages
  2025-11-25  9:07 [PATCH v4] udev-extraconf: Split automount and autonet into seperate packages Vivek Puar
@ 2025-11-25 10:31 ` Alexander Kanavin
  2025-11-25 11:13   ` Vivek Puar
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Kanavin @ 2025-11-25 10:31 UTC (permalink / raw)
  To: vpuar; +Cc: openembedded-core

On Tue, 25 Nov 2025 at 10:07, Vivek Puar via lists.openembedded.org
<vpuar=qti.qualcomm.com@lists.openembedded.org> wrote:
>
> Created two subpackages (${PN}-automount and ${PN}-autonet) to separate
> udev rules and scripts for automount and autonet functionality.
>
> If the image only needs storage devices to be auto-mounted or just needs
> network hotplug handling, splitting the packages let us choose automount or
> autonet package without having to care about other rules. This change does not
> save much space but helps avoid installing unnecessary scripts and rules.

This still needs an answer to the question asked previously: how was
this patch tested? Given that previous iterations of the patch made
serious runtime dependency omissions, I'm somewhat nervous that the
patch hasn't been actually verified on the target.

Alex


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

* Re: [PATCH v4] udev-extraconf: Split automount and autonet into seperate packages
  2025-11-25 10:31 ` [OE-core] " Alexander Kanavin
@ 2025-11-25 11:13   ` Vivek Puar
  0 siblings, 0 replies; 3+ messages in thread
From: Vivek Puar @ 2025-11-25 11:13 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 649 bytes --]

On Tue, Nov 25, 2025 at 04:01 PM, Alexander Kanavin wrote:

> 
> This still needs an answer to the question asked previously: how was
> this patch tested? Given that previous iterations of the patch made
> serious runtime dependency omissions, I'm somewhat nervous that the
> patch hasn't been actually verified on the target.
> 
> Alex

With this latest change, I've verified on the target that it meets all
the dependencies when we install packages individually and also
verified that all the dependencies are met when udev-extraconf is
added to the image. So I've covered all the possibilities and verified on
the target.

Vivek

[-- Attachment #2: Type: text/html, Size: 776 bytes --]

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

end of thread, other threads:[~2025-11-25 11:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-25  9:07 [PATCH v4] udev-extraconf: Split automount and autonet into seperate packages Vivek Puar
2025-11-25 10:31 ` [OE-core] " Alexander Kanavin
2025-11-25 11:13   ` Vivek Puar

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.