]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 years agoupdate TODO 16690/head
Lennart Poettering [Thu, 6 Aug 2020 15:46:56 +0000 (17:46 +0200)] 
update TODO

3 years agodocs: document new description field
Lennart Poettering [Thu, 6 Aug 2020 15:44:57 +0000 (17:44 +0200)] 
docs: document new description field

Also, explain GECOS syntax requirements.

3 years agocore,home,machined: generate description fields for all groups we synthesize
Lennart Poettering [Thu, 6 Aug 2020 15:41:05 +0000 (17:41 +0200)] 
core,home,machined: generate description fields for all groups we synthesize

3 years agouserdb: add "description" field to group records
Lennart Poettering [Thu, 6 Aug 2020 15:35:34 +0000 (17:35 +0200)] 
userdb: add "description" field to group records

User records have the realname/gecos fields, groups never had that, but
it would really be useful to have it, hence let's add it with similar
semantics.

We enforce the same syntax as for GECOS, since it's better to start with
strict rules and losen them later instead of the opposite.

3 years agoupdate TODO
Lennart Poettering [Thu, 6 Aug 2020 22:02:17 +0000 (00:02 +0200)] 
update TODO

3 years agoman: clarify that LogNamespace= is for system services only
Lennart Poettering [Thu, 6 Aug 2020 13:27:00 +0000 (15:27 +0200)] 
man: clarify that LogNamespace= is for system services only

Fixes: #16638
3 years agoMerge pull request #16321 from bluca/mount_images
Zbigniew Jędrzejewski-Szmek [Thu, 6 Aug 2020 16:23:03 +0000 (18:23 +0200)] 
Merge pull request #16321 from bluca/mount_images

core: new feature MountImages

3 years ago_sd-common.h: avoid parsing errors with Coverity
Kamil Dudka [Wed, 5 Aug 2020 21:53:40 +0000 (23:53 +0200)] 
_sd-common.h: avoid parsing errors with Coverity

The commit 1070d271fa8fa553d57dd5f74dd1e3f60732d0b9 which was supposed
too fix this does not seem to take effect any more.  We get again 34%
compilation success rate while scanning systemd itself.  Moreover, the
installed header file breaks compilation of programs that include it:

"/usr/include/systemd/_sd-common.h", line 23: error #35: #error directive: "Do
          not include _sd-common.h directly; it is a private header."
  #  error "Do not include _sd-common.h directly; it is a private header."
     ^

3 years agoupdate TODO
Lennart Poettering [Thu, 6 Aug 2020 12:08:25 +0000 (14:08 +0200)] 
update TODO

3 years agocore: new feature MountImages 16321/head
Luca Boccassi [Tue, 14 Jul 2020 15:18:41 +0000 (16:18 +0100)] 
core: new feature MountImages

Follows the same pattern and features as RootImage, but allows an
arbitrary mount point under / to be specified by the user, and
multiple values - like BindPaths.

Original implementation by @topimiettinen at:
https://github.com/systemd/systemd/pull/14451
Reworked to use dissect's logic instead of bare libmount() calls
and other review comments.
Thanks Topi for the initial work to come up with and implement
this useful feature.

3 years agostrv: add strv_split_colon_pairs function
Luca Boccassi [Tue, 7 Jul 2020 16:12:48 +0000 (17:12 +0100)] 
strv: add strv_split_colon_pairs function

Given a string in the format 'one:two three four:five', returns a string
vector with each word. If the second element of the tuple is not
present, an empty string is returned in its place, so that the vector
can be processed in pairs.

[zjs: use EXTRACT_UNESCAPE_SEPARATORS instead of EXTRACT_CUNESCAPE_RELAX.
This way we do escaping exactly once and in normal strict mode.]

3 years agobasic/extract-word: add EXTRACT_UNESCAPE_SEPARATORS mode
Zbigniew Jędrzejewski-Szmek [Mon, 3 Aug 2020 17:06:16 +0000 (19:06 +0200)] 
basic/extract-word: add EXTRACT_UNESCAPE_SEPARATORS mode

This allows separators to be escaped, for example to allow
"a\:b:c", to be treated as "a:b", "c" with ":" as the separator.

3 years agotest: add another test case for extract_many_words
Luca Boccassi [Tue, 7 Jul 2020 16:10:47 +0000 (17:10 +0100)] 
test: add another test case for extract_many_words

Covers some functionality that we want to use for config tuples

3 years agoanalyze: fix 'cat-config systemd/zram-generator.conf'
Zbigniew Jędrzejewski-Szmek [Sat, 1 Aug 2020 10:25:56 +0000 (12:25 +0200)] 
analyze: fix 'cat-config systemd/zram-generator.conf'

Also makes this work for various systemd config files that support .d.

3 years agoselinux: improve comment about getcon_raw semantics
Axel Rasmussen [Mon, 3 Aug 2020 16:19:49 +0000 (09:19 -0700)] 
selinux: improve comment about getcon_raw semantics

This code was changed in this pull request:
https://github.com/systemd/systemd/pull/16571

After some discussion and more investigation, we better understand
what's going on. So, update the comment, so things are more clear
to future readers.

3 years agoUpdate DISCOVERABLE_PARTITIONS.md
Marc Kleine-Budde [Wed, 5 Aug 2020 12:10:21 +0000 (14:10 +0200)] 
Update DISCOVERABLE_PARTITIONS.md

This patch fixes a typo in the link to the systemd-id128 documentation.

3 years agoMerge pull request #16556 from keszybz/test-terminal-colors
Lennart Poettering [Wed, 5 Aug 2020 07:35:16 +0000 (09:35 +0200)] 
Merge pull request #16556 from keszybz/test-terminal-colors

Test terminal colors

3 years agoMerge pull request #16650 from keszybz/two-doc-updates
Anita Zhang [Wed, 5 Aug 2020 01:05:38 +0000 (18:05 -0700)] 
Merge pull request #16650 from keszybz/two-doc-updates

Two doc updates

3 years agoMerge pull request #16652 from eliroca/adapt-tests-for-SUSE
Zbigniew Jędrzejewski-Szmek [Tue, 4 Aug 2020 15:13:28 +0000 (17:13 +0200)] 
Merge pull request #16652 from eliroca/adapt-tests-for-SUSE

Adapt tests to work on SUSE

3 years agoupdate TODO
Lennart Poettering [Tue, 4 Aug 2020 14:46:19 +0000 (16:46 +0200)] 
update TODO

3 years agoMerge pull request #16596 from poettering/event-time-rel
Zbigniew Jędrzejewski-Szmek [Tue, 4 Aug 2020 14:07:03 +0000 (16:07 +0200)] 
Merge pull request #16596 from  poettering/event-time-rel

Conflict in src/libsystemd-network/test-ndisc-rs.c fixed manually.

3 years agoMerge pull request #16260 from poettering/pcre2-dlopen
Zbigniew Jędrzejewski-Szmek [Tue, 4 Aug 2020 13:37:48 +0000 (15:37 +0200)] 
Merge pull request #16260 from poettering/pcre2-dlopen

turn pcre2 dependency into dlopen() dependency

3 years agoMerge pull request #16145 from poettering/qrcode-dlopen
Zbigniew Jędrzejewski-Szmek [Tue, 4 Aug 2020 13:25:50 +0000 (15:25 +0200)] 
Merge pull request #16145 from poettering/qrcode-dlopen

journalctl: make libqrencode a weak (dlopen() style) dependency

3 years agohome: use ID128_UUID_STRING_MAX where appropriate
Lennart Poettering [Tue, 4 Aug 2020 06:57:13 +0000 (08:57 +0200)] 
home: use ID128_UUID_STRING_MAX where appropriate

3 years agodocs: spelling fixes
Joerg Behrmann [Tue, 4 Aug 2020 09:31:44 +0000 (11:31 +0200)] 
docs: spelling fixes

3 years agoupdate TODO
Lennart Poettering [Tue, 4 Aug 2020 06:56:46 +0000 (08:56 +0200)] 
update TODO

3 years agocore: reset bus error before reuse
Zbigniew Jędrzejewski-Szmek [Mon, 3 Aug 2020 09:39:25 +0000 (11:39 +0200)] 
core: reset bus error before reuse

From a report in https://bugzilla.redhat.com/show_bug.cgi?id=1861463:
usb-gadget.target: Failed to load configuration: No such file or directory
usb-gadget.target: Failed to load configuration: No such file or directory
usb-gadget.target: Trying to enqueue job usb-gadget.target/start/fail
usb-gadget.target: Failed to load configuration: No such file or directory
Assertion '!bus_error_is_dirty(e)' failed at src/libsystemd/sd-bus/bus-error.c:239, function bus_error_setfv(). Ignoring.
sys-devices-platform-soc-2100000.bus-2184000.usb-ci_hdrc.0-udc-ci_hdrc.0.device: Failed to enqueue SYSTEMD_WANTS= job, ignoring: Unit usb-gadget.target not found.

I *think* this is the place where the reuse occurs: we call
bus_unit_validate_load_state(unit, e) twice in a row.

3 years agotest: adapt TEST-13-NSPAWN-SMOKE for SUSE 16652/head
Elisei Roca [Mon, 3 Aug 2020 15:41:29 +0000 (17:41 +0200)] 
test: adapt TEST-13-NSPAWN-SMOKE for SUSE

3 years agotest: adapt TEST-21-SYSUSERS for SUSE
Elisei Roca [Wed, 29 Jul 2020 20:03:58 +0000 (22:03 +0200)] 
test: adapt TEST-21-SYSUSERS for SUSE

3 years agoMerge pull request #16595 from bengal/bg/dhcpv6-fqdn
Zbigniew Jędrzejewski-Szmek [Mon, 3 Aug 2020 13:17:00 +0000 (15:17 +0200)] 
Merge pull request #16595 from bengal/bg/dhcpv6-fqdn

dhcp6: parse the FQDN option

3 years agodoc: Put proot under "container" section
Chris Down [Mon, 3 Aug 2020 10:35:11 +0000 (11:35 +0100)] 
doc: Put proot under "container" section

Missed in #15426. Otherwise, it ends up only taking the first two rows
of the table, in no section.

3 years agodocs: reword intro in DISCOVERABLE PARTITIONS 16650/head
Zbigniew Jędrzejewski-Szmek [Mon, 3 Aug 2020 12:49:24 +0000 (14:49 +0200)] 
docs: reword intro in DISCOVERABLE PARTITIONS

This specification is useful independently of UEFI, so avoid making assertions
about UEFI. Also reword the intro to say what this is about in the very first
sentence. Closes #16570.

3 years agoman: describe that changing Storage= does not move existing data
Zbigniew Jędrzejewski-Szmek [Mon, 3 Aug 2020 11:22:01 +0000 (13:22 +0200)] 
man: describe that changing Storage= does not move existing data

Fixes #16384.

3 years agoMerge pull request #16258 from hunger/master
Zbigniew Jędrzejewski-Szmek [Mon, 3 Aug 2020 08:05:32 +0000 (10:05 +0200)] 
Merge pull request #16258 from hunger/master

systemd-repart: Add an option to generate a JSON report

3 years agoMerge pull request #16308 from bluca/root_image_options
Zbigniew Jędrzejewski-Szmek [Mon, 3 Aug 2020 08:04:36 +0000 (10:04 +0200)] 
Merge pull request #16308 from bluca/root_image_options

service: add new RootImageOptions feature

3 years agomachine: Pass machine, user, program values to polkit on OpenMachineShell
Marti Raudsepp [Thu, 23 Jul 2020 16:17:38 +0000 (19:17 +0300)] 
machine: Pass machine, user, program values to polkit on OpenMachineShell

This allows more granular access control in PolicyKit rules, similar to
/etc/sudoers, for polkit actions:
* org.freedesktop.machine1.host-shell
* org.freedesktop.machine1.shell

Example configuration, place in /etc/polkit-1/rules.d/

polkit.addRule(function(action, subject) {
    if (action.id == "org.freedesktop.machine1.host-shell"
        && subject.user == "my-user"
        && action.lookup("user") == "target-user") {
            return polkit.Result.YES;
    }
});

3 years agoMerge pull request #16609 from poettering/initrd-unit-fixes
Zbigniew Jędrzejewski-Szmek [Mon, 3 Aug 2020 08:01:30 +0000 (10:01 +0200)] 
Merge pull request #16609 from poettering/initrd-unit-fixes

units: some initrd unit fixes

3 years agokernel-install/90-loaderentry: fix when /boot is not mountpoint
Kir Kolyshkin [Sat, 1 Aug 2020 02:24:15 +0000 (19:24 -0700)] 
kernel-install/90-loaderentry: fix when /boot is not mountpoint

I happen to have a machine where /boot is not a separate mountpoint,
but rather just a directory under /. After upgrade to recent Fedora,
I found out that grub2 can't find any new kernels.

This happens because loadentry script generates kernel and initrd file
paths relative to /boot, while grub2 expects path to be relative to the
root of filesystem on which they are residing.

This commit fixes this issue by using stat's %m to find the mount point
of a partition holding the images, and using it as a prefix to be
removed from ENTRY_DIR_ABS.

Note that %m for stat requires coreutils 8.6, released in Oct 2010.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
3 years agonspawn: Fix incorrect usage of putenv
Daan De Meyer [Sat, 1 Aug 2020 14:05:01 +0000 (15:05 +0100)] 
nspawn: Fix incorrect usage of putenv

strv_env_get only returns the environment variable value. putenv expects
KEY=VALUE format strings. Use setenv instead to fix the use.

3 years agodhcp6: parse the FQDN option 16595/head
Beniamino Galvani [Tue, 28 Jul 2020 05:48:11 +0000 (07:48 +0200)] 
dhcp6: parse the FQDN option

Parse option 39 (Client Fully Qualified Domain Name, RFC 4704) from the DHCP
reply, which specifies the FQDN assigned by the server to the client.

3 years agotest: convert ubuntu-ci to use deny-list
Dan Streetman [Fri, 10 Jul 2020 20:13:31 +0000 (16:13 -0400)] 
test: convert ubuntu-ci to use deny-list

Follows #16262

3 years agoman: fix typo in systemd.service
Etienne Doms [Sat, 1 Aug 2020 10:47:17 +0000 (12:47 +0200)] 
man: fix typo in systemd.service

3 years agonetwork: fix DHCPv6 Prefix Delegation example after option rename
Florian Klink [Fri, 31 Jul 2020 09:35:15 +0000 (11:35 +0200)] 
network: fix DHCPv6 Prefix Delegation example after option rename

99e015e28c8322bf714f45cd1defcf20ac2103c5 missed to update the example
below - DHCPv6.AssignAcquiredDelegatedPrefixAddress was moved to
DHCPv6PrefixDelegation.Assign.

As it already defaulted to true since it's introduction in
9efa8a3cff9948d3a78597b74dca75c805716de4, there's no need to explicitly
list it at all.

3 years agoNEWS: last rites v246
Zbigniew Jędrzejewski-Szmek [Thu, 30 Jul 2020 18:57:50 +0000 (20:57 +0200)] 
NEWS: last rites

3 years agoloop-device: implicitly sync device on detach
Lennart Poettering [Thu, 30 Jul 2020 16:42:13 +0000 (18:42 +0200)] 
loop-device: implicitly sync device on detach

Apparently, if IO is still in flight at the moment we invoke LOOP_CLR_FD
it is likely simply dropped (probably because yanking physical storage,
such as a USB stick would drop it too). Let's protect ourselves against
that and always sync explicitly before we invoke it.

3 years agoMerge pull request #16624 from keszybz/timesync-retry-interval
Zbigniew Jędrzejewski-Szmek [Thu, 30 Jul 2020 18:47:41 +0000 (20:47 +0200)] 
Merge pull request #16624 from keszybz/timesync-retry-interval

Make timesyncd retry interval grow more slowly

3 years agoudev: fix codesonar warnings
Amitanand.Chikorde [Thu, 30 Jul 2020 13:18:48 +0000 (18:48 +0530)] 
udev: fix codesonar warnings

Fixed below systemd codesonar warning.
isprint() is invoked here with an argument of signed
type char, but only has defined behavior for int arguments that are
either representable as unsigned char or equal to the value
of macro EOF(-1).

As per codesonar report, in a number of libc implementations, isprint()
function implemented using lookup tables (arrays): passing in a
negative value can result in a read underrun.

3 years agopid1: stop limiting size of /dev/shm
Zbigniew Jędrzejewski-Szmek [Thu, 30 Jul 2020 11:36:10 +0000 (13:36 +0200)] 
pid1: stop limiting size of /dev/shm

The explicit limit is dropped, which means that we return to the kernel default
of 50% of RAM. See 362a55fc14 for a discussion why that is not as much as it
seems. It turns out various applications need more space in /dev/shm and we
would break them by imposing a low limit.

While at it, rename the define and use a single macro for various tmpfs mounts.
We don't really care what the purpose of the given tmpfs is, so it seems
reasonable to use a single macro.

This effectively reverts part of 7d85383edbab7. Fixes #16617.

3 years agopath-util: make use of TAKE_PTR() where we can
Lennart Poettering [Wed, 29 Jul 2020 17:09:48 +0000 (19:09 +0200)] 
path-util: make use of TAKE_PTR() where we can

3 years agohwdb: Add EliteBook to use micmute hotkey
Kai-Heng Feng [Tue, 16 Jun 2020 05:24:27 +0000 (13:24 +0800)] 
hwdb: Add EliteBook to use micmute hotkey

Like HP ZBooks, all EliteBooks use the same micmute scancode.

3 years agotest-repart: also print json output 16258/head
Zbigniew Jędrzejewski-Szmek [Thu, 30 Jul 2020 14:03:53 +0000 (16:03 +0200)] 
test-repart: also print json output

This doesn't really "test" anything, but a human can look at it.

3 years agorepart: adjust --help and test output width
Zbigniew Jędrzejewski-Szmek [Thu, 30 Jul 2020 14:02:45 +0000 (16:02 +0200)] 
repart: adjust --help and test output width

3 years agorepart: log fixes
Lennart Poettering [Wed, 29 Jul 2020 17:20:39 +0000 (19:20 +0200)] 
repart: log fixes

3 years agotimesync: increase retry interval more slowly 16624/head
Zbigniew Jędrzejewski-Szmek [Thu, 30 Jul 2020 13:15:11 +0000 (15:15 +0200)] 
timesync: increase retry interval more slowly

The new retry intervals are [15, 20, 26, 34, 45, 60, 80, 106, 141, 188, 250,
333, 360, ...]. This should allow graceful response if a transient network
failure is encountered. Growth is exponential, but with a small power and
capped to a non-too-large value so that we resynchronize within a few minutes
after network is restored. I made the minimum 15 s to make sure that we never
send packets more often than that.

Fixes #16492.

3 years agobasic/terminal-util: rename our replacement highlight-yellow and test both the origin... 16556/head
Zbigniew Jędrzejewski-Szmek [Thu, 23 Jul 2020 08:53:48 +0000 (10:53 +0200)] 
basic/terminal-util: rename our replacement highlight-yellow and test both the original and replacement

The fact that we cannot use the "real" yellow color and need to use some other
color is essentially a bug. In this particular case the issue is in urxvt, see
a9009769de43b7f29d05017f4219e18c1e42a273. While we work around this by using a
different color, let's not forget that this is just a (hopefullly temporary)
workaround.

https://bugzilla.redhat.com/show_bug.cgi?id=1859886
https://bugzilla.redhat.com/show_bug.cgi?id=1859889
https://bugzilla.redhat.com/show_bug.cgi?id=1859894

3 years agotest-terminal-util: print paragraphs of text in different colors
Zbigniew Jędrzejewski-Szmek [Thu, 23 Jul 2020 08:14:20 +0000 (10:14 +0200)] 
test-terminal-util: print paragraphs of text in different colors

3 years agoadded alternative version of SurfTab Twin
Benjamin Dahlhoff [Wed, 29 Jul 2020 18:02:55 +0000 (20:02 +0200)] 
added alternative version of SurfTab Twin

3 years agoRepart: Add support for machine readably report
Tobias Hunger [Sun, 28 Jun 2020 16:19:05 +0000 (18:19 +0200)] 
Repart: Add support for machine readably report

Add --json command line argument that prints all relevant information
in a machine-readable format.

3 years agonetwork: fix use of uninitialized value
Yu Watanabe [Thu, 30 Jul 2020 03:45:36 +0000 (12:45 +0900)] 
network: fix use of uninitialized value

Follow-up for 6e537f62d71edea5bfcd2e2675c35ee840ffdc1f.

3 years agonetwork: Fix "Unknown section 'DHCPv6PrefixDelegation'." message
Michael Marley [Wed, 29 Jul 2020 19:13:35 +0000 (15:13 -0400)] 
network: Fix "Unknown section 'DHCPv6PrefixDelegation'." message

Follow-up for https://github.com/systemd/systemd/commit/99e015e28c8322bf714f45cd1defcf20ac2103c5

3 years agoNEWS: mention about [DHCPv6PrefixDelegation] section
Yu Watanabe [Wed, 29 Jul 2020 16:02:52 +0000 (01:02 +0900)] 
NEWS: mention about [DHCPv6PrefixDelegation] section

Follow-up for 99e015e28c8322bf714f45cd1defcf20ac2103c5.

3 years agomeson: run 'ninja man/update-man-rules' again
Lennart Poettering [Wed, 29 Jul 2020 13:50:22 +0000 (15:50 +0200)] 
meson: run 'ninja man/update-man-rules' again

3 years agoservice: add new RootImageOptions feature 16308/head
Luca Boccassi [Mon, 29 Jun 2020 12:19:31 +0000 (13:19 +0100)] 
service: add new RootImageOptions feature

Allows to specify mount options for RootImage.
In case of multi-partition images, the partition number can be prefixed
followed by colon. Eg:

RootImageOptions=1:ro,dev 2:nosuid nodev

In absence of a partition number, 0 is assumed.

3 years agobasic/list: add LIST_JOIN helper
Luca Boccassi [Fri, 17 Jul 2020 17:26:51 +0000 (18:26 +0100)] 
basic/list: add LIST_JOIN helper

Joins together two lists, tail to head.

a -> b
c -> d

a -> b -> c -> d

3 years agoman: fix link markup
Lennart Poettering [Wed, 29 Jul 2020 15:37:33 +0000 (17:37 +0200)] 
man: fix link markup

3 years agounits: downgrade Requires= to Wants= 16609/head
Lennart Poettering [Wed, 29 Jul 2020 14:30:28 +0000 (16:30 +0200)] 
units: downgrade Requires= to Wants=

Combining Requires= with Before= doesn't really make sense, since this
means we are requiring something that runs after us, which logically
cannot be fulfilled.

Let's hence downgrade Requires= to Wants= so that the ordering is kept
but no failure propagation implied.

3 years agounits: upgrade initrd check Conditions to Asserts
Lennart Poettering [Wed, 29 Jul 2020 14:25:59 +0000 (16:25 +0200)] 
units: upgrade initrd check Conditions to Asserts

It's a bug if an initrd unit is run on the host. Hence let's upgrade the
conditions to asserts.

3 years agoMerge pull request #16585 from yuwata/network-dhcp6-fixes
Lennart Poettering [Wed, 29 Jul 2020 13:59:11 +0000 (15:59 +0200)] 
Merge pull request #16585 from yuwata/network-dhcp6-fixes

network: fix several DHCP6 PD issues, and cleanup DHCP4 and NDISC

3 years agoMerge pull request #16590 from keszybz/test-fs-util-relax
Lennart Poettering [Wed, 29 Jul 2020 13:54:51 +0000 (15:54 +0200)] 
Merge pull request #16590 from keszybz/test-fs-util-relax

Small adjustements to let various tests pass in overloaded Fedora infra and related changes

3 years agoMerge pull request #16576 from keszybz/bump-tmp-size
Lennart Poettering [Wed, 29 Jul 2020 13:53:30 +0000 (15:53 +0200)] 
Merge pull request #16576 from keszybz/bump-tmp-size

Increase /tmp size to 50% of RAM

3 years agotest-cgroup-util: Handle result=NULL as empty string
Gaurav Singh [Tue, 28 Jul 2020 02:28:56 +0000 (22:28 -0400)] 
test-cgroup-util: Handle result=NULL as empty string

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
3 years agofirstboot: Update help string with --root-shell options
Daan De Meyer [Wed, 29 Jul 2020 07:21:01 +0000 (08:21 +0100)] 
firstboot: Update help string with --root-shell options

3 years agotest-sleep: add more logging, show secure boot mode 16590/head
Zbigniew Jędrzejewski-Szmek [Mon, 27 Jul 2020 15:36:56 +0000 (17:36 +0200)] 
test-sleep: add more logging, show secure boot mode

In https://bugzilla.redhat.com/show_bug.cgi?id=1858219 a user
reported that hibernation is not supported. This is probably caused
by secure boot, but our current logging does not make this
obvious.

3 years agoNEWS: mention new tmpfs limits 16576/head
Zbigniew Jędrzejewski-Szmek [Fri, 24 Jul 2020 20:24:59 +0000 (22:24 +0200)] 
NEWS: mention new tmpfs limits

3 years agoBump /tmp size back to 50% of RAM
Zbigniew Jędrzejewski-Szmek [Fri, 24 Jul 2020 20:05:21 +0000 (22:05 +0200)] 
Bump /tmp size back to 50% of RAM

This should be enough to fix https://bugzilla.redhat.com/show_bug.cgi?id=1856514.
But the limit should be significantly higher than 10% anyway. By setting a
limit on /tmp at 10% we'll break many reasonable use cases, even though the
machine would deal fine with a much larger fraction devoted to /tmp.
(In the first version of this patch I made it 25% with the comment that
"Even 25% might be too low.". The kernel default is 50%, and we have been using
that seemingly without trouble since https://fedoraproject.org/wiki/Features/tmp-on-tmpfs.
So let's just make it 50% again.)

See 7d85383edbab73274dc81cc888d884bb01070bc2.

(Another consideration is that we learned from from the whole initiative with
zram in Fedora that a reasonable size for zram is 0.5-1.5 of RAM, and that pretty
much all systems benefit from having zram or zswap enabled. Thus it is reasonable
to assume that it'll become widely used. Taking the usual compression effectiveness
of 0.2 into account, machines have effective memory available of between
1.0 - 0.2*0.5 + 0.5 = 1.4 (for zram sized to 0.5 of RAM) and
1.0 - 0.2*1.5 + 1.5 = 2.2 (for zram 1.5 sized to 1.5 of RAM) times RAM size.
This means that the 10% was really like 7-4% of effective memory.)

A comment is added to mount-util.h to clarify that tmp.mount is separate.

3 years agonetwork: rename settings about DHCPv6 Prefix Delegation 16585/head
Yu Watanabe [Tue, 28 Jul 2020 20:50:04 +0000 (05:50 +0900)] 
network: rename settings about DHCPv6 Prefix Delegation

Closes #16602.

3 years agonetwork: make RADVPrefixDelegation enum bitfield
Yu Watanabe [Tue, 28 Jul 2020 20:09:38 +0000 (05:09 +0900)] 
network: make RADVPrefixDelegation enum bitfield

This should not change any behavior.

3 years agonetwork: update address infomation even if link is in failed or linger state
Yu Watanabe [Thu, 23 Jul 2020 22:18:39 +0000 (07:18 +0900)] 
network: update address infomation even if link is in failed or linger state

As the link may be reconfigured later. If we do not update the address
information, then its setup state or operstate may not be updated
correctly.

3 years agonetwork: do not assume static addresses are configured
Yu Watanabe [Thu, 23 Jul 2020 15:52:32 +0000 (00:52 +0900)] 
network: do not assume static addresses are configured

link_request_set_routes() is also called when a dynamic address is
configured. At that time, static addresses may not be configured yet.

Fixes #16546.

3 years agonetwork: check at least one dynamic address is assigned when DHCP is enabled
Yu Watanabe [Thu, 23 Jul 2020 12:18:24 +0000 (21:18 +0900)] 
network: check at least one dynamic address is assigned when DHCP is enabled

3 years agonetwork: dhcp6: drop addresses and delegated prefixes on client stop
Yu Watanabe [Wed, 22 Jul 2020 18:13:42 +0000 (03:13 +0900)] 
network: dhcp6: drop addresses and delegated prefixes on client stop

Previously, we did not drop addresses and delegated prefixes when
DHCP6 client is stopped.

Fixes #15455.
Fixes #13564.

3 years agonetwork: rename ipv4ll_address -> ipv4ll_address_configured
Yu Watanabe [Wed, 22 Jul 2020 16:21:40 +0000 (01:21 +0900)] 
network: rename ipv4ll_address -> ipv4ll_address_configured

3 years agonetwork: ndisc: also remove old DNSSL or RDNSS records after an SLAAC address is...
Yu Watanabe [Wed, 22 Jul 2020 12:44:44 +0000 (21:44 +0900)] 
network: ndisc: also remove old DNSSL or RDNSS records after an SLAAC address is ready

3 years agonetwork: ndisc: remove old addresses and routes after at least one SLAAC address...
Yu Watanabe [Wed, 22 Jul 2020 02:55:07 +0000 (11:55 +0900)] 
network: ndisc: remove old addresses and routes after at least one SLAAC address becomes ready

Otherwise, the old addresses will exist in deperecated state.

3 years agonetwork: dhcp4: release old lease after the new address become ready
Yu Watanabe [Tue, 21 Jul 2020 14:06:51 +0000 (23:06 +0900)] 
network: dhcp4: release old lease after the new address become ready

Previously, on DHCPv4 address renewal, the old address may be removed
while the new address is not ready yet.

This also simplifies the logic of removing address and routes.

3 years agonetwork: make address/route_configure optionally return created Address/Route object
Yu Watanabe [Wed, 22 Jul 2020 00:41:30 +0000 (09:41 +0900)] 
network: make address/route_configure optionally return created Address/Route object

3 years agonetwork: set key destructor in several hash_ops
Yu Watanabe [Tue, 21 Jul 2020 23:22:55 +0000 (08:22 +0900)] 
network: set key destructor in several hash_ops

3 years agonetwork: make link_check_ready() return earlier if the link is not in 'configuring...
Yu Watanabe [Tue, 21 Jul 2020 21:07:42 +0000 (06:07 +0900)] 
network: make link_check_ready() return earlier if the link is not in 'configuring' state

3 years agonetwork: ndisc: do not set configured flags when addresses or routes are not assigned yet
Yu Watanabe [Tue, 21 Jul 2020 21:03:10 +0000 (06:03 +0900)] 
network: ndisc: do not set configured flags when addresses or routes are not assigned yet

Just for safety.

3 years agonetwork: make link enter failed state if address_update() failed
Yu Watanabe [Thu, 23 Jul 2020 18:16:42 +0000 (03:16 +0900)] 
network: make link enter failed state if address_update() failed

3 years agonetwork: introduce callback called when an address becomes ready
Yu Watanabe [Tue, 21 Jul 2020 14:02:35 +0000 (23:02 +0900)] 
network: introduce callback called when an address becomes ready

3 years agotest-network: add tests for prefix routes
Yu Watanabe [Thu, 4 Jun 2020 04:21:02 +0000 (13:21 +0900)] 
test-network: add tests for prefix routes

3 years agonetwork: add debug log for configuring address
Yu Watanabe [Wed, 3 Jun 2020 01:11:08 +0000 (10:11 +0900)] 
network: add debug log for configuring address

3 years agoupdate TODO 16596/head
Lennart Poettering [Tue, 28 Jul 2020 09:23:20 +0000 (11:23 +0200)] 
update TODO

3 years agotree-wide: make use of new relative time events in sd-event.h
Lennart Poettering [Tue, 28 Jul 2020 09:18:26 +0000 (11:18 +0200)] 
tree-wide: make use of new relative time events in sd-event.h

3 years agoman: document new relative time APIs in sd-event
Lennart Poettering [Tue, 28 Jul 2020 09:18:08 +0000 (11:18 +0200)] 
man: document new relative time APIs in sd-event

3 years agosd-event: add relative timer calls
Lennart Poettering [Tue, 28 Jul 2020 09:17:00 +0000 (11:17 +0200)] 
sd-event: add relative timer calls

We frequently want to set a timer relative to the current time. Let's
add an explicit API for this. This not only saves us a few lines of code
everywhere and simplifies things, but also allows us to do correct
overflow checking.

3 years agotest-ndisc-rs: increase timeouts
Zbigniew Jędrzejewski-Szmek [Mon, 27 Jul 2020 14:09:22 +0000 (16:09 +0200)] 
test-ndisc-rs: increase timeouts

Timestamp: Mon 2020-07-27 13:50:50 UTC
Monotonic: 985702942708
Hop limit: 64
Flags: <|MANAGED>
Preference: medium
Lifetime: 180
No MTU set
>> Option 3
Valid Lifetime: 500
Preferred Lifetime: 440
Flags: <ONLINK|AUTO>
Prefix Length: 64
Prefix: 2001:db8:dead:beef::
>> Option 25
DNS: 2001:db8:dead:beef::1
Lifetime: 60
>> Option 31
Domain: lab.intra
Lifetime: 60
>> Option 1
Address: 782bcbb36d53
NDISC: Started IPv6 Router Solicitation client
backoff timeout interval  1 3.600s <= 3.987s <= 4.400s
NDISC: Sent Router Solicitation, next solicitation in 3s
backoff timeout interval  2 7.576s <= 8.114s <= 8.374s
NDISC: Sent Router Solicitation, next solicitation in 8s
Assertion 'false' failed at src/libsystemd-network/test-ndisc-rs.c:172, function test_rs_hangcheck(). Aborting.

3 years agotest-path: increase timeout
Zbigniew Jędrzejewski-Szmek [Mon, 27 Jul 2020 13:08:35 +0000 (15:08 +0200)] 
test-path: increase timeout

The tests fail in Fedora's koji with a timeout. Let's just bump
the timeout:
--- stderr ---
Failed to connect to system bus: No such file or directory
-.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied
path-exists.service: Failed to create cgroup /system.slice/kojid.service/path-exists.service: Permission denied
path-exists.service: Succeeded.
-.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied
path-exists.service: Failed to create cgroup /system.slice/kojid.service/path-exists.service: Permission denied
path-exists.service: Succeeded.
path-exists.path: Succeeded.
Failed to connect to system bus: No such file or directory
-.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied
path-existsglob.service: Failed to create cgroup /system.slice/kojid.service/path-existsglob.service: Permission denied
path-existsglob.service: Succeeded.
-.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied
path-existsglob.service: Failed to create cgroup /system.slice/kojid.service/path-existsglob.service: Permission denied
path-existsglob.service: Succeeded.
path-existsglob.path: Succeeded.
Failed to connect to system bus: No such file or directory
-.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied
path-changed.service: Failed to create cgroup /system.slice/kojid.service/path-changed.service: Permission denied
path-changed.service: Succeeded.
-.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied
path-changed.service: Failed to create cgroup /system.slice/kojid.service/path-changed.service: Permission denied
path-changed.service: Succeeded.
path-changed.path: Succeeded.
Failed to connect to system bus: No such file or directory
-.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied
path-modified.service: Failed to create cgroup /system.slice/kojid.service/path-modified.service: Permission denied
path-modified.service: Succeeded.
-.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied
path-modified.service: Failed to create cgroup /system.slice/kojid.service/path-modified.service: Permission denied
path-modified.service: Succeeded.
path-modified.path: Succeeded.
Failed to connect to system bus: No such file or directory
-.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied
path-mycustomunit.service: Failed to create cgroup /system.slice/kojid.service/path-mycustomunit.service: Permission denied
path-mycustomunit.service: Succeeded.
path-unit.path: Succeeded.
Failed to connect to system bus: No such file or directory
-.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied
path-directorynotempty.service: Failed to create cgroup /system.slice/kojid.service/path-directorynotempty.service: Permission denied
path-directorynotempty.service: Succeeded.
-.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied
path-directorynotempty.service: Failed to create cgroup /system.slice/kojid.service/path-directorynotempty.service: Permission denied
path-directorynotempty.service: Failed to attach to cgroup /system.slice/kojid.service/path-directorynotempty.service: No such file or directory
path-directorynotempty.service: Failed at step CGROUP spawning /bin/true: No such file or directory
path-directorynotempty.service: Main process exited, code=exited, status=219/CGROUP
path-directorynotempty.service: Failed with result 'exit-code'.
Test timeout when testing path-directorynotempty.path

3 years agotest-fs-util: do not assume /dev is always real
Zbigniew Jędrzejewski-Szmek [Mon, 27 Jul 2020 11:49:12 +0000 (13:49 +0200)] 
test-fs-util: do not assume /dev is always real

When building in Fedora's koji, test-fs-util would fail:
--- command ---
10:18:29 SYSTEMD_LANGUAGE_FALLBACK_MAP='/builddir/build/BUILD/systemd-246-rc2/src/locale/language-fallback-map' PATH='/builddir/build/BUILD/systemd-246-rc2/x86_64-redhat-linux-gnu:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin' SYSTEMD_KBD_MODEL_MAP='/builddir/build/BUILD/systemd-246-rc2/src/locale/kbd-model-map' /builddir/build/BUILD/systemd-246-rc2/x86_64-redhat-linux-gnu/test-fs-util
--- stderr ---
/* test_chase_symlinks */
/* test_unlink_noerrno */
/* test_readlink_and_make_absolute */
/* test_var_tmp */
/* test_dot_or_dot_dot */
/* test_access_fd */
/* test_touch_file */
/* test_unlinkat_deallocate */
/* test_fsync_directory_of_file */
/* test_rename_noreplace */
/* test_path_is_encrypted */
/home encrypted: yes
/var encrypted: yes
/ encrypted: yes
/proc encrypted: no
/sys encrypted: no
/dev encrypted: yes
Assertion 'expect < 0 || ((r > 0) == (expect > 0))' failed at src/test/test-fs-util.c:863, function test_path_is_encrypted_one(). Aborting.
-------

It seems / is encrypted, but /dev is just a normal directory.