systemd/.git
20 months agocore: use strdup_to()
Zbigniew Jędrzejewski-Szmek [Tue, 19 Mar 2024 22:36:37 +0000 (23:36 +0100)]
core: use strdup_to()

Those are all pretty straightforward.

20 months agooomd: use strdup_to() and RET_GATHER()
Zbigniew Jędrzejewski-Szmek [Tue, 19 Mar 2024 22:36:03 +0000 (23:36 +0100)]
oomd: use strdup_to() and RET_GATHER()

20 months agobasic/unit-name: use strdup_to() in slice_build_parent_slice()
Zbigniew Jędrzejewski-Szmek [Tue, 19 Mar 2024 22:35:32 +0000 (23:35 +0100)]
basic/unit-name: use strdup_to() in slice_build_parent_slice()

The handling of the buffer is not obvious, so add a comment.

20 months agologind: use strdup_to()
Zbigniew Jędrzejewski-Szmek [Tue, 19 Mar 2024 22:34:52 +0000 (23:34 +0100)]
logind: use strdup_to()

20 months agoshared/dissect-image: use strdup_to_full() in one more place
Zbigniew Jędrzejewski-Szmek [Tue, 19 Mar 2024 22:34:24 +0000 (23:34 +0100)]
shared/dissect-image: use strdup_to_full() in one more place

20 months agomachinectl: use strdup_to() and move cleanup out of the loop
Zbigniew Jędrzejewski-Szmek [Tue, 19 Mar 2024 22:34:01 +0000 (23:34 +0100)]
machinectl: use strdup_to() and move cleanup out of the loop

It doesn't matter much, but it seems nicer to call va_end() just
once.

20 months agobasic/time-util: use strdup_to() and reformat a bit
Zbigniew Jędrzejewski-Szmek [Tue, 19 Mar 2024 22:32:55 +0000 (23:32 +0100)]
basic/time-util: use strdup_to() and reformat a bit

20 months agosd-journal/catalog: use strdup_to(), rename output param
Zbigniew Jędrzejewski-Szmek [Tue, 19 Mar 2024 22:21:06 +0000 (23:21 +0100)]
sd-journal/catalog: use strdup_to(), rename output param

20 months agosd-device: use strdup_to() and rename output param
Zbigniew Jędrzejewski-Szmek [Tue, 19 Mar 2024 22:14:31 +0000 (23:14 +0100)]
sd-device: use strdup_to() and rename output param

device_open_from_devnum() returns two things: the devname via
an output param, and the fd via the return value. Rename the param
to signal that it's not the only return channel.

20 months agoshared: use strdup_to() in specifier functions
Zbigniew Jędrzejewski-Szmek [Tue, 19 Mar 2024 17:29:40 +0000 (18:29 +0100)]
shared: use strdup_to() in specifier functions

20 months agoReplace strdup_or_null() by strdup_to()
Zbigniew Jędrzejewski-Szmek [Tue, 19 Mar 2024 20:08:52 +0000 (21:08 +0100)]
Replace strdup_or_null() by strdup_to()

I didn't know that this helper existed… It is very similar to strdup_to_full(),
but all callers can actually be replaced by strdup_to(), which has more fitting
semantics.

20 months agobasic/string-util: use strdup_to() in string_extract_line()
Zbigniew Jędrzejewski-Szmek [Tue, 19 Mar 2024 19:47:12 +0000 (20:47 +0100)]
basic/string-util: use strdup_to() in string_extract_line()

20 months agobasic/socket-util: use strdup_to() in sockaddr_pretty()
Zbigniew Jędrzejewski-Szmek [Tue, 19 Mar 2024 19:40:57 +0000 (20:40 +0100)]
basic/socket-util: use strdup_to() in sockaddr_pretty()

The function was written to support ret==NULL, but the only caller always
passes ret, and sockaddr_pretty() also requires ret to be set, so that
half-implemented code wasn't very useful.

20 months agocoredump: use free_and_strdup_warn() more
Zbigniew Jędrzejewski-Szmek [Tue, 19 Mar 2024 22:50:08 +0000 (23:50 +0100)]
coredump: use free_and_strdup_warn() more

20 months agosystemd-analyze: use strdup_to()
Zbigniew Jędrzejewski-Szmek [Tue, 19 Mar 2024 17:41:08 +0000 (18:41 +0100)]
systemd-analyze: use strdup_to()

20 months agobasic/fileio: use strdup_to_full() in read_stripped_line()
Zbigniew Jędrzejewski-Szmek [Tue, 19 Mar 2024 17:29:40 +0000 (18:29 +0100)]
basic/fileio: use strdup_to_full() in read_stripped_line()

The return value of read_stripped_line() is changed. Before we'd return the
number of characters read, but that number was not meaningful after we called
strstrip(). So just return 0 if nothing was read (EOF), and 1 if something was
read (not EOF). All the callers were only checking for <0 or ==0.

20 months agovarious: also use strdup_to() in cases where we don't return immediately
Zbigniew Jędrzejewski-Szmek [Tue, 19 Mar 2024 22:23:26 +0000 (23:23 +0100)]
various: also use strdup_to() in cases where we don't return immediately

20 months agovarious: use strdup_to() after getenv()
Zbigniew Jędrzejewski-Szmek [Tue, 19 Mar 2024 19:34:42 +0000 (20:34 +0100)]
various: use strdup_to() after getenv()

20 months agovarious: use strdup_to() in various obvious cases
Zbigniew Jędrzejewski-Szmek [Tue, 19 Mar 2024 17:27:04 +0000 (18:27 +0100)]
various: use strdup_to() in various obvious cases

strdup_to() returns 0 on success and here we convert obvious blocks
which either return -ENOMEM or 0.

20 months agotest-cgroup-util: reduce scope of iterator variables
Zbigniew Jędrzejewski-Szmek [Fri, 15 Mar 2024 12:41:05 +0000 (13:41 +0100)]
test-cgroup-util: reduce scope of iterator variables

20 months agobasic/cgroup-util: use strdup_to() and strdup_to_full() as appropriate
Zbigniew Jędrzejewski-Szmek [Fri, 15 Mar 2024 12:39:50 +0000 (13:39 +0100)]
basic/cgroup-util: use strdup_to() and strdup_to_full() as appropriate

20 months agohostnamed: use strdup_to_full()
Zbigniew Jędrzejewski-Szmek [Fri, 15 Mar 2024 12:20:15 +0000 (13:20 +0100)]
hostnamed: use strdup_to_full()

20 months agosrc/basic: add yet another strdup helper
Zbigniew Jędrzejewski-Szmek [Fri, 15 Mar 2024 12:16:51 +0000 (13:16 +0100)]
src/basic: add yet another strdup helper

It's a bit ugly to have both strdup_to() and strdup_to_full(). I initially
started with one variant, but then in some functions we want the additional
info, while in many other places, having 1 instead of 0 causes the return
value of whole chains of functions to be changed. It *probably* wouldn't cause
any difference, but there is at least of bunch of tests that would need to be
updated, so in the end it seems to have the two variants.

The output param is first to match free_and_strdup() and other similar
functions.

20 months agoTODO: drop entry about renaming
Zbigniew Jędrzejewski-Szmek [Tue, 19 Mar 2024 10:33:35 +0000 (11:33 +0100)]
TODO: drop entry about renaming

NamespaceId is inconsistent with our general spelling rules which say that
capitalization of acronyms should not be changed when they are concatenated in
CapitalizedCamelCase strings. But NamespaceId was added in
f2ef8b28a5266a0070b0cb8b6375e418a5300975, before v249, so it's too late to
change it. OTOH, NamespaceNSID cannot really be spelled in any other way.
"NamespaceNsid" would be quite bad. So let's just ignore the inconsistency in
naming, this seems to be the least bad option.

20 months agounits: add one more equivalency of '-' in '_' on kernel cmdline
Zbigniew Jędrzejewski-Szmek [Tue, 19 Mar 2024 08:11:45 +0000 (09:11 +0100)]
units: add one more equivalency of '-' in '_' on kernel cmdline

c0aeff4b999318d4da48328fff0ea93c8c457ace added this in one unit file, but the
same problem occurs here. (There are no other files where this would apply.)
I think we should solve this systematically somehow, but it's not clear how to
do that, so until we have that better solution, let's apply the manual solution
so that our units work as expected.

20 months agoDocument new vsock literals
Daan De Meyer [Tue, 19 Mar 2024 11:29:49 +0000 (12:29 +0100)]
Document new vsock literals

Fixes #31849

20 months agoAdd a set of assertion macros to tests.h
Unique-Usman [Fri, 15 Mar 2024 22:34:11 +0000 (04:04 +0530)]
Add a set of assertion macros to tests.h
(ASSERT_OK(), ASSERT_EQ(), ASSERT_GE(), ASSERT_LE()) that log the failed condition before crashing and convert test-gpt.c test file to use them

20 months agoAdd new unittest for shared:recovery-key
Abraham Samuel Adekunle [Mon, 18 Mar 2024 11:12:32 +0000 (12:12 +0100)]
Add new unittest for shared:recovery-key

20 months agoMerge pull request #31841 from AdrianVovk/homed-trivial
Yu Watanabe [Tue, 19 Mar 2024 08:22:34 +0000 (17:22 +0900)]
Merge pull request #31841 from AdrianVovk/homed-trivial

Small homed changes + revert

20 months agoMerge pull request #31772 from yuwata/network-persistent-storage-use-fd
Yu Watanabe [Tue, 19 Mar 2024 07:37:15 +0000 (16:37 +0900)]
Merge pull request #31772 from yuwata/network-persistent-storage-use-fd

network: pass fd of persistent storage, then use ProtectSystem=strict again

20 months agounit/network: use ProtectSystem=strict again
Yu Watanabe [Wed, 13 Mar 2024 17:28:06 +0000 (02:28 +0900)]
unit/network: use ProtectSystem=strict again

Now, networkd accesses the state directory through the file descriptor
passed from systemd-networkd-persistent-storage.service.
Hence, the networkd itself does not need to access the state directory
through its path, and we can use more stronger mode for ProtectSystem=.

20 months agonetwork/varlink: pass file descriptor of state directory with SetPersistentStorage...
Yu Watanabe [Fri, 15 Mar 2024 15:55:10 +0000 (00:55 +0900)]
network/varlink: pass file descriptor of state directory with SetPersistentStorage method

The state directory is owned by systemd-networkd-persistent-storage.service,
at least technically. Let's not directly access the storage through the path,
but through the fd.

Addresses https://github.com/systemd/systemd/pull/31746#issuecomment-1993556966.

Suggested-by: Mike Yuan <me@yhndnzj.com>
20 months agohomed: Minor man page improvements
Adrian Vovk [Sat, 16 Mar 2024 21:54:52 +0000 (17:54 -0400)]
homed: Minor man page improvements

20 months agohomed: Minor function name cleanup
Adrian Vovk [Thu, 14 Mar 2024 21:11:36 +0000 (17:11 -0400)]
homed: Minor function name cleanup

It's not actually a dbus method, just function that all the various dbus
methods end up calling to update the user record. So rename it to
reflect as such

20 months agoRevert "homed: Add InhibitSuspend() method"
Adrian Vovk [Sat, 16 Mar 2024 21:44:25 +0000 (17:44 -0400)]
Revert "homed: Add InhibitSuspend() method"

I'm moving this functionality into logind instead.

This reverts commit 691b99160de4bc856e676dba6e07b33d2fa0908e.

20 months agoMerge pull request #31838 from DaanDeMeyer/opensuse
Daan De Meyer [Mon, 18 Mar 2024 16:20:15 +0000 (17:20 +0100)]
Merge pull request #31838 from DaanDeMeyer/opensuse

mkosi: OpenSUSE fixes

20 months agoFix Positivo N14NPE-N and N15NPE-N key toggle touchpad and search key
Edson Juliano Drosdeck [Mon, 18 Mar 2024 13:25:34 +0000 (10:25 -0300)]
Fix Positivo N14NPE-N and N15NPE-N key toggle touchpad and search key

20 months agomkosi: Install systemd-experimental in OpenSUSE initrd
Daan De Meyer [Mon, 18 Mar 2024 15:20:15 +0000 (16:20 +0100)]
mkosi: Install systemd-experimental in OpenSUSE initrd

systemd-repart is part of systemd-experimental and we need systemd-repart
in the initrd so let's install systemd-experimental in the initrd.

20 months agomkosi: Install python3-pefile in OpenSUSE image
Daan De Meyer [Mon, 18 Mar 2024 15:20:00 +0000 (16:20 +0100)]
mkosi: Install python3-pefile in OpenSUSE image

ukify is part of systemd-experimental on OpenSUSE and not its own
package. Because the OpenSUSE systemd maintainers do not want to
introduce a python dependency for systemd-experimental, we have to
install python3-pefile manually to make sure ukify works properly.

20 months agoMerge pull request #31747 from yuwata/ptyfwd
Luca Boccassi [Mon, 18 Mar 2024 14:10:45 +0000 (14:10 +0000)]
Merge pull request #31747 from yuwata/ptyfwd

ptyfwd: do not erase line after NL

20 months agotest: fix typo
Yu Watanabe [Mon, 18 Mar 2024 13:48:19 +0000 (22:48 +0900)]
test: fix typo

Follow-up for fcf38e2cb33a9bc0c17352f64d47c270075b3cbb.

20 months agodnssd: support service subtypes
Ronan Pigott [Sat, 16 Dec 2023 05:55:54 +0000 (22:55 -0700)]
dnssd: support service subtypes

A service subtype is used for selective enumeration of services.

20 months agoMerge pull request #31778 from yuwata/kbd-util
Luca Boccassi [Mon, 18 Mar 2024 12:20:36 +0000 (12:20 +0000)]
Merge pull request #31778 from yuwata/kbd-util

kbd-util: allow to override the default keymap directories

20 months agoshared/install: correctly install alias for units outside search path
Nick Rosbrook [Fri, 15 Mar 2024 19:14:05 +0000 (15:14 -0400)]
shared/install: correctly install alias for units outside search path

Currently, if a unit file is enabled from outside of the search path,
and that unit has an alias, then the symlink ends up pointing outside of
the search path too. For example:

 $ cat /tmp/a.service
 [Service]
 ExecStart=sleep infinity

 [Install]
 Alias=b.service
 WantedBy=multi-user.target

 $ systemctl enable /tmp/a.service
 Created symlink /etc/systemd/system/a.service → /tmp/a.service.
 Created symlink /etc/systemd/system/b.service → /tmp/a.service.
 Created symlink /etc/systemd/system/multi-user.target.wants/a.service → /tmp/a.service.

This then means the alias is treated as a separate unit:

 $ systemctl start a.service
 $ sudo systemctl status a
 ● a.service
  Loaded: loaded (/etc/systemd/system/a.service; enabled; preset: enabled)
  Active: active (running) since Fri 2024-03-15 15:17:49 EDT; 9s ago
 Main PID: 769593 (sleep)
   Tasks: 1 (limit: 18898)
  Memory: 220.0K
     CPU: 5ms
  CGroup: /system.slice/a.service
          └─769593 sleep infinity

 Mar 15 15:17:49 six systemd[1]: Started a.service.
 $ sudo systemctl status b
 ○ b.service
  Loaded: loaded (/etc/systemd/system/b.service; alias)
  Active: inactive (dead)

To fix this, make sure the alias uses a target that is inside the search
path. Since the unit file itself is outside of the search path, a
symlink inside the search path will have been created already. Hence,
just point the alias symlink to that recently created symlink.

20 months agoresolved: wait to gc transactions if they might still give an answer
Ronan Pigott [Fri, 15 Mar 2024 20:52:30 +0000 (13:52 -0700)]
resolved: wait to gc transactions if they might still give an answer

In some cases when a query completes there are still pending
transactions that are no longer useful to answer the query. But if this
query is repeated in the future and we don't have the answers cached,
we're going to ask and ignore the answer again.

Instead of purging these superfluous transactions, let's wait and see if
they produce an answer, since we already asked the question, and use it
to fill our cache.

20 months agoMerge pull request #31811 from yuwata/network-pin-persistent-storage
Luca Boccassi [Mon, 18 Mar 2024 11:08:21 +0000 (11:08 +0000)]
Merge pull request #31811 from yuwata/network-pin-persistent-storage

network: pin file descriptor of persistent storage

20 months agoAdd unittest file for basic:label
Abraham Samuel Adekunle [Wed, 13 Mar 2024 15:47:28 +0000 (16:47 +0100)]
Add unittest file for basic:label

20 months agoMerge pull request #31829 from keszybz/more-header-checks
Luca Boccassi [Sun, 17 Mar 2024 17:58:59 +0000 (17:58 +0000)]
Merge pull request #31829 from keszybz/more-header-checks

Update c/c++ version checks and add test for -std=c++26

20 months agoMerge pull request #31831 from DaanDeMeyer/opensuse
Daan De Meyer [Sun, 17 Mar 2024 16:03:09 +0000 (17:03 +0100)]
Merge pull request #31831 from DaanDeMeyer/opensuse

Update opensuse packaging specs submodule to latest

20 months agoUpdate arch/debian packaging source URLs
Daan De Meyer [Sun, 17 Mar 2024 15:47:19 +0000 (16:47 +0100)]
Update arch/debian packaging source URLs

Let's use the actual URL to avoid warnings from git about getting
redirected.

20 months agoSwitch opensuse packaging specs source url to src.opensuse.org
Daan De Meyer [Sun, 17 Mar 2024 14:48:25 +0000 (15:48 +0100)]
Switch opensuse packaging specs source url to src.opensuse.org

opensuse's OBS has two git mirrors, code.opensuse.org uses pagure,
src.opensuse.org uses gitea. Let's try src.opensuse.org as pagure
doesn't seem to work properly when more advanced git functionality
is used.

20 months agoMerge pull request #31821 from behrmann/news256
Luca Boccassi [Sun, 17 Mar 2024 13:14:16 +0000 (13:14 +0000)]
Merge pull request #31821 from behrmann/news256

NEWS: more reformulations and fixlets

20 months agotpm2-setup: Add --graceful
Daan De Meyer [Sun, 17 Mar 2024 11:34:50 +0000 (12:34 +0100)]
tpm2-setup: Add --graceful

Currently the associated units fail if full tpm support is not available
on the system. Similar to systemd-pcrextend, let's add a --graceful option
that exits gracefully if no full TPM support is detected and use it in both
units.

20 months agounits: Accept modules_load and rd.modules_load in systemd-modules-load.service
Daan De Meyer [Sat, 16 Mar 2024 16:10:14 +0000 (17:10 +0100)]
units: Accept modules_load and rd.modules_load in systemd-modules-load.service

The service will use either, so let's make sure either of them starts
the service as well.

20 months agomeson: test with c++26 too
Zbigniew Jędrzejewski-Szmek [Sun, 17 Mar 2024 11:20:54 +0000 (12:20 +0100)]
meson: test with c++26 too

The docs say that support is experimental, but it's better for us if we know
about any problems early.

Header tests pass without any issue with gcc-14.0.1-0.8.fc40.x86_64.

20 months agomeson: gcc docs say that name "c2x" is deprecated
Zbigniew Jędrzejewski-Szmek [Sun, 17 Mar 2024 11:19:52 +0000 (12:19 +0100)]
meson: gcc docs say that name "c2x" is deprecated

20 months agomeson: use loops to unify repeated checks
Zbigniew Jędrzejewski-Szmek [Sun, 17 Mar 2024 11:09:21 +0000 (12:09 +0100)]
meson: use loops to unify repeated checks

20 months agoNEWS: style fixes and a few reformulations
Jörg Behrmann [Sat, 16 Mar 2024 11:53:29 +0000 (12:53 +0100)]
NEWS: style fixes and a few reformulations

- mention the version format spec for sytsemd-vpick
- say what "systemd-creds --user" can be used by unprivileged users as well
- say what importctl does
- use en dash instead of em dash
- add a missing article

20 months agoUpdate _udevadm
samuelvw01 [Sat, 16 Mar 2024 12:43:23 +0000 (13:43 +0100)]
Update _udevadm

20 months agoman: add missing "and" to importctl description
Jörg Behrmann [Sat, 16 Mar 2024 11:52:48 +0000 (12:52 +0100)]
man: add missing "and" to importctl description

20 months agounits: use relative path
Yu Watanabe [Fri, 8 Mar 2024 17:08:50 +0000 (02:08 +0900)]
units: use relative path

20 months agomkosi: Do disk space cleanup asynchronously
Daan De Meyer [Fri, 15 Mar 2024 19:25:01 +0000 (20:25 +0100)]
mkosi: Do disk space cleanup asynchronously

This can actually take a rather long time (multiple minutes) so
make sure we do it asynchronously.

20 months agodocs: update footer to 2024
Tycho Andersen [Fri, 15 Mar 2024 15:13:50 +0000 (09:13 -0600)]
docs: update footer to 2024

20 months agoMerge pull request #31808 from keszybz/sundry-cleanups
Yu Watanabe [Fri, 15 Mar 2024 16:40:56 +0000 (01:40 +0900)]
Merge pull request #31808 from keszybz/sundry-cleanups

Sundry cleanups

20 months agomeson: Rename add-git-hook.sh to git-setup.sh and configure git in it
Daan De Meyer [Thu, 14 Mar 2024 09:29:55 +0000 (10:29 +0100)]
meson: Rename add-git-hook.sh to git-setup.sh and configure git in it

Let's automatically apply the recommended git config with meson.

20 months agodocs: Update HACKING guide with recommended git config
Daan De Meyer [Thu, 14 Mar 2024 09:18:27 +0000 (10:18 +0100)]
docs: Update HACKING guide with recommended git config

20 months agonetwork/dhcp-server: use the pinned fd of persistent storge
Yu Watanabe [Fri, 15 Mar 2024 15:49:25 +0000 (00:49 +0900)]
network/dhcp-server: use the pinned fd of persistent storge

20 months agonetwork/varlink: return earlier from SetPersistentStorage method if nothing changed
Yu Watanabe [Fri, 15 Mar 2024 15:46:11 +0000 (00:46 +0900)]
network/varlink: return earlier from SetPersistentStorage method if nothing changed

20 months agonetwork: pin file descriptor of persistent storage
Yu Watanabe [Fri, 15 Mar 2024 15:38:06 +0000 (00:38 +0900)]
network: pin file descriptor of persistent storage

This also drop the support of /run/systemd/netif/persistent-storage-ready,
as the file is anyway removed when networkd is stopped.
Let's use $SYSTEMD_NETWORK_PERSISTENT_STORAGE_READY=1 instead on testing.

20 months agoNEWS: mention portablectl --copy=mixed
Luca Boccassi [Fri, 15 Mar 2024 15:16:12 +0000 (15:16 +0000)]
NEWS: mention portablectl --copy=mixed

20 months agoshell completion: add --copy=mixed in portablectl
Luca Boccassi [Fri, 15 Mar 2024 15:07:31 +0000 (15:07 +0000)]
shell completion: add --copy=mixed in portablectl

Follow-up for 82047a6aa7230031d2a579e81d5f8871c23e0616

20 months agotest/TEST-46: drop whitespace after redirection operators
Zbigniew Jędrzejewski-Szmek [Fri, 15 Mar 2024 09:54:56 +0000 (10:54 +0100)]
test/TEST-46: drop whitespace after redirection operators

20 months agoportablectl: add forgotten value to --help
Zbigniew Jędrzejewski-Szmek [Fri, 15 Mar 2024 08:18:06 +0000 (09:18 +0100)]
portablectl: add forgotten value to --help

Followup for 82047a6aa7230031d2a579e81d5f8871c23e0616.

20 months agojournal: use empty_to_null() in one more place
Zbigniew Jędrzejewski-Szmek [Thu, 14 Mar 2024 11:37:31 +0000 (12:37 +0100)]
journal: use empty_to_null() in one more place

Follow-up for 45bcab66a9c23a74107118d310e09a46f28494fd.

20 months agoportable: when logging about attaching, include the used profile
Luca Boccassi [Thu, 14 Mar 2024 16:52:21 +0000 (16:52 +0000)]
portable: when logging about attaching, include the used profile

Useful information to have in the logs.

Mar 14 16:45:27 H systemd-portabled[510]: Successfully attached ephemeral '/usr/share/minimal_0.raw' and its extension(s) '/usr/share/app0.raw' using profile 'default'

20 months agoMerge pull request #31791 from yuwata/sd-dhcp-server-several-preparations
Luca Boccassi [Fri, 15 Mar 2024 15:04:04 +0000 (15:04 +0000)]
Merge pull request #31791 from yuwata/sd-dhcp-server-several-preparations

sd-dhcp-server: several cleanups and extension

20 months agoMerge pull request #31777 from keszybz/unit-retitling-and-comments
Zbigniew Jędrzejewski-Szmek [Fri, 15 Mar 2024 14:57:10 +0000 (15:57 +0100)]
Merge pull request #31777 from keszybz/unit-retitling-and-comments

Unit retitling and comments

20 months agonetwork/address: acquire address in address_process_request()
Yu Watanabe [Tue, 12 Mar 2024 08:35:51 +0000 (17:35 +0900)]
network/address: acquire address in address_process_request()

Previously, if an [Address] section is configured with a null address,
e.g. Address=0.0.0.0/24, then we acquired a free address in
link_request_address().

With this commit, we queue a request with the null address as is, and
acquire a free address later in address_process_request(). Similary,
now IPv4ACD daemon is configured in address_process_request().

With this change, we can make the address acquisition depend on other
conditions, e.g. if the persistent storage is ready or not.

20 months agoNEWS: fix typo and reword a couple of entries
Luca Boccassi [Fri, 15 Mar 2024 14:46:45 +0000 (14:46 +0000)]
NEWS: fix typo and reword a couple of entries

20 months agoNEWS: fix typos
Jörg Behrmann [Fri, 15 Mar 2024 14:35:53 +0000 (15:35 +0100)]
NEWS: fix typos

20 months agoNEWS: fix typo
Mike Yuan [Fri, 15 Mar 2024 14:35:05 +0000 (22:35 +0800)]
NEWS: fix typo

20 months agoTODO: various things noticed while writing NEWS
Zbigniew Jędrzejewski-Szmek [Fri, 15 Mar 2024 14:22:21 +0000 (15:22 +0100)]
TODO: various things noticed while writing NEWS

20 months agoNEWS: add initial version of changes in v256
Zbigniew Jędrzejewski-Szmek [Fri, 15 Mar 2024 14:21:59 +0000 (15:21 +0100)]
NEWS: add initial version of changes in v256

20 months agodocumentation: fix inconsistency
Max Gautier [Fri, 15 Mar 2024 13:24:23 +0000 (14:24 +0100)]
documentation: fix inconsistency

Since this sentence is in the same section it refers to, it does not
make much sense to mention the "section below".

20 months agocifuzz,cflite: set mmap_rnd_bits to 28
Evgeny Vereshchagin [Fri, 15 Mar 2024 10:03:20 +0000 (10:03 +0000)]
cifuzz,cflite: set mmap_rnd_bits to 28

to get MSan jobs to work with the latest Ubuntu images.

https://github.com/google/sanitizers/issues/1614
https://github.com/actions/runner-images/issues/9491

20 months agoAdded a test file for the dirent-util.c
Unique-Usman [Sun, 10 Mar 2024 11:58:58 +0000 (17:28 +0530)]
Added a test file for the dirent-util.c

20 months agosd-dhcp-server: also save the server address and netmask to the leases file
Yu Watanabe [Thu, 14 Mar 2024 10:35:46 +0000 (19:35 +0900)]
sd-dhcp-server: also save the server address and netmask to the leases file

And introduce a tiny helper to retrieve these information.
The function is not used at this time, but will be used later.

20 months agosd-dhcp-server: rearrange the parser of the leases file
Yu Watanabe [Tue, 12 Mar 2024 05:07:54 +0000 (14:07 +0900)]
sd-dhcp-server: rearrange the parser of the leases file

No functional changes, just refactoring and preparation for later
commits.

20 months agosd-dhcp-server: make sd_dhcp_server_set_lease_file() optionally take directory fd
Yu Watanabe [Wed, 13 Mar 2024 17:05:30 +0000 (02:05 +0900)]
sd-dhcp-server: make sd_dhcp_server_set_lease_file() optionally take directory fd

Currently, though, no valid directory fd is passed to the function call.
Preparation for later commits.

20 months agodocs: fix typo
Yu Watanabe [Thu, 14 Mar 2024 19:03:57 +0000 (04:03 +0900)]
docs: fix typo

Follow-up for 34c6b7d9de64e357071005ec49e88d2354cc4e8a.

20 months agoptyfwd: drop redundant brackets
Yu Watanabe [Wed, 13 Mar 2024 05:46:49 +0000 (14:46 +0900)]
ptyfwd: drop redundant brackets

20 months agoptyfwd: do not erase line after NL
Yu Watanabe [Wed, 13 Mar 2024 04:23:15 +0000 (13:23 +0900)]
ptyfwd: do not erase line after NL

Otherwise, moving upwards in 'less' does not work.

Follow-up for d0aa368c85adf2efa29c363a6671927fe7e8e76f.

20 months agokbd-util: allow to override the default keymap directories
Yu Watanabe [Thu, 14 Mar 2024 09:40:14 +0000 (18:40 +0900)]
kbd-util: allow to override the default keymap directories

This introduces $SYSTEMD_KEYMAP_DIRECTORIES environment variable to
override the hardcoded keymap directories.

I think it is not necessary to provide the first class configuration
option for controlling the keymap directories, but it is not good to
hardcode the paths. So, let's introduce an environment variable to
override that.

Prompted by #31759.

Closes #31759.

20 months agolocale: use O_PATH directory fd and faccessat() in find_converted_keymap()
Yu Watanabe [Thu, 14 Mar 2024 18:12:07 +0000 (03:12 +0900)]
locale: use O_PATH directory fd and faccessat() in find_converted_keymap()

Previously, it is assumed that the paths in KBD_KEYMAP_DIRS are ended
with a slash. But, in the next commit, paths will become controllable by
users, and each path may not be ended with a slash.

This should not change any effective behaviors.
Just refactoring and preparation.

20 months agoupdate TODO
Lennart Poettering [Thu, 14 Mar 2024 18:09:22 +0000 (19:09 +0100)]
update TODO

20 months agoMerge pull request #31739 from poettering/pid1-sd-notify-tweaks
Lennart Poettering [Thu, 14 Mar 2024 17:43:57 +0000 (18:43 +0100)]
Merge pull request #31739 from poettering/pid1-sd-notify-tweaks

pid1: send various notifications via sd_notify() reporting boot progress

20 months agonetwork: introduce link_requeue_request()
Yu Watanabe [Tue, 12 Mar 2024 08:28:43 +0000 (17:28 +0900)]
network: introduce link_requeue_request()

20 months agonetwork: use link_start_dhcp4_server() at one more place
Yu Watanabe [Wed, 13 Mar 2024 17:01:15 +0000 (02:01 +0900)]
network: use link_start_dhcp4_server() at one more place

Otherwise, even if the persistent storage is not ready, the DHCP server
may be started e.g. by unplugging and plugging cable.

Follow-up for 5582b36c384fc522c23ef1ac032001882d033aff.

20 months agoman: fix efi var vendor uuid for systemd-bless-boot.service
Adrian Wannenmacher [Thu, 14 Mar 2024 16:15:19 +0000 (17:15 +0100)]
man: fix efi var vendor uuid for systemd-bless-boot.service

The specified vendor UUID is not actually a UUID. This changes it to an actual UUID.

The new value matches the ones from the systemd-boot man page and [The Boot Loader Interface](https://systemd.io/BOOT_LOADER_INTERFACE/).

20 months agodocs: add a new document describing the VM interface of systemd
Lennart Poettering [Wed, 13 Mar 2024 09:33:26 +0000 (10:33 +0100)]
docs: add a new document describing the VM interface of systemd

This mirrors the existing CONTAINER_INTERFACE.md document, but describes
extension points of systemd running in a VM with a machine manager
supervising it.