Commit Graph
81157 Commits
Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 802d23fcfb man/systemd.exec: reword description of SystemCallFilter=
The existing text grew organically as features were added and was
not very organized. Reorder it and break into paragraphs grouped
by topic. The description of the :errno syntax is replaced by a short
reference to the SystemCallErrorNumber= setting. This makes the
text shorter and makes it easier to explain how the two settings combine.
2025-05-06 21:14:03 +02:00
Daan De Meyer e4a08721c3 string-util: Remove utf8.h and alloc-util.h includes 2025-05-06 13:27:54 +02:00
Yu Watanabe 8d7f05abc8 cleanup: bugprone argument issues (#37346)
Follow up from https://github.com/systemd/systemd/pull/37281
2025-05-06 18:56:07 +09:00
Daan De Meyer 0682853b2f Various preparatory changes from #37344 (#37348) 2025-05-06 11:23:15 +02:00
Daan De Meyer c09ce222b6 hashmap: Drop debug params
Passing in the func, file and line information complicates the
interface. On top of that, it prevents forward declaring Hashmap in
strv.h, as we need to pass the macros everywhere that we allocate a
hashmap, which means we have to include the hashmap header everywhere
we have a function that allocates a hashmap instead of just having to
forward declare Hashmap.

Let's drop the file, func and line information from the debug information.
Instead, in the future we can add a description field to hashmaps like we
already have in various other structs to describe the purpose of the hashmap
which should be much more useful than having the file, line and function where
the hashmap was allocated.
2025-05-06 10:14:26 +02:00
Daan De Meyer 40a6cdc29e macro: Introduce ABS() macro and use it in header files
abs() requires including the entirety of stdlib.h just for a single
trivial function. Let's introduce the ABS() macro and use it in header
files instead so we can get rid of stdlib.h transitive includes in header
files in a later commit.
2025-05-06 10:14:26 +02:00
Daan De Meyer c94f6ab1bf string-table: Move more implementation logic into functions
Let's move some more implementation logic into functions. We keep
the logic that requires the macro in the macro and move the rest into
functions.

While we're at it, let's also make the parameter declarations of
all the string table macros less clausthrophobic.
2025-05-06 10:14:24 +02:00
Daan De Meyer 76d62b63ef main-func: Reduce transitive includes
Let's move some logic from _DEFINE_MAIN_FUNCTION() and other places
in main-func.h into functions that we implement in main-func.c to
allow moving some included headers from the header to the .c file.
2025-05-06 10:07:27 +02:00
Jelle van der Waa 3ce45cd3ac shared: fix leftover bool value from flags conversion
Follow-up for 5c48335ef4
2025-05-06 09:31:50 +02:00
Yu Watanabe d3059d48ee hibernate-resume: automatically decrypt dissected swap (#37335)
Closes https://github.com/systemd/systemd/issues/27247
(https://github.com/systemd/systemd/pull/35328,
https://github.com/systemd/systemd/issues/37330)
2025-05-06 13:00:24 +09:00
Yu Watanabe 2482bd49c3 network,udev: several improvements for logging (#37337)
No functional changes. Continuation of #37269.
2025-05-06 12:43:15 +09:00
Yu Watanabe a3a98a3793 prioq: coding style fixes 2025-05-05 22:53:01 +02:00
Jelle van der Waa 4b779c874c shared: rename type to fstype
Follow the argument comment naming already used.
2025-05-05 21:34:31 +02:00
Jelle van der Waa 60f6d70a29 network: correct argument comments 2025-05-05 19:47:49 +02:00
Jelle van der Waa 5cdec544c7 libsystemd-network: fix typo in argument comment 2025-05-05 19:38:18 +02:00
Mike Yuan 656a7bb1fb hibernate-resume: automatically decrypt dissected swap if told so via autoSwap
With the addition of /dev/disk/by-designator/ along with
ID_DISSECT_PART_DESIGNATOR attr, it is now trivial to tell
whether the swap device we hibernated into is the "auto" one.
Hence use that bit of info and generate cryptsetup unit
in hibernate-resume-generator if that's the case.

Ideally, gpt-auto should really just handle swap already
in initrd, which would save us a myriad of trouble and
the system behaves more consistently. But I don't see that
happening anytime soon. This is the second best option
we have I reckon.

Closes #27247 (#35328, #37330)
2025-05-05 19:37:11 +02:00
Mike Yuan a88ee2c8df sleep: record whether the hibernation device is auto swap (with "swap" designator) 2025-05-05 19:37:10 +02:00
Jelle van der Waa 866a662abe treewide: correct argument comments for sd_notifyf 2025-05-05 19:35:39 +02:00
Jelle van der Waa ff259047d5 shared: fix typo in read_etc_hostname definition 2025-05-05 19:32:52 +02:00
Jelle van der Waa 160159a709 resolve: update argument comments 2025-05-05 19:32:23 +02:00
Mike Yuan 60997a87ef blockdev-util: don't use mixed style of retval in block_device_get_originating
We have two typical styles of 'ret' param assignment + retval:

1) < 0 on actual error, 0 on nothing (ret == NULL), > 0 on something
2) recognizable errno on nothing, < 0 on other errors, >= 0 on something

but never use both at the same time.
2025-05-05 18:39:05 +02:00
Mike Yuan ab2f5407a0 core/cgroup: block_get_originating() doesn't return > 0
Follow-up for 612fc70fc0
2025-05-05 18:39:05 +02:00
Debarshi Ray ab46feb3e2 meson: Ensure that distribution packages own systemenvgeneratordir
Currently, Fedora's systemd RPM doesn't own systemenvgeneratordir
(ie., /usr/lib/systemd/system-environment-generators) [1] because it's
not created when systemd is installed.  In contrast, userenvgeneratordir
(ie., /usr/lib/systemd/user-environment-generators) is created, unless
the environment-d Meson option is explicitly disabled.

While this can be worked around elsewhere, it's better if the upstream
build system created the directories consistently.  It will avoid
repetition, and prevent silly bugs or deviations from creeping in.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=2284085
2025-05-06 00:12:02 +09:00
Daan De Meyer b75c6c3c3f meson: Make sure check-filesystems.sh runs from the build directory
run_command()'s working directory is documented as undefined but it
seems to be the current source directory as when the -ftime-trace
clang option is enabled, -.json is written to src/basic/meson.build
every time meson is run.

Let's make sure the command is executed in the build directory so that
any auxiliary files are written there as well.
2025-05-05 17:09:18 +02:00
Mike Yuan 0777e64ea2 units: two tweaks for socket units (#37309) 2025-05-05 15:13:00 +02:00
Yu Watanabe 11c5eff1cb udev/net: update log message 2025-05-05 22:07:04 +09:00
Yu Watanabe f4282e6a06 udev/net: mention which SR-IOV setting could not be applied in log message 2025-05-05 22:07:04 +09:00
Yu Watanabe fed4da3a19 network/sriov: mention which setting could not be applied in log message 2025-05-05 22:07:04 +09:00
Yu Watanabe d28746ef55 network: make log_link_message_full_errno() take format string 2025-05-05 22:07:04 +09:00
Yu Watanabe 3d026764f1 network/nexthop: split out nexthop_to_string() 2025-05-05 22:07:00 +09:00
Yu Watanabe c6f53cde20 network/route: split out route_to_string() from log_route_debug() 2025-05-05 22:06:19 +09:00
madroach a2bd93c2e8 hwdb: add HP 150 Wired Mouse (#37341) 2025-05-05 21:34:33 +09:00
Alexander Stepchenko 0cf03a36f2 man/systemctl: add preposition for clarity 2025-05-05 13:01:05 +02:00
Tim Small a50fa2a40f man/network: Note .link early boot caveat, and .network .netdev usage.
Document .link .network and .netdev file type distinctions in early
introductory text, and document distro-specific need to sync link files
with early-boot copies, see Debian bug 1005282:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1005282 for an
example.
2025-05-04 12:27:50 +09:00
Yu Watanabe a6619f9678 Vmspawn fixes (#37320)
Fixes
https://github.com/systemd/systemd/pull/36618#issuecomment-2844694845

and 

```
qemu-kvm: -device vmgenid,guid=5f303a47-6fae-4dd7-969c-6c1ea61e816e: 'vmgenid' is not a valid device model name
```
2025-05-04 12:24:04 +09:00
Mike Yuan bad578b145 core: rename core-varlink -> varlink
To make things consistent with dbus.[ch]
2025-05-04 12:22:38 +09:00
Daan De Meyer 5e6dd20a6e Various changes to prepare for running IWYU on the repository (#37319)
These are various commits that were required to get things compiling
after running IWYU. I think all of them make sense on their own, hence
this split PR to merge them ahead of time.
2025-05-02 13:41:31 +02:00
Arian van Putten 10819eb0d5 vmspawn: fix grow_image: Assertion `path' failed.
arg_image might be NULL (e.g. when booting a USI, or when passing -D)
2025-05-02 11:05:06 +02:00
Arian van Putten f17247c701 vmspawn: don't use vmgenid on aarch64 as it's not supported
fixes:

```
qemu-kvm: -device vmgenid,guid=5f303a47-6fae-4dd7-969c-6c1ea61e816e: 'vmgenid' is not a valid device model name
```
2025-05-02 11:05:06 +02:00
Daan De Meyer 7e674d22d3 test: Remove unused sources from tests 2025-05-02 09:41:43 +02:00
Daan De Meyer a0233fcd86 socket-util: Replace sockaddr length macros with functions
There's no need for these to be macros, let's just make them regular
functions instead.
2025-05-02 09:41:41 +02:00
Daan De Meyer 256c4203f9 networkd-network-gperf.gperf: Add various missing includes
We currently include these transitively but to allow using IWYU to
remove headers later, let's add these as direct includes so the IWYU
changes don't break compilation.
2025-05-01 16:58:12 +02:00
Daan De Meyer 95f87834f5 shared: Make sure ip-protocol-xxx.h headers include <netinet/in.h>
These headers use macros from <netinet/in.h> so let's make sure they
include the header.
2025-05-01 16:58:10 +02:00
Daan De Meyer 228e93c5c5 shared: Add blkid-util.c
IWYU analyzes source files and their corresponding header file so
let's add a source file blkid-util.c so blkid-util.h is analyzed as
well.
2025-05-01 14:02:17 +02:00
Daan De Meyer d30d1ed00a basic: Add our own net/if_arp.h header
To avoid conflicts with <linux/if_arp.h>.
2025-05-01 14:02:17 +02:00
Daan De Meyer 792a8bfb8a daemon-util: Rename starting/stopping message constants
Currently, NOTIFY_READY from daemon-util.h conflicts with NOTIFY_READY
from NotifyState from service.h so let's rename the constants to avoid
the conflict.
2025-05-01 14:02:17 +02:00
Daan De Meyer a40f6dd4d8 sd-id128: Use static instead of _SD_ARRAY_STATIC in source files
When compiling the source files, we know static is going to be available
so there's no need to use the macro from _sd-common.h and we can just use
static instead.
2025-05-01 14:02:17 +02:00
Daan De Meyer 194373f313 fundamental: Insert some missing conditional includes
IWYU can't insert these inside the correct condition itself so we
add these manually in a separate commit.
2025-05-01 14:02:17 +02:00
dependabot[bot] 776f8112dc build(deps): bump softprops/action-gh-release from 2.2.1 to 2.2.2
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.2.1 to 2.2.2.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda...da05d552573ad5aba039eaac05058a918a7bf631)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-01 19:34:28 +09:00
dependabot[bot] 4f0d2d2f9a build(deps): bump redhat-plumbers-in-action/gather-pull-request-metadata
Bumps [redhat-plumbers-in-action/gather-pull-request-metadata](https://github.com/redhat-plumbers-in-action/gather-pull-request-metadata) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/redhat-plumbers-in-action/gather-pull-request-metadata/releases)
- [Commits](https://github.com/redhat-plumbers-in-action/gather-pull-request-metadata/compare/17821d3bc27c1efed339595898c2e622accc5a1b...5da2967931dd7c4b9ccd22f49b045e2c1f05165b)

---
updated-dependencies:
- dependency-name: redhat-plumbers-in-action/gather-pull-request-metadata
  dependency-version: 1.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-01 19:34:12 +09:00