summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2021-04-24 17:39:40 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2021-04-24 17:39:40 -0500
commit1a9f69ae0ef5803df9c6c3b84ae878c3af1840ae (patch)
tree1fa9f1eacfc193b4fa5fa8a2d4ef08ad4fa64df1
parent30f5613f6673d484de9a09f833efd4442bbcde73 (diff)
systemd-248-5.parabola1: rebuild
-rw-r--r--libre/systemd/0003-PARTIAL-REVERT-commit-tree-wide-replace-strverscmp-and-str_verscmp-with-strverscmp_improved.patch78
-rw-r--r--libre/systemd/PKGBUILD15
-rw-r--r--libre/systemd/initcpio-install-systemd35
3 files changed, 98 insertions, 30 deletions
diff --git a/libre/systemd/0003-PARTIAL-REVERT-commit-tree-wide-replace-strverscmp-and-str_verscmp-with-strverscmp_improved.patch b/libre/systemd/0003-PARTIAL-REVERT-commit-tree-wide-replace-strverscmp-and-str_verscmp-with-strverscmp_improved.patch
new file mode 100644
index 000000000..57b9e4dfc
--- /dev/null
+++ b/libre/systemd/0003-PARTIAL-REVERT-commit-tree-wide-replace-strverscmp-and-str_verscmp-with-strverscmp_improved.patch
@@ -0,0 +1,78 @@
+From 9021729667e019defea0d4c1bdf563d629d7d837 Mon Sep 17 00:00:00 2001
+From: Ernesto Castellotti <mail@ernestocastellotti.it>
+Date: Sat, 10 Apr 2021 18:59:14 +0200
+Subject: [PATCH] PARTIAL REVERT commit tree-wide: replace strverscmp() and
+ str_verscmp() with strverscmp_improved
+
+This is a workaround for the issue https://github.com/systemd/systemd/issues/19191
+---
+ src/boot/efi/boot.c | 49 ++++++++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 48 insertions(+), 1 deletion(-)
+
+diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c
+index 35248db009bf..75c7e2c61d19 100644
+--- a/src/boot/efi/boot.c
++++ b/src/boot/efi/boot.c
+@@ -914,6 +914,53 @@ static VOID config_entry_free(ConfigEntry *entry) {
+ FreePool(entry);
+ }
+
++static BOOLEAN is_digit(CHAR16 c) {
++ return (c >= '0') && (c <= '9');
++}
++static UINTN c_order(CHAR16 c) {
++ if (c == '\0')
++ return 0;
++ if (is_digit(c))
++ return 0;
++ else if ((c >= 'a') && (c <= 'z'))
++ return c;
++ else
++ return c + 0x10000;
++}
++static INTN str_verscmp(CHAR16 *s1, CHAR16 *s2) {
++ CHAR16 *os1 = s1;
++ CHAR16 *os2 = s2;
++ while (*s1 || *s2) {
++ INTN first;
++ while ((*s1 && !is_digit(*s1)) || (*s2 && !is_digit(*s2))) {
++ INTN order;
++ order = c_order(*s1) - c_order(*s2);
++ if (order != 0)
++ return order;
++ s1++;
++ s2++;
++ }
++ while (*s1 == '0')
++ s1++;
++ while (*s2 == '0')
++ s2++;
++ first = 0;
++ while (is_digit(*s1) && is_digit(*s2)) {
++ if (first == 0)
++ first = *s1 - *s2;
++ s1++;
++ s2++;
++ }
++ if (is_digit(*s1))
++ return 1;
++ if (is_digit(*s2))
++ return -1;
++ if (first != 0)
++ return first;
++ }
++ return StrCmp(os1, os2);
++}
++
+ static CHAR8 *line_get_key_value(
+ CHAR8 *content,
+ CHAR8 *sep,
+@@ -1478,7 +1525,7 @@ static INTN config_entry_compare(ConfigEntry *a, ConfigEntry *b) {
+ if (a->tries_left == 0 && b->tries_left != 0)
+ return -1;
+
+- r = strverscmp_improved(a->id, b->id);
++ r = str_verscmp(a->id, b->id);
+ if (r != 0)
+ return r;
+
diff --git a/libre/systemd/PKGBUILD b/libre/systemd/PKGBUILD
index 4c8f04b51..45e824062 100644
--- a/libre/systemd/PKGBUILD
+++ b/libre/systemd/PKGBUILD
@@ -14,7 +14,7 @@ pkgname+=("${_systemd_libs[@]/#/systemd-}")
_tag='e13126bd95857eb9344e030edbb4c603aab63884' # git rev-parse v${_tag_name}
_tag_name=248
pkgver="${_tag_name/-/}"
-pkgrel=1
+pkgrel=5
pkgrel+=.parabola1
arch=('x86_64')
arch+=('i686' 'armv7h' 'ppc64le')
@@ -24,7 +24,7 @@ makedepends=('acl' 'cryptsetup' 'docbook-xsl' 'gperf' 'lz4' 'xz' 'pam' 'libelf'
'libmicrohttpd' 'libxcrypt' 'libxslt' 'util-linux' 'linux-api-headers'
'python-lxml' 'quota-tools' 'shadow' 'git'
'meson' 'libseccomp' 'pcre2' 'audit' 'kexec-tools' 'libxkbcommon'
- 'bash-completion' 'p11-kit' 'systemd' 'libfido2')
+ 'bash-completion' 'p11-kit' 'systemd' 'libfido2' 'tpm2-tss' 'rsync')
makedepends_i686=('gnu-efi-libs' 'pkgconf')
makedepends_x86_64=('gnu-efi-libs')
options=('strip')
@@ -34,6 +34,7 @@ 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'
'0002-Disable-SYSTEMD_URLIFY-by-default.patch'
+ '0003-PARTIAL-REVERT-commit-tree-wide-replace-strverscmp-and-str_verscmp-with-strverscmp_improved.patch'
'initcpio-hook-udev'
'initcpio-install-systemd'
'initcpio-install-udev'
@@ -63,8 +64,9 @@ sha512sums=('SKIP'
'SKIP'
'882e486b6d88c8bafc50088845e41a49686e98981967f72ca1fb4ef07a01767400632f4b648fd31857d2a2a24a8fd65bcc2a8983284dd4fff2380732741d4c41'
'313f3d6cc3d88f718509007e029213a82d84b196afdadc6ef560580acf70ab480aaecd7622f51726cc1af7d7841c6ec5390f72890b055a54fc74722341395651'
+ '34541f1967536524329867f9f341f8d9250d9d771c60dc3e6a22ccb82fc01f103cfd3f9903329777591ccbecd2446622a5d6b3804fa0411482b85c70593ee8ad'
'f0d933e8c6064ed830dec54049b0a01e27be87203208f6ae982f10fb4eddc7258cb2919d594cbfb9a33e74c3510cfd682f3416ba8e804387ab87d1a217eb4b73'
- '6e21d05ca620491ee604f29cfa15d3d03565342939a0391f496c42ab4b2cd056070bd0504160c6c931af722d3dcd59197a0032ca95c6dd905ee2018a0f8ae148'
+ 'f599e1a35cba2c4e83e37c2299fac23ae128d8f68081283e71e1729384975dee1c4b677787f31a17890aeb98c8d2fc90405a202644290708ef9c027315022b17'
'a25b28af2e8c516c3a2eec4e64b8c7f70c21f974af4a955a4a9d45fd3e3ff0d2a98b4419fe425d47152d5acae77d64e69d8d014a7209524b75a81b0edb10bf3a'
'70b3f1d6aaa9cd4b6b34055a587554770c34194100b17b2ef3aaf4f16f68da0865f6b3ae443b3252d395e80efabd412b763259ffb76c902b60e23b6b522e3cc8'
'6c6f579644ea2ebb6b46ee274ab15110718b0de40def8c30173ba8480b045d403f2aedd15b50ad9b96453f4ad56920d1350ff76563755bb9a80b10fa7f64f1d9'
@@ -117,6 +119,10 @@ prepare() {
# https://github.com/gwsw/less/issues/140
patch -Np1 -i ../0002-Disable-SYSTEMD_URLIFY-by-default.patch
+ # https://bugs.archlinux.org/task/70264
+ # https://github.com/systemd/systemd/issues/19191
+ patch -Np1 -i ../0003-PARTIAL-REVERT-commit-tree-wide-replace-strverscmp-and-str_verscmp-with-strverscmp_improved.patch
+
# apply FSDG patches
local _patch
for _patch in "$srcdir"/????-FSDG-*.patch; do
@@ -246,7 +252,8 @@ package_systemd() {
'systemd-sysvcompat: symlink package to provide sysvinit binaries'
'polkit: allow administration as unprivileged user'
'curl: machinectl pull-tar and pull-raw'
- 'libfido2: unlocking LUKS2 volumes')
+ 'libfido2: unlocking LUKS2 volumes with FIDO2 token'
+ 'tpm2-tss: unlocking LUKS2 volumes with TPM2')
backup=(etc/pam.d/systemd-user
etc/systemd/coredump.conf
etc/systemd/homed.conf
diff --git a/libre/systemd/initcpio-install-systemd b/libre/systemd/initcpio-install-systemd
index 7c2c86c27..05ccb904f 100644
--- a/libre/systemd/initcpio-install-systemd
+++ b/libre/systemd/initcpio-install-systemd
@@ -1,27 +1,21 @@
#!/bin/bash
-strip_quotes() {
- local len=${#1} quotes=$'[\'"]' str=${!1}
-
- if [[ ${str:0:1} = ${str: -1} && ${str:0:1} = $quotes ]]; then
- printf -v "$1" %s "${str:1:-1}"
- fi
-}
-
add_udev_rule() {
# Add an udev rules file to the initcpio image. Dependencies on binaries
# will be discovered and added.
# $1: path to rules file (or name of rules file)
- local rules= rule= key= value= binary=
+ local rules="$1" rule= key= value= binary=
- rules=$(PATH=/usr/lib/udev/rules.d:/lib/udev/rules.d type -P "$1")
+ if [[ ${rules:0:1} != '/' ]]; then
+ rules=$(PATH=/usr/lib/udev/rules.d:/lib/udev/rules.d type -P "$1")
+ fi
if [[ -z $rules ]]; then
# complain about not found rules
return 1
fi
- add_file "$rules"
+ add_file "$rules" /usr/lib/udev/rules.d/"${rules##*/}"
while IFS=, read -ra rule; do
# skip empty lines, comments
@@ -31,9 +25,10 @@ add_udev_rule() {
IFS=' =' read -r key value <<< "$pair"
case $key in
RUN@({program}|+)|IMPORT{program}|ENV{REMOVE_CMD})
- strip_quotes 'value'
+ # strip quotes
+ binary=${value//[\"\']/}
# just take the first word as the binary name
- binary=${value%% *}
+ binary=${binary%% *}
[[ ${binary:0:1} == '$' ]] && continue
if [[ ${binary:0:1} != '/' ]]; then
binary=$(PATH=/usr/lib/udev:/lib/udev type -P "$binary")
@@ -125,7 +120,6 @@ build() {
# udev rules and systemd units
map add_udev_rule "$rules" \
50-udev-default.rules \
- 60-fido-id.rules \
60-persistent-storage.rules \
64-btrfs.rules \
80-drivers.rules \
@@ -164,17 +158,6 @@ build() {
rescue.target \
emergency.target
- # add libraries dlopen()ed by systemd and its tools
- for LIB in fido2; do
- for FILE in $(find /usr/lib/ -name "lib${LIB}.so*"); do
- if [[ -L "${FILE}" ]]; then
- add_symlink "${FILE}"
- else
- add_binary "${FILE}"
- fi
- done
- done
-
add_symlink "/usr/lib/systemd/system/default.target" "initrd.target"
add_symlink "/usr/lib/systemd/system/ctrl-alt-del.target" "reboot.target"
@@ -186,7 +169,7 @@ build() {
echo "root:x:0:0:root:/root:/bin/sh" >"$BUILDROOT/etc/passwd"
echo 'root:*:::::::' >"$BUILDROOT/etc/shadow"
- getent group root audio disk input kmem kvm lp optical render storage tty uucp video | awk -F: ' { print $1 ":x:" $3 ":" }' >"$BUILDROOT/etc/group"
+ getent group root audio disk input kmem kvm lp optical render sgx storage tty uucp video | awk -F: ' { print $1 ":x:" $3 ":" }' >"$BUILDROOT/etc/group"
add_dir "/etc/modules-load.d"
(