]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 years agobasic/os-util: make the sentinel implicit
Zbigniew Jędrzejewski-Szmek [Fri, 19 Feb 2021 16:06:18 +0000 (17:06 +0100)] 
basic/os-util: make the sentinel implicit

3 years agoMove os-util.[ch] to basic/
Zbigniew Jędrzejewski-Szmek [Fri, 19 Feb 2021 15:51:18 +0000 (16:51 +0100)] 
Move os-util.[ch] to basic/

parse_os_release() will be used basic/hostname-util.c later on.

3 years agosysext: move extension_release_validate() out of os-util.c
Zbigniew Jędrzejewski-Szmek [Fri, 19 Feb 2021 15:36:07 +0000 (16:36 +0100)] 
sysext: move extension_release_validate() out of os-util.c

3 years agoos-release: add the DEFAULT_HOSTNAME= setting
Zbigniew Jędrzejewski-Szmek [Fri, 19 Feb 2021 14:08:07 +0000 (15:08 +0100)] 
os-release: add the DEFAULT_HOSTNAME= setting

The motivation is that variants of the same distro that share the same compiled
rpm want to customize various aspects of the system, in particular the
hostname. In some sense the default hostname is part of the identity of the
system, so setting it through os-release makes sense. In particular, instead of
setting a default value in /etc/hostname, the appropriate default can be baked
into the image, leaving /etc/hostname for local overrides only.

Why make this a separate field instead of e.g. using NAME from os-release?
NAME is already used for other purposes, and it seems likely that people want
to set those independently.

3 years agoman: use ~/.config instead of XDG_CONFIG_HOME
Zbigniew Jędrzejewski-Szmek [Fri, 19 Feb 2021 10:02:52 +0000 (11:02 +0100)] 
man: use ~/.config instead of XDG_CONFIG_HOME

e3820eeaf11f3b4614cbdfbc85675bc16a486e21 did that replacement XDG_CONFIG_HOME, in one
of two places. Let's use ~/.config everywhere.

Quoting https://github.com/systemd/systemd/pull/18704#discussion_r579465254:
> I'd really drop XDG_CONFIG_HOME from the docs. It's confusing enough as it
> is. Where we don't need the indirections we should not confuse people with
> it, in particular as people might then think it's actually a good idea to use
> that env var and redirect things. I'd just show the literal path everywhere,
> even if we internally use the env var.

3 years agomanager: add ManagerEnvironment configuration setting
Zbigniew Jędrzejewski-Szmek [Thu, 18 Feb 2021 23:06:26 +0000 (00:06 +0100)] 
manager: add ManagerEnvironment configuration setting

This is useful for various variables that modify process behaviour. This makes
it easy to set it for pid1 without touching the kernel command line. Even for
the *user manager* this also can be convenient for the unprivileged user, who
cannot modify user@.service definition.

Variables that could be set like this include $SD_EVENT_PROFILE_DELAYS,
$SYSTEMD_FALLBACK_HOSTNAME, $SYSTEMD_MEMPOOL, $SYSTMED_RDRAND, etc.

3 years agobasic/env-util: add putenv_dup()
Zbigniew Jędrzejewski-Szmek [Sat, 20 Feb 2021 18:25:32 +0000 (19:25 +0100)] 
basic/env-util: add putenv_dup()

3 years agoMerge pull request #18735 from poettering/some-doc-fixes
Zbigniew Jędrzejewski-Szmek [Mon, 22 Feb 2021 18:45:01 +0000 (19:45 +0100)] 
Merge pull request #18735 from poettering/some-doc-fixes

three documentation fixes

3 years agotest-network: add tests for Blackhole= setting in [NextHop] section 18718/head
Yu Watanabe [Sun, 14 Feb 2021 19:19:34 +0000 (04:19 +0900)] 
test-network: add tests for Blackhole= setting in [NextHop] section

3 years agonetwork: route: shorten code a bit
Yu Watanabe [Mon, 22 Feb 2021 17:21:31 +0000 (02:21 +0900)] 
network: route: shorten code a bit

3 years agonetwork: nexthop: add Blackhole= setting in [NextHop] section
Yu Watanabe [Sun, 14 Feb 2021 17:56:24 +0000 (02:56 +0900)] 
network: nexthop: add Blackhole= setting in [NextHop] section

As similar to unreachable type routes, blackhole nexthops do not have
NHA_OID attribute, so they are managed by Manager.

3 years agoman: try to improve documentation of conditions/asserts 18735/head
Lennart Poettering [Mon, 22 Feb 2021 17:12:34 +0000 (18:12 +0100)] 
man: try to improve documentation of conditions/asserts

Fixes: #18725
3 years agodocs: , → .
Lennart Poettering [Mon, 22 Feb 2021 17:00:14 +0000 (18:00 +0100)] 
docs: , → .

3 years agoman: correct documentaiton of StandardInput='s defaults in regards to "data"
Lennart Poettering [Mon, 22 Feb 2021 16:52:20 +0000 (17:52 +0100)] 
man: correct documentaiton of StandardInput='s defaults in regards to "data"

Fixes: #18710
3 years agocryptsetup: unescape ID_PART_ENTRY_NAME udev property before using it 18734/head
Lennart Poettering [Mon, 22 Feb 2021 16:38:02 +0000 (17:38 +0100)] 
cryptsetup: unescape ID_PART_ENTRY_NAME udev property before using it

Fixes: #18729
3 years agotree-wide: use sd_device_new_from_stat_rdev() whereever appropriate
Lennart Poettering [Mon, 22 Feb 2021 16:37:39 +0000 (17:37 +0100)] 
tree-wide: use sd_device_new_from_stat_rdev() whereever appropriate

3 years agobacklight: reindent comments 18731/head
Yu Watanabe [Mon, 22 Feb 2021 14:45:55 +0000 (23:45 +0900)] 
backlight: reindent comments

3 years agobacklight: reduce indentation a bit
Yu Watanabe [Mon, 22 Feb 2021 14:25:00 +0000 (23:25 +0900)] 
backlight: reduce indentation a bit

3 years agofuzz-systemctl-parse-argv: add "telinit" to the argv[0] list
Zbigniew Jędrzejewski-Szmek [Mon, 22 Feb 2021 10:19:59 +0000 (11:19 +0100)] 
fuzz-systemctl-parse-argv: add "telinit" to the argv[0] list

3 years agobacklight: same_device() may return negative errno
Yu Watanabe [Mon, 22 Feb 2021 14:11:28 +0000 (23:11 +0900)] 
backlight: same_device() may return negative errno

3 years agobacklight: exit earlier when unknown verb is specified
Yu Watanabe [Mon, 22 Feb 2021 14:00:46 +0000 (23:00 +0900)] 
backlight: exit earlier when unknown verb is specified

3 years agotest-network: test wireguard peer in drop-in config
Yu Watanabe [Mon, 22 Feb 2021 07:39:58 +0000 (16:39 +0900)] 
test-network: test wireguard peer in drop-in config

Closes #18241.

3 years agoresolved: set the AA bit for mDNS responses 18575/head
Sergey Bugaev [Sat, 13 Feb 2021 14:16:56 +0000 (17:16 +0300)] 
resolved: set the AA bit for mDNS responses

This is required by RFC 6762.

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

3 years agoresolved: set the AA bit for synthetic answers
Sergey Bugaev [Sat, 13 Feb 2021 14:09:09 +0000 (17:09 +0300)] 
resolved: set the AA bit for synthetic answers

The stub DNS server is authoritative for the RRs we synthesize, such as
localhost, _gateway, and entries from /etc/hosts, and also for trust anchors.

Partially fixes https://github.com/systemd/systemd/issues/17972

3 years agoMerge pull request #18684 from yuwata/sd-device-cleanups-and-udevadm-fix
Zbigniew Jędrzejewski-Szmek [Mon, 22 Feb 2021 10:32:38 +0000 (11:32 +0100)] 
Merge pull request #18684 from yuwata/sd-device-cleanups-and-udevadm-fix

sd-device, udev: several cleanups and one udevadm fix

3 years agomanager: read ~/.config/systemd/user.conf in user mode
Zbigniew Jędrzejewski-Szmek [Fri, 19 Feb 2021 09:56:04 +0000 (10:56 +0100)] 
manager: read ~/.config/systemd/user.conf in user mode

This changes the paths we read user manager config from in two ways:

- split-usr-root paths are dropped. The user manager is a poster boy for
  non-early-boot, so reading dropins only from /usr is appropriate.

- we look at ~/.config/systemd/user.conf. Users should be allowed to override
  their own config.

As user managers become more and more used, it becomes more important for users
to customize their own daemon. By reading from ~/.config, this is possible
without privileges.

3 years agoAdd DPI info for Kensington Trackball Expert Mouse in hwdb (#18709)
clayton craft [Mon, 22 Feb 2021 06:17:53 +0000 (22:17 -0800)] 
Add DPI info for Kensington Trackball Expert Mouse in hwdb (#18709)

The DPI value is from the manufacturer documentation, and freq measured
from mouse-dpi-tool

3 years agoUpdate docs about fdisk/gdisk support for discoverable partitions
wouter bolsterlee [Sun, 21 Feb 2021 17:00:55 +0000 (18:00 +0100)] 
Update docs about fdisk/gdisk support for discoverable partitions

This updates the docs about using fdisk/gdisk to make partitions with the right
partition type UUID as defined in the discoverable partitions spec.

Improve wording/grammar/formatting, and reflect that gdisk supports this as
well nowadays; see https://www.rodsbooks.com/gdisk/revisions.html

3 years agoman: Small fix of sd_bus_message_send() man page
Benjamin Robin [Sun, 21 Feb 2021 18:51:14 +0000 (19:51 +0100)] 
man: Small fix of sd_bus_message_send() man page

3 years agoman: correct the unit file directory for attached images
Tyler Hicks [Sun, 21 Feb 2021 18:53:22 +0000 (12:53 -0600)] 
man: correct the unit file directory for attached images

Commit 83f72cd65fb8 ("man,docs: document the new unit file directory for
attached images") updated the docs and man page with the new unit file
directory for attached images but included a system.attached ->
systemd.attached typo in the man page portion of the change. Fix the
typo to document the correct path.

3 years agoman: fix typo
Yu Watanabe [Sun, 21 Feb 2021 18:14:20 +0000 (03:14 +0900)] 
man: fix typo

3 years agoshared/conf-parser: allow more than one location of the main config file
Zbigniew Jędrzejewski-Szmek [Sat, 20 Feb 2021 16:04:05 +0000 (17:04 +0100)] 
shared/conf-parser: allow more than one location of the main config file

No functional change as long as only one path is passed.

3 years agoMerge pull request #18711 from yuwata/network-nexthop-onlink
Yu Watanabe [Sun, 21 Feb 2021 01:33:36 +0000 (10:33 +0900)] 
Merge pull request #18711 from yuwata/network-nexthop-onlink

network: nexthop: add OnLink= setting

3 years agotest-network: add a test for OnLink= in [NextHop] section 18711/head
Yu Watanabe [Sun, 14 Feb 2021 06:19:06 +0000 (15:19 +0900)] 
test-network: add a test for OnLink= in [NextHop] section

3 years agonetwork: nexthop: add OnLink= setting
Yu Watanabe [Sun, 14 Feb 2021 05:49:35 +0000 (14:49 +0900)] 
network: nexthop: add OnLink= setting

3 years agomount-tool: sd_device_get_sysattr_value() returns 0 on success 18684/head
Yu Watanabe [Sat, 20 Feb 2021 19:34:37 +0000 (04:34 +0900)] 
mount-tool: sd_device_get_sysattr_value() returns 0 on success

3 years agosd-device-enumerator: shorten code a bit
Yu Watanabe [Sat, 20 Feb 2021 19:33:01 +0000 (04:33 +0900)] 
sd-device-enumerator: shorten code a bit

3 years agounit: ignore exit code of "udevadm trigger"
Yu Watanabe [Thu, 18 Feb 2021 21:20:29 +0000 (06:20 +0900)] 
unit: ignore exit code of "udevadm trigger"

Suggested at https://github.com/systemd/systemd/pull/18559#issuecomment-781626226.

Some drivers may be broken and return unexpected errors on triggering
events. That should be logged but should not boot-up to be affected.

3 years agoudevadm-trigger: introduce --quiet option
Yu Watanabe [Sat, 20 Feb 2021 07:31:40 +0000 (16:31 +0900)] 
udevadm-trigger: introduce --quiet option

This may be useful to invoke the command by non-privileged users.

3 years agoudevadm-trigger: do not return immediately on EACCES
Yu Watanabe [Sat, 20 Feb 2021 07:30:23 +0000 (16:30 +0900)] 
udevadm-trigger: do not return immediately on EACCES

Prompted by https://github.com/systemd/systemd/pull/18559.

3 years agoudevadm-trigger: use sd_device_trigger() for triggering uevent
Yu Watanabe [Thu, 18 Feb 2021 16:03:22 +0000 (01:03 +0900)] 
udevadm-trigger: use sd_device_trigger() for triggering uevent

3 years agoudev: use sd_device_trigger() to trigger uevent
Yu Watanabe [Thu, 18 Feb 2021 15:51:12 +0000 (00:51 +0900)] 
udev: use sd_device_trigger() to trigger uevent

3 years agosd-device: introduce tiny wrapper sd_device_trigger()
Yu Watanabe [Sat, 20 Feb 2021 06:53:01 +0000 (15:53 +0900)] 
sd-device: introduce tiny wrapper sd_device_trigger()

3 years agosd-device: do not cache action string for uevent file written by sd_device_set_sysatt...
Yu Watanabe [Thu, 18 Feb 2021 22:02:44 +0000 (07:02 +0900)] 
sd-device: do not cache action string for uevent file written by sd_device_set_sysattr_value()

As sd_device_get_sysattr_value() may be already used to read uevent
file. The read value of uevent file may be usually quite different
from the action string.

3 years agotest: add more tests for path_startswith()
Yu Watanabe [Thu, 18 Feb 2021 15:49:37 +0000 (00:49 +0900)] 
test: add more tests for path_startswith()

3 years agosd-device: make devpath check stricter
Yu Watanabe [Thu, 18 Feb 2021 15:41:08 +0000 (00:41 +0900)] 
sd-device: make devpath check stricter

See assertion in sd_device_get_devpath().

3 years agosd-device: make sd_device_get_xxx() accept NULL for storing result
Yu Watanabe [Thu, 18 Feb 2021 15:28:16 +0000 (00:28 +0900)] 
sd-device: make sd_device_get_xxx() accept NULL for storing result

Though, setting NULL for some getters, e.g. sd_device_get_syspath()
may be meaningless, but anyway also let's make them accept NULL for
consistency.

3 years agosd-device: use appropriate error code
Yu Watanabe [Thu, 18 Feb 2021 14:38:04 +0000 (23:38 +0900)] 
sd-device: use appropriate error code

3 years agosd-device: add a brief comment in device_cache_sysattr_value()
Yu Watanabe [Sat, 20 Feb 2021 06:26:54 +0000 (15:26 +0900)] 
sd-device: add a brief comment in device_cache_sysattr_value()

3 years agosd-device: ignore error in device_cache_sysattr_value() and propagate original error...
Yu Watanabe [Thu, 18 Feb 2021 14:22:27 +0000 (23:22 +0900)] 
sd-device: ignore error in device_cache_sysattr_value() and propagate original error code

There are three calls of device_cache_sysattr_value(). Two of them are
just caching the value. Hence, let's ignore its failure, and propagate
original error code.

One exception is the last call in sd_device_get_sysattr_value().
Unfortunately, it returns `const char *` instead of `char *`. So,
sd_device object must have the reference of the returned value.
Hence, error in updating the cache by device_cache_sysattr_value()
is critical, and we need to propagate the error in that case.

3 years agosd-device: the last argument of sd_device_get_sysattr_value() may be NULL
Yu Watanabe [Thu, 18 Feb 2021 14:40:33 +0000 (23:40 +0900)] 
sd-device: the last argument of sd_device_get_sysattr_value() may be NULL

3 years agosd-device: use delete_trailing_chars()
Yu Watanabe [Thu, 18 Feb 2021 14:06:31 +0000 (23:06 +0900)] 
sd-device: use delete_trailing_chars()

Also, this drops trailing '\r' from sysattr value set in
sd_device_set_sysattr_value().

3 years agosd-device: do not cache an empty string but clear cache on failre
Yu Watanabe [Thu, 18 Feb 2021 08:13:41 +0000 (17:13 +0900)] 
sd-device: do not cache an empty string but clear cache on failre

And propagate the original error on write.
Note that some attributes are read-only.

3 years agosd-device: move comment about NULL value
Yu Watanabe [Thu, 18 Feb 2021 08:25:51 +0000 (17:25 +0900)] 
sd-device: move comment about NULL value

It is not intuitive, and I do not know why the function behave so.
But let's keep that behavior for compatibility, as such behavior
may be already used explicitly by callers.

3 years agosd-device: rename device_{add,get,remove}_sysattr_value()
Yu Watanabe [Sat, 20 Feb 2021 05:52:47 +0000 (14:52 +0900)] 
sd-device: rename device_{add,get,remove}_sysattr_value()

They just handle cache of sysattr values. Hence, let's use more
explanatory names.

3 years agoRevert "ci: switch back to meson-0.56.2"
Evgeny Vereshchagin [Fri, 19 Feb 2021 02:07:29 +0000 (02:07 +0000)] 
Revert "ci: switch back to meson-0.56.2"

This reverts commit c39e36203ff79a831c93dfb9380c967cd7fdbb99.

Now that meson-0.57.1 (where https://github.com/mesonbuild/meson/issues/8347
is fixed) is out it should be safe to keep rolling forward.

3 years agoman: split out sd_bus_set_fd() man page from sd_bus_get_fd()
Lennart Poettering [Sat, 20 Feb 2021 13:03:34 +0000 (14:03 +0100)] 
man: split out sd_bus_set_fd() man page from sd_bus_get_fd()

sd_bus_get_fd() and related calls are useful for integrating a bus
connection into arbitrary event loops. But sd_bus_set_fd() is quite a
different beast, it's for using D-Bus over pre-initialized sockets or
pairs of fifos or stuff, i.e. very advanced stuff.

Let's split this man page in two, in order not to confuse things
needlessly.

And while we are at it, let's slightly extend the documentation.

3 years agosystemctl: don't search in the full argv[0] for the invocation name
Lennart Poettering [Fri, 19 Feb 2021 19:36:45 +0000 (20:36 +0100)] 
systemctl: don't search in the full argv[0] for the invocation name

argv[0] might be prefixed by a path, and we shouldn't get confused by
that. Hence provide a simple helper call that abstracts the checking
away, which we can use everywhere, and expose the same behaviour, even
if argv[0] is not set.

(While we are at it, port all other multi-call binaries over to the new
helper, too)

Follow-up for: d41a9e4fc1e1bcdefc8d358da2744a97aac5820a

3 years agonetwork: fix typo
Yu Watanabe [Sat, 20 Feb 2021 08:11:39 +0000 (17:11 +0900)] 
network: fix typo

3 years agoMerge pull request #18689 from yuwata/network-address-broadcast-no
Yu Watanabe [Sat, 20 Feb 2021 07:55:28 +0000 (16:55 +0900)] 
Merge pull request #18689 from yuwata/network-address-broadcast-no

network: make Broadcast= accept "no"

3 years agotest-network: add tests for Broadcast= with boolean settings 18689/head
Yu Watanabe [Thu, 18 Feb 2021 21:06:51 +0000 (06:06 +0900)] 
test-network: add tests for Broadcast= with boolean settings

3 years agonetwork: make Broadcast= accept boolean value
Yu Watanabe [Thu, 18 Feb 2021 21:01:34 +0000 (06:01 +0900)] 
network: make Broadcast= accept boolean value

And disable it for wireguard interfaces by default.

Closes #18492.

3 years agoMerge pull request #18699 from yuwata/network-route-add-nexthop-setting
Yu Watanabe [Sat, 20 Feb 2021 05:17:17 +0000 (14:17 +0900)] 
Merge pull request #18699 from yuwata/network-route-add-nexthop-setting

network: add NextHop= setting in [Route] section

3 years agosd-bus: simplify sd_bus_reply()
Lennart Poettering [Thu, 18 Feb 2021 23:20:10 +0000 (00:20 +0100)] 
sd-bus: simplify sd_bus_reply()

there's no point in having two arguments, if one does as well.

3 years agosysctl.d: silence warning if net.core.default_qdisc cannot be set
Zbigniew Jędrzejewski-Szmek [Fri, 19 Feb 2021 18:02:38 +0000 (19:02 +0100)] 
sysctl.d: silence warning if net.core.default_qdisc cannot be set

Kernels can be compiled without the attribute. It's fine if this is not
set, so silence the warning.

3 years agofileio: extend comment about file sizes in virtual file systems
Lennart Poettering [Fri, 19 Feb 2021 17:29:13 +0000 (18:29 +0100)] 
fileio: extend comment about file sizes in virtual file systems

3 years agoMerge pull request #18703 from poettering/cgroupsv1-bad
Zbigniew Jędrzejewski-Szmek [Fri, 19 Feb 2021 17:25:17 +0000 (18:25 +0100)] 
Merge pull request #18703 from poettering/cgroupsv1-bad

consider cgroupsv1 usage grounds for "tainting"

3 years agoman: emphasize a bit more that PID files suck 18703/head
Lennart Poettering [Fri, 19 Feb 2021 16:49:44 +0000 (17:49 +0100)] 
man: emphasize a bit more that PID files suck

3 years agomanager: taint systemd if cgroupsv1 is used
Lennart Poettering [Fri, 19 Feb 2021 16:48:50 +0000 (17:48 +0100)] 
manager: taint systemd if cgroupsv1 is used

let's mark cgroupsv1 systems as "tainted" in the taint string logic.
It's time.

3 years agoMerge pull request #18695 from keszybz/xdg-generator-silence-warning
Yu Watanabe [Fri, 19 Feb 2021 16:00:18 +0000 (01:00 +0900)] 
Merge pull request #18695 from keszybz/xdg-generator-silence-warning

xdg-autostart-generator: silence warning

3 years agoMerge pull request #18702 from poettering/news-v248-more
Zbigniew Jędrzejewski-Szmek [Fri, 19 Feb 2021 15:00:48 +0000 (16:00 +0100)] 
Merge pull request #18702 from poettering/news-v248-more

more v248 NEWS stuff

3 years agoMerge pull request #18694 from keszybz/links-and-syntax-highlighting
Lennart Poettering [Fri, 19 Feb 2021 14:27:41 +0000 (15:27 +0100)] 
Merge pull request #18694 from keszybz/links-and-syntax-highlighting

Links and syntax highlighting

3 years agobasic/alloc-util: also reset the cleaned-up variable in freep()
Zbigniew Jędrzejewski-Szmek [Fri, 19 Feb 2021 12:07:29 +0000 (13:07 +0100)] 
basic/alloc-util: also reset the cleaned-up variable in freep()

freep() has it's own definition, so I missed it in fd421c4adc7406de02e03e2f7ceede2cc6e1d9d4.

Again, there is a small growth, but the compiler should be able to optimize it away:
-Dbuildtype=debug:

-rwxrwxr-x 1 zbyszek zbyszek 4106816 Feb 19 12:52 build/libsystemd.so.0.30.0
-rwxrwxr-x 1 zbyszek zbyszek 7492952 Feb 19 12:52 build/src/shared/libsystemd-shared-247.so
-rwxrwxr-x 1 zbyszek zbyszek 4472624 Feb 19 12:53 build/systemd

-rwxrwxr-x 1 zbyszek zbyszek 4107056 Feb 19 13:03 build/libsystemd.so.0.30.0
-rwxrwxr-x 1 zbyszek zbyszek 7493480 Feb 19 13:03 build/src/shared/libsystemd-shared-247.so
-rwxrwxr-x 1 zbyszek zbyszek 4472760 Feb 19 13:03 build/systemd

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=31055.

3 years agohwdb: whitespace fixes 18702/head
Lennart Poettering [Fri, 19 Feb 2021 14:19:56 +0000 (15:19 +0100)] 
hwdb: whitespace fixes

3 years agoupdate NEWS
Lennart Poettering [Fri, 19 Feb 2021 14:19:45 +0000 (15:19 +0100)] 
update NEWS

3 years agotest-network: add tests for NextHop= setting in [Route] 18699/head
Yu Watanabe [Wed, 3 Feb 2021 08:19:04 +0000 (17:19 +0900)] 
test-network: add tests for NextHop= setting in [Route]

3 years agonetwork: add nexthop ID in debugging logs
Yu Watanabe [Thu, 4 Feb 2021 15:51:39 +0000 (00:51 +0900)] 
network: add nexthop ID in debugging logs

3 years agonetwork: add NextHop= setting in [Route] section
Yu Watanabe [Tue, 9 Feb 2021 09:52:57 +0000 (18:52 +0900)] 
network: add NextHop= setting in [Route] section

3 years agonetwork: also manage nexthops by ID
Yu Watanabe [Fri, 5 Feb 2021 03:01:07 +0000 (12:01 +0900)] 
network: also manage nexthops by ID

It will be used in later commits.

3 years agoMerge pull request #18646 from yuwata/network-ip-masquerade-follow-ups
Zbigniew Jędrzejewski-Szmek [Fri, 19 Feb 2021 11:43:37 +0000 (12:43 +0100)] 
Merge pull request #18646 from yuwata/network-ip-masquerade-follow-ups

network: several follow-ups for recent IPMasquerade= change

3 years agoFix grammar and a small typo on a comment
Sven Mueller [Fri, 19 Feb 2021 11:28:00 +0000 (12:28 +0100)] 
Fix grammar and a small typo on a comment

potentically -> potentially
(And a small grammar fix)

3 years agoxdg-autostart-generator: ignore DBusActivatable=true 18695/head
Zbigniew Jędrzejewski-Szmek [Fri, 19 Feb 2021 08:50:09 +0000 (09:50 +0100)] 
xdg-autostart-generator: ignore DBusActivatable=true

See https://wiki.gnome.org/HowDoI/DBusApplicationLaunching and
https://wiki.gnome.org/Initiatives/GnomeGoals/DBusActivatable for a description
of this key:
> Instead of the typical UNIX-style fork()/exec() approach to process creation,
> launching an application is done by sending a D-Bus message to the well-known
> name of that application, causing a D-Bus activation.
>
> Starting processes with D-Bus activation ensures that each application gets
> started in its own pristine environment, as a direct descendent of the
> session -- not in the environment of whatever its parent happened to be. This
> is important for ensuring the app ends up in the correct cgroup, for example.

So this motivation is not important for us: we launch stuff ourselves better.

This fixes warnings during boot:
systemd-xdg-autostart-generator[2274]: /etc/xdg/autostart/org.freedesktop.problems.applet.desktop:92: Unknown key name 'DBusActivatable' in section 'Desktop Entry', ignoring.

3 years agoxdg-autostart-generator: reindent
Zbigniew Jędrzejewski-Szmek [Fri, 19 Feb 2021 08:47:32 +0000 (09:47 +0100)] 
xdg-autostart-generator: reindent

3 years agoman: fix links to various pages 18694/head
Zbigniew Jędrzejewski-Szmek [Fri, 19 Feb 2021 08:10:15 +0000 (09:10 +0100)] 
man: fix links to various pages

nss-dns doesn't have any man page that I could find.

3 years agotree-wide: fix links to systemd.io pages
Zbigniew Jędrzejewski-Szmek [Thu, 18 Feb 2021 23:14:52 +0000 (00:14 +0100)] 
tree-wide: fix links to systemd.io pages

Having the extra slash at the end is not a problem, just inconsistent. But the links with
.html or .md return 404.

3 years agodocs/ENVIRONMENT: syntax highlighting and some rewordings
Zbigniew Jędrzejewski-Szmek [Mon, 15 Feb 2021 11:10:20 +0000 (12:10 +0100)] 
docs/ENVIRONMENT: syntax highlighting and some rewordings

Use backticks for commands and functions and variables, suffix directories with
a slash. Some sentences were reworded.

3 years agonetwork: nexthop: update ID of nexthop created without specifiying ID
Yu Watanabe [Fri, 5 Feb 2021 01:09:12 +0000 (10:09 +0900)] 
network: nexthop: update ID of nexthop created without specifiying ID

Otherwise, nexthop_configure() -> nexthop_add() creates NextHop object
without ID in link->nexthop, and then, manager_rtnl_process_nexthop() ->
nexthop_add_foreign() also creates another NextHop object with ID in
link->nexthop_foreign.

3 years agonetwork: configure nexthop before routes that requires gateway
Yu Watanabe [Thu, 4 Feb 2021 14:13:08 +0000 (23:13 +0900)] 
network: configure nexthop before routes that requires gateway

This is a preparation for later commits. When RTA_NH_ID is set to a
route, then the corresponding nexthop must be exist.

3 years agotree-wide: fix typo
Yu Watanabe [Fri, 19 Feb 2021 04:27:56 +0000 (13:27 +0900)] 
tree-wide: fix typo

3 years agoGH Actions: Fix labeler bot
Jameer Pathan [Fri, 19 Feb 2021 05:28:20 +0000 (10:58 +0530)] 
GH Actions: Fix labeler bot

3 years agonetwork: warn when any positive boolean string is specified for IPMasquerade= 18646/head
Yu Watanabe [Wed, 17 Feb 2021 07:17:37 +0000 (16:17 +0900)] 
network: warn when any positive boolean string is specified for IPMasquerade=

Previously, any positive boolean string for IPMasquerade= enables only IPv4
masquerade. The commit 48ed276647c754bfb3ed5c6c5af9404e073ffe54 adds
IPv6 masquerade support. However, only "yes" is handled as "ipv4", and other
positive boolean strings are handled as "both".

This makes all positive boolean strings considered as "ipv4", warn that they
are deprecated, and suggest to use "ipv4" or "both".

Follow-up for 48ed276647c754bfb3ed5c6c5af9404e073ffe54.

3 years agonetwork: address: reuse Address:ip_masquerade_done for IPv6 case
Yu Watanabe [Wed, 17 Feb 2021 07:06:31 +0000 (16:06 +0900)] 
network: address: reuse Address:ip_masquerade_done for IPv6 case

It is not necessary to use different flag for each address family.

Follow-up for 48ed276647c754bfb3ed5c6c5af9404e073ffe54.

3 years agoMerge pull request #18659 from poettering/permyriadification
Yu Watanabe [Fri, 19 Feb 2021 05:22:10 +0000 (14:22 +0900)] 
Merge pull request #18659 from poettering/permyriadification

use scaling relative to UINT32_MAX instead of percentages/permyriads wherever we can

3 years agoRecommend drop-ins over modifications to the main config file
Zbigniew Jędrzejewski-Szmek [Thu, 18 Feb 2021 19:57:06 +0000 (20:57 +0100)] 
Recommend drop-ins over modifications to the main config file

As discussed in https://github.com/systemd/systemd/pull/18347.

3 years agotable: drop trailing white spaces of the last cell in row
Yu Watanabe [Mon, 1 Feb 2021 16:47:58 +0000 (01:47 +0900)] 
table: drop trailing white spaces of the last cell in row

Fixes #18415.

3 years agoupdate NEWS
Lennart Poettering [Thu, 18 Feb 2021 23:19:45 +0000 (00:19 +0100)] 
update NEWS

3 years agooomd: increase accuracy of SwapUsedLimit= to permyriads too 18659/head
Lennart Poettering [Wed, 17 Feb 2021 16:56:26 +0000 (17:56 +0100)] 
oomd: increase accuracy of SwapUsedLimit= to permyriads too

oomd.conf has two parameters with fractionals: SwapUsedLimit= and
DefaultMemoryPressureLimit=, but one accepts permyriads, the other only
percentages, for no apparent reason. One carries the "Percent" in the
name, the other doesn't.

Let's clean this up: always accept permyriads, and drop the suffix,
given that it is misleading.

I figure we should internally try to focus on scaling everything
relative to UINT32_MAX, and if that isn't in the cards at least 10000,
but never permille nor percent unless there's a really really good
reason for it (e.g. interface defined by someone else).

3 years agocore: use our usual UINT32_MAX scaling for OOMD limits
Lennart Poettering [Wed, 17 Feb 2021 16:51:27 +0000 (17:51 +0100)] 
core: use our usual UINT32_MAX scaling for OOMD limits

So far OOMD limits used permyriads, as an upgrade from the original
percent.

The rest of our codebase typically scales stuff relative to UINT32_MAX.
Let's clean this up, an make sure this happens here too. This is
particularly relevant, as this is exposed in unit files and API, and
before we mark this stable we should get the APIs right.

3 years agoparse-util: add format string macro for outputting permyriad
Lennart Poettering [Wed, 17 Feb 2021 16:29:43 +0000 (17:29 +0100)] 
parse-util: add format string macro for outputting permyriad

Let's define a set of macros for making output of permyriad values easy.
They are printed in pure ASCII, i.e. without the permille/permyriad
suffix, using just percent and two places after the dot.

3 years agotree-wide: port various pieces of code over to UINT32_SCALE_FROM_PERMYRIAD()
Lennart Poettering [Wed, 17 Feb 2021 16:03:52 +0000 (17:03 +0100)] 
tree-wide: port various pieces of code over to UINT32_SCALE_FROM_PERMYRIAD()