]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 years agosystemctl: remove comment about --failed being deprecated 18506/head
Zbigniew Jędrzejewski-Szmek [Tue, 9 Feb 2021 13:14:16 +0000 (14:14 +0100)] 
systemctl: remove comment about --failed being deprecated

Follow-up for bef19548a2430909019d7cff095b8600c796c3ef.

4 years agofuzz-systemctl-parse-argv: a new fuzzer
Zbigniew Jędrzejewski-Szmek [Sun, 7 Feb 2021 17:30:42 +0000 (18:30 +0100)] 
fuzz-systemctl-parse-argv: a new fuzzer

Does what the name suggests. Obviously inspired by sudoers, but note that
our tools are not supposed to be installed suid, so there is no privilege
boundary to cross here.

4 years agoxdg-autostart-generator: sort header includes
Zbigniew Jędrzejewski-Szmek [Sun, 7 Feb 2021 17:29:35 +0000 (18:29 +0100)] 
xdg-autostart-generator: sort header includes

4 years agosystemctl: move telinit execcing out of parse_argv()
Zbigniew Jędrzejewski-Szmek [Sun, 7 Feb 2021 16:35:06 +0000 (17:35 +0100)] 
systemctl: move telinit execcing out of parse_argv()

With this change, parse_argv() does parsing, without any real actions.
Fully untested ;)

4 years agocore: drop references to Upstart
Zbigniew Jędrzejewski-Szmek [Sun, 7 Feb 2021 16:02:56 +0000 (17:02 +0100)] 
core: drop references to Upstart

The last release of Upstart was July 2014 [1], and there have been no new
commits to the repo. We should move on too.
[1] https://lists.ubuntu.com/archives/upstart-devel/2014-July/003313.html

The only real support was in the code that looked for $PREVLEVEL.
https://codesearch.debian.net/search?q=PREVLEVEL&literal=1&perpkg=1 shows this
string in our own code (or the copy in elogind), our own man pages, and init
scripts for two packages (brltty, salt), which shouldn't be used with systemd.
(And both *check* for PREVLEVEL, and don't set it. So most likely nothing at
all sets it.)

4 years agohwdb: add Acecad Flair / Pentagram Quadpen (#18443)
cprn [Sun, 7 Feb 2021 11:33:43 +0000 (12:33 +0100)] 
hwdb: add Acecad Flair / Pentagram Quadpen (#18443)

4 years agoMerge pull request #18490 from keszybz/prettify-update-dbus-docs
Luca Boccassi [Sat, 6 Feb 2021 15:36:39 +0000 (15:36 +0000)] 
Merge pull request #18490 from keszybz/prettify-update-dbus-docs

Prettify update-dbus-docs

4 years agoupdate-dbus-docs: use color in summary 18490/head
Zbigniew Jędrzejewski-Szmek [Sat, 6 Feb 2021 09:02:37 +0000 (10:02 +0100)] 
update-dbus-docs: use color in summary

4 years agoupdate-dbus-docs: say "MODIFIED" not "OUTDATED"
Zbigniew Jędrzejewski-Szmek [Sat, 6 Feb 2021 08:42:54 +0000 (09:42 +0100)] 
update-dbus-docs: say "MODIFIED" not "OUTDATED"

When executed in test mode, "OUTDATED" is appropriate. But when executed
to actually update the text, after the tool executes, those pages are the
opposite, not outdated.

4 years agocopy: use stat_verify_directory() where appropriate
Lennart Poettering [Mon, 1 Feb 2021 16:03:19 +0000 (17:03 +0100)] 
copy: use stat_verify_directory() where appropriate

4 years agoman: fix misspellings of "NameSeviceSwitch"
Julia Cartwright [Fri, 5 Feb 2021 21:16:18 +0000 (15:16 -0600)] 
man: fix misspellings of "NameSeviceSwitch"

Fixup NameSeviceSwitch -> NameServiceSwitch spelling error in
documentation.

Found through inspection of documentation.

4 years agoTranslations update from Weblate (#18485)
Weblate (bot) [Fri, 5 Feb 2021 23:54:58 +0000 (00:54 +0100)] 
Translations update from Weblate (#18485)

* Translated using Weblate (Swedish)

Currently translated at 100.0% (189 of 189 strings)

Translation: systemd/main
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/sv/

Co-authored-by: Göran Uddeborg <goeran@uddeborg.se>
4 years agogithub: ask for systemd version in RFE form
Lennart Poettering [Fri, 5 Feb 2021 23:14:47 +0000 (00:14 +0100)] 
github: ask for systemd version in RFE form

It happens too often that what people ask for already is implemented.
Let's help cut the noise a bit, and make people check things first
hopefully, and at least make it either for us to detect such cases.

4 years agoresolved: suppress ifindex info in varlink JSON responses if zero
Lennart Poettering [Fri, 5 Feb 2021 17:43:55 +0000 (18:43 +0100)] 
resolved: suppress ifindex info in varlink JSON responses if zero

If we don't have ifindex info, don't set the field for it.

We already do that for parsed IP address replies, let's do it for all
cases: it's a bit nicer to suppress the ifindex prop if it doesn't apply
than to pass it invalid.

This is the other side of #18482, i.e. fixes things so that the parser
doesn't get tripped up by this.

(This too makes a problem go away we should track down properly, i.e.
figure out how the ifindex got lost in
https://github.com/systemd/systemd/pull/17823#issuecomment-742439422 )

4 years agoMerge pull request #18482 from poettering/resolved-nss-varlink-ifindex-fix
Lennart Poettering [Fri, 5 Feb 2021 23:16:28 +0000 (00:16 +0100)] 
Merge pull request #18482 from poettering/resolved-nss-varlink-ifindex-fix

nss-resolve: handle zero ifindex reply from server

4 years agonss-resolve: shortcut fixing of ifindex if it's zero anyway 18482/head
Lennart Poettering [Fri, 5 Feb 2021 17:46:18 +0000 (18:46 +0100)] 
nss-resolve: shortcut fixing of ifindex if it's zero anyway

4 years agonss-resolve: accept zero ifindex when parsing resolved reply
Lennart Poettering [Fri, 5 Feb 2021 17:44:22 +0000 (18:44 +0100)] 
nss-resolve: accept zero ifindex when parsing resolved reply

Sometimes a reply isn't associated to any specific interface, it might
be a general truth (for example served from /etc/hosts or so). In this
case the server might pass ifindex == 0. Accept that.

https://github.com/systemd/systemd/pull/17823#issuecomment-742439422

4 years agoMerge pull request #18318 from yuwata/network-route-table-name
Lennart Poettering [Fri, 5 Feb 2021 17:08:56 +0000 (18:08 +0100)] 
Merge pull request #18318 from yuwata/network-route-table-name

network: RouteTable= improvements

4 years agoPATCH] Always free deserialized_subscribed on reload
Ali Abdallah [Thu, 21 Jan 2021 06:37:21 +0000 (07:37 +0100)] 
PATCH] Always free deserialized_subscribed on reload

Otherwise, it will keep consuming memory on systemctl daemon-reload.

4 years agoRevert "resolvectl: Add show-multicast verb to show discovered LLMNR/mDNS hosts"
Lennart Poettering [Thu, 4 Feb 2021 15:05:05 +0000 (16:05 +0100)] 
Revert "resolvectl: Add show-multicast verb to show discovered LLMNR/mDNS hosts"

4 years agoMerge pull request #18472 from poettering/conservative-rename-fix
Lennart Poettering [Thu, 4 Feb 2021 21:08:47 +0000 (22:08 +0100)] 
Merge pull request #18472 from poettering/conservative-rename-fix

fix conservative_renameat()

4 years agoman: fix typo
Yu Watanabe [Thu, 4 Feb 2021 18:12:13 +0000 (03:12 +0900)] 
man: fix typo

4 years agocore: map io.bfq.weight to 1..1000
Zbigniew Jędrzejewski-Szmek [Thu, 4 Feb 2021 08:48:19 +0000 (09:48 +0100)] 
core: map io.bfq.weight to 1..1000

Aaargh. See the comment in the code.

Apparently the range is like that:
$ sudo bash -c 'echo "default 1001" >/sys/fs/cgroup/user.slice/io.bfq.weight'
bash: line 0: echo: write error: Numerical result out of range

$ uname -r
5.11.0-0.rc4.129.fc34.x86_64

4 years agotest-fs-util: beef up test for conservative_renameat() 18472/head
Lennart Poettering [Thu, 4 Feb 2021 17:08:30 +0000 (18:08 +0100)] 
test-fs-util: beef up test for conservative_renameat()

Instead of using a short fixed string, let's use a huge blob for
testing, with randomized size and contents, that definitely is above the
16K buffer size conservative_renameat() uses internally.

4 years agofs-util: make sure conservative_renameat() properly detects identity of longer files
Lennart Poettering [Thu, 4 Feb 2021 17:06:54 +0000 (18:06 +0100)] 
fs-util: make sure conservative_renameat() properly detects identity of longer files

The old code got confused with files with a size >16K. Let's fix that.

Noticed by @benjarobin

Replaces: #18442

4 years agoxdg-autostart: Generate autostart services with templated name
David Edmundson [Wed, 3 Feb 2021 12:29:28 +0000 (12:29 +0000)] 
xdg-autostart: Generate autostart services with templated name

The "XDG standardization for applications" specification states that
services should be in the form:

app[-<launcher>]-<ApplicationID>[@<RANDOM>].service or
app[-<launcher>]-<ApplicationID>-<RANDOM>.scope

In this case "autostart" takes the place of [RANDOM] to provide a unique
identifier if the same app is launched elsewhere. As it is a service
that means it should be set as a template not using a hyphen delimiter.

4 years agoboot: Replace efivar_set() persistent argument with flags argument
Daan De Meyer [Wed, 3 Feb 2021 00:24:32 +0000 (00:24 +0000)] 
boot: Replace efivar_set() persistent argument with flags argument

To add secure-boot enrolling support, we need to be able to specify
the EFI_VARIABLE_APPEND_WRITE flag so let's make the efivar_set()
methods more generic so we can set that flag.

4 years agoman: reword the description of "main conf file"
Zbigniew Jędrzejewski-Szmek [Thu, 4 Feb 2021 10:05:39 +0000 (11:05 +0100)] 
man: reword the description of "main conf file"

While not really "wrong", the text we had could use a little editing.

Fixes #18458.

4 years agoMerge pull request #18444 from anitazha/proprename
Zbigniew Jędrzejewski-Szmek [Thu, 4 Feb 2021 11:53:10 +0000 (12:53 +0100)] 
Merge pull request #18444 from anitazha/proprename

oom: parse properties with 1/10000 precision instead of 1/100

4 years agoMerge pull request #18355 from DaanDeMeyer/resolved-discover
Zbigniew Jędrzejewski-Szmek [Thu, 4 Feb 2021 09:37:21 +0000 (10:37 +0100)] 
Merge pull request #18355 from DaanDeMeyer/resolved-discover

resolvectl: Add show-multicast verb to show discovered LLMNR/mDNS hosts

4 years agoMerge pull request #18462 from poettering/copy-time
Yu Watanabe [Thu, 4 Feb 2021 05:04:37 +0000 (14:04 +0900)] 
Merge pull request #18462 from poettering/copy-time

timestamp fixes in copy.c

4 years agoimport: use +i (immutable) chattr flag for marking OS images read-only
Lennart Poettering [Wed, 3 Feb 2021 21:24:53 +0000 (22:24 +0100)] 
import: use +i (immutable) chattr flag for marking OS images read-only

This is what nspawn and machine-image.[ch] actually look for, hence us
it here too.

4 years agoimport: fix etag detection support
Lennart Poettering [Tue, 2 Feb 2021 17:24:53 +0000 (18:24 +0100)] 
import: fix etag detection support

Let's make sure we still look at the etags reported by http 304 (i.e.
the cache management code). Otherwise we won't properly realize we
already downloaded this before.

This fixes a bug introduced in 6792cbbcf84b730f465decbeaf247c6b1ccf1c18

4 years agoMerge pull request #18459 from poettering/discover-image
Yu Watanabe [Thu, 4 Feb 2021 04:57:37 +0000 (13:57 +0900)] 
Merge pull request #18459 from poettering/discover-image

shared: rename machine-image.[ch] → discover-image.[ch]

4 years agopath-util: tighten path_is_valid() checks
Lennart Poettering [Mon, 25 Jan 2021 18:41:59 +0000 (19:41 +0100)] 
path-util: tighten path_is_valid() checks

This tightens the path_is_valid() checking: it now tests whether each
component in the path is bound by FILENAME_MAX in its size.

4 years agocopy: simplify futimens() invocation 18462/head
Lennart Poettering [Mon, 1 Feb 2021 16:01:14 +0000 (17:01 +0100)] 
copy: simplify futimens() invocation

4 years agocopy: also attempt to copy atime/mtime when copying symlinks, device nodes, fifos
Lennart Poettering [Mon, 1 Feb 2021 15:57:46 +0000 (16:57 +0100)] 
copy: also attempt to copy atime/mtime when copying symlinks, device nodes, fifos

4 years agodiscover-image: don't mix two types of stack allocation in one line 18459/head
Lennart Poettering [Wed, 3 Feb 2021 22:12:30 +0000 (23:12 +0100)] 
discover-image: don't mix two types of stack allocation in one line

4 years agoshared: rename machine-image.[ch] → discover-image.[ch]
Lennart Poettering [Wed, 3 Feb 2021 21:37:40 +0000 (22:37 +0100)] 
shared: rename machine-image.[ch] → discover-image.[ch]

The old name originates when this was used to discover "machine" images,
as managed by machined/machinectl. But nowadays this is also used by
portable services and system extensions, hence let's use a more generic
name for this API. Taking inspiration from "dissect-image.[ch]", let's call
this "discover-image.[ch]".

This is pure renaming, no other changes.

4 years agotest-network: disable NDISC on veth-peer
Yu Watanabe [Wed, 3 Feb 2021 14:41:22 +0000 (23:41 +0900)] 
test-network: disable NDISC on veth-peer

This should speed the tests up.

4 years agoDeprecate builds with split-usr, prepare for removal
Zbigniew Jędrzejewski-Szmek [Wed, 3 Feb 2021 09:20:49 +0000 (10:20 +0100)] 
Deprecate builds with split-usr, prepare for removal

There is no technical reason to support systems with split-usr, except for
backwards compatibility. Even though systemd itself makes an effort to support
this, many other tools aren't as careful. Despite those efforts, we
(collectively) get it wrong often, because doing it "wrong" on systems with
merged-usr has no consequences. Since almost all developers are on such
systems, any issues are only discovered late. Supporting this split-usr mode
makes both code and documentation more complicated. The split is purely
artificial and has no justification except to allow old installation to not
update. Mechanisms to update existing systems are available though: Fedora
did that in https://fedoraproject.org/wiki/Features/UsrMove, Debian has
the usrmerge package.

The next version of Debian will only support systems with split-usr=false,
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=978636#178:

  The Technical Committee resolves that Debian 'bookworm' should
  support only the merged-usr root filesystem layout, dropping support
  for the non-merged-usr layout.

Let's start warning if split-usr mode is used, in preparation to removing the
split in one of the future releases.

4 years agoTranslated using Weblate (Swedish) (#18457)
Weblate (bot) [Wed, 3 Feb 2021 21:08:24 +0000 (22:08 +0100)] 
Translated using Weblate (Swedish) (#18457)

Currently translated at 94.1% (178 of 189 strings)

Co-authored-by: Göran Uddeborg <goeran@uddeborg.se>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/sv/
Translation: systemd/main

4 years agonetwork: correct name of parameter in function prototype
Kevin P. Fleming [Wed, 3 Feb 2021 12:18:00 +0000 (07:18 -0500)] 
network: correct name of parameter in function prototype

The output parameter of `sd_rtnl_message_neigh_get_ifindex` is called `index`,
not `family`.

4 years agoMerge pull request #18319 from yuwata/udev-move-tx-rx-queues
Yu Watanabe [Wed, 3 Feb 2021 09:18:57 +0000 (18:18 +0900)] 
Merge pull request #18319 from yuwata/udev-move-tx-rx-queues

network,udev: move TransmitQueues=/ReceiveQueues= from .network to .link

4 years agologind: simplify flags handling a bit
Lennart Poettering [Tue, 2 Feb 2021 14:27:30 +0000 (15:27 +0100)] 
logind: simplify flags handling a bit

Let's split out the two codepaths a bit, and emphasize which ones it the
new-style and which the old-style codepath, and let's clearly convert
the params of the old-stye into the new style for further processing, so
that the old style path is brief and isolated.

No change in behaviour.

Follow-up for: 8885fed4e3a52cf1bf105e42043203c485ed9d92

4 years agoMerge pull request #18423 from DaanDeMeyer/sd-boot-no-include
Yu Watanabe [Wed, 3 Feb 2021 06:04:26 +0000 (15:04 +0900)] 
Merge pull request #18423 from DaanDeMeyer/sd-boot-no-include

More sd-boot cleanups

4 years agonetwork,udev: move TransmitQueues=/ReceiveQueues= from .network to .link 18319/head
Yu Watanabe [Wed, 20 Jan 2021 06:50:01 +0000 (15:50 +0900)] 
network,udev: move TransmitQueues=/ReceiveQueues= from .network to .link

As the settings are mostly hardware setup, and merely see from network
layer.

See also discussions in
https://github.com/systemd/systemd/pull/18170#issuecomment-758807497
https://github.com/orgs/systemd/teams/systemd/discussions/1

4 years agoudev: rename TxQueueLength= -> TransmitQueueLength=
Yu Watanabe [Wed, 20 Jan 2021 06:29:56 +0000 (15:29 +0900)] 
udev: rename TxQueueLength= -> TransmitQueueLength=

As we usually (unfortunately not always though) do not use abbreviations.

Tx may be standard abbreviation, but we already have e.g.
TransmitChecksumOffload=. So, let's use Transmit instead of Tx.

Follow-up for ef4a91a7e8d8337a9d65177b09eb7580b25b8f5d.

4 years agotest: add tests for RouteTable= setting 18318/head
Yu Watanabe [Wed, 20 Jan 2021 10:34:30 +0000 (19:34 +0900)] 
test: add tests for RouteTable= setting

4 years agonetwork: use defined route table name in debug logs
Yu Watanabe [Wed, 20 Jan 2021 06:19:41 +0000 (15:19 +0900)] 
network: use defined route table name in debug logs

And rename route_table_from_string_full() to
manager_get_route_table_from_string().

4 years agonetwork: make RouteTable= setting can take multiple name:number pairs in a line
Yu Watanabe [Wed, 20 Jan 2021 05:33:21 +0000 (14:33 +0900)] 
network: make RouteTable= setting can take multiple name:number pairs in a line

Follow-up for c038ce4606f93d9e58147f87703125270fb744e2.

4 years agooom: rework *MemoryPressureLimit= properties to have 1/10000 precision 18444/head
Anita Zhang [Tue, 2 Feb 2021 22:16:03 +0000 (14:16 -0800)] 
oom: rework *MemoryPressureLimit= properties to have 1/10000 precision

Requested in
https://github.com/systemd/systemd/pull/15206#discussion_r505506657,
preserve the full granularity for memory pressure limits (permyriad)
instead of capping out at percent.

4 years agoci: build with -Werror on Fedora
Frantisek Sumsal [Tue, 2 Feb 2021 16:02:12 +0000 (17:02 +0100)] 
ci: build with -Werror on Fedora

Prompted by: https://github.com/systemd/systemd/pull/18400#issuecomment-771602705

4 years agopath-util: tighten path_extract_filename()
Lennart Poettering [Mon, 25 Jan 2021 18:50:47 +0000 (19:50 +0100)] 
path-util: tighten path_extract_filename()

Let's tighten the logic behind path_extract_filename() a bit: first of
all, refuse all cases of invalid paths with -EINVAL. More importantly
though return a recognizable error when a valid path is specified that
does not contain any filename. Specifically, "/" will now result in
-EADDRNOTAVAIL.

This changes API, but none of the existing callers care about the return
value, hence the change should be fine.

4 years agoMerge pull request #18435 from keszybz/oomd-readiness-and-other-tweaks
Luca Boccassi [Tue, 2 Feb 2021 23:15:19 +0000 (23:15 +0000)] 
Merge pull request #18435 from keszybz/oomd-readiness-and-other-tweaks

Mark oomd as supported and other tweaks

4 years agoboot: Add startswith() and endswith() functions with no_case variants 18423/head
Daan De Meyer [Tue, 2 Feb 2021 22:27:09 +0000 (22:27 +0000)] 
boot: Add startswith() and endswith() functions with no_case variants

Adapted from string-util

4 years agoboot: Drop unnecessary braces
Daan De Meyer [Mon, 1 Feb 2021 22:02:08 +0000 (22:02 +0000)] 
boot: Drop unnecessary braces

4 years agoboot: Fix void pointer arithmetic warning
Daan De Meyer [Sun, 31 Jan 2021 21:49:17 +0000 (21:49 +0000)] 
boot: Fix void pointer arithmetic warning

4 years agoboot: Replace raw efivar gets with typed variants
Daan De Meyer [Mon, 1 Feb 2021 21:57:58 +0000 (21:57 +0000)] 
boot: Replace raw efivar gets with typed variants

4 years agoboot: Add efivar_get/set_uint64_le() functions
Daan De Meyer [Mon, 1 Feb 2021 21:56:30 +0000 (21:56 +0000)] 
boot: Add  efivar_get/set_uint64_le() functions

These are implemented as bit-shifting functions that allow reading
and writing UEFI variables stored as little endian 64-bit unsigned
values.

4 years agoboot: Rename efivar_get/set_int() to efivar_get/set_uint_string()
Daan De Meyer [Mon, 1 Feb 2021 22:32:26 +0000 (22:32 +0000)] 
boot: Rename efivar_get/set_int() to efivar_get/set_uint_string()

Let's clearly indicate that these are used to set/get uints that
are stored as strings.

4 years agoboot: Tighten scope of variables used in loops
Daan De Meyer [Mon, 1 Feb 2021 22:31:47 +0000 (22:31 +0000)] 
boot: Tighten scope of variables used in loops

4 years agoboot: Add efivar_get_boolean_u8()
Daan De Meyer [Sun, 31 Jan 2021 10:56:21 +0000 (10:56 +0000)] 
boot: Add efivar_get_boolean_u8()

4 years agoMerge pull request #18432 from yuwata/libude-list-cleanups
Lennart Poettering [Tue, 2 Feb 2021 14:05:46 +0000 (15:05 +0100)] 
Merge pull request #18432 from yuwata/libude-list-cleanups

libudev: cleanups for libudev-list

4 years agomeson: use ellipses for ranges 18435/head
Zbigniew Jędrzejewski-Szmek [Tue, 2 Feb 2021 13:39:48 +0000 (14:39 +0100)] 
meson: use ellipses for ranges

C.f. 1d3a473b4a0a4a0c49963297103af16ff6d841fa.

4 years agomeson: take oomd out of the doghouse
Zbigniew Jędrzejewski-Szmek [Tue, 2 Feb 2021 13:38:19 +0000 (14:38 +0100)] 
meson: take oomd out of the doghouse

It's on by default in Fedora 34 [1], so we can't say it's just a preview.

[1] https://fedoraproject.org/wiki/Changes/EnableSystemdOomd

4 years agoman: move content from the wiki to systemd.preset(5)
Zbigniew Jędrzejewski-Szmek [Sun, 31 Jan 2021 15:48:44 +0000 (16:48 +0100)] 
man: move content from the wiki to systemd.preset(5)

The wiki was slightly stale, and almost all the information there
was already present in the man page. I moved the remaing part (discussion)
into the man page and adjusted all links to point to the man page instead.

daemon(7) has a some examples of packaging scriptlets… I don't think it fits
there very well. Most likely they should be moved to systemd.preset(5) or maybe
even removed, but I'm leaving that for later.

4 years agomeson: remove one more instance of install_dir:bindir
Zbigniew Jędrzejewski-Szmek [Tue, 2 Feb 2021 13:19:59 +0000 (14:19 +0100)] 
meson: remove one more instance of install_dir:bindir

bindir is the default, c.f. a1fd722b5df83e526cb5feb3fb271ffe1d903472.

4 years agologind: Introduce RebootWithFlags and others
Deepak Rawat [Mon, 25 Jan 2021 17:14:08 +0000 (09:14 -0800)] 
logind: Introduce RebootWithFlags and others

Add new systemd-logind WithFlags version for Reboot and others. These
methods add a unit64 parameter, with which can send additional control flags.

4 years agoparse-util: add permyriad parsing
Anita Zhang [Tue, 2 Feb 2021 09:47:08 +0000 (01:47 -0800)] 
parse-util: add permyriad parsing

4 years agolibudev: add one more assertion 18432/head
Yu Watanabe [Mon, 1 Feb 2021 18:23:31 +0000 (03:23 +0900)] 
libudev: add one more assertion

4 years agolibudev: unset uptodate flag before free()ing entries
Yu Watanabe [Mon, 1 Feb 2021 17:34:20 +0000 (02:34 +0900)] 
libudev: unset uptodate flag before free()ing entries

udev_list_entry_free() also removes the entry from LIST if the flag is
set. This slightly optimizes the cleanup logic.

4 years agolibudev: also drop the entry from LIST even if unique flag is set
Yu Watanabe [Mon, 1 Feb 2021 17:16:01 +0000 (02:16 +0900)] 
libudev: also drop the entry from LIST even if unique flag is set

Otherwise, the list becomes dirty when an entry is freed.

This also remove the entry from the hashmap only when its name is set.
The name should be always set, so that does not change anything. But
just for safety.

4 years agolibudev: set entry->list after the entry is stored in the list
Yu Watanabe [Mon, 1 Feb 2021 17:18:49 +0000 (02:18 +0900)] 
libudev: set entry->list after the entry is stored in the list

This should not change anything. As hashmap_remove() is called before
hashmap_ensure_put(). So, even if hashmap_ensure_put() fails, a wrong
entry will not removed from the hashmap by udev_list_entry_free().
But anyway, just for safety.

4 years agolibudev: use hashmap_ensure_put()
Yu Watanabe [Mon, 1 Feb 2021 17:16:42 +0000 (02:16 +0900)] 
libudev: use hashmap_ensure_put()

4 years agooss-fuzz: show meson logs
Evgeny Vereshchagin [Mon, 1 Feb 2021 12:40:57 +0000 (12:40 +0000)] 
oss-fuzz: show meson logs

It should help to make it more clear what causes issues like
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=30140
and https://github.com/google/oss-fuzz/pull/5084

4 years agotools: make update-dbus-docs compatible with Python 3.6
Anita Zhang [Mon, 1 Feb 2021 03:04:34 +0000 (19:04 -0800)] 
tools: make update-dbus-docs compatible with Python 3.6

668b3a42fe9e250912bd3efa4460ed691452d9bf allowed update-dbus-docs.py to start
running on Cent OS 8 (instead of skipping). But subprocess.check_output()'s
text argument didn't exist until Python 3.7 and C8 is still running
Python 3.6. Use universal_newlines instead for backwards compatibility.

4 years agoboot: Make all efivar util functions take the guid as an argument
Daan De Meyer [Sat, 30 Jan 2021 23:25:24 +0000 (23:25 +0000)] 
boot: Make all efivar util functions take the guid as an argument

Let's make these functions a little more generic so we can have
them work on more than one GUID. More specifically, this allows
using them with the global guid which will be used a bit more to
extend the secure boot support.

4 years agoboot: Turn all guid constants into C99 compound initializers
Daan De Meyer [Sat, 30 Jan 2021 23:10:13 +0000 (23:10 +0000)] 
boot: Turn all guid constants into C99 compound initializers

Avoids having to use the address operator all the time and
avoids having to cast or do other unintuitive stuff.

4 years agoboot: Enable C99
Daan De Meyer [Sat, 30 Jan 2021 23:02:24 +0000 (23:02 +0000)] 
boot: Enable C99

Instead of using -nostdinc, we use -nostdlib. This is necessary
to allow moving to C99 as efibind.h includes stdint.h when C99
is enabled. It isn't necessarily problematic to use some standard
library headers as long as they don't contain functions defined in
libc or another system library (or in other words, header only
headers are fine to use in sd-boot).

4 years agoboot: Move Secure Boot logic to new file
Daan De Meyer [Sat, 30 Jan 2021 22:18:01 +0000 (22:18 +0000)] 
boot: Move Secure Boot logic to new file

4 years agohwdb: Add evdev for Huawei EUL-XW9
Simonas Kazlauskas [Sat, 30 Jan 2021 13:52:32 +0000 (15:52 +0200)] 
hwdb: Add evdev for Huawei EUL-XW9

The device is very similar to MACH-WX9 in many ways, including this
particular one. Adding these rules gets rid of evdev warnings as buttons
are being pressed on this device.

4 years agonetwork: drop one more link_dirty()
Yu Watanabe [Sun, 31 Jan 2021 13:31:32 +0000 (22:31 +0900)] 
network: drop one more link_dirty()

Follow-up for 9092113d93f61d67605f7c4a824b65a56b33fa59.

link_dirty() will be called later in this function when a DNS or domain
is dropped.

4 years agoMerge pull request #18417 from DaanDeMeyer/sd-boot-no-include
Yu Watanabe [Sun, 31 Jan 2021 13:26:59 +0000 (22:26 +0900)] 
Merge pull request #18417 from DaanDeMeyer/sd-boot-no-include

sd-boot fixes

4 years agosd-boot: Add missing includes 18417/head
Daan De Meyer [Sat, 30 Jan 2021 17:21:48 +0000 (17:21 +0000)] 
sd-boot: Add missing includes

Let's make all headers self-sufficient by including the necessary
EFI headers in the headers themselves.

4 years agosd-boot: Make internal functions static
Daan De Meyer [Sat, 30 Jan 2021 17:10:29 +0000 (17:10 +0000)] 
sd-boot: Make internal functions static

4 years agoresolve: Add show-multicast verb 18355/head
Daan De Meyer [Sat, 23 Jan 2021 17:36:32 +0000 (17:36 +0000)] 
resolve: Add show-multicast verb

The show-multicast verb calls the GetMulticastHosts() D-Bus method
and displays all its results formatted into a table.

4 years agotree-wide: Drop custom formatting for print() help messages
Daan De Meyer [Sat, 30 Jan 2021 14:13:04 +0000 (14:13 +0000)] 
tree-wide: Drop custom formatting for print() help messages

I think this formatting was originally used because it simplified
adding new options to the help messages. However, these days, most
tools their help message end with "\nSee the %s for details.\n" so
the final line almost never has to be edited which eliminates the
benefit of the custom formatting used for printf() help messages.
Let's make things more consistent and use the same formatting for
printf() help messages that we use everywhere else.

Prompted by https://github.com/systemd/systemd/pull/18355#discussion_r567241580

4 years agoman: fix small issue in AllowedMemoryNodes description
Pavel Hrdina [Sat, 30 Jan 2021 17:03:40 +0000 (18:03 +0100)] 
man: fix small issue in AllowedMemoryNodes description

It should not mention "CPU" but "NUMA nodes".

4 years agoMerge pull request #18320 from yuwata/network-reduce-trigger-network-events
Zbigniew Jędrzejewski-Szmek [Sat, 30 Jan 2021 14:30:17 +0000 (15:30 +0100)] 
Merge pull request #18320 from yuwata/network-reduce-trigger-network-events

network: do not trigger unnecessary network events

4 years agoresolve: Add GetMulticastHosts() D-Bus method
Daan De Meyer [Sat, 23 Jan 2021 17:33:24 +0000 (17:33 +0000)] 
resolve: Add GetMulticastHosts() D-Bus method

GetMulticastHosts() returns an array of hostnames/addresses discovered via
LLMNR or Multicast DNS. It does not trigger any discovery on its own.
Instead, it simply returns whatever is already in resolved's cache.

4 years agomkosi: Add a postinstall script to setup .gdbinit.
Daan De Meyer [Sat, 23 Jan 2021 17:26:33 +0000 (17:26 +0000)] 
mkosi: Add a postinstall script to setup .gdbinit.

systemd is compiled with relative source file paths so we need to
issue a directory command to make sure gdb can find systemd's
source files. Let's put this in a .gdbinit file so it's executed
automatically when we run gdb.

4 years agoman: make it clear how systemd calculate the DefaultTasksMax.
Einsler Lee [Sat, 30 Jan 2021 03:14:35 +0000 (11:14 +0800)] 
man: make it clear how systemd calculate the DefaultTasksMax.

Actually, systemd takes the minimum of
* a) the maximum tasks value the kernel allows on this architecture
* b) the cgroups pids_max attribute for the system
* c) the kernel's configured maximum PID value
to calculate the DefaultTasksMax. Here, kernel.thread-max should also be methioned.

4 years agoMerge pull request #18407 from keszybz/resolved-reference-counting-again
Daan De Meyer [Fri, 29 Jan 2021 23:04:46 +0000 (23:04 +0000)] 
Merge pull request #18407 from keszybz/resolved-reference-counting-again

Use reference counting for DnsQueryCandidate

4 years agoMerge pull request #18399 from keszybz/man-proofreading
Lennart Poettering [Fri, 29 Jan 2021 19:04:07 +0000 (20:04 +0100)] 
Merge pull request #18399 from keszybz/man-proofreading

Various man page cleanups

4 years agoMerge pull request #18408 from poettering/import-fixlets3
Lennart Poettering [Fri, 29 Jan 2021 18:01:50 +0000 (19:01 +0100)] 
Merge pull request #18408 from poettering/import-fixlets3

5 more small fixes to importd

4 years agohwdb: check for the right set of MOUSE_WHEEL_CLICK_ properties
Peter Hutterer [Fri, 29 Jan 2021 04:57:30 +0000 (14:57 +1000)] 
hwdb: check for the right set of MOUSE_WHEEL_CLICK_ properties

As documented at the top of the file we require the normal property if we have
the horizontal property, and we require the CLICK_ANGLE property if the
CLICK_COUNT property is present. Codify this into the hwdb parser so we can
pick up on it.

4 years agoresolved: use reference counting for DnsQueryCandidate objects 18407/head
Zbigniew Jędrzejewski-Szmek [Fri, 29 Jan 2021 15:21:08 +0000 (16:21 +0100)] 
resolved: use reference counting for DnsQueryCandidate objects

Follow-up for 4ea8b443de. The logic that manages DnsQueryCandidate is rather
complicated: a calls to dns_query_complete() that wants to destroy a
DnsQueryCandidate can be nested inside a deep chain of calls. Using reference
counts seems like the simplest approach.

DnsSearchDomain already uses reference counting.

This patch effectively brings dns_query_candidate_go() to the state before
4ea8b443de, but wraps the iteration over DnsQueryCandidate.transactions in
dns_query_candidate_ref+dns_query_candidate_unref.

4 years agoresolved: minor cleanups
Zbigniew Jędrzejewski-Szmek [Fri, 29 Jan 2021 15:18:12 +0000 (16:18 +0100)] 
resolved: minor cleanups

4 years agoman: use ellipses for ranges in range descriptions 18399/head
Zbigniew Jędrzejewski-Szmek [Thu, 28 Jan 2021 19:42:37 +0000 (20:42 +0100)] 
man: use ellipses for ranges in range descriptions

… and in few other places ;)