]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
2 years agostat-util: expose fd_is_read_only_fs()
Yu Watanabe [Wed, 13 Mar 2024 16:59:03 +0000 (01:59 +0900)] 
stat-util: expose fd_is_read_only_fs()

Currently it is not used, but the fucntion is already quite generic and
useful.

2 years agopo: add pkg/debian to POTFILES.skip
Piotr Drąg [Thu, 14 Mar 2024 12:50:12 +0000 (13:50 +0100)] 
po: add pkg/debian to POTFILES.skip

Debian packaging includes the exploded tarball, so scripts used to
detect files that should be in POTFILES.in, like intltool-update -m
used on https://l10n.gnome.org/module/systemd/, falsely detect its
files as needed to be translated. Avoid this behavior by putting
the whole submodule in POTFILES.skip.

2 years agoshell-completion: add systemd-cat --namespace=
Mike Yuan [Thu, 14 Mar 2024 12:15:10 +0000 (20:15 +0800)] 
shell-completion: add systemd-cat --namespace=

Follow-up for 45bcab66a9c23a74107118d310e09a46f28494fd

Addresses https://github.com/systemd/systemd/pull/31754#discussion_r1524715062

2 years agossh-generator: support ssh.ephemeral-key.all-users 31670/head
Sam Leonard [Thu, 7 Mar 2024 14:43:28 +0000 (14:43 +0000)] 
ssh-generator: support ssh.ephemeral-key.all-users

2 years agovmspawn: generate ephemeral SSH keys for the VM
Sam Leonard [Thu, 7 Mar 2024 14:48:54 +0000 (14:48 +0000)] 
vmspawn: generate ephemeral SSH keys for the VM

2 years agoMerge pull request #31754 from YHNdnzj/journal-fd-namespace
Yu Watanabe [Thu, 14 Mar 2024 10:59:19 +0000 (19:59 +0900)] 
Merge pull request #31754 from YHNdnzj/journal-fd-namespace

journal/cat: allow connecting output to specific journal namespace

2 years agoupdate TODO 29721/head
Lennart Poettering [Tue, 7 Nov 2023 21:37:21 +0000 (22:37 +0100)] 
update TODO

2 years agotest: add integration test for capsules
Lennart Poettering [Wed, 8 Nov 2023 08:48:42 +0000 (09:48 +0100)] 
test: add integration test for capsules

2 years agoman: document the new concepts
Lennart Poettering [Wed, 3 Jan 2024 18:29:23 +0000 (19:29 +0100)] 
man: document the new concepts

2 years agobusctl: teach busctl a --capsule=/-C switch too
Lennart Poettering [Tue, 7 Nov 2023 17:19:07 +0000 (18:19 +0100)] 
busctl: teach busctl a --capsule=/-C switch too

2 years agorun: allow connecting to capsule instances with --capsule=/-C
Lennart Poettering [Thu, 26 Oct 2023 07:19:04 +0000 (09:19 +0200)] 
run: allow connecting to capsule instances with --capsule=/-C

2 years agosystemctl: allow connecting to capsule instances with --capsule=/-C
Lennart Poettering [Thu, 26 Oct 2023 07:19:32 +0000 (09:19 +0200)] 
systemctl: allow connecting to capsule instances with --capsule=/-C

2 years agobus-util: add ability to connect directly to capsule instances of systemd --user
Lennart Poettering [Thu, 26 Oct 2023 07:18:37 +0000 (09:18 +0200)] 
bus-util: add ability to connect directly to capsule instances of systemd --user

2 years agoutil: add capsule-util.[ch] with helpers for capsules
Lennart Poettering [Tue, 7 Nov 2023 17:19:25 +0000 (18:19 +0100)] 
util: add capsule-util.[ch] with helpers for capsules

For now, there's only a routine for validating capsule names. More will
be added later.

2 years agounits: add systemd-capsule@.service
Lennart Poettering [Wed, 25 Oct 2023 20:16:52 +0000 (22:16 +0200)] 
units: add systemd-capsule@.service

2 years agosd-bus: add ability to connect to bus as a specific user
Lennart Poettering [Tue, 7 Nov 2023 15:37:39 +0000 (16:37 +0100)] 
sd-bus: add ability to connect to bus as a specific user

2 years agosrc/partition: remove unnecessary uses of "make sure" 31777/head
Zbigniew Jędrzejewski-Szmek [Thu, 14 Mar 2024 07:53:55 +0000 (08:53 +0100)] 
src/partition: remove unnecessary uses of "make sure"

2 years agounits: retitle systemd-bootctl*.{service,socket}
Zbigniew Jędrzejewski-Szmek [Thu, 14 Mar 2024 09:18:58 +0000 (10:18 +0100)] 
units: retitle systemd-bootctl*.{service,socket}

"Starting Boot Control…" would be a fairly confusing message in the boot logs.
Use "… Service" to mirror what we have in other services like
systemd-{hostnamed,timedated,portabled,machined,…}.service.

2 years agounits: drop "(Varlink)"
Zbigniew Jędrzejewski-Szmek [Thu, 14 Mar 2024 09:16:25 +0000 (10:16 +0100)] 
units: drop "(Varlink)"

We generally don't specify the protocol implementation in unit descriptions.

For journald, we have:
  $ git grep Description 'units/*journald*'
  units/systemd-journald-audit.socket:Description=Journal Audit Socket
  units/systemd-journald-dev-log.socket:Description=Journal Socket (/dev/log)
  units/systemd-journald-varlink@.socket:Description=Journal Varlink Socket for Namespace %i
  units/systemd-journald.service.in:Description=Journal Service
  units/systemd-journald.socket:Description=Journal Sockets
  units/systemd-journald@.service.in:Description=Journal Service for Namespace %i
  units/systemd-journald@.socket:Description=Journal Sockets for Namespace %i
so we need to keep "Varlink" in the name. But also use "Sockets" (plural)
for the "main" socket unit, since it opens multiple sockets.

2 years agotools/elf2efi: rework exception messages
Zbigniew Jędrzejewski-Szmek [Wed, 13 Mar 2024 13:02:46 +0000 (14:02 +0100)] 
tools/elf2efi: rework exception messages

RuntimeError is documented as "Unspecified run-time error". It doesn't make
much sense for Python. (It originated in Java, where exceptions that can be
thrown by a function are declared in the function signature. All code calling
such a function must either explicitly catch all possible exception types, or
allow them to propagate by listing them in its own exception type list. This is
nice in theory, but in practice very annoying. Especially during development,
when the list of possible exception types is not finalized, we would end up
adding and removing exceptions to functions signatures all the time. Also for
code which is designed to call functions recursively, we would soon end up with
all functions declaring all possible exception types… To avoid this, people
would quite often do fake handling with a block that either prints and ignores
an exception, or has just a comment like "fix me later", or even nothing. This
often lead to people forgetting to adjust this later on and production code
containing such constructs. An escape hatch was opened with RuntimeException and
its subclasses, which do not need to be pre-declared. Various memory-related
exceptions were added as subclasses of RuntimeException. But later on, people
starting using this to not to have to declare all exception types everywhere.)

In Python, exceptions do no have to be pre-declared, and for code which just
encounters a failure, we should raise a specific exception type. The catch-all
class for unexpected input is ValueError.

For https://github.com/systemd/systemd/issues/31637:
BadSectionError: Section '.data' @0x28000 overlaps previous section @0x28000+0x300=@0x28300

Also, exception strings should not contain trailing periods, because they are
often embedded in sentences.

2 years agoman: shorten unnecessarily long example
Lennart Poettering [Thu, 14 Mar 2024 08:57:44 +0000 (09:57 +0100)] 
man: shorten unnecessarily long example

2 years agoMerge pull request #31770 from poettering/linkat-replace
Lennart Poettering [Thu, 14 Mar 2024 10:03:59 +0000 (11:03 +0100)] 
Merge pull request #31770 from poettering/linkat-replace

introduce linkat_replace() helper, and port various things over to it

2 years agotools/elf2efi: split out function to create parser
Zbigniew Jędrzejewski-Szmek [Wed, 13 Mar 2024 12:21:51 +0000 (13:21 +0100)] 
tools/elf2efi: split out function to create parser

main() is supposed to be lean and mean.

2 years agotools/elf2efi: align columns in tables, unify formatting
Zbigniew Jędrzejewski-Szmek [Wed, 13 Mar 2024 12:16:17 +0000 (13:16 +0100)] 
tools/elf2efi: align columns in tables, unify formatting

For tables which represent binary data structures, readability is greatly
enhanced if the part which shows field size and type is aligned. This follows
the usual style for tables in the rest of the systemd codebase.

Also, use the same style for functions: if the function signature is too long
to fit in one line, put each parameter on a separate line.

Also, for comprehension expressions, if they are split, use the usual Python
style.

Also, drop format annotations, since the code isn't automatically formatted
anymore, and automatic formatting is neither feasible nor a goal for the
systemd codebase.

2 years agounits/systemd-machine-id-commit: retitle
Zbigniew Jędrzejewski-Szmek [Wed, 13 Mar 2024 21:34:49 +0000 (22:34 +0100)] 
units/systemd-machine-id-commit: retitle

Our docs say that the Description should be capitalized.
Also, change "commit" to "save" to make this more accessible.

2 years agounits: retitle systemd-pcrextend.{service,socket}, change TPM2→TPM
Zbigniew Jędrzejewski-Szmek [Wed, 13 Mar 2024 21:18:13 +0000 (22:18 +0100)] 
units: retitle systemd-pcrextend.{service,socket}, change TPM2→TPM

I was looking at the logs in some bug and saw this:

Mar 13 15:55:12 fedora systemd[1]: systemd-pcrmachine.service - TPM2 PCR Machine ID Measurement was skipped because of an unmet condition check (ConditionSecurity=measured-uki).
Mar 13 15:55:12 fedora systemd[1]: Starting systemd-remount-fs.service - Remount Root and Kernel File Systems...
Mar 13 15:55:12 fedora systemd[1]: systemd-tpm2-setup-early.service - TPM2 SRK Setup (Early) was skipped because of an unmet condition check (ConditionSecurity=measured-uki).

This is overly technical, for most units we don't provide this level of
detail about the implementation. So retitle the units to be more accessible.

Also, the fact that it's a v. 2 of the TPM is not that important. We don't
support TPM 1.2, but computers without TPM v2 are getting rare. For other
units we don't advertise the version of hardware, and let's not do this here,
to reduce some complexity.

2 years agoptyfwd: fix typo
Yu Watanabe [Thu, 14 Mar 2024 08:40:24 +0000 (17:40 +0900)] 
ptyfwd: fix typo

Follow-up for d0aa368c85adf2efa29c363a6671927fe7e8e76f.

2 years agoTODO: fix typo
Yu Watanabe [Thu, 14 Mar 2024 08:39:09 +0000 (17:39 +0900)] 
TODO: fix typo

Follow-up for 54b0e05ed0db04d515ecf7773e39cd61b6445698.

2 years agostat-util: fix typo
Yu Watanabe [Thu, 14 Mar 2024 08:37:48 +0000 (17:37 +0900)] 
stat-util: fix typo

Follow-up for 7cff2b79f00e82c85d0773e8cb4074c59abc6f43.

2 years agocreds-util: port make_credential_host_secret() over to link_tmpfile_at() 31770/head
Lennart Poettering [Wed, 13 Mar 2024 11:45:22 +0000 (12:45 +0100)] 
creds-util: port make_credential_host_secret() over to link_tmpfile_at()

Let's simplify things by just reusing the primitives we already have.

2 years agotmpfile-util: port link_tmpfile_at() over to linkat_replace()
Lennart Poettering [Wed, 13 Mar 2024 11:43:43 +0000 (12:43 +0100)] 
tmpfile-util: port link_tmpfile_at() over to linkat_replace()

2 years agofs-util: add new helper linkat_replace()
Lennart Poettering [Tue, 12 Dec 2023 10:27:55 +0000 (11:27 +0100)] 
fs-util: add new helper linkat_replace()

2 years agofs-util: move link_fd() from tmpfile-util.c into generic fs-util.c
Lennart Poettering [Wed, 13 Mar 2024 16:48:04 +0000 (17:48 +0100)] 
fs-util: move link_fd() from tmpfile-util.c into generic fs-util.c

It's a generically useful call, let's move it so that we can use it at
more places.

2 years agopath-util: add helper that checks if a path definitely refers to a dir
Lennart Poettering [Wed, 13 Mar 2024 22:17:11 +0000 (23:17 +0100)] 
path-util: add helper that checks if a path definitely refers to a dir

2 years agoMerge pull request #31771 from keszybz/meson-make-partial-builds-great-again
Zbigniew Jędrzejewski-Szmek [Thu, 14 Mar 2024 07:23:04 +0000 (08:23 +0100)] 
Merge pull request #31771 from keszybz/meson-make-partial-builds-great-again

Meson make partial builds work again

2 years agojournal/cat: allow connecting output to specific journal namespace 31754/head
Mike Yuan [Wed, 13 Mar 2024 11:28:24 +0000 (19:28 +0800)] 
journal/cat: allow connecting output to specific journal namespace

2 years agounits: make systemd-journald@.socket installable
Mike Yuan [Wed, 13 Mar 2024 11:55:51 +0000 (19:55 +0800)] 
units: make systemd-journald@.socket installable

2 years agosd-journal: introduce sd_journal_stream_fd_with_namespace
Mike Yuan [Wed, 13 Mar 2024 10:50:23 +0000 (18:50 +0800)] 
sd-journal: introduce sd_journal_stream_fd_with_namespace

2 years agojournal-send: introduce journal_stream_path helper
Mike Yuan [Wed, 13 Mar 2024 10:43:53 +0000 (18:43 +0800)] 
journal-send: introduce journal_stream_path helper

2 years agopath-util: introduce skip_leading_slash and use it where appropriate
Mike Yuan [Wed, 13 Mar 2024 10:24:32 +0000 (18:24 +0800)] 
path-util: introduce skip_leading_slash and use it where appropriate

2 years agoMerge pull request #31761 from CodethinkLabs/vmspawn/bug_fixes
Luca Boccassi [Wed, 13 Mar 2024 23:37:50 +0000 (23:37 +0000)] 
Merge pull request #31761 from CodethinkLabs/vmspawn/bug_fixes

vmspawn: fix two minor bugs

2 years agocore/cgroup: introduce MemoryZSwapWriteback setting
Mike Yuan [Tue, 12 Mar 2024 08:14:00 +0000 (16:14 +0800)] 
core/cgroup: introduce MemoryZSwapWriteback setting

Added in
https://github.com/torvalds/linux/commit/501a06fe8e4c185bbda371b8cedbdf1b23a633d8

2 years agoMerge pull request #31758 from DaanDeMeyer/kvm
Daan De Meyer [Wed, 13 Mar 2024 23:16:43 +0000 (00:16 +0100)] 
Merge pull request #31758 from DaanDeMeyer/kvm

mkosi: Enable KVM

2 years agoMerge pull request #31584 from yuwata/sd-ndisc-option-parser-cleanups
Luca Boccassi [Wed, 13 Mar 2024 23:06:50 +0000 (23:06 +0000)] 
Merge pull request #31584 from yuwata/sd-ndisc-option-parser-cleanups

sd-ndisc: rewrite option parser

2 years agomkosi: Enable KVM 31758/head
Daan De Meyer [Wed, 13 Mar 2024 13:18:03 +0000 (14:18 +0100)] 
mkosi: Enable KVM

Since https://github.blog/2024-01-17-github-hosted-runners-double-the-power-for-open-source/,
it seems that KVM is supported on GA runners, so let's explicitly
enable it to make sure it is used.

We update mkosi to latest and set QemuFirmware=uefi to disable
secure boot which crashes qemu until https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2038777
is fixed.

2 years agomkosi: Allow booting without secure boot
Daan De Meyer [Wed, 13 Mar 2024 19:50:06 +0000 (20:50 +0100)] 
mkosi: Allow booting without secure boot

Don't fail if SecureBoot is not enabled. Instead, only execute
the secure boot related checks if secure boot is actually enabled.

2 years agoboot: Only use io.systemd.boot.kernel-cmdline-extra for type 1 images
Daan De Meyer [Wed, 13 Mar 2024 16:59:51 +0000 (17:59 +0100)] 
boot: Only use io.systemd.boot.kernel-cmdline-extra for type 1 images

Otherwise the cmdline is duplicated for UKIs.

2 years agobuild(deps): bump github/codeql-action from 3.24.6 to 3.24.7
dependabot[bot] [Wed, 13 Mar 2024 19:16:26 +0000 (19:16 +0000)] 
build(deps): bump github/codeql-action from 3.24.6 to 3.24.7

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.6 to 3.24.7.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/8a470fddafa5cbb6266ee11b37ef4d8aae19c571...3ab4101902695724f9365a384f86c1074d94e18c)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agobuild(deps): bump pkg/debian from `49132a8` to `5451923`
dependabot[bot] [Wed, 13 Mar 2024 16:48:35 +0000 (16:48 +0000)] 
build(deps): bump pkg/debian from `49132a8` to `5451923`

Bumps pkg/debian from `49132a8` to `5451923`.

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

Signed-off-by: dependabot[bot] <support@github.com>
2 years agobuild(deps): bump actions/checkout from 4.1.1 to 4.1.2
dependabot[bot] [Wed, 13 Mar 2024 16:48:43 +0000 (16:48 +0000)] 
build(deps): bump actions/checkout from 4.1.1 to 4.1.2

Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.1 to 4.1.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/b4ffde65f46336ab88eb53be808477a3936bae11...9bb56186c3b09b4f86b1c65136769dd318469633)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agobuild(deps): bump meson from 1.3.2 to 1.4.0 in /.github/workflows
dependabot[bot] [Wed, 13 Mar 2024 16:48:38 +0000 (16:48 +0000)] 
build(deps): bump meson from 1.3.2 to 1.4.0 in /.github/workflows

Bumps [meson](https://github.com/mesonbuild/meson) from 1.3.2 to 1.4.0.
- [Release notes](https://github.com/mesonbuild/meson/releases)
- [Commits](https://github.com/mesonbuild/meson/compare/1.3.2...1.4.0)

---
updated-dependencies:
- dependency-name: meson
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agobuild(deps): bump softprops/action-gh-release from 1 to 2
dependabot[bot] [Wed, 13 Mar 2024 16:48:33 +0000 (16:48 +0000)] 
build(deps): bump softprops/action-gh-release from 1 to 2

Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 1 to 2.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/de2c0eb89ae2a093876385947365aca7b0e5f844...9d7c94cfd0a1f3ed45544c887983e9fa900f0564)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agomeson: always use vcs_tag 31771/head
Zbigniew Jędrzejewski-Szmek [Wed, 13 Mar 2024 17:33:59 +0000 (18:33 +0100)] 
meson: always use vcs_tag

The branch with configure_file() was broken: meson doesn't know that
this file is a prerequisite for other targets, so partial rebuilds were broken.
Easy reproducer:
  git mv .git{,.no}
  touch meson build && ninja -C build src/basic/libbasic.a
  rm build/version.h
  ninja -C build src/basic/libbasic.a

Using vcs_tag() also in that case makes meson always build the file.

(Combined with the issue fixed in previous commit, I was encountering
failed builds quite often.)

Fixes 3f6ce3d4f04de0f765bb3bde0e400d0823829486.

2 years agomeson: .git can also be a file
Zbigniew Jędrzejewski-Szmek [Wed, 13 Mar 2024 17:17:10 +0000 (18:17 +0100)] 
meson: .git can also be a file

With git-worktree, .git is just a file that specifies where
the parent git directory is. All the git information is available
in a git worktree, so it should be treated the same as a checkout
with a .git directory.

2 years agoMerge pull request #31673 from DaanDeMeyer/mkosi
Daan De Meyer [Wed, 13 Mar 2024 16:48:00 +0000 (17:48 +0100)] 
Merge pull request #31673 from DaanDeMeyer/mkosi

mkosi: Introduce packaging sources as submodules

2 years agovmspawn: fix FD passing logic 31761/head
Sam Leonard [Wed, 13 Mar 2024 15:20:40 +0000 (15:20 +0000)] 
vmspawn: fix FD passing logic

2 years agovmspawn: prefix extra kernel-cmdline-extra with -smbios
Sam Leonard [Wed, 13 Mar 2024 15:19:07 +0000 (15:19 +0000)] 
vmspawn: prefix extra kernel-cmdline-extra with -smbios

2 years agounits: Bump various oneshot unit timeouts to 90s
Daan De Meyer [Wed, 13 Mar 2024 09:26:52 +0000 (10:26 +0100)] 
units: Bump various oneshot unit timeouts to 90s

In mkosi, we've been having CI failures caused by
systemd-machine-id-commit.service timing out. Let's bump the timeout
for it and systemd-rfkill.service to 90s which we also use for other
oneshot services to avoid transient failures on slower systems.

2 years agofuzz: make sure DHCP client leases are loaded successfully
Evgeny Vereshchagin [Wed, 13 Mar 2024 11:55:11 +0000 (11:55 +0000)] 
fuzz: make sure DHCP client leases are loaded successfully

Now that fa3357b9e8d9d7a486902d0b6d4b4015fc10aac0 is merged the fuzz
target should no longer crash there.

2 years agomkosi: Drop leftover mkosi.kernel.config
Daan De Meyer [Wed, 13 Mar 2024 12:39:41 +0000 (13:39 +0100)] 
mkosi: Drop leftover mkosi.kernel.config

The rest of the kernel build infra for mkosi was already removed a
long time ago, but we forgot to remove this config file. Let's drop
it now as well;

2 years agoudev: add assert for EVENT_RESULT_EXIT_STATUS_BASE (#31710)
sharad3001 [Wed, 13 Mar 2024 13:25:22 +0000 (18:55 +0530)] 
udev: add assert for EVENT_RESULT_EXIT_STATUS_BASE (#31710)

EVENT_RESULT_EXIT_STATUS_BASE and EVENT_RESULT_SUCCESS has the same value.
Code updated to add assert statement for EVENT_RESULT_EXIT_STATUS_BASE.

2 years agonetwork/varlink: return StorageReadOnly error
Yu Watanabe [Wed, 13 Mar 2024 01:29:53 +0000 (10:29 +0900)] 
network/varlink: return StorageReadOnly error

Addresses https://github.com/systemd/systemd/pull/30021#discussion_r1521595855.

2 years agonetworkctl.c : call 'assert_not_reached' where appropriate
AKHIL KUMAR [Wed, 13 Mar 2024 06:32:59 +0000 (12:02 +0530)] 
networkctl.c : call 'assert_not_reached' where appropriate

networkctl.c : call 'assert_not_reached' where appropriate

2 years agonetworkd-manager: drop spurious return
Mike Yuan [Wed, 13 Mar 2024 11:04:54 +0000 (19:04 +0800)] 
networkd-manager: drop spurious return

Follow-up for f90eb086270f0aea8efcbff5a5e4c338d178cfd4

2 years agoMerge pull request #31746 from yuwata/network-unit-hide-boot-and-efi
Mike Yuan [Wed, 13 Mar 2024 12:40:07 +0000 (20:40 +0800)] 
Merge pull request #31746 from yuwata/network-unit-hide-boot-and-efi

unit: do not trigger automount for /boot and/or /efi

2 years agoMerge pull request #31729 from aafeijoo-suse/logind-cleanups
Luca Boccassi [Wed, 13 Mar 2024 11:27:35 +0000 (11:27 +0000)] 
Merge pull request #31729 from aafeijoo-suse/logind-cleanups

logind: coding style cleanups

2 years agoMerge pull request #31733 from poettering/polkit-more-flags
Lennart Poettering [Wed, 13 Mar 2024 11:11:27 +0000 (12:11 +0100)] 
Merge pull request #31733 from poettering/polkit-more-flags

add two more flags to polkit client wrapper

2 years agomkosi: Introduce packaging sources as submodules 31673/head
Daan De Meyer [Fri, 8 Mar 2024 10:33:25 +0000 (11:33 +0100)] 
mkosi: Introduce packaging sources as submodules

By always cloning the latest branch commit, we can't bisect properly
using mkosi as when bisecting wildly different packaging sources will
be used compared to when the commit was merged. By using submodules, we
track individual commits which means when bisecting the same packaging
sources will be used.

We use git submodules as dependabot has support for automatically making
PRs to update git submodules. This commit also includes the necessary
dependabot configuration to enable this.

We make ubuntu/debian use the same submodule instead of adding the debian
packaging sources twice by introducing a new $PKG_SUBDIR environment variable
and using it instead of $DISTRIBUTION.

2 years agomkosi: Remove some leftover shell debugging
Daan De Meyer [Sat, 9 Mar 2024 13:38:00 +0000 (14:38 +0100)] 
mkosi: Remove some leftover shell debugging

2 years agomkosi: Use same pkg/ subdirectory for debian and ubuntu
Daan De Meyer [Fri, 8 Mar 2024 11:57:31 +0000 (12:57 +0100)] 
mkosi: Use same pkg/ subdirectory for debian and ubuntu

Instead of cloning the same repository twice, let's make sure we
use the same directory for both debian/ubuntu.

2 years agoupdate TODO
Lennart Poettering [Wed, 13 Mar 2024 10:21:25 +0000 (11:21 +0100)] 
update TODO

2 years agoupdate TODO
Lennart Poettering [Wed, 13 Mar 2024 10:17:02 +0000 (11:17 +0100)] 
update TODO

2 years agopolkit: add another flag that controls how to treat the PK absent case 31733/head
Lennart Poettering [Wed, 28 Feb 2024 20:56:55 +0000 (21:56 +0100)] 
polkit: add another flag that controls how to treat the PK absent case

Typically if PK is not present we want to treat this as "denied". But
sometimes it makes sense to treat this case as "allowed".

In particular the combination POLKIT_ALWAYS_QUERY and
POLKIT_DEFAULT_ALLOW makes a lot of sense: it means we can enable PK
logic for actions where we so far bypassed the checks for root. With the
new combination we can have a default policy of allowing some operation
but still provide an effective hook to disable it.

Also add some debug logging about PK operations and results as they are ongoing.

2 years agopolkit: add new POLKIT_ALWAYS_QUERY flag
Lennart Poettering [Wed, 28 Feb 2024 20:31:53 +0000 (21:31 +0100)] 
polkit: add new POLKIT_ALWAYS_QUERY flag

When this flag is set we'll disable the local shortcut that skips polkit
checks for clients that are privileged, and assumes they are
authenticated.

Or in other words: if this flag is set, we'll query PK not matter what,
regardless if it's root we talk about or any other user.

2 years agopolkit: allow checking if we already acquired some action
Lennart Poettering [Wed, 28 Feb 2024 16:06:11 +0000 (17:06 +0100)] 
polkit: allow checking if we already acquired some action

This adds a new helper that basically just wraps
async_polkit_query_have_action() and allows calling this without
actually triggering a PK authentication operation: it just checks if we
aleady have acquired an action or not.

2 years agoMerge pull request #31731 from poettering/stat-is-set
Lennart Poettering [Wed, 13 Mar 2024 09:37:15 +0000 (10:37 +0100)] 
Merge pull request #31731 from poettering/stat-is-set

stat-util: add explicit helpers for checking if stat/statx is initialized

2 years agolocal-addresses: call 'assert_not_reached' where appropriate (#31728)
SidhuRupinder [Wed, 13 Mar 2024 05:16:46 +0000 (10:46 +0530)] 
local-addresses: call 'assert_not_reached' where appropriate (#31728)

Added code for calling the 'assert_not_reached' function as the value of the 'family' parameter must be either 'AF_INET' or 'AF_INET6'.

2 years agoMerge pull request #31727 from YHNdnzj/homed-followup
Mike Yuan [Wed, 13 Mar 2024 05:10:34 +0000 (13:10 +0800)] 
Merge pull request #31727 from YHNdnzj/homed-followup

data-fd-util: some cleanups

2 years agosd-ndisc-router: adjust function names and type of returned value 31584/head
Yu Watanabe [Thu, 29 Feb 2024 04:06:31 +0000 (13:06 +0900)] 
sd-ndisc-router: adjust function names and type of returned value

- prefix length and preference should be fit in uint8_t, and actually
  the kernel and networkd uses uint8_t to store them.
- captive portal is now stored as a NUL-terminated string. Hence, it
  is not necessary to also provide its length.

2 years agosd-ndisc-router: introduce sd_ndisc_router_get_sender_mac()
Yu Watanabe [Thu, 29 Feb 2024 03:45:51 +0000 (12:45 +0900)] 
sd-ndisc-router: introduce sd_ndisc_router_get_sender_mac()

The Router Advertisement option can take the MAC address of the sender.
Let's introduce a function to get it from the parsed options.

2 years agondisc-option: drop unused function
Yu Watanabe [Thu, 29 Feb 2024 03:43:03 +0000 (12:43 +0900)] 
ndisc-option: drop unused function

2 years agosd-ndisc-router: use ndisc_parse_options() and friends to parse Router Advertisement
Yu Watanabe [Thu, 29 Feb 2024 03:42:16 +0000 (12:42 +0900)] 
sd-ndisc-router: use ndisc_parse_options() and friends to parse Router Advertisement

2 years agondisc-option: introduce generic NDisc option parser
Yu Watanabe [Thu, 29 Feb 2024 03:31:58 +0000 (12:31 +0900)] 
ndisc-option: introduce generic NDisc option parser

It is not used in this commit, but will be used for parsing NDisc
options in Router Advertisement message and friends.

The parser does mostly equivalent to what currently we do in
sd-ndisc-router.c. Several notable differences are:
- also perse source and target link-layer address,
- refuse multiple captive portals,
- check if the captive portal is in safe characters, as previously we
  checked that in networkd-ndisc.c,
- dedup prefixes, routes, and pref64,
- limit the total number of options, for safety.

2 years agosd-ndisc: rename ndisc-protocol.[ch] -> ndisc-option.[ch]
Yu Watanabe [Fri, 8 Mar 2024 15:08:27 +0000 (00:08 +0900)] 
sd-ndisc: rename ndisc-protocol.[ch] -> ndisc-option.[ch]

2 years agounit: do not trigger automount for /boot and/or /efi 31746/head
Yu Watanabe [Wed, 13 Mar 2024 01:15:23 +0000 (10:15 +0900)] 
unit: do not trigger automount for /boot and/or /efi

ProtectSystem=full remounts /boot and/or /efi read-only, but that
may trigger automount for the paths and delay the service being started.
===
systemd[1]: boot.automount: Got automount request for /boot, triggered by 720 ((networkd))
===
The service does not need to access the paths, so let's hide them.

Follow-up for f90eb086270f0aea8efcbff5a5e4c338d178cfd4.

Fixes #31742.

2 years agounit: sort option
Yu Watanabe [Wed, 13 Mar 2024 01:14:48 +0000 (10:14 +0900)] 
unit: sort option

2 years agoMerge pull request #31735 from mrc0mmand/test-runner
Luca Boccassi [Wed, 13 Mar 2024 00:45:03 +0000 (00:45 +0000)] 
Merge pull request #31735 from mrc0mmand/test-runner

test: split logs from each test into separate files if requested

2 years agofs-utils: new wrapper fd_reopen_propagate_append_and_position()
Lars Ellenberg [Wed, 7 Feb 2024 12:12:50 +0000 (13:12 +0100)] 
fs-utils: new wrapper fd_reopen_propagate_append_and_position()

We may want to propagate O_APPEND, or (try to) keep the current file position,
even if we use fd_reopen() to re-initialize (and "unshare") other file
description status.

For now, used only with --pty to keep/propagate O_APPEND (and/or) position
if set on stdin/stdout.

If we re-open stdout and "drop" the O_APPEND,
we get rather "unexpected" behavior,
for example with repeated "systemd-run --pty >> some-log".

If someone carefully pre-positioned the passed in original file descriptors,
we avoid surprises if we do not reset file postition to zero.

fcntl F_GETFL first, and propagate O_APPEND if present in the existing flags.

Then use lseek to propagate the file position.

2 years agotest: split logs from each test into separate files if requested 31735/head
Frantisek Sumsal [Tue, 12 Mar 2024 12:11:16 +0000 (13:11 +0100)] 
test: split logs from each test into separate files if requested

If both $ARTIFACT_DIRECTORY and $SPLIT_TEST_LOGS are set, split the
output from each test into a separate log file, so we don't have to load
one ginormous log file when checking the results.

2 years agotest: clean up the integration test runner a bit
Frantisek Sumsal [Tue, 12 Mar 2024 11:52:45 +0000 (12:52 +0100)] 
test: clean up the integration test runner a bit

2 years agohomed: fix typo
Antonio Alvarez Feijoo [Tue, 12 Mar 2024 14:22:43 +0000 (15:22 +0100)] 
homed: fix typo

2 years agoci: reduce ASLR entropy
Frantisek Sumsal [Tue, 12 Mar 2024 13:49:55 +0000 (14:49 +0100)] 
ci: reduce ASLR entropy

The latest GH Action runners started using 32-bit entropy for ASLR,
which makes it incompatible with llvm-14. This was fixed in later llvm
releases, but these aren't available on Ubuntu Jammy (22.04). Let's
reduce the ASLR entropy to 28-bit, which should make llvm happy again,
until the issue is resolved.

See: https://github.com/actions/runner-images/issues/9491

2 years agoupdate TODO
Lennart Poettering [Tue, 12 Mar 2024 13:03:29 +0000 (14:03 +0100)] 
update TODO

2 years agocatalog: update Polish translation
Piotr Drąg [Sun, 3 Mar 2024 14:52:08 +0000 (15:52 +0100)] 
catalog: update Polish translation

2 years agoukify: really add default .sbat for UKIs
Luca Boccassi [Wed, 6 Mar 2024 01:12:19 +0000 (01:12 +0000)] 
ukify: really add default .sbat for UKIs

This was lost on refactor, and only addons had a default uki
line in the .sbat. Add it back, and differentiate between the
default for UKIs vs the default for addons, so that they can
be revoked separately. These are only defaults and users are
encouraged to provide their own.

Follow-up for a8b645dec8e6abf4c9ba0c93a6a0088953a2155e

2 years agoMerge pull request #31716 from evverx/fuzz-lease-save-load
Yu Watanabe [Tue, 12 Mar 2024 10:05:17 +0000 (19:05 +0900)] 
Merge pull request #31716 from evverx/fuzz-lease-save-load

fuzz: save/load DHCP client leases

2 years agostat-util: make sure inode_type_to_string() handles anonymous inodes in a reasonable way 31731/head
Lennart Poettering [Tue, 12 Mar 2024 09:45:24 +0000 (10:45 +0100)] 
stat-util: make sure inode_type_to_string() handles anonymous inodes in a reasonable way

2 years agologind-inhibit: get rid of basename() in inhibitor_new() 31729/head
Antonio Alvarez Feijoo [Tue, 12 Mar 2024 09:43:31 +0000 (10:43 +0100)] 
logind-inhibit: get rid of basename() in inhibitor_new()

Follow-up to #31594

2 years agologind: place 'ret' param at last
Antonio Alvarez Feijoo [Tue, 12 Mar 2024 09:39:08 +0000 (10:39 +0100)] 
logind: place 'ret' param at last

Follow-up to 2454cee32e

2 years agostat-util: add explicit helpers for checking if stat/statx is initialized
Lennart Poettering [Tue, 12 Mar 2024 09:23:34 +0000 (10:23 +0100)] 
stat-util: add explicit helpers for checking if stat/statx is initialized

This is a follow-up for 945a8210c770801c8492eda03b6e9af3ec5d03a3 and
makes the st_dev check generic, so that we can reuse it some other
places. It also incorporates the non-NULL check now, to be a
comprehensive one-stop solution.

The helper is static inline so that compilers can optimize the redundant
checks away in case it is combined with other checks.