Commit Graph
74828 Commits
Author SHA1 Message Date
Lennart Poettering 74cbe244ec Merge pull request #33589 from poettering/file-hiearchy-no-version
man: drop version info from file hiearchy man page
2024-07-04 16:43:31 +02:00
Lennart Poettering 72a6296b16 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 b4d6bc63e6, but
forgot to to update the table at the bottom to fully reflect the update.
Fix that.
2024-07-04 15:26:17 +02:00
Lennart Poettering 39aafbd42a man: mention that distinction between /usr/lib/ and /usr/share/ is really about shared *ownership* 2024-07-04 15:26:17 +02:00
Lennart Poettering 26db8fe247 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.
2024-07-04 15:26:17 +02:00
Luca Boccassi 4ac314a81f Merge pull request #33567 from poettering/boot-fixlets
sd-boot,sd-stub: a variety of smaller fixes
2024-07-04 13:00:56 +02:00
Luca Boccassi 92d1fe3efa 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 37543971af
2024-07-04 12:49:28 +02:00
Daan De Meyer 96110261ee mkosi: Build a disk image by default again
Now that we have a way to rebuild and reinstall systemd without
having to rebuild the image, let's default to building a disk image
again.
2024-07-04 12:43:50 +02:00
Chen Qi 646ed5af00 src/boot/efi/meson.build: ensure VERSION_TAG exists in case of cross build
The GIT_VERSION is changed to use VERSION_TAG, but in case of cross build
for src/boot/efi, it's not set, causing build error because the compiler cannot
know it's a macro thus treating it as some variable and error out.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
2024-07-04 12:42:35 +02:00
Daan De Meyer 8b3b01c4b7 meson: Deal with potential stable versions
The meson.version file might contain e.g. 256.2~devel in a stable
branch so let's make sure we deal with that.
2024-07-04 12:03:45 +02:00
Topi Miettinen e81025970f load-fragment: allow MountImages= with paths starting with /dev
For MountImages=, if the source is a block device, it will most likely reside
in /dev. It should be also possible to mount a static device file system in
place of (or part of) /dev. So let's allow paths starting with /dev as an
exception for MountImages=.
2024-07-04 09:36:04 +00:00
Luca Boccassi 92d9d5ca70 test: skip TEST-69-SHUTDOWN on Debian
There is a regression in the login package, skip the test until
it is fixed. https://bugs.debian.org/1075733
2024-07-04 09:07:22 +02:00
Ronan Pigott ef98603f4b zsh: add run0 completions 2024-07-04 01:21:43 +02:00
Luca Boccassi 08b64666cd Merge pull request #33608 from DaanDeMeyer/hacking
docs: Update HACKING
2024-07-04 01:19:58 +02:00
Daan De Meyer a2403af329 docs: Update HACKING
Let's mention the new way to install the latest changes without
rebuilding the image. Let's also remove the duplicate info about
distribution packages that is already mentioned in its own section.
2024-07-03 22:59:40 +02:00
Daan De Meyer 18c98a839f mkosi: Install zypper in opensuse images 2024-07-03 22:48:37 +02:00
Daan De Meyer d1bbeeea4c mkosi: Fix sync script git command
Let's make sure we actually operate on the packaging git repo.
2024-07-03 22:40:31 +02:00
James Hilliard aa329b8922 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
2024-07-03 22:11:24 +02:00
Daan De Meyer cd98453908 mkosi: update arch commit reference
* d74b24c7c6 meson options: vcs-tag=false
* 7424fedef0 upgpkg: 256.1-1: new upstream release
* 6016864c99 upgpkg: 256-3: rebuild to fix man pages...
* 6f6d48b221 upgpkg: 256-2: update shells
* b9ce44e766 drop systemd-stable repository, build from main one
* baf4803252 upgpkg: 256-1: new upstream release
* 1d75e7ddaa add an install hint on NEWS
* 6f17a23127 Ups, inverted...
* d76029f7cc update meson options
* 6e7929dd98 upgpkg: 256rc4-1: new upstream pre-release - testing only!
* 7b70e7b0e7 upgpkg: 256rc3-2: fast-forward to current git main, non-official testing
* a438b879e2 upgpkg: 256rc3-1: new upstream pre-release, non-official testing
* ff30a600c9 upgpkg: 256rc2-1: new upstream pre-release, non-official testing
2024-07-03 22:04:18 +02:00
Daan De Meyer 2f6046f66b mkosi: Clean up old packages from the build directory 2024-07-03 21:05:55 +02:00
Luca Boccassi ce513c6c6c mkosi: remove conflicting deb packages from builddir
These are not actually needed or installed, so delete them from the
build directory, so that inside an image one can do:

apt install --reinstall /work/build/*.deb

Follow-up for 690a85b1d4
2024-07-03 21:05:14 +02:00
Daan De Meyer a7856c8182 load-fragment: Remove faulty assertion
Followup for 453cb5d01e

Fixes the following assertion:

"""
x86 130 ~/systemd ❯❯❯ meson compile -C build
ninja: Entering directory `/home/tfleig/systemd/build'
[2/5] Generating export-dbus-interfaces with a custom command
FAILED: interfaces
/home/tfleig/systemd/tools/dbus_exporter.py interfaces /home/tfleig/systemd/build/systemd /home/tfleig/systemd/build/systemd-homed /home/tfleig/systemd/build/systemd-hostnamed /home/tfleig/systemd/build/systemd-importd /home/tfleig/systemd/build/systemd-localed /home/tfleig/systemd/build/systemd-logind /home/tfleig/systemd/build/systemd-machined /home/tfleig/systemd/build/systemd-networkd /home/tfleig/systemd/build/systemd-oomd /home/tfleig/systemd/build/systemd-portabled /home/tfleig/systemd/build/systemd-resolved /home/tfleig/systemd/build/systemd-timedated
Assertion '__unique_prefix__expr_91' failed at src/core/load-fragment.c:3912, function config_parse_tasks_max(). Aborting.
Traceback (most recent call last):
  File "/home/tfleig/systemd/tools/dbus_exporter.py", line 45, in <module>
    main()
  File "/home/tfleig/systemd/tools/dbus_exporter.py", line 42, in main
    extract_interfaces_xml(args.output, exe)
  File "/home/tfleig/systemd/tools/dbus_exporter.py", line 9, in extract_interfaces_xml
    proc = run(
  File "/usr/lib64/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '[PosixPath('/home/tfleig/systemd/build/systemd'), '--bus-introspect', 'list']' died with <Signals.SIGABRT: 6>.
[4/5] Generating man/systemd.index.xml with a custom command
ninja: build stopped: subcommand failed.
"""
2024-07-03 20:49:44 +02:00
Lennart Poettering 89ed34459e ukify: bring order of EFI sections in man + --help into same order as spec
Previously, the order was quite chaotic, even sometimes interleaved with
entirely unrelated switches. Let's clean this up and use the same order
as in the spec.

This doesn't change anything real, but I think it's a worthy clean-up in
particular as this order is documented as the PCR measurement order of
these sections, hence there's actually a bit of relevance to always
communicate the same order everywhere.
2024-07-03 16:21:34 +02:00
Lennart Poettering 38faff48e5 boot: don't set OsIndications field if already set correctly 2024-07-03 16:15:04 +02:00
Brenton Simpson 2fda6f5fff 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
2024-07-03 16:15:04 +02:00
Lennart Poettering ea22cbc327 ukify: suffix switches that take parameters with = in log output 2024-07-03 16:15:04 +02:00
Lennart Poettering c8bcf7ecf7 measure: drop incomplete support for PCRs != 11
At this point we have a clearer model:

* systemd-measure should be used for measuring UKIs on vendor build
  systems, i.e. only cover stuff predictable by the OS vendor, and
  identical on all systems. And that is pretty much only PCR 11.

* systemd-pcrlock should cover the other PCRs, which carry inherently
  local information, and can only be predicted locally and not already
  on vendor build systems.

Because of that, let's not bother with any PCRs except for 11 in
systemd-measure. This was added at a time where systemd-pcrlock didn't
exist yet, and hence it wasn't clear how this will play out in the end.
2024-07-03 16:15:04 +02:00
Lennart Poettering 759cf7e10a boot: compare auto- prefix case-insensitively 2024-07-03 16:15:04 +02:00
Lennart Poettering 76c8c0b264 boot: split out inner part of config_load_type2_entries()
Let's simplify the code a bit, and parse Type 2 entries in a function of
its own, separate from the directory enumeration.

This closely follows a similar split we did a long time ago for Type 1.

This is just refactoring, no real code change.
2024-07-03 16:15:04 +02:00
Lennart Poettering b8ed6e22f0 boot: indent error code path, but leave main code path unindented 2024-07-03 16:15:04 +02:00
Lennart Poettering 6c741d8f50 efi: don't non-chalantly drop const from memory buffer 2024-07-03 16:15:04 +02:00
Lennart Poettering 1beaaeab2f efi: drop "ret_" prefix from "ret_sections[]" parameter
While we write data to this parameter, it's not really a return
parameter, we after all do not fully set it, we just fill in some
fields. Hence it must be initialized beforehand.

According to our coding style only parameters that are purely used for
returning something should be named "ret_xyz", hence this one should not
be.

(We'll later rely on the current behaviour that it leaves array entries
for which we find no sections untouched, hence leave behaviour as is,
just rename the parameters to something more appropriate).

(Since we are dropping the "ret_" prefix of "ret_sections", let's rename
the old "section" parameter at the same time to "section_names", to make
clearer what it is about).
2024-07-03 16:15:04 +02:00
Lennart Poettering d30b89c7fc efi: fix mangle_stub_cmdline() for empty strings 2024-07-03 16:15:04 +02:00
Lennart Poettering 596731db99 efi: add limit on how large files can be we load into memory at once 2024-07-03 16:15:04 +02:00
Daan De Meyer 90a255779d 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.
2024-07-03 15:45:51 +02:00
Daan De Meyer 690a85b1d4 mkosi: Copy packages to the build directory as well
With the latest mkosi, mkosi -t none can be used to rerun the build
script without messing with a previously built image. This allows
one to run "mkosi -t disk -f qemu" in one terminal to build and boot
an image in qemu and then run "mkosi -t none" in another terminal to
rebuild the packages. If one then has "RuntimeBuildSources=yes" set
in their mkosi configuration, the build directory is mounted into the
virtual machine, which means that one can then run "dnf upgrade
/work/build/*.rpm" from within the VM to install the new packages.

This allows for quickly iterating on changes without having to rebuild
the image all the time.

We'll probably want to document this at some point, but let's start
with making it possible by copying the built packages to the build directory.
2024-07-03 15:44:27 +02:00
Daan De Meyer 2fe6ad5a64 mkosi: Make sure we don't hide errors from git merge-base
Currently if git merge-base fails we'll hide the error and exit with
exit status 0. Let's make we only exit early if git merge-base exits
with 1 which indicates the current commit is not on the target branch.
Any other error is considered fatal.
2024-07-03 15:42:12 +02:00
Anton Golubev 4ee0ac1ae4 hwdb: Add some HP IR cameras
Two very similar devices, with two functions - a regular camera and IR.
The peculiarity of their infrared camera is that it uses a color image
format (YUYV), although it is essentially black and white.

The IR camera interface differs from the regular camera interface by name:

"HP Wide Vision FHD Camera: HP W" for the regular camera and
"HP Wide Vision FHD Camera: HP I" for an infrared camera

Therefore, glob *I is used to separate the IR camera
2024-07-03 13:51:52 +02:00
Luca Boccassi 0f20f7d6fe Merge pull request #33575 from YHNdnzj/soft-reboot-system-manager-only
core/dbus-manager: several cleanups, refuse SoftReboot() for user manager
2024-07-03 13:40:06 +02:00
Lennart Poettering 9545512f3e update TODO 2024-07-03 10:55:18 +02:00
Daan De Meyer 6bd14bf4b3 mkosi: update fedora commit reference
* f9fe17dbde Use vmlinux.h from kernel-devel
* 9cbad936a6 Pull in openssl-devel-engine
* 8ae009f929 Only add Requires on python3-zstd on Fedora
* 750e910c7c Drop BuildRequires on python3-zstd
2024-07-03 10:39:58 +02:00
Mike Yuan 33a06bbc74 core/main: add an assertion to ensure user managers won't initiate destructive/system-wide operation 2024-07-03 10:12:53 +02:00
Mike Yuan 6851abe403 core/manager: invoke special targets on signal only for system manager 2024-07-03 10:11:25 +02:00
Mike Yuan 236cd48546 core/dbus-manager: refuse SoftReboot() for user managers
Otherwise, busctl --user call ... SoftReboot results in
user manager broadcasting signal and initiating soft-reboot...
2024-07-03 10:11:24 +02:00
Mike Yuan 541aadff97 core/dbus-manager: check for runtime scope first for system-wide operations
It's pointless to do selinux or /run/ space checks
for user managers.
2024-07-03 10:11:24 +02:00
Mike Yuan a85fe612d7 core/dbus-manager: use sd_bus_error_set() rather than _setf() where appropriate
Also, there can only be one system manager.
2024-07-03 10:11:24 +02:00
Mike Yuan b80ae4bcfd core/dbus-manager: use path_simplify_alloc() for root and init paths 2024-07-03 10:11:24 +02:00
Mike Yuan ff21827fee core/dbus-manager: use PidRef for log_caller()
This is only for logging, but since we lookup for the unit
here, let's try to be accurate.
2024-07-03 10:11:21 +02:00
Daan De Meyer 88e9230643 mkosi: Don't touch the packaging checkout if work is being done
If work is being done in a separate branch, don't touch the packaging
checkout.
2024-07-03 01:17:35 +02:00
Daan De Meyer 48d6dad100 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.
2024-07-03 01:16:35 +02:00
Luca Boccassi e6b2508275 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.
2024-07-03 01:15:03 +02:00