Commit graph

73544 commits

Author SHA1 Message Date
Daan De Meyer efbd22e476 mkosi: Use /etc/nsswitch.conf from repo in mkosi image 2024-05-06 10:56:45 +02:00
Daan De Meyer ffda3c3de9 mkosi: Disable ext4's orphan_file feature for centos images
Not supported by e2fsck from centos. We also disable building repart
from source in CI as running it from the build directory means repart
will run mkfs.ext4 from the host which doesn't know about the orphan_file
feature causing it to fail.
2024-05-06 10:56:45 +02:00
Daan De Meyer 81af7ac925 mkosi: Enable udev debug logging in CI
It's very useful to debug race conditions with loop devices, so let's
enable the logging now that it goes to the journal and not to the
console.
2024-05-06 10:56:45 +02:00
Daan De Meyer f09947661c mkosi: Move sbsigntools to CentOS/Fedora shared configuration
sbsigntools was added to EPEL 9.
2024-05-06 10:56:45 +02:00
Daan De Meyer 9bf888faf1 mkosi: Drop glibc-langpack-en from Fedora specific packages
It's already added in the CentOS/Fedora shared configuration.
2024-05-06 10:56:45 +02:00
Daan De Meyer 89255c31a4 mkosi: Install dfuzzer on CentOS/Fedora images
Required for TEST-21-DFUZZER.
2024-05-06 10:56:45 +02:00
Daan De Meyer 1c329956e5 mkosi: Insist on KVM, VSOCK and TPM by default
By default mkosi will not run VMs with these features if they're not
available, but since various stuff in systemd makes use of these, let's
fail loudly if any of these are not available by default in systemd.

Users can still override these defaults locally if they wish.
2024-05-06 10:56:45 +02:00
Daan De Meyer 86e249f326 mkosi: Update to latest 2024-05-06 10:56:45 +02:00
Daan De Meyer bdade5f597 test: Formatting fixes 2024-05-06 10:56:43 +02:00
Kai Lueke 88b51ceb56 man: Remove OSConfig project mentioning for systemd-confext
The systemd-confext use case description was mentioning an OSConfig
project which won't say much to users. Also, it's good to call out that
systemd-confext provides a reliable way to manage configuration because
in contrast to other tools it will remove all old configuration files.
2024-05-06 10:54:15 +02:00
Hans de Goede 5a99749453 hwdb: Add mapping for Xiaomi Mipad 2 bottom bezel capacitive buttons
The Xiaomi Mipad2 tablet has 3 capacitive buttons at the bottom.
These 3 buttons are handled by the touchsceen (the touchscreen extends
downwards to cover the bottom bezel).

By default these send Windows specific shortcuts which do not work
with Linux desktop environments:

Menu: LeftMeta + S
Home: LeftCtrl + Esc
Back: Backspace

Map these to menu / leftmeta (Windows key / Win 8 tablet home button key) /
back.
2024-05-05 22:42:13 +02:00
Daan De Meyer 54d0507223 meson: Add missing spdx line 2024-05-05 14:49:21 +02:00
Daan De Meyer ea07a6d45d meson: Test installation fixes
Let's use the new follow_symlinks flag instead on newer meson to.
We also switch back to copying symlinks instead of following them
and add an exclude for 25-default.link which becomes dangling when
installed and recreate it manually instead.
2024-05-05 14:49:21 +02:00
Daan De Meyer f779fd1f8f meson: Set up git submodule update on post checkout as well 2024-05-05 14:49:21 +02:00
Daan De Meyer 69e02d94f5 meson: Remove --debug from mkosi arguments
The exit status issue for which we introduced this was fixed so
let's remove --debug again to make the meson output less verbose.
2024-05-05 14:49:21 +02:00
Daan De Meyer 7e0e6b50b4 core: Record ExecMainStartTimestamp before forking
Otherwise there's a chance the handover timestamp is less than the
start timestamp depending on the whims of the scheduler.

For non-forking services, we also propagate the start timestamp into
Service->main_exec_status to make sure it starts earlier than the
handoff timestamp.
2024-05-05 14:19:30 +02:00
Luca Boccassi 72007bbc9b
Merge pull request #32588 from CodethinkLabs/mkosi-selinux
Add TEST-06-SELINUX to mkosi integration tests
2024-05-04 20:48:55 +02:00
Thayne McCombs 7df0297ac5
man/run0: Describe environment variables set (#32622)
* man/run0: Describe environment variables set
2024-05-04 12:06:16 +01:00
Frantisek Sumsal 568d97953b test: replace Europe/Kiev with Europe/Kyiv
As the former is deprecated and might not be available (i.e. on Ubuntu
Noble it's only available after installing the tzdata-legacy package).
2024-05-04 12:52:49 +02:00
Daan De Meyer 2c93e5f002 journal: Serialize __MONOTONIC_TIMESTAMP metadata field as well
Otherwise the forwarded journals won't have any monotonic timestamps.
2024-05-03 20:24:50 +02:00
Richard Maw ab9d60250e test: Enable TEST-06-SELINUX testing with mkosi 2024-05-03 12:57:11 +01:00
Richard Maw e26efe09f3 mkosi: Disable selinux labelling and install policy in initramfs
It is necessary to install the selinux policy in the initramfs
so that userland is entered with the correct label.

SELinuxRelabel defaults to auto, which will skip if the relabelling
command is not installed and will treat failure to relabel as non-fatal.

We can't force it on because root privileges are required if the labels
don't exist on the host system and we would like to be able to
cross-build from other distributions.

Since we are already committed to relabelling on first boot
there is no value in even trying to label.
2024-05-03 12:57:11 +01:00
Richard Maw a2a734e737 test: Integrate custom selinux relabelling unit with firstboot 2024-05-03 12:57:11 +01:00
Richard Maw 049b456d9a test: Skip TEST-06-SELINUX early if not on fedora/centos
Other distributions may be able to install selinux
but they are not expected to use it.

The distribution is tested rather than whether selinux is enabled
because it is expected to work on CentOS and Fedora
and we want it to fail noisily.
2024-05-03 12:57:11 +01:00
Richard Maw a56820d16a mkosi: Fix particle profile
The sbsign and ukify part was moved into a finalize script
rather than a postinst.chroot script so was using host tools
instead of just-built.
2024-05-03 13:49:09 +02:00
dependabot[bot] 85e23ef431 build(deps): bump pkg/debian from 9a5adf2 to f550017
Bumps pkg/debian from `9a5adf2` to `f550017`.

---
updated-dependencies:
- dependency-name: pkg/debian
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-03 12:32:04 +02:00
anphir 78a529caa5 man: improve documentation about using resource-control options
According to the documentation in systemd.resource-control(5),
resource-control options may be used in mount, scope, service,
slice, socket and swap units.
While e.g. systemd.service(5) includes that information,
documentation for some other units does not.

The most problematic example is systemd.slice(5).
Its documentation states a slice unit may only contain [Install]
and [Unit] sections, while actually it may contain also a [Slice]
section with options from systemd.resource-control(5).
units/user/app.slice is an example of a slice unit having a [Slice]
section.
2024-05-03 11:36:56 +02:00
Luca Boccassi 0fee0c0780 test: drop --tpm2-public-key= from TEST-70
Fixes test failure

Follow-up for 03e3b2672b
2024-05-03 10:16:46 +02:00
Lennart Poettering d4ffb37bb1 nspawn, vmspawn, run0: add env var for turning off background tinting
Some people are just sad, sad lost souls who don't like even the tiniest
ray of color in their life. Let's add an env var knob for allowing them
to turn the background tinting off, to drive the last bit of color from
their life so that they can stay in their grey grey life.
2024-05-02 23:33:39 +02:00
Yu Watanabe 61628287bd journal: explicitly sync namespaced journals before stopping socket units
Otherwise, if a service unit that requests LogNamespace= stopped before
systemd-journald@.service is started, logs generated by the service will be
lost, as systemd-journald@.socket is stopped and
systemd-journald@.service will never started.

To prevent the issue, let's introduce another implicit dependency to
a oneshot service that explicitly synchronizes a namespaced journal file
when the log namespace is not needed anymore.

Fixes #32604.
2024-05-02 19:41:01 +02:00
Sam Leonard 5cd6605737 vmspawn,man: move the varlistentry for -D into a variablelist
This is so that systemd.directives picks up the -D argument as being
supported by vmspawn.
2024-05-02 19:31:42 +02:00
Lennart Poettering 61ab5ddcdc tree-wide: fix type confusion around parsing JSON booleans
Sometimes we store them in a tristate, sometimes in C stdbool booleans.
Sometimes we fucked up picking the right parsing function however. Fix
that.
2024-05-02 19:31:08 +02:00
Sam Leonard 5535a9484e news: refer to ForwardToSocket instead of ForwardAddress 2024-05-02 18:59:08 +02:00
Lennart Poettering 84bdf71592 update TODO 2024-05-02 18:16:59 +02:00
Sam Leonard 03e3b2672b cryptenroll: disable loading public key if --tpm2-public-key= is empty 2024-05-02 16:34:09 +02:00
Kamil Szczęk 70246e37bc libfido2-util: fix a regression in the pre-flight mechanism
The recently merged PR #32295 introduced support for the credProtect
extension, but in doing so, it broke the discoverability of credentials
by setting the policy to FIDO_CRED_PROT_UV_REQUIRED for UV-less,
PIN-protected credentials. This policy would require us to pass the PIN
to the token in the pre-flight request to be able to discover it,
which defeats the purpose of pre-flight requests as they're supposed
to be non-interactive.

This commit restricts the usage of credProtect to UV credentials only.
2024-05-02 16:30:05 +02:00
dependabot[bot] 42a5f47fbe build(deps): bump pkg/arch from dd7aff4 to b13e94a
Bumps pkg/arch from `dd7aff4` to `b13e94a`.

---
updated-dependencies:
- dependency-name: pkg/arch
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-02 14:38:22 +02:00
Antonio Alvarez Feijoo fb17510ede importctl: fix flag checking against wrong variable
Fixes 67c7ee11af
2024-05-02 13:58:20 +02:00
Luca Boccassi afb1c42f5a
Merge pull request #32592 from yuwata/journal-timestamp
journal: several timestamp cleanups and improvements
2024-05-02 13:57:40 +02:00
Frantisek Sumsal 57188d1467
Merge pull request #32609 from systemd/dependabot/github_actions/github/super-linter-6
build(deps): bump github/super-linter from 5.0.0 to 6
2024-05-02 10:16:40 +02:00
Frantisek Sumsal 109780a35e ci: point Super-Linter to the new upstream
Looks like since [0] the Super-Linter repo was moved to
super-linter/super-linter and github/super-linter is just a fork, so
let's update the reference accordingly.

[0] 59fac7946c
2024-05-02 09:53:43 +02:00
Frantisek Sumsal b160ac9c12 ci: explicitly disable multi status for Super-Linter
The multi status feature requires $GITHUB_TOKEN, and since [0] it
defaults to true. Since we don't need it, let's explicitly disable the
feature.

[0] e6e6e1fa5f
2024-05-02 09:46:44 +02:00
Daniele Medri 5ac4380f44
po: update Italian translation (#32621) 2024-05-02 15:55:17 +09:00
Mike Yuan 89ad0a7117
Merge pull request #32617 from yuwata/journal-sync
journald: wait for journal files fsync()ed on Synchronize() varlink method
2024-05-02 13:39:16 +08:00
Mike Yuan 8bd2f9415c core/selinux-access: use empty_to_na where appropriate 2024-05-02 13:36:52 +08:00
Yu Watanabe affde1d7e7 logs-show: adjust source timestamp with header timestamp
Previously, _SOURCE_REALTIME_TIMESTAMP was only used for realtime
timestamp, and _SOURCE_MONOTONIC_TIMESTAMP was for monotonic.

This make these journal field used more aggressively. If we need
realtime timestamp, but an entry has only _SOURCE_MONOTONIC_TIMESTAMP,
then now realtime timestamp is calculated based on
_SOURCE_MONOTONIC_TIMESTAMP and the header dual timestamp.
Similary, monotonic timestamp is obtained from
_SOURCE_REALTIME_TIMESTAMP and the header dual timestamp.

This should change shown timestamps not so much in most cases, but may
be improve the situation such as #32492.
2024-05-02 06:34:01 +09:00
Yu Watanabe 6ed286d2cf logs-show: make output_timestamp_realtime() only take realtime timestamp
No functional change, just refactoring and preparation for later
commits.
2024-05-02 06:34:01 +09:00
Yu Watanabe c9df471428 sd-journal: verify monotonic timestamp before assigning result
Previously, ret_boot_id was assigned even when the function failed due
to an invalid monotonic timestamp stored for a journal entry.
2024-05-02 06:34:01 +09:00
Yu Watanabe fbecb1fd8d journal: use STRLEN() and xsprintf()
No functional change, just refactoring.
2024-05-02 06:34:01 +09:00
Yu Watanabe 3cd7783e56 journald-audit: set _SOURCE_REALTIME_TIMESTAMP= field in server_dispatch_message()
No functional change, just refactoring.
2024-05-02 06:34:01 +09:00