temp/eudev: fork from Alpine to remove /sbin/udevadm symlink
The presence of udevadm in both /bin/ and /sbin/ causes usr-merge to assume a binary conflict and fail. I actually tried fixing this issue upstream quite a few months ago to fix an unrelated issue I was having with the package, but it was rejected. Therefore, this can only be handled downstream. Signed-off-by: Aster Boese <asterboese@mailbox.org> [ci:skip-vercheck] Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/9160>
This commit is contained in:
@@ -0,0 +1,42 @@
|
|||||||
|
From 917ae648f61681257000c3a1f0aca3fbd646563a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Johannes Nixdorf <mixi@shadowice.org>
|
||||||
|
Date: Fri, 22 Dec 2023 10:27:08 +0100
|
||||||
|
Subject: [PATCH] 78-sound-card.rules: Import ID_PATH early
|
||||||
|
|
||||||
|
Pipewire requires ID_PATH to use the same device names as with systemd's
|
||||||
|
udev. Some rules, such as the ones in asahi-audio [1] use those names, and
|
||||||
|
fail if they don't match [2].
|
||||||
|
|
||||||
|
On systemd's udev this is instead imported in 71-seat.rules, which we don't
|
||||||
|
have.
|
||||||
|
|
||||||
|
[1]: https://github.com/AsahiLinux/asahi-audio
|
||||||
|
[2]: https://github.com/AsahiLinux/asahi-audio/issues/16
|
||||||
|
|
||||||
|
Signed-off-by: Johannes Nixdorf <mixi@shadowice.org>
|
||||||
|
---
|
||||||
|
rules/78-sound-card.rules | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/rules/78-sound-card.rules b/rules/78-sound-card.rules
|
||||||
|
index f2fc27739..c49bd1d4e 100644
|
||||||
|
--- a/rules/78-sound-card.rules
|
||||||
|
+++ b/rules/78-sound-card.rules
|
||||||
|
@@ -38,6 +38,8 @@ KERNEL!="card*", GOTO="sound_end"
|
||||||
|
ENV{SOUND_INITIALIZED}="1"
|
||||||
|
|
||||||
|
IMPORT{builtin}="hwdb"
|
||||||
|
+IMPORT{builtin}="path_id"
|
||||||
|
+
|
||||||
|
SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id"
|
||||||
|
SUBSYSTEMS=="usb", GOTO="skip_pci"
|
||||||
|
|
||||||
|
@@ -62,8 +64,6 @@ LABEL="skip_pci"
|
||||||
|
ENV{ID_SERIAL}=="?*", ENV{ID_USB_INTERFACE_NUM}=="?*", ENV{ID_ID}="$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_USB_INTERFACE_NUM}"
|
||||||
|
ENV{ID_SERIAL}=="?*", ENV{ID_USB_INTERFACE_NUM}=="", ENV{ID_ID}="$env{ID_BUS}-$env{ID_SERIAL}"
|
||||||
|
|
||||||
|
-IMPORT{builtin}="path_id"
|
||||||
|
-
|
||||||
|
# The values used here for $SOUND_FORM_FACTOR and $SOUND_CLASS should be kept
|
||||||
|
# in sync with those defined for PulseAudio's src/pulse/proplist.h
|
||||||
|
# PA_PROP_DEVICE_FORM_FACTOR, PA_PROP_DEVICE_CLASS properties.
|
||||||
@@ -0,0 +1,123 @@
|
|||||||
|
# Forked from Alpine to remove symlink in /sbin/udevadm
|
||||||
|
|
||||||
|
maintainer="Aster Boese <asterboese@mailbox.org>"
|
||||||
|
pkgname=eudev
|
||||||
|
_pkgver=3.2.14
|
||||||
|
pkgver=9999.$_pkgver
|
||||||
|
__pkgver=${_pkgver/_pre/-pre}
|
||||||
|
pkgrel=7
|
||||||
|
pkgdesc="init system agnostic fork of systemd-udev"
|
||||||
|
url="https://github.com/eudev-project/eudev"
|
||||||
|
arch="all"
|
||||||
|
license="GPL-2.0-or-later"
|
||||||
|
depends="udev-init-scripts"
|
||||||
|
replaces="udev"
|
||||||
|
provides="udev=176"
|
||||||
|
provider_priority=100
|
||||||
|
makedepends="
|
||||||
|
gperf
|
||||||
|
glib-dev
|
||||||
|
linux-headers
|
||||||
|
kmod-dev
|
||||||
|
gobject-introspection-dev
|
||||||
|
util-linux-dev
|
||||||
|
"
|
||||||
|
checkdepends="tree xz perl"
|
||||||
|
subpackages="$pkgname-doc $pkgname-openrc
|
||||||
|
$pkgname-netifnames::noarch $pkgname-rule-generator::noarch $pkgname-hwids"
|
||||||
|
triggers="eudev.trigger=/usr/lib/udev/rules.d eudev-hwids.trigger=/lib/udev/hwdb.d:/usr/lib/udev/hwdb.d"
|
||||||
|
source="https://github.com/eudev-project/eudev/releases/download/v$__pkgver/eudev-$__pkgver.tar.gz
|
||||||
|
load-fbcon.patch
|
||||||
|
no-sgx.patch
|
||||||
|
78-sound-card.rules_Import_ID_PATH_early.patch
|
||||||
|
udev-postmount.initd
|
||||||
|
"
|
||||||
|
builddir="$srcdir"/"$pkgname"-"$__pkgver"
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
default_prepare
|
||||||
|
update_config_sub
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
CFLAGS="$CFLAGS -flto=auto" \
|
||||||
|
./configure \
|
||||||
|
--build=$CBUILD \
|
||||||
|
--host=$CHOST \
|
||||||
|
--prefix=/usr \
|
||||||
|
--sysconfdir=/etc \
|
||||||
|
--mandir=/usr/share/man \
|
||||||
|
--localstatedir=/var \
|
||||||
|
--enable-manpages \
|
||||||
|
--enable-kmod \
|
||||||
|
--bindir=/bin \
|
||||||
|
--sbindir=/sbin
|
||||||
|
make
|
||||||
|
}
|
||||||
|
|
||||||
|
check() {
|
||||||
|
make check
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
make DESTDIR="$pkgdir" sharepkgconfigdir=/usr/lib/pkgconfig \
|
||||||
|
install
|
||||||
|
|
||||||
|
install -Dm755 "$srcdir"/udev-postmount.initd \
|
||||||
|
"$pkgdir"/etc/init.d/udev-postmount
|
||||||
|
|
||||||
|
# Remove illogical symlink
|
||||||
|
rm "$pkgdir"/sbin/udevadm
|
||||||
|
|
||||||
|
# Remove files from -dev and -libs since we cannot provide them without
|
||||||
|
# overriding the systemd provides. Ensure that if these files change on
|
||||||
|
# upgrade the deletion command is changed to reflect that. (eudev will
|
||||||
|
# never update, but that disclaimer is still important)
|
||||||
|
rm "$pkgdir"/usr/lib/libudev.a
|
||||||
|
rm "$pkgdir"/usr/lib/libudev.so
|
||||||
|
rm "$pkgdir"/usr/lib/libudev.so.1
|
||||||
|
rm "$pkgdir"/usr/lib/libudev.so.1.6.3
|
||||||
|
rm "$pkgdir"/usr/lib/pkgconfig/libudev.pc
|
||||||
|
rm "$pkgdir"/usr/lib/pkgconfig/udev.pc
|
||||||
|
rm -r "$pkgdir"/usr/include/
|
||||||
|
}
|
||||||
|
|
||||||
|
netifnames() {
|
||||||
|
pkgdesc="udev rules for systemd-style interface names"
|
||||||
|
depends="!$pkgname-rule-generator"
|
||||||
|
|
||||||
|
amove usr/lib/udev/rules.d/80-net-name-slot.rules
|
||||||
|
}
|
||||||
|
|
||||||
|
generator() {
|
||||||
|
pkgdesc="generate udev net persistance rules"
|
||||||
|
depends="!$pkgname-netifnames"
|
||||||
|
|
||||||
|
# Since we didn't enable rules-generator which disables netifnames, we
|
||||||
|
# install the rule-generator files.
|
||||||
|
sed -i 's/"write_net_rules"/"\/usr\/lib\/udev\/rule_generator\/write_net_rules"/' \
|
||||||
|
"$builddir"/rule_generator/75-persistent-net-generator.rules
|
||||||
|
install -Dm644 "$builddir"/rule_generator/75-persistent-net-generator.rules \
|
||||||
|
"$subpkgdir"/usr/lib/udev/rules.d/75-persistent-net-generator.rules
|
||||||
|
install -Dm755 "$builddir"/rule_generator/write_net_rules \
|
||||||
|
"$subpkgdir"/usr/lib/udev/rule_generator/write_net_rules
|
||||||
|
install -Dm755 "$builddir"/rule_generator/rule_generator.functions \
|
||||||
|
"$subpkgdir"/usr/lib/udev/rule_generator.functions
|
||||||
|
}
|
||||||
|
|
||||||
|
hwids() {
|
||||||
|
pkgdesc="Hardware identification databases (from eudev)"
|
||||||
|
provides="hwids-udev=$pkgver-r$pkgrel"
|
||||||
|
install_if="hwdata eudev=$pkgver-r$pkgrel"
|
||||||
|
|
||||||
|
mkdir -p "$subpkgdir"/usr/lib/udev
|
||||||
|
mv -v "$pkgdir"/etc/udev/hwdb.d "$subpkgdir"/usr/lib/udev
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="
|
||||||
|
1e7593b53c5508a99fe7ff5d24d1d09b3753d9cfba086e7d8cc6ab80cc88013ec687dc4f1eac7b7889051f4e5fd5c40d2b87f5f2d948479d679c8836014d08e0 eudev-3.2.14.tar.gz
|
||||||
|
ff5928fd555e095d9f3234dd004ac4c5925405d308777e9b018e8e03112cd109935b51d75a3bc4a2a1018eb486e8a5e5ef6ee978860002a8fff93b116e9721f5 load-fbcon.patch
|
||||||
|
1558800e4132ed2c10b37805fca044ff3129cdfebec71d3e758143fab9ffda824e86d52960926a9042b21fc22f0cda8fe6690484913bd7c3dc4436af92923efe no-sgx.patch
|
||||||
|
8872f124267485d682dea9c7c47aaa8c228aadef90981c430af7ca7f7025b344d2c3c07c653241190a3f44096aa1d3aff990dd05210f5b278d999d6fede659b5 78-sound-card.rules_Import_ID_PATH_early.patch
|
||||||
|
8ef1b911843ab13acb1c1b9b7a0a5cd76659f395c3db9e579429556f23eacebb414507dc0231e2455e7589bc70054fa1e6b6dd93dd833f7101c0da0597aabf88 udev-postmount.initd
|
||||||
|
"
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
udevadm hwdb --update
|
||||||
|
|
||||||
|
exit 0
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ -S /run/udev/control ]; then
|
||||||
|
udevadm control --reload
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
--- eudev-3.2.1/rules/80-drivers.rules.orig 2017-01-24 11:00:53.174192908 +0200
|
||||||
|
+++ eudev-3.2.1/rules/80-drivers.rules 2017-01-24 11:04:01.886714118 +0200
|
||||||
|
@@ -8,6 +8,7 @@
|
||||||
|
SUBSYSTEM=="memstick", RUN{builtin}+="kmod load ms_block mspro_block"
|
||||||
|
SUBSYSTEM=="i2o", RUN{builtin}+="kmod load i2o_block"
|
||||||
|
SUBSYSTEM=="module", KERNEL=="parport_pc", RUN{builtin}+="kmod load ppdev"
|
||||||
|
+SUBSYSTEM=="graphics", RUN{builtin}+="kmod load fbcon"
|
||||||
|
KERNEL=="mtd*ro", ENV{MTD_FTL}=="smartmedia", RUN{builtin}+="kmod load sm_ftl"
|
||||||
|
|
||||||
|
LABEL="drivers_end"
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
see https://gitlab.alpinelinux.org/alpine/aports/-/issues/15043
|
||||||
|
we don't have sgx support
|
||||||
|
--
|
||||||
|
diff --git a/rules/50-udev-default.rules b/rules/50-udev-default.rules
|
||||||
|
index ff50cb8..2cbd96e 100644
|
||||||
|
--- a/rules/50-udev-default.rules
|
||||||
|
+++ b/rules/50-udev-default.rules
|
||||||
|
@@ -39,9 +39,6 @@ SUBSYSTEM=="cec", GROUP="video"
|
||||||
|
SUBSYSTEM=="drm", KERNEL=="renderD*", GROUP="video", MODE="0666"
|
||||||
|
SUBSYSTEM=="kfd", GROUP="video", MODE="0666"
|
||||||
|
|
||||||
|
-SUBSYSTEM=="misc", KERNEL=="sgx_enclave", GROUP="sgx", MODE="0660"
|
||||||
|
-SUBSYSTEM=="misc", KERNEL=="sgx_vepc", GROUP="sgx", MODE="0660"
|
||||||
|
-
|
||||||
|
# When using static_node= with non-default permissions, also update
|
||||||
|
# tmpfiles.d/static-nodes-permissions.conf.in to keep permissions synchronized.
|
||||||
|
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
#!/sbin/openrc-run
|
||||||
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
depend()
|
||||||
|
{
|
||||||
|
need localmount
|
||||||
|
keyword -vserver -lxc
|
||||||
|
}
|
||||||
|
|
||||||
|
dir_writeable()
|
||||||
|
{
|
||||||
|
touch "$1"/.test.$$ 2>/dev/null && rm "$1"/.test.$$
|
||||||
|
}
|
||||||
|
|
||||||
|
# store persistent-rules that got created while booting
|
||||||
|
# when / was still read-only
|
||||||
|
store_persistent_rules()
|
||||||
|
{
|
||||||
|
# create /etc/udev/rules.d if it does not exist and /etc/udev is writable
|
||||||
|
[ -d /etc/udev/rules.d ] || \
|
||||||
|
dir_writeable /etc/udev && \
|
||||||
|
mkdir -p /etc/udev/rules.d
|
||||||
|
|
||||||
|
# only continue if rules-directory is writable
|
||||||
|
dir_writeable /etc/udev/rules.d || return 0
|
||||||
|
|
||||||
|
local file dest
|
||||||
|
for file in /run/udev/tmp-rules--*; do
|
||||||
|
dest=${file##*tmp-rules--}
|
||||||
|
[ "$dest" = '*' ] && break
|
||||||
|
type=${dest##70-persistent-}
|
||||||
|
type=${type%%.rules}
|
||||||
|
ebegin "Saving udev persistent ${type} rules to /etc/udev/rules.d"
|
||||||
|
cat "$file" >> /etc/udev/rules.d/"$dest" && rm -f "$file"
|
||||||
|
eend $? "Failed moving persistent rules!"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
start()
|
||||||
|
{
|
||||||
|
# check if this system uses udev
|
||||||
|
[ -d /run/udev ] || return 0
|
||||||
|
|
||||||
|
# store persistent-rules that got created while booting
|
||||||
|
# when / was still read-only
|
||||||
|
store_persistent_rules
|
||||||
|
}
|
||||||
|
|
||||||
|
stop()
|
||||||
|
{
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# vim:ts=4
|
||||||
Reference in New Issue
Block a user