1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00
Commit Graph

69976 Commits

Author SHA1 Message Date
Yu Watanabe
83a0417550 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.
2024-01-01 19:29:04 +01:00
Luca Boccassi
86b8b66675
Merge pull request #30591 from yuwata/device-util
device-util: introduce device_in_subsystem() and device_is_devtype() helper functions
2024-01-01 19:26:39 +01:00
Luca Boccassi
9d75598bc4
Merge pull request #30593 from yuwata/sd-dhcp-duid
dhcp: introduce sd_dhcp_duid and relevant functions
2024-01-01 19:24:31 +01:00
Luca Boccassi
e191de6947
Merge pull request #30614 from yuwata/udev-event-take-worker
udev: make UdevEvent take UdevWorker object
2024-01-01 19:18:07 +01:00
Mike Yuan
22a8f00229 utmp-wtmp: check actual value of bool instead of pointer 2024-01-01 19:13:14 +01:00
Mike Yuan
a31222b232 logind: use handle_action_to_string where appropriate
Since 138224fc80, HandleActionData
records the corresponding HandleAction. Let's use it instead of
relying on inhibit_what when mapping to string.
2024-01-01 19:12:44 +01:00
Luca Boccassi
3ea26cb8b2
Merge pull request #30674 from YHNdnzj/bus-wait-for-cleanup
bus-wait-for-{jobs,units}: some cleanups/modernizations
2024-01-01 19:11:46 +01:00
dependabot[bot]
01b50b4aaf 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](407ffafae6...012739e508)

---
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>
2024-01-01 13:52:09 +00:00
dependabot[bot]
f88c9b0728 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](ac9175f8a1...8558fd7429)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-01 13:22:27 +00:00
dependabot[bot]
94ce8e248e 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](0b7f8abb15...c7d193f32e)

---
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>
2024-01-01 13:19:03 +00:00
dependabot[bot]
13efb5cbd3 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>
2024-01-01 13:17:28 +00:00
Mike Yuan
cbdb8732dd
bus-wait-for-units: rearrange function 2024-01-01 18:42:24 +08:00
Mike Yuan
86dea48ddf
bus-wait-for-units: correctly report state if disconnected from bus 2024-01-01 18:42:24 +08:00
Mike Yuan
0ffcc7539b
bus-wait-for-units: rephrase error message 2024-01-01 18:42:24 +08:00
Mike Yuan
a490aa5a2d
bus-wait-for-units: use hashmap_remove_value where appropriate 2024-01-01 18:42:23 +08:00
Mike Yuan
edba11cbd1
bus-wait-for-jobs: remove unneeded strna and refactor code a bit 2024-01-01 18:42:23 +08:00
Mike Yuan
6aac0ff01c
bus-wait-for-jobs: a few modernizations 2024-01-01 18:16:54 +08:00
Mike Yuan
e945d395e2
bus-wait-for-jobs: rephrase error message 2024-01-01 15:58:52 +08:00
Mike Yuan
a8af9745e5
bus-wait-for-jobs: reorganize functions 2024-01-01 15:57:55 +08:00
Mike Yuan
b8f4a205f7
bus-wait-for-jobs: sort includes 2024-01-01 15:45:05 +08:00
Yu Watanabe
2d0be462d6
Merge pull request #30656 from mrc0mmand/dfuzzer-shenanigans
test: avoid starting/stopping unwanted units during fuzzing
2023-12-31 04:52:15 +09:00
Yu Watanabe
73780aa8a3 resolve: DnsTransaction.scope may be NULL when dns_transaction_close_connection() is called
Follow-up for ac1b7b9e19.

Fixes CID#1533020.
2023-12-31 04:51:59 +09:00
Yu Watanabe
d05649ca7d resolve: add several comments for DNS type table
Also update compile time checks.

Follow-up for 818bb6f482.
2023-12-31 04:51:42 +09:00
Yu Watanabe
e6bca18296
Merge pull request #30658 from jnohlgard/udevadm-lock-return-code
udevadm: Propagate return code from verb result
2023-12-31 04:51:09 +09:00
Yu Watanabe
13a30c6dc4 test: add simple coverage tests for 'udevadm lock' 2023-12-30 05:28:04 +09:00
Joakim Nohlgård
ba340e2a75 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>
2023-12-30 05:26:59 +09:00
Frantisek Sumsal
77baca26f5 test: show journal entries matching the test's syslog identifier as well 2023-12-29 21:26:49 +01:00
Frantisek Sumsal
a66031255f 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.
2023-12-29 21:26:49 +01:00
Mike Yuan
6b9cac874c fd-util: don't eat up errors in fd_cloexec_many
Follow-up for ed18c22c98

Before this commit, a successful fd_cloexec() call would
discard all previously gathered errors.
2023-12-29 14:26:40 +01:00
Frantisek Sumsal
bcdb5d4c0b test: wrap adding a suppression in a method 2023-12-29 13:18:15 +01:00
Yu Watanabe
5b201ffb1e 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.
2023-12-29 06:39:06 +09:00
Yu Watanabe
0802e9d8de coccinelle: re-indent comments 2023-12-29 04:14:55 +09:00
Yu Watanabe
a1ccd5eed8 coccinelle: fix typo
Follow-up for b25d3b36a2.
2023-12-29 04:13:45 +09:00
Ronan Pigott
818bb6f482 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.
2023-12-29 04:08:41 +09:00
Yu Watanabe
568fd8a63b
Merge pull request #30649 from YHNdnzj/close-nointr-unnecessary
Some modernization/cleanup for fd-util
2023-12-29 04:03:15 +09:00
Luca Boccassi
aa735b0219 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 2e64cb71b9
2023-12-29 03:14:34 +09:00
A S Alam
c6dcd70a37 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
2023-12-28 16:32:36 +00:00
Mike Yuan
da6c52c57c
various: don't use close_nointr if retval is not checked anyway 2023-12-28 20:44:01 +08:00
Mike Yuan
1189815a6b
logind-session-device: use _cleanup_close_ 2023-12-28 20:43:42 +08:00
Mike Yuan
3760416ee8
shared/async: use safe_close where appropriate 2023-12-28 18:26:52 +08:00
Mike Yuan
1cbd441b09
fdset: use FOREACH_ARRAY at one more place 2023-12-28 18:26:52 +08:00
Mike Yuan
1276e63370
fd-util: modernization 2023-12-28 18:26:52 +08:00
Chris Simons
9ef362bf3d
machinectl: add restart convenience alias (#30625) 2023-12-28 07:09:42 +09:00
Yu Watanabe
1a4b0459f6 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.
2023-12-28 07:08:37 +09:00
Yu Watanabe
3a30d81238
Merge pull request #30643 from bluca/completion
bash completion additions for systemctl/systemd-analyze
2023-12-28 04:10:20 +09:00
Yu Watanabe
9e7cd6bed1
Merge pull request #30641 from YHNdnzj/hibernation-device
Follow-ups for hibernate-util
2023-12-28 04:09:55 +09:00
Yu Watanabe
f1f494f3f8
Merge pull request #30634 from dtardon/docbook-valid-3
DocBook validation fixes (part 3)
2023-12-28 04:06:57 +09:00
Luca Boccassi
cfb912abaf bash completion: add systemd-analyze architectures
Follow-up for fb8cc599ed
2023-12-27 17:52:06 +01:00
Luca Boccassi
5df839e99f analyze: allow --no-legend with architectures verb
It prints a table with a header, allow omitting it

Follow-up for fb8cc599ed
2023-12-27 17:50:07 +01:00
Luca Boccassi
c24c63e946 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.
2023-12-27 17:48:05 +01:00