Commit Graph
65472 Commits
Author SHA1 Message Date
Lennart Poettering 2b5eff67f5 hostnamectl: show age of firmware as time span, too
This converts the date into a relative timespan from the current time
on, and outputs it. It marks it yellow if older than two years, since
old firmware is probably a security risk. We don't make it red, since we
don't know though.
2023-06-20 18:40:30 +02:00
Lennart Poettering 4c834779cd Merge pull request #28080 from poettering/dmi-fixes
fix udev DMI rules – make sure hostnamectl shows correct hw info even after device trigger
2023-06-20 18:40:08 +02:00
Lennart Poettering d39d9348d3 Merge pull request #28089 from poettering/sleep-cleanups
sleep-config: various clean-ups
2023-06-20 18:39:49 +02:00
Lennart Poettering 574e5df9ae Merge pull request #28087 from poettering/transaction-flags
transaction: change four boolean funciton parameters into a single flags parameter
2023-06-20 16:21:05 +02:00
Daan De Meyer 1a5f67aba3 Merge pull request #27863 from DaanDeMeyer/copy-lock
Add helpers to lock a directory before copying into it
2023-06-20 15:22:24 +02:00
Lennart Poettering 7dad6de158 hostnamed: when parsing day/month of firmware date, force decimal parsing
safe_atou() by default determines the base from the prefix 0x, 0b, 0o
and for compat with just 0 for octal. This is not what we want here,
since the date components are padded with zeroes yet still decimal.
Hence force decimal parsing (and while we are at it, prohibit a couple
of unexpected decorations).

WIthout this we'd fail to parse any the 8th and 9th day of each months, as
well aus aug and september of every year, because these look like octal
numbers but cannot actually parsed as such.

Let's change the testcase to check for a date that exposes this
bheaviour.
2023-06-20 15:18:58 +02:00
Lennart Poettering c65c2f0aa6 rules: drop weird spaces 2023-06-20 15:04:31 +02:00
Lennart Poettering e7932afe1b hostnamed: don't read DMI data within a container
If we run in a container we should show info about the container, not
the host.
2023-06-20 15:04:31 +02:00
Lennart Poettering dafd65b150 rules: split out DMI related rules from udev-default.rules
The DMI rules where so far guarded by an ACTION=="add" rule, but that
doesn't really make sense for setting properties (only for setting
access modes/ownership of nodes).

Hence let's move this into its own file, that guards properly on
ACTION!="remove".

Before this change the hardware vendor/model info would be dropped
whenever the device was retriggered.
2023-06-20 14:44:36 +02:00
Lennart Poettering 459d84076f update TODO 2023-06-20 14:41:28 +02:00
Lennart Poettering 4014172a8b sleep: rename sleep-config.[ch] → sleep-util.[ch]
The file long ceased to be exclusively about configuration of the sleep
operation. It contains many many calls for other purposes, hence give it
a more generic name.
2023-06-20 14:18:52 +02:00
Lennart Poettering c1583ca16a sleep-config: reduce scope of DMI object path a bit
We need this in a single function only, hence move it there, and make it
a static field so that it has local scope.

While we are at it, rename s/readsize to buf/bufsize, to make
relationship clear. In particular as the data read is actually binary
and "s" hence a misnomer, since it suggests it was a string.
2023-06-20 14:16:28 +02:00
Daan De Meyer d54f60c2af btrfs-util: Add BTRFS_SNAPSHOT_LOCK_BSD
When making ephemeral snapshots of subvolumes whose cleanup depends on
whether they're locked or not, it's necessary to have the lock from the
very beginning, so let's support that with a new BTRFS_SNAPSHOT_LOCK_BSD
flag.
2023-06-20 13:42:41 +02:00
Lennart Poettering 8601ecbc7c sleep-config: rename .device field to .path
This has been badly named given the path doesn't refer to a device quite
likely, but to a path to a regular file. Hence let's be more precise
with naming.

(.device kinda suggests this was an sd_device object of sorts, but it
really isn't.)
2023-06-20 13:21:28 +02:00
Lennart Poettering 3595a9b7b8 sleep-config: don't use 'device_id' moniker for a dev_t entity
We usually call dev_t entities "devnum" or "devno". That's redundant
enough, let's not call this "device_id". In particular as that's
something else (in udev context).
2023-06-20 13:14:38 +02:00
Lennart Poettering 98034eb0ea sleep-config: pin swap device while operating via O_PATH 2023-06-20 13:14:38 +02:00
Lennart Poettering 1296b427a7 sleep-config: replace SwapEntry's .type field with a proper enum
Following our usual rule: let's parse this early into internal
representation, and stick to that. don't pass unparsed strings around
needlessly.
2023-06-20 13:14:06 +02:00
Lennart Poettering 08e0ed300a sleep-config: check if we operate on regular file in swap_device_to_device_id() in swap file code path
Similar to the previous commit: before we continue doing swap file
operations let's ensure this actually is a swap file.
2023-06-20 13:13:54 +02:00
Lennart Poettering 1cf78c8f78 sleep-config: replace useless fstat() by useful fd_verify_regular()
For some reason there was an fstat() call here whose results was
entirely ignored. Let's remove it. Let's add a call to
fd_verify_regular() instead, because this is a code path for swap files,
hence let's make sure we actually operate on a file, and nothing else.
2023-06-20 13:11:53 +02:00
Lennart Poettering fd6ec01d28 sleep-config: rename can_sleep_state() parameter
Just some trivial renaming, to indicate that these are not the supported
but the requested sleep states.
2023-06-20 13:11:53 +02:00
Lennart Poettering 3044510d58 transaction: drop bus error arg from transaction_add_propagate_reload_jobs()
We erase the error anyway always, hence no point in even passing
anything in from callers.
2023-06-20 13:07:55 +02:00
Lennart Poettering c25eeb65c0 transaction: rebreak comments to match current coding style 2023-06-20 13:02:09 +02:00
Lennart Poettering fab7e5e8f6 transaction: use more verbose dbus error data in log message where available 2023-06-20 13:02:09 +02:00
Lennart Poettering b0904249b9 transaction: turn four bool parameters into a proper flags parameters 2023-06-20 13:02:09 +02:00
Mike Yuan 68f8a86a46 gpt-auto: expand the loader partition UUID check to include XBOOTLDR
Before this commit, we only accept the case when LoaderDevicePartUUID
points to the ESP, while XBOOTLDR is mounted unconditionally.

After this commit, we check if LoaderDevicePartUUID points to either
ESP or XBOOTLDR. If it does, mount both, else nothing gets mounted.
2023-06-20 11:15:48 +02:00
cvlc12 1c2c00dbb6 Fix quoting 2023-06-20 00:51:32 +01:00
Zbigniew Jędrzejewski-Szmek 72e7bfe02d Merge pull request #27941 from cvlc12/early_cpio
Define 'microcode' file type for the kernel-install staging area.
2023-06-19 18:49:31 +02:00
msizanoen 996b00ede8 Revert "core/service: when resetting PID also reset known flag"
This reverts commit ff32060f2e.

This change is incorrect as we don't want to mark the PID as invalid but
only mark it as dead.

The change in question also breaks user level socket activation for
`podman.service` as the termination of the main `podman system service`
process is not properly handled, causing any application accessing the
socket to hang.

This is because the user-level `podman.service` unit also hosts two
non-main processes: `rootlessport` and `rootlessport-child` which causes
the `cgroup_good` check to still succeed.

The original submitter of this commit is recommended to find another
more correct way to fix the cgroupsv1 issue on CentOS 8.
2023-06-19 18:18:46 +02:00
cvlc12 4221065237 Add docs, improve log comments. 2023-06-19 17:34:53 +02:00
Frantisek Sumsal ed8f65c729 Merge pull request #28078 from keszybz/trivial-syntax-and-wording-fixes
Trivial syntax and wording fixes
2023-06-19 16:41:16 +02:00
Lennart Poettering ab93429dea Merge pull request #28056 from dtardon/polkit-cleanup
Some bus-polkit cleanup
2023-06-19 15:50:35 +02:00
Lennart Poettering 5cbfbf2aaa man: place options in a some limited form of subsections
Let's visually separate the options associated with cpu, io, memory, …
in subsections

This patch tries to be minimal. It just adds the section titles, and
does minimal reordering to make sure the options on the same kind of
resource are placed close to each other.
2023-06-19 13:42:34 +02:00
Zbigniew Jędrzejewski-Szmek b2544bb6e8 machinectl: fix message
bus_wait_for_jobs_new() can fail for various reasons.
2023-06-19 13:36:30 +02:00
Zbigniew Jędrzejewski-Szmek 12cc960163 shared: improve messages about switch root operations
"change" is not clear without context.
2023-06-19 13:36:30 +02:00
Zbigniew Jędrzejewski-Szmek 730bdfed81 man/systemd-nspawn: fix indentation and parenthesis location 2023-06-19 13:36:30 +02:00
Zbigniew Jędrzejewski-Szmek 5811490a3f docs/CREDENTIALS: fix confusion of i.e. and e.g. 2023-06-19 13:36:30 +02:00
Zbigniew Jędrzejewski-Szmek 966dd7527d man: missing/misplaced periods 2023-06-19 13:36:30 +02:00
Sam Morris d9714fe405 Resource control manpage fixup (#28046)
The order of the description of each item should match the order that they are declared. Un-document effect of deprecated non-unified CGroup hierarchy on
DefaultCPUAccounting=. Mention that the default value for DefaultCPUAccouting= is 
affected by the kernel version.
2023-06-19 13:30:43 +02:00
Luca Boccassi 14cb29dfd5 Merge pull request #28074 from mrc0mmand/journal-gatewayd-followups
A couple of follow-ups for systemd-journal-gatewayd tests
2023-06-19 12:14:28 +01:00
David Tardon 3a3d4d3bd8 bus-polkit: put function params to a single line 2023-06-19 12:36:40 +02:00
David Tardon f8636446be bus-polkit: drop unnecessary else 2023-06-19 12:36:40 +02:00
David Tardon 4d12d3976c bus-polkit: merge variable declarations 2023-06-19 12:34:27 +02:00
David Tardon d32ac157ef bus-polkit: decrease indentation 2023-06-19 12:33:24 +02:00
David Tardon 9f657af4c3 bus-polkit: extract creation of polkit call to a function 2023-06-19 12:32:40 +02:00
David Tardon d2c50a176d bus-polkit: move verification to a separate function 2023-06-19 12:32:26 +02:00
Gibeom Gwon 5bfc4de634 homework: resize to maximum disk space if disk size is not specified
If the backing storage is LUKS2 on a block device, auto resize mode
is enabled, and disk size is not specified, resize the partition to
the maximum expandable size.

Fixes: #22255, #23967
2023-06-19 12:26:34 +02:00
Lennart Poettering be76bf625c update TODO 2023-06-19 10:36:42 +02:00
Daan De Meyer 94c357ca23 mkosi: Update to latest
We now run repart before starting systemd-nspawn to make sure that
the root partition is also generated when we boot the image in a
container instead of a VM.

To make sure we start from scratch for both the container boot and
the VM boot, we also enable Ephemeral to make sure all changes to
the image are ephemeral.
2023-06-19 10:30:39 +02:00
Frantisek Sumsal 033601b79a test: wrap curl when running with ASan
Necessary (unfortunately) for curl on C8S.
2023-06-19 10:19:44 +02:00
Frantisek Sumsal f9d1806e3b journal-gatewayd: handle SIGTERM
To allow gatewayd to exit cleanly.
2023-06-19 10:19:44 +02:00