Commit Graph

54253 Commits

Author SHA1 Message Date
Jan Janssen
9cf75222f2 meson: Rework gnu-efi detection
Moving all of the gnu-efi detection into src/boot/efi/meson.build makes
more sense than having it partially split.

And thanks to subdir_done() we can simplify the code a lot.

Fixes: #21258
2021-11-10 18:25:19 +00:00
Luca Boccassi
fe63d890fd Merge pull request #21293 from mrc0mmand/ci-cancel-old-jobs
ci: cancel previous jobs on ref update
2021-11-10 18:15:21 +00:00
Frantisek Sumsal
3884837610 ci: cancel previous jobs on ref update
Let's save the environment (and reduce the number of jobs in GH Actions
queues) by cancelling old jobs on a ref update (force push).

See: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#concurrency
2021-11-10 17:15:35 +01:00
Frantisek Sumsal
46573ee131 ci: fix indentation 2021-11-10 17:15:35 +01:00
Frantisek Sumsal
b8c94ee372 Revert "CI: run GCC unit test job on push to main"
This reverts commit c1036042f5.

Follow-up to 0ad536c16a.
2021-11-10 17:15:35 +01:00
Scott Lamb
4b499063ac fsck: no emergency.target on nofail mounts
Also describe failure behavior more precisely in the manpage.
Fixes #20237.
2021-11-10 11:58:12 +01:00
Anita Zhang
899acf5c2d core: replace slice dependencies as they get added
Defines a "UNIT_DEPENDENCY_SLICE_PROPERTY" UnitDependencyMask type that
is used when adding slices to the dependencies hashmap. This type is
used to remove slice dependencies when they get overridden by new ones.

Fixes #20182
2021-11-10 10:52:08 +01:00
Zbigniew Jędrzejewski-Szmek
4d544a0c87 Merge pull request #21287 from yuwata/man-network-condition
man: cleanups for [Match] section
2021-11-10 10:36:54 +01:00
Yu Watanabe
4883a5ec6c network: cake: fix copy-and-paste error
Follow-up for 35896db489.

Fixes CID#1465796.
2021-11-10 10:35:36 +01:00
Yu Watanabe
8c66ab20f6 man: use include directive for [Match] section 2021-11-10 10:59:21 +09:00
Yu Watanabe
33132db903 man: add missing Firmware= setting 2021-11-10 10:56:42 +09:00
Yu Watanabe
5ff3c71af8 Merge pull request #21276 from yuwata/ether-addr-util
ether-addr-util: introduce parse_hw_addr() and related conf parsers
2021-11-10 09:22:01 +09:00
Yu Watanabe
3f6a18633f Merge pull request #21281 from poettering/repart-align-fixes
repart: fixes when operating on unaligned partitions
2021-11-10 09:21:24 +09:00
Lennart Poettering
4a77b47ed8 Merge pull request #21283 from poettering/nspawn-idempotent-empty-settings
nspawn: make empty settings files true NOPs
2021-11-09 22:20:22 +01:00
Albert Brox
437346c96b analyze: basename -> path_extract_filename and other minor fixes 2021-11-09 22:19:34 +01:00
Lennart Poettering
9baa294c12 nspawn: don't muck with caps if no network setting is used in settings file
Our goal here (as in the previous commits) is to ensure that a settings
file loaded in --settings=override mode is truly a NOP. Previously this
was not the case as we'd drop CAP_NET_ADMIN from the caps if the
settings file didn't enable networking.

With this change we'll drop it only if explicitly turned off in the
settings file, and otherwise let the built-in defaults and cmdline
params reign supreme as documented.

Fixes: #20055
2021-11-09 18:32:30 +01:00
Lennart Poettering
2d09ea44fc nspawn: only copy syscall filters from settings if actually configured
As in the previous commit, let's not copy settings that aren#t
configured, so that --settings=override with an empty .nspawn file is
truly a NOP.
2021-11-09 18:32:25 +01:00
Lennart Poettering
0cc3c9f997 nspawn: copy BindUser= setting from settings only if set
Let's only pick this up from the settings if actually set.

As in the previous commit this makes sure that an empty settings file in
--settings=override mode is really a NOP.
2021-11-09 18:32:20 +01:00
Lennart Poettering
d3689b9435 nspawn: use three boolean fields from settings file when actually set
Let's turn these three fields into tristates, so that we can distinguish
whether they are not configured at all from explicitly turned off.

Let#s then use this to ensure that we only copy the settings fields into
our execution environment if they are actually configured.

We already do this for some of the boolean settings, this adds it for
the missing ones.

The goal here is to ensure that an empty settings file used in
--settings=override mode (i.e. the default mode used in the
systemd-nspawn@.service unit) is truly a NOP.
2021-11-09 18:32:15 +01:00
Lennart Poettering
a1dfd585c4 nspawn: add helper settings_network_configured()
The new helper returns whether the settings file had *any* networking
setting configured at all. We already have a similar helper
settings_private_network() which returns a similar result. The
difference is that the new helper will return true when the private
network was explicitly turned off, while the old one will only return
true if configured and enabled.

We'll reuse the helper a 2nd time later on, but even without it it makes
things a bit more readable.
2021-11-09 18:32:10 +01:00
Paulo Neves
c809e38732 docs: Clarify systemctl show manual
The manual incorrectly asserted that the properties in systemctl show
matched the the options in systemd-system.conf, which is not always true.

Add clarification on the equivalence of the properties in systemctl show
and systemd-system.conf

Fixed #21230
2021-11-09 18:31:54 +01:00
Lennart Poettering
8c1e088ac9 nspawn: drop two entirely redundant lines 2021-11-09 18:31:24 +01:00
Lennart Poettering
fb2fcad5d2 Merge pull request #21270 from poettering/event-mem-corruption
sd-event: fix memory corruption
2021-11-09 16:54:25 +01:00
Lennart Poettering
15c5977644 test: extend repart test suite to test for unaligned partitions 2021-11-09 16:53:11 +01:00
Lennart Poettering
1052a1142d repart: fix free area calculations for unaligned partitions
To properly detect how much space we have to distribute we need to take
into account that both the partition offset and the partition size
aren't aligned.
2021-11-09 16:31:48 +01:00
Lennart Poettering
0b7f574f72 repart: don't distribute space after unaligned partitions
If we operate on a disk that has a pre-existing unaligned partition
(i.e. one that doesn't start on multiple of 4K, or doesn't have a size
of multiple 4K), then the amount of space after it to distribute among
partitions isn't a multiple of 4K either.  So far we might end up
passing the remaining fraction to any partition that wanted it, which
was usually the first one after it that is newly defined. This then
confused the later placement algorithm, since it assumed all partitions
we newly allocate were properly aligned but by being extended by the
fractional space they wouldn't be anymore.

Let's hence fix that by ensuring we never pass space to later partitions
so that things wouldn't be aligned anymore.

Anything that is left-over then at the very end (i.e. typically exactly
the remaining fraction) is added as padding to the existing, unaligned
partition, so that it can't confuse anyone.

Fixes: #20622
2021-11-09 16:25:24 +01:00
Lennart Poettering
ae0613c6c4 repart: simplify stat machine we mostly go through linearly 2021-11-09 16:25:00 +01:00
Lennart Poettering
184cf99a35 repart: use LESS_BY() more 2021-11-09 16:24:22 +01:00
Yu Watanabe
99628f363b conf-parser: introduce config_parse_hw_addr() and config_parse_hw_addrs() 2021-11-09 21:39:09 +09:00
Yu Watanabe
c6df73ca72 ether-addr-util: introduce {hw,ether}_addr_hash_ops_free 2021-11-09 21:39:09 +09:00
Yu Watanabe
aa4f765326 conf-parser: rename config_parse_hwaddr() -> config_parse_ether_addr() 2021-11-09 21:39:09 +09:00
Yu Watanabe
227e9ce255 ether-addr-util: replace ether_addr_from_string() with parse_ether_addr() 2021-11-09 21:39:09 +09:00
Yu Watanabe
02160bc909 ether-addr-util: introduce parse_ether_addr() 2021-11-09 21:39:09 +09:00
Yu Watanabe
fb4e524180 test: add tests for parse_hw_addr() 2021-11-09 21:39:09 +09:00
Yu Watanabe
76a5d3dee2 ether-addr-util: introduce parse_hw_addr() 2021-11-09 21:39:05 +09:00
Lennart Poettering
035daf73fb test: add test case for self-destroy inotify handler 2021-11-09 13:13:25 +01:00
Lennart Poettering
e67d738a87 sd-event: add sd_event_add_inotify_fd() call
sd_event_add_inotify_fd() is like sd_event_add_inotify(), but takes an
fd to an inode instead of a path, and is hence a ton nicer.
2021-11-09 13:02:13 +01:00
Lennart Poettering
53baf2efa4 sd-event: don't destroy inotify data structures from inotify event handler
This fixes a bad memory access when we destroy an inotify source handler
from the handler itself, and thus destroy the associated inotify_data
structures.

Fixes: #20177
2021-11-09 12:53:04 +01:00
Lennart Poettering
9830d71614 logind: downgrade message about /run/utmp missing to LOG_DEBUG
This isn't really anything to really complain about, let's debug log
about this, and continue quietly as if utmp was empty.
2021-11-09 12:52:59 +01:00
Lennart Poettering
4f538d7b22 tree-wide: use sd_event_source_disable_unref() where we can 2021-11-09 12:52:53 +01:00
Lennart Poettering
3777940ab2 inotify-util: improve reported error codes when inotify_add_watch() fails 2021-11-09 12:52:07 +01:00
Michal Koutný
7a0895c2eb Revert "CI: disable opensuse mkosi CI"
This reverts commit ab6df52083.

The image build failed during kernel RPM installation (bug in %post
scriptlet). This has been fixed in the package suse-module-tools 16.0.13
[1]. The fix is in openSUSE Tumbleweed repos so the tests can be enabled
again.

[1] https://github.com/openSUSE/suse-module-tools/pull/53

Fixes: #21019
2021-11-09 10:57:03 +00:00
Yu Watanabe
777c17b9d1 Merge pull request #21269 from yuwata/network-netdev-cleanups
network/netdev: several trivial cleanups
2021-11-09 19:08:11 +09:00
Zbigniew Jędrzejewski-Szmek
7368e69bc7 Merge pull request #21271 from yuwata/ether-addr-util-helper-functions
ether-addr-util: introduce several helper functions
2021-11-09 10:02:55 +01:00
Zbigniew Jędrzejewski-Szmek
ed8ba68f3b Merge pull request #21272 from yuwata/netif-util-split
netif-util: move several functions from network-util.c to netif-util.c
2021-11-09 10:01:07 +01:00
Yu Watanabe
b01895bf70 arp-util: drop redundant line
The client's IP address is already loaded to X.
(The comment of the dropped line is wrong, X instead of A.)
2021-11-09 09:32:09 +01:00
Yu Watanabe
bc945c2b42 network/netdev: sort netdev kinds 2021-11-09 16:00:49 +09:00
Yu Watanabe
ad851caebd network/bridge: drop if_bridge.h from bridge.h
To avoid future header conflicts.
2021-11-09 16:00:49 +09:00
Yu Watanabe
fddb337cc8 network/netdev: fix typo 2021-11-09 16:00:49 +09:00
Yu Watanabe
e331889a5e network: bareudp: use fill_message_create 2021-11-09 16:00:49 +09:00