diff options
Diffstat (limited to 'meta/recipes-core/udev')
-rw-r--r-- | meta/recipes-core/udev/eudev/0001-build-Remove-dead-g-i-r-configuration.patch | 155 | ||||
-rw-r--r-- | meta/recipes-core/udev/eudev/netifnames.patch | 17 | ||||
-rw-r--r-- | meta/recipes-core/udev/eudev_3.2.14.bb (renamed from meta/recipes-core/udev/eudev_3.2.11.bb) | 23 | ||||
-rw-r--r-- | meta/recipes-core/udev/udev-extraconf/mount.sh | 25 | ||||
-rw-r--r-- | meta/recipes-core/udev/udev-extraconf/systemd-udevd.service | 3 | ||||
-rw-r--r-- | meta/recipes-core/udev/udev-extraconf_1.1.bb | 32 |
6 files changed, 67 insertions, 188 deletions
diff --git a/meta/recipes-core/udev/eudev/0001-build-Remove-dead-g-i-r-configuration.patch b/meta/recipes-core/udev/eudev/0001-build-Remove-dead-g-i-r-configuration.patch deleted file mode 100644 index 2836f30c3a..0000000000 --- a/meta/recipes-core/udev/eudev/0001-build-Remove-dead-g-i-r-configuration.patch +++ /dev/null @@ -1,155 +0,0 @@ -From 520c4d451efc488573746f169d8e47d5a131afc2 Mon Sep 17 00:00:00 2001 -From: Alex Kiernan <alex.kiernan@gmail.com> -Date: Fri, 20 May 2022 09:35:08 +0100 -Subject: [PATCH] build: Remove dead g-i-r configuration - -g-i-r support was removed in 2015 as part of removal of Gobject libudev -support, but the autoconf support wasn't removed but is dead. - -Fixes: 252150e181c5 ("src/gudev: remove Gobject libudev support.") -Upstream-Status: Submitted [https://github.com/eudev-project/eudev/pull/231] -Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> -Signed-off-by: Alex Kiernan <alex.kiernan@zuma.ai> ---- - configure.ac | 12 ------ - m4/introspection.m4 | 96 --------------------------------------------- - 2 files changed, 108 deletions(-) - delete mode 100644 m4/introspection.m4 - -diff --git a/configure.ac b/configure.ac -index 85a524a618ae..987d5037ae77 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -183,17 +183,8 @@ AC_SUBST([udevrulesdir],[${udevlibexecdir}/rules.d]) - AC_SUBST([pkgconfiglibdir], [${libdir}/pkgconfig]) - AC_SUBST([sharepkgconfigdir],[${datadir}/pkgconfig]) - --# introspection paths --AC_SUBST([girdir], [${datadir}/gir-1.0]) --AC_SUBST([typelibsdir], [${libdir}/girepository-1.0]) -- - AC_SUBST([rootrundir],[${with_rootrundir}]) - --# ------------------------------------------------------------------------------ -- --GOBJECT_INTROSPECTION_CHECK([1.31.1]) --AM_CONDITIONAL([HAVE_INTROSPECTION], [test "$enable_introspection" = "yes"]) -- - # ------------------------------------------------------------------------------ - AC_ARG_ENABLE([programs], - AS_HELP_STRING([--disable-programs], [disable programs (udevd, udevadm and helpers)]), -@@ -349,9 +340,6 @@ AC_MSG_RESULT([ - - pkgconfiglibdir: ${libdir}/pkgconfig - sharepkgconfigdir ${datadir}/pkgconfig -- -- girdir ${datadir}/gir-1.0 -- typelibsdir ${libdir}/girepository-1.0 - ]) - - # ------------------------------------------------------------------------------ -diff --git a/m4/introspection.m4 b/m4/introspection.m4 -deleted file mode 100644 -index d89c3d907d9c..000000000000 ---- a/m4/introspection.m4 -+++ /dev/null -@@ -1,96 +0,0 @@ --dnl -*- mode: autoconf -*- --dnl Copyright 2009 Johan Dahlin --dnl --dnl This file is free software; the author(s) gives unlimited --dnl permission to copy and/or distribute it, with or without --dnl modifications, as long as this notice is preserved. --dnl -- --# serial 1 -- --m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL], --[ -- AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first -- AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first -- AC_BEFORE([LT_INIT],[$0])dnl setup libtool first -- -- dnl enable/disable introspection -- m4_if([$2], [require], -- [dnl -- enable_introspection=yes -- ],[dnl -- AC_ARG_ENABLE(introspection, -- AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]], -- [Enable introspection for this build]),, -- [enable_introspection=auto]) -- ])dnl -- -- AC_MSG_CHECKING([for gobject-introspection]) -- -- dnl presence/version checking -- AS_CASE([$enable_introspection], -- [no], [dnl -- found_introspection="no (disabled, use --enable-introspection to enable)" -- ],dnl -- [yes],[dnl -- PKG_CHECK_EXISTS([gobject-introspection-1.0],, -- AC_MSG_ERROR([gobject-introspection-1.0 is not installed])) -- PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], -- found_introspection=yes, -- AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME])) -- ],dnl -- [auto],[dnl -- PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no) -- dnl Canonicalize enable_introspection -- enable_introspection=$found_introspection -- ],dnl -- [dnl -- AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@]) -- ])dnl -- -- AC_MSG_RESULT([$found_introspection]) -- -- INTROSPECTION_SCANNER= -- INTROSPECTION_COMPILER= -- INTROSPECTION_GENERATE= -- INTROSPECTION_GIRDIR= -- INTROSPECTION_TYPELIBDIR= -- if test "x$found_introspection" = "xyes"; then -- INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` -- INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` -- INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` -- INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` -- INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" -- INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` -- INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` -- INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection -- fi -- AC_SUBST(INTROSPECTION_SCANNER) -- AC_SUBST(INTROSPECTION_COMPILER) -- AC_SUBST(INTROSPECTION_GENERATE) -- AC_SUBST(INTROSPECTION_GIRDIR) -- AC_SUBST(INTROSPECTION_TYPELIBDIR) -- AC_SUBST(INTROSPECTION_CFLAGS) -- AC_SUBST(INTROSPECTION_LIBS) -- AC_SUBST(INTROSPECTION_MAKEFILE) -- -- AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes") --]) -- -- --dnl Usage: --dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version]) -- --AC_DEFUN([GOBJECT_INTROSPECTION_CHECK], --[ -- _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1]) --]) -- --dnl Usage: --dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version]) -- -- --AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE], --[ -- _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require]) --]) --- -2.35.1 - diff --git a/meta/recipes-core/udev/eudev/netifnames.patch b/meta/recipes-core/udev/eudev/netifnames.patch new file mode 100644 index 0000000000..4f8e54d12d --- /dev/null +++ b/meta/recipes-core/udev/eudev/netifnames.patch @@ -0,0 +1,17 @@ +eudev: consider ID_NET_NAME_MAC as an interface name + +eudev might not create names based on slot or path. + +Upstream-Status: Backport [github.com/eudev-project/eudev/pull/274] + +Signed-off-by: Joe Slater <joe.slater@windriver.com> + +--- a/rules/80-net-name-slot.rules ++++ b/rules/80-net-name-slot.rules +@@ -10,5 +10,6 @@ ENV{net.ifnames}=="0", GOTO="net_name_sl + NAME=="", ENV{ID_NET_NAME_ONBOARD}!="", NAME="$env{ID_NET_NAME_ONBOARD}" + NAME=="", ENV{ID_NET_NAME_SLOT}!="", NAME="$env{ID_NET_NAME_SLOT}" + NAME=="", ENV{ID_NET_NAME_PATH}!="", NAME="$env{ID_NET_NAME_PATH}" ++NAME=="", ENV{ID_NET_NAME_MAC}!="", NAME="$env{ID_NET_NAME_MAC}" + + LABEL="net_name_slot_end" diff --git a/meta/recipes-core/udev/eudev_3.2.11.bb b/meta/recipes-core/udev/eudev_3.2.14.bb index bc2c77de89..0e5610f77c 100644 --- a/meta/recipes-core/udev/eudev_3.2.11.bb +++ b/meta/recipes-core/udev/eudev_3.2.14.bb @@ -9,18 +9,17 @@ DEPENDS = "gperf-native" PROVIDES = "udev" -SRC_URI = "https://github.com/eudev-project/${BPN}/releases/download/v${PV}/${BP}.tar.gz \ +SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${BP}.tar.gz \ + file://netifnames.patch \ file://init \ file://local.rules \ - file://0001-build-Remove-dead-g-i-r-configuration.patch \ -" + " -SRC_URI[sha256sum] = "19847cafec67897da855fde56f9dc7d92e21c50e450aa79068a7e704ed44558b" +SRC_URI[sha256sum] = "8da4319102f24abbf7fff5ce9c416af848df163b29590e666d334cc1927f006f" -UPSTREAM_CHECK_URI = "https://github.com/eudev-project/eudev/releases" -UPSTREAM_CHECK_REGEX = "eudev-(?P<pver>\d+(\.\d+)+)\.tar" +GITHUB_BASE_URI = "https://github.com/eudev-project/eudev/releases" -inherit autotools update-rc.d qemu pkgconfig features_check manpages +inherit autotools update-rc.d qemu pkgconfig features_check manpages github-releases CONFLICT_DISTRO_FEATURES = "systemd" @@ -43,15 +42,17 @@ PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux" do_install:append() { install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev + install -m 0755 ${UNPACKDIR}/init ${D}${sysconfdir}/init.d/udev sed -i s%@UDEVD@%${base_sbindir}/udevd% ${D}${sysconfdir}/init.d/udev sed -i s%@KMOD@%${base_bindir}/kmod% ${D}${sysconfdir}/init.d/udev install -d ${D}${sysconfdir}/udev/rules.d - install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules + install -m 0644 ${UNPACKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules - # Use classic network interface naming scheme - touch ${D}${sysconfdir}/udev/rules.d/80-net-name-slot.rules + # Use classic network interface naming scheme if no 'pni-names' distro feature + if ${@bb.utils.contains('DISTRO_FEATURES', 'pni-names', 'false', 'true', d)}; then + touch ${D}${sysconfdir}/udev/rules.d/80-net-name-slot.rules + fi } do_install:prepend:class-target () { diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh b/meta/recipes-core/udev/udev-extraconf/mount.sh index 8b6ce77741..c19e2aa68a 100644 --- a/meta/recipes-core/udev/udev-extraconf/mount.sh +++ b/meta/recipes-core/udev/udev-extraconf/mount.sh @@ -36,15 +36,28 @@ do fi done +is_filesystem_supported() { + while read -r fs; do + if [ "${fs#nodev}" = "$1" ]; + then + return 0 + fi + done < "/proc/filesystems" + return 1 +} + automount_systemd() { name="`basename "$DEVNAME"`" # Skip already mounted partitions - if [ -f /run/systemd/transient/run-media-$name.mount ]; then + if [ -f /run/systemd/transient/$(echo $MOUNT_BASE | cut -d '/' -f 2- | sed 's#/#-#g')-*$name.mount ]; then logger "mount.sh/automount" "$MOUNT_BASE/$name already mounted" return fi + # Get the unique name for mount point + get_label_name "${DEVNAME}" + # Only go for auto-mounting when the device has been cleaned up in remove # or has not been identified yet if [ -e "/tmp/.automount-$name" ]; then @@ -61,8 +74,10 @@ automount_systemd() { grep "^[[:space:]]*$tmp" /etc/fstab && return done - # Get the unique name for mount point - get_label_name "${DEVNAME}" + if ! is_filesystem_supported $ID_FS_TYPE; then + logger "mount.sh/automount" "Filesystem '$ID_FS_TYPE' on '${DEVNAME}' is unsupported" + return + fi [ -d "$MOUNT_BASE/$name" ] || mkdir -p "$MOUNT_BASE/$name" @@ -89,7 +104,7 @@ automount_systemd() { rm_dir "$MOUNT_BASE/$name" else logger "mount.sh/automount" "Auto-mount of [$MOUNT_BASE/$name] successful" - touch "/tmp/.automount-$name" + echo "$name" > "/tmp/.automount-$name" fi } @@ -196,7 +211,7 @@ if [ "$ACTION" = "remove" ] || [ "$ACTION" = "change" ] && [ -x "$UMOUNT" ] && [ logger "mount.sh/remove" "cleaning up $DEVNAME, was mounted by the auto-mounter" for mnt in `cat /proc/mounts | grep "$DEVNAME" | cut -f 2 -d " " ` do - $UMOUNT $mnt + $UMOUNT "`printf $mnt`" done # Remove mount directory created by the auto-mounter # and clean up our tmp cache file diff --git a/meta/recipes-core/udev/udev-extraconf/systemd-udevd.service b/meta/recipes-core/udev/udev-extraconf/systemd-udevd.service deleted file mode 100644 index a9b86eb6e4..0000000000 --- a/meta/recipes-core/udev/udev-extraconf/systemd-udevd.service +++ /dev/null @@ -1,3 +0,0 @@ -.include @systemd_unitdir@/system/systemd-udevd.service -[Service] -MountFlags=shared diff --git a/meta/recipes-core/udev/udev-extraconf_1.1.bb b/meta/recipes-core/udev/udev-extraconf_1.1.bb index ef6019259e..a3e5d12b81 100644 --- a/meta/recipes-core/udev/udev-extraconf_1.1.bb +++ b/meta/recipes-core/udev/udev-extraconf_1.1.bb @@ -11,7 +11,6 @@ SRC_URI = " \ file://autonet.rules \ file://network.sh \ file://localextra.rules \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'file://systemd-udevd.service', '', d)} \ " S = "${WORKDIR}" @@ -21,31 +20,36 @@ MOUNT_BASE = "/run/media" do_install() { install -d ${D}${sysconfdir}/udev/rules.d - install -m 0644 ${WORKDIR}/automount.rules ${D}${sysconfdir}/udev/rules.d/automount.rules - install -m 0644 ${WORKDIR}/autonet.rules ${D}${sysconfdir}/udev/rules.d/autonet.rules - install -m 0644 ${WORKDIR}/localextra.rules ${D}${sysconfdir}/udev/rules.d/localextra.rules + install -m 0644 ${S}/automount.rules ${D}${sysconfdir}/udev/rules.d/automount.rules + install -m 0644 ${S}/autonet.rules ${D}${sysconfdir}/udev/rules.d/autonet.rules + install -m 0644 ${S}/localextra.rules ${D}${sysconfdir}/udev/rules.d/localextra.rules install -d ${D}${sysconfdir}/udev/mount.ignorelist.d - install -m 0644 ${WORKDIR}/mount.ignorelist ${D}${sysconfdir}/udev/ + install -m 0644 ${S}/mount.ignorelist ${D}${sysconfdir}/udev/ install -d ${D}${sysconfdir}/udev/scripts/ - install -m 0755 ${WORKDIR}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh + install -m 0755 ${S}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh sed -i 's|@systemd_unitdir@|${systemd_unitdir}|g' ${D}${sysconfdir}/udev/scripts/mount.sh sed -i 's|@base_sbindir@|${base_sbindir}|g' ${D}${sysconfdir}/udev/scripts/mount.sh sed -i 's|@MOUNT_BASE@|${MOUNT_BASE}|g' ${D}${sysconfdir}/udev/scripts/mount.sh - install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts + install -m 0755 ${S}/network.sh ${D}${sysconfdir}/udev/scripts +} + +pkg_postinst:${PN} () { + if [ -e $D${systemd_unitdir}/system/systemd-udevd.service ]; then + sed -i "/\[Service\]/aMountFlags=shared" $D${systemd_unitdir}/system/systemd-udevd.service + fi +} - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -d ${D}${sysconfdir}/systemd/system - install ${WORKDIR}/systemd-udevd.service ${D}${sysconfdir}/systemd/system/systemd-udevd.service - sed -i 's|@systemd_unitdir@|${systemd_unitdir}|g' ${D}${sysconfdir}/systemd/system/systemd-udevd.service - fi +pkg_postrm:${PN} () { + if [ -e $D${systemd_unitdir}/system/systemd-udevd.service ]; then + sed -i "/MountFlags=shared/d" $D${systemd_unitdir}/system/systemd-udevd.service + fi } -FILES:${PN} = "${sysconfdir}/udev ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${sysconfdir}/systemd/system/systemd-udevd.service', '', d)}" -RDEPENDS:${PN} = "udev util-linux-blkid" +RDEPENDS:${PN} = "udev util-linux-blkid ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'util-linux-lsblk', '', d)}" CONFFILES:${PN} = "${sysconfdir}/udev/mount.ignorelist" # to replace udev-extra-rules from meta-oe |