]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 years agomeson: move files' closing brace to separate line 22644/head
Zbigniew Jędrzejewski-Szmek [Thu, 3 Mar 2022 11:14:13 +0000 (12:14 +0100)] 
meson: move files' closing brace to separate line

3 years agomeson: use files() for libudevd_core_sources too
Zbigniew Jędrzejewski-Szmek [Wed, 2 Mar 2022 13:52:50 +0000 (14:52 +0100)] 
meson: use files() for libudevd_core_sources too

I'm not sure why a plain-text list was used in this case.

3 years agomeson: do not use split() in file lists
Zbigniew Jędrzejewski-Szmek [Wed, 2 Mar 2022 13:49:32 +0000 (14:49 +0100)] 
meson: do not use split() in file lists

The approach to use '''…'''.split() instead of a list of strings was initially
used when converting from automake because it allowed identical blocks of lines
to be used for both, making the conversion easier.

But over the years we have been using normal lists more and more, especially
when there were just a few filenames listed. This converts the rest.

No functional change.

3 years agobuild(deps): bump meson from 0.60.3 to 0.61.2 in /.github/workflows
dependabot[bot] [Tue, 1 Mar 2022 09:05:16 +0000 (09:05 +0000)] 
build(deps): bump meson from 0.60.3 to 0.61.2 in /.github/workflows

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

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

Signed-off-by: dependabot[bot] <support@github.com>
3 years agobuild(deps): bump github/codeql-action from 1.0.29 to 1.1.3
dependabot[bot] [Tue, 1 Mar 2022 09:04:51 +0000 (09:04 +0000)] 
build(deps): bump github/codeql-action from 1.0.29 to 1.1.3

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1.0.29 to 1.1.3.
- [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/384cfc42b2131df01c009d3d2eed7b78d8e8556e...75f07e7ab2ee63cba88752d8c696324e4df67466)

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

Signed-off-by: dependabot[bot] <support@github.com>
3 years agobuild(deps): bump actions/labeler from 3.0.2 to 3.1.0
dependabot[bot] [Tue, 1 Mar 2022 09:04:47 +0000 (09:04 +0000)] 
build(deps): bump actions/labeler from 3.0.2 to 3.1.0

Bumps [actions/labeler](https://github.com/actions/labeler) from 3.0.2 to 3.1.0.
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](https://github.com/actions/labeler/compare/69da01b8e0929f147b8943611bee75ee4175a49e...3d612d72e6784a1a65365cc6d33b5a001c12bf10)

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

Signed-off-by: dependabot[bot] <support@github.com>
3 years agoshared: Add more dlopen() tests
Daan De Meyer [Tue, 1 Mar 2022 17:04:13 +0000 (17:04 +0000)] 
shared: Add more dlopen() tests

Add dlopen_dw(), dlopen_elf() and dlopen_pcre2() to the dlopen test.
To enable adding dlopen_pcre2(), we move pcre2-dlopen.h/c from
src/journal to src/shared.

3 years agofile-hierarchy: Document /sys/fs/cgroup
Josh Triplett [Fri, 25 Feb 2022 20:40:45 +0000 (12:40 -0800)] 
file-hierarchy: Document /sys/fs/cgroup

file-hierarchy does not mention anything about the expected mountpoint
for cgroups. This may lead some software to believe it will need to
search for it (e.g. by scanning mountinfo) rather than just looking in
the canonical location.

Document the canonical mountpoint as /sys/fs/cgroup. Also provide
information on the non-default configurations, but
make it clear that in such configurations if cgroup2 is mounted (hybrid
mode) it won't have resource controllers attached. This will help
software know if it should fall back to /sys/fs/cgroup/unified or just
ignore that case.

3 years agoman: recommend built-in platform.freedesktop_os_release() in our page
Zbigniew Jędrzejewski-Szmek [Mon, 28 Feb 2022 08:47:28 +0000 (09:47 +0100)] 
man: recommend built-in platform.freedesktop_os_release() in our page

Python gained support for reading os-release, let's advertise it a bit more.
Our open-coded example is still useful, but let's not suggest it as the
default implementation.

I added quotes around the printed string because it looks a bit better
this way.

3 years agoMerge pull request #22627 from yuwata/network-l2tp-cleanups
Luca Boccassi [Sun, 27 Feb 2022 18:01:14 +0000 (18:01 +0000)] 
Merge pull request #22627 from yuwata/network-l2tp-cleanups

network: cleanups for L2TP tunnel

3 years agonetwork: netdev: drop unused creation type NETDEV_CREATE_AFTER_CONFIGURED 22627/head
Yu Watanabe [Fri, 25 Feb 2022 05:02:10 +0000 (14:02 +0900)] 
network: netdev: drop unused creation type NETDEV_CREATE_AFTER_CONFIGURED

3 years agonetwork: l2tp: change create type to independent
Yu Watanabe [Fri, 25 Feb 2022 04:56:49 +0000 (13:56 +0900)] 
network: l2tp: change create type to independent

L2TP tunnel does not have underlying interface. Let's change its type to
independent.

3 years agonetwork: l2tp: make Local= optionally take interface name
Yu Watanabe [Fri, 25 Feb 2022 08:12:18 +0000 (17:12 +0900)] 
network: l2tp: make Local= optionally take interface name

3 years agonetwork: introduce {manager,link}_address_is_reachable()
Yu Watanabe [Fri, 25 Feb 2022 07:47:47 +0000 (16:47 +0900)] 
network: introduce {manager,link}_address_is_reachable()

3 years agonetwork: merge gateway_is_ready() and link_address_is_reachable()
Yu Watanabe [Fri, 25 Feb 2022 07:29:26 +0000 (16:29 +0900)] 
network: merge gateway_is_ready() and link_address_is_reachable()

As link_address_is_reachable() is used only by gateway_is_ready().

3 years agonetwork: address: introduce manager_get_address()
Yu Watanabe [Fri, 25 Feb 2022 03:59:58 +0000 (12:59 +0900)] 
network: address: introduce manager_get_address()

And make manager_has_address() return true only when the link which has
the address is ready.

3 years agoMerge pull request #22626 from yuwata/network-assorted-cleanups
Yu Watanabe [Sat, 26 Feb 2022 14:57:08 +0000 (23:57 +0900)] 
Merge pull request #22626 from yuwata/network-assorted-cleanups

network: assorted cleanups

3 years agoMerge pull request #22625 from yuwata/network-tc-cleanups
Luca Boccassi [Sat, 26 Feb 2022 10:39:18 +0000 (10:39 +0000)] 
Merge pull request #22625 from yuwata/network-tc-cleanups

network: cleanups for traffic control

3 years agonetwork: adjust assertions 22626/head
Yu Watanabe [Sat, 26 Feb 2022 03:01:41 +0000 (12:01 +0900)] 
network: adjust assertions

3 years agonetwork: netdev: drop NETDEV_CREATE_MASTER
Yu Watanabe [Sat, 26 Feb 2022 03:18:06 +0000 (12:18 +0900)] 
network: netdev: drop NETDEV_CREATE_MASTER

As there is no deference between NETDEV_CREATE_MASTER and
NETDEV_CREATE_INDEPENDENT.

3 years agonetwork: netdev: use netdev_is_stacked() at one more place
Yu Watanabe [Sat, 26 Feb 2022 03:17:28 +0000 (12:17 +0900)] 
network: netdev: use netdev_is_stacked() at one more place

3 years agonetwork: netdev: make link_get_local_address() refuse non-ready links and addresses
Yu Watanabe [Fri, 25 Feb 2022 04:20:59 +0000 (13:20 +0900)] 
network: netdev: make link_get_local_address() refuse non-ready links and addresses

3 years agonetwork: traffic control: drop detailed log messages 22625/head
Yu Watanabe [Sat, 26 Feb 2022 02:36:45 +0000 (11:36 +0900)] 
network: traffic control: drop detailed log messages

This also renames `req` -> `m`.

Follow-up for a79a8d16d5b5f8709361d8deb42fc84ff2fe9c30 and #22014.

3 years agonetwork: traffic control: drop meta from QDisc and TClass
Yu Watanabe [Thu, 24 Feb 2022 07:08:50 +0000 (16:08 +0900)] 
network: traffic control: drop meta from QDisc and TClass

Since #22248, it is not necessary to manage QDisc and TClass in same Set
or Hashmap. Let's manage them independently.

3 years agoMerge pull request #22619 from yuwata/network-netdev-cleanups
Yu Watanabe [Fri, 25 Feb 2022 23:13:38 +0000 (08:13 +0900)] 
Merge pull request #22619 from yuwata/network-netdev-cleanups

network: several netdev cleanups

3 years agonetwork: drop unused flag and counter 22619/head
Yu Watanabe [Thu, 24 Feb 2022 02:06:29 +0000 (11:06 +0900)] 
network: drop unused flag and counter

3 years agonetwork: split netdev_create() into two
Yu Watanabe [Thu, 24 Feb 2022 01:29:49 +0000 (10:29 +0900)] 
network: split netdev_create() into two

3 years agonetwork: assign corresponding NetDev object to Link
Yu Watanabe [Thu, 17 Feb 2022 15:01:28 +0000 (00:01 +0900)] 
network: assign corresponding NetDev object to Link

3 years agonetwork/netdev: drop unused argument
Yu Watanabe [Thu, 17 Feb 2022 15:20:34 +0000 (00:20 +0900)] 
network/netdev: drop unused argument

3 years agonetwork/netdev: do not assign value on failure
Yu Watanabe [Thu, 17 Feb 2022 14:50:07 +0000 (23:50 +0900)] 
network/netdev: do not assign value on failure

3 years agotest: accept both unpadded and padded partition sizes
Frantisek Sumsal [Fri, 25 Feb 2022 14:09:07 +0000 (15:09 +0100)] 
test: accept both unpadded and padded partition sizes

Since util-linux/util-linux@921c7da55ec78350e4067b3fd6b7de6f299106ee
libfdisk aligns the last partition (on GPT) for optimal I/O. Let's
account for that.

Fixes: #22606
3 years agomkosi: Add centos_epel config
Daan De Meyer [Fri, 4 Feb 2022 11:10:33 +0000 (11:10 +0000)] 
mkosi: Add centos_epel config

Now that mkosi has centos-stream 9 support, let's add a config in
the repo so that the mkosi CI tests that configuration as well.

Centos doesn't support btrfs so we use xfs instead. For some reason,
building --hostonly-initrd centos images breaks the qemu boot so I
disabled that option for centos.

We update the mkosi commit hash to https://github.com/systemd/mkosi/commit/0dd39c20a4b3a2fab6efdc54da92bffad7c7b7ca
which adds the PowerTools repo to CentOS Stream 8 which is required
to make all the necessary packages required to build systemd on
CentOS Stream 8 available.

3 years agomkosi: Remove Arch nspawn workaround
Daan De Meyer [Fri, 25 Feb 2022 11:01:07 +0000 (11:01 +0000)] 
mkosi: Remove Arch nspawn workaround

This has been fixed so the workaround can be removed.

3 years agoMerge pull request #22620 from yuwata/network-drop-detailed-log-messages
Zbigniew Jędrzejewski-Szmek [Fri, 25 Feb 2022 09:31:50 +0000 (10:31 +0100)] 
Merge pull request #22620 from yuwata/network-drop-detailed-log-messages

network: drop detailed log messages

3 years agonetwork: dhcp-server: add two more log messages 22620/head
Yu Watanabe [Thu, 24 Feb 2022 04:26:18 +0000 (13:26 +0900)] 
network: dhcp-server: add two more log messages

3 years agonetwork: bridge mdb: add missing assertion
Yu Watanabe [Thu, 24 Feb 2022 04:23:27 +0000 (13:23 +0900)] 
network: bridge mdb: add missing assertion

3 years agonetwork: move more functions
Yu Watanabe [Thu, 24 Feb 2022 02:38:28 +0000 (11:38 +0900)] 
network: move more functions

No functional change. Preparation for later commits.

3 years agonetwork: move functions
Yu Watanabe [Fri, 25 Feb 2022 01:40:09 +0000 (10:40 +0900)] 
network: move functions

No functional change. Preparation for later commits.

3 years agonetwork: address: drop unnecessary call of address_get()
Yu Watanabe [Thu, 24 Feb 2022 02:24:08 +0000 (11:24 +0900)] 
network: address: drop unnecessary call of address_get()

As here `req->address` and the result `existing` are always equivalent.

3 years agonetwork: drop detailed log messages
Yu Watanabe [Thu, 24 Feb 2022 01:48:53 +0000 (10:48 +0900)] 
network: drop detailed log messages

This also renames netlink message `req` -> `m` for preparation of later
commits.

Follow-ups for #22014.

3 years agonetwork: make link_down() independent of link_up_or_down()
Yu Watanabe [Thu, 24 Feb 2022 04:50:07 +0000 (13:50 +0900)] 
network: make link_down() independent of link_up_or_down()

And rename it to link_down_now() to emphasize it does not use request
queue.

3 years agoMerge pull request #22389 from poettering/resolved-sysinit
Luca Boccassi [Thu, 24 Feb 2022 23:00:27 +0000 (23:00 +0000)] 
Merge pull request #22389 from poettering/resolved-sysinit

units: move resolved to sysinit.target (from basic.target)

3 years agoMerge pull request #22611 from yuwata/network-activation-policy-stacked-netdevs
Luca Boccassi [Thu, 24 Feb 2022 22:57:35 +0000 (22:57 +0000)] 
Merge pull request #22611 from yuwata/network-activation-policy-stacked-netdevs

network: make activation policy also work for stacked netdevs

3 years agoMerge pull request #22615 from yuwata/network-dhcp-server-support-pxe-boot-systems
Luca Boccassi [Thu, 24 Feb 2022 22:52:56 +0000 (22:52 +0000)] 
Merge pull request #22615 from yuwata/network-dhcp-server-support-pxe-boot-systems

network: dhcp server: support pxe boot systems

3 years agomeson: Drop required libfdisk version to 2.32
Daan De Meyer [Thu, 24 Feb 2022 13:29:54 +0000 (13:29 +0000)] 
meson: Drop required libfdisk version to 2.32

We initially pinned this to 2.33 in
e71f5585b9b0580428f9530d0a485265c9c25165 because libfdisk 2.32 in
CentOS 8 didn't have
https://github.com/karelzak/util-linux/commit/2f35c1ead621f42f32f7777232568cb03185b473
backported.

If we check now, we can see it has been backported
(https://git.centos.org/rpms/util-linux/blob/c8s/f/SOURCES/0048-libfdisk-count-gaps-to-possible-size-when-resize.patch)
which means we can drop the required version to 2.32 instead of 2.33.

3 years agonetwork: add NextServer= and Filename= setting to [DHCPServer] section 22615/head
Yu Watanabe [Thu, 24 Feb 2022 17:43:40 +0000 (02:43 +0900)] 
network: add NextServer= and Filename= setting to [DHCPServer] section

Closes #4403.

3 years agosd-dhcp-server: add support to send next server and filename option for PXE boot...
Yu Watanabe [Thu, 24 Feb 2022 17:32:58 +0000 (02:32 +0900)] 
sd-dhcp-server: add support to send next server and filename option for PXE boot systems

3 years agounits: drop After=systemd-resolved.service from systemd-nspawn@.service 22389/head
Lennart Poettering [Tue, 22 Feb 2022 15:35:16 +0000 (16:35 +0100)] 
units: drop After=systemd-resolved.service from systemd-nspawn@.service

resolved is now started as part of early boot hence we need no explicit
ordering anymore.

3 years agounits: move resolved to sysinit.target (from basic.target)
Lennart Poettering [Thu, 3 Feb 2022 11:15:00 +0000 (12:15 +0100)] 
units: move resolved to sysinit.target (from basic.target)

79a67f3ca4d32c37b5e754501852a85eae908a6a pulled systemd-resolved.service
in from basic.target instead of multi-user.target, i.e. the idea is to
make it an early boot service, instead of a regular service.

However, early boot services are supposed to be in sysinit.target, not
basic.target (the latter is just one that combines the early boot
services in sysinit.target, the sockets in sockets.targt, the mounts in
local-fs.target and so on into one big target).

Also, the comit actually didn't add a synchronization point, i.e. not
Before=, so that the whole thing was racy.

Let's fix all that.

Follow-up for 79a67f3ca4d32c37b5e754501852a85eae908a6a

3 years agoMerge pull request #22607 from yuwata/network-address-hash-func
Zbigniew Jędrzejewski-Szmek [Thu, 24 Feb 2022 09:28:30 +0000 (10:28 +0100)] 
Merge pull request #22607 from yuwata/network-address-hash-func

network: compare addresses more strictly

3 years agotest-network: add test case for activation policy for stacked netdevs 22611/head
Yu Watanabe [Wed, 23 Feb 2022 21:00:07 +0000 (06:00 +0900)] 
test-network: add test case for activation policy for stacked netdevs

For issue #22593.

3 years agotest-network: check existence before calling networkctl or ip command
Yu Watanabe [Thu, 24 Feb 2022 07:24:49 +0000 (16:24 +0900)] 
test-network: check existence before calling networkctl or ip command

3 years agotest-network: remove unused configs
Yu Watanabe [Tue, 22 Feb 2022 23:05:52 +0000 (08:05 +0900)] 
test-network: remove unused configs

3 years agonetwork: create stacked netdevs after the underlying link is activated
Yu Watanabe [Wed, 23 Feb 2022 23:20:44 +0000 (08:20 +0900)] 
network: create stacked netdevs after the underlying link is activated

Otherwise, the activation policy for the netdevs are ignored.

Fixes #22593.

3 years agotest-network: add testcases for address property change 22607/head
Yu Watanabe [Tue, 22 Feb 2022 21:16:17 +0000 (06:16 +0900)] 
test-network: add testcases for address property change

This adds a testcase for issue #22515.

3 years agonetwork: also hash address label and broadcast address
Yu Watanabe [Wed, 23 Feb 2022 22:24:19 +0000 (07:24 +0900)] 
network: also hash address label and broadcast address

Otherwise, even if the address label and/or broadcast address are changed
in a .network file, the change will not be applied on reconfigure.

3 years agonetwork: use address_set_broadcast() at one more place
Yu Watanabe [Wed, 23 Feb 2022 22:13:31 +0000 (07:13 +0900)] 
network: use address_set_broadcast() at one more place

3 years agonetwork: set broadcast address on request
Yu Watanabe [Wed, 23 Feb 2022 22:07:02 +0000 (07:07 +0900)] 
network: set broadcast address on request

Previously, the broadcast address was set to a Address object in
address_section_verify() (or address_acquire()). But, for wireguard
interfaces, we do not use the broadcast address. The .network file may
be assigned to multiple interfaces, hence, we cannot determine if we
should set the broadcast address in address_section_verify().

This makes the broadcast address set in link_request_address().
Then, we set the broadcast address only when we need it.

3 years agonetwork: compare addresses more strictly
Yu Watanabe [Tue, 22 Feb 2022 19:10:51 +0000 (04:10 +0900)] 
network: compare addresses more strictly

This re-introduce the full hash and compre functions for Address,
which was reverted 1d30fc5cb64ecba2f03fe42aa0d8c65c3decad82 (#17851).

The issue #17831, which is fixed by #17851, is handled in a different way;
simply ignore to configure the conflicted DHCPv6 address. Previously, we
warn about the conflict, but continue to configure the address anyway, and
the kernel ignores the request. So, it is not necessary to request the
conflicted address in networkd side.

This fixes the following issues:
- when a link has an address, and corresponding .network file has the
  address with different prefix length, then the prefix length specified
  in the .network file will not be applied,
- we cannot specify multiple IPv4 addresses with different prefix
  length, e.g.
  ----
  Address=10.10.10.10/24
  Address=10.10.10.10/16
  ----
  This is spurious setup, but the kernel allows it.

Fixes #22515.

3 years agosystemctl: Show how long a service ran for after it exited in status output
Daan De Meyer [Tue, 22 Feb 2022 11:06:00 +0000 (11:06 +0000)] 
systemctl: Show how long a service ran for after it exited in status output

3 years agoMerge pull request #22591 from evverx/no-deps
Frantisek Sumsal [Wed, 23 Feb 2022 09:27:41 +0000 (09:27 +0000)] 
Merge pull request #22591 from evverx/no-deps

ci: build systemd without optional dependencies

3 years agoMerge pull request #22605 from yuwata/test-journal-send-fd-leaks
Zbigniew Jędrzejewski-Szmek [Wed, 23 Feb 2022 08:15:41 +0000 (09:15 +0100)] 
Merge pull request #22605 from yuwata/test-journal-send-fd-leaks

test-journal-send: fix fd leaks

3 years agoMerge pull request #22608 from keszybz/doc-cleanups
Zbigniew Jędrzejewski-Szmek [Wed, 23 Feb 2022 08:11:07 +0000 (09:11 +0100)] 
Merge pull request #22608 from keszybz/doc-cleanups

Man page cleanups

3 years agoMerge pull request #22414 from yuwata/resolve-synthesize-empty-domain-follow-up
Zbigniew Jędrzejewski-Szmek [Wed, 23 Feb 2022 08:10:49 +0000 (09:10 +0100)] 
Merge pull request #22414 from yuwata/resolve-synthesize-empty-domain-follow-up

resolve: follow-up for synthesizing empty name

3 years agoudev-builtin-input_id: don't label absolute mice as pointing sticks
Peter Hutterer [Tue, 22 Feb 2022 23:12:43 +0000 (09:12 +1000)] 
udev-builtin-input_id: don't label absolute mice as pointing sticks

The Getac UX10 tablet exposes a "CUST0000:00 0EEF:C002 Mouse" device
with BTN_LEFT/RIGHT and ABS_X/Y on the i2c bus. This causes the builtin
to incorrectly label it as pointing stick (all i2c mice are
tagged as ID_INPUT_POINTING_STICK, see 3d7ac1c655ec4).

Fix this by adding a separate variable for absolute pointing
devices like the VMmouse USB mouse or this Getac tablet - this way we
skip the pointing stick check.

See https://gitlab.freedesktop.org/libinput/libinput/-/issues/743
for recordings.

3 years agoMerge pull request #22600 from poettering/timestamp_is_set-more
Zbigniew Jędrzejewski-Szmek [Wed, 23 Feb 2022 07:59:49 +0000 (08:59 +0100)] 
Merge pull request #22600 from poettering/timestamp_is_set-more

make more use of timestamp_is_set()

3 years agoman: various issues reported in #22432 22608/head
Zbigniew Jędrzejewski-Szmek [Tue, 22 Feb 2022 21:54:23 +0000 (22:54 +0100)] 
man: various issues reported in #22432

Fixes #22432.

3 years agoman/systemd-network: reword descriptions of DHCPPrefixDelegation= and dst-host
Zbigniew Jędrzejewski-Szmek [Tue, 22 Feb 2022 21:56:10 +0000 (22:56 +0100)] 
man/systemd-network: reword descriptions of DHCPPrefixDelegation= and dst-host

3 years agoman/systemd-analyze: split out example to a separate section
Zbigniew Jędrzejewski-Szmek [Tue, 22 Feb 2022 21:55:42 +0000 (22:55 +0100)] 
man/systemd-analyze: split out example to a separate section

It turns out we can't have an Example nested in a list, and every
combination of nesting I tried looked bad either in troff or in html.
The whole example is moved to a separate section.

3 years agoman: adjust command for Fedora installations
Zbigniew Jędrzejewski-Szmek [Thu, 17 Feb 2022 19:34:14 +0000 (20:34 +0100)] 
man: adjust command for Fedora installations

glibc now has Suggests:glibc-minimal-langpack, so we don't
need to mention it ourselves.

--repo=… is a nicer alternative to --disablerepo=* --enablerepo=….
It also avoids the issue with quoting.

Let's exclude weak deps, but install systemd-networkd, so the container
can configure networking if necessary.

3 years agoresolve: synthesize empty domain only when A and/or AAAA key is requested 22414/head
Yu Watanabe [Fri, 4 Feb 2022 03:05:33 +0000 (12:05 +0900)] 
resolve: synthesize empty domain only when A and/or AAAA key is requested

Follow-up for 3b2ac14ac45bef01cf489c3231b868936866444b (#22231).

Before this commit.
---
$ dig -t SRV '.'

; <<>> DiG 9.16.24-RH <<>> -t SRV .
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 16836
;; flags: qr aa rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;. IN SRV

;; Query time: 1 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Fri Feb 04 12:01:09 JST 2022
;; MSG SIZE  rcvd: 28
---

After this commit.
---
$ dig -t SRV '.'

; <<>> DiG 9.16.24-RH <<>> -t SRV .
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19861
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;. IN SRV

;; AUTHORITY SECTION:
. 86394 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2022020302 1800 900 604800 86400

;; Query time: 20 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Fri Feb 04 12:00:12 JST 2022
;; MSG SIZE  rcvd: 103
---

Fixes #22401.

3 years agoresolve: make dns_scope_good_domain() take DnsQuery*
Yu Watanabe [Tue, 22 Feb 2022 22:50:30 +0000 (07:50 +0900)] 
resolve: make dns_scope_good_domain() take DnsQuery*

3 years agoresolve: drop never matched condition
Yu Watanabe [Tue, 22 Feb 2022 22:49:40 +0000 (07:49 +0900)] 
resolve: drop never matched condition

As dns_scope_good_domain() does not return negative errno.

3 years agojournal-send: close fd on exit when running with valgrind 22605/head
Yu Watanabe [Tue, 22 Feb 2022 17:03:54 +0000 (02:03 +0900)] 
journal-send: close fd on exit when running with valgrind

Fixes an issue reported in #22576.

3 years agotest-journal-send: close fd opend by syslog()
Yu Watanabe [Tue, 22 Feb 2022 16:52:29 +0000 (01:52 +0900)] 
test-journal-send: close fd opend by syslog()

Fixes an issue reported in #22576.

3 years agoMerge pull request #22582 from medhefgo/boot-input
Luca Boccassi [Tue, 22 Feb 2022 22:11:44 +0000 (22:11 +0000)] 
Merge pull request #22582 from medhefgo/boot-input

boot: Minor input fixes

3 years agoMerge pull request #19970 from curtistklein/watchdog-pretimeout-merge
Luca Boccassi [Tue, 22 Feb 2022 22:08:09 +0000 (22:08 +0000)] 
Merge pull request #19970 from curtistklein/watchdog-pretimeout-merge

watchdog: Add watchdog pretimeout support

3 years agounit: escape %
Yu Watanabe [Tue, 22 Feb 2022 16:29:42 +0000 (01:29 +0900)] 
unit: escape %

Fixes #22601.

3 years agounits: drop After=systemd-networkd.service from systemd-resolved.service
Lennart Poettering [Tue, 22 Feb 2022 15:21:29 +0000 (16:21 +0100)] 
units: drop After=systemd-networkd.service from systemd-resolved.service

This ordering existed since resolved was first created, but there should
not be any need to order the two services against each other, as
resolved should be able to pick up networkd DNS metadata either way (as
it works with inotify in /run).

Let's drop this hence, and not cargo-cult this to eternity

Also see: https://github.com/systemd/systemd/pull/22389#issuecomment-1045978403

3 years agoMerge pull request #22596 from yuwata/test-fix-fd-leaks
Yu Watanabe [Tue, 22 Feb 2022 21:51:06 +0000 (06:51 +0900)] 
Merge pull request #22596 from yuwata/test-fix-fd-leaks

test: fix fd leaks

3 years agotree-wide: use timestamp_is_set() more 22600/head
Lennart Poettering [Tue, 22 Feb 2022 14:34:04 +0000 (15:34 +0100)] 
tree-wide: use timestamp_is_set() more

3 years agococcinelle: automatically look for timestamp_is_set candidates
Lennart Poettering [Tue, 22 Feb 2022 13:59:10 +0000 (14:59 +0100)] 
coccinelle: automatically look for timestamp_is_set candidates

Based on @mrc0mmand's Coccinelle skills, not mine. All credit is his.

Co-authored-by: Frantisek Sumsal <frantisek@sumsal.cz>
3 years agomeson: pass skip-deps on to the fuzzers as well 22591/head
Evgeny Vereshchagin [Tue, 22 Feb 2022 17:47:48 +0000 (17:47 +0000)] 
meson: pass skip-deps on to the fuzzers as well

they should be tested without optional dependecines as well. CIFuzz
kind of covers that but let's just make sure local builds are fine as
well.

3 years agoMerge pull request #22592 from yuwata/test-oomd-util-fixlets
Zbigniew Jędrzejewski-Szmek [Tue, 22 Feb 2022 17:25:45 +0000 (18:25 +0100)] 
Merge pull request #22592 from yuwata/test-oomd-util-fixlets

test: test-oomd-util fixlets

3 years agowatchdog: add setting to configure pretimeout governor 19970/head
Luca Boccassi [Tue, 8 Feb 2022 12:58:30 +0000 (12:58 +0000)] 
watchdog: add setting to configure pretimeout governor

3 years agowatchdog: check pretimeout governor
Curtis Klein [Sun, 10 Oct 2021 00:51:09 +0000 (17:51 -0700)] 
watchdog: check pretimeout governor

Check and log the default pretimeout governor configured in the kernel.
The pretimeout will not work unless at least one governor is available
and configured. This requires loading a kernel module manually.

3 years agowatchdog: Add watchdog pretimeout support
Curtis Klein [Sun, 27 Jun 2021 22:36:49 +0000 (15:36 -0700)] 
watchdog: Add watchdog pretimeout support

Add support for managing and configuring watchdog pretimeout values if
the watchdog hardware supports it. The ping interval is adjusted to
account for a pretimeout so that it will still ping at half the timeout
interval before a pretimeout event would be triggered. By default the
pretimeout defaults to 0s or disabled.

The RuntimeWatchdogPreSec config option is added to allow the pretimeout
to be specified (similar to RuntimeWatchdogSec). The
RuntimeWatchdogPreUSec dbus property is added to override the pretimeout
value at runtime (similar to RuntimeWatchdogUSec). Setting the
pretimeout to 0s will disable the pretimeout.

3 years agoci: fix clang-13 installation
Frantisek Sumsal [Tue, 22 Feb 2022 13:43:40 +0000 (14:43 +0100)] 
ci: fix clang-13 installation

For some reason Ubuntu Focal repositories now have `llvm-13` virtual
package which can't be installed, but successfully fools our check,
resulting in no clang/llvm being installed...

```
$ apt show llvm-13
Package: llvm-13
State: not a real package (virtual)
N: Can't select candidate version from package llvm-13 as it has no candidate
N: Can't select versions from package 'llvm-13' as it is purely virtual
N: No packages found

$ apt install --dry-run llvm-13
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package llvm-13 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'llvm-13' has no installation candidate
```

3 years agoMerge pull request #22574 from yuwata/network-dhcp-pd-fixes
Zbigniew Jędrzejewski-Szmek [Tue, 22 Feb 2022 16:53:00 +0000 (17:53 +0100)] 
Merge pull request #22574 from yuwata/network-dhcp-pd-fixes

network: dhcp-pd: fix two issues

3 years agoclang-format: we actually typically use 16ch continuation indentation
Lennart Poettering [Tue, 22 Feb 2022 15:51:58 +0000 (16:51 +0100)] 
clang-format: we actually typically use 16ch continuation indentation

We use 8 for blocks, and 16 for continuation in most cases afaics, hence
say so in .clang-format too

3 years agotest: fix file descriptor leak in test-psi-util 22596/head
Yu Watanabe [Tue, 22 Feb 2022 12:46:41 +0000 (21:46 +0900)] 
test: fix file descriptor leak in test-psi-util

Fixes an issue reported in #22576.

3 years agotest: fix file descriptor leak in test-tmpfiles.c
Yu Watanabe [Tue, 22 Feb 2022 12:44:58 +0000 (21:44 +0900)] 
test: fix file descriptor leak in test-tmpfiles.c

Also fixes a typo in assertion.

Fixes an issure reported in #22576.

3 years agotest: fix file descriptor leak in test-fs-util
Yu Watanabe [Tue, 22 Feb 2022 12:42:22 +0000 (21:42 +0900)] 
test: fix file descriptor leak in test-fs-util

Fixes an issue reported in #22576.

3 years agoci: build systemd without optional dependencies
Evgeny Vereshchagin [Tue, 22 Feb 2022 11:02:44 +0000 (11:02 +0000)] 
ci: build systemd without optional dependencies

to catch issues like https://github.com/systemd/systemd/pull/22585#issuecomment-1047640155

3 years agoboot: Handle shift and logo keys too 22582/head
Jan Janssen [Mon, 21 Feb 2022 12:45:06 +0000 (13:45 +0100)] 
boot: Handle shift and logo keys too

Some firmware supports sending input events for shift and logo keys.
Previously, we would suppress these with EFI_NOT_READY unless
some other key was pressed alongside, but it is really the job of the
caller to decide how to handle these.

Note that for keys that already have a printable shift representation
the reported input event will not have the shift key bits set
(Shift+a is reported as A). Should some firmware turn out to violate the
spec here we can always remove that part.

3 years agoboot: Properly check status code of console_key_read
Jan Janssen [Mon, 21 Feb 2022 11:52:30 +0000 (12:52 +0100)] 
boot: Properly check status code of console_key_read

In some cases there was a unlikely possibility that we would look
at an uninitialized key value.
Also, returning in case of unexpected input error cases should prevent
infinite looping.

3 years agoMerge pull request #22584 from poettering/systemctl-verb-renamed
Lennart Poettering [Tue, 22 Feb 2022 15:16:58 +0000 (16:16 +0100)] 
Merge pull request #22584 from poettering/systemctl-verb-renamed

systemctl: rename "verb" entrypoint functions systematically to verb_xyz()

3 years agoanalyze: fix build on non-seccomp builds
Lennart Poettering [Tue, 22 Feb 2022 10:40:53 +0000 (11:40 +0100)] 
analyze: fix build on non-seccomp builds

Follow-up for #22585

See: https://github.com/systemd/systemd/pull/22585#issuecomment-1047658990

3 years agosystemctl: rework daemon_reload() functions 22584/head
Lennart Poettering [Mon, 21 Feb 2022 16:11:52 +0000 (17:11 +0100)] 
systemctl: rework daemon_reload() functions

Let's split out the inner parts of verb_daemon_reload() as a function
daemon_reload() and then stop using the former outside of the verbs
logic, and instead call the latter whenever we need to reload the daemon
as auxiliary opeation.

This should make our logic more systematic as we don't have to provide
fake or misleading argc/argv to verb_daemon_reload() anymore.

3 years agosystemctl: systematically rename verb entrypoints verb_xyz()
Lennart Poettering [Mon, 21 Feb 2022 15:30:45 +0000 (16:30 +0100)] 
systemctl: systematically rename verb entrypoints verb_xyz()

Let's clean up our function naming a bit, and always name the
verb_xyz(), where the xyz maps to the command line verb as closely as
possible.

No actual code changes, just an attempt to make the systemctl sources a
bit more systematic, and less surprising.