@@ -1,181 +0,0 @@
|
||||
From 0e8c18bc2639da328274d02d9222ee2c1f6bf696 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 76ad51d3fb..5cf679b088 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -915,19 +915,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 814f340840..253a77ecb3 100644
|
||||
--- a/meson_options.txt
|
||||
+++ b/meson_options.txt
|
||||
@@ -257,10 +257,6 @@ option('adm-gid', type : 'integer', value : 0,
|
||||
description : 'soft-static allocation for the "adm" group')
|
||||
option('audio-gid', type : 'integer', value : 0,
|
||||
description : 'soft-static allocation for the "audio" group')
|
||||
-option('cdrom-gid', type : 'integer', value : 0,
|
||||
- description : 'soft-static allocation for the "cdrom" group')
|
||||
-option('dialout-gid', type : 'integer', value : 0,
|
||||
- description : 'soft-static allocation for the "dialout" group')
|
||||
option('disk-gid', type : 'integer', value : 0,
|
||||
description : 'soft-static allocation for the "disk" group')
|
||||
option('input-gid', type : 'integer', value : 0,
|
||||
@@ -271,18 +267,22 @@ option('kvm-gid', type : 'integer', value : 0,
|
||||
description : 'soft-static allocation for the "kvm" group')
|
||||
option('lp-gid', type : 'integer', value : 0,
|
||||
description : 'soft-static allocation for the "lp" group')
|
||||
+option('optical-gid', type : 'integer', value : '0',
|
||||
+ description : 'soft-static allocation for the "optical" group')
|
||||
option('render-gid', type : 'integer', value : 0,
|
||||
description : 'soft-static allocation for the "render" group')
|
||||
option('sgx-gid', type : 'integer', value : 0,
|
||||
description : 'soft-static allocation for the "sgx" group')
|
||||
-option('tape-gid', type : 'integer', value : 0,
|
||||
- description : 'soft-static allocation for the "tape" group')
|
||||
+option('storage-gid', type : 'integer', value : '0',
|
||||
+ 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 : 0,
|
||||
description : 'soft-static allocation for the "users" group')
|
||||
option('utmp-gid', type : 'integer', value : 0,
|
||||
description : 'soft-static allocation for the "utmp" group')
|
||||
+option('uucp-gid', type : 'integer', value : '0',
|
||||
+ description : 'soft-static allocation for the "uucp" group')
|
||||
option('video-gid', type : 'integer', value : 0,
|
||||
description : 'soft-static allocation for the "video" group')
|
||||
option('wheel-gid', type : 'integer', value : 0,
|
||||
diff --git a/rules.d/50-udev-default.rules.in b/rules.d/50-udev-default.rules.in
|
||||
index 843bdaf9ce..a192f091df 100644
|
||||
--- a/rules.d/50-udev-default.rules.in
|
||||
+++ b/rules.d/50-udev-default.rules.in
|
||||
@@ -26,7 +26,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"
|
||||
|
||||
@@ -72,13 +72,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 a602b872e4..8d38febb6a 100644
|
||||
--- a/sysusers.d/basic.conf.in
|
||||
+++ b/sysusers.d/basic.conf.in
|
||||
@@ -23,17 +23,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
|
||||
|
||||
From 9e2987a7b4d09d7b554141e9ef2c911cb3fda570 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hesse <mail@eworm.de>
|
||||
Date: Mon, 27 Dec 2021 23:32:42 +0100
|
||||
Subject: [PATCH] generate tmpfiles.d/legacy.conf
|
||||
|
||||
---
|
||||
tmpfiles.d/legacy.conf.in | 3 ---
|
||||
tmpfiles.d/meson.build | 2 +-
|
||||
2 files changed, 1 insertion(+), 4 deletions(-)
|
||||
|
||||
diff --git a/tmpfiles.d/legacy.conf.in b/tmpfiles.d/legacy.conf.in
|
||||
index 4f2c0d7c43..62e2ae0986 100644
|
||||
--- a/tmpfiles.d/legacy.conf.in
|
||||
+++ b/tmpfiles.d/legacy.conf.in
|
||||
@@ -12,9 +12,6 @@
|
||||
|
||||
d /run/lock 0755 root root -
|
||||
L /var/lock - - - - ../run/lock
|
||||
-{% if CREATE_LOG_DIRS %}
|
||||
-L /var/log/README - - - - ../..{{DOC_DIR}}/README.logs
|
||||
-{% endif %}
|
||||
|
||||
# /run/lock/subsys is used for serializing SysV service execution, and
|
||||
# hence without use on SysV-less systems.
|
||||
diff --git a/tmpfiles.d/meson.build b/tmpfiles.d/meson.build
|
||||
index ca1abbf3fe..25e2b53402 100644
|
||||
--- a/tmpfiles.d/meson.build
|
||||
+++ b/tmpfiles.d/meson.build
|
||||
@@ -29,7 +29,7 @@ foreach pair : files
|
||||
endforeach
|
||||
|
||||
in_files = [['etc.conf', ''],
|
||||
- ['legacy.conf', 'HAVE_SYSV_COMPAT'],
|
||||
+ ['legacy.conf', ''],
|
||||
['static-nodes-permissions.conf', ''],
|
||||
['systemd.conf', ''],
|
||||
['var.conf', ''],
|
||||
157
PKGBUILD
157
PKGBUILD
@@ -1,157 +0,0 @@
|
||||
# Adapted from the Arch Linux systemd build script.
|
||||
# Maintainer: Jack L. Frost <fbt@fleshless.org>
|
||||
|
||||
pkgbase=systemd-libs
|
||||
pkgname=('systemd-libs-systemd' 'systemd-libs-udev')
|
||||
_tag='42f5ba1e56ddb81c244e0d85f13109acdb14cbee' # git rev-parse v${_tag_name}
|
||||
_tag_name=254.5
|
||||
pkgver="${_tag_name/-/}"
|
||||
pkgrel=1
|
||||
arch=('x86_64')
|
||||
url='https://www.github.com/systemd/systemd'
|
||||
makedepends=('acl' 'cryptsetup' 'docbook-xsl' 'gperf' 'lz4' 'xz' 'pam' 'libelf'
|
||||
'intltool' 'iptables' 'kmod' 'libcap' 'libidn2' 'libgcrypt'
|
||||
'libmicrohttpd' 'libxcrypt' 'libxslt' 'util-linux' 'linux-api-headers'
|
||||
'python-jinja' 'python-lxml' 'quota-tools' 'shadow' 'git'
|
||||
'meson' 'libseccomp' 'pcre2' 'audit' 'kexec-tools' 'libxkbcommon'
|
||||
'bash-completion' 'p11-kit' 'systemd' 'libfido2' 'tpm2-tss' 'rsync'
|
||||
'bpf' 'libbpf' 'clang' 'llvm' 'curl' 'gnutls' 'python-pyelftools'
|
||||
'lib32-gcc-libs')
|
||||
options=('strip')
|
||||
#validpgpkeys=('63CDA1E5D3FC22B998D20DD6327F26951A015CC4' # Lennart Poettering <lennart@poettering.net>
|
||||
# '5C251B5FC54EB2F80F407AAAC54CA336CFEB557E') # Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
|
||||
source=("git+https://github.com/systemd/systemd-stable#tag=${_tag}"
|
||||
"git+https://github.com/systemd/systemd#tag=v${_tag_name%.*}"
|
||||
'0001-Use-Arch-Linux-device-access-groups.patch')
|
||||
|
||||
_backports=(
|
||||
)
|
||||
|
||||
_reverts=(
|
||||
)
|
||||
|
||||
prepare() {
|
||||
cd "systemd-stable"
|
||||
|
||||
# add upstream repository for cherry-picking
|
||||
git remote add -f upstream ../systemd
|
||||
|
||||
local _c
|
||||
for _c in "${_backports[@]}"; do
|
||||
if [[ $_c == *..* ]]; then
|
||||
git log --oneline --reverse "${_c}"
|
||||
else
|
||||
git log --oneline -1 "${_c}"
|
||||
fi
|
||||
git cherry-pick -n -m1 "${_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
|
||||
}
|
||||
|
||||
build() {
|
||||
local _timeservers=({0..3}.arch.pool.ntp.org)
|
||||
local _nameservers=(
|
||||
# We use these public name services, ordered by their
|
||||
# privacy policy (hopefully):
|
||||
# * Cloudflare (https://1.1.1.1/)
|
||||
# * Quad9 without filtering (https://www.quad9.net/)
|
||||
# * Google (https://developers.google.com/speed/public-dns/)
|
||||
1.1.1.1
|
||||
9.9.9.10
|
||||
8.8.8.8
|
||||
2606:4700:4700::1111
|
||||
2620:fe::10
|
||||
2001:4860:4860::8888
|
||||
)
|
||||
|
||||
local _meson_options=(
|
||||
# internal version comparison is incompatible with pacman:
|
||||
# 249~rc1 < 249 < 249.1 < 249rc
|
||||
-Dversion-tag="${_tag_name/-/\~}-${pkgrel}-arch"
|
||||
-Dshared-lib-tag="${pkgver}-${pkgrel}"
|
||||
-Dmode=release
|
||||
|
||||
-Dbootloader=true
|
||||
-Dbpf-framework=true
|
||||
-Dima=false
|
||||
-Dlibidn2=true
|
||||
-Dlz4=true
|
||||
-Dman=true
|
||||
-Dnscd=false
|
||||
|
||||
# We disable DNSSEC by default, it still causes trouble:
|
||||
# https://github.com/systemd/systemd/issues/10579
|
||||
|
||||
-Ddbuspolicydir=/usr/share/dbus-1/system.d
|
||||
-Ddefault-dnssec=no
|
||||
-Ddefault-hierarchy=unified
|
||||
-Ddefault-kill-user-processes=false
|
||||
-Ddefault-locale='C.UTF-8'
|
||||
-Dlocalegen-path=/usr/bin/locale-gen
|
||||
-Ddns-over-tls=openssl
|
||||
-Dfallback-hostname='archlinux'
|
||||
-Dnologin-path=/usr/bin/nologin
|
||||
-Dntp-servers="${_timeservers[*]}"
|
||||
-Ddns-servers="${_nameservers[*]}"
|
||||
-Drpmmacrosdir=no
|
||||
-Dsysvinit-path=
|
||||
-Dsysvrcnd-path=
|
||||
|
||||
-Dsbat-distro='arch'
|
||||
-Dsbat-distro-summary='Arch Linux'
|
||||
-Dsbat-distro-pkgname="systemd"
|
||||
-Dsbat-distro-version="${pkgver}"
|
||||
-Dsbat-distro-url="https://archlinux.org/packages/core/x86_64/systemd/"
|
||||
)
|
||||
|
||||
# this uses malloc_usable_size, which is incompatible with fortification level 3
|
||||
export CFLAGS="${CFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
|
||||
export CXXFLAGS="${CXXFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
|
||||
|
||||
arch-meson "systemd-stable" build "${_meson_options[@]}"
|
||||
|
||||
meson compile -C build
|
||||
}
|
||||
|
||||
#check() { meson test -C build; }
|
||||
|
||||
package_systemd-libs-systemd() {
|
||||
pkgdesc='systemd client libraries'
|
||||
depends=('glibc' 'libcap' 'libgcrypt' 'lz4' 'xz' 'zstd')
|
||||
license=('LGPL2.1')
|
||||
provides=('libsystemd' 'libsystemd.so' 'systemd-libs')
|
||||
conflicts=('libsystemd')
|
||||
replaces=('libsystemd')
|
||||
|
||||
DESTDIR="$srcdir/full-install" meson install -C build
|
||||
|
||||
install -d -m0755 "$pkgdir"/usr/lib
|
||||
cp --archive "$srcdir/full-install/usr/lib/"lib{nss,systemd}*.so* "$pkgdir/usr/lib/"
|
||||
|
||||
install -d -m0755 "$pkgdir"/usr/lib/include
|
||||
cp --archive "$srcdir/full-install/usr/include/systemd" "$pkgdir/usr/include/"
|
||||
}
|
||||
|
||||
package_systemd-libs-udev() {
|
||||
pkgdesc="udev client libraries"
|
||||
depends=('glibc' 'libcap' 'libgcrypt' 'lz4' 'xz')
|
||||
license=('LGPL2.1')
|
||||
provides=('libudev' 'libudev.so')
|
||||
|
||||
# udev libs
|
||||
install -d -m0755 "$pkgdir"/usr/lib
|
||||
cp --archive "$srcdir/full-install/usr/lib/"libudev* "$pkgdir/usr/lib/"
|
||||
|
||||
install -d -m0755 "$pkgdir"/usr/include
|
||||
cp --archive "$srcdir/full-install/usr/include/libudev.h" "$pkgdir/usr/include/"
|
||||
}
|
||||
|
||||
sha1sums=('SKIP'
|
||||
'SKIP'
|
||||
'0486ab66087de95ac304d6f599d914172d740a7c')
|
||||
Reference in New Issue
Block a user