summaryrefslogtreecommitdiff
path: root/nonsystemd
diff options
context:
space:
mode:
authorDavid P <megver83@parabola.nu>2022-01-13 17:19:05 -0300
committerDavid P <megver83@parabola.nu>2022-01-13 17:19:05 -0300
commit1598c8f4e4159a2c6c8830a99f1a7ab28b71640a (patch)
tree511eb1c53f5807a1257479c70f7a066536d26739 /nonsystemd
parent2886910346d7173dbced1a28fbd8795daf743b66 (diff)
downloadabslibre-1598c8f4e4159a2c6c8830a99f1a7ab28b71640a.tar.gz
abslibre-1598c8f4e4159a2c6c8830a99f1a7ab28b71640a.tar.bz2
abslibre-1598c8f4e4159a2c6c8830a99f1a7ab28b71640a.zip
addpkg: nonsystemd/udev 250.2-1
Signed-off-by: David P <megver83@parabola.nu>
Diffstat (limited to 'nonsystemd')
-rw-r--r--nonsystemd/udev/0001-Use-Arch-Linux-device-access-groups.patch143
-rw-r--r--nonsystemd/udev/PKGBUILD246
-rw-r--r--nonsystemd/udev/initcpio-hook-udev22
-rw-r--r--nonsystemd/udev/initcpio-install-udev33
4 files changed, 444 insertions, 0 deletions
diff --git a/nonsystemd/udev/0001-Use-Arch-Linux-device-access-groups.patch b/nonsystemd/udev/0001-Use-Arch-Linux-device-access-groups.patch
new file mode 100644
index 000000000..6449c017d
--- /dev/null
+++ b/nonsystemd/udev/0001-Use-Arch-Linux-device-access-groups.patch
@@ -0,0 +1,143 @@
+From f7d07e298c819a81eab965efbdbf53a2ce67fc0e Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
+Date: Tue, 6 Mar 2018 23:39:47 +0100
+Subject: [PATCH] Use Arch Linux' device access groups
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+ cdrom → optical
+ dialout → uucp
+ tape → storage
+---
+ meson.build | 6 +++---
+ meson_options.txt | 12 ++++++------
+ rules.d/50-udev-default.rules.in | 14 +++++++-------
+ sysusers.d/basic.conf.in | 6 +++---
+ 4 files changed, 19 insertions(+), 19 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 32e5413a62..f781e06fed 100644
+--- a/meson.build
++++ b/meson.build
+@@ -796,19 +796,19 @@ conf.set_quoted('NOBODY_GROUP_NAME', nobody_group)
+ static_ugids = []
+ foreach option : ['adm-gid',
+ 'audio-gid',
+- 'cdrom-gid',
+- 'dialout-gid',
+ 'disk-gid',
+ 'input-gid',
+ 'kmem-gid',
+ 'kvm-gid',
+ 'lp-gid',
++ 'optical-gid',
+ 'render-gid',
+ 'sgx-gid',
+- 'tape-gid',
++ 'storage-gid',
+ 'tty-gid',
+ 'users-gid',
+ 'utmp-gid',
++ 'uucp-gid',
+ 'video-gid',
+ 'wheel-gid',
+ 'systemd-journal-gid',
+diff --git a/meson_options.txt b/meson_options.txt
+index 5048de755d..676e5e2e0d 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -235,10 +235,6 @@ option('adm-gid', type : 'integer', value : '-1',
+ description : 'soft-static allocation for the "adm" group')
+ option('audio-gid', type : 'integer', value : '-1',
+ description : 'soft-static allocation for the "audio" group')
+-option('cdrom-gid', type : 'integer', value : '-1',
+- description : 'soft-static allocation for the "cdrom" group')
+-option('dialout-gid', type : 'integer', value : '-1',
+- description : 'soft-static allocation for the "dialout" group')
+ option('disk-gid', type : 'integer', value : '-1',
+ description : 'soft-static allocation for the "disk" group')
+ option('input-gid', type : 'integer', value : '-1',
+@@ -249,18 +245,22 @@ option('kvm-gid', type : 'integer', value : '-1',
+ description : 'soft-static allocation for the "kvm" group')
+ option('lp-gid', type : 'integer', value : '-1',
+ description : 'soft-static allocation for the "lp" group')
++option('optical-gid', type : 'integer', value : '-1',
++ description : 'soft-static allocation for the "optical" group')
+ option('render-gid', type : 'integer', value : '-1',
+ description : 'soft-static allocation for the "render" group')
+ option('sgx-gid', type : 'integer', value : '-1',
+ description : 'soft-static allocation for the "sgx" group')
+-option('tape-gid', type : 'integer', value : '-1',
+- description : 'soft-static allocation for the "tape" group')
++option('storage-gid', type : 'integer', value : '-1',
++ description : 'soft-static allocation for the "storage" group')
+ option('tty-gid', type : 'integer', value : 5,
+ description : 'the numeric GID of the "tty" group')
+ option('users-gid', type : 'integer', value : '-1',
+ description : 'soft-static allocation for the "users" group')
+ option('utmp-gid', type : 'integer', value : '-1',
+ description : 'soft-static allocation for the "utmp" group')
++option('uucp-gid', type : 'integer', value : '-1',
++ description : 'soft-static allocation for the "uucp" group')
+ option('video-gid', type : 'integer', value : '-1',
+ description : 'soft-static allocation for the "video" group')
+ option('wheel-gid', type : 'integer', value : '-1',
+diff --git a/rules.d/50-udev-default.rules.in b/rules.d/50-udev-default.rules.in
+index 18a3cf46bf..f3c440fd89 100644
+--- a/rules.d/50-udev-default.rules.in
++++ b/rules.d/50-udev-default.rules.in
+@@ -22,7 +22,7 @@ SUBSYSTEM=="tty", KERNEL=="sclp_line[0-9]*", GROUP="tty", MODE="0620"
+ SUBSYSTEM=="tty", KERNEL=="ttysclp[0-9]*", GROUP="tty", MODE="0620"
+ SUBSYSTEM=="tty", KERNEL=="3270/tty[0-9]*", GROUP="tty", MODE="0620"
+ SUBSYSTEM=="vc", KERNEL=="vcs*|vcsa*", GROUP="tty"
+-KERNEL=="tty[A-Z]*[0-9]|ttymxc[0-9]*|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="dialout"
++KERNEL=="tty[A-Z]*[0-9]|ttymxc[0-9]*|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="uucp"
+
+ SUBSYSTEM=="mem", KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640"
+
+@@ -67,13 +67,13 @@ KERNEL=="irlpt[0-9]*", GROUP="lp"
+ SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", GROUP="lp"
+
+ SUBSYSTEM=="block", GROUP="disk"
+-SUBSYSTEM=="block", KERNEL=="sr[0-9]*", GROUP="cdrom"
+-SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom"
+-KERNEL=="sch[0-9]*", GROUP="cdrom"
+-KERNEL=="pktcdvd[0-9]*", GROUP="cdrom"
+-KERNEL=="pktcdvd", GROUP="cdrom"
++SUBSYSTEM=="block", KERNEL=="sr[0-9]*", GROUP="optical"
++SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="optical"
++KERNEL=="sch[0-9]*", GROUP="optical"
++KERNEL=="pktcdvd[0-9]*", GROUP="optical"
++KERNEL=="pktcdvd", GROUP="optical"
+
+-SUBSYSTEM=="scsi_generic|scsi_tape", SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="tape"
++SUBSYSTEM=="scsi_generic|scsi_tape", SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="storage"
+ SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="0", GROUP="disk"
+ KERNEL=="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*|nrawqft[0-9]*", GROUP="disk"
+ KERNEL=="loop-control", GROUP="disk", OPTIONS+="static_node=loop-control"
+diff --git a/sysusers.d/basic.conf.in b/sysusers.d/basic.conf.in
+index 8cc1a7cad2..21bb6d8948 100644
+--- a/sysusers.d/basic.conf.in
++++ b/sysusers.d/basic.conf.in
+@@ -22,17 +22,17 @@ g utmp {{UTMP_GID }} - -
+
+ # Physical and virtual hardware access groups
+ g audio {{AUDIO_GID }} - -
+-g cdrom {{CDROM_GID }} - -
+-g dialout {{DIALOUT_GID}} - -
+ g disk {{DISK_GID }} - -
+ g input {{INPUT_GID }} - -
+ g kmem {{KMEM_GID }} - -
+ g kvm {{KVM_GID }} - -
+ g lp {{LP_GID }} - -
++g optical {{OPTICAL_GID}} - -
+ g render {{RENDER_GID }} - -
+ g sgx {{SGX_GID }} - -
+-g tape {{TAPE_GID }} - -
++g storage {{STORAGE_GID}} - -
+ g tty {{TTY_GID }} - -
++g uucp {{UUCP_GID }} - -
+ g video {{VIDEO_GID }} - -
+
+ # Default group for normal users
diff --git a/nonsystemd/udev/PKGBUILD b/nonsystemd/udev/PKGBUILD
new file mode 100644
index 000000000..deb7c4697
--- /dev/null
+++ b/nonsystemd/udev/PKGBUILD
@@ -0,0 +1,246 @@
+# Maintainer: David P. <megver83@parabola.nu>
+# Maintainer (Artix): Artoo <artoo@artixlinux.org>
+# Contributor (Artix): Christian Hesse <mail@eworm.de>
+# Contributor (Artix): Dave Reisner <dreisner@archlinux.org>
+# Contributor (Artix): Tom Gundersen <teg@jklm.no>
+
+_pkgbase=systemd-stable
+
+pkgbase=udev
+pkgname=('udev' 'libudev' 'esysusers' 'etmpfiles')
+pkgdesc='Userspace device file manager'
+_tag='95d0353dad616c275fda9b123ba9660e16b20d0a' # git rev-parse v${_tag_name}
+_tag_name=250.2
+pkgver="${_tag_name/-/}"
+pkgrel=1
+arch=('x86_64')
+arch+=('i686' 'armv7h')
+url='https://www.github.com/systemd/systemd'
+license=('GPL2' 'LGPL2.1')
+makedepends=('acl' 'libacl.so' 'kmod' 'libkmod.so' 'util-linux' 'libblkid.so'
+ 'hwdata' 'libcap' 'libcap.so' 'kbd' 'gperf' 'intltool' 'git'
+ 'meson' 'docbook-xsl' 'rsync' 'python-jinja')
+options=('strip')
+validpgpkeys=('63CDA1E5D3FC22B998D20DD6327F26951A015CC4' # Lennart Poettering <lennart@poettering.net>
+ 'A9EA9081724FFAE0484C35A1A81CEA22BC8C7E2E' # Luca Boccassi <luca.boccassi@gmail.com>
+ '5C251B5FC54EB2F80F407AAAC54CA336CFEB557E') # Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
+_commit=29cd296aa4635fe6f7b53bda2f2cb1648bdc0782
+source=("git+https://github.com/systemd/systemd-stable#tag=${_tag}?signed"
+ "git+https://github.com/systemd/systemd#tag=v${_tag_name%.*}?signed"
+ '0001-Use-Arch-Linux-device-access-groups.patch'
+ initcpio-{hook,install}-udev
+ git+https://gitea.artixlinux.org/artix/alpm-hooks.git#commit=$_commit)
+sha512sums=('SKIP'
+ 'SKIP'
+ '10f3b477527ec263cc6465c84d94416e356435930edc9e26844a0fd4f71e87a27fa0f91ce24b43a22cacdd2ead5e760e9d607369bc537a8da8d34021302a89a1'
+ '32606b42856b5f3ea7f485143e532671f58986237e14c58ea5ab17383dc39a375cb6c738c8a2db9e4a8c8be88ea44a876d6bbed129cb2f5c9aa3f8228b04d927'
+ '38eed28d42ac8f70bc8d1058ace35f137f7f5c972442ee14b98c2146202e0615aa584304edbd59e8608d1b6bec3cb391fc69b25393740f6eabd8fc5ad3bde64f'
+ 'SKIP')
+
+_backports=(
+)
+
+_reverts=(
+)
+
+prepare() {
+ cd "$_pkgbase"
+
+ # add upstream repository for cherry-picking
+ git remote add -f upstream ../systemd
+
+ local _c
+ for _c in "${_backports[@]}"; do
+ git log --oneline -1 "${_c}"
+ git cherry-pick -n "${_c}"
+ done
+ for _c in "${_reverts[@]}"; do
+ git log --oneline -1 "${_c}"
+ git revert -n "${_c}"
+ done
+
+ # Replace cdrom/dialout/tape groups with optical/uucp/storage
+ patch -Np1 -i ../0001-Use-Arch-Linux-device-access-groups.patch
+}
+
+_get_libudev() {
+ echo "$(readlink build/libudev.so.1)"
+}
+
+_inst_bin() {
+ local bin="$1"
+
+ install -Dm755 build/systemd-"$bin".standalone "${pkgdir}"/usr/bin/"$bin"
+ install -d "${pkgdir}"/usr/lib/"$bin".d
+
+ install -d "${pkgdir}"/usr/share/{doc/"${pkgname}",man/man{5,8}}
+
+ install -m644 build/man/"$bin".d.5 "${pkgdir}"/usr/share/man/man5/
+ install -m644 build/man/systemd-"$bin".8 "${pkgdir}"/usr/share/man/man8/"$bin".8
+
+ install -m644 "$_pkgbase"/LICENSE.* "${pkgdir}"/usr/share/doc/"${pkgname}"
+}
+
+build() {
+ local _meson_options=()
+
+ _meson_options+=(
+ -Dversion-tag="${_tag_name/-/\~}-${pkgrel}-parabola"
+ -Dmode=release
+
+ -Dstandalone-binaries=true
+ -Dsysusers=true
+ -Dtmpfiles=true
+
+ -Dadm-group=true
+ -Dwheel-group=true
+ -Dgshadow=true
+ -Dhwdb=true
+ -Dblkid=true
+
+ -Dman=false
+ -Dtests=false
+
+ -Ddns-servers=''
+ -Dntp-servers=''
+ -Defi=false
+
+ -Dlink-udev-shared=false
+
+ -Dlibidn2=false
+ -Dlibidn=false
+ -Dlibcryptsetup=false
+ -Didn=false
+ -Dgcrypt=false
+ -Dlibiptc=false
+ -Dlz4=false
+ -Dp11kit=false
+ -Dseccomp=false
+ -Dxz=false
+
+ -Dtimesyncd=false
+ -Dnss-systemd=false
+ -Dnss-resolve=false
+ -Dnss-mymachines=false
+ -Dnss-myhostname=false
+ -Dnetworkd=false
+ -Dmachined=false
+ -Dtimedated=false
+ -Dkernel-install=false
+ -Dresolve=false
+ -Dxdg-autostart=false
+ )
+
+ arch-meson "$_pkgbase" build "${_meson_options[@]}"
+
+ local _udev=() _man=() _ebin=()
+
+ _udev+=(
+ $(_get_libudev)
+ src/libudev/libudev.pc
+ udevadm
+ src/udev/{ata_id,cdrom_id,fido_id,mtd_probe,dmi_memory_id,scsi_id,v4l_id}
+ src/udev/udev.pc
+ rules.d/{50-udev-default.rules,64-btrfs.rules}
+ hwdb.d/60-autosuspend-chromiumos.hwdb
+ )
+
+ _ebin+=(
+ systemd-{sysusers,tmpfiles}.standalone
+ sysusers.d/basic.conf
+ tmpfiles.d/{etc,static-nodes-permissions,var}.conf
+ )
+
+ _man+=(
+ man/{sysusers,tmpfiles}.d.5
+ man/systemd-{sysusers,tmpfiles}.8
+ man/{libudev.3,udev.conf.5,hwdb.7,udev.7,udevadm.8}
+ )
+
+ ninja -C build "${_udev[@]}" "${_ebin[@]}" "${_man[@]}"
+}
+
+package_udev() {
+ pkgdesc='Userspace device file manager'
+ depends=('acl' 'libacl.so' 'kmod' 'libkmod.so'
+ 'util-linux' 'libblkid.so' 'libudev' 'hwdata' 'kbd')
+ provides=("udev=$pkgver" 'eudev')
+ replaces=('eudev')
+
+ install -d "${pkgdir}"/etc/udev/{hwdb,rules}.d
+ mv -v "$_pkgbase"/src/udev/udev.conf "${pkgdir}"/etc/udev
+
+ install -d "${pkgdir}"/usr/bin
+ mv -v build/udevadm "${pkgdir}"/usr/bin/udevadm
+ ln -sfv udevadm "${pkgdir}"/usr/bin/udevd
+
+ install -d "${pkgdir}"/usr/{share,lib}/pkgconfig
+ mv -v build/src/libudev/libudev.pc "${pkgdir}"/usr/lib/pkgconfig
+ mv -v build/src/udev/udev.pc "${pkgdir}"/usr/share/pkgconfig
+
+ install -d "${pkgdir}"/usr/lib/udev
+ mv -v build/src/udev/{*_id,mtd_probe} "${pkgdir}"/usr/lib/udev
+
+ mv -v build/hwdb.d "${pkgdir}"/usr/lib/udev/
+ mv -v "$_pkgbase"/hwdb.d/{*.hwdb,README} "${pkgdir}"/usr/lib/udev/hwdb.d/
+ mv -v build/rules.d "${pkgdir}"/usr/lib/udev/
+ mv -v "$_pkgbase"/rules.d/{*.rules,README} "${pkgdir}"/usr/lib/udev/rules.d/
+
+ install -d "${pkgdir}"/usr/include
+ mv -v "$_pkgbase"/src/libudev/libudev.h "${pkgdir}"/usr/include
+
+ install -d "${pkgdir}"/usr/share/man/man{3,5,7,8}
+ mv -v build/man/libudev.3 "${pkgdir}"/usr/share/man/man3/
+ mv -v build/man/udev.conf.5 "${pkgdir}"/usr/share/man/man5/
+ mv -v build/man/udev.7 "${pkgdir}"/usr/share/man/man7/
+ mv -v build/man/udevadm.8 "${pkgdir}"/usr/share/man/man8/
+
+ install -d "${pkgdir}"/usr/share/doc/"${pkgname}"
+ install -m644 "$_pkgbase"/LICENSE.* "${pkgdir}"/usr/share/doc/"${pkgname}"
+
+ # initcpio
+ install -D -m0644 initcpio-install-udev "${pkgdir}"/usr/lib/initcpio/install/udev
+ install -D -m0644 initcpio-hook-udev "${pkgdir}"/usr/lib/initcpio/hooks/udev
+
+ # pacman hooks
+ make -C alpm-hooks DESTDIR="${pkgdir}" install_udev
+}
+
+package_libudev() {
+ pkgdesc='udev library for enumerating and introspecting local devices'
+ depends=('gcc-libs')
+ provides=('libudev.so' 'libeudev')
+ replaces=('libeudev')
+
+ install -d "${pkgdir}"/usr/lib
+ mv -v build/{libudev.so{,.1},$(_get_libudev)} "${pkgdir}"/usr/lib/
+}
+
+package_esysusers() {
+ pkgdesc='the sysusers.d binary'
+ groups=('base-devel')
+ depends=('gcc-libs' 'libxcrypt')
+
+ _inst_bin sysusers
+
+ mv -v build/sysusers.d/basic.conf "${pkgdir}"/usr/lib/sysusers.d
+ mv -v "$_pkgbase"/sysusers.d/README "${pkgdir}"/usr/lib/sysusers.d
+
+ # pacman hooks
+ make -C alpm-hooks DESTDIR="${pkgdir}" install_sysusers
+}
+
+package_etmpfiles() {
+ pkgdesc='the tmpfiles.d binary'
+ groups=('base-devel')
+ depends=('acl' 'libacl.so' 'libcap' 'libcap.so')
+
+ _inst_bin tmpfiles
+
+ install -d "${pkgdir}"/etc/tmpfiles.d
+ mv -v build/tmpfiles.d "${pkgdir}"/usr/lib/
+ mv -v "$_pkgbase"/tmpfiles.d/{{tmp,home,x11}.conf,README} "${pkgdir}"/usr/lib/tmpfiles.d
+
+ # pacman hooks
+ make -C alpm-hooks DESTDIR="${pkgdir}" install_tmpfiles
+}
diff --git a/nonsystemd/udev/initcpio-hook-udev b/nonsystemd/udev/initcpio-hook-udev
new file mode 100644
index 000000000..6ae0ba780
--- /dev/null
+++ b/nonsystemd/udev/initcpio-hook-udev
@@ -0,0 +1,22 @@
+#!/usr/bin/ash
+
+run_earlyhook() {
+ kmod static-nodes --format=tmpfiles --output=/run/tmpfiles.d/kmod.conf
+ tmpfiles --prefix=/dev --create --boot
+ udevd --daemon --resolve-names=never
+ udevd_running=1
+}
+
+run_hook() {
+ msg ":: Triggering uevents..."
+ udevadm trigger --action=add --type=subsystems
+ udevadm trigger --action=add --type=devices
+ udevadm settle
+}
+
+run_cleanuphook() {
+ udevadm control --exit
+ udevadm info --cleanup-db
+}
+
+# vim: set ft=sh ts=4 sw=4 et:
diff --git a/nonsystemd/udev/initcpio-install-udev b/nonsystemd/udev/initcpio-install-udev
new file mode 100644
index 000000000..674ee7acb
--- /dev/null
+++ b/nonsystemd/udev/initcpio-install-udev
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+build() {
+ local rules tool
+
+ map add_binary \
+ '/usr/bin/udevadm' \
+ '/usr/bin/tmpfiles'
+
+ map add_udev_rule \
+ '50-udev-default.rules' \
+ '60-persistent-storage.rules' \
+ '64-btrfs.rules' \
+ '80-drivers.rules'
+
+ map add_file \
+ '/usr/lib/udev/ata_id' \
+ '/usr/lib/udev/scsi_id'
+
+ add_symlink '/usr/bin/udevd' 'udevadm'
+
+ add_runscript
+}
+
+help() {
+ cat <<HELPEOF
+This hook adds the udev daemon to the initramfs, allowing for dynamic loading
+of modules and reliable detection of the root device via tags (e.g. UUID or
+LABEL). Do not remove this hook unless you know what you're doing.
+HELPEOF
+}
+
+# vim: set ft=sh ts=4 sw=4 et: