From c82e88dd00d1b0b7fcfb4e5628d99611388cef6f Mon Sep 17 00:00:00 2001 From: rawnix ports Date: Sat, 26 Sep 2026 18:19:05 +0000 Subject: sync 2026-09-26 18:19 UTC 1672 files changed, 151396 insertions(+) --- opt/udevd/.footprint | 208 ++++++++++++++++++++++++++++++ opt/udevd/.signature | 8 ++ opt/udevd/40-rawnix.rules | 67 ++++++++++ opt/udevd/MAKEPKG | 322 ++++++++++++++++++++++++++++++++++++++++++++++ opt/udevd/udev-trigger | 14 ++ 5 files changed, 619 insertions(+) create mode 100644 opt/udevd/.footprint create mode 100644 opt/udevd/.signature create mode 100644 opt/udevd/40-rawnix.rules create mode 100644 opt/udevd/MAKEPKG create mode 100644 opt/udevd/udev-trigger (limited to 'opt/udevd') diff --git a/opt/udevd/.footprint b/opt/udevd/.footprint new file mode 100644 index 0000000..e718dd9 --- /dev/null +++ b/opt/udevd/.footprint @@ -0,0 +1,208 @@ +drwxr-xr-x root/root etc/ +drwxr-xr-x root/root etc/sv/ +drwxr-xr-x root/root etc/sv/udevd/ +-rwxr-xr-x root/root etc/sv/udevd/finish +-rwxr-xr-x root/root etc/sv/udevd/run +drwxr-xr-x root/root etc/sv/udevd/log/ +-rwxr-xr-x root/root etc/sv/udevd/log/run +drwxr-xr-x root/root etc/udev/ +-rw-r--r-- root/root etc/udev/udev.conf +drwxr-xr-x root/root etc/udev/hwdb.d/ +drwxr-xr-x root/root etc/udev/rules.d/ +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +-rwxr-xr-x root/root usr/bin/systemd-hwdb +-rwxr-xr-x root/root usr/bin/udev-trigger +-rwxr-xr-x root/root usr/bin/udevadm +lrwxrwxrwx root/root usr/bin/udevd -> ../lib/systemd/systemd-udevd +drwxr-xr-x root/root usr/include/ +-rw-r--r-- root/root usr/include/libudev.h +drwxr-xr-x root/root usr/lib/ +-rwxr-xr-x root/root usr/lib/libudev.so.1.7.15 +lrwxrwxrwx root/root usr/lib/libudev.so -> libudev.so.1 +lrwxrwxrwx root/root usr/lib/libudev.so.1 -> libudev.so.1.7.15 +drwxr-xr-x root/root usr/lib/pkgconfig/ +-rw-r--r-- root/root usr/lib/pkgconfig/libudev.pc +drwxr-xr-x root/root usr/lib/systemd/ +-rwxr-xr-x root/root usr/lib/systemd/libsystemd-shared-262.so +lrwxrwxrwx root/root usr/lib/systemd/systemd-udevd -> ../../bin/udevadm +drwxr-xr-x root/root usr/lib/systemd/network/ +-rw-r--r-- root/root usr/lib/systemd/network/99-default.link +drwxr-xr-x root/root usr/lib/udev/ +-rwxr-xr-x root/root usr/lib/udev/ata_id +-rwxr-xr-x root/root usr/lib/udev/cdrom_id +-rwxr-xr-x root/root usr/lib/udev/dmi_memory_id +-rwxr-xr-x root/root usr/lib/udev/iocost +-rwxr-xr-x root/root usr/lib/udev/mtd_probe +-rwxr-xr-x root/root usr/lib/udev/scsi_id +-rwxr-xr-x root/root usr/lib/udev/v4l_id +drwxr-xr-x root/root usr/lib/udev/hwdb.d/ +-rw-r--r-- root/root usr/lib/udev/hwdb.d/20-OUI.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/20-acpi-vendor.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/20-bluetooth-vendor-product.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/20-dmi-id.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/20-net-ifname.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/20-pci-classes.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/20-pci-vendor-model.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/20-sdio-classes.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/20-sdio-vendor-model.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/20-usb-classes.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/20-usb-vendor-model.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/20-vmbus-class.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/40-imds.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/60-autosuspend-chromiumos.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/60-autosuspend-fingerprint-reader.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/60-autosuspend.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/60-evdev.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/60-input-id.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/60-keyboard.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/60-seat.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/60-sensor.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/60-tpm2.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/70-analyzers.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/70-av-production.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/70-cameras.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/70-debug-appliance.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/70-hardware-wallets.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/70-joystick.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/70-lights.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/70-maker-tools.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/70-mouse.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/70-pda.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/70-pointingstick.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/70-software-radio.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/70-sound-card.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/70-touchpad.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/70-vsock.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/80-ieee1394-unit-function.hwdb +-rw-r--r-- root/root usr/lib/udev/hwdb.d/82-net-auto-link-local.hwdb +drwxr-xr-x root/root usr/lib/udev/rules.d/ +-rw-r--r-- root/root usr/lib/udev/rules.d/40-rawnix.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/50-udev-default.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/60-autosuspend.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/60-block.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/60-cdrom_id.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/60-dmi-id.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/60-drm.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/60-evdev.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/60-fido-id.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/60-gpiochip.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/60-infiniband.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/60-input-id.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/60-persistent-alsa.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/60-persistent-hidraw.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/60-persistent-input.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/60-persistent-media-controller.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/60-persistent-storage-mtd.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/60-persistent-storage-tape.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/60-persistent-storage.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/60-persistent-v4l.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/60-sensor.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/60-serial.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/60-tpm2-id.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/64-btrfs.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/65-integration.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/70-camera.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/70-joystick.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/70-memory.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/70-mouse.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/70-touchpad.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/75-net-description.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/75-probe_mtd.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/78-sound-card.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/80-drivers.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/80-net-setup-link.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/81-net-bridge.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/81-net-dhcp.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/82-net-auto-link-local.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/90-image-dissect.rules +-rw-r--r-- root/root usr/lib/udev/rules.d/90-iocost.rules +drwxr-xr-x root/root usr/share/ +drwxr-xr-x root/root usr/share/man/ +drwxr-xr-x root/root usr/share/man/man3/ +-rw-r--r-- root/root usr/share/man/man3/libudev.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_get_action.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_get_current_tags_list_entry.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_get_devlinks_list_entry.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_get_devnode.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_get_devnum.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_get_devpath.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_get_devtype.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_get_driver.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_get_is_initialized.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_get_parent.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_get_parent_with_subsystem_devtype.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_get_properties_list_entry.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_get_property_value.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_get_subsystem.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_get_sysattr_list_entry.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_get_sysattr_value.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_get_sysname.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_get_sysnum.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_get_syspath.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_get_tags_list_entry.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_get_udev.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_has_current_tag.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_has_tag.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_new_from_device_id.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_new_from_devnum.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_new_from_environment.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_new_from_subsystem_sysname.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_new_from_syspath.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_ref.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_set_sysattr_value.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_device_unref.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_enumerate_add_match_is_initialized.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_enumerate_add_match_parent.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_enumerate_add_match_property.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_enumerate_add_match_subsystem.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_enumerate_add_match_sysattr.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_enumerate_add_match_sysname.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_enumerate_add_match_tag.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_enumerate_add_nomatch_subsystem.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_enumerate_add_nomatch_sysattr.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_enumerate_add_syspath.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_enumerate_get_list_entry.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_enumerate_get_udev.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_enumerate_new.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_enumerate_ref.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_enumerate_scan_devices.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_enumerate_scan_subsystems.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_enumerate_unref.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_list_entry.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_list_entry_get_by_name.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_list_entry_get_name.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_list_entry_get_next.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_list_entry_get_value.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_monitor_enable_receiving.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_monitor_filter_add_match_subsystem_devtype.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_monitor_filter_add_match_tag.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_monitor_filter_remove.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_monitor_filter_update.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_monitor_get_fd.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_monitor_get_udev.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_monitor_new_from_netlink.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_monitor_receive_device.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_monitor_ref.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_monitor_set_receive_buffer_size.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_monitor_unref.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_new.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_ref.3.gz +-rw-r--r-- root/root usr/share/man/man3/udev_unref.3.gz +drwxr-xr-x root/root usr/share/man/man5/ +-rw-r--r-- root/root usr/share/man/man5/systemd.link.5.gz +-rw-r--r-- root/root usr/share/man/man5/udev.conf.5.gz +drwxr-xr-x root/root usr/share/man/man7/ +-rw-r--r-- root/root usr/share/man/man7/hwdb.7.gz +-rw-r--r-- root/root usr/share/man/man7/udev.7.gz +drwxr-xr-x root/root usr/share/man/man8/ +-rw-r--r-- root/root usr/share/man/man8/systemd-hwdb.8.gz +-rw-r--r-- root/root usr/share/man/man8/systemd-udevd.8.gz +-rw-r--r-- root/root usr/share/man/man8/udevadm.8.gz +drwxr-xr-x root/root usr/share/pkgconfig/ +-rw-r--r-- root/root usr/share/pkgconfig/udev.pc +drwxr-xr-x root/root var/ +drwxr-xr-x root/root var/lib/ +drwxr-xr-x root/root var/lib/pkg/ +drwxr-xr-x root/root var/lib/pkg/meta/ +-rw-r--r-- root/root var/lib/pkg/meta/udevd diff --git a/opt/udevd/.signature b/opt/udevd/.signature new file mode 100644 index 0000000..58b3dbc --- /dev/null +++ b/opt/udevd/.signature @@ -0,0 +1,8 @@ +RWTZ9IduCSQ/mG4UB8/KugZJ2uxeFj4dvZXwkk786eO1inOSZP8vPcmCjWGs6G4NkjGVyzpnmerJfeigu9OosASiNEJISa6vTwA= + +SHA256 (MAKEPKG) = 08286a35032ab9dca4fdfdea963c37b450f9db56320afad8b33aaf60c20b78c6 +SHA256 (.footprint) = 172987b731fadc8c3e6e202e0081ccd11c183358572265a0c27559304c2bc7a8 +SHA256 (udevd-262.tar.gz) = 6aa77506c0644aa67f940a48e3d3a7368601f787e4f249139516d353f107bcab +SHA256 (40-rawnix.rules) = 981a54db9f163aaa60c85886589df97f8af1374c52f816ab2cb9e7ae79b84bae +SHA256 (udev-trigger) = e9cbff4bc98e56d0d1802720da6382937794ffc25d5d6e10293a844d114dff86 +SHA256 (udevd#262-1.pkg.tar.gz) = 9781563bce4600c9a34ca32fcc513ad850b9d82e8b7e8e07b07a5c2b272322b0 diff --git a/opt/udevd/40-rawnix.rules b/opt/udevd/40-rawnix.rules new file mode 100644 index 0000000..210cd42 --- /dev/null +++ b/opt/udevd/40-rawnix.rules @@ -0,0 +1,67 @@ +# TUX-specific udev rules + +# Audio devices +SUBSYSTEM=="sound", GROUP="audio", MODE="0660" +KERNEL=="audio*", GROUP="audio", MODE="0660" +KERNEL=="dsp*", GROUP="audio", MODE="0660" +KERNEL=="mixer*", GROUP="audio", MODE="0660" +KERNEL=="sequencer*", GROUP="audio", MODE="0660" +KERNEL=="snd/*", GROUP="audio", MODE="0660" + +# Video devices +KERNEL=="fb[0-9]*", GROUP="video", MODE="0660" +KERNEL=="card[0-9]*", GROUP="video", MODE="0660" +SUBSYSTEM=="drm", GROUP="video", MODE="0660" + +# Optical drives +KERNEL=="sr[0-9]*", GROUP="cdrom", MODE="0660" +KERNEL=="sg[0-9]*", SUBSYSTEMS=="scsi", ATTRS{type}=="5", GROUP="cdrom", MODE="0660" + +# Floppy drives +KERNEL=="fd[0-9]*", GROUP="floppy", MODE="0660" + +# Serial ports +KERNEL=="ttyS[0-9]*", GROUP="dialout", MODE="0660" +KERNEL=="ttyUSB[0-9]*", GROUP="dialout", MODE="0660" +KERNEL=="ttyACM[0-9]*", GROUP="dialout", MODE="0660" + +# USB devices +SUBSYSTEM=="usb", GROUP="usb", MODE="0664" + +# Input devices +SUBSYSTEM=="input", GROUP="input", MODE="0660" + +# KVM +KERNEL=="kvm", GROUP="kvm", MODE="0660" + +# Loop devices +KERNEL=="loop[0-9]*", GROUP="disk", MODE="0660" + +# Memory device (for X11) +KERNEL=="mem", GROUP="kmem", MODE="0640" +KERNEL=="port", GROUP="kmem", MODE="0640" + +# Printer devices +KERNEL=="lp[0-9]*", GROUP="lp", MODE="0660" +KERNEL=="parport[0-9]*", GROUP="lp", MODE="0660" + +# Tape devices +KERNEL=="st[0-9]*", GROUP="tape", MODE="0660" +KERNEL=="nst[0-9]*", GROUP="tape", MODE="0660" + +# Disk devices +KERNEL=="sd[a-z]*", GROUP="disk", MODE="0660" +KERNEL=="hd[a-z]*", GROUP="disk", MODE="0660" +KERNEL=="nvme*", GROUP="disk", MODE="0660" + +# RTC world-readable +KERNEL=="rtc0", MODE="0644" + +# GPU render nodes +SUBSYSTEM=="drm", KERNEL=="renderD*", GROUP="render", MODE="0660" + +# SGX (Software Guard Extensions) +SUBSYSTEM=="sgx", GROUP="sgx", MODE="0660" + +# RFkill +KERNEL=="rfkill", GROUP="rfkill", MODE="0664" diff --git a/opt/udevd/MAKEPKG b/opt/udevd/MAKEPKG new file mode 100644 index 0000000..6a55b06 --- /dev/null +++ b/opt/udevd/MAKEPKG @@ -0,0 +1,322 @@ +#!/bin/mkpkg +# description: Device manager for the Linux kernel (extracted from systemd) +# url: https://systemd.io/ + +name=udevd +version=262 +release=1 +depends=(util-linux libcap2 kmod acl libucontext) +makedeps=(meson ninja py-jinja2 py-lxml gperf patchelf docbook-xsl libxslt gettext) +services=(udevd) + +source=(https://github.com/systemd/systemd/archive/refs/tags/v${version}.tar.gz + 40-rawnix.rules + udev-trigger) +renames=($name-$version.tar.gz) + +sha256sums=( + "6aa77506c0644aa67f940a48e3d3a7368601f787e4f249139516d353f107bcab" + "981a54db9f163aaa60c85886589df97f8af1374c52f816ab2cb9e7ae79b84bae" + "e9cbff4bc98e56d0d1802720da6382937794ffc25d5d6e10293a844d114dff86" +) + +build() { + cd systemd-$version + + mkdir -p test/fuzz/fuzz-unit-file + touch test/fuzz/fuzz-unit-file/dm-back-slash.swap + + meson setup build \ + --prefix=/usr \ + --sysconfdir=/etc \ + --libdir=/usr/lib \ + --buildtype=release \ + -Dmode=release \ + -Dlibc=musl \ + -Dsplit-bin=false \ + -Dhwdb=true \ + -Dtests=false \ + -Dfuzz-tests=false \ + -Dstatic-libudev=false \ + -Dstandalone-binaries=false \ + \ + -Dacl=enabled \ + -Dkmod=enabled \ + -Dselinux=disabled \ + \ + -Dbootloader=disabled \ + -Dkernel-install=false \ + -Dsysusers=false \ + -Dtmpfiles=false \ + -Dukify=disabled \ + \ + -Dadm-group=false \ + -Danalyze=false \ + -Dapparmor=disabled \ + -Daudit=disabled \ + -Dbacklight=false \ + -Dbinfmt=false \ + -Dbpf-framework=disabled \ + -Dbzip2=disabled \ + -Dcoredump=false \ + -Ddbus=disabled \ + -Delfutils=disabled \ + -Denvironment-d=false \ + -Dfdisk=disabled \ + -Dgcrypt=disabled \ + -Dglib=disabled \ + -Dgshadow=false \ + -Dgnutls=disabled \ + -Dhibernate=false \ + -Dhostnamed=false \ + -Didn=false \ + -Dima=false \ + -Dinitrd=false \ + -Dfirstboot=false \ + -Dldconfig=false \ + -Dlibcryptsetup=disabled \ + -Dlibcurl=disabled \ + -Dlibfido2=disabled \ + -Dlibidn2=disabled \ + -Dlocaled=false \ + -Dlogind=false \ + -Dlz4=disabled \ + -Dmachined=false \ + -Dmicrohttpd=disabled \ + -Dnetworkd=false \ + -Dnss-myhostname=false \ + -Dnss-resolve=disabled \ + -Dnss-systemd=false \ + -Doomd=false \ + -Dopenssl=disabled \ + -Dp11kit=disabled \ + -Dpam=disabled \ + -Dpcre2=disabled \ + -Dpolkit=disabled \ + -Dportabled=false \ + -Dpstore=false \ + -Dpwquality=disabled \ + -Drandomseed=false \ + -Dresolve=false \ + -Drfkill=false \ + -Dseccomp=disabled \ + -Dsmack=false \ + -Dsysext=false \ + -Dtimedated=false \ + -Dtimesyncd=false \ + -Dtpm=false \ + -Dqrencode=disabled \ + -Dquotacheck=false \ + -Duserdb=false \ + -Dutmp=false \ + -Dvconsole=false \ + -Dwheel-group=false \ + -Dxdg-autostart=false \ + -Dxkbcommon=disabled \ + -Dxz=disabled \ + -Dzlib=disabled \ + -Dzstd=disabled + + cd build + + ninja \ + udevadm \ + systemd-hwdb \ + ata_id \ + cdrom_id \ + iocost \ + mtd_probe \ + scsi_id \ + v4l_id \ + src/udev/udev.pc \ + man/udev.conf.5 \ + man/systemd.link.5 \ + man/hwdb.7 \ + man/udev.7 \ + man/systemd-hwdb.8 \ + man/systemd-udevd.service.8 \ + man/udevadm.8 \ + man/libudev.3 \ + man/udev_device_get_syspath.3 \ + man/udev_device_has_tag.3 \ + man/udev_device_new_from_syspath.3 \ + man/udev_enumerate_add_match_subsystem.3 \ + man/udev_enumerate_new.3 \ + man/udev_enumerate_scan_devices.3 \ + man/udev_list_entry.3 \ + man/udev_monitor_filter_update.3 \ + man/udev_monitor_new_from_netlink.3 \ + man/udev_monitor_receive_device.3 \ + man/udev_new.3 \ + hwdb.d/60-autosuspend-chromiumos.hwdb \ + rules.d/50-udev-default.rules \ + rules.d/60-persistent-storage.rules \ + rules.d/64-btrfs.rules \ + libudev \ + src/libudev/libudev.pc + + case $(uname -m) in + aarch64|arm*|ia64|i?86|loongarch64|mips*|x86_64) + ninja dmi_memory_id + ;; + esac + + cd .. + + # Install + major_ver=${version%%.*} + + mkdir -p "$PKG/usr/bin" \ + "$PKG/usr/lib/systemd" \ + "$PKG/usr/lib/udev" \ + "$PKG/usr/lib/udev/rules.d" \ + "$PKG/usr/lib/udev/hwdb.d" \ + "$PKG/usr/lib/pkgconfig" \ + "$PKG/usr/lib/systemd/network" \ + "$PKG/usr/share/man/man3" \ + "$PKG/usr/share/man/man5" \ + "$PKG/usr/share/man/man7" \ + "$PKG/usr/share/man/man8" \ + "$PKG/usr/share/pkgconfig" \ + "$PKG/usr/include" \ + "$PKG/etc/udev/rules.d" \ + "$PKG/etc/udev/hwdb.d" + + # Shared library + install -m755 build/src/shared/libsystemd-shared-${major_ver}.so "$PKG/usr/lib/systemd/" + + # Main binaries with rpath + patchelf --set-rpath "/usr/lib/systemd" build/udevadm + patchelf --set-rpath "/usr/lib/systemd" build/systemd-hwdb + install -m755 build/udevadm "$PKG/usr/bin/" + install -m755 build/systemd-hwdb "$PKG/usr/bin/" + + # systemd-udevd symlink (expected by some software) + ln -s ../../bin/udevadm "$PKG/usr/lib/systemd/systemd-udevd" + + # udevd symlink so runit and scripts can find it by name + ln -s ../lib/systemd/systemd-udevd "$PKG/usr/bin/udevd" + + # udev helper binaries + for h in ata_id cdrom_id iocost mtd_probe scsi_id v4l_id; do + patchelf --set-rpath "/usr/lib/systemd" "build/$h" + install -m755 "build/$h" "$PKG/usr/lib/udev/" + done + + # dmi_memory_id on supported architectures + case $(uname -m) in + aarch64|arm*|ia64|i?86|loongarch64|mips*|x86_64) + patchelf --set-rpath "/usr/lib/systemd" build/dmi_memory_id + install -m755 build/dmi_memory_id "$PKG/usr/lib/udev/" + ;; + esac + + # libudev + libudev_full=$(ls build/libudev.so.1.* 2>/dev/null | head -1) + if [ -n "$libudev_full" ]; then + libudev_name=$(basename "$libudev_full") + install -m755 "$libudev_full" "$PKG/usr/lib/" + ln -s "$libudev_name" "$PKG/usr/lib/libudev.so.1" + ln -s libudev.so.1 "$PKG/usr/lib/libudev.so" + else + install -m755 build/libudev.so.1 "$PKG/usr/lib/" + ln -s libudev.so.1 "$PKG/usr/lib/libudev.so" + fi + + # Headers + install -m644 src/libudev/libudev.h "$PKG/usr/include/" + + # Pkgconfig + install -m644 build/src/libudev/libudev.pc "$PKG/usr/lib/pkgconfig/" + install -m644 build/src/udev/udev.pc "$PKG/usr/share/pkgconfig/" + + # Rules (skip systemd-specific) + for f in build/rules.d/*.rules; do + fname=$(basename "$f") + case "$fname" in + 99-systemd.rules|70-power-switch.rules) continue ;; + esac + install -m644 "$f" "$PKG/usr/lib/udev/rules.d/" + done + + for f in rules.d/*.rules; do + fname=$(basename "$f") + [ -f "$PKG/usr/lib/udev/rules.d/$fname" ] && continue + case "$fname" in + 99-systemd.rules|70-power-switch.rules) continue ;; + esac + install -m644 "$f" "$PKG/usr/lib/udev/rules.d/" + done + + # rawnix-specific rules + install -m644 "$SRC/40-rawnix.rules" "$PKG/usr/lib/udev/rules.d/" + + # hwdb files + for f in build/hwdb.d/*.hwdb; do + install -m644 "$f" "$PKG/usr/lib/udev/hwdb.d/" + done + for f in hwdb.d/*.hwdb; do + fname=$(basename "$f") + [ -f "$PKG/usr/lib/udev/hwdb.d/$fname" ] && continue + install -m644 "$f" "$PKG/usr/lib/udev/hwdb.d/" + done + + # Configuration + install -m644 src/udev/udev.conf "$PKG/etc/udev/" + + # Network link file + install -m644 network/99-default.link "$PKG/usr/lib/systemd/network/" + + # Man pages + install -m644 build/man/udev.conf.5 "$PKG/usr/share/man/man5/" + install -m644 build/man/systemd.link.5 "$PKG/usr/share/man/man5/" + install -m644 build/man/hwdb.7 "$PKG/usr/share/man/man7/" + install -m644 build/man/udev.7 "$PKG/usr/share/man/man7/" + install -m644 build/man/systemd-hwdb.8 "$PKG/usr/share/man/man8/" + install -m644 build/man/udevadm.8 "$PKG/usr/share/man/man8/" + install -m644 build/man/systemd-udevd.service.8 "$PKG/usr/share/man/man8/systemd-udevd.8" + + install -m644 build/man/libudev.3 "$PKG/usr/share/man/man3/" + for f in build/man/udev_*.3; do + install -m644 "$f" "$PKG/usr/share/man/man3/" + done + + # Helper script + install -m755 "$SRC/udev-trigger" "$PKG/usr/bin/" +} + +post_build() { + # runit service + install -d $PKG/etc/sv/udevd/log + + printf '%s\n' \ + '#!/bin/sh' \ + 'exec 2>&1' \ + 'mkdir -p /run/udev' \ + 'udevadm control --exit 2>/dev/null' \ + 'exec udevd' \ + > $PKG/etc/sv/udevd/run + + printf '%s\n' \ + '#!/bin/sh' \ + 'udevadm control --exit 2>/dev/null' \ + 'rm -f /run/udev/control' \ + > $PKG/etc/sv/udevd/finish + + printf '%s\n' \ + '#!/bin/sh' \ + 'mkdir -p /var/log/udevd' \ + 'exec svlogd -tt /var/log/udevd' \ + > $PKG/etc/sv/udevd/log/run + + chmod 755 $PKG/etc/sv/udevd/run + chmod 755 $PKG/etc/sv/udevd/finish + chmod 755 $PKG/etc/sv/udevd/log/run +} + +signify() { + untrusted comment: public key + RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3 +} + +# vim: filetype=sh diff --git a/opt/udevd/udev-trigger b/opt/udevd/udev-trigger new file mode 100644 index 0000000..c9fdd02 --- /dev/null +++ b/opt/udevd/udev-trigger @@ -0,0 +1,14 @@ +#!/bin/sh +# udev-trigger - coldplug devices after udevd is running + +# Update hwdb if stale +if [ -f /etc/udev/hwdb.bin ] && [ /etc/udev/hwdb.bin -ot /usr/lib/udev/hwdb.d ]; then + systemd-hwdb update +fi + +# Trigger device events +udevadm trigger --type=subsystems --action=add +udevadm trigger --type=devices --action=add + +# Wait for the event queue to finish +udevadm settle -- cgit v1.3.1