Compare commits

..

3 Commits

Author SHA1 Message Date
Sandino Araico Sánchez
7bafc5aeeb Merge pull request #10 from mid-kid/master
sys-fs/eudev: Few improvements
2026-06-09 19:28:13 -06:00
mid-kid
3269df212c sys-fs/eudev: Create /usr/bin/udevadm symlink
This is required now that upstream udev/logind don't care about
split-usr anymore. While elogind is doing this now, other projects might
follow suit.

Closes: https://github.com/KenjiBrown/without-systemd/issues/9
Signed-off-by: mid-kid <esteve.varela@gmail.com>
2026-06-09 14:35:32 +02:00
mid-kid
68157fa890 sys-fs/eudev: Improve net-name-slot message
And hide it with USE=rule-generator, as it's factually incorrect when
this is enabled.

Closes: https://github.com/KenjiBrown/without-systemd/issues/3
Signed-off-by: mid-kid <esteve.varela@gmail.com>
2026-06-09 14:30:23 +02:00
3 changed files with 308 additions and 12 deletions

View File

@@ -8,6 +8,7 @@ EBUILD eudev-3.2.11-r4.ebuild 7146 BLAKE2B b4961871e468c9f2f708b24be8f40f59ce54c
EBUILD eudev-3.2.11-r5.ebuild 7378 BLAKE2B 56592f5ad0382ac944821d816310987d1a8cef10e73e19a92bbd012f1cbd49ed0bc8075367ff851145dcb5270fc9f0361f946c27eee02183da3b1d05d8e0c70d SHA512 f05ebe1e069664e612e14512d8c6a181075d356baabfe32e3990773b346c66d1f648f17ff311d603b1e022c520bf492c672f249606c5169225eda8125a2e0727 EBUILD eudev-3.2.11-r5.ebuild 7378 BLAKE2B 56592f5ad0382ac944821d816310987d1a8cef10e73e19a92bbd012f1cbd49ed0bc8075367ff851145dcb5270fc9f0361f946c27eee02183da3b1d05d8e0c70d SHA512 f05ebe1e069664e612e14512d8c6a181075d356baabfe32e3990773b346c66d1f648f17ff311d603b1e022c520bf492c672f249606c5169225eda8125a2e0727
EBUILD eudev-3.2.12-r1.ebuild 7283 BLAKE2B dac57fec7b4dee0b087dec4583849f494608d9d5ee5a925dc0f5f7f0fcceaed5164d9489afbb9f74f1a68029dcc7d13e03ae2f5ff65b4544a89cac09e8d1c98d SHA512 793ffe32b13efcbd7fe4726c30dbca593a64bb294404b9b66b433c3f50215ecfda0cb371f238442adf5a66e6348b3b303b86fb0ad58b1f96c590d0dd8353cfaf EBUILD eudev-3.2.12-r1.ebuild 7283 BLAKE2B dac57fec7b4dee0b087dec4583849f494608d9d5ee5a925dc0f5f7f0fcceaed5164d9489afbb9f74f1a68029dcc7d13e03ae2f5ff65b4544a89cac09e8d1c98d SHA512 793ffe32b13efcbd7fe4726c30dbca593a64bb294404b9b66b433c3f50215ecfda0cb371f238442adf5a66e6348b3b303b86fb0ad58b1f96c590d0dd8353cfaf
EBUILD eudev-3.2.12-r2.ebuild 7382 BLAKE2B 4e5b50d987a7433358b9b1c636723efb1809576b8b0bd5e0694ba64fa490abf4dafea0663a2eaa122b815b284816c4ea55d9a4092adedd339741b5f0637b5491 SHA512 c72a3f935a753f2c9c4226e6e0e34e07220fb04db7b141b3134346d9714732324632c87ed14589ee1af5dc6b18151e08e401ac035ff523ae381a91e592dbd22f EBUILD eudev-3.2.12-r2.ebuild 7382 BLAKE2B 4e5b50d987a7433358b9b1c636723efb1809576b8b0bd5e0694ba64fa490abf4dafea0663a2eaa122b815b284816c4ea55d9a4092adedd339741b5f0637b5491 SHA512 c72a3f935a753f2c9c4226e6e0e34e07220fb04db7b141b3134346d9714732324632c87ed14589ee1af5dc6b18151e08e401ac035ff523ae381a91e592dbd22f
EBUILD eudev-3.2.14.ebuild 7323 BLAKE2B 2a127623252a51ed493195a060315c065e9187e10d5bb33daeb773b6a3cfe030707b948fa4d4635ef6c7456f07bb098f7b5e3a7a8bf2c39ca206155ae0d5215e SHA512 bd5954fc593127e55a47ee0311a019177c8f2d2af2869cb451b63ffa119781115585abc6f7163a5a4b158d0f024ef58bfd6ec0b8da30574681e4c6c39eb5a790 EBUILD eudev-3.2.14-r1.ebuild 7742 BLAKE2B 29872b98d4a7371bd84e3bed50c9ee7a210e1fc79344f92102a83faad00d5d2b5427e6341742790fd12f1ecfb3216d1a0d2a3fa0091cb8b30aad064c3123707c SHA512 3177721e2ba1ae1eb5dabca17ed12fec84e0be30a4028b2f53fbaf51696e239d12467e36508af66bd4d4c3697dc62efe5fda1cedee530fbd30796c096d919183
EBUILD eudev-3.2.14.ebuild 7391 BLAKE2B c08c04bf56e0116b879a8d7d3e3d8150b405616df5c72cd2e9a7fe561b3d1638c88de03e69ad3756e0eb870e1c9b43ff88d761501c68dec5d7a3e626ea3eea1b SHA512 d2b4433ddaa668e7a52cd61be7def6ae21080541500b67c90c5c46be28a17f528d79d2a019dec4c42c688a5d7d9a590811e897e971610c01fb48a4a5811682e9
EBUILD eudev-9999.ebuild 7350 BLAKE2B 039c5b9fdaa82e2285a99561c3ebd9a4abbd81de6b566e485dc1e881ca6e9d76860aa6ab53f51f3af04600f66b610a18055b4469e87ed6229e5cfe977a225801 SHA512 c3b43c27a763cf4ef33a732379f9c1c5a6ffa4ebc0d7776ef0844f5eee98e3e45e61c3b40b26ff64cc908057f907357ed6c6a91895fb93f1f6d824387be4775c EBUILD eudev-9999.ebuild 7350 BLAKE2B 039c5b9fdaa82e2285a99561c3ebd9a4abbd81de6b566e485dc1e881ca6e9d76860aa6ab53f51f3af04600f66b610a18055b4469e87ed6229e5cfe977a225801 SHA512 c3b43c27a763cf4ef33a732379f9c1c5a6ffa4ebc0d7776ef0844f5eee98e3e45e61c3b40b26ff64cc908057f907357ed6c6a91895fb93f1f6d824387be4775c
MISC metadata.xml 629 BLAKE2B c67407dd805c6e8d4fb0c5152e897263ca56649d1d5c7692c74a69a751e7824a2b6084fe1ce0f8cd1b13dbdd0ae3f082430d6552807690a9d52d83c907f43f64 SHA512 204a04a68ee53fe8fec226ad82fdbb3f2ee478f538379466343bbf55fd0146a71889ac11742d59261ef954bb9b8e09e8d2b9416079da63cc78ab400efd2ba49b MISC metadata.xml 629 BLAKE2B c67407dd805c6e8d4fb0c5152e897263ca56649d1d5c7692c74a69a751e7824a2b6084fe1ce0f8cd1b13dbdd0ae3f082430d6552807690a9d52d83c907f43f64 SHA512 204a04a68ee53fe8fec226ad82fdbb3f2ee478f538379466343bbf55fd0146a71889ac11742d59261ef954bb9b8e09e8d2b9416079da63cc78ab400efd2ba49b

View File

@@ -0,0 +1,291 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
KV_MIN=2.6.39
inherit autotools linux-info multilib-minimal toolchain-funcs udev
if [[ ${PV} = 9999* ]]; then
EGIT_REPO_URI="https://github.com/eudev-project/eudev.git"
inherit git-r3
else
MY_PV=${PV/_pre/-pre}
SRC_URI="https://github.com/eudev-project/eudev/releases/download/v${MY_PV}/${PN}-${MY_PV}.tar.gz"
S="${WORKDIR}"/${PN}-${MY_PV}
if [[ ${PV} != *_pre* ]] ; then
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
fi
fi
DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
HOMEPAGE="https://github.com/eudev-project/eudev"
LICENSE="LGPL-2.1 MIT GPL-2"
SLOT="0"
IUSE="+kmod rule-generator selinux split-usr static-libs test"
RESTRICT="!test? ( test )"
DEPEND="
>=sys-apps/util-linux-2.20
>=sys-kernel/linux-headers-${KV_MIN}
virtual/libcrypt:=
kmod? ( >=sys-apps/kmod-16 )
selinux? ( >=sys-libs/libselinux-2.1.9 )
!sys-apps/gentoo-systemd-integration
!sys-apps/systemd
"
RDEPEND="
${DEPEND}
acct-group/input
acct-group/kvm
acct-group/render
acct-group/audio
acct-group/cdrom
acct-group/dialout
acct-group/disk
acct-group/floppy
acct-group/input
acct-group/kmem
acct-group/kvm
acct-group/lp
acct-group/render
acct-group/sgx
acct-group/tape
acct-group/tty
acct-group/usb
acct-group/video
!sys-apps/systemd-utils[udev]
!sys-fs/udev
!sys-apps/systemd
!sys-apps/hwids[udev]
"
BDEPEND="
dev-util/gperf
virtual/os-headers
virtual/pkgconfig
test? (
app-text/tree
dev-lang/perl
)
"
PDEPEND=">=sys-fs/udev-init-scripts-26"
MULTILIB_WRAPPED_HEADERS=(
/usr/include/udev.h
)
pkg_pretend() {
if ! use rule-generator; then
ewarn
ewarn "As of 2013-01-29, ${PN} provides the new interface renaming functionality,"
ewarn "as described in the URL below:"
ewarn "https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames"
ewarn
ewarn "If you wish to disable this new iface naming, please be sure that"
ewarn "/etc/udev/rules.d/80-net-name-slot.rule exists:"
ewarn "# touch /etc/udev/rules.d/80-net-name-slot.rules"
ewarn
ewarn "Alternatively, consider USE=rule-generator, as a way to create persistent"
ewarn "iface naming. You don't need to create 80-net-name-slot.rules in this case."
ewarn
fi
}
pkg_setup() {
CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2 ~SIGNALFD ~EPOLL ~FHANDLE ~NET ~UNIX"
linux-info_pkg_setup
get_running_version
# These are required kernel options, but we don't error out on them
# because you can build under one kernel and run under another.
if kernel_is lt ${KV_MIN//./ }; then
ewarn
ewarn "Your current running kernel version ${KV_FULL} is too old to run ${P}."
ewarn "Make sure to run udev under kernel version ${KV_MIN} or above."
ewarn
fi
}
src_prepare() {
default
# Change rules back to group uucp instead of dialout for now
sed -e 's/GROUP="dialout"/GROUP="uucp"/' -i rules/*.rules \
|| die "failed to change group dialout to uucp"
# required for the sticky-tags patch
#if [[ ${PV} == 9999* ]] ; then
eautoreconf
#fi
}
rootprefix() {
usex split-usr '' /usr
}
sbindir() {
usex split-usr sbin bin
}
multilib_src_configure() {
# bug #463846
tc-export CC
# bug #502950
export cc_cv_CFLAGS__flto=no
local myeconfargs=(
ac_cv_search_cap_init=
ac_cv_header_sys_capability_h=yes
DBUS_CFLAGS=' '
DBUS_LIBS=' '
--with-rootprefix="${EPREFIX}$(rootprefix)"
--with-rootrundir=/run
--exec-prefix="${EPREFIX}"
--bindir="${EPREFIX}$(rootprefix)/bin"
--sbindir="${EPREFIX}$(rootprefix)/$(sbindir)"
--includedir="${EPREFIX}"/usr/include
--libdir="${EPREFIX}/usr/$(get_libdir)"
--with-rootlibexecdir="${EPREFIX}$(rootprefix)/lib/udev"
$(use_enable split-usr)
--enable-manpages
)
# Only build libudev for non-native_abi, and only install it to libdir,
# that means all options only apply to native_abi
if multilib_is_native_abi ; then
myeconfargs+=(
--with-rootlibdir="${EPREFIX}$(rootprefix)/$(get_libdir)"
$(use_enable kmod)
$(use_enable static-libs static)
$(use_enable selinux)
$(use_enable rule-generator)
)
else
myeconfargs+=(
--disable-static
--disable-kmod
--disable-selinux
--disable-rule-generator
--disable-hwdb
)
fi
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
}
multilib_src_compile() {
if multilib_is_native_abi ; then
emake
else
emake -C src/shared
emake -C src/libudev
fi
}
multilib_src_test() {
# Make sandbox get out of the way.
# These are safe because there is a fake root filesystem put in place,
# but sandbox seems to evaluate the paths of the test i/o instead of the
# paths of the actual i/o that results. Also only test for native abi
if multilib_is_native_abi ; then
addread /sys
addwrite /dev
addwrite /run
default
fi
}
multilib_src_install() {
if multilib_is_native_abi ; then
emake DESTDIR="${D}" install
else
emake -C src/libudev DESTDIR="${D}" install
fi
}
multilib_src_install_all() {
find "${ED}" -name '*.la' -delete || die
insinto "$(rootprefix)/lib/udev/rules.d"
doins "${FILESDIR}"/40-gentoo.rules
use rule-generator && doinitd "${FILESDIR}"/udev-postmount
# Create symlinks for split-usr
# While sys-fs/udev-init-scripts still uses /sbin/udevd, it makes no sense
# to move everything to /usr yet. Other udev rules will also still depend
# on this for the time being.
if use split-usr; then
# sys-auth/elogind requires /usr/bin/udevadm in 71-seat.rules
dosym ../../bin/udevadm /usr/bin/udevadm
fi
}
pkg_postrm() {
udev_reload
}
pkg_postinst() {
udev_reload
mkdir -p "${EROOT}"/run
# "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766
# So try to remove it here (will only work if empty).
rmdir "${EROOT}"/dev/loop 2>/dev/null
if [[ -d ${EROOT}/dev/loop ]]; then
ewarn "Please make sure your remove /dev/loop,"
ewarn "else losetup may be confused when looking for unused devices."
fi
# REPLACING_VERSIONS should only ever have zero or 1 values but in case it doesn't,
# process it as a list. We only care about the zero case (new install) or the case where
# the same version is being re-emerged. If there is a second version, allow it to abort.
local rv rvres=doitnew
for rv in ${REPLACING_VERSIONS} ; do
if [[ ${rvres} == doit* ]]; then
if [[ ${rv%-r*} == ${PV} ]]; then
rvres=doit
else
rvres=${rv}
fi
fi
done
if has_version 'sys-apps/hwids[udev]'; then
udevadm hwdb --update --root="${ROOT}"
# https://cgit.freedesktop.org/systemd/systemd/commit/?id=1fab57c209035f7e66198343074e9cee06718bda
# reload database after it has be rebuilt, but only if we are not upgrading
# also pass if we are -9999 since who knows what hwdb related changes there might be
if [[ ${rvres} == doit* ]] && [[ -z ${ROOT} ]] && [[ ${PV} != "9999" ]]; then
udevadm control --reload
fi
fi
if [[ ${rvres} != doitnew ]]; then
ewarn
ewarn "You need to restart eudev as soon as possible to make the"
ewarn "upgrade go into effect:"
ewarn "\t/etc/init.d/udev --nodeps restart"
fi
if use rule-generator && \
[[ -x $(type -P rc-update) ]] && rc-update show | grep udev-postmount | grep -qsv 'boot\|default\|sysinit'; then
ewarn
ewarn "Please add the udev-postmount init script to your default runlevel"
ewarn "to ensure the legacy rule-generator functionality works as reliably"
ewarn "as possible."
ewarn "\trc-update add udev-postmount default"
fi
elog
elog "For more information on eudev on Gentoo, writing udev rules, and"
elog "fixing known issues visit: https://wiki.gentoo.org/wiki/Eudev"
}

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2023 Gentoo Authors # Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=8 EAPI=8
@@ -78,16 +78,20 @@ MULTILIB_WRAPPED_HEADERS=(
) )
pkg_pretend() { pkg_pretend() {
if ! use rule-generator; then
ewarn ewarn
ewarn "As of 2013-01-29, ${PN} provides the new interface renaming functionality," ewarn "As of 2013-01-29, ${PN} provides the new interface renaming functionality,"
ewarn "as described in the URL below:" ewarn "as described in the URL below:"
ewarn "https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames" ewarn "https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames"
ewarn ewarn
ewarn "This functionality is enabled BY DEFAULT because eudev has no means of synchronizing" ewarn "If you wish to disable this new iface naming, please be sure that"
ewarn "between the default or user-modified choice of sys-fs/udev. If you wish to disable" ewarn "/etc/udev/rules.d/80-net-name-slot.rule exists:"
ewarn "this new iface naming, please be sure that /etc/udev/rules.d/80-net-name-slot.rules" ewarn "# touch /etc/udev/rules.d/80-net-name-slot.rules"
ewarn "exists: touch /etc/udev/rules.d/80-net-name-slot.rules"
ewarn ewarn
ewarn "Alternatively, consider USE=rule-generator, as a way to create persistent"
ewarn "iface naming. You don't need to create 80-net-name-slot.rules in this case."
ewarn
fi
} }
pkg_setup() { pkg_setup() {