]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
2 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.

2 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.

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

2 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()

2 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

2 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

2 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

2 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

2 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.

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

Fixes #21671.

2 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.

2 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.

2 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

2 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.

2 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

2 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

2 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

2 years agoMerge pull request #21657 from mrc0mmand/codeql-shenanigans
Frantisek Sumsal [Tue, 7 Dec 2021 15:28:48 +0000 (15:28 +0000)] 
Merge pull request #21657 from mrc0mmand/codeql-shenanigans

ci: sync the list of CodeQL queries with LGTM

2 years agocore: Indicate the time when the manager started loading units the last time 20476/head
Jan Macku [Thu, 2 Sep 2021 14:50:50 +0000 (16:50 +0200)] 
core: Indicate the time when the manager started loading units the last time

2 years agocore: Add new DBUS properties UnitsReloadStartTimestamp and UnitsLoadTimestampMontonic
Jan Macku [Thu, 2 Sep 2021 14:37:13 +0000 (16:37 +0200)] 
core: Add new DBUS properties UnitsReloadStartTimestamp and UnitsLoadTimestampMontonic

2 years agoci: pack-ify our custom CodeQL queries and enable them in Actions 21657/head
Frantisek Sumsal [Tue, 7 Dec 2021 13:57:09 +0000 (14:57 +0100)] 
ci: pack-ify our custom CodeQL queries and enable them in Actions

Unlike LGTM, the CodeQL Action requires the custom queries to have their
own qlpack.yml file, so let's provide one.

2 years agoci: run the CodeQL action also when its configuration changes
Frantisek Sumsal [Tue, 7 Dec 2021 11:18:06 +0000 (12:18 +0100)] 
ci: run the CodeQL action also when its configuration changes

Just to make sure we didn't break anything.

2 years agoci: sync the list of CodeQL queries with LGTM
Frantisek Sumsal [Tue, 7 Dec 2021 11:06:29 +0000 (12:06 +0100)] 
ci: sync the list of CodeQL queries with LGTM

2 years agoresolve: remove server 'large' level
Dan Streetman [Fri, 20 Aug 2021 18:44:35 +0000 (14:44 -0400)] 
resolve: remove server 'large' level

This removes the DNS_SERVER_FEATURE_LEVEL_LARGE, and sets the EDNS0
advertised max packet size as if always in 'large' mode.

Without this, we always send out EDNS0 opts that limit response sizes
to 512 bytes, thus the remote server will never send anything larger
and will always truncate responses larger than 512 bytes, forcing us
to drop from EDNS0 down to TCP, even though one of the primary benefits
of EDNS0 is larger packet sizes.

Fixes: #20993
2 years agoci: add a missing SPDX header
Frantisek Sumsal [Tue, 7 Dec 2021 13:14:39 +0000 (14:14 +0100)] 
ci: add a missing SPDX header

2 years agoMerge pull request #21264 from medhefgo/boot-lto
Zbigniew Jędrzejewski-Szmek [Tue, 7 Dec 2021 11:58:59 +0000 (12:58 +0100)] 
Merge pull request #21264 from medhefgo/boot-lto

sd-boot: LTO support

2 years agotest-network: support the case that the default config files are not installed yet 21625/head
Yu Watanabe [Mon, 6 Dec 2021 00:47:46 +0000 (09:47 +0900)] 
test-network: support the case that the default config files are not installed yet

2 years agotest-network: add test for 6rd
Yu Watanabe [Mon, 6 Dec 2021 00:03:54 +0000 (09:03 +0900)] 
test-network: add test for 6rd

2 years agoman: network: document Use6RD= setting
Yu Watanabe [Mon, 6 Dec 2021 00:20:17 +0000 (09:20 +0900)] 
man: network: document Use6RD= setting

2 years agonetwork: dhcp-pd: add 6rd support
Yu Watanabe [Sun, 5 Dec 2021 16:35:55 +0000 (01:35 +0900)] 
network: dhcp-pd: add 6rd support

Closes #19152.

2 years agosd-dhcp-client: support 6rd option
Yu Watanabe [Sat, 4 Dec 2021 17:40:18 +0000 (02:40 +0900)] 
sd-dhcp-client: support 6rd option

2 years agonetwork: introduce link_remove()
Yu Watanabe [Sun, 5 Dec 2021 16:35:44 +0000 (01:35 +0900)] 
network: introduce link_remove()

2 years agonetwork: dhcp-pd: rename [DHCPv6PrefixDelegation] -> [DHCPPrefixDelegation]
Yu Watanabe [Sat, 4 Dec 2021 22:29:05 +0000 (07:29 +0900)] 
network: dhcp-pd: rename [DHCPv6PrefixDelegation] -> [DHCPPrefixDelegation]

This just changes the names of settings, variables, functions, files, and so on.
No functionality is changed.

Preparation for supporting 6rd.

2 years agoMerge pull request #21653 from yuwata/network-dhcp6pd-unreachable-route-cleanups
Yu Watanabe [Tue, 7 Dec 2021 11:28:18 +0000 (20:28 +0900)] 
Merge pull request #21653 from yuwata/network-dhcp6pd-unreachable-route-cleanups

network: dhcp6pd: cleanups for unreachable route

2 years agoMerge pull request #21655 from yuwata/network-creating-enslaving-netdev-cleanups
Yu Watanabe [Tue, 7 Dec 2021 11:21:47 +0000 (20:21 +0900)] 
Merge pull request #21655 from yuwata/network-creating-enslaving-netdev-cleanups

network: cleanups for creating or enslaving netdevs

2 years agonetwork: dhcp6pd: assign addresses in the delegated prefix instead of a subnet prefix...
Yu Watanabe [Sun, 5 Dec 2021 12:38:48 +0000 (21:38 +0900)] 
network: dhcp6pd: assign addresses in the delegated prefix instead of a subnet prefix /64 on upstream interface

2 years agonetwork: dhcp6pd: do not check Announce= setting when the link does not support RADV
Yu Watanabe [Sun, 5 Dec 2021 16:28:43 +0000 (01:28 +0900)] 
network: dhcp6pd: do not check Announce= setting when the link does not support RADV

2 years agonetwork: fix memleak
Yu Watanabe [Tue, 7 Dec 2021 07:07:28 +0000 (16:07 +0900)] 
network: fix memleak

Follow-up for ab106a609bc253c0dc49667e981108110b3a87a5.

Fixes CID#1467055.

2 years agonetwork: dhcp6pd: drop link_has_preferred_subnet_id() and inline condition
Yu Watanabe [Sun, 5 Dec 2021 12:46:37 +0000 (21:46 +0900)] 
network: dhcp6pd: drop link_has_preferred_subnet_id() and inline condition

2 years agonetwork: dhcp6pd: use the kernel's default value for priority of unreachable route 21653/head
Yu Watanabe [Sat, 4 Dec 2021 21:57:41 +0000 (06:57 +0900)] 
network: dhcp6pd: use the kernel's default value for priority of unreachable route

This should not change any behavior, as both values are equivalent.

2 years agonetwork: dhcp6pd: always use main route table for unreachable route
Yu Watanabe [Sat, 4 Dec 2021 21:54:03 +0000 (06:54 +0900)] 
network: dhcp6pd: always use main route table for unreachable route

This mostly reverts e47bcb7d0b2cb07c5c594e374baeb061bb7f88ba.

2 years agonetwork: dhcp6pd: set server address for unreachable route
Yu Watanabe [Sat, 4 Dec 2021 19:36:48 +0000 (04:36 +0900)] 
network: dhcp6pd: set server address for unreachable route

This is just for json output.

2 years agonetwork: dhcp6pd: gracefully handle delegated prefix whose prefixlen is larger than 64
Yu Watanabe [Sat, 4 Dec 2021 21:38:46 +0000 (06:38 +0900)] 
network: dhcp6pd: gracefully handle delegated prefix whose prefixlen is larger than 64

2 years agoMerge pull request #20522 from yuwata/cgroup-fix
Zbigniew Jędrzejewski-Szmek [Tue, 7 Dec 2021 09:24:44 +0000 (10:24 +0100)] 
Merge pull request #20522 from yuwata/cgroup-fix

core/cgroup: fix io.weight and blkio.weight

2 years agoci: pin python dependencies and let Dependabot keep track of them
Evgeny Vereshchagin [Fri, 19 Nov 2021 16:23:03 +0000 (16:23 +0000)] 
ci: pin python dependencies and let Dependabot keep track of them

2 years agoMerge pull request #21307 from medhefgo/boot-alloc
Zbigniew Jędrzejewski-Szmek [Tue, 7 Dec 2021 07:20:07 +0000 (08:20 +0100)] 
Merge pull request #21307 from medhefgo/boot-alloc

sd-boot: Non-failing allocators

2 years agonetwork/netdev: drop spurious state from the condition to create stacked netdevs 21655/head
Yu Watanabe [Mon, 6 Dec 2021 22:18:29 +0000 (07:18 +0900)] 
network/netdev: drop spurious state from the condition to create stacked netdevs

Stacked netdevs are requested when the underlying interface is in
configuring state.

2 years agonetwork/netdev: create stacked netdevs after all set-link operations are finished
Yu Watanabe [Mon, 6 Dec 2021 20:47:31 +0000 (05:47 +0900)] 
network/netdev: create stacked netdevs after all set-link operations are finished

E.g. setting MAC address must be done before creating VLAN interface.

2 years agonetwork: do not block configuring addresses by creating stacked netdevs
Yu Watanabe [Mon, 6 Dec 2021 20:34:08 +0000 (05:34 +0900)] 
network: do not block configuring addresses by creating stacked netdevs

`link_is_ready_to_configure()` is used to judge we can configure
addresses, routes, and etc. And they can be configured independently of
stacked netdevs.

2 years agonetwork: set MAC address before enslaving to bond or bridge interface
Yu Watanabe [Mon, 6 Dec 2021 20:57:29 +0000 (05:57 +0900)] 
network: set MAC address before enslaving to bond or bridge interface

As the master interface may inherit the slave MAC address.

2 years agounits/systemd-udevd: allow bpf() syscall
Maciek Borzecki [Tue, 30 Nov 2021 10:07:30 +0000 (11:07 +0100)] 
units/systemd-udevd: allow bpf() syscall

Programs run by udev triggers may need to execute the bpf() syscall. Even more
so, since on a cgroup v2 system, the only way to set up device access filtering
is to install a BPF program on the cgroup in question and one way of passing
data to such program is through BPF maps, which can only be access using the
bpf() syscall. One such use case was identified in RHBZ#2025264 related to
snap-device-helper, and led to RHBZ#2027627 being filed.

Unfortunately there is no finer grained control over what gets passed in the
syscall, so just enable bpf() and leave fine grained mediation to other
security layers (eg. SELinux).

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2027627
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
2 years agoMerge pull request #21598 from DaanDeMeyer/journald-file
Zbigniew Jędrzejewski-Szmek [Tue, 7 Dec 2021 06:35:34 +0000 (07:35 +0100)] 
Merge pull request #21598 from DaanDeMeyer/journald-file

journal: Fix re-enabling COW for archived journal files on BTRFS

2 years agonetwork,udev: do not adjust local assignment bit of specified MAC address
Yu Watanabe [Mon, 6 Dec 2021 23:23:27 +0000 (08:23 +0900)] 
network,udev: do not adjust local assignment bit of specified MAC address

People often assigns the MAC address of the enslaved interface to e.g.
bridge interface. So, the local assignment bit should not be adjusted.

Fixes #21649.

2 years agoMerge pull request #21642 from yuwata/network-state-file-ignore-dynamic-when-dbus...
Yu Watanabe [Tue, 7 Dec 2021 00:51:38 +0000 (09:51 +0900)] 
Merge pull request #21642 from yuwata/network-state-file-ignore-dynamic-when-dbus-entry-exists

network: state-file: ignore dynamic entries when specified by DBus method

2 years agoMerge pull request #21646 from mrc0mmand/lgtm-followups
Luca Boccassi [Tue, 7 Dec 2021 00:14:45 +0000 (00:14 +0000)] 
Merge pull request #21646 from mrc0mmand/lgtm-followups

LGTM follow-ups

2 years agoMerge pull request #21639 from yuwata/network-dhcp6pd-use-dhcp6_pd_prefix_acquired
Luca Boccassi [Tue, 7 Dec 2021 00:14:04 +0000 (00:14 +0000)] 
Merge pull request #21639 from yuwata/network-dhcp6pd-use-dhcp6_pd_prefix_acquired

network: dhcp6pd: use dhcp6 pd prefix acquired() and drop dhcp6_pd_distribute_prefix()

2 years agoMerge pull request #21196 from yuwata/process-util-nulstr
Yu Watanabe [Mon, 6 Dec 2021 23:29:34 +0000 (08:29 +0900)] 
Merge pull request #21196 from yuwata/process-util-nulstr

process-util: handle double NUL as the end of command line

2 years agoTEST-10: don't attempt to write a byte to the socket
Franck Bui [Wed, 17 Nov 2021 07:13:04 +0000 (08:13 +0100)] 
TEST-10: don't attempt to write a byte to the socket

Writing a byte to test10.socket is actually the root cause of issue #19154:
depending on the timing, it's possible that PID1 closes the socket before socat
(or nc, it doesn't matter which tool is actually used) tries to write that one
byte to the socket. In this case writing to the socket returns EPIPE, which
causes socat to exit(1) and subsequently make the test fail.

Since we're only interested in connecting to the socket and triggering the rate
limit of the socket, this patch removes the parts that write the single byte to
the socket, which should remove the race for good.

Since it shouldn't matter whether the test uses socat or nc, let's switch back
to nc and hence remove the sole user of socat. The exit status of nc is however
ignored because some versions might choke when the socket is closed
unexpectedly.

2 years agobuild(deps): bump github/codeql-action from 1.0.24 to 1.0.25
dependabot[bot] [Mon, 6 Dec 2021 21:17:32 +0000 (21:17 +0000)] 
build(deps): bump github/codeql-action from 1.0.24 to 1.0.25

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1.0.24 to 1.0.25.
- [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/e095058bfa09de8070f94e98f5dc059531bc6235...546b30f35ae5a3db0e0be1843008c2224f71c3b0)

---
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 agonetwork: state-file: do not append dynamic entries when specified by DBus method 21642/head
Yu Watanabe [Mon, 6 Dec 2021 17:32:01 +0000 (02:32 +0900)] 
network: state-file: do not append dynamic entries when specified by DBus method

Fixes #21515.

2 years agojournal: Fix disabling NO_COW on btrfs filesystems 21598/head
Daan De Meyer [Fri, 3 Dec 2021 10:06:36 +0000 (11:06 +0100)] 
journal: Fix disabling NO_COW on btrfs filesystems

Disabling NOCOW when data has been written to a file doesn't work.
Instead, when we're done writing to a journal file (after archiving),
let's rewrite the file with COW enabled. This also takes care of
properly defragmenting the file.

With zstd compression level 3, journal files are compressed to 12%
of their original size with default journal settings.

As rewriting the file might take a while since we also do an fsync()
after the rewrite, this work is done in the offline thread to avoid
blocking the journald event loop.

2 years agobasic: Make sure we're extra paranoid in chattr_full
Daan De Meyer [Fri, 3 Dec 2021 10:07:02 +0000 (11:07 +0100)] 
basic: Make sure we're extra paranoid in chattr_full

On btrfs, trying to disable FS_NOCOW_FL on a file that has data
already written will fail silently without reporting an error. To
catch such cases, let's query the flags again if the IOC_SETFLAGS
ioctl() succeeds to make sure the flags we tried to configure we're
actually accepted by the kernel.

2 years agojournal: Update the JournalFile path when archiving
Daan De Meyer [Wed, 1 Dec 2021 08:34:13 +0000 (09:34 +0100)] 
journal: Update the JournalFile path when archiving

When we archive a path, we rename the file to indicate this. However,
until now, we didn't actually update the path member of the corresponding
JournalFile instance. Let's make sure we also update this to avoid
misuse of the old path later on.

This change also requires we save the previous path in journal_file_rotate()
since we need to open a new file at the previous path.

2 years agomkosi: Add compsize to list of installed packages on Fedora
Daan De Meyer [Wed, 1 Dec 2021 08:32:59 +0000 (09:32 +0100)] 
mkosi: Add compsize to list of installed packages on Fedora

compsize is useful to check the compression ratio of journal files
on filesystems that support compression such as BTRFS.

2 years agomkosi: Add e2fsprogs to installed packages for Fedora
Daan De Meyer [Wed, 1 Dec 2021 08:31:00 +0000 (09:31 +0100)] 
mkosi: Add e2fsprogs to installed packages for Fedora

lsattr is useful to check chattr flags on files.

2 years agojournal: Move offlining logic to journald-file.c
Daan De Meyer [Tue, 30 Nov 2021 15:39:35 +0000 (16:39 +0100)] 
journal: Move offlining logic to journald-file.c

With this change, the logic to write the final tag, emit the final
change notification and to offline the file moves from journal_file_close()
to journald_file_close(). Since all this logic is only executed when
the journal file is writable and all code that writes journal files
already uses journald_file_close() instead of journal_file_close(), this
change should not introduce any changes in behaviour.

Moving the offline related logic to journald-file.c allows us to use
code from src/shared in the offlining logic, more specifically, we can
use the file copying logic from copy.h to fix BTRFS filesystem compression
for journal files when archiving.

2 years agojournal: Introduce journald-file.c for journal file write related logic
Daan De Meyer [Tue, 30 Nov 2021 15:18:56 +0000 (16:18 +0100)] 
journal: Introduce journald-file.c for journal file write related logic

Currently, all the logic related to writing journal files lives in
journal-file.c which is part of libsystemd (sd-journal). Because it's
part of libsystemd, we can't depend on any code from src/shared.

To allow using code from src/shared when writing journal files, let's
gradually move the write related logic from journal-file.c to
journald-file.c in src/journal. This directory is not part of libsystemd
and as such can use code from src/shared.

We can safely remove any journal write related logic from libsystemd as
it's not used by any public APIs in libsystemd.

This commit introduces the new file along with the JournaldFile struct
which wraps an instance of JournalFile. The goal is to gradually move
more functions from journal-file.c and fields from JournalFile to
journald-file.c and JournaldFile respectively.

This commit also modifies all call sites that write journal files to
use JournaldFile instead of JournalFile. All sd-journal tests that
write journal files are moved to src/journal so they can make use of
journald-file.c.

Because the deferred closes logic is only used by journald, we move it
out of journal-file.c as well. In journal_file_open(), we would wait for
any remaining deferred closes for the file we're about to open to complete
before continuing if the file was not newly created. In journald_file_open(),
we call this logic unconditionally since it stands that if a file is newly
created, it can't have any outstanding deferred closes.

No changes in behavior are introduced aside from the earlier execution
of waiting for any deferred closes to complete when opening a new journal
file.

2 years agocore: use correct level for CPU time log message
Christian Göttsche [Mon, 6 Dec 2021 15:57:42 +0000 (16:57 +0100)] 
core: use correct level for CPU time log message

raise_level() takes the info condition as second argument and the notice
one as third. For the consumed CPU time these conditions are swapped.

Fixes: 37109b856aeb ("pid1: use LOG_DEBUG/INFO/NOTICE for unit resource consumption message")
2 years agoMerge pull request #21372 from DaanDeMeyer/journal-truncate
Zbigniew Jędrzejewski-Szmek [Mon, 6 Dec 2021 19:52:19 +0000 (20:52 +0100)] 
Merge pull request #21372 from DaanDeMeyer/journal-truncate

journal-file: truncate archived journals

2 years agoMerge pull request #21638 from yuwata/network-dhcp6pd-prefix-lost
Yu Watanabe [Mon, 6 Dec 2021 17:54:10 +0000 (02:54 +0900)] 
Merge pull request #21638 from yuwata/network-dhcp6pd-prefix-lost

network: dhcp6pd: fix prefix lost handling

2 years agonetwork: state-file: honor dhcp6_use_domains flag
Yu Watanabe [Mon, 6 Dec 2021 16:58:35 +0000 (01:58 +0900)] 
network: state-file: honor dhcp6_use_domains flag

2 years agoanalyze,resolve: suppress a couple of false-positive alerts 21646/head
Frantisek Sumsal [Mon, 6 Dec 2021 16:45:37 +0000 (17:45 +0100)] 
analyze,resolve: suppress a couple of false-positive alerts

2 years agocore: check for NULL in one more place
Frantisek Sumsal [Mon, 6 Dec 2021 16:45:20 +0000 (17:45 +0100)] 
core: check for NULL in one more place

2 years agofix DirectoryNotEmpty when it comes to a Non-directory file
yangmingtai [Mon, 6 Dec 2021 09:06:13 +0000 (17:06 +0800)] 
fix DirectoryNotEmpty when it comes to a Non-directory file

2 years agoNEWS: add more entries for v250
Luca Boccassi [Mon, 6 Dec 2021 15:58:38 +0000 (15:58 +0000)] 
NEWS: add more entries for v250

2 years agoNEWS: add more entries for v250
Luca Boccassi [Mon, 6 Dec 2021 15:29:11 +0000 (15:29 +0000)] 
NEWS: add more entries for v250

2 years agoprocess-util: handle double NUL as the end of command line 21196/head
Yu Watanabe [Mon, 1 Nov 2021 00:01:40 +0000 (09:01 +0900)] 
process-util: handle double NUL as the end of command line

Fixes #21186.

2 years agoprocess-util: rename function arguments for storing results
Yu Watanabe [Sun, 31 Oct 2021 23:50:08 +0000 (08:50 +0900)] 
process-util: rename function arguments for storing results

2 years agoMerge pull request #21620 from yuwata/udev-path-id
Yu Watanabe [Mon, 6 Dec 2021 14:15:43 +0000 (23:15 +0900)] 
Merge pull request #21620 from yuwata/udev-path-id

udev/path_id: fix skip_subsystem()

2 years agojournal: punch holes in unused parts of entry arrays when archiving 21372/head
Daan De Meyer [Tue, 16 Nov 2021 23:54:16 +0000 (23:54 +0000)] 
journal: punch holes in unused parts of entry arrays when archiving

Entry arrays grow exponentially, so when archiving a journal file is
archived, it's very likely that the final entry array objects in each
entry array chain aren't fully used. Let's punch holes in the unused
parts so the filesystem can reclaim this unused space and use it for
something else.

2 years agojournal: truncate archived journals
Daan De Meyer [Tue, 16 Nov 2021 23:45:58 +0000 (23:45 +0000)] 
journal: truncate archived journals

Journal files have space allocated in 8MiB-aligned increments. This
can add up to substantial wasted space as many archived journals
accumulate without using all the allocated space. Let's truncate
journal files to their actually used size when archiving them to
reclaim this unused space.

As the mmap cache is not thread-safe, we can't call
journal_file_move_to_object() from the offline thread. Instead,
we use journal_file_read_object() which doesn't rely on the mmap
cache.

2 years agojournal: Add journal_file_read_object()
Daan De Meyer [Mon, 29 Nov 2021 09:24:44 +0000 (10:24 +0100)] 
journal: Add journal_file_read_object()

2 years agoMerge pull request #21633 from yuwata/network-route-null-destination
Yu Watanabe [Mon, 6 Dec 2021 13:27:37 +0000 (22:27 +0900)] 
Merge pull request #21633 from yuwata/network-route-null-destination

network: route: fix null destination handling

2 years agoMerge pull request #21634 from yuwata/dhcp-header-cleanups
Yu Watanabe [Mon, 6 Dec 2021 13:26:58 +0000 (22:26 +0900)] 
Merge pull request #21634 from yuwata/dhcp-header-cleanups

dhcp: trivial header cleanups

2 years agonetwork: dhcp6pd: make dhcp6_pd_assign_prefixes() used also by dhcp6_pd_prefix_acquired() 21639/head
Yu Watanabe [Sat, 4 Dec 2021 20:16:40 +0000 (05:16 +0900)] 
network: dhcp6pd: make dhcp6_pd_assign_prefixes() used also by dhcp6_pd_prefix_acquired()

2 years agonetwork: dhcp6pd: first check prefixes, then calculate lifetime
Yu Watanabe [Sat, 4 Dec 2021 20:15:57 +0000 (05:15 +0900)] 
network: dhcp6pd: first check prefixes, then calculate lifetime

2 years agonetwork: dhcp6pd: shorten code a bit
Yu Watanabe [Sat, 4 Dec 2021 20:15:12 +0000 (05:15 +0900)] 
network: dhcp6pd: shorten code a bit

2 years agonetwork: dhcp6pd: skip to assign prefixes to a downstream link if it is not ready
Yu Watanabe [Sat, 4 Dec 2021 20:14:22 +0000 (05:14 +0900)] 
network: dhcp6pd: skip to assign prefixes to a downstream link if it is not ready

2 years agonetwork: dhcp6pd: move dhcp6_pd_assign_prefixes()
Yu Watanabe [Sat, 4 Dec 2021 18:57:35 +0000 (03:57 +0900)] 
network: dhcp6pd: move dhcp6_pd_assign_prefixes()

Preparation for the later commits.

2 years agonetwork: dhcp6pd: also allow to only assign prefix route for delegated prefix to...
Yu Watanabe [Sat, 4 Dec 2021 18:40:15 +0000 (03:40 +0900)] 
network: dhcp6pd: also allow to only assign prefix route for delegated prefix to upstream interface

2 years agonetwork: dhcp6pd: drop unreachable routes when lease lost 21638/head
Yu Watanabe [Sat, 4 Dec 2021 20:03:09 +0000 (05:03 +0900)] 
network: dhcp6pd: drop unreachable routes when lease lost

2 years agonetwork: route: make route_cancel_request() take Link*
Yu Watanabe [Sat, 4 Dec 2021 20:01:30 +0000 (05:01 +0900)] 
network: route: make route_cancel_request() take Link*

As the Route object may be managed by Manager.

2 years agonetwork: dhcp6pd: also drop prefix assigned to upstream interface
Yu Watanabe [Sat, 4 Dec 2021 18:37:52 +0000 (03:37 +0900)] 
network: dhcp6pd: also drop prefix assigned to upstream interface

But do not drop prefixes from downstream which request another uplink.

2 years agoMerge pull request #21632 from yuwata/network-dhcp6pd-fix-typo-and-split
Yu Watanabe [Mon, 6 Dec 2021 12:24:47 +0000 (21:24 +0900)] 
Merge pull request #21632 from yuwata/network-dhcp6pd-fix-typo-and-split

network: dhcp6pd: fix typo and split file

2 years agoMerge pull request #21630 from yuwata/test-network-cleanups
Yu Watanabe [Mon, 6 Dec 2021 12:24:26 +0000 (21:24 +0900)] 
Merge pull request #21630 from yuwata/test-network-cleanups

test-network: trivial cleanups

2 years agonetwork: eui64 address is supported only ethernet or infiniband
Yu Watanabe [Mon, 6 Dec 2021 00:33:14 +0000 (09:33 +0900)] 
network: eui64 address is supported only ethernet or infiniband

So, this makes prefixstable mode will be used for other interface types.

2 years agoMerge pull request #21454 from bluca/inspect_elf
Zbigniew Jędrzejewski-Szmek [Mon, 6 Dec 2021 11:45:25 +0000 (12:45 +0100)] 
Merge pull request #21454 from bluca/inspect_elf

analyze: add inspect-elf verb to parse package metadata

2 years agoman: fix description of sd_uid_get_sessions
Pavel Březina [Thu, 2 Dec 2021 12:07:07 +0000 (13:07 +0100)] 
man: fix description of sd_uid_get_sessions

2 years agojournal: don't remove the flushed flag when journald is stopped
Franck Bui [Wed, 1 Dec 2021 07:51:48 +0000 (08:51 +0100)] 
journal: don't remove the flushed flag when journald is stopped

Due to the fact that systemd-journal-flush.service has
"Requires=systemd-journald.service", this service is stopped too when journald
is requested to do so.

However stopping systemd-journal-flush.service implies that journald
relinquishes /var hence implicitly switching back to the volatile storage
mode and removing /run/systemd/journal/flushed.

If journald is started afterwards, it will run in volatile storage mode
regardless of the value of 'Storage=' as it believes now that /var is not yet
ready (because the flushed flag is missing).

Because this flag is mainly an indication for journald that the initialization
of /var/log/journal (during the boot process) has been done,
systemd-journal-flush.service shouldn't be tied to the state of journald itself
but to the state of /var/log/journal, hence to the state of the system.

2 years agosystemctl: support JSON output for "show-environment"
Joris Hartog [Wed, 1 Dec 2021 14:06:29 +0000 (15:06 +0100)] 
systemctl: support JSON output for "show-environment"

This commit adds a function which converts a bus message containing the
environment variables to a JSON object and uses this function to support
JSON formatted output for the "systemctl show-environment" command.

Fixes #21348