]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
18 months agomkosi: Install various system users/groups in opensuse images 32386/head
Daan De Meyer [Sun, 21 Apr 2024 19:37:39 +0000 (21:37 +0200)] 
mkosi: Install various system users/groups in opensuse images

These don't get pulled in automatically and there doesn't seem to
be a "system-users" package so install the ones we need for the
integration tests manually.

18 months agomkosi: Backport Fedora basic users/groups sysusers files to CentOS
Daan De Meyer [Sun, 21 Apr 2024 18:49:14 +0000 (20:49 +0200)] 
mkosi: Backport Fedora basic users/groups sysusers files to CentOS

CentOS does not ship these sysusers dropins which set up basic system
users and groups. Until we can move to CentOS Stream 10, let's add the
dropins ourselves to make sure the base system users/groups are available
on CentOS.

18 months agomkosi: Install procps-ng in all images
Daan De Meyer [Sat, 20 Apr 2024 13:55:34 +0000 (15:55 +0200)] 
mkosi: Install procps-ng in all images

Required for TEST-01-BASIC.

18 months agomkosi: Make sure systemd-libs is updated on Arch
Daan De Meyer [Sat, 20 Apr 2024 12:22:27 +0000 (14:22 +0200)] 
mkosi: Make sure systemd-libs is updated on Arch

The Arch Linux PKGBUILD does not (yet) have versioned dependencies
between the systemd packages, causing systemd-libs to not get updated
to 256-devel if systemd 256-devel is installed. Let's explicitly install
the newer version of systemd-libs as well for now until this problem is
fixed.

18 months agomkosi: Make sure ping is installed
Daan De Meyer [Sat, 20 Apr 2024 11:28:35 +0000 (13:28 +0200)] 
mkosi: Make sure ping is installed

Required for test-bpf-firewall.

18 months agomkosi: Disable rpm package notes
Daan De Meyer [Sat, 20 Apr 2024 07:43:14 +0000 (09:43 +0200)] 
mkosi: Disable rpm package notes

This introduces dependencies on various environment variables set
by rpmbuild which will not be set when rerunning meson inside the
VM/container so let's disable package notes to avoid these dependencies,
as the package notes aren't terribly useful in this scenario anyway.

18 months agomkosi: Make sure serial console line wrapping is re-enabled
Daan De Meyer [Fri, 19 Apr 2024 20:06:26 +0000 (22:06 +0200)] 
mkosi: Make sure serial console line wrapping is re-enabled

18 months agomkosi: Update to latest
Daan De Meyer [Sat, 20 Apr 2024 10:29:48 +0000 (12:29 +0200)] 
mkosi: Update to latest

18 months agoMerge pull request #32372 from yuwata/sd-radv-trivial-cleanups
Luca Boccassi [Sat, 20 Apr 2024 13:24:02 +0000 (15:24 +0200)] 
Merge pull request #32372 from yuwata/sd-radv-trivial-cleanups

sd-radv: several trivial cleanups

18 months agoNEWS: fix typo
Luca Boccassi [Sat, 20 Apr 2024 13:09:48 +0000 (14:09 +0100)] 
NEWS: fix typo

18 months agoMerge pull request #32370 from YHNdnzj/vpick-check-early
Mike Yuan [Sat, 20 Apr 2024 13:02:37 +0000 (21:02 +0800)] 
Merge pull request #32370 from YHNdnzj/vpick-check-early

shared/vpick: some minor cleanups

18 months agoMerge pull request #32359 from poettering/vmspawn-hyperv-enlight
Luca Boccassi [Sat, 20 Apr 2024 12:40:14 +0000 (14:40 +0200)] 
Merge pull request #32359 from poettering/vmspawn-hyperv-enlight

some hyperv related enhancement in detect-virt + vmspawn

18 months agoci: fix systemd-machined component name
Frantisek Sumsal [Sat, 20 Apr 2024 11:52:22 +0000 (13:52 +0200)] 
ci: fix systemd-machined component name

Follow-up for d762f4d52d31c8eb6a6a7e517f107dfe8d443ee8.

18 months agoMerge pull request #32276 from yuwata/network-global-use-domains-setting
Luca Boccassi [Sat, 20 Apr 2024 11:30:00 +0000 (13:30 +0200)] 
Merge pull request #32276 from yuwata/network-global-use-domains-setting

network: introduce protocol-independent UseDomains= setting

18 months agosd-journal: downgrade log message "Unused data (entry_offset==0)"
Yu Watanabe [Sat, 20 Apr 2024 06:20:29 +0000 (15:20 +0900)] 
sd-journal: downgrade log message "Unused data (entry_offset==0)"

This happens when journal is rotated after a data is written but before
an entry that linked to the data is not written yet.
This is neither data corruption, nor program error. Let's downgrade the
log level.

Closes #32153.

18 months agotest: add test case for sd_journal_{get,seek,test}_cursor()
Yu Watanabe [Sat, 20 Apr 2024 06:42:42 +0000 (15:42 +0900)] 
test: add test case for sd_journal_{get,seek,test}_cursor()

For issue #31516.

18 months agoupdate NEWS 32359/head
Lennart Poettering [Sat, 20 Apr 2024 10:09:54 +0000 (12:09 +0200)] 
update NEWS

18 months agoupdate TODO
Lennart Poettering [Fri, 19 Apr 2024 12:59:37 +0000 (14:59 +0200)] 
update TODO

18 months agovmspawn: enable vmgenid for all VMs
Lennart Poettering [Fri, 19 Apr 2024 12:54:12 +0000 (14:54 +0200)] 
vmspawn: enable vmgenid for all VMs

This passes an ID derived from the vmgenid down to all VMs. This is
useful to have an identifier for this VM generation id. We derive it
from the invocation ID, if we have one, otherwise we randomize it.

Eventually we should make use of the vmgenid changing to re-acquire MAC
addresses, DHCP leases as such. Let's for now enable the VMM side of the
concept as first step towards that.

18 months agosd-id128: add an app-specific flavour of the invocation ID too
Lennart Poettering [Fri, 19 Apr 2024 12:47:28 +0000 (14:47 +0200)] 
sd-id128: add an app-specific flavour of the invocation ID too

18 months agovmspawn: add env var that can extend the qemu cmdline
Lennart Poettering [Fri, 19 Apr 2024 12:41:43 +0000 (14:41 +0200)] 
vmspawn: add env var that can extend the qemu cmdline

This is a bit hackish, but really useful sometimes to play around with
some qemu switches.

18 months agovmspawn: enable hyperv enlightenments
Lennart Poettering [Fri, 19 Apr 2024 11:38:38 +0000 (13:38 +0200)] 
vmspawn: enable hyperv enlightenments

THese are generally recommended (and libvirt/gnome-boxes default to them
hence). They are mostly relevant for Windows, but I think it makes sense
to enable them anyway for Linux too, simply to excercise #28001, and
they shouldn't hurt.

18 months agodetect-virt: detect hyperv-enlightened qemu as qemu, not as hyperv
Lennart Poettering [Fri, 19 Apr 2024 11:25:55 +0000 (13:25 +0200)] 
detect-virt: detect hyperv-enlightened qemu as qemu, not as hyperv

CPUID reporting hyperv should be taken with a grain of salt, and we
should prefer other mechanisms then.

Fixes: #28001
18 months agosd-event: fix sd_event_source_get_inotify_path()
Yu Watanabe [Sat, 20 Apr 2024 04:20:46 +0000 (13:20 +0900)] 
sd-event: fix sd_event_source_get_inotify_path()

Follow-ups for 74c4231ce5f6cddabc2500391a8d5fd69e89b79e.

Previously, the path is obtained from the fd, but it is closed in
sd_event_loop() to unpin the filesystem.
So, let's save the path when the event source is created, and make
sd_event_source_get_inotify_path() simply read it.

18 months agoReplaced "machined" label with "machine" #32373
Sarvajith Adyanthaya [Sat, 20 Apr 2024 07:34:12 +0000 (13:04 +0530)] 
Replaced "machined" label with "machine" #32373

18 months agopo: Translated using Weblate (Indonesian)
Andika Triwidada [Sat, 20 Apr 2024 07:36:08 +0000 (09:36 +0200)] 
po: Translated using Weblate (Indonesian)

Currently translated at 100.0% (233 of 233 strings)

Co-authored-by: Andika Triwidada <andika@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/id/
Translation: systemd/main

18 months agonetwork/radv: sd-radv allows to update MAC address without stopping 32372/head
Yu Watanabe [Tue, 16 Apr 2024 02:22:00 +0000 (11:22 +0900)] 
network/radv: sd-radv allows to update MAC address without stopping

18 months agosd-radv: use sd_radv_is_running()
Yu Watanabe [Sat, 20 Apr 2024 05:51:20 +0000 (14:51 +0900)] 
sd-radv: use sd_radv_is_running()

This also drops several unnecessary conditions for checking sd-radv is running
or not in setting options, e.g. home agent or mac address.

18 months agosd-radv: shorten enumerated type definition
Yu Watanabe [Sat, 20 Apr 2024 05:47:04 +0000 (14:47 +0900)] 
sd-radv: shorten enumerated type definition

18 months agotest-network: add test for global UseDomains= setting 32276/head
Yu Watanabe [Mon, 15 Apr 2024 05:10:09 +0000 (14:10 +0900)] 
test-network: add test for global UseDomains= setting

18 months agonetwork: introduce network- and protocol-independent default for UseDomains=
Yu Watanabe [Mon, 15 Apr 2024 05:55:18 +0000 (14:55 +0900)] 
network: introduce network- and protocol-independent default for UseDomains=

Follow-up for fb573007430ab0dbe45517b58837d2fa5cfa1a48.

Prompted by #32273.

18 months agotimedate: handle gracefully if RTC lost time because of power loss
Lennart Poettering [Fri, 19 Apr 2024 17:20:40 +0000 (19:20 +0200)] 
timedate: handle gracefully if RTC lost time because of power loss

Apparently some RTC drivers return EINVAL in that case when we try to
read it. Handle that reasonably gracefully.

Fixes: #31854
18 months agoshared/vpick: check deterministic suffix earlier 32370/head
Mike Yuan [Fri, 19 Apr 2024 23:17:04 +0000 (07:17 +0800)] 
shared/vpick: check deterministic suffix earlier

Follow-up for 421a4ba7e4a26332c271359a7a114a1da7a2afad

18 months agoshared/vpick: flatten errno check
Mike Yuan [Fri, 19 Apr 2024 23:16:24 +0000 (07:16 +0800)] 
shared/vpick: flatten errno check

18 months agoshared/vpick: use strdup_to where appropriate
Mike Yuan [Fri, 19 Apr 2024 23:16:00 +0000 (07:16 +0800)] 
shared/vpick: use strdup_to where appropriate

18 months agoMerge pull request #31872 from tfg13/main
Lennart Poettering [Fri, 19 Apr 2024 21:59:13 +0000 (23:59 +0200)] 
Merge pull request #31872 from tfg13/main

stub+ukify: Add support for UKI .ucode section

18 months agoMerge pull request #31889 from aplanas/fix_pcrlock_stdin
Lennart Poettering [Fri, 19 Apr 2024 21:57:28 +0000 (23:57 +0200)] 
Merge pull request #31889 from aplanas/fix_pcrlock_stdin

pcrlock: support measurement of big files

18 months agoMerge pull request #32346 from yuwata/sd-radv-handle-header-param-gracefully
Luca Boccassi [Fri, 19 Apr 2024 19:14:21 +0000 (21:14 +0200)] 
Merge pull request #32346 from yuwata/sd-radv-handle-header-param-gracefully

sd-radv: handle header param gracefully

18 months agocpio: fix assert
Antonio Alvarez Feijoo [Fri, 19 Apr 2024 14:13:21 +0000 (16:13 +0200)] 
cpio: fix assert

18 months agostub: get uname from image before loading addons
Antonio Alvarez Feijoo [Fri, 19 Apr 2024 09:29:31 +0000 (11:29 +0200)] 
stub: get uname from image before loading addons

Otherwise uname is always NULL before calling `load_addons()`, so it's not being
checked if .uname matches between addons and UKI.

Fixes 68f85761e2eb1fd2243019980a64b174f07432c3

18 months agoNEWS: note that portabled supports vpick too
Luca Boccassi [Fri, 19 Apr 2024 18:35:42 +0000 (19:35 +0100)] 
NEWS: note that portabled supports vpick too

18 months agoMerge pull request #32142 from bluca/portable_vpick
Luca Boccassi [Fri, 19 Apr 2024 18:34:16 +0000 (20:34 +0200)] 
Merge pull request #32142 from bluca/portable_vpick

portable: support vpick

18 months agoMerge pull request #32251 from CodethinkLabs/vmspawn/docs_improvements
Luca Boccassi [Fri, 19 Apr 2024 18:33:05 +0000 (20:33 +0200)] 
Merge pull request #32251 from CodethinkLabs/vmspawn/docs_improvements

vmspawn docs improvements

18 months agoMerge pull request #32365 from poettering/gpt-auto-doc-fix
Zbigniew JÄ™drzejewski-Szmek [Fri, 19 Apr 2024 16:49:11 +0000 (18:49 +0200)] 
Merge pull request #32365 from poettering/gpt-auto-doc-fix

man: tweak gpt-auto-generator docs a bit

18 months agoman: correct where we look for auxiliary partitions 32365/head
Lennart Poettering [Fri, 19 Apr 2024 16:36:33 +0000 (18:36 +0200)] 
man: correct where we look for auxiliary partitions

We look for the root fs on the device of the booted ESP, and for the
other partitions on the device of the root fs. On EFI systems this
generally boils down to the same, but there are cases where this doesn't
hold, hence document this properly.

Fixes: #31199
18 months agoman: add explicit column for gpt guid value in table
Lennart Poettering [Fri, 19 Apr 2024 16:36:16 +0000 (18:36 +0200)] 
man: add explicit column for gpt guid value in table

18 months agoman: add separate column for flag value to table
Lennart Poettering [Fri, 19 Apr 2024 16:34:43 +0000 (18:34 +0200)] 
man: add separate column for flag value to table

18 months agolabeler: merge "logind" label into "login"
Frantisek Sumsal [Fri, 19 Apr 2024 16:23:41 +0000 (18:23 +0200)] 
labeler: merge "logind" label into "login"

Existing issues/PRs were migrated to the login label using:
$ gh search issues --repo systemd/systemd --label logind --limit=1000 --json number -q .[].number | \
        xargs gh issue edit --add-label login --remove-label logind

18 months agoman: vmspawn - clarify behaviour of omitting --linux=/--initrd= 32251/head
Sam Leonard [Fri, 19 Apr 2024 15:31:33 +0000 (16:31 +0100)] 
man: vmspawn - clarify behaviour of omitting --linux=/--initrd=

18 months agoman: vmspawn - clarify behaviour of omitting --vsock-cid=
Sam Leonard [Fri, 19 Apr 2024 15:30:56 +0000 (16:30 +0100)] 
man: vmspawn - clarify behaviour of omitting --vsock-cid=

18 months agoman: removely overly verbose wording from the vmspawn man page
Sam Leonard [Fri, 19 Apr 2024 15:26:06 +0000 (16:26 +0100)] 
man: removely overly verbose wording from the vmspawn man page

18 months agoman: vmspawn - reference later example to show use of --private-users
Sam Leonard [Fri, 19 Apr 2024 13:52:01 +0000 (14:52 +0100)] 
man: vmspawn - reference later example to show use of --private-users

18 months agoman: clarify behaviour when omitting both -i/-D in vmspawn
Sam Leonard [Fri, 19 Apr 2024 13:51:09 +0000 (14:51 +0100)] 
man: clarify behaviour when omitting both -i/-D in vmspawn

18 months agoman: fix entry for vmspawn's --ssh-key-type
Sam Leonard [Fri, 12 Apr 2024 16:04:37 +0000 (17:04 +0100)] 
man: fix entry for vmspawn's --ssh-key-type

18 months agoman: add ssh example for vmspawn
Sam Leonard [Fri, 12 Apr 2024 16:03:00 +0000 (17:03 +0100)] 
man: add ssh example for vmspawn

18 months agoman: add example --forward-journal= example for vmspawn
Sam Leonard [Fri, 12 Apr 2024 13:35:26 +0000 (14:35 +0100)] 
man: add example --forward-journal= example for vmspawn

18 months agoman: add machinectl import-raw example for vmspawn
Sam Leonard [Fri, 12 Apr 2024 13:05:43 +0000 (14:05 +0100)] 
man: add machinectl import-raw example for vmspawn

18 months agopcrlock: add make_pcrlock_record_from_stream 31889/head
Alberto Planas [Tue, 2 Apr 2024 14:18:30 +0000 (16:18 +0200)] 
pcrlock: add make_pcrlock_record_from_stream

To hash long files (like initrd) add the funcion
make_pcrlock_record_from_stream, that will read a long file (or stdin)
to generate the digests of multiple hashes, redading block by block.

Use this new function in verb_lock_raw and verb_lock_kernel_initrd.

Signed-off-by: Alberto Planas <aplanas@suse.com>
18 months agovmspawn: Fix shared memory check
Daan De Meyer [Fri, 19 Apr 2024 11:41:49 +0000 (13:41 +0200)] 
vmspawn: Fix shared memory check

We need the shared memory added if we're doing runtime mounts as well.

18 months agoman: document the last remaining bits of the hostnamed D-Bus interface
Lennart Poettering [Fri, 19 Apr 2024 13:25:43 +0000 (15:25 +0200)] 
man: document the last remaining bits of the hostnamed D-Bus interface

18 months agoukify: Add support for .ucode UKI section 31872/head
Tobias Fleig [Tue, 2 Apr 2024 11:00:10 +0000 (04:00 -0700)] 
ukify: Add support for .ucode UKI section

This commit teaches ukify how to build a .ucode section into UKIs. This
section is functionally an initrd, intended for microcode updates.

18 months agomkosi: Build command line into the image 32337/head
Daan De Meyer [Fri, 19 Apr 2024 11:25:31 +0000 (13:25 +0200)] 
mkosi: Build command line into the image

This allows using systemd-vmspawn itself while still getting a decent
experience.

18 months agomeasure: Add .ucode UKI section support
Tobias Fleig [Tue, 2 Apr 2024 10:56:22 +0000 (03:56 -0700)] 
measure: Add .ucode UKI section support

This commit adds support for the new ".ucode" UKI section to
systemd-measure. It is functionally an initrd and is treated as such by
measure.

18 months agostub: Add support for .ucode UKI section
Tobias Fleig [Tue, 2 Apr 2024 10:54:30 +0000 (03:54 -0700)] 
stub: Add support for .ucode UKI section

This commit adds support for loading, measuring and handling a ".ucode"
UKI section. This section is functionally an initrd, intended for
microcode updates. As such it will always be passed to the kernel first.

18 months agoportable: support vpick 32142/head
Luca Boccassi [Wed, 21 Feb 2024 20:00:29 +0000 (20:00 +0000)] 
portable: support vpick

Resolve at attach/detach/inspect time, so that the image is pinned and requires
re-attaching on update, given files are extracted from it so just passing
img.v/ to RootImage= is not enough to get a portable image updated

18 months agovpick: add pick_filter_image_any filter that matches both dirs and images
Luca Boccassi [Mon, 15 Apr 2024 22:00:12 +0000 (23:00 +0100)] 
vpick: add pick_filter_image_any filter that matches both dirs and images

18 months agoMerge pull request #32349 from yuwata/sd-event-source-get-inotify-path
Luca Boccassi [Fri, 19 Apr 2024 10:19:06 +0000 (12:19 +0200)] 
Merge pull request #32349 from yuwata/sd-event-source-get-inotify-path

sd-event: introduce sd_event_source_get_inotify_path()

18 months agoMerge pull request #32345 from yuwata/sd-radv-send
Luca Boccassi [Fri, 19 Apr 2024 09:59:08 +0000 (11:59 +0200)] 
Merge pull request #32345 from yuwata/sd-radv-send

sd-radv: introduce sd_radv_send(), and reset timer on sending unsplicited RA

18 months agoMerge pull request #31978 from nolange/fix_openssl_deprecations
Luca Boccassi [Fri, 19 Apr 2024 09:20:44 +0000 (11:20 +0200)] 
Merge pull request #31978 from nolange/fix_openssl_deprecations

Fix openssl deprecations

18 months agosd-event,sd-journal: fix error handling of inotify_add_watch_fd()
Yu Watanabe [Fri, 19 Apr 2024 04:19:00 +0000 (13:19 +0900)] 
sd-event,sd-journal: fix error handling of inotify_add_watch_fd()

Fixes a bug in 97ef5391697c34ee1c763fa9bddcd20a29ff3159 and
858749f7312bd0adb5433075a92e1c35a2fb56ac.

18 months agoupdate TODO
Lennart Poettering [Fri, 19 Apr 2024 08:54:07 +0000 (10:54 +0200)] 
update TODO

18 months agomkosi: Fix FORTIFY_SOURCE (again)
Daan De Meyer [Fri, 19 Apr 2024 06:30:53 +0000 (08:30 +0200)] 
mkosi: Fix FORTIFY_SOURCE (again)

CentOS/Fedora use annobin which will complain if FORTIFY_SOURCE=0
is used so we disable those checks to avoid the warnings.

We also make sure that when we query the compilation flags so we can
add more, we set _fortify_level=0 and undefine _lto_flags so that we
don't get those flags in the result.

18 months agosd-event: introduce sd_event_source_get_inotify_path() 32349/head
Yu Watanabe [Fri, 19 Apr 2024 04:55:35 +0000 (13:55 +0900)] 
sd-event: introduce sd_event_source_get_inotify_path()

This may be useful when there are multiple inotify event sources exist.
Without this, users need to manage the event sources and paths.

18 months agoman: drop spurious version info for error code
Yu Watanabe [Fri, 19 Apr 2024 04:44:10 +0000 (13:44 +0900)] 
man: drop spurious version info for error code

Follow-up for 87fe0a69606920dbdb11854be9223ddeef823fa1.

18 months agosd-event: rename argument for storing result
Yu Watanabe [Fri, 19 Apr 2024 04:35:04 +0000 (13:35 +0900)] 
sd-event: rename argument for storing result

18 months agoMerge pull request #32340 from YHNdnzj/wait-for-unit-cleanup
Yu Watanabe [Fri, 19 Apr 2024 03:36:48 +0000 (12:36 +0900)] 
Merge pull request #32340 from YHNdnzj/wait-for-unit-cleanup

bus-wait-for-units: some cleanup

18 months agosd-radv: reset timer on sending unsolicited RA 32345/head
Yu Watanabe [Tue, 16 Apr 2024 10:00:15 +0000 (19:00 +0900)] 
sd-radv: reset timer on sending unsolicited RA

Addresses https://github.com/systemd/systemd/pull/32267#discussion_r1567078807.

18 months agosd-radv: expose sd_radv_send()
Yu Watanabe [Mon, 15 Apr 2024 02:53:51 +0000 (11:53 +0900)] 
sd-radv: expose sd_radv_send()

To allow library users manually send RA.
Currently, this is not used, but will be used later.

18 months agoMerge pull request #32290 from yuwata/network-conf-parser-cleanups
Yu Watanabe [Fri, 19 Apr 2024 02:53:22 +0000 (11:53 +0900)] 
Merge pull request #32290 from yuwata/network-conf-parser-cleanups

network,nspawn: several cleanups for conf-parsers

18 months agosd-radv: set router preference gracefully 32346/head
Yu Watanabe [Mon, 15 Apr 2024 03:04:23 +0000 (12:04 +0900)] 
sd-radv: set router preference gracefully

Rather than refusing to set non-zero preference, when lifetime is zero,
let's handle that gracefully on send.

18 months agosd-radv: allow to modify RA header elements without stopping sd-radv
Yu Watanabe [Mon, 15 Apr 2024 02:57:07 +0000 (11:57 +0900)] 
sd-radv: allow to modify RA header elements without stopping sd-radv

This also makes too large retransmit time handled gracefully,
as even if a too large value is specified, usec_to_be32_msec() in
radv_send_router() will handle it gracefully anyway.
Note, networkd still refuses such invalid values. Hence, this does not
change any effective behavior.

18 months agobus-wait-for-units: simplify property_map_job_id 32340/head
Mike Yuan [Wed, 17 Apr 2024 19:31:29 +0000 (03:31 +0800)] 
bus-wait-for-units: simplify property_map_job_id

18 months agobus-wait-for-units: drop 'current' field
Mike Yuan [Wed, 17 Apr 2024 18:43:39 +0000 (02:43 +0800)] 
bus-wait-for-units: drop 'current' field

This is not used anywhere.

18 months agobus-wait-for-units: check for existing unit first, use hashmap_ensure_put
Mike Yuan [Tue, 16 Apr 2024 12:02:33 +0000 (20:02 +0800)] 
bus-wait-for-units: check for existing unit first, use hashmap_ensure_put

18 months agobus-wait-for-units: make callback type end with "_t"
Mike Yuan [Tue, 16 Apr 2024 06:43:23 +0000 (14:43 +0800)] 
bus-wait-for-units: make callback type end with "_t"

18 months agobus-wait-for-units: drop ready_callback
Mike Yuan [Tue, 16 Apr 2024 06:39:36 +0000 (14:39 +0800)] 
bus-wait-for-units: drop ready_callback

This is never used, and given that bus_wait_for_units_run
returns BusWaitForUnits.state it's not really useful.

18 months agosystemctl-start-unit: Subscribe() is unnecessary if we RefUnit explicitly
Mike Yuan [Tue, 16 Apr 2024 17:32:27 +0000 (01:32 +0800)] 
systemctl-start-unit: Subscribe() is unnecessary if we RefUnit explicitly

Subscribe() enables full signal delivery on API bus. But aside from
that, if a unit/job is explicitly Ref()'d, manager also emits the
signal. See bus_foreach_bus() for details.

bus-wait-for-units refs every unit to wait for, so there's no need
to Subscribe() on top of that. In verb_clean_or_freeze() Subscribe()
is not called either.

18 months agosystemctl: use FOREACH_ARRAY and FOREACH_ELEMENT more
Mike Yuan [Tue, 16 Apr 2024 07:08:14 +0000 (15:08 +0800)] 
systemctl: use FOREACH_ARRAY and FOREACH_ELEMENT more

18 months agocore/dbus: modernize bus_foreach_bus
Mike Yuan [Tue, 16 Apr 2024 06:53:14 +0000 (14:53 +0800)] 
core/dbus: modernize bus_foreach_bus

18 months agocore/unit: use UNIT_IS_INACTIVE_OR_FAILED at one more place
Mike Yuan [Fri, 19 Apr 2024 02:07:13 +0000 (10:07 +0800)] 
core/unit: use UNIT_IS_INACTIVE_OR_FAILED at one more place

18 months agotest: initialize _cleanup_ variables
Luca Boccassi [Fri, 19 Apr 2024 00:04:35 +0000 (01:04 +0100)] 
test: initialize _cleanup_ variables

Missed one in a previous PR.

Follow-up for e5689f04dd3d57a4e680ab88c643fa971eb0afc2

18 months agoconf-parser: move config_parse_timezone() to conf-parser.[ch] 32290/head
Yu Watanabe [Tue, 16 Apr 2024 01:28:06 +0000 (10:28 +0900)] 
conf-parser: move config_parse_timezone() to conf-parser.[ch]

Even though it is currently only used by networkd, the parser itself
is quite generic. Let's move it to the shared library.

18 months agonspawn: rename config_parse_timezone() -> config_parse_timezone_mode()
Yu Watanabe [Tue, 16 Apr 2024 02:12:46 +0000 (11:12 +0900)] 
nspawn: rename config_parse_timezone() -> config_parse_timezone_mode()

The parser does not parse timezone, but timezone mode. Let's rename the
parser to more specific name.

18 months agonspawn: align tables
Yu Watanabe [Tue, 16 Apr 2024 02:10:04 +0000 (11:10 +0900)] 
nspawn: align tables

18 months agonetwork: introduce link_get_use_ntp()
Yu Watanabe [Tue, 16 Apr 2024 01:13:14 +0000 (10:13 +0900)] 
network: introduce link_get_use_ntp()

No functional change, just refactoring.

18 months agonetwork: move NTP related conf parsers to networkd-ntp.[ch]
Yu Watanabe [Tue, 16 Apr 2024 00:58:25 +0000 (09:58 +0900)] 
network: move NTP related conf parsers to networkd-ntp.[ch]

No functional change, just refactoring.

18 months agonetwork: introduce link_get_use_dns()
Yu Watanabe [Mon, 15 Apr 2024 07:16:13 +0000 (16:16 +0900)] 
network: introduce link_get_use_dns()

No functional change, just refactoring.

18 months agonetwork: introduce link_get_use_domains()
Yu Watanabe [Mon, 15 Apr 2024 06:47:12 +0000 (15:47 +0900)] 
network: introduce link_get_use_domains()

No functional change, just refactoring.

18 months agonetwork: move DNS related conf parsers to networkd-dns.[ch]
Yu Watanabe [Mon, 15 Apr 2024 06:15:09 +0000 (15:15 +0900)] 
network: move DNS related conf parsers to networkd-dns.[ch]

No functional change, just refactoring.

18 months agonetwork: rename DHCPUseDomains -> UseDomains
Yu Watanabe [Mon, 15 Apr 2024 05:47:44 +0000 (14:47 +0900)] 
network: rename DHCPUseDomains -> UseDomains

As it is also used for NDisc.