]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 months agoMerge pull request #30700 from yuwata/storagetm-fixlets
Yu Watanabe [Tue, 2 Jan 2024 23:42:58 +0000 (08:42 +0900)] 
Merge pull request #30700 from yuwata/storagetm-fixlets

storagetm: several trivial fixlets

4 months agonetwork/route: drop TTL propagate support for MPLS routes
Yu Watanabe [Sun, 31 Dec 2023 22:06:58 +0000 (07:06 +0900)] 
network/route: drop TTL propagate support for MPLS routes

This effectively reverts 9b88f20aba6a78baf18d89e99ff31d5ee40856b8.

We do not support MPLS routes, only IPv4 or IPv6 routes are supported.

4 months agonetwork/queue: fix potential double-free on oom
Yu Watanabe [Tue, 2 Jan 2024 19:19:33 +0000 (04:19 +0900)] 
network/queue: fix potential double-free on oom

Currently, link_queue_request_safe(), which is a wrapper of
request_new(), is called with a free function at
- link_request_stacked_netdev() at netdev/netdev.c,
- link_request_address() at networkd-address.c,
- link_request_nexthop() at networkd-nexthop.c,
- link_request_neighbor() at networkd-networkd.c.

For the netdev case, the reference counter of the passed object is increased
only when the function returns 1. So, on failure (with -ENOMEM)
previously we unexpectedly dropped the reference of the NetDev object.
Similarly, for Address and friends, the ownership of the object is moved to the
Request object only when the function returns 1. And on failure, previously
the object was freed twice.

Also, netdev_queue_request(), which is another wrapper of request_new()
potentially leaks memory when the same NetDev object is queued twice.
Fortunately, that should not happen as the function is called only once
per object.

This fixes the above issue, and now the ownership or the reference
counter of the object is changed only when it is succeeded with 1.

4 months agoMerge pull request #30691 from yuwata/resolve-ipv6
Yu Watanabe [Tue, 2 Jan 2024 23:41:14 +0000 (08:41 +0900)] 
Merge pull request #30691 from yuwata/resolve-ipv6

resolve: do not listen to IPv6 when disabled by sysctl

4 months agotest: rewrite test-exec-deserialization.py
Frantisek Sumsal [Tue, 2 Jan 2024 17:27:45 +0000 (18:27 +0100)] 
test: rewrite test-exec-deserialization.py

Rewrite the test in bash and make it part of our integration test suite,
so it's actually executed in all our upstream CI environments.

The original test is flaky in environments where daemon-reload might
occur during the test runtime (e.g. when running the test in parallel
with the systemd-networkd test suite). Also, it was run only in CentOS
CI in limited way (i.e. without sanitizers), since it tests the host's
systemd, instead of the just built one.

Resolves: #29943

4 months agovarious: unexport a few internal structs
Mike Yuan [Tue, 2 Jan 2024 12:27:02 +0000 (20:27 +0800)] 
various: unexport a few internal structs

We don't expose destructors for these internal structs already.
Let's make the struct itself implementation detail too.

4 months agostoragetm: ensure we pass dev_t* to sd_device_get_devnum
Mike Gilbert [Fri, 29 Dec 2023 18:45:26 +0000 (13:45 -0500)] 
storagetm: ensure we pass dev_t* to sd_device_get_devnum

On MIPS32 OABI, st_rdev is unsigned long, not dev_t. Use a temporary
variable to avoid an incompatible pointer.

Bug: https://bugs.gentoo.org/920576
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=21278
Fixes: https://github.com/systemd/systemd/issues/30626
4 months agostoragetm: fix use of wrong stat element 30700/head
Yu Watanabe [Tue, 2 Jan 2024 20:19:00 +0000 (05:19 +0900)] 
storagetm: fix use of wrong stat element

4 months agostoragetm: always hash stat.st_mode
Yu Watanabe [Tue, 2 Jan 2024 20:07:40 +0000 (05:07 +0900)] 
storagetm: always hash stat.st_mode

To make the hash function consistent with the compare function.

4 months agounit: order systemd-resolved after systemd-sysctl 30691/head
Yu Watanabe [Tue, 2 Jan 2024 19:07:11 +0000 (04:07 +0900)] 
unit: order systemd-resolved after systemd-sysctl

Otherwise, IPv6 enable/disable setting may be changed after resolved is
started.

4 months agoresolve: do not listen to IPv6 when disabled by sysctl
Yu Watanabe [Tue, 2 Jan 2024 19:03:25 +0000 (04:03 +0900)] 
resolve: do not listen to IPv6 when disabled by sysctl

Fixes #30669.

4 months agoMerge pull request #30689 from mrc0mmand/even-more-cocci-tweaks
Yu Watanabe [Tue, 2 Jan 2024 18:25:30 +0000 (03:25 +0900)] 
Merge pull request #30689 from mrc0mmand/even-more-cocci-tweaks

coccinelle: drop a couple of FIXMEs

4 months agococcinelle: add a rule for in_addr_hash_func() 30689/head
Frantisek Sumsal [Thu, 28 Dec 2023 17:02:26 +0000 (18:02 +0100)] 
coccinelle: add a rule for in_addr_hash_func()

Follow-up for c01a5c0.

4 months agococcinelle: drop a couple of FIXMEs
Frantisek Sumsal [Thu, 28 Dec 2023 16:12:24 +0000 (17:12 +0100)] 
coccinelle: drop a couple of FIXMEs

Turns out Coccinelle can handle compound literals just fine, the parsing
errors were caused by incorrectly parsed macros in code before the
literals, so let's just provide simplified versions for such macros.

The parsing error in `Type *foo[ELEMENTSOF(bar)] = {};` is actually
harmless; it occurs only when creating an array of pointers for a type
that's in an external header and it occurs only on the first parser's
pass, subsequent passes resolve the type correctly.

Also, unset ENABLE_DEBUG_HASHMAP, so Coccinelle doesn't expand the
hashmap debug macros.

As for the remaining FIXMEs, I opened a couple of issues in the
Coccinelle upstream to see if they can be fixed there (or at least
properly analyzed).

4 months agoMerge pull request #30684 from systemd/update-labeler-configuration
Luca Boccassi [Tue, 2 Jan 2024 12:24:48 +0000 (13:24 +0100)] 
Merge pull request #30684 from systemd/update-labeler-configuration

ci: migrate labeler configuration to the new format

4 months agoci: allow testing changes made to labeler configuration 30684/head
Frantisek Sumsal [Tue, 2 Jan 2024 11:38:09 +0000 (12:38 +0100)] 
ci: allow testing changes made to labeler configuration

4 months agoci: use a boolean value for the boolean field
Frantisek Sumsal [Tue, 2 Jan 2024 11:18:52 +0000 (12:18 +0100)] 
ci: use a boolean value for the boolean field

The issue[0] behind this workaround has been resolved[1], so we can set it
to a proper boolean field.

[0] https://github.com/systemd/systemd/issues/18671
[1] https://github.com/actions/labeler/pull/480

4 months agoci: migrate labeler configuration to the new format
Frantisek Sumsal [Tue, 2 Jan 2024 11:14:41 +0000 (12:14 +0100)] 
ci: migrate labeler configuration to the new format

Turns out updating the labeler action is a bit annoying[0], so the
breaking change wasn't detected in the version bump PR.

[0] https://github.com/actions/labeler/#notes-regarding-pull_request_target-event

Follow-up to f88c9b0728.

4 months agosd-journal: introduce cleanup function and hash ops for Directory
Yu Watanabe [Fri, 8 Dec 2023 07:01:06 +0000 (16:01 +0900)] 
sd-journal: introduce cleanup function and hash ops for Directory

This makes the folloing:
- Each Directory object now has a reference to sd-journal.
- Hence, directory_free(), which is renamed from remove_directory(), can
  be called without sd-journal as an argument.
- Introduces hash ops for Directory, so the finalization becomes
  slightly simpler.
- Allocate hashmaps that store Directory objects when necessary.
- Split out add_directory_impl().

No functional changes, just refactoring.

4 months agoMerge pull request #30591 from yuwata/device-util
Luca Boccassi [Mon, 1 Jan 2024 18:26:39 +0000 (19:26 +0100)] 
Merge pull request #30591 from yuwata/device-util

device-util: introduce device_in_subsystem() and device_is_devtype() helper functions

4 months agoMerge pull request #30593 from yuwata/sd-dhcp-duid
Luca Boccassi [Mon, 1 Jan 2024 18:24:31 +0000 (19:24 +0100)] 
Merge pull request #30593 from yuwata/sd-dhcp-duid

dhcp: introduce sd_dhcp_duid and relevant functions

4 months agoMerge pull request #30614 from yuwata/udev-event-take-worker
Luca Boccassi [Mon, 1 Jan 2024 18:18:07 +0000 (19:18 +0100)] 
Merge pull request #30614 from yuwata/udev-event-take-worker

udev: make UdevEvent take UdevWorker object

4 months agoutmp-wtmp: check actual value of bool instead of pointer
Mike Yuan [Mon, 1 Jan 2024 12:41:18 +0000 (20:41 +0800)] 
utmp-wtmp: check actual value of bool instead of pointer

4 months agologind: use handle_action_to_string where appropriate
Mike Yuan [Mon, 1 Jan 2024 12:08:11 +0000 (20:08 +0800)] 
logind: use handle_action_to_string where appropriate

Since 138224fc807091d31f19a3b22f066d6044626001, HandleActionData
records the corresponding HandleAction. Let's use it instead of
relying on inhibit_what when mapping to string.

4 months agoMerge pull request #30674 from YHNdnzj/bus-wait-for-cleanup
Luca Boccassi [Mon, 1 Jan 2024 18:11:46 +0000 (19:11 +0100)] 
Merge pull request #30674 from YHNdnzj/bus-wait-for-cleanup

bus-wait-for-{jobs,units}: some cleanups/modernizations

4 months agobuild(deps): bump github/codeql-action from 2.22.8 to 3.22.12
dependabot[bot] [Mon, 1 Jan 2024 09:40:32 +0000 (09:40 +0000)] 
build(deps): bump github/codeql-action from 2.22.8 to 3.22.12

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.22.8 to 3.22.12.
- [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/407ffafae6a767df3e0230c3df91b6443ae8df75...012739e5082ff0c22ca6d6ab32e07c36df03c4a4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
4 months agobuild(deps): bump actions/labeler from 4.3.0 to 5.0.0
dependabot[bot] [Mon, 1 Jan 2024 09:40:40 +0000 (09:40 +0000)] 
build(deps): bump actions/labeler from 4.3.0 to 5.0.0

Bumps [actions/labeler](https://github.com/actions/labeler) from 4.3.0 to 5.0.0.
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](https://github.com/actions/labeler/compare/ac9175f8a1f3625fd0d4fb234536d26811351594...8558fd74291d67161a8a78ce36a881fa63b766a9)

---
updated-dependencies:
- dependency-name: actions/labeler
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
4 months agobuild(deps): bump actions/upload-artifact from 3.1.2 to 4.0.0
dependabot[bot] [Mon, 1 Jan 2024 09:40:19 +0000 (09:40 +0000)] 
build(deps): bump actions/upload-artifact from 3.1.2 to 4.0.0

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.2 to 4.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/0b7f8abb1508181956e8e162db84b466c27e18ce...c7d193f32edcb7bfad88892161225aeda64e9392)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
4 months agobuild(deps): bump meson from 1.3.0 to 1.3.1 in /.github/workflows
dependabot[bot] [Mon, 1 Jan 2024 09:14:26 +0000 (09:14 +0000)] 
build(deps): bump meson from 1.3.0 to 1.3.1 in /.github/workflows

Bumps [meson](https://github.com/mesonbuild/meson) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/mesonbuild/meson/releases)
- [Commits](https://github.com/mesonbuild/meson/compare/1.3.0...1.3.1)

---
updated-dependencies:
- dependency-name: meson
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
4 months agobus-wait-for-units: rearrange function 30674/head
Mike Yuan [Mon, 1 Jan 2024 09:52:35 +0000 (17:52 +0800)] 
bus-wait-for-units: rearrange function

4 months agobus-wait-for-units: correctly report state if disconnected from bus
Mike Yuan [Mon, 1 Jan 2024 09:19:35 +0000 (17:19 +0800)] 
bus-wait-for-units: correctly report state if disconnected from bus

4 months agobus-wait-for-units: rephrase error message
Mike Yuan [Mon, 1 Jan 2024 09:16:11 +0000 (17:16 +0800)] 
bus-wait-for-units: rephrase error message

4 months agobus-wait-for-units: use hashmap_remove_value where appropriate
Mike Yuan [Mon, 1 Jan 2024 09:15:23 +0000 (17:15 +0800)] 
bus-wait-for-units: use hashmap_remove_value where appropriate

4 months agobus-wait-for-jobs: remove unneeded strna and refactor code a bit
Mike Yuan [Mon, 1 Jan 2024 10:32:01 +0000 (18:32 +0800)] 
bus-wait-for-jobs: remove unneeded strna and refactor code a bit

4 months agobus-wait-for-jobs: a few modernizations
Mike Yuan [Mon, 1 Jan 2024 08:07:46 +0000 (16:07 +0800)] 
bus-wait-for-jobs: a few modernizations

4 months agobus-wait-for-jobs: rephrase error message
Mike Yuan [Mon, 1 Jan 2024 07:58:52 +0000 (15:58 +0800)] 
bus-wait-for-jobs: rephrase error message

4 months agobus-wait-for-jobs: reorganize functions
Mike Yuan [Mon, 1 Jan 2024 07:57:55 +0000 (15:57 +0800)] 
bus-wait-for-jobs: reorganize functions

4 months agobus-wait-for-jobs: sort includes
Mike Yuan [Mon, 1 Jan 2024 07:45:05 +0000 (15:45 +0800)] 
bus-wait-for-jobs: sort includes

4 months agoMerge pull request #30656 from mrc0mmand/dfuzzer-shenanigans
Yu Watanabe [Sat, 30 Dec 2023 19:52:15 +0000 (04:52 +0900)] 
Merge pull request #30656 from mrc0mmand/dfuzzer-shenanigans

test: avoid starting/stopping unwanted units during fuzzing

4 months agoresolve: DnsTransaction.scope may be NULL when dns_transaction_close_connection(...
Yu Watanabe [Fri, 29 Dec 2023 20:35:32 +0000 (05:35 +0900)] 
resolve: DnsTransaction.scope may be NULL when dns_transaction_close_connection() is called

Follow-up for ac1b7b9e1933c14bc7bf36d4f32a888afb3f2f4d.

Fixes CID#1533020.

4 months agoresolve: add several comments for DNS type table
Yu Watanabe [Fri, 29 Dec 2023 21:05:32 +0000 (06:05 +0900)] 
resolve: add several comments for DNS type table

Also update compile time checks.

Follow-up for 818bb6f4825b57c2cd2783fbffe2b2ef82a31573.

4 months agoMerge pull request #30658 from jnohlgard/udevadm-lock-return-code
Yu Watanabe [Sat, 30 Dec 2023 19:51:09 +0000 (04:51 +0900)] 
Merge pull request #30658 from jnohlgard/udevadm-lock-return-code

udevadm: Propagate return code from verb result

4 months agotest: add simple coverage tests for 'udevadm lock' 30658/head
Yu Watanabe [Fri, 29 Dec 2023 17:51:50 +0000 (02:51 +0900)] 
test: add simple coverage tests for 'udevadm lock'

4 months agoudevadm: Propagate return code from verb result
Joakim Nohlgård [Fri, 29 Dec 2023 14:06:50 +0000 (15:06 +0100)] 
udevadm: Propagate return code from verb result

udevadm lock did not propagate the return code from the child process
because all positive values were treated as success.

v2:
Now 'udevadm test-builtin' ignores all positive return values from the
builtin commands. Otherwise, as the hwdb builtin returns an positive value
when a matching entry found, 'udevadm test-builtin hwdb' will fail.

v3:
Initialize partition table before calling 'sfdisk --delete'.

Co-authored-by: Yu Watanabe <watanabe.yu+github@gmail.com>
4 months agotest: show journal entries matching the test's syslog identifier as well 30656/head
Frantisek Sumsal [Fri, 29 Dec 2023 12:28:05 +0000 (13:28 +0100)] 
test: show journal entries matching the test's syslog identifier as well

4 months agotest: avoid starting/stopping unwanted units during fuzzing
Frantisek Sumsal [Thu, 28 Dec 2023 22:42:47 +0000 (23:42 +0100)] 
test: avoid starting/stopping unwanted units during fuzzing

Skip calling start and stop methods on unit objects, as doing that is
not only time consuming, but it also starts/stops units that interfere
with the machine state. The actual code paths should be covered (to some
degree) by the respective method counterparts on the manager object.

4 months agofd-util: don't eat up errors in fd_cloexec_many
Mike Yuan [Fri, 29 Dec 2023 09:57:59 +0000 (17:57 +0800)] 
fd-util: don't eat up errors in fd_cloexec_many

Follow-up for ed18c22c989495aab36512f03449222cfcf79aa7

Before this commit, a successful fd_cloexec() call would
discard all previously gathered errors.

4 months agotest: wrap adding a suppression in a method
Frantisek Sumsal [Thu, 28 Dec 2023 22:15:42 +0000 (23:15 +0100)] 
test: wrap adding a suppression in a method

4 months agosd-journal: check sd-event state before setting up post change timer
Yu Watanabe [Thu, 28 Dec 2023 19:31:21 +0000 (04:31 +0900)] 
sd-journal: check sd-event state before setting up post change timer

The similar check already exists in schedule_post_change().

The function is currently called at two places.
- journal_file_open() in sd-journal:
  In this case, if the timer is not set up, then journal_file_post_change()
  will be called at the end of journal_file_append_entry(). So, the necessary
  task will be done sequentially when an journal entry is stored to the opened
  journal file. That is desired when the function is called at outside of the
  event loop.
- server_open_journal() in journald:
  This is not called after we exit the event loop.

So, we can safely do nothing in the function if the event loop is being
finished or already finished.

Fixes #30644.

4 months agococcinelle: re-indent comments
Yu Watanabe [Thu, 28 Dec 2023 19:14:55 +0000 (04:14 +0900)] 
coccinelle: re-indent comments

4 months agococcinelle: fix typo
Yu Watanabe [Thu, 28 Dec 2023 19:13:42 +0000 (04:13 +0900)] 
coccinelle: fix typo

Follow-up for b25d3b36a21cd7a68039b85f887cc849ff7664a1.

4 months agodns: update record type enum to match iana
Ronan Pigott [Thu, 28 Dec 2023 01:27:00 +0000 (18:27 -0700)] 
dns: update record type enum to match iana

Adds some new dns record types. Also, some types were inserted into the
middle of the enum — this corrects an error where the enum constants for
some of the record types previously held an incorrect value.

4 months agoMerge pull request #30649 from YHNdnzj/close-nointr-unnecessary
Yu Watanabe [Thu, 28 Dec 2023 19:03:15 +0000 (04:03 +0900)] 
Merge pull request #30649 from YHNdnzj/close-nointr-unnecessary

Some modernization/cleanup for fd-util

4 months agounits: add ConditionSecurity=tpm2 to systemd-tpm2-setup units
Luca Boccassi [Thu, 28 Dec 2023 16:32:06 +0000 (17:32 +0100)] 
units: add ConditionSecurity=tpm2 to systemd-tpm2-setup units

ConditionSecurity=measured-uki can be true even with TPM 1.2 which we
don't support, so add an explicit check for TPM 2.0.

Fixes https://github.com/systemd/systemd/issues/30650

Follow-up for 2e64cb71b9c0160c3

4 months agopo: Translated using Weblate (Punjabi)
A S Alam [Thu, 28 Dec 2023 15:36:26 +0000 (16:36 +0100)] 
po: Translated using Weblate (Punjabi)

Currently translated at 26.4% (60 of 227 strings)

Co-authored-by: A S Alam <aalam@users.noreply.translate.fedoraproject.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/pa/
Translation: systemd/main

4 months agovarious: don't use close_nointr if retval is not checked anyway 30649/head
Mike Yuan [Thu, 28 Dec 2023 10:13:37 +0000 (18:13 +0800)] 
various: don't use close_nointr if retval is not checked anyway

4 months agologind-session-device: use _cleanup_close_
Mike Yuan [Thu, 28 Dec 2023 12:43:12 +0000 (20:43 +0800)] 
logind-session-device: use _cleanup_close_

4 months agoshared/async: use safe_close where appropriate
Mike Yuan [Thu, 28 Dec 2023 10:05:33 +0000 (18:05 +0800)] 
shared/async: use safe_close where appropriate

4 months agofdset: use FOREACH_ARRAY at one more place
Mike Yuan [Thu, 28 Dec 2023 10:07:12 +0000 (18:07 +0800)] 
fdset: use FOREACH_ARRAY at one more place

4 months agofd-util: modernization
Mike Yuan [Thu, 28 Dec 2023 10:17:52 +0000 (18:17 +0800)] 
fd-util: modernization

4 months agomachinectl: add `restart` convenience alias (#30625)
Chris Simons [Wed, 27 Dec 2023 22:09:42 +0000 (14:09 -0800)] 
machinectl: add `restart` convenience alias (#30625)

4 months agonetwork/address: unconditionally check if address is ready
Yu Watanabe [Tue, 26 Dec 2023 02:04:20 +0000 (11:04 +0900)] 
network/address: unconditionally check if address is ready

Previously, we checked if the address is ready only when it is an IPv6
address. But, IPv4 address never enter tentative state, hence the check
for an IPv4 address is effectively equivalent to the one for IPv6.
So, let's unify the check. This does not change any effective behavior.

4 months agoMerge pull request #30643 from bluca/completion
Yu Watanabe [Wed, 27 Dec 2023 19:10:20 +0000 (04:10 +0900)] 
Merge pull request #30643 from bluca/completion

bash completion additions for systemctl/systemd-analyze

4 months agoMerge pull request #30641 from YHNdnzj/hibernation-device
Yu Watanabe [Wed, 27 Dec 2023 19:09:55 +0000 (04:09 +0900)] 
Merge pull request #30641 from YHNdnzj/hibernation-device

Follow-ups for hibernate-util

4 months agoMerge pull request #30634 from dtardon/docbook-valid-3
Yu Watanabe [Wed, 27 Dec 2023 19:06:57 +0000 (04:06 +0900)] 
Merge pull request #30634 from dtardon/docbook-valid-3

DocBook validation fixes (part 3)

4 months agobash completion: add systemd-analyze architectures 30643/head
Luca Boccassi [Wed, 27 Dec 2023 16:50:36 +0000 (17:50 +0100)] 
bash completion: add systemd-analyze architectures

Follow-up for fb8cc599ed863502d67

4 months agoanalyze: allow --no-legend with architectures verb
Luca Boccassi [Wed, 27 Dec 2023 16:49:17 +0000 (17:49 +0100)] 
analyze: allow --no-legend with architectures verb

It prints a table with a header, allow omitting it

Follow-up for fb8cc599ed863502d67

4 months agobash completion: make systemctl mount-image/bind autocomplete on active services
Luca Boccassi [Wed, 27 Dec 2023 16:48:05 +0000 (17:48 +0100)] 
bash completion: make systemctl mount-image/bind autocomplete on active services

The verb works only on running service units, so complete on that as the first
parameter, and a local file as the second. The other parameters are inside the
service namespace so we can't autocomplete from the outside, return early.

4 months agobash completion: add systemctl service-log-level/target
Luca Boccassi [Wed, 27 Dec 2023 15:59:03 +0000 (16:59 +0100)] 
bash completion: add systemctl service-log-level/target

4 months agosleep: don't log duplicate error 30641/head
Mike Yuan [Wed, 27 Dec 2023 14:31:57 +0000 (22:31 +0800)] 
sleep: don't log duplicate error

write_resume_config() logs error on its own.

4 months agohibernate-util: remove unused code
Mike Yuan [Wed, 27 Dec 2023 14:22:21 +0000 (22:22 +0800)] 
hibernate-util: remove unused code

All callers of write_resume_config() pass non-NULL device.

4 months agohibernate-util: make sure we use blockdev path for HibernationDevice.path
Mike Yuan [Wed, 27 Dec 2023 14:19:07 +0000 (22:19 +0800)] 
hibernate-util: make sure we use blockdev path for HibernationDevice.path

Before this commit, this field could spuriously contain the path of the
swapfile.

4 months agoMerge pull request #30639 from mrc0mmand/more-cocci-shenanigans
Yu Watanabe [Wed, 27 Dec 2023 11:33:46 +0000 (20:33 +0900)] 
Merge pull request #30639 from mrc0mmand/more-cocci-shenanigans

Another batch of Coccinelle tweaks

4 months agotpm2-util: declare the cleanup attribute first 30639/head
Frantisek Sumsal [Tue, 26 Dec 2023 20:24:14 +0000 (21:24 +0100)] 
tpm2-util: declare the cleanup attribute first

As we do everywhere else (apart from it being incosistent, the switched
order also makes Coccinelle unhappy).

4 months agobootctl: add a missing space
Frantisek Sumsal [Tue, 26 Dec 2023 20:23:55 +0000 (21:23 +0100)] 
bootctl: add a missing space

4 months agotest: use timestamp_is_set()
Frantisek Sumsal [Tue, 26 Dec 2023 19:23:19 +0000 (20:23 +0100)] 
test: use timestamp_is_set()

4 months agotest: use set_isempty() in one more place
Frantisek Sumsal [Tue, 26 Dec 2023 19:22:53 +0000 (20:22 +0100)] 
test: use set_isempty() in one more place

4 months agotest: use IN_SET()/ERRNO_IS_NEG_*() more
Frantisek Sumsal [Tue, 26 Dec 2023 19:21:48 +0000 (20:21 +0100)] 
test: use IN_SET()/ERRNO_IS_NEG_*() more

4 months agotree-wide: use IN_SET() more
Frantisek Sumsal [Tue, 26 Dec 2023 19:20:51 +0000 (20:20 +0100)] 
tree-wide: use IN_SET() more

4 months agococcinelle: dial back warnings about performance
Frantisek Sumsal [Tue, 26 Dec 2023 18:39:12 +0000 (19:39 +0100)] 
coccinelle: dial back warnings about performance

Turns out I _really_ underestimated the impact of
--include-headers-for-types, as it significantly reduces both runtime
and storage penalties. For example, on my machine the runtime of
uncached run goes down from ~15 minutes to ~2 minutes, and similarly the
total storage needed by the cache goes from ~15 GiB down to ~3 GiB.

4 months agococcinelle: help Coccinelle with some more complex macros
Frantisek Sumsal [Tue, 26 Dec 2023 17:55:31 +0000 (18:55 +0100)] 
coccinelle: help Coccinelle with some more complex macros

Drop the original macro file, since it's not needed anymore thanks to
resolving includes properly, but introduce a similar file -
parsing_hacks.h - that helps Coccinelle in some specific corner cases.

This eliminates most of the outstanding parsing errors in source files.
The remaining ones are limitations of the parsing engine (see the FIXMEs
in pasing_hacks.h) and need further investigation.

4 months agococcinelle: search the system include path for header files as well
Frantisek Sumsal [Tue, 26 Dec 2023 17:44:21 +0000 (18:44 +0100)] 
coccinelle: search the system include path for header files as well

Since Coccinelle is originally a kernel tool, it doesn't search the
system include path by default for header files. Without this we're
missing a lot of types provides by stdlib (and other libraries we make
use of).

4 months agoMerge pull request #30631 from yuwata/network-address-free
Luca Boccassi [Tue, 26 Dec 2023 18:21:15 +0000 (19:21 +0100)] 
Merge pull request #30631 from yuwata/network-address-free

network/address: tiny cleanups for address_free()

4 months agosleep: connect to correct bus when locking homed-managed homes
Mike Yuan [Tue, 26 Dec 2023 12:38:47 +0000 (20:38 +0800)] 
sleep: connect to correct bus when locking homed-managed homes

Partially reverts 122f6f1eaa4447449c7054793f6497eb9e4d03c6

Fixes https://github.com/systemd/systemd/issues/29938#issuecomment-1869508708

4 months agoman: rewrite as <group> 30634/head
David Tardon [Mon, 25 Dec 2023 16:41:18 +0000 (17:41 +0100)] 
man: rewrite as <group>

4 months agoman: fix markup
David Tardon [Sat, 23 Dec 2023 16:34:30 +0000 (17:34 +0100)] 
man: fix markup

<arg> is not allowed inside <title>.

4 months agoman: move </variablelist> to the right place
David Tardon [Mon, 25 Dec 2023 16:43:09 +0000 (17:43 +0100)] 
man: move </variablelist> to the right place

4 months agoman: fix <cmdsynopsis> content
David Tardon [Mon, 25 Dec 2023 15:49:11 +0000 (16:49 +0100)] 
man: fix <cmdsynopsis> content

Inline text is not allowed.

4 months agoman: fix markup
David Tardon [Mon, 25 Dec 2023 15:38:08 +0000 (16:38 +0100)] 
man: fix markup

<option> is not allowed in <cmdsynopsis>.

4 months agoman: restrict <command> to the actual command
David Tardon [Mon, 25 Dec 2023 14:42:34 +0000 (15:42 +0100)] 
man: restrict <command> to the actual command

4 months agoman: move macro decls. out of <funcsynopsis>
David Tardon [Sun, 24 Dec 2023 10:08:40 +0000 (11:08 +0100)] 
man: move macro decls. out of <funcsynopsis>

<funcsynopsis> doesn't allow block content.

4 months agoman: fix markup
David Tardon [Sat, 23 Dec 2023 16:34:30 +0000 (17:34 +0100)] 
man: fix markup

<arg> is not allowed inside <term>.

4 months agococcinelle: explicitly undefine SD_BOOT
Frantisek Sumsal [Mon, 25 Dec 2023 23:41:40 +0000 (00:41 +0100)] 
coccinelle: explicitly undefine SD_BOOT

So Coccinelle doesn't pull in includes guarded by #if SD_BOOT.

For example:

$ head -n5 main.c
 #if FOO
 #include "foo.h"
 #else
 #include "bar.h"
 #endif

$ spatch --verbose-includes --recursive-includes --sp-file zz-drop-braces.cocci main.c
init_defs_builtins: /usr/lib64/coccinelle/standard.h
HANDLING: main.c
including ./foo.h
including ./bar.h

$ spatch --verbose-includes --recursive-includes --sp-file zz-drop-braces.cocci main.c --undefined FOO
init_defs_builtins: /usr/lib64/coccinelle/standard.h
HANDLING: main.c
including ./bar.h

4 months agoman: fix indentation
David Tardon [Tue, 26 Dec 2023 07:59:53 +0000 (08:59 +0100)] 
man: fix indentation

4 months agococcinelle: fix typo
Yu Watanabe [Tue, 26 Dec 2023 00:43:21 +0000 (09:43 +0900)] 
coccinelle: fix typo

4 months agohwdb: Add override for headset form-factor for the Corsair Void Elite
Stuart Hayhurst [Mon, 25 Dec 2023 20:39:00 +0000 (20:39 +0000)] 
hwdb: Add override for headset form-factor for the Corsair Void Elite

Earlier versions of the headset had 'Headset' in the product name.
This version uses 'Dongle' instead, so it doesn't get given a form-factor.

4 months agoMerge pull request #30633 from mrc0mmand/cocci-shenanigans
Yu Watanabe [Mon, 25 Dec 2023 20:45:58 +0000 (05:45 +0900)] 
Merge pull request #30633 from mrc0mmand/cocci-shenanigans

coccinelle: rework how we run the Coccinelle transformations

4 months agosystemctl: use SYNTHETIC_ERRNO() 30633/head
Frantisek Sumsal [Mon, 25 Dec 2023 18:51:43 +0000 (19:51 +0100)] 
systemctl: use SYNTHETIC_ERRNO()

4 months agomodules-load: simplify OOM check
Frantisek Sumsal [Mon, 25 Dec 2023 17:12:59 +0000 (18:12 +0100)] 
modules-load: simplify OOM check

4 months agosd-bus: drop unnecessary braces
Frantisek Sumsal [Mon, 25 Dec 2023 12:32:16 +0000 (13:32 +0100)] 
sd-bus: drop unnecessary braces