aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Louis Fuchs <jean-louis.fuchs@adfinis-sygroup.ch>2020-03-24 20:18:08 +0100
committerLeo <thinkabit.ukim@gmail.com>2020-04-02 21:10:04 +0000
commit5c2ad881ed4726e97ec2da6c05e0324a57117f92 (patch)
treea3af8cb605e2e972f16e05c57ee1539008483eba
parentce3ab6bfb055b0b3429b075d8e0795f0829d66b1 (diff)
downloadaports-5c2ad881ed4726e97ec2da6c05e0324a57117f92.tar.gz
aports-5c2ad881ed4726e97ec2da6c05e0324a57117f92.tar.bz2
aports-5c2ad881ed4726e97ec2da6c05e0324a57117f92.tar.xz
main/eudev: add eudev-rule-generator
Allows users who want persistent ifnames to use netifnames or rule-generator
-rw-r--r--main/eudev/APKBUILD21
1 files changed, 19 insertions, 2 deletions
diff --git a/main/eudev/APKBUILD b/main/eudev/APKBUILD
index 975f01eaa9..d4f957dba3 100644
--- a/main/eudev/APKBUILD
+++ b/main/eudev/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=eudev
pkgver=3.2.9
-pkgrel=2
+pkgrel=3
pkgdesc="OpenRC compatible fork of systemd-udev"
url="https://wiki.gentoo.org/wiki/Project:Eudev"
arch="all"
@@ -14,7 +14,7 @@ makedepends="gperf glib-dev linux-headers kmod-dev gobject-introspection-dev
util-linux-dev"
checkdepends="tree xz perl"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-openrc
- $pkgname-netifnames::noarch"
+ $pkgname-netifnames::noarch $pkgname-rule-generator::noarch"
triggers="eudev.trigger=/lib/udev/rules.d:/usr/lib/udev/rules.d"
source="https://dev.gentoo.org/~blueness/eudev/eudev-$pkgver.tar.gz
default-rules.patch
@@ -77,12 +77,29 @@ libs() {
netifnames() {
pkgdesc="udev rules for systemd-style interface names"
+ depends="!$pkgname-rule-generator"
mkdir -p "$subpkgdir"/lib/udev/rules.d
mv "$pkgdir"/lib/udev/rules.d/80-net-name-slot.rules \
"$subpkgdir"/lib/udev/rules.d/
}
+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"/"\/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"/lib/udev/rules.d/75-persistent-net-generator.rules
+ install -Dm755 "$builddir"/rule_generator/write_net_rules \
+ "$subpkgdir"/lib/udev/rule_generator/write_net_rules
+ install -Dm755 "$builddir"/rule_generator/rule_generator.functions \
+ "$subpkgdir"/lib/udev/rule_generator.functions
+}
+
sha512sums="09e49fff9848e72507ef14b9d4cfab2d1443f16d5b3d54d2b0e4f6b04c471ca41f09200cb8772e9f850f0dc4a574a7ec7eede7ce11cbabda65e210a89287531f eudev-3.2.9.tar.gz
683e3c26ca4f058303f8db7d4977e436d728386ee6866719c4f11ff31db27572d3f486f51d3173310e1ec2cf995fa4c396f2415bdf45dabdd80e6e55e798a314 default-rules.patch
ff5928fd555e095d9f3234dd004ac4c5925405d308777e9b018e8e03112cd109935b51d75a3bc4a2a1018eb486e8a5e5ef6ee978860002a8fff93b116e9721f5 load-fbcon.patch