Commit graph

52850 commits

Author SHA1 Message Date
Lennart Poettering 9c53de8bc5 update TODO 2021-08-28 07:15:12 +02:00
Daan De Meyer 6e5485617e core: Add information on which condition failed to the job done message
When a job is skipped, it's useful to know exactly which condition failed so
let's add this information to the error message.

To avoid having to dynamically generate a format string, we special case the
formatting of condition failed messages.
2021-08-28 06:46:37 +02:00
Lennart Poettering d52cc0a531 core: Unit's condition_result field is a boolean
Let's only assign boolean values to a boolean variable.

Unit's condition_result is not of type ConditionResult, slightly
confusingly. Let's hence not assign one of ConditionResult's values to
it, but simple booleans.

This effectively doesn't make a difference, since CONDITION_ERROR is
true when cast to bool. But it's still ugly to rely on that. And
confusing.
2021-08-27 21:46:10 +01:00
Kevin Orr a3a5446b76 Fix another crash due to missing NHDR 2021-08-27 10:01:14 +02:00
Lennart Poettering fb9bd82443
Merge pull request #20547 from poettering/home-4k
homed: round fs offset and sizes to multiples of 4K
2021-08-27 09:59:44 +02:00
Yu Watanabe a9cd516f6c
Merge pull request #20553 from weblate/weblate-systemd-master
Translations update from Weblate
2021-08-27 03:09:29 +09:00
Jan Kuparinen 433a610626 po: Translated using Weblate (Finnish)
Currently translated at 9.5% (18 of 189 strings)

Co-authored-by: Jan Kuparinen <copper_fin@hotmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/fi/
Translation: systemd/main
2021-08-26 20:05:20 +02:00
Adolfo Jayme Barrientos 18a5c90f29 po: Translated using Weblate (Spanish)
Currently translated at 89.4% (169 of 189 strings)

Co-authored-by: Adolfo Jayme Barrientos <fitoschido@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/es/
Translation: systemd/main
2021-08-26 20:05:20 +02:00
Lennart Poettering b8643ee2ea Revert "core: Add information on which condition failed to job skipped format string"
This reverts commit c97bef458b.
2021-08-27 00:36:07 +09:00
Frantisek Sumsal 061f0084eb cryptsetup: drop an unused variable
This fixes compilation with new-enough libcryptsetup (2.4.0+) & clang:

```
$ CC=clang CXX=clang++ meson build --werror -Dlibcryptsetup-plugins=true
...
$ ninja -C build
...
../src/cryptsetup/cryptsetup-tokens/luks2-fido2.c:23:53: error: unused variable 'v' [-Werror,-Wunused-variable]
        _cleanup_(json_variant_unrefp) JsonVariant *v = NULL;
...
```
2021-08-26 13:13:08 +01:00
Wind/owZ f7327a485b hwdb: Add sensor rule for Hometech Wi101
This commit was done to add sensor rule for Hometech Wi101. Note that this rule might be too general and need fixes. I couldn't test this on any other device since this one is the only one I have.

Co-authored-by: Simeonlps <Simeonlps@users.noreply.github.com>
Signed-off-by: Wind/owZ <windowz414@gnuweeb.org>
2021-08-26 10:27:10 +01:00
I-dont-need-name 6f2353a2ce
hwdb: Add force-release for HP Omen 15 calculator key. (#20538)
* Add force-release for HP Omen 15 calculator key.

The key doesn't create release event so I have come up with this fix to make it work properly.
2021-08-26 10:25:32 +01:00
Daan De Meyer c97bef458b core: Add information on which condition failed to job skipped format string
When a job is skipped, it's useful to know exactly which condition failed so
let's add this information to the error message. Because we now return an
allocated string from job_done_message_format(), make sure we strdup() the
other formats as well so the caller can safely free the string returned by
job_done_message_format().
2021-08-26 10:24:13 +01:00
Tom Yan c918b70a4d network: default LinkLocalAddresssing= to no for link stacked with a passthru mode MACVLAN/MACVTAP
For similar reason to the case of a bridge slave: we don't want any IP configuration for it.
2021-08-26 06:11:41 +09:00
Yu Watanabe cacf882ff3
Merge pull request #20541 from yuwata/udev-coalesce-follow-up
udev: follow-ups for coalesce feature support
2021-08-26 06:05:29 +09:00
Yu Watanabe d11ff2a4f1
Merge pull request #20515 from yuwata/pid1-mount-apivfs-no
pid1: make find_executable() work with MountAPIVFS=no
2021-08-26 06:05:03 +09:00
Yu Watanabe ebab417cfb
Merge pull request #20531 from DaanDeMeyer/fix-17433
core: Check unit start rate limiting earlier
2021-08-26 06:04:40 +09:00
Lennart Poettering bf55142a7e update TODO 2021-08-25 22:29:21 +02:00
Lennart Poettering 04190cf1cf homed: always align home file systems to 4K boundaries
Let's carefully align all home file systems to 4K sector boundaries.
It's the safest thing to do, to ensure good perfomance on 4K sector
drives, i.e. today's hardware.

Yes, this means we'll waste 3.5K when resizing home dirs, but I think we
can live with that.

This ensures both the offsets where we start and the sizes of the file
systems/partitions/disk images are multiples of 4K always, both when
creating a new image and when resizing things.

Note that previously we aligned everything to 1024, but weren't quite as
careful.
2021-08-25 22:29:07 +02:00
Yu Watanabe ee7512404b udev/net: initialize coalesce tristate variables
Otherwise, 99-default.link may introduce something like the
following warnings:
----
Aug 26 03:23:59 systemd-udevd[519]: wlan0: Could not set coalesce settings, ignoring: Operation not supported
Aug 26 03:24:00 systemd-udevd[547]: wlp59s0: Could not set coalesce settings, ignoring: Operation not supported
----

Follow-up for 6c35ea5ef0.
2021-08-26 03:36:18 +09:00
Yu Watanabe 72328a5977 ethtool: move function
I'd like to locate all conf parsers at end of file.
2021-08-26 03:32:39 +09:00
Yu Watanabe 42867dfeef test-execute: add a testcase for MountAPIVFS=no 2021-08-26 02:54:37 +09:00
Daan De Meyer 9727f2427f core: Check unit start rate limiting earlier
Fixes #17433. Currently, if any of the validations we do before we
check start rate limiting fail, we can still enter a busy loop as
no rate limiting gets applied. A common occurence of this scenario
is path units triggering a service that fails a condition check.

To fix the issue, we simply move up start rate limiting checks to
be the first thing we do when starting a unit. To achieve this,
we add a new method to the unit vtable and implement it for the
relevant unit types so that we can do the start rate limit checks
earlier on.
2021-08-25 13:26:14 +01:00
Sho Iizuka e447ffe4da NEWS: net.ipv4.tcp_ecn = 1 was reverted at v240
Turning on ECN was reverted by 1e190df.
2021-08-25 09:08:23 +01:00
Luca Boccassi 63814220a0
Merge pull request #20530 from keszybz/typos-and-meson
Typos and meson
2021-08-24 21:54:22 +01:00
Daan De Meyer a243128d1f core: Remove circular include
service.h includes socket.h and socket.h includes service.h. Move
service.h include from socket.h to socket.c to remove the circular
dependency.
2021-08-24 16:19:03 +01:00
Zbigniew Jędrzejewski-Szmek f064b40ec9 meson: capitalize the last instance of "efi"
All the others in this section use "EFI"…
2021-08-24 15:39:17 +02:00
Zbigniew Jędrzejewski-Szmek c8cab396a0 man: adjust the description of extension-release.* 2021-08-24 15:39:17 +02:00
Zbigniew Jędrzejewski-Szmek 98579f19e7 docs: adjust sentece, fix minor typo
The verity partition types are per-architecture already, and they contain the
hash data independently of whether we are on a given architecture. (Or in other
words, we would make *use* this partition on some architecture, but the
contents always *exists*.)
2021-08-24 15:39:17 +02:00
Zbigniew Jędrzejewski-Szmek 6a15846d10 man: fix minor grammar issue
The usual: "searched" vs. "searched for".
2021-08-24 14:53:26 +02:00
Yu Watanabe e243d78c30
Merge pull request #20524 from weblate/weblate-systemd-master
Translations update from Weblate
2021-08-24 03:28:06 +09:00
Jan Kuparinen 6c0123251d po: Translated using Weblate (Finnish)
Currently translated at 1.5% (3 of 189 strings)

Co-authored-by: Jan Kuparinen <copper_fin@hotmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/fi/
Translation: systemd/main
2021-08-23 20:04:54 +02:00
Ettore Atalan 807b9d2a95 po: Translated using Weblate (German)
Currently translated at 70.3% (133 of 189 strings)

Co-authored-by: Ettore Atalan <atalanttore@googlemail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/de/
Translation: systemd/main
2021-08-23 20:04:54 +02:00
Yu Watanabe aa2727517e test-execute: logs can_share flag 2021-08-24 02:04:24 +09:00
Yu Watanabe 93413acd3e path-util: make find_executable() work without /proc mounted
Follow-up for 888f65ace6.

Hopefully fixes #20514.
2021-08-24 02:04:24 +09:00
Yu Watanabe ded8039abe path-util: split out common part in find_executable_full() 2021-08-24 02:04:24 +09:00
Yu Watanabe 3a1220eedf
Merge pull request #20513 from yuwata/network-allow-deny-list-take-prefix-length
network: dhcp4,ndisc: make addresses in Allow/DenyList= optionally take prefix length
2021-08-24 02:01:51 +09:00
Lennart Poettering 3e4ca3940d json: rework JSON_BUILD_XYZ() macros to use compound literals instead of compound statements
Compound statements is this stuff: ({ … })

Compound literals is this stuff: (type) { … }

We use compound statements a lot in macro definitions: they have one
drawback though: they define a code block of their own, hence if macro
invocations are nested within them that use compound literals their
lifetime is limited to the code block, which might be unexpected.

Thankfully, we can rework things from compound statements to compund
literals in the case of json.h: they don't open a new codeblack, and
hence do not suffer by the problem explained above.

The interesting thing about compound statements is that they also work
for simple types, not just for structs/unions/arrays. We can use this
here for a typechecked implicit conversion: we want to superficially
typecheck arguments to the json_build() varargs function, and we do that
by assigning the specified arguments to our compound literals, which
does the minimal amount of typechecks and ensures that types are
propagated on correctly.

We need one special tweak for this: sd_id128_t is not a simple type but
a union. Using compound literals for initialzing that would mean
specifiying the components of the union, not a complete sd_id128_t. Our
hack around that: instead of passing the object directly via the stack
we now take a pointer (and thus a simple type) instead.

Nice side-effect of all this: compound literals is C99, while compound
statements are a GCC extension, hence we move closer to standard C.

Fixes: #20501
Replaces: #20512
2021-08-23 16:07:28 +01:00
Yu Watanabe ab47f96041 test-network: add more testcases for *Allow/DenyList= 2021-08-23 20:37:36 +09:00
Yu Watanabe c995fa02b1 network: dhcp4,ndisc: make addresses in Allow/DenyList= optionally take prefix length
Closes #20505.
2021-08-23 20:36:09 +09:00
Yu Watanabe f95d1ef5fa
Merge pull request #20498 from yuwata/network-fix-gateway
network: fix logic for checking gateway address
2021-08-22 22:58:20 +09:00
Jan Kuparinen 7acedf31e6 po: Added translation using Weblate (Finnish)
Co-authored-by: Jan Kuparinen <copper_fin@hotmail.com>
2021-08-22 15:20:22 +02:00
Yu Watanabe d4e30ad1fb tree-wide: fix typo 2021-08-22 09:46:22 +01:00
Yu Watanabe a353fda224
Merge pull request #20303 from andir/sysconfig-example
{core, login}: respect install_sysconfdir_samples in meson file
2021-08-22 15:40:39 +09:00
Yu Watanabe 180c5116b3 test-network: add testcases that gateway address is IPv6 link local 2021-08-22 15:35:22 +09:00
Yu Watanabe 3333350a0e network: fix logic for checking gateway address is ready
This fixes the followings:
- The corresponding route or address to the gateway address must be in
  the same link.
- IPv6 link local address is not necessary to be reachable.

Fixes an issue reported in https://github.com/systemd/systemd/issues/8686#issuecomment-902562324.
2021-08-22 15:35:22 +09:00
Andreas Rammhold 72964d047a login: respect install_sysconfdir_samples in meson file
The refactoring done in c900d89faa caused the configuration files to be
installed into the pkgsysconfdir regardless of the state of the
install_sysconfdir_samples boolean that indicates whether or not the
sample files should be installed.
2021-08-21 15:09:44 +02:00
Andreas Rammhold cfd760b6a7 core: respect install_sysconfdir_samples in meson file
The refactoring done in e11a25cadb caused the configuration files to be
installed into the pkgsysconfdir regardless of the state of the
install_sysconfdir_samples boolean that indicates whether or not the
sample files should be installed.
2021-08-21 15:09:44 +02:00
Daan De Meyer 66dc9b4634 docs: Add documentation on how to use VSCode to debug systemd via mkosi 2021-08-21 10:31:32 +01:00
Yu Watanabe 218262c0b1
Merge pull request #20500 from poettering/import-tweaks
a few minor tweaks/bugfixlets to importd backends
2021-08-21 12:50:22 +09:00