1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-03-14 16:58:22 +03:00

69991 Commits

Author SHA1 Message Date
fwfy
b936ff72d3 Remove extra period at the end of systemd-bsod's unit description. (#33632)
* Remove extra period at end of unit description.

Having an extra period at the end of this unit description makes log entries pertaining to it appear weirdly, as it seems the default expectation is that there is not to be a period at the end of a unit description.

e.g.: `systemd[1]: Started Displays emergency message in full screen..`

(cherry picked from commit 496b4fa0e974d7a1b10b8af966da445a28f512c5)
(cherry picked from commit 35e2f6296782a7aadd52baad33c17b350a564a09)
2024-07-24 17:28:16 +01:00
Mike Yuan
00b495a85b core/cgroup: make unit_has_host_root_cgroup take const Unit*
(cherry picked from commit 4442aef08e0fe8ba381b580455f7eb281c5a28a1)
(cherry picked from commit 06c2ee39799064a82d2af1bee7a5c72ebdd66090)
2024-07-24 17:28:16 +01:00
Mike Yuan
8fc521393e test-install-root: introduce test case for #33411
(cherry picked from commit 9fb5a8ca24e677e10f8c2b8973b5e2a11676bda0)
(cherry picked from commit 7684f528392ddb94455c924ec820be2c8de6989a)
2024-07-24 17:28:16 +01:00
Mike Yuan
1f94ae4a53 shared/install: correctly report changes in install_info_symlink_alias()
Follow-up for b2751cf0394d36c24590b5f7b33e9f864b57ba0d

Also make the conditions consistent for install_info_symlink_wants().

Fixes #33411

(cherry picked from commit 4441cf330b3847d6c553fb230e8e4c86aa75ebb9)
(cherry picked from commit a42db16a1cd0e080d972bd778ea44e981ea31dfc)
2024-07-24 17:28:16 +01:00
Mike Yuan
40b9bde76d shared/install: propagate all errors in install_info_apply()
Currently, install_info_apply() only updates r if it's 0,
meaning that if one of the earlier install_info_symlink_alias/wants()
calls returns > 0, errors generated by later calls will be discarded.
Fix that.

(cherry picked from commit a159aa07e1548367d2fde80cb0d45b869c591864)
(cherry picked from commit bb83650f96af1a7f803696fab5dd06442c789b1c)
2024-07-24 17:28:16 +01:00
Mike Yuan
f6ef5e62fd shared/install: drop unneeded initialization
(cherry picked from commit dd6b325a05c4caccd1a17dd4147f48a916eee386)
(cherry picked from commit 908edce5b6d4fd5243eab3e7fc8ec57d0e8da130)
2024-07-24 17:28:16 +01:00
Mike Yuan
633704b50e systemctl: do not try to acquire triggering units for template units
(cherry picked from commit 09d6038d833468ba7c24c658597387ef699ca4fd)
(cherry picked from commit f414ca0ee3bed9b67f76a67d8eb569fda99f5fde)
2024-07-24 17:28:16 +01:00
Mike Yuan
159d8230aa systemctl: skip triggering unit warning if unit vanished
(cherry picked from commit 701bd9d08ac1d16f74e2b453ca0826e85b1c8491)
(cherry picked from commit 67e0d093682d763ff1d27027a5040571fc039193)
2024-07-24 17:28:16 +01:00
Mike Yuan
9b5cb42b59 man/systemctl: --no-reload is honored by mask/unmask/preset too
(cherry picked from commit 399646faac8ca91a46287e40280f56055c9e0fe8)
(cherry picked from commit bb71d5dfb45bb96ce4a6e535e3a93c14b7074b62)
2024-07-24 17:28:16 +01:00
Zbigniew Jędrzejewski-Szmek
3a5c5cc84c test_ukify: do not use files from /boot
They might not be readable to the unprivileged user running the tests
and it shouldn't really matter what is used. OTOH, we need a real kernel
because we look at the header.

(cherry picked from commit 987f4bce938e790622a4b4b89d37daa7adfdc141)
(cherry picked from commit bcb13a3fa258cc179cef4db4f77014560ba627e5)
2024-07-24 17:28:16 +01:00
Zbigniew Jędrzejewski-Szmek
f77fc4c11b test_ukify: use sha384 in the signing tests
On Fedora, with crypto policy TEST-FEDORA41, sha1 is not allowed:

$ SYSTEMD_LOG_LEVEL=debug build/systemd-measure sign
  --linux=/lib/modules/6.9.7-200.fc40.x86_64/vmlinuz
  --osrel=/tmp/tmp.osrelbl2sr77f
  --cmdline=/tmp/tmp.cmdlineouc7hqtj
  --uname=/tmp/tmp.unamecbjgesty
  --pcrpkey=/tmp/tmpufiadu8l
  --initrd=/boot/3a9d668b4db749398a4a5e78a03bffa5/6.9.7-200.fc40.x86_64/initrd
  --sbat=/tmp/tmp.sbataz9arpy0
  --private-key=/tmp/tmppyf0gx6w
  --public-key=/tmp/tmpufiadu8l
  --bank=sha1
Measuring boot phases: enter-initrd, enter-initrd:leave-initrd, enter-initrd:leave-initrd:sysinit, enter-initrd:leave-initrd:sysinit:ready
Loaded 'libtss2-esys.so.0' via dlopen()
Loaded 'libtss2-rc.so.0' via dlopen()
Loaded 'libtss2-mu.so.0' via dlopen()
PolicyPCR calculated digest: cec1a2ccb188ddd171a2be7bfa6b31cb9148776647354eb1069e0f891ed2dbe7
Failed to initialize signature context: error:03000098:digital envelope routines::invalid digest
Failed to sign PCR policy: Input/output error

(cherry picked from commit 87204601df305c270ffa05430081bc5b76dede04)
(cherry picked from commit 88264411b674f4d0b260c4b9ac7dbb1b96879209)
2024-07-24 17:28:16 +01:00
Zbigniew Jędrzejewski-Szmek
8079f02b67 test_ukify: add instructions
Copied directly from a1d6dbb1c94685d7972f63ed2762fe4ba0251287.

(cherry picked from commit a669091a436c4f0c8537c83bba05a1e33d263dad)
(cherry picked from commit 8b3bedd821bad917c3ddf8914b84da54230854bd)
2024-07-24 17:28:16 +01:00
Daan De Meyer
79104058ca repart: Allow overriding fstype per partition designator
$SYSTEMD_REPART_OVERRIDE_FSTYPE is too invasive. Often you want to
override the fstype only for a specific designator, so let's support
that as well.

(cherry picked from commit 90a255779d1f8e6697e08e91918df88bb52274ad)
(cherry picked from commit a63e82ca4afc2e663e81d1a8cffb035b5e5922f9)
2024-07-24 17:28:16 +01:00
Daan De Meyer
75c81c887a systemd-networkd-tests: Skip tests requiring dhcpd if it is not available
dhcpd is not available on CentOS Stream 10

See https://github.com/systemd/systemd/issues/33717

(cherry picked from commit 985d5b4bc23f791bdc79d4c2a9a949cc5d3bc27a)
(cherry picked from commit 89904fc10c57b28d064f7abbde97a636000e1323)
2024-07-24 17:28:16 +01:00
Daan De Meyer
29f475653a test: do not attempt to set xattr on tmpfs
This is only possible since a recent kernel version, and fails otherwise,
like on CentOS 9

(cherry picked from commit ff8c89aa5a84733dd777f3e9113df33ce6c1ab1e)
(cherry picked from commit a8a7a6716ef2a8e6f10410b9af92fafc3ce204d4)
2024-07-24 17:28:16 +01:00
Luca Boccassi
4b05dc62f1 mkosi: policykit-1 was renamed to polkitd
(cherry picked from commit bffd3c52ad7113f21523568120d84326151f4600)
(cherry picked from commit ab11d7e177378704859703f4821784462c8966a5)
2024-07-24 17:28:16 +01:00
Zbigniew Jędrzejewski-Szmek
c4ddf5d5dc meson: add option to build systemd-executor "statically"
The new link-executor-shared option is similar to the existing
link-udev-shared: when set to false, we link to the static versions of our
internal libraries.

The resulting exuctor binary is fairly large, about as large as libsystemd-core
(14 MB without lto, 8 with lto).

This is intended as a workaround for the fuckup with the pinned executor
binary:
when an upgrade is performed, the package manager will install new version of
the libraries and new version of the code, and some time later reexecute the
managers. This creates a window when the pinned executor binary will fail to
execute. There are two factors which make the issue easier to hit:

- when the distribution uses a finely-grained shared-lib-tag. E.g. Fedora
  uses version-release as the tag, which means that the issue occurs on
  every package upgrade. This is the right thing to do, because the
  ABI of our internal libraries is not stable at all, so replacing the
  library from a different version in place creates a window where our
  programs may crash or misbehave.

- when the distribution doesn't immediately reexec all the managers after
  upgrade. In early versions of systemd, we used to hammer the machine during
  upgrade, doing daemon-reexecs repeatedly. This works, but is ugly and
  wasteful. Doing the reexecs while the upgrade is in progres also creates a
  window where a mix of old and new configs or both is loaded. Users are
  particularly annoyed by those reloads if there is some issue in the
  configuration causing us to emit warnings on every reexec. Doing the
  reexecs once after the new configuration and libraries have been put
  in place is nicer.

The pinning of the executor binary breaks upgrades and in particular
it penalizes the distributions which make use of the features which
were previously added to avoid bugs and inefficiency during upgrades.

When the executor is linked statically, there is a smaller chance that it'll
fail to load libraries. The issue can still occur because other libraries, not
our own, are linked dynamically.

(cherry picked from commit d59cae6cebd0fc25a16a020bd28e5303901f1b19)
(cherry picked from commit d28aa922fdee5c5c438ca9b485b92b21180482d3)
2024-07-24 17:28:16 +01:00
Zbigniew Jędrzejewski-Szmek
77c80325dc meson: build libsystemd-core via an intermediate static library
By itself, this is not useful. I'm making this a separate commit to
make debugging easier. It turns out that meson does static libraries
using references, so the "static library" a tiny stub stub that refers
to the object files on disk and this has negligible cost:
$ ls -lhd build/src/core/libsystemd-core-257.{a,so}
-rw-r--r-- 1 zbyszek zbyszek  36K Jul  3 16:54 build/src/core/libsystemd-core-257.a
-rwxr-xr-x 1 zbyszek zbyszek 6.1M Jul  3 16:54 build/src/core/libsystemd-core-257.so

(cherry picked from commit d0689ee5fbfafa736e6eca89bc80cb2d372f2229)
(cherry picked from commit c3b4032fc3153684c9917f23e08e2928f8972f0d)
2024-07-24 17:28:16 +01:00
Luca Boccassi
975961fbdc mkosi: drop CentOS 8 from CI
It no longer builds due to packaging issues, drop it,
CentOS 9 is still covered
v255.9
2024-07-06 16:25:07 +02:00
Lennart Poettering
4c5c7c6318 vmm: make sure we can handle smbios objects without variable part
An smbios object with no variable part is a special case, it's just
suffixed with two NUL btes. handle that properly.

This is inspired by a similar fix from https://github.com/systemd/systemd/pull/29726

(cherry picked from commit 44ec70489f377d1fa9f4e19aed95a7e39da7d93d)
(cherry picked from commit 9a2f16e4edc490a289e3b22ab9f30e3e5bc73850)
2024-07-06 16:25:07 +02:00
Luca Boccassi
d34f0dec53 README: update requirements for signed dm-verity
The newest kconfig enabling DB-verified dm-verity images is queued
for 6.11:

https://patchwork.kernel.org/project/dm-devel/patch/20240617220037.594792-1-luca.boccassi@gmail.com/
(cherry picked from commit a79b6dc0706dd5fe76ec56b3308b402c133ead23)
(cherry picked from commit c32f71aa1420b05711fa0593ddcffbeb76f272ab)
2024-07-06 16:25:07 +02:00
Luca Boccassi
0f518750a4 sysusers: handle NSS errors gracefully
If the io.systemd.DynamicUser or io.systemd.Machine files exist,
but nothing is listening on them, the nss-systemd module returns
ECONNREFUSED and systemd-sysusers fails to creat the user/group.

This is problematic when ran by packaging scripts, as the package
assumes that after this has run, the user/group exist and can
be used. adduser does not fail in the same situation.

Change sysusers to print a loud warning but otherwise continue
when NSS returns an error.

(cherry picked from commit fc9938d6f8e7081df5420bf88bf98f683b1391c0)
(cherry picked from commit abba1e6bc29b7e07354ca23906c6f485ba245a1a)
2024-07-06 16:25:07 +02:00
Lennart Poettering
15352fa223 man: fully adopt ~/.local/state/
The XDG base dir spec adopted ~/.local/state/ as a thing a while back,
and we updated our docs in b4d6bc63e602048188896110a585aa7de1c70c9b, but
forgot to to update the table at the bottom to fully reflect the update.
Fix that.

(cherry picked from commit 72a6296b16a75d4e26eec972f2999e69c9967b9d)
(cherry picked from commit df1ed3fbe2d03e9c1d0eed7d836c5aa541f4fb52)
2024-07-06 16:25:07 +02:00
Lennart Poettering
d5a352eeae man: mention that distinction between /usr/lib/ and /usr/share/ is really about shared *ownership*
(cherry picked from commit 39aafbd42ac3d9675098c8212261fa56261d9066)
(cherry picked from commit 9d40e5c9c61276ca80ccdedacbfc51d8d466ab90)
2024-07-06 16:25:07 +02:00
Lennart Poettering
152e809798 man: drop version info from file hiearchy man page
This file doesn't document features of systemd, but is more a of a
general description that generalizes/modernizes FHS. As such, the items
listed in it weren't "added" in systemd versions, they simply reflect
general concepts independent of any specific systemd version. hence
let's drop this misleading and confusing version info.

Or in other words, the man page currently claims under "/usr/": "Added
in version 215." – Which of course is rubbish, the directory existed
since time began.

This also rebreaks all paragaphs this touches.

No content changes.

(cherry picked from commit 26db8fe2478316825c5596e4b93b08176a8abddb)
(cherry picked from commit 8dbb7e2a72a73cd3f92b4891148d00c314cd8b67)
2024-07-06 16:25:07 +02:00
Luca Boccassi
129a548df5 os-util: avoid matching on the wrong extension-release file
The previous commit tries to extract a substring from the
extension-release suffix, but that is not right, it's only the
images that need to be versioned and extracted, use the extension-release
suffix as-is. Otherwise if it happens to contain a prefix that
matches the wrong image, it will be taken into account.

Follow-up for 37543971aff79f3a37646ffc2bb5845c9394797b

(cherry picked from commit 92d1fe3efac7b3a700317ec71b64cab5ebc17b42)
(cherry picked from commit 160b539a9de2c8adc400833d976165d6158fd944)
2024-07-06 16:25:07 +02:00
James Hilliard
1817431dbe README: add missing CONFIG_MEMCG kernel config option for oomd
We need to enable this otherwise systemd-oomd.service fails to start.

Fixes:
ConditionControlGroupController=memory was not met

(cherry picked from commit aa329b89223a79793cde8288b1bc6e93db174938)
(cherry picked from commit a50e6c5709f5fde269e6522bc6e6992180705fb1)
2024-07-06 16:25:07 +02:00
Brenton Simpson
80c7571d9a boot: cover for hardware keys on phones/tablets
The patch is originally from Brenton Simpson, I (Lennart) just added some
comments and rebased it.

I didn't test this, but the patch looks so obviously right to me, that
I think we should just merge it, instead of delaying this further. In
the worst case noone notices, in the best case this makes sd-boot work
reasonably nicely on devices that only have a hadware power key + volume
rocker.

Fixes: #30598
Replaces: #31135
(cherry picked from commit 2fda6f5fffcc05adaa5a08d976e09ad7cc97c1b3)
(cherry picked from commit 71de25f2df501cd0ab8e639100ce23534d23a208)
2024-07-06 16:25:07 +02:00
Mike Yuan
8d443b7486 core/dbus-manager: refuse SoftReboot() for user managers
Otherwise, busctl --user call ... SoftReboot results in
user manager broadcasting signal and initiating soft-reboot...

(cherry picked from commit 236cd4854657745e1a59b224a191a232a476527e)
(cherry picked from commit efc44e0c3eab9d502e472de484ddb8a29d559fab)
2024-07-06 16:25:07 +02:00
Daan De Meyer
7dd3dff3a0 meson: Define __TARGET_ARCH macros required by bpf
These are required by the bpf_tracing.h header in libbpf, see
https://github.com/libbpf/libbpf/blob/master/src/bpf_tracing.h.

bpf_tracing.h does have a few fallbacks in case __TARGET_ARCH_XXX
is not defined but recommends using the __TARGET_ARCH macros instead
so let's do that.

(cherry picked from commit 48d6dad100d0b42c02aa21d897e913461f6b3cc3)
(cherry picked from commit 399e78855324b3424bbbbbe8e2a3b31e75570ec6)
2024-07-06 16:25:07 +02:00
Luca Boccassi
3dacca114b coredump: correctly take tmpfs size into account for compression
We calculate the amount of uncompressed data we can write by taking the limits
into account and halving it to ensure there's room for switching to compression
on the fly when storing cores on a tmpfs (eg: due read-only rootfs).

But the logic is flawed, as taking into account the size of the tmpfs storage
was applied after the halving, so in practice when an uncompressed core file
was larger than the tmpfs, we fill it and then fail.

Rearrange the logic so that the halving is done after taking into account
the tmpfs size.

(cherry picked from commit e6b2508275aac2951aedfc842735d8ebc29850bb)
(cherry picked from commit a946258e9df627c675d13b2041ae186babf269dc)
2024-07-06 16:25:07 +02:00
Daan De Meyer
3ced17fb98 docs: Add section to HACKING.md on distribution packages
(cherry picked from commit 17ef81a764995dfd0f43daf34dcf2ab04806e760)
(cherry picked from commit 0a97db87893e706011f0ed7e522a42fcd3767ac4)
2024-07-06 16:25:07 +02:00
Mike Yuan
b8d993f029 docs/CODING_STYLE: document that we nowadays prefer (const char*) for func ret type
Addresses https://github.com/systemd/systemd/pull/33567#discussion_r1662818225

(cherry picked from commit 4b7249111a4c1d366f476bdbd6e03f7893eb9d42)
(cherry picked from commit 3c91ea49d249cda6e1fa84b53a42dee6d83339da)
2024-07-06 16:25:07 +02:00
Franck Bui
d0b9feab01 test: fix TEST-24-CRYPTSETUP on SUSE
/etc/systemd/journald.conf.d drop-in dir already exists on SUSE.

(cherry picked from commit 56a894e888002f44f3463b3188f9d5abdcca4bb0)
(cherry picked from commit 10b7e0a0afc31dc6a3cc30fca3a276449a60ec7d)
2024-07-06 16:25:07 +02:00
Franck Bui
58205cfea8 test: install /etc/hosts
Needed for resolving the "localhost" hostname.

(cherry picked from commit a09825ce9fb3bd315f35654b6e6ee4f92c675cde)
(cherry picked from commit 4f7d6885a12c0e5e27a9d29f9ef09fb2fa53d6ef)
2024-07-06 16:25:07 +02:00
rhellstrom
a28883e2d6 Conditional PSI check to reflect changes done in 5.13
cpu.pressure 'full' is undefined for system-wide checks since 5.13 but still reported with values set to 0 for backwards compatibility. Made changes to reflect this for system-wide checks so that the conditional comparison is not made against the 0 value and instead fall back to 'some'.

https://www.kernel.org/doc/html/latest/accounting/psi.html
(cherry picked from commit 98b1ecc9175a8bb241292f6f441a754b6759dd97)
(cherry picked from commit c2f74defaad3c2d0eb114d3f5aeded07890d9989)
2024-07-06 16:25:07 +02:00
Luca Boccassi
5e3fc0b746 core: try again bind mounting if the destination was already created
If the destination mount point is on a shared filesystem and is
missing on the first attempt, we try to create it, but then
fail with -EEXIST if something else created it in the meanwhile.
Enter the retry logic on EEXIST, as we can just use the mount
point if it was already created.

Fixes https://github.com/systemd/systemd/issues/29690

(cherry picked from commit c3f0f6f8bd812fee4b2ab658a5cc9ac9167d387d)
(cherry picked from commit df990be91348f847f31da8d02d3ee2fbcb946c30)
2024-07-06 16:25:07 +02:00
Daan De Meyer
4d8065ef16 mkfs-util: Set sector size for btrfs as well
btrfs used to default the sector size to the page size and didn't
support anything else. Since 6.7, it defaults to 4K and using 4K
makes the filesystem compatible with all page sizes. So let's make
sure we use minimum 4K as well (lower causes failures on systems with
a 4K page size) but still allow larger sector sizes if specified by
the user.

(cherry picked from commit 03c9e88fb7eb8973477c33aa63dc6bcf0cab52c9)
(cherry picked from commit 24987eb3cc175dd4e5cfaab5abe6da02b64104bc)
2024-07-06 16:25:07 +02:00
Daan De Meyer
4bd9859cb2 repart: Don't set filesystem sector size to 512
We want to use 4K as the default sector size for filesystems so they
don't have to be regenerated to work on 512, 2048 or 4096 sector sizes.

(cherry picked from commit d34361149f897eac5c6a41854fa4edca4804b49b)
(cherry picked from commit e34f436433cfce10d01d31569f74f0ad96d5a938)
2024-07-06 16:25:07 +02:00
Daan De Meyer
f7bcb90336 repart: Log more about filesystem sector size
(cherry picked from commit 0e445aaa8553ff4ddf8330913260e5f167b1690d)
(cherry picked from commit 3c88c94432128a167f61323f821dee277aba6171)
2024-07-06 16:25:07 +02:00
Mike Yuan
82871b071b core/unit: follow merged units before updating SourcePath= timestamp too
Currently, we only follow merged units for unit_load_dropin() call.
But if the unit is an alias, we should always perform operations
on the "canonical" unit.

(cherry picked from commit 740cd1e0f2ae5cc1a10d2111d63cc4e975761091)
(cherry picked from commit 86d47d63b01c1910f8f186668948f0dc7b80db37)
2024-07-06 16:25:07 +02:00
James Coglan
c572f1ed2b resolved: correct parsing of OPT extended RCODEs
The DNS_PACKET_RCODE() function works out the full RCODE by taking the
first octet from the OPT record TTL field and bitwise-OR-ing this with
the basic RCODE from the packet header. This results in RCODE values
being lower than they should be.

For example, if the first TTL octet is 0x7a and the basic RCODE is 3,
this function currently returns `0x7a | 3` = 123, rather than 0x7a3 =
1955.

The first TTL octet is supposed to form the upper 8 bits of a 12-bit
value, whereas the current implementation constraints the value to 8
bits and results in mis-interpreted RCODEs.

This fixes things by shifting the TTL 20 places instead of 24 and
masking off the low nibble that comes from the upper bits of the version
octet.

Note that dns_packet_append_opt() correctly converts the input RCODE
into the high octet of the OPT TTL field; this problem only affects
parsing of incoming packets.

(cherry picked from commit c40f3714c9a4d1f2bcd308625c9c835892e3d41c)
(cherry picked from commit 7ee60a86140ebe3e60858ef3c4e749dcd2e7fd21)
2024-07-06 16:25:07 +02:00
James Coglan
964b184f8e resolved: allow the full TTL to be used by OPT records
Whereas RFC 1035 says the TTL field takes the "positive values of a
signed 32 bit number", and RFC 2181 says "Implementations should treat
TTL values received with the most significant bit set as if the entire
value received was zero,", the dns_packet_read_rr() function sets
rr->ttl to zero if the MSB is set.

However, EDNS(0) as specified in RFC 6891 repurposes the TTL field's 4
octets to store other information, c.f.:

                  +0 (MSB)                            +1 (LSB)
       +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
    0: |         EXTENDED-RCODE        |            VERSION            |
       +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
    2: | DO|                           Z                               |
       +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+

The first octet extends the usual 4-bit RCODE from the packet header by
providing an additional 8 bits of space, extending the RCODE to 12 bits.
But, our handling of the TTL field means that the high bit in the first
octet is not actually usable, since setting it will mean these 4 octets
are replaced with 0. This may have the effect of making us believe a
server does not support DNSSEC when it actually set the DO bit in its
OPT record.

Here we change things so that the TTL is only set to zero for record
types other than OPT.

(cherry picked from commit 131787979c700becaf6ec24a810658d1313587cc)
(cherry picked from commit 6ead24fcac878b3623408ecb1a05d07f29c4c04c)
2024-07-06 16:25:07 +02:00
Daan De Meyer
d34128a1f1 TEST-64-UDEV-STORAGE: Make nvme_subsystem expected pci symlinks more generic
When running the test on aarch64 the symlinks look as follows:

"""
[root@H ~]# ls /dev/disk/by-path
platform-4010000000.pcie-pci-0000:00:04.0-scsi-0:0:0:0       platform-4010000000.pcie-pci-0000:00:04.0-scsi-0:0:0:0-part1  platform-4010000000.pcie-pci-0000:00:05.0-nvme-16
platform-4010000000.pcie-pci-0000:00:04.0-scsi-0:0:0:0-part  platform-4010000000.pcie-pci-0000:00:04.0-scsi-0:0:0:0-part2  platform-4010000000.pcie-pci-0000:00:05.0-nvme-17
"""

So let's make the PCI patterns a little more generic so they match
both the x86 and the aarch64 paths.

(cherry picked from commit 72d121b60174b825bf1390958eb1b55f34c5ff5b)
(cherry picked from commit dc0167b674bc6b555c25f374719c818bc6ad1416)
2024-07-06 16:25:07 +02:00
Zbigniew Jędrzejewski-Szmek
e22e239cd9 LICENSES/README: expand text to summarize state for binaries and libs
We would say how *sources* are licensed, but actually most user care about the
resulting binaries. So say how the *binaries* are licensed. I used the word
"effectively" because the permissive licenses don't set any requirements on the
binaries, so the license of sources is a complex mix, but the resulting
binaries have a simple effective license.

Also, make it clear that the GPLv2 license applies to udev programs, but not
the shared library. Based on private correspondence, there's some confusion
about this.

(cherry picked from commit bd7236912f373e0a06a1b0395000ec67d96767af)
(cherry picked from commit fb747bd8cdcbeb55f9ef3c62289fff8ff5a25b68)
2024-07-06 16:25:07 +02:00
Zbigniew Jędrzejewski-Szmek
5469bc6118 TEST-58-REPART: reverse order of diff args
I expect the test output to be the second argument, so we're diffing "expected"
and "output", not the other way around.

I noticed this when working on https://github.com/systemd/systemd/pull/33081.

(cherry picked from commit 6bb3ea655d08c0602c99ccd2a580ba102fd19114)
(cherry picked from commit 9663bb74100dd79c1e4e9c6b2377ea1b817ddee5)
2024-07-06 16:25:07 +02:00
Giovanni Baratta
8b7ad68cb0 man/tmpfiles: remove outdated behavior regarding symlink ownership
Update the man page of tmpfiles.d to remove outdated comments regarding the behavior of ownership with symlinks.
The behavior has been changed in this commit 51207ca134716a0dee5fd763a6c39204be849eb1

(cherry picked from commit d108198f395fde05d94fc75d8581af4aa0de7e4a)
(cherry picked from commit 2f455914f7bfe06fd6423ea054458db61d2cc2e1)
2024-07-06 16:25:07 +02:00
Mike Yuan
98a4c8009b mountpoint-util: do not assume symlinks are not mountpoints
They very much can be with the new mount API.

(cherry picked from commit 36e48f22af102843b6cceeda5a2292e57434d2ee)
(cherry picked from commit 99cb4bdbbb15f3812de7f0fd161f91335000790d)
2024-07-06 16:25:07 +02:00
Florian Schmaus
02e50f7a4b core/exec-invoke: use sched_setattr instead of sched_setscheduler
The kernel's sched_setattr interface allows for more control over a processes
scheduling attributes as the previously used sched_setscheduler interface.

Using sched_setattr is also the prerequisite for support of utilization
clamping (UCLAMP [1], see #26705) and allows to set sched_runtime. The latter,
sched_runtime, will probably become a relevant scheduling parameter of the
EEVDF scheduler [2, 3], and therefore will not only apply to processes
scheduled via SCHED_DEADLINE, but also for processes scheduled via
SCHED_OTHER/SCHED_BATCH (i.e., most processes).

1: https://docs.kernel.org/next/scheduler/sched-util-clamp.html
2: https://lwn.net/Articles/969062/
3: https://lwn.net/ml/linux-kernel/20240405110010.934104715@infradead.org/
(cherry picked from commit 016e9d8d08ce66f5e81b42e0a0db398afc17336a)
(cherry picked from commit fb7ec285c98d9eeaa69d1efda3e450e6f7207e57)
2024-07-06 16:25:07 +02:00
Kamil Szczęk
eaf934f01f cryptsetup: improve TPM2 blob display
Just a tiny change to fix an eyesore in cryptsetup luksDump display :)

(cherry picked from commit 0828c6a2bf9aa40a6cf5fcb3d5650130c483ac8a)
(cherry picked from commit 5911f1ec2568805fc820aa96560988f13a11e45e)
2024-07-06 16:25:07 +02:00