summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO28
-rw-r--r--.gitignore3
-rw-r--r--0002_added_machine_id_smbios_variable.patch87
-rw-r--r--PKGBUILD38
4 files changed, 138 insertions, 18 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c31d07f7c0ee..b59f85e942b8 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = systemd-fml
- pkgver = 255.5
+ pkgver = 255.4
pkgrel = 2
- url = https://github.com/FML128/systemd/tree/machine_id_smbios
+ url = https://www.github.com/systemd/systemd
arch = x86_64
license = LGPL-2.1-or-later
makedepends = acl
@@ -52,8 +52,9 @@ pkgbase = systemd-fml
makedepends = lib32-gcc-libs
makedepends = python-pefile
conflicts = mkinitcpio<38-1
- source = systemd-fml::git+https://github.com/FML128/systemd#tag=v255.5
+ source = systemd-fml-stable::git+https://github.com/systemd/systemd-stable#tag=v255.4?signed
source = 0001-Use-Arch-Linux-device-access-groups.patch
+ source = 0002_added_machine_id_smbios_variable.patch
source = arch.conf
source = loader.conf
source = splash-arch.bmp
@@ -69,8 +70,13 @@ pkgbase = systemd-fml
source = 30-systemd-tmpfiles.hook
source = 30-systemd-udev-reload.hook
source = 30-systemd-update.hook
- sha512sums = ab1c91002de90756e6d4fd89a78b1b22c1ddfac6bc38d80bfbb121edda722afe89946ab8ca20c97d144049d007e02f09bace322f43f9d50cf6f16f535bdff180
+ validpgpkeys = 63CDA1E5D3FC22B998D20DD6327F26951A015CC4
+ validpgpkeys = A9EA9081724FFAE0484C35A1A81CEA22BC8C7E2E
+ validpgpkeys = 9A774DB5DB996C154EBBFBFDA0099A18E29326E1
+ validpgpkeys = 5C251B5FC54EB2F80F407AAAC54CA336CFEB557E
+ sha512sums = 0c41c21931c5f08b5c91fe718d90f8cb11fb83429b3028bde9922605a35ea81d8452b00af99775b519b19195b8ba0084147d13dec1c5dfe9c905d769018b0676
sha512sums = 3ccf783c28f7a1c857120abac4002ca91ae1f92205dcd5a84aff515d57e706a3f9240d75a0a67cff5085716885e06e62597baa86897f298662ec36a940cf410e
+ sha512sums = 3ea049ebdad33dbcab375e529b5c6839ecbc2a74f492ec5061c092662c2d394c3ebc086d60ab5ce569c428cc9de8f2a0ccd6ce8a0777160f4d55a00ba1b1f0c8
sha512sums = 61032d29241b74a0f28446f8cf1be0e8ec46d0847a61dadb2a4f096e8686d5f57fe5c72bcf386003f6520bc4b5856c32d63bf3efe7eb0bc0deefc9f68159e648
sha512sums = c416e2121df83067376bcaacb58c05b01990f4614ad9de657d74b6da3efa441af251d13bf21e3f0f71ddcb4c9ea658b81da3d915667dc5c309c87ec32a1cb5a5
sha512sums = 5a1d78b5170da5abe3d18fdf9f2c3a4d78f15ba7d1ee9ec2708c4c9c2e28973469bc19386f70b3cf32ffafbe4fcc4303e5ebbd6d5187a1df3314ae0965b25e75
@@ -142,9 +148,9 @@ pkgname = systemd-fml
optdepends = libp11-kit: support PKCS#11
optdepends = tpm2-tss: unlocking LUKS2 volumes with TPM2
provides = nss-myhostname
- provides = systemd-tools=255.5
- provides = udev=255.5
- provides = systemd=255.5
+ provides = systemd-tools=255.4
+ provides = udev=255.4
+ provides = systemd=255.4
conflicts = nss-myhostname
conflicts = systemd-tools
conflicts = udev
@@ -185,7 +191,7 @@ pkgname = systemd-libs-fml
provides = libsystemd
provides = libsystemd.so
provides = libudev.so
- provides = systemd-libs=255.5
+ provides = systemd-libs=255.4
conflicts = libsystemd
conflicts = systemd-libs
replaces = libsystemd
@@ -195,14 +201,14 @@ pkgname = systemd-resolvconf-fml
depends = systemd
provides = openresolv
provides = resolvconf
- provides = systemd-resolvconf=255.5
+ provides = systemd-resolvconf=255.4
conflicts = resolvconf
conflicts = systemd-resolvconf
pkgname = systemd-sysvcompat-fml
pkgdesc = sysvinit compat for systemd
depends = systemd
- provides = systemd-sysvcompat=255.5
+ provides = systemd-sysvcompat=255.4
conflicts = sysvinit
conflicts = systemd-sysvcompat
@@ -215,5 +221,5 @@ pkgname = systemd-ukify-fml
optdepends = python-pillow: Show the size of splash image
optdepends = sbsigntools: Sign the embedded kernel
provides = ukify
- provides = systemd-ukify=255.5
+ provides = systemd-ukify=255.4
conflicts = systemd-ukify
diff --git a/.gitignore b/.gitignore
index df3146032f87..988a6d9b0da6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -54,6 +54,7 @@ dkms.conf
src
pkg
-systemd-fml
+systemd-fml/
+systemd-fml-stable/
.idea
*.pkg.* \ No newline at end of file
diff --git a/0002_added_machine_id_smbios_variable.patch b/0002_added_machine_id_smbios_variable.patch
new file mode 100644
index 000000000000..2d955d391ea4
--- /dev/null
+++ b/0002_added_machine_id_smbios_variable.patch
@@ -0,0 +1,87 @@
+Subject: [PATCH] added machine_id_smbios variable
+---
+Index: man/kernel-command-line.xml
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/man/kernel-command-line.xml b/man/kernel-command-line.xml
+--- a/man/kernel-command-line.xml (revision 8c27f1ba4a2c834fed4893844999ab9440ee5593)
++++ b/man/kernel-command-line.xml (revision 2ed89719322ad4cadc1ace46014b2d39be50c614)
+@@ -68,6 +68,7 @@
+ <term><varname>systemd.default_standard_error=</varname></term>
+ <term><varname>systemd.setenv=</varname></term>
+ <term><varname>systemd.machine_id=</varname></term>
++ <term><varname>systemd.machine_id_smbios</varname></term>
+ <term><varname>systemd.set_credential=</varname></term>
+ <term><varname>systemd.set_credential_binary=</varname></term>
+ <term><varname>systemd.import_credentials=</varname></term>
+Index: man/machine-id.xml
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/man/machine-id.xml b/man/machine-id.xml
+--- a/man/machine-id.xml (revision 8c27f1ba4a2c834fed4893844999ab9440ee5593)
++++ b/man/machine-id.xml (revision 2ed89719322ad4cadc1ace46014b2d39be50c614)
+@@ -104,6 +104,8 @@
+ (on KVM systems), the Xen hypervisor <filename>uuid</filename>, and finally a randomly
+ generated UUID.</para>
+
++ <para>The vm logic can be enabled manually by setting the <varname>systemd.machine_id_smbios</varname> kernel command line option.</para>
++
+ <para>After the machine ID is established,
+ <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+ will attempt to save it to <filename>/etc/machine-id</filename>. If this fails, it
+Index: src/shared/machine-id-setup.c
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/src/shared/machine-id-setup.c b/src/shared/machine-id-setup.c
+--- a/src/shared/machine-id-setup.c (revision 8c27f1ba4a2c834fed4893844999ab9440ee5593)
++++ b/src/shared/machine-id-setup.c (revision 2ed89719322ad4cadc1ace46014b2d39be50c614)
+@@ -1,6 +1,7 @@
+ /* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+ #include <fcntl.h>
++#include <proc-cmdline.h>
+ #include <sched.h>
+ #include <sys/mount.h>
+ #include <unistd.h>
+@@ -48,6 +49,18 @@
+ return 0;
+ }
+
++static bool machine_id_smbios(void) {
++ bool b = false;
++ int r;
++
++ r = proc_cmdline_get_bool("systemd.machine_id_smbios", PROC_CMDLINE_VALUE_OPTIONAL, &b);
++ if (r < 0) {
++ log_warning_errno(r, "Failed to read systemd.machine_id_smbios from kernel command line, ignoring: %m");
++ return false;
++ }
++ return b;
++}
++
+ static int generate_machine_id(const char *root, sd_id128_t *ret) {
+ _cleanup_close_ int fd = -EBADF;
+ int r;
+@@ -80,14 +93,14 @@
+ return 0;
+ }
+
+- } else if (IN_SET(detect_vm(), VIRTUALIZATION_KVM, VIRTUALIZATION_AMAZON, VIRTUALIZATION_QEMU, VIRTUALIZATION_XEN)) {
++ } else if (IN_SET(detect_vm(), VIRTUALIZATION_KVM, VIRTUALIZATION_AMAZON, VIRTUALIZATION_QEMU, VIRTUALIZATION_XEN) || machine_id_smbios()) {
+
+ /* If we are not running in a container, see if we are running in a VM that provides
+ * a system UUID via the SMBIOS/DMI interfaces. Such environments include QEMU/KVM
+ * with the -uuid on the qemu command line or the Amazon EC2 Nitro hypervisor. */
+
+ if (id128_get_product(ret) >= 0) {
+- log_info("Initializing machine ID from VM UUID.");
++ log_info("Initializing machine ID from SMBIOS/DMI UUID.");
+ return 0;
+ }
+ }
diff --git a/PKGBUILD b/PKGBUILD
index 9833291c3301..63b597b2c1c6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,7 @@ pkgname=('systemd-fml'
'systemd-resolvconf-fml'
'systemd-sysvcompat-fml'
'systemd-ukify-fml')
-_tag='255.5'
+_tag='255.4'
# Upstream versioning is incompatible with pacman's version comparisons so we
# replace tildes with the empty string to make sure pacman's version comparing
# does the right thing for rc versions:
@@ -18,7 +18,7 @@ pkgver="${_tag/~/}"
pkgrel=2
arch=('x86_64')
license=('LGPL-2.1-or-later')
-url='https://github.com/FML128/systemd/tree/machine_id_smbios'
+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'
@@ -28,8 +28,14 @@ makedepends=('acl' 'cryptsetup' 'docbook-xsl' 'gperf' 'lz4' 'xz' 'pam' 'libelf'
'bpf' 'libbpf' 'clang' 'llvm' 'curl' 'gnutls' 'python-pyelftools'
'libpwquality' 'qrencode' 'lib32-gcc-libs' 'python-pefile')
conflicts=("mkinitcpio<38-1")
-source=("$pkgbase::git+https://github.com/FML128/systemd#tag=v${_tag}"
+validpgpkeys=('63CDA1E5D3FC22B998D20DD6327F26951A015CC4' # Lennart Poettering <lennart@poettering.net>
+ 'A9EA9081724FFAE0484C35A1A81CEA22BC8C7E2E' # Luca Boccassi <luca.boccassi@gmail.com>
+ '9A774DB5DB996C154EBBFBFDA0099A18E29326E1' # Yu Watanabe <watanabe.yu+github@gmail.com>
+ '5C251B5FC54EB2F80F407AAAC54CA336CFEB557E') # Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
+source=("$pkgbase-stable::git+https://github.com/systemd/systemd-stable#tag=v${_tag}?signed"
+# "$pkgbase::git+https://github.com/systemd/systemd#tag=v${_tag%.*}?signed"
'0001-Use-Arch-Linux-device-access-groups.patch'
+ '0002_added_machine_id_smbios_variable.patch'
# bootloader files
'arch.conf'
'loader.conf'
@@ -49,8 +55,9 @@ source=("$pkgbase::git+https://github.com/FML128/systemd#tag=v${_tag}"
'30-systemd-udev-reload.hook'
'30-systemd-update.hook')
-sha512sums=('ab1c91002de90756e6d4fd89a78b1b22c1ddfac6bc38d80bfbb121edda722afe89946ab8ca20c97d144049d007e02f09bace322f43f9d50cf6f16f535bdff180'
+sha512sums=('0c41c21931c5f08b5c91fe718d90f8cb11fb83429b3028bde9922605a35ea81d8452b00af99775b519b19195b8ba0084147d13dec1c5dfe9c905d769018b0676'
'3ccf783c28f7a1c857120abac4002ca91ae1f92205dcd5a84aff515d57e706a3f9240d75a0a67cff5085716885e06e62597baa86897f298662ec36a940cf410e'
+ '3ea049ebdad33dbcab375e529b5c6839ecbc2a74f492ec5061c092662c2d394c3ebc086d60ab5ce569c428cc9de8f2a0ccd6ce8a0777160f4d55a00ba1b1f0c8'
'61032d29241b74a0f28446f8cf1be0e8ec46d0847a61dadb2a4f096e8686d5f57fe5c72bcf386003f6520bc4b5856c32d63bf3efe7eb0bc0deefc9f68159e648'
'c416e2121df83067376bcaacb58c05b01990f4614ad9de657d74b6da3efa441af251d13bf21e3f0f71ddcb4c9ea658b81da3d915667dc5c309c87ec32a1cb5a5'
'5a1d78b5170da5abe3d18fdf9f2c3a4d78f15ba7d1ee9ec2708c4c9c2e28973469bc19386f70b3cf32ffafbe4fcc4303e5ebbd6d5187a1df3314ae0965b25e75'
@@ -79,10 +86,29 @@ _reverts=(
)
prepare() {
- cd "$pkgbase"
+ cd "$pkgbase-stable"
+
+ # add upstream repository for cherry-picking
+ git remote add -f upstream ../systemd
+
+ local _c _l
+ for _c in "${_backports[@]}"; do
+ if [[ "${_c}" == *..* ]]; then _l='--reverse'; else _l='--max-count=1'; fi
+ git log --oneline "${_l}" "${_c}"
+ git cherry-pick --mainline 1 --no-commit "${_c}"
+ done
+ for _c in "${_reverts[@]}"; do
+ if [[ "${_c}" == *..* ]]; then _l='--reverse'; else _l='--max-count=1'; fi
+ git log --oneline "${_l}" "${_c}"
+ git revert --mainline 1 --no-commit "${_c}"
+ done
+
# Replace cdrom/dialout/tape groups with optical/uucp/storage
patch -Np1 -i ../0001-Use-Arch-Linux-device-access-groups.patch
+
+ # Add machine-id override
+ patch -Np1 -i ../0002_added_machine_id_smbios_variable.patch
}
build() {
@@ -142,7 +168,7 @@ build() {
-Dsbat-distro-url="https://aur.archlinux.org/pkgbase/${pkgname}"
)
- arch-meson "$pkgbase" build "${_meson_options[@]}" $MESON_EXTRA_CONFIGURE_OPTIONS
+ arch-meson "$pkgbase-stable" build "${_meson_options[@]}" $MESON_EXTRA_CONFIGURE_OPTIONS
meson compile -C build "${_meson_compile[@]}"
}