]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 years agotest: add missing section for Description= 21731/head
Yu Watanabe [Sat, 11 Dec 2021 02:55:03 +0000 (11:55 +0900)] 
test: add missing section for Description=

3 years agotest: fix grepping fixed string starts from hyphen
Yu Watanabe [Sat, 11 Dec 2021 02:54:01 +0000 (11:54 +0900)] 
test: fix grepping fixed string starts from hyphen

Follow-up for 85445fba22b2f81853a3f018ed1f28864cef37fc.

Fixes #21718.

3 years agonetwork-generator: support link6 network configuration
Jonas Jelten [Fri, 10 Dec 2021 23:12:08 +0000 (00:12 +0100)] 
network-generator: support link6 network configuration

this just brings up an interface in order to have IPv6 link local
connectivity.

3 years agoExport systemd-networkd D-Bus XML introspection
igo95862 [Fri, 10 Dec 2021 16:22:23 +0000 (19:22 +0300)] 
Export systemd-networkd D-Bus XML introspection

3 years agoMerge pull request #21722 from yuwata/bpf-framework
Zbigniew Jędrzejewski-Szmek [Fri, 10 Dec 2021 16:18:24 +0000 (17:18 +0100)] 
Merge pull request #21722 from yuwata/bpf-framework

build: include BPF_FRAMEWORK in version string

3 years agoMerge pull request #21708 from mrc0mmand/mkosi-ci-improvements
Frantisek Sumsal [Fri, 10 Dec 2021 13:50:55 +0000 (13:50 +0000)] 
Merge pull request #21708 from mrc0mmand/mkosi-ci-improvements

ci: check for failed services after boot

3 years agotest: addresses shell check warning 21722/head
Yu Watanabe [Fri, 10 Dec 2021 11:07:35 +0000 (20:07 +0900)] 
test: addresses shell check warning

This fixes the following warning:
-----
In /github/workspace/test/units/testsuite-62.sh line 39:
KERNEL_MINOR="${KERNEL_VERSION#$KERNEL_MAJOR.}"
                               ^-----------^ SC2295 (info): Expansions inside ${..} need to be quoted separately, otherwise they match as patterns.

Did you mean:
KERNEL_MINOR="${KERNEL_VERSION#"$KERNEL_MAJOR".}"

3 years agotest: skip TEST-62 if bpf-framework is not supported
Yu Watanabe [Fri, 10 Dec 2021 10:51:23 +0000 (19:51 +0900)] 
test: skip TEST-62 if bpf-framework is not supported

Fixes #21718.

3 years agobuild: include BPF_FRAMEWORK tag in version string
Yu Watanabe [Fri, 10 Dec 2021 10:50:51 +0000 (19:50 +0900)] 
build: include BPF_FRAMEWORK tag in version string

3 years agomeson: use subdir_done() to reduce indent
Yu Watanabe [Fri, 10 Dec 2021 10:50:16 +0000 (19:50 +0900)] 
meson: use subdir_done() to reduce indent

3 years agonetwork: rename SetupState to AdministrativeState
LaserEyess [Fri, 10 Dec 2021 00:28:31 +0000 (19:28 -0500)] 
network: rename SetupState to AdministrativeState

This is more consistent with the terminology used elsewhere. In
particular it is consistent with the name of the property exposed over
dbus for the link state.

3 years agoci: run mkosi in a wrapper 21708/head
Frantisek Sumsal [Thu, 9 Dec 2021 17:03:50 +0000 (18:03 +0100)] 
ci: run mkosi in a wrapper

So we can mitigate (to some degree) the reoccurring "dissect timeout"
issue:

```
Run sudo python3 -m mkosi boot systemd.unit=mkosi-check-and-shutdown.service !quiet systemd.log_level=debug systemd.log_target=console udev.log_level=info systemd.default_standard_output=journal+console
Failed to dissect image '/home/runner/work/systemd/systemd/image.raw': Connection timed out
Error: Process completed with exit code 1.
```

3 years agoci: check for failed services after boot
Frantisek Sumsal [Wed, 8 Dec 2021 18:31:25 +0000 (19:31 +0100)] 
ci: check for failed services after boot

This should, hopefully, catch issues like systemd/systemd#21671
automagically.

3 years agoExport D-Bus interfaces to /usr/share/dbus-1/interfaces
igo95862 [Sat, 24 Jul 2021 07:30:42 +0000 (10:30 +0300)] 
Export D-Bus interfaces to /usr/share/dbus-1/interfaces

Pass -Ddbus-interfaces-dir=no to meson to disable export

Interfaces from:
org.freedesktop.home1
org.freedesktop.hostname1
org.freedesktop.import1
org.freedesktop.locale1
org.freedesktop.LogControl1
org.freedesktop.login1
org.freedesktop.machine1
org.freedesktop.oom1
org.freedesktop.portable1
org.freedesktop.resolve1
org.freedesktop.systemd1
org.freedesktop.timedate1

3 years agomeson: exclude .gitattributes when using install_subdir
Luca Boccassi [Thu, 9 Dec 2021 22:16:19 +0000 (22:16 +0000)] 
meson: exclude .gitattributes when using install_subdir

It picks the whole content of the directory by default, but we don't
want to install .gitattributes files. Add it to all invocations, not
just the ones on subdirs with .gitattributes, so that we don't regress
in the future.

Fixes #21715

3 years agoman: fix typo
Yu Watanabe [Thu, 9 Dec 2021 18:52:45 +0000 (03:52 +0900)] 
man: fix typo

3 years agojournalctl: have -f and -e imply no-value -b
наб [Thu, 9 Dec 2021 19:03:55 +0000 (20:03 +0100)] 
journalctl: have -f and -e imply no-value -b

Both of these take multiple seconds, best-case, to get the last few
entries, but do so instantly with -b

3 years agoshared: avoid x86_64-specific size assertion on x32
Mike Gilbert [Thu, 9 Dec 2021 20:26:33 +0000 (15:26 -0500)] 
shared: avoid x86_64-specific size assertion on x32

Fixes: https://github.com/systemd/systemd/issues/21713
3 years agoman: let's not say we link to raw .rst file v250-rc2
Zbigniew Jędrzejewski-Szmek [Thu, 9 Dec 2021 18:21:55 +0000 (19:21 +0100)] 
man: let's not say we link to raw .rst file

3 years agoprocess-util: Fix memory leak
Daan De Meyer [Thu, 9 Dec 2021 14:46:13 +0000 (15:46 +0100)] 
process-util: Fix memory leak

3 years agoNEWS: final update before -rc1 v250-rc1
Zbigniew Jędrzejewski-Szmek [Thu, 9 Dec 2021 14:15:58 +0000 (15:15 +0100)] 
NEWS: final update before -rc1

3 years agoMerge pull request #21704 from keszybz/news-250-2
Zbigniew Jędrzejewski-Szmek [Thu, 9 Dec 2021 14:10:24 +0000 (15:10 +0100)] 
Merge pull request #21704 from keszybz/news-250-2

Adjust news and version numbers for v250-rc1

3 years agosystemctl: add shutdown --show option
Ludwig Nussel [Wed, 8 Dec 2021 11:48:35 +0000 (12:48 +0100)] 
systemctl: add shutdown --show option

Shows the scheduled shutdown action and time if there's one.

3 years agonetwork: dhcp: make IPServiceType= accept "none" to disable tos in the outgoing packet
Yu Watanabe [Thu, 9 Dec 2021 11:25:12 +0000 (20:25 +0900)] 
network: dhcp: make IPServiceType= accept "none" to disable tos in the outgoing packet

Fixes #9874.

3 years agoMerge pull request #21700 from keszybz/v250-hwdb
Zbigniew Jędrzejewski-Szmek [Thu, 9 Dec 2021 14:05:19 +0000 (15:05 +0100)] 
Merge pull request #21700 from keszybz/v250-hwdb

Update hwdb

3 years agomkosi: Build Fedora 35 images
Daan De Meyer [Thu, 9 Dec 2021 11:35:23 +0000 (12:35 +0100)] 
mkosi: Build Fedora 35 images

3 years agonetwork: sd-ipv4ll and sd-ipv4acd only support ethernet interfaces
Yu Watanabe [Thu, 9 Dec 2021 07:38:02 +0000 (16:38 +0900)] 
network: sd-ipv4ll and sd-ipv4acd only support ethernet interfaces

The deny list in link_ipv4ll_enabled() are mostly non-ethernet type,
whose link->iftype are not ARPHRD_ETHER, e.g. ARPHRD_NONE for bareudp,
ARPHRD_WIREGURAD for wireguard, ARPHRD_GRE for gre, and so on.

Only the exception is vrf, which is ARPHRD_ETHER, but seems not to
support ARP.

3 years agoMerge pull request #21697 from keszybz/run-more-inodes
Zbigniew Jędrzejewski-Szmek [Thu, 9 Dec 2021 14:04:16 +0000 (15:04 +0100)] 
Merge pull request #21697 from keszybz/run-more-inodes

Allow more inodes in /dev and /tmp

3 years agomeson: bump numbers for v250-rc1 21704/head
Zbigniew Jędrzejewski-Szmek [Thu, 9 Dec 2021 12:33:39 +0000 (13:33 +0100)] 
meson: bump numbers for v250-rc1

3 years agoNEWS: add contributors
Zbigniew Jędrzejewski-Szmek [Thu, 9 Dec 2021 12:31:11 +0000 (13:31 +0100)] 
NEWS: add contributors

3 years agoMerge pull request #21696 from keszybz/openssl-suppress-warnings
Zbigniew Jędrzejewski-Szmek [Thu, 9 Dec 2021 12:25:14 +0000 (13:25 +0100)] 
Merge pull request #21696 from keszybz/openssl-suppress-warnings

Suppress openssl-3.0 warnings

3 years agoNEWS: fix crucial cultural misappropriation
Zbigniew Jędrzejewski-Szmek [Thu, 9 Dec 2021 11:53:15 +0000 (12:53 +0100)] 
NEWS: fix crucial cultural misappropriation

3 years agomeson: add missing final newline in jinja2 outputs
Zbigniew Jędrzejewski-Szmek [Wed, 8 Dec 2021 17:00:35 +0000 (18:00 +0100)] 
meson: add missing final newline in jinja2 outputs

I think this might be caused by trim_blocks=True. We were
missing the final newline everywhere.

3 years agoman: bump Fedora version to 35
Zbigniew Jędrzejewski-Szmek [Thu, 9 Dec 2021 11:43:34 +0000 (12:43 +0100)] 
man: bump Fedora version to 35

Fedora-Cloud-Base-35-1.2.x86_64.qcow2 is again the latest version.

3 years agoNEWS: adjust wording and reorder by category
Zbigniew Jędrzejewski-Szmek [Thu, 9 Dec 2021 11:30:52 +0000 (12:30 +0100)] 
NEWS: adjust wording and reorder by category

Also wrap stuff to 80 columns, fix some spelling mistakes, and remove some
repetitions in phrasing.

3 years agoMerge pull request #21692 from yuwata/network-wireguard-allow-to-start-ndisc-or-radv
Yu Watanabe [Thu, 9 Dec 2021 10:53:58 +0000 (19:53 +0900)] 
Merge pull request #21692 from yuwata/network-wireguard-allow-to-start-ndisc-or-radv

network: wireguard: allow to start ndisc or radv

3 years agoNEWS: add more entries for v250
Yu Watanabe [Thu, 9 Dec 2021 10:40:28 +0000 (19:40 +0900)] 
NEWS: add more entries for v250

3 years agoNEWS file additions
Daan De Meyer [Thu, 9 Dec 2021 10:28:13 +0000 (11:28 +0100)] 
NEWS file additions

3 years agoBump the max number of inodes for /tmp to a million too 21697/head
Zbigniew Jędrzejewski-Szmek [Thu, 9 Dec 2021 09:20:46 +0000 (10:20 +0100)] 
Bump the max number of inodes for /tmp to a million too

Fixes #21626. (The bug report talks about /run, but the issue is actually with
/tmp.) People use /tmp for various things that fit in memory, e.g. unpacking
packages, and 400k is not much. Let's raise is a bit.

3 years agohwdb: update for v250 21700/head
Zbigniew Jędrzejewski-Szmek [Thu, 9 Dec 2021 10:05:15 +0000 (11:05 +0100)] 
hwdb: update for v250

As usual, there are mostly additions of new entries, and some spelling
correction and company renames, no big removals.

3 years agohwdb: ninja -C build update-hwdb-autosuspend
Zbigniew Jędrzejewski-Szmek [Thu, 9 Dec 2021 10:00:56 +0000 (11:00 +0100)] 
hwdb: ninja -C build update-hwdb-autosuspend

3 years agoRevert "ci: temporarily set -Wno-deprecated-declarations in Packit" 21696/head
Zbigniew Jędrzejewski-Szmek [Thu, 9 Dec 2021 09:01:58 +0000 (10:01 +0100)] 
Revert "ci: temporarily set -Wno-deprecated-declarations in Packit"

This reverts commit 684e0a560514f9aaf02813f3f6c4a017400c9d51.

The warnigs are not suppressed in the C code.

3 years agoopenssl: supress warnings about functions deprecated by openssl 3.0
Zbigniew Jędrzejewski-Szmek [Thu, 9 Dec 2021 08:54:02 +0000 (09:54 +0100)] 
openssl: supress warnings about functions deprecated by openssl 3.0

We get warnings for RSA_free(), EC_KEY_free(), EC_KEY_new(), etc. Those
functions are now deprecated and we're supposed to use the new "EVP API" that
is all the rage in openssl 3.0.

With some effort I converted dnssec_rsa_verify_raw() to use the new API.  The
code is significantly longer and, if anything, less readable. The EC code is
more complicated and I assume that the EVP API version will be even more
complex. It is possiblet that I'm missing some way to call the new functions in
a better way, but the documentation is abysmal, so it's really hard to figure
out the best way. Of course there are almost no examples, and the ones that are
there are not terribly useful and are also stubs that don't do interesting
things, don't implement error handling, or memory cleanup. I'll submit my
conversion draft as a separate PR. Maybe somebody who knows openssl better
will pick it up and write a proper solution.

For now, let's just use the existing code, but suppress the warnings. The
new version just came out, so it's unlikely that the deprecated functions will
be removed any time soon.

Fixes #21666.

3 years agoBump the max number of inodes for /dev to a million
Zbigniew Jędrzejewski-Szmek [Thu, 9 Dec 2021 09:09:17 +0000 (10:09 +0100)] 
Bump the max number of inodes for /dev to a million

4c733d3046942984c5f73b40c3af39cc218c103f shows that 95k can be used easily on a large
system. Let's bump it up even more so that we have some "breathing room".

3 years agoMerge pull request #21691 from yuwata/network-route-prefix-length
Zbigniew Jędrzejewski-Szmek [Thu, 9 Dec 2021 08:24:36 +0000 (09:24 +0100)] 
Merge pull request #21691 from yuwata/network-route-prefix-length

network: route: several tiny cleanups

3 years agolibsystemd-network: ignore -ENETDOWN or friends in recv()
Yu Watanabe [Wed, 8 Dec 2021 19:30:54 +0000 (04:30 +0900)] 
libsystemd-network: ignore -ENETDOWN or friends in recv()

And this makes most errors in io events ignored.

3 years agonetwork: refuse empty or numeric route table names
Yu Watanabe [Wed, 8 Dec 2021 20:50:01 +0000 (05:50 +0900)] 
network: refuse empty or numeric route table names

3 years agodoc: fix typo
Yu Watanabe [Thu, 9 Dec 2021 07:02:23 +0000 (16:02 +0900)] 
doc: fix typo

3 years agonetwork: wireguard: allow to run NDisc and RADV when IPv6LL address is manually confi... 21692/head
Yu Watanabe [Thu, 9 Dec 2021 06:43:57 +0000 (15:43 +0900)] 
network: wireguard: allow to run NDisc and RADV when IPv6LL address is manually configured

Fixes #17380.

3 years agonetwork: address: add scope in debugging logs
Yu Watanabe [Thu, 9 Dec 2021 06:28:06 +0000 (15:28 +0900)] 
network: address: add scope in debugging logs

3 years agonetwork: address: also adjust scope when address is link local address
Yu Watanabe [Thu, 9 Dec 2021 06:23:32 +0000 (15:23 +0900)] 
network: address: also adjust scope when address is link local address

But again only when Scope= is not explicitly specified.

3 years agonetwork: address: do not adjust user specified scope
Yu Watanabe [Thu, 9 Dec 2021 06:18:34 +0000 (15:18 +0900)] 
network: address: do not adjust user specified scope

This reverts cd1caf30c0bd0d0c6e8df7610c614f52a7345c40.

I cannot remember why such change was made.
At least, the kernel does not refuse to set IPv4 localhost address with
non-host scope, e.g. global.

3 years agonetwork: route: mask lower bits of destination or source prefix 21691/head
Yu Watanabe [Wed, 8 Dec 2021 22:01:47 +0000 (07:01 +0900)] 
network: route: mask lower bits of destination or source prefix

Let's gracefully handle user's misconfiguration, e.g.
Destination=192.168.0.1/24

3 years agonetwork: json: add src address when its prefix length is non-zero
Yu Watanabe [Wed, 8 Dec 2021 21:56:26 +0000 (06:56 +0900)] 
network: json: add src address when its prefix length is non-zero

This should not change anything. Just for consistency with
route_set_netlink_message(), which sets RTA_SRC attribute when prefix
length is non-zero.

3 years agonetwork: route: show prefix length of the source in debugging logs
Yu Watanabe [Wed, 8 Dec 2021 21:51:29 +0000 (06:51 +0900)] 
network: route: show prefix length of the source in debugging logs

Similar fix to b489d6a26e44d430a997e756ac81767f6e646976.

3 years agobootctl: optionally install .signed efi file
Дамјан Георгиевски [Mon, 29 Nov 2021 21:44:01 +0000 (22:44 +0100)] 
bootctl: optionally install .signed efi file

if /usr/lib/systemd/boot/efi/systemd-bootx64.efi.signed exists
install that instead of /usr/lib/systemd/boot/efi/systemd-bootx64.efi

the idea is that SecureBoot tooling can create the efi.signed file
whenever /usr/lib/systemd/boot/efi/systemd-bootx64.efi from the package
is updated.

3 years agoMerge pull request #21686 from yuwata/network-wlan-fix-reconfigure
Yu Watanabe [Wed, 8 Dec 2021 20:57:12 +0000 (05:57 +0900)] 
Merge pull request #21686 from yuwata/network-wlan-fix-reconfigure

network: do not reconfigure wireless interface when previously not connected to any APs

3 years agoMerge pull request #21637 from nabijaczleweli/EBA
Daan De Meyer [Wed, 8 Dec 2021 20:15:38 +0000 (20:15 +0000)] 
Merge pull request #21637 from nabijaczleweli/EBA

kernel-install: export BOOT_ROOT instead of hacking it in hooks, note KERNEL_INSTALL_* ABI

3 years agoMerge pull request #21678 from keszybz/sysusers-work
Yu Watanabe [Wed, 8 Dec 2021 19:35:50 +0000 (04:35 +0900)] 
Merge pull request #21678 from keszybz/sysusers-work

Make it easier to figure out what sysusers is doing and why

3 years agonetwork: do not reconfigure wireless interface when previously not connected to any APs 21686/head
Yu Watanabe [Wed, 8 Dec 2021 18:04:21 +0000 (03:04 +0900)] 
network: do not reconfigure wireless interface when previously not connected to any APs

Follow-up for 6706ce2fd2a13df0ae5e469b72d688eaf643dac4.

Fixes #21685.

3 years agonetwork: wifi: ssid may be NULL
Yu Watanabe [Wed, 8 Dec 2021 17:43:21 +0000 (02:43 +0900)] 
network: wifi: ssid may be NULL

This fixes the following log message:
systemd-networkd[888]: wlan0: nl80211: received new_interface(7) message: iftype=station, ssid=(null)

3 years agoMerge pull request #21667 from yuwata/resolve-do-not-re-read-settings-from-networkd...
Luca Boccassi [Wed, 8 Dec 2021 13:28:15 +0000 (13:28 +0000)] 
Merge pull request #21667 from yuwata/resolve-do-not-re-read-settings-from-networkd-when-unmodified

resolve: do not re-read settings from networkd when link state file is unmodified

3 years agodocs: Clarify that the fd store is discarded when a service is stopped
Daan De Meyer [Wed, 8 Dec 2021 11:56:36 +0000 (12:56 +0100)] 
docs: Clarify that the fd store is discarded when a service is stopped

3 years agoMerge pull request #21676 from keszybz/rename-variables-to-make-codeql-happy
Frantisek Sumsal [Wed, 8 Dec 2021 13:24:17 +0000 (13:24 +0000)] 
Merge pull request #21676 from keszybz/rename-variables-to-make-codeql-happy

Rename variables to make codeql happy

3 years agojournal: succes[s]fully typo
наб [Wed, 8 Dec 2021 12:49:17 +0000 (13:49 +0100)] 
journal: succes[s]fully typo

As found by fossies codespell:
https://fossies.org/linux/test/systemd-main.bb916f3.211208.tar.gz/codespell.html

3 years agokernel-install: note $KERNEL_INSTALL_{MACHINE_ID,BOOT_ROOT}= ABI 21637/head
наб [Tue, 16 Mar 2021 16:42:28 +0000 (17:42 +0100)] 
kernel-install: note $KERNEL_INSTALL_{MACHINE_ID,BOOT_ROOT}= ABI

3 years agokernel-install: export $BOOT_ROOT and use it in downstreams
наб [Tue, 16 Mar 2021 16:02:59 +0000 (17:02 +0100)] 
kernel-install: export $BOOT_ROOT and use it in downstreams

The previous approach, to strip "$MACHINE_ID/$KERNEL_VERSION" from the
end, is pretty bad and encourages this for users, which makes them
inflexible to this being modified locally

3 years agoci: ignore FIXME alerts in the CodeQL Action
Frantisek Sumsal [Wed, 8 Dec 2021 10:41:07 +0000 (11:41 +0100)] 
ci: ignore FIXME alerts in the CodeQL Action

We already track them in LGTM and it unnecessarily clutters the Security
page.

3 years agosysusers: raise level of message about UID/GID being already used 21678/head
Zbigniew Jędrzejewski-Szmek [Wed, 8 Dec 2021 10:46:09 +0000 (11:46 +0100)] 
sysusers: raise level of message about UID/GID being already used

It can be quite important that a different value was used, so let's
log this by default.

3 years agosysusers: improve message about conflicting entries
Zbigniew Jędrzejewski-Szmek [Wed, 8 Dec 2021 10:21:17 +0000 (11:21 +0100)] 
sysusers: improve message about conflicting entries

Without any markup, the sentence could be quite confusing:
g user 55
g user 56

"Two or more conflicting lines for user configured"
It also wasn't clear which line is ignored.

Inspired by https://github.com/systemd/systemd/pull/21156.

3 years agosysusers: add --dry-run
Zbigniew Jędrzejewski-Szmek [Wed, 8 Dec 2021 09:33:53 +0000 (10:33 +0100)] 
sysusers: add --dry-run

3 years agosysusers: use ordered_hashmap_isempty()
Zbigniew Jędrzejewski-Szmek [Wed, 8 Dec 2021 09:44:00 +0000 (10:44 +0100)] 
sysusers: use ordered_hashmap_isempty()

3 years agonetwork: call link_check_ready() when all stacked netdevs are created
Yu Watanabe [Tue, 7 Dec 2021 16:36:07 +0000 (01:36 +0900)] 
network: call link_check_ready() when all stacked netdevs are created

Follow-up for 879377cad531aabbf85a140201b0ea3ff9a8c3d2.

Otherwise, the underlying interface may stuck in configuring state.

3 years agoresolve: do not re-read settings from networkd if link state file is unmodified 21667/head
Yu Watanabe [Tue, 7 Dec 2021 18:48:46 +0000 (03:48 +0900)] 
resolve: do not re-read settings from networkd if link state file is unmodified

If many interface creation/deletion occurs continuously, then resolved
becomes easily busy. Let's slightly optimize the event triggered by
sd-network.

3 years agosd-network: introduce sd_network_link_get_stat()
Yu Watanabe [Tue, 7 Dec 2021 18:15:08 +0000 (03:15 +0900)] 
sd-network: introduce sd_network_link_get_stat()

3 years agosd-network: drop unnecessary +1 for buffer size
Yu Watanabe [Wed, 8 Dec 2021 09:33:35 +0000 (18:33 +0900)] 
sd-network: drop unnecessary +1 for buffer size

3 years agoMerge pull request #21527 from vcaputo/journal-file-mfd-centric
Daan De Meyer [Wed, 8 Dec 2021 09:26:53 +0000 (09:26 +0000)] 
Merge pull request #21527 from vcaputo/journal-file-mfd-centric

journal-file: get rid of JournalFile.mmap

3 years agosysusers: use uppercase UID/GID consistently in messages
Zbigniew Jędrzejewski-Szmek [Wed, 8 Dec 2021 09:19:53 +0000 (10:19 +0100)] 
sysusers: use uppercase UID/GID consistently in messages

3 years agotest-dhcp-option: inline iterator variable declarations 21676/head
Zbigniew Jędrzejewski-Szmek [Wed, 8 Dec 2021 09:09:30 +0000 (10:09 +0100)] 
test-dhcp-option: inline iterator variable declarations

3 years agotest-exec-util: rename variable to avoid global/local name conflict
Zbigniew Jędrzejewski-Szmek [Wed, 8 Dec 2021 09:07:08 +0000 (10:07 +0100)] 
test-exec-util: rename variable to avoid global/local name conflict

3 years agotest-dhcp-option: rename variable to avoid global/local name conflict
Zbigniew Jędrzejewski-Szmek [Wed, 8 Dec 2021 09:06:49 +0000 (10:06 +0100)] 
test-dhcp-option: rename variable to avoid global/local name conflict

CodeQL was complaining that the local variable obscurs the global
one. It is indeed a bit confusing when reading this… Let's rename
the variable to avoid confusing the reader.

3 years agogitignore: remove patterns for build files in source dir
Zbigniew Jędrzejewski-Szmek [Tue, 7 Dec 2021 17:33:32 +0000 (18:33 +0100)] 
gitignore: remove patterns for build files in source dir

Those made sense when autotoolz were used. With meson, everything
should land in the build dir, and this is only likely to obscure issues
with custom build rules.
C.f. https://github.com/systemd/systemd/pull/20429#issuecomment-988132332

3 years agokernel-install: respect $MACHINE_ID and ignore /etc/machine-id if on tmpfs
наб [Tue, 16 Mar 2021 16:38:20 +0000 (17:38 +0100)] 
kernel-install: respect $MACHINE_ID and ignore /etc/machine-id if on tmpfs

Confer https://github.com/systemd/systemd/pull/19006#issuecomment-800234022:
  On some systems it's the admin's explicit choice not to to have the
  machine ID leak into the ESP
  On some systems the machine ID is transient, generated at every boot,
  and hence should not be written to the ESP

3 years agoMerge pull request #21672 from yuwata/network-old-kernel-support
Yu Watanabe [Wed, 8 Dec 2021 01:11:20 +0000 (10:11 +0900)] 
Merge pull request #21672 from yuwata/network-old-kernel-support

network: old kernel support

3 years agomeson: drop libgcrypt dep from resolved tests
Zbigniew Jędrzejewski-Szmek [Fri, 3 Dec 2021 12:11:01 +0000 (13:11 +0100)] 
meson: drop libgcrypt dep from resolved tests

Follow-up for pull request #21170.

I hoped that we would drop libgcrypt fully and drop all references to the
library in meson, but this doesn't seem feasible (because of the use in
sd-journal). But let's remove it here, all the resolved code has been switched
to work either of the two libraries.

3 years agodhcp: fix assertion failure
Yu Watanabe [Tue, 7 Dec 2021 20:47:11 +0000 (05:47 +0900)] 
dhcp: fix assertion failure

Fixes #21671.

3 years agojournal-file: require MMapCache* for journal_file_open() 21527/head
Vito Caputo [Tue, 7 Dec 2021 22:18:14 +0000 (14:18 -0800)] 
journal-file: require MMapCache* for journal_file_open()

Previously the MMapCache* was optionally NULL, which open would
handle by creating a new MMapCache* for the occasion.

This produced some slightly circuitous refcount-handling code in
the function, as well as arguably creating opportunities for
weirdness where an MMapCache* was intended to be supplied but
happened to be NULL, which this magic would then paper over.

In any case, this was basically only being utilized by tests,
apparently just to avoid having to create an MMapCache.  So
update the relevant tests to supply an MMapCache and make
journal_file_open() treat a NULL MMapCache* as fatal w/assert.

3 years agommap-cache: add MMapCache trivial cleanup helpers
Vito Caputo [Tue, 7 Dec 2021 22:16:28 +0000 (14:16 -0800)] 
mmap-cache: add MMapCache trivial cleanup helpers

Enable _cleanup_(mmap_cache_unrefp) style cleanup for MMapCache*

3 years agojournal-file: goodbye JournalFile.mmap
Vito Caputo [Thu, 25 Nov 2021 23:32:07 +0000 (15:32 -0800)] 
journal-file: goodbye JournalFile.mmap

This gets rid of the manual MMapCache ref/unref goop in
journal_file_{open,close}(), in favor of just letting the
JournalFile.cache_fd MMapFileDescriptor carry the baton.

3 years agojournal: stop using JournalFile.mmap everywhere
Vito Caputo [Thu, 25 Nov 2021 23:24:48 +0000 (15:24 -0800)] 
journal: stop using JournalFile.mmap everywhere

Preparatory commit; before JournalFile can stop hanging onto its
copy of MMapCache, all these users need to find another way.

Most of the time these callers already have the MMapCache onhand,
so it's no big deal for them to just supply it.

journal_file_rotate() in particular needed to change, and it
seemed wise to not use the mmap_cache_fd_cache() accessor on
f->cache_fd, instead requiring the caller supply the cache to
use.  This was done with an eye towards a potential future where
the journal_file_archive() isolates the cache_fd to a private
cache, which the newly rotated-to file wouldn't be allowed to
use.  It's no biggie for the existing callers to just provide the
appropriate surviving cache.

Basically the mmap_cache_fd_cache() accessor was added just for
journal-verify.c's (ab)use of the mmap-cache.  Which, if the
ugly singleton MMapCache assumption ever goes away, can be
cleaned up to simply use a separate MMapCache for those search
arrays.

3 years agommap-cache: add MMapFileDescriptor.cache accessor
Vito Caputo [Thu, 25 Nov 2021 23:07:39 +0000 (15:07 -0800)] 
mmap-cache: add MMapFileDescriptor.cache accessor

Sometimes we want to reuse an existing MMapFileDescriptor's
cache, but it's a private struct.

This lets us access that pointer if necessary.

3 years agommap-cache: ref/unref MMapCache in fd add/free
Vito Caputo [Thu, 25 Nov 2021 23:01:38 +0000 (15:01 -0800)] 
mmap-cache: ref/unref MMapCache in fd add/free

Preparatory commit; callers manually ref/unref MMapCaches
alongside MMapFileDescriptor add/frees, when the latter should be
sufficient.

A subsequent commit will drop some of those manual MMapCache
reference hoop-jumping, leaving the lifecycle bound to
MMapFileDescriptors.

3 years agonetwork: address: read flags from message header when IFA_FLAGS is not supported... 21672/head
Yu Watanabe [Tue, 7 Dec 2021 20:35:37 +0000 (05:35 +0900)] 
network: address: read flags from message header when IFA_FLAGS is not supported by kernel

Follow-up for 0828a38605975b68c14c9194a1ee2c5c2ff7038f.

Fixes #21670.

3 years agonetwork: route: tighten variable scope
Yu Watanabe [Tue, 7 Dec 2021 20:37:42 +0000 (05:37 +0900)] 
network: route: tighten variable scope

Follow-up for 5e82a6137546d3a2ac403df261732076130356a8.

3 years agosd-network: drop _public_ attribute
Yu Watanabe [Tue, 7 Dec 2021 18:06:39 +0000 (03:06 +0900)] 
sd-network: drop _public_ attribute

sd-network is not public yet.

3 years agoMerge pull request #20476 from jamacku/new-feature-reloaded-stamp
Zbigniew Jędrzejewski-Szmek [Tue, 7 Dec 2021 17:47:25 +0000 (18:47 +0100)] 
Merge pull request #20476 from jamacku/new-feature-reloaded-stamp

core: indicate the time when units were loaded

3 years agobpf: refactor skeleton generation
James Hilliard [Thu, 12 Aug 2021 03:59:19 +0000 (21:59 -0600)] 
bpf: refactor skeleton generation

This should hopefully fix cross compilation for the bpf programs.

3 years agoMerge pull request #21625 from yuwata/network-dhcp-6rd
Zbigniew Jędrzejewski-Szmek [Tue, 7 Dec 2021 16:26:37 +0000 (17:26 +0100)] 
Merge pull request #21625 from yuwata/network-dhcp-6rd

network: dhcp: add 6rd support

3 years agocore: add StartUnitWithFlags DBUS method
Luca Boccassi [Fri, 3 Dec 2021 01:36:05 +0000 (01:36 +0000)] 
core: add StartUnitWithFlags DBUS method

When an activation job is skipped because of a Condition*= setting failing,
currently the JobRemoved signal lists 'done' as the result, just as with
a successful job.

This is a problem when doing dbus activation: dbus-broker will receive a
signal that says the job was successful, so then it moves into a state where
it waits for the requested name to appear on the bus, but that never happens
because the job was actually skipped.

Add a new StartUnitWithFlags that changes the behaviour of the JobRemoved
signal to list 'done' or 'skipped'.

Fixes #21520

3 years agogithub: mention the systemd-devel ML in the new issue tab
Frantisek Sumsal [Tue, 7 Dec 2021 15:08:36 +0000 (16:08 +0100)] 
github: mention the systemd-devel ML in the new issue tab