]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
6 months agomeson: Implement duplicate includes check with clang-tidy 37237/head
Daan De Meyer [Thu, 24 Apr 2025 10:06:49 +0000 (12:06 +0200)] 
meson: Implement duplicate includes check with clang-tidy

Instead of doing this with our own script, let's use clang-tidy
instead.

6 months agonetwork: Remove duplicate include
Daan De Meyer [Thu, 24 Apr 2025 10:06:27 +0000 (12:06 +0200)] 
network: Remove duplicate include

6 months agomeson: Define our own clang-tidy target
Daan De Meyer [Thu, 24 Apr 2025 09:58:45 +0000 (11:58 +0200)] 
meson: Define our own clang-tidy target

meson's target has a few issues:
- Runs on all source files regardless if they're included in the
  build or not
- Doesn't have any dependencies on generated sources which means we
  have to do a full build first before we can run clang-tidy
- Doesn't allow us to pass any extra arguments

To work around these, let's define our own clang-tidy target instead
using llvm's run-clang-tidy script. Alongside the clang-tidy target,
let's start keeping track of all generated sources which we make the
clang-tidy target depend on. We also add a new target which will only
generate source files which is useful for setting up the source tree
for running code analysis against it.

6 months agoRemove unused code and fix one bug (#37225)
Yu Watanabe [Thu, 24 Apr 2025 03:28:48 +0000 (12:28 +0900)] 
Remove unused code and fix one bug (#37225)

6 months agotree-wide: Remove dead code 37225/head
Daan De Meyer [Wed, 23 Apr 2025 11:51:26 +0000 (13:51 +0200)] 
tree-wide: Remove dead code

This code seems to not be used anywhere at all, so let's drop it.

Follow up for ba8d00e859c82b8c1f31d515a48d9b56af1dc9ec
Follow up for 85686b37b098b5de4707776ad89598727bf7453f
Follow up for aff853f8ea29f22b28e3b584807893c528227769
Follow up for 36dad381a24e73e09a677df6daa48701f2dc7caa

6 months agocore: Use parse_syscall_archs() in bus_exec_context_set_transient_property()
Daan De Meyer [Wed, 23 Apr 2025 13:48:13 +0000 (15:48 +0200)] 
core: Use parse_syscall_archs() in bus_exec_context_set_transient_property()

6 months agonetwork: Fix wrong config parser for Bridge.MulticastIGMPVersion
Daan De Meyer [Wed, 23 Apr 2025 11:50:14 +0000 (13:50 +0200)] 
network: Fix wrong config parser for Bridge.MulticastIGMPVersion

Follow up for afa51e2dfb1a0171d3a9341e5a5fc5c4088624bc

6 months agorepart: Allow devices as sources for --copy-from
Nick Labich [Tue, 22 Apr 2025 00:03:46 +0000 (20:03 -0400)] 
repart: Allow devices as sources for --copy-from

Implements #37208

6 months agoudev: support soft-reboot (#37222)
Yu Watanabe [Thu, 24 Apr 2025 00:31:56 +0000 (09:31 +0900)] 
udev: support soft-reboot (#37222)

6 months agomkosi: Run clangd within the tools tree instead of the build container
Daan De Meyer [Wed, 23 Apr 2025 15:31:20 +0000 (17:31 +0200)] 
mkosi: Run clangd within the tools tree instead of the build container

Running within the build sandbox has a number of disadvantages:
- We have a separate clangd cache for each distribution/release combo
- It requires to build the full image before clangd can be used
- It breaks every time the image becomes out of date and requires a
  rebuild
- We can't look at system headers as we don't have the knowledge to map
  them from inside the build sandbox to the corresponding path on the host

Instead, let's have mkosi.clangd run clangd within the tools tree. We
already require building systemd for both the host and the target anyway,
and all the dependencies to build systemd are installed in the tools tree
already for that, as well as clangd since it's installed together with the
other clang tooling we install in the tools tree. Unlike the previous approach,
this approach only requires the mkosi tools tree to be built upfront, which has
a much higher chance of not invalidating its cache. We can also trivially map
system header lookups from within the sandbox to the path within mkosi.tools
on the host so that starts working as well.

6 months agoAdd clang-tidy check in CI (#37226)
Daan De Meyer [Wed, 23 Apr 2025 14:43:17 +0000 (16:43 +0200)] 
Add clang-tidy check in CI (#37226)

This will make sure we keep our headers standalone and don't introduce
any new cyclic header dependencies

6 months agoci: Add basic clang-tidy check to linter workflow 37226/head
Daan De Meyer [Wed, 23 Apr 2025 13:21:11 +0000 (15:21 +0200)] 
ci: Add basic clang-tidy check to linter workflow

Let's add a basic clang-tidy check to the linter workflow. This
gives us the following:
- A check so that we don't introduce any new cyclic header dependencies
- A check to make sure all of our header files are standalone, as clang-tidy
  will fail to parse header files that don't include all their dependencies.

6 months agoVarious logging improvements and cleanups (#37040)
Daan De Meyer [Wed, 23 Apr 2025 13:31:44 +0000 (15:31 +0200)] 
Various logging improvements and cleanups (#37040)

6 months agoci: Use mkosi in linter workflow
Daan De Meyer [Wed, 23 Apr 2025 13:17:33 +0000 (15:17 +0200)] 
ci: Use mkosi in linter workflow

Let's reuse the mkosi tools tree to get all the tools we need instead
of pulling them from pypi.

6 months agoAdd .clangd configuration file that disables the unused include check
Daan De Meyer [Wed, 23 Apr 2025 13:26:39 +0000 (15:26 +0200)] 
Add .clangd configuration file that disables the unused include check

The clangd include checker is rather broken and is littered with false
positives in our codebase, so let's disable the feature until it improves
a bit.

6 months agoexecute: Get rid of custom logging macros 37040/head
Daan De Meyer [Mon, 7 Apr 2025 19:54:53 +0000 (21:54 +0200)] 
execute: Get rid of custom logging macros

We already have LOG_CONTEXT_PUSH_EXEC() which with two additions
does exactly the same as the custom logging macros, so let's get rid
of the custom logging macros and use LOG_CONTEXT_PUSH_EXEC() instead.

6 months agotimedate: Drop custom logging macros in favor of log context
Daan De Meyer [Mon, 7 Apr 2025 20:06:54 +0000 (22:06 +0200)] 
timedate: Drop custom logging macros in favor of log context

Additionally, using the log context makes sure the extra fields are
applied to all log messages generated while the context is in place,
rather than only log messages logged with log_unit_xxx() in timedated
itself.

It also means the unit name is prefixed to all log messages logged
within that context. While it's not clear whether we always want the
unit name to be attached to library log messages, we also don't want
the unit name to not be attached to any library log messages, so we opt
to add more rather than less information by adding the unit name everywhere
for now.

In the future we can look into some log.h helpers to enable/disable
adding the prefix to the following log messages or not.

6 months agounit: Make sure individual unit maximum log level always takes priority
Daan De Meyer [Mon, 7 Apr 2025 18:06:54 +0000 (20:06 +0200)] 
unit: Make sure individual unit maximum log level always takes priority

Currently LogLevelMax= can only be used to decrease the maximum log level
for a unit but not to increase it. Let's make sure the latter works as
well, so LogLevelMax=debug can be used to enable debug logging for specific
units without enabling debug logging globally.

6 months agolog: Make sure LOG_CONTEXT_SET_LOG_LEVEL() can be nested
Daan De Meyer [Mon, 7 Apr 2025 18:06:34 +0000 (20:06 +0200)] 
log: Make sure LOG_CONTEXT_SET_LOG_LEVEL() can be nested

6 months agohomectl: Use 'user_subvol_rm_allowed' for btrfs by default.
cvlc12 [Tue, 22 Apr 2025 20:36:12 +0000 (22:36 +0200)] 
homectl: Use 'user_subvol_rm_allowed' for btrfs by default.

6 months agoVarious fixes to streamline running code analysis tools such as clang-tidy (#37224)
Daan De Meyer [Wed, 23 Apr 2025 12:34:52 +0000 (14:34 +0200)] 
Various fixes to streamline running code analysis tools such as clang-tidy (#37224)

6 months agocore: Merge forward declaration and definition of DynamicUser 37224/head
Daan De Meyer [Wed, 23 Apr 2025 10:06:16 +0000 (12:06 +0200)] 
core: Merge forward declaration and definition of DynamicUser

6 months agocore: Drop unused forward declaration
Daan De Meyer [Wed, 23 Apr 2025 10:05:54 +0000 (12:05 +0200)] 
core: Drop unused forward declaration

We already include unit.h.

6 months agobasic: Move various macros from assert-util.h to assert-fundamental.h
Daan De Meyer [Sun, 20 Apr 2025 19:20:42 +0000 (21:20 +0200)] 
basic: Move various macros from assert-util.h to assert-fundamental.h

ASSERT_PTR() and friends in assert-fundamental.h make use of assert()
and assert_se() which when not building for sd-boot are defined in
assert-util.h. Because assert() from glibc is only overridden in
assert-util.h, the macros in assert-fundamental.h still end up using
the glibc assert.

Let's fix this by moving the required macros and related logic to
assert-fundamental.h.

6 months agotree-wide: Use assert_se() instead of assert() in various places
Daan De Meyer [Wed, 23 Apr 2025 09:45:59 +0000 (11:45 +0200)] 
tree-wide: Use assert_se() instead of assert() in various places

assert() is compiled away if NDEBUG is set which causes an unused
variable warning in various places when the next commit is applied
so let's use assert_se() to avoid these warnings.

6 months agojournal: Always compile journal authentication related files
Daan De Meyer [Sun, 20 Apr 2025 10:26:53 +0000 (12:26 +0200)] 
journal: Always compile journal authentication related files

Tooling such as clang-tidy is bad at dealing with condition
compilation on the build system level instead of at the source file
level. What happens? It still tries to analyze the file and fails
horribly if the required headers aren't available. Let's work around
the issue and make things more consistent at the same time by doing
the necessary HAVE_GCRYPT checks inside of the source files instead
of doing them at the build system level.

We also add some typedefs to allow getting rid of various HAVE_GCRYPT
checks.

6 months agolibsystemd: Skip _sd-common.h include check when __clang_analyzer__ is defined
Daan De Meyer [Sun, 20 Apr 2025 10:25:42 +0000 (12:25 +0200)] 
libsystemd: Skip _sd-common.h include check when __clang_analyzer__ is defined

This check doesn't work properly when tools such as clang-tidy are
analyzing headers. Since we don't care about the check in that case,
skip it if __clang_analyzer__ is defined similar to how we skip it as
well if __COVERITY__ is defined.

6 months agoboot: Make free() a non inline function
Daan De Meyer [Sun, 20 Apr 2025 10:24:09 +0000 (12:24 +0200)] 
boot: Make free() a non inline function

The static inline declaration in iovec-fundamental.h causes static
analyze tooling warnings (clang-tidy). Let's get around it by making
free() non-inline. LTO will make sure it's still inlined properly.

6 months agoRemove more circular header dependencies (#37185)
Daan De Meyer [Wed, 23 Apr 2025 09:24:02 +0000 (11:24 +0200)] 
Remove more circular header dependencies (#37185)

Continuation of https://github.com/systemd/systemd/pull/37112

6 months agotree-wide: Make sure all headers are standalone 37185/head
Daan De Meyer [Sat, 19 Apr 2025 21:21:55 +0000 (23:21 +0200)] 
tree-wide: Make sure all headers are standalone

Let's make sure all of our headers include everything they require.

6 months agobasic: Use _Static_assert() in missing_audit.h instead of assert_cc()
Daan De Meyer [Wed, 23 Apr 2025 08:19:59 +0000 (10:19 +0200)] 
basic: Use _Static_assert() in missing_audit.h instead of assert_cc()

We want to make the header standalone so it includes all the stuff it
needs. However, including macro.h for assert_cc() doesn't work because
of generate-audit_type-list.sh which would have to become more complex
to handle the extra include directories.

Instead, let's just use _Static_assert() directly which is a builtin and
doesn't need any extra includes.

6 months agotimesync: Remove circular header dependencies
Daan De Meyer [Sat, 19 Apr 2025 21:18:44 +0000 (23:18 +0200)] 
timesync: Remove circular header dependencies

6 months agosysupdate: Remove circular header includes
Daan De Meyer [Sat, 19 Apr 2025 21:12:18 +0000 (23:12 +0200)] 
sysupdate: Remove circular header includes

6 months agoresolved: Remove circular header dependencies
Daan De Meyer [Sat, 19 Apr 2025 20:41:49 +0000 (22:41 +0200)] 
resolved: Remove circular header dependencies

6 months agoresolve: Move implementations of some functions to resolved-dns-packet.c
Daan De Meyer [Sat, 19 Apr 2025 12:07:09 +0000 (14:07 +0200)] 
resolve: Move implementations of some functions to resolved-dns-packet.c

These depend on a full definition of DnsResourceRecord which we want
to forward declare in the next commit, so let's move the implementation
of these functions to the implementation file and make them lowercase.

6 months agoresolve: Move two functions from resolved-conf.h to resolved-dns-server.h
Daan De Meyer [Sat, 19 Apr 2025 11:12:00 +0000 (13:12 +0200)] 
resolve: Move two functions from resolved-conf.h to resolved-dns-server.h

Preparation for getting rid of circular header dependencies.

6 months agoportable: Remove circular header dependencies
Daan De Meyer [Sat, 19 Apr 2025 10:36:37 +0000 (12:36 +0200)] 
portable: Remove circular header dependencies

6 months agonetwork: Remove circular header dependencies in network/netdev
Daan De Meyer [Sat, 19 Apr 2025 10:24:47 +0000 (12:24 +0200)] 
network: Remove circular header dependencies in network/netdev

6 months agonetwork: Remove circular header dependencies in network/tc
Daan De Meyer [Sat, 19 Apr 2025 10:12:20 +0000 (12:12 +0200)] 
network: Remove circular header dependencies in network/tc

Include the headers in the implementation file (and the gperf file)
instead of in the qdisc.h header. I opted to keep them separate from
the other headers since they're slightly different than regular headers.

6 months agonetwork: Move networkd-manager.h include to implementation file
Daan De Meyer [Sat, 19 Apr 2025 10:11:50 +0000 (12:11 +0200)] 
network: Move networkd-manager.h include to implementation file

6 months agomachine: Remove circular header dependencies
Daan De Meyer [Fri, 18 Apr 2025 22:13:45 +0000 (00:13 +0200)] 
machine: Remove circular header dependencies

6 months agologin: Remove circular header dependencies
Daan De Meyer [Fri, 18 Apr 2025 21:53:19 +0000 (23:53 +0200)] 
login: Remove circular header dependencies

6 months agojournal: Remove circular header dependencies
Daan De Meyer [Fri, 18 Apr 2025 20:08:04 +0000 (22:08 +0200)] 
journal: Remove circular header dependencies

6 months agoimport: Remove circular header dependencies
Daan De Meyer [Fri, 18 Apr 2025 19:48:08 +0000 (21:48 +0200)] 
import: Remove circular header dependencies

6 months agohome: Remove circular header dependencies
Daan De Meyer [Fri, 18 Apr 2025 19:37:13 +0000 (21:37 +0200)] 
home: Remove circular header dependencies

6 months agocore: Remove circular dependencies between headers
Daan De Meyer [Fri, 18 Apr 2025 18:53:51 +0000 (20:53 +0200)] 
core: Remove circular dependencies between headers

Currently there are various circular dependencies between headers
in core/. Let's get rid of these by making judicious use of forward
declarations and moving includes into implementation files instead of
having them in header files.

Getting rid of circular header includes simplifies the code and makes
various clang based tooling such as iwyu work much better on our code.

The most important change is getting rid of the manager.h include in
unit.h which is possible thanks to the previous commits. We also move
the OOMPolicy and StatusType enums to unit.h to remove the need for
other unit headers to include manager.h to get access to these enums.

6 months agocore: Turn manager unit log fields into unit functions
Daan De Meyer [Fri, 18 Apr 2025 14:37:50 +0000 (16:37 +0200)] 
core: Turn manager unit log fields into unit functions

There's no need for these to be fields inside the manager struct,
let's turn them into functions in unit.h instead, again to allow
forward declaring the Manager struct in a later commit.

6 months agoshared: Remove circular dependency between image-policy.h and dissect-image.h
Daan De Meyer [Fri, 18 Apr 2025 19:19:07 +0000 (21:19 +0200)] 
shared: Remove circular dependency between image-policy.h and dissect-image.h

ImagePolicy can just be a forward declaration in dissect-image.h.

6 months agosd-bus: Get rid of circular dependency between sd-bus.h and sd-bus-vtable.h
Daan De Meyer [Fri, 18 Apr 2025 14:45:55 +0000 (16:45 +0200)] 
sd-bus: Get rid of circular dependency between sd-bus.h and sd-bus-vtable.h

Let's move more types to sd-bus-protocol.h so we can get rid of the
circular include between sd-bus-vtable.h and sd-bus.h.

6 months agoman,network: fix typo
Yu Watanabe [Wed, 23 Apr 2025 04:42:09 +0000 (13:42 +0900)] 
man,network: fix typo

Follow-up for a06e88426444ac50fde712e426ec9a4234ae5576.

6 months agoTEST-82-SOFTREBOOT: add test case for uevents generated during soft-reboot 37222/head
Yu Watanabe [Wed, 9 Apr 2025 13:14:56 +0000 (22:14 +0900)] 
TEST-82-SOFTREBOOT: add test case for uevents generated during soft-reboot

6 months agounits: stop systemd-udevd before soft-reboot
Yu Watanabe [Mon, 7 Apr 2025 08:31:05 +0000 (17:31 +0900)] 
units: stop systemd-udevd before soft-reboot

Otherwise, queued uevents may be lost on soft-reboot.

Similar to f89985ca494b79b2beed47e1f10d46ef2d59ce3e, but for
systemd-udevd.

6 months agocore/socket: do not enter failed state when we cannot start service due to conflictin...
Yu Watanabe [Wed, 9 Apr 2025 13:10:42 +0000 (22:10 +0900)] 
core/socket: do not enter failed state when we cannot start service due to conflicting transaction being queued

Otherwise, e.g. on soft-reboot, socket unit may enter the failed state
and the socket buffer will be cleared.

6 months agocore/manager: assume availability of all RT signals
Mike Yuan [Tue, 22 Apr 2025 22:26:49 +0000 (00:26 +0200)] 
core/manager: assume availability of all RT signals

Our kernel baseline is v5.4 now.

6 months agonetwork: enable ARP when IPv4LL and/or IPv4ACD is enabled (#37190)
Yu Watanabe [Tue, 22 Apr 2025 23:53:49 +0000 (08:53 +0900)] 
network: enable ARP when IPv4LL and/or IPv4ACD is enabled (#37190)

6 months agosd-device: fix sysname check in sd_device_new_from_subsystem_sysname()
Yu Watanabe [Tue, 22 Apr 2025 15:13:51 +0000 (00:13 +0900)] 
sd-device: fix sysname check in sd_device_new_from_subsystem_sysname()

For example, consider the following device:
- syspath: /sys/bus/mdio_bus/drivers/Qualcomm Atheros AR8031!AR8033
- subsystem: "drivers"
- driver subsystem: "mdio_bus"
- sysname: "Qualcomm Atheros AR8031/AR8033"  <-- '!' is replaced with '/'

When sd_device_new_from_subsystem_sysname() is called to get the device,
the arguments to sd_device_new_from_subsystem_sysname() should be
- subsystem: "drivers"
- sysname (concatenated with driver subsystem): "mdio_bus:Qualcomm Atheros AR8031/AR8033"

In that case, we need to pass to device_new_from_path_join() the following:
- subsystem: "drivers"
- driver subsystem: "mdio_bus"
- sysname: "Qualcomm Atheros AR8031/AR8033"
- a: "/sys/bus"
- b: "drivers"
- c: "mdio_bus"
- d: "Qualcomm Atheros AR8031!AR8033"
Here, the important point is that the `sysname` argument and the
last argument `d` are differnt: the `sysname` argument needs to match
the sysname obtained by `sd_device_get_sysname()`, but `d` must be
the last path component of the syspath.

Previously, we passed a wrong sysname to device_new_from_path_join().
This fixes the issue.

Fixes a bug in cd7c71154cd62d3f50c07ce387edd9c20aebd7bc (v257).

6 months agomkosi: Add extra packages to the tools tree (#37218)
Yu Watanabe [Tue, 22 Apr 2025 23:51:44 +0000 (08:51 +0900)] 
mkosi: Add extra packages to the tools tree (#37218)

6 months agocore: add concurrency limits to slice units (#36831)
Lennart Poettering [Tue, 22 Apr 2025 18:44:04 +0000 (20:44 +0200)] 
core: add concurrency limits to slice units (#36831)

I needed something to hack on "offline", during a long transatlantic
flight. I decided to implement #35862, since I could do that without
checking any online docs nor needing GitHub.

6 months agoupdate TODO 36831/head
Lennart Poettering [Sat, 22 Mar 2025 12:10:04 +0000 (13:10 +0100)] 
update TODO

6 months agotest: add integration test for concurrency limits
Lennart Poettering [Tue, 1 Apr 2025 10:53:32 +0000 (12:53 +0200)] 
test: add integration test for concurrency limits

6 months agopid1: add a concurrency limit to slice units
Lennart Poettering [Fri, 21 Mar 2025 17:01:16 +0000 (18:01 +0100)] 
pid1: add a concurrency limit to slice units

Fixes: #35862
6 months agoman: explain coredump handling in context of containers better
Lennart Poettering [Wed, 16 Apr 2025 13:32:45 +0000 (15:32 +0200)] 
man: explain coredump handling in context of containers better

We have two different mechanisms, let's discuss them explicitly,
comparing their effect and intended usecase.

6 months agoudev: serialize queued events on exit (#37047)
Daan De Meyer [Tue, 22 Apr 2025 08:54:25 +0000 (10:54 +0200)] 
udev: serialize queued events on exit (#37047)

Previously, all queued events were discarded on exit, hence several
events might not be processed by udevd when it is restarted. Such
situation especially easily happens on switching root.

This makes queued events serialized on exit, and deserialized in the
next invocation. Hence, no events should be lost during restarting
udevd.

This is important with the several aspects. Basically
systemd-udev-trigger.service (re)triggers all devices anyway after
switching root, But the service may be disabled or modified by admin.
Moreover, the service produces only 'add' events, and thus the service
cannot cover events with other actions generated by the kernel during
switching root. Also, the userspace triggered events may not contain
some parameters compared with events triggered by the kernel.

6 months agoSeveral preparation for killing SysV compat (#37207)
Daan De Meyer [Tue, 22 Apr 2025 08:13:44 +0000 (10:13 +0200)] 
Several preparation for killing SysV compat (#37207)

6 months agomeson: use deprecated tag for dns-over-tls and cryptolib meson options
Yu Watanabe [Mon, 21 Apr 2025 04:26:27 +0000 (13:26 +0900)] 
meson: use deprecated tag for dns-over-tls and cryptolib meson options

Follow-up for #36937.

6 months agotest-specifier: replace /dev/initctl with /dev/fd 37207/head
Yu Watanabe [Tue, 22 Apr 2025 00:24:39 +0000 (09:24 +0900)] 
test-specifier: replace /dev/initctl with /dev/fd

To make the test work even when systemd is built without SysV compat.

6 months agotest: drop nonexistent units from test-unit-name
Yu Watanabe [Mon, 21 Apr 2025 01:04:51 +0000 (10:04 +0900)] 
test: drop nonexistent units from test-unit-name

The test does not request each unit file exists, but keeping legacy unit
names in test sounds spurious. Let's remove them. Hopefully we still
have enough test cases.

6 months agoman/systemd: drop explanation about SysV compatibilities
Yu Watanabe [Mon, 21 Apr 2025 01:51:36 +0000 (10:51 +0900)] 
man/systemd: drop explanation about SysV compatibilities

Sooner or later, we will drop the explained SysV compatibilities.
Let's remove them from the man page now to make not people rely on that.

6 months agoman/systemd: fix mapping from SysV runlevel to actual target name
Yu Watanabe [Mon, 21 Apr 2025 01:50:57 +0000 (10:50 +0900)] 
man/systemd: fix mapping from SysV runlevel to actual target name

See runlevel_to_target() in src/shared/unit-file.c.

6 months agounit-file: use STRV_FOREACH_PAIR() macro at one more place
Yu Watanabe [Mon, 21 Apr 2025 02:02:13 +0000 (11:02 +0900)] 
unit-file: use STRV_FOREACH_PAIR() macro at one more place

6 months agoman/systemctl: list-sockets command sorts the result
Yu Watanabe [Sun, 20 Apr 2025 20:30:09 +0000 (05:30 +0900)] 
man/systemctl: list-sockets command sorts the result

This updates the example output of list-sockets command.

6 months agocore: kill StartAuxiliaryScope() DBus method (#37184)
Yu Watanabe [Tue, 22 Apr 2025 01:18:06 +0000 (10:18 +0900)] 
core: kill StartAuxiliaryScope() DBus method (#37184)

This removes StartAuxiliaryScope() DBus method as already planned and
announced.
This effectively reverts #28836.

6 months agoNEWS: mention org.freedesktop.systemd1.StartAuxiliaryScope() has been removed 37184/head
Yu Watanabe [Fri, 18 Apr 2025 21:37:20 +0000 (06:37 +0900)] 
NEWS: mention org.freedesktop.systemd1.StartAuxiliaryScope() has been removed

6 months agocore: remove deprecated StartAuxiliaryScope() DBus method
Yu Watanabe [Fri, 18 Apr 2025 20:03:41 +0000 (05:03 +0900)] 
core: remove deprecated StartAuxiliaryScope() DBus method

The method is deprecated since 64f173324ec98dc74a3057b6b36c1f24e882182e
(v257) and announced that it will be removed in v258.
Let's remove it now.

This effectively reverts 84c01612de805d88875d4d91cfcf73cf10f99447.

6 months agoRevert "tests: add test for StartAuxiliaryScope()"
Yu Watanabe [Fri, 18 Apr 2025 21:35:08 +0000 (06:35 +0900)] 
Revert "tests: add test for StartAuxiliaryScope()"

This reverts commit fd7fd59b6dc81a0a0e3f5e40e085c51c16fa7eec.

The DBus method StartAuxiliaryScope() will be removed in the next
commit.

6 months agocgroup-util: drop cg_freezer_supported() and cg_ns_supported() (#37201)
Yu Watanabe [Mon, 21 Apr 2025 23:58:52 +0000 (08:58 +0900)] 
cgroup-util: drop cg_freezer_supported() and cg_ns_supported() (#37201)

6 months agocore/cgroup: actually apply BPF everywhere
Mike Yuan [Mon, 21 Apr 2025 14:55:34 +0000 (16:55 +0200)] 
core/cgroup: actually apply BPF everywhere

Follow-up for f1c5534eb61a1abcac62d67d57ef2f0715073819

The previous logic was an OR, i.e. as long as we're running
in unified mode BPF is applied. The offending commit
spuriously excluded local root.

While at it, remove check for cgv1 CGROUP_MASK_DEVICES controller.

6 months agocgroup-util: drop now unused cg_ns_supported() 37201/head
Mike Yuan [Fri, 18 Apr 2025 19:57:13 +0000 (21:57 +0200)] 
cgroup-util: drop now unused cg_ns_supported()

6 months agonspawn: use namespace_type_supported()
Mike Yuan [Fri, 18 Apr 2025 19:56:26 +0000 (21:56 +0200)] 
nspawn: use namespace_type_supported()

6 months agonamespace-util: generalize namespace_type_supported()
Mike Yuan [Fri, 18 Apr 2025 19:55:27 +0000 (21:55 +0200)] 
namespace-util: generalize namespace_type_supported()

6 months agocgroup-util: drop cg_freezer_supported(), assume supported
Mike Yuan [Wed, 15 Jan 2025 21:05:56 +0000 (22:05 +0100)] 
cgroup-util: drop cg_freezer_supported(), assume supported

6 months agoman/sd-bus: Add at least one reference per sd-bus function man page
igo95862 [Sun, 20 Apr 2025 16:02:01 +0000 (17:02 +0100)] 
man/sd-bus: Add at least one reference per sd-bus function man page

Some sd-bus man pages did not have any references on the main
 sd-bus man page. Unless you accidentally stumbled on them from
other pages  it was difficult to discover them.

6 months agoman/sd_bus_emit_signal: Fix extra const for strv functions
igo95862 [Sun, 20 Apr 2025 15:14:23 +0000 (16:14 +0100)] 
man/sd_bus_emit_signal: Fix extra const for strv functions

The functions `sd_bus_emit_interfaces_added_strv`, `sd_bus_emit_interfaces_removed_strv`
and `sd_bus_emit_properties_changed_strv` take an `char **` not
`const char **` as last argument.

See `src/systemd/sd-bus.h` for the function definition.

6 months agossh-proxy: use % as an alternative separator
Yu Watanabe [Sun, 20 Apr 2025 02:11:07 +0000 (11:11 +0900)] 
ssh-proxy: use % as an alternative separator

Since OpenSSH 10.0p1, specifically
https://anongit.mindrot.org/openssh.git/commit/?id=487cf4c18c123b66c1f3f733398cd37e6b2ab6ab
ssh refuses comma in hostname by default.

Let's use % as an alternative separator.

Follow-up for defd5060d69ba31c1815e7d5427bde93a3db88c0.

6 months agodocs/MEMORY_PRESSURE: Replace incorrect "packages" with correct "pages"
Alexander Kurtz [Sun, 20 Apr 2025 08:31:22 +0000 (10:31 +0200)] 
docs/MEMORY_PRESSURE: Replace incorrect "packages" with correct "pages"

6 months agonetwork: enable ARP= when IPv4LL/IPv4ACD is enabled 37190/head
Yu Watanabe [Sun, 20 Apr 2025 01:23:32 +0000 (10:23 +0900)] 
network: enable ARP= when IPv4LL/IPv4ACD is enabled

We can run sd-ipv4ll/sd-ipv4acd also on an interface with IFF_NOARP
flag, but that may cause address conflict with other hosts.
Let's enable ARPing when sd-ipv4ll/sd-ipv4acd are enabled unless ARP= is
explicitly disabled.

6 months agonetwork/ipv4ll: introduce ipv4ll_start() helper function
Yu Watanabe [Sun, 20 Apr 2025 01:46:36 +0000 (10:46 +0900)] 
network/ipv4ll: introduce ipv4ll_start() helper function

No effective functional change. Just refactoring.

6 months agonetwork/link: move logging
Yu Watanabe [Sun, 20 Apr 2025 00:31:32 +0000 (09:31 +0900)] 
network/link: move logging

6 months agoAdd two new paragraphs to coding style about header files (#37188)
Yu Watanabe [Sat, 19 Apr 2025 11:46:02 +0000 (20:46 +0900)] 
Add two new paragraphs to coding style about header files (#37188)

6 months agodocs: Add note to keep header files as lean as possible to CODING_STYLE.md 37188/head
Daan De Meyer [Sat, 19 Apr 2025 08:22:37 +0000 (10:22 +0200)] 
docs: Add note to keep header files as lean as possible to CODING_STYLE.md

6 months agodocs: Add paragraph about circular includes to CODING_STYLE.md
Daan De Meyer [Sat, 19 Apr 2025 08:11:12 +0000 (10:11 +0200)] 
docs: Add paragraph about circular includes to CODING_STYLE.md

6 months agomkosi: Add clang tools and iwyu to tools tree 37218/head
Daan De Meyer [Fri, 18 Apr 2025 14:03:09 +0000 (16:03 +0200)] 
mkosi: Add clang tools and iwyu to tools tree

6 months agomkosi: Replace base-devel with base in arch tools packages
Daan De Meyer [Fri, 18 Apr 2025 13:59:41 +0000 (15:59 +0200)] 
mkosi: Replace base-devel with base in arch tools packages

base-devel pulls in a bit too much, especially for NO_BUILD builds
so let's use base instead.

6 months agoNEWS: mention that F20 and friends has been replaced with micmute and so on
Yu Watanabe [Fri, 18 Apr 2025 20:30:28 +0000 (05:30 +0900)] 
NEWS: mention that F20 and friends has been replaced with micmute and so on

Follow-up for #34325.

6 months agobootctl: fix typo
Yu Watanabe [Fri, 18 Apr 2025 19:49:11 +0000 (04:49 +0900)] 
bootctl: fix typo

Follow-up for bbeeea43625d22d2ab92b26ed93378acbad8ca66.

6 months agologind: drop session fifo logic, rely solely on pidfd for exit notification
Mike Yuan [Wed, 8 Jan 2025 12:50:35 +0000 (13:50 +0100)] 
logind: drop session fifo logic, rely solely on pidfd for exit notification

Traditionally, logind installed a fifo in the PAM session and
used EOF on the fd as signal for session close. With the addition of
pidfd (76f2191d8eb54d7b9e39ab230c9c62b8a8c42265) however,
logind tracks the leader process and the session is terminated
as soon as that exits. I think the new behavior generally makes
more sense, and the behavior got changed *in the mentioned commit
already* without anyone ever showing up to complain. It hence
feels safe to kill the concept now (also before the varlink interface
gets rolled out).

Note that the 'PID' field in CreateSession() Varlink method
is now marked as strict, i.e. failure to acquire pidfd
is immediately treated as fatal.

6 months agologin: replace tabs with spaces in example polkit rule
Mike Yuan [Fri, 18 Apr 2025 17:21:24 +0000 (19:21 +0200)] 
login: replace tabs with spaces in example polkit rule

6 months agoTEST-17-UDEV: add test case for queued events serialization/deserialization 37047/head
Yu Watanabe [Mon, 7 Apr 2025 10:19:47 +0000 (19:19 +0900)] 
TEST-17-UDEV: add test case for queued events serialization/deserialization

6 months agoudev: serialize queued events on exit, and deserialize them in the next invocation
Yu Watanabe [Sat, 5 Apr 2025 13:42:26 +0000 (22:42 +0900)] 
udev: serialize queued events on exit, and deserialize them in the next invocation

To make systemd-udevd not lose received uevents on restart. This may be
important on switching root, even though we typically trigger all devices
after switching root by systemd-udev-trigger.service, but it may be
disabled or modified by admin.

6 months agoresolve,import: always use openssl (#36937)
Daan De Meyer [Fri, 18 Apr 2025 13:30:33 +0000 (15:30 +0200)] 
resolve,import: always use openssl (#36937)