summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMerlin Jehli2024-04-04 19:01:38 +0200
committerMerlin Jehli2024-04-04 19:01:38 +0200
commit16dc596016af3ba29db6ab20cea9b039f11dd843 (patch)
tree5115983d51b50a00770f88d832a3a98bd6be425f
parente57b347e0df4c4f1625b612d6dbe9d116aa604c3 (diff)
downloadaur-16dc596016af3ba29db6ab20cea9b039f11dd843.tar.gz
new version
-rw-r--r--.SRCINFO4
-rw-r--r--0002_added_machine_id_smbios_variable.patch83
-rw-r--r--PKGBUILD4
3 files changed, 50 insertions, 41 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b412b6360092..a8f5a9b4299c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = systemd-fml
pkgver = 255.4
- pkgrel = 2
+ pkgrel = 3
url = https://www.github.com/systemd/systemd
arch = x86_64
license = LGPL-2.1-or-later
@@ -76,7 +76,7 @@ pkgbase = systemd-fml
validpgpkeys = 5C251B5FC54EB2F80F407AAAC54CA336CFEB557E
sha512sums = 0c41c21931c5f08b5c91fe718d90f8cb11fb83429b3028bde9922605a35ea81d8452b00af99775b519b19195b8ba0084147d13dec1c5dfe9c905d769018b0676
sha512sums = 3ccf783c28f7a1c857120abac4002ca91ae1f92205dcd5a84aff515d57e706a3f9240d75a0a67cff5085716885e06e62597baa86897f298662ec36a940cf410e
- sha512sums = 3ea049ebdad33dbcab375e529b5c6839ecbc2a74f492ec5061c092662c2d394c3ebc086d60ab5ce569c428cc9de8f2a0ccd6ce8a0777160f4d55a00ba1b1f0c8
+ sha512sums = 335e6d0b43c898655127fc4032a235b7add7c917c52a8973ab5eee0d02685aba648f428c167ff6319b8af76ae63a9c1b7fa92f0cae835d6409ccc0421ef8718b
sha512sums = 61032d29241b74a0f28446f8cf1be0e8ec46d0847a61dadb2a4f096e8686d5f57fe5c72bcf386003f6520bc4b5856c32d63bf3efe7eb0bc0deefc9f68159e648
sha512sums = c416e2121df83067376bcaacb58c05b01990f4614ad9de657d74b6da3efa441af251d13bf21e3f0f71ddcb4c9ea658b81da3d915667dc5c309c87ec32a1cb5a5
sha512sums = 5a1d78b5170da5abe3d18fdf9f2c3a4d78f15ba7d1ee9ec2708c4c9c2e28973469bc19386f70b3cf32ffafbe4fcc4303e5ebbd6d5187a1df3314ae0965b25e75
diff --git a/0002_added_machine_id_smbios_variable.patch b/0002_added_machine_id_smbios_variable.patch
index 2d955d391ea4..633583c6c92b 100644
--- a/0002_added_machine_id_smbios_variable.patch
+++ b/0002_added_machine_id_smbios_variable.patch
@@ -1,79 +1,88 @@
-Subject: [PATCH] added machine_id_smbios variable
+Subject: [PATCH] added systemd.machine_id=firmware option
---
-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 @@
+--- a/man/machine-id.xml (revision 99a1ef8c9cdcb0fc15265533dae2bbd8f2d7a3a5)
++++ b/man/machine-id.xml (revision 3a01c4414175e630e1c2e62fa8cc89dfc61d55ee)
+@@ -102,7 +102,7 @@
+ value of the kernel command line option <varname>container_uuid</varname>, the KVM DMI
+ <filename>product_uuid</filename> or the devicetree <filename>vm,uuid</filename>
(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>
-+
+- generated UUID.</para>
++ generated UUID. <varname>systemd.machine_id=firmware</varname> can be set to generate the machine id from the firmware.</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/core/main.c
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/src/core/main.c b/src/core/main.c
+--- a/src/core/main.c (revision 99a1ef8c9cdcb0fc15265533dae2bbd8f2d7a3a5)
++++ b/src/core/main.c (revision 3a01c4414175e630e1c2e62fa8cc89dfc61d55ee)
+@@ -354,10 +354,11 @@
+ if (proc_cmdline_value_missing(key, value))
+ return 0;
+
+- r = id128_from_string_nonzero(value, &arg_machine_id);
+- if (r < 0)
+- log_warning_errno(r, "MachineID '%s' is not valid, ignoring: %m", value);
+-
++ if (!streq(value, "firmware")) {
++ r = id128_from_string_nonzero(value, &arg_machine_id);
++ if (r < 0)
++ log_warning_errno(r, "MachineID '%s' is not valid, ignoring: %m", value);
++ }
+ } else if (proc_cmdline_key_streq(key, "systemd.default_timeout_start_sec")) {
+
+ if (proc_cmdline_value_missing(key, value))
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)
+--- a/src/shared/machine-id-setup.c (revision 99a1ef8c9cdcb0fc15265533dae2bbd8f2d7a3a5)
++++ b/src/shared/machine-id-setup.c (revision 3a01c4414175e630e1c2e62fa8cc89dfc61d55ee)
@@ -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 @@
+@@ -48,6 +49,19 @@
return 0;
}
-
-+static bool machine_id_smbios(void) {
-+ bool b = false;
+
++static bool machine_id_firmware(void) {
++ _cleanup_free_ char *buf = NULL;
+ int r;
+
-+ r = proc_cmdline_get_bool("systemd.machine_id_smbios", PROC_CMDLINE_VALUE_OPTIONAL, &b);
++ r = proc_cmdline_get_key("systemd.machine_id_smbios", PROC_CMDLINE_VALUE_OPTIONAL, &buf);
+ if (r < 0) {
+ log_warning_errno(r, "Failed to read systemd.machine_id_smbios from kernel command line, ignoring: %m");
+ return false;
+ }
-+ return b;
++
++ return strcmp(buf, "firmware");
+}
+
static int generate_machine_id(const char *root, sd_id128_t *ret) {
_cleanup_close_ int fd = -EBADF;
int r;
-@@ -80,14 +93,14 @@
+@@ -80,14 +94,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()) {
++ } else if (IN_SET(detect_vm(), VIRTUALIZATION_KVM, VIRTUALIZATION_AMAZON, VIRTUALIZATION_QEMU, VIRTUALIZATION_XEN) || machine_id_firmware()) {
/* 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
diff --git a/PKGBUILD b/PKGBUILD
index 643151675488..5663489e61c7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -15,7 +15,7 @@ _tag='255.4'
# ➜ vercmp 255rc1 255
# -1
pkgver="${_tag/~/}"
-pkgrel=2
+pkgrel=3
arch=('x86_64')
license=('LGPL-2.1-or-later')
url='https://www.github.com/systemd/systemd'
@@ -57,7 +57,7 @@ source=("$pkgbase-stable::git+https://github.com/systemd/systemd-stable#tag=v${_
sha512sums=('0c41c21931c5f08b5c91fe718d90f8cb11fb83429b3028bde9922605a35ea81d8452b00af99775b519b19195b8ba0084147d13dec1c5dfe9c905d769018b0676'
'3ccf783c28f7a1c857120abac4002ca91ae1f92205dcd5a84aff515d57e706a3f9240d75a0a67cff5085716885e06e62597baa86897f298662ec36a940cf410e'
- '3ea049ebdad33dbcab375e529b5c6839ecbc2a74f492ec5061c092662c2d394c3ebc086d60ab5ce569c428cc9de8f2a0ccd6ce8a0777160f4d55a00ba1b1f0c8'
+ '335e6d0b43c898655127fc4032a235b7add7c917c52a8973ab5eee0d02685aba648f428c167ff6319b8af76ae63a9c1b7fa92f0cae835d6409ccc0421ef8718b'
'61032d29241b74a0f28446f8cf1be0e8ec46d0847a61dadb2a4f096e8686d5f57fe5c72bcf386003f6520bc4b5856c32d63bf3efe7eb0bc0deefc9f68159e648'
'c416e2121df83067376bcaacb58c05b01990f4614ad9de657d74b6da3efa441af251d13bf21e3f0f71ddcb4c9ea658b81da3d915667dc5c309c87ec32a1cb5a5'
'5a1d78b5170da5abe3d18fdf9f2c3a4d78f15ba7d1ee9ec2708c4c9c2e28973469bc19386f70b3cf32ffafbe4fcc4303e5ebbd6d5187a1df3314ae0965b25e75'