1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-12 13:18:14 +03:00
Commit Graph

49315 Commits

Author SHA1 Message Date
Yu Watanabe
0fb613000d test-network: disable NDISC on veth-peer
This should speed the tests up.
2021-02-03 22:09:07 +00:00
Zbigniew Jędrzejewski-Szmek
9afd5e7b97 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.
2021-02-03 22:08:35 +00:00
Weblate (bot)
33e71ade3b
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
2021-02-04 06:08:24 +09:00
Kevin P. Fleming
e65c4c4a96 network: correct name of parameter in function prototype
The output parameter of `sd_rtnl_message_neigh_get_ifindex` is called `index`,
not `family`.
2021-02-03 14:19:48 +00:00
Yu Watanabe
27897cecff
Merge pull request #18319 from yuwata/udev-move-tx-rx-queues
network,udev: move TransmitQueues=/ReceiveQueues= from .network to .link
2021-02-03 18:18:57 +09:00
Lennart Poettering
3ecafb1f5b 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: 8885fed4e3
2021-02-03 17:22:59 +09:00
Yu Watanabe
89d2da287b
Merge pull request #18423 from DaanDeMeyer/sd-boot-no-include
More sd-boot cleanups
2021-02-03 15:04:26 +09:00
Yu Watanabe
face9fcc16 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
2021-02-03 14:44:51 +09:00
Yu Watanabe
1f8dc96c06 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 ef4a91a7e8.
2021-02-03 14:43:49 +09:00
Yu Watanabe
d96d8a81ef test: add tests for RouteTable= setting 2021-02-03 14:39:25 +09:00
Yu Watanabe
552b90a2f2 network: use defined route table name in debug logs
And rename route_table_from_string_full() to
manager_get_route_table_from_string().
2021-02-03 14:36:50 +09:00
Yu Watanabe
310eff7274 network: make RouteTable= setting can take multiple name:number pairs in a line
Follow-up for c038ce4606.
2021-02-03 14:32:26 +09:00
Anita Zhang
0a9f93443b 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.
2021-02-02 17:52:48 -08:00
Frantisek Sumsal
e3f87b07bc ci: build with -Werror on Fedora
Prompted by: https://github.com/systemd/systemd/pull/18400#issuecomment-771602705
2021-02-02 23:17:15 +00:00
Lennart Poettering
3cdcbdd32f 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.
2021-02-02 23:16:38 +00:00
Luca Boccassi
23cfef7bb1
Merge pull request #18435 from keszybz/oomd-readiness-and-other-tweaks
Mark oomd as supported and other tweaks
2021-02-02 23:15:19 +00:00
Daan De Meyer
cb347d263d boot: Add startswith() and endswith() functions with no_case variants
Adapted from string-util
2021-02-02 22:53:31 +00:00
Daan De Meyer
fffd5e8ee3 boot: Drop unnecessary braces 2021-02-02 21:15:24 +00:00
Daan De Meyer
d47b7c5720 boot: Fix void pointer arithmetic warning 2021-02-02 21:15:24 +00:00
Daan De Meyer
c8af7dab21 boot: Replace raw efivar gets with typed variants 2021-02-02 21:15:21 +00:00
Daan De Meyer
987d0a1250 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.
2021-02-02 21:03:58 +00:00
Daan De Meyer
a7308a266b 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.
2021-02-02 21:03:47 +00:00
Daan De Meyer
258f0970f9 boot: Tighten scope of variables used in loops 2021-02-02 21:03:35 +00:00
Daan De Meyer
2a7c16753b boot: Add efivar_get_boolean_u8() 2021-02-02 21:03:33 +00:00
Lennart Poettering
edf370af9e
Merge pull request #18432 from yuwata/libude-list-cleanups
libudev: cleanups for libudev-list
2021-02-02 15:05:46 +01:00
Zbigniew Jędrzejewski-Szmek
0411a11811 meson: use ellipses for ranges
C.f. 1d3a473b4a.
2021-02-02 14:39:48 +01:00
Zbigniew Jędrzejewski-Szmek
ea8b9b2f8a 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
2021-02-02 14:38:19 +01:00
Zbigniew Jędrzejewski-Szmek
7e215af765 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.
2021-02-02 14:20:23 +01:00
Zbigniew Jędrzejewski-Szmek
5ffa2eaa54 meson: remove one more instance of install_dir:bindir
bindir is the default, c.f. a1fd722b5d.
2021-02-02 14:19:59 +01:00
Deepak Rawat
8885fed4e3 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.
2021-02-02 11:55:16 +00:00
Anita Zhang
94a8e2d6db parse-util: add permyriad parsing 2021-02-02 01:47:08 -08:00
Yu Watanabe
ecf83c2429 libudev: add one more assertion 2021-02-02 03:23:31 +09:00
Yu Watanabe
65c637ad2c 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.
2021-02-02 02:34:23 +09:00
Yu Watanabe
8e5ce38727 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.
2021-02-02 02:28:33 +09:00
Yu Watanabe
140716a516 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.
2021-02-02 02:22:59 +09:00
Yu Watanabe
eaef130d3f libudev: use hashmap_ensure_put() 2021-02-02 02:22:35 +09:00
Yu Watanabe
8b9708d1d3 sd-event: retrieve more events when epoll_wait() returns number equivalent to the buffer size
When epoll_wait() returns number equivalent to the buffer size, there
may exist remaining events which may have higher priority. To make priority
sorting correctly, let's retrieve all events.
2021-02-02 01:14:39 +09:00
Yu Watanabe
ac714078bf test: add test for udev_event_spawn() 2021-02-02 01:14:33 +09:00
Yu Watanabe
2be0218a70 udev: ignore OOM error in on_spawn_io() 2021-02-02 01:10:59 +09:00
Yu Watanabe
28a5065149 udev: use strv_split_newlines() to parse result of spawned command 2021-02-01 23:37:27 +09:00
Yu Watanabe
90d260d81f udev: add debugging logs in spawn_wait() 2021-02-01 23:37:27 +09:00
Evgeny Vereshchagin
77591e9732 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
2021-02-01 22:51:43 +09:00
Anita Zhang
934d0d023e tools: make update-dbus-docs compatible with Python 3.6
668b3a42fe 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.
2021-02-01 11:21:10 +00:00
Daan De Meyer
5e1f0e6fca 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.
2021-01-31 21:46:05 +00:00
Daan De Meyer
7d2ebb6f85 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.
2021-01-31 21:46:05 +00:00
Daan De Meyer
5021222842 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).
2021-01-31 21:46:05 +00:00
Daan De Meyer
ce0f078f4d boot: Move Secure Boot logic to new file 2021-01-31 21:46:05 +00:00
Simonas Kazlauskas
a3c5d7e95b 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.
2021-01-31 17:22:52 +00:00
Yu Watanabe
85cf96e3f5 log: skip reading the kernel command line if the process is invoked by a script
CLI tools may be used in a script. E.g., a script for monitoring a
service may use `systemctl`. Previously, if the kernel command line has
e.g. systemd.log-level=debug, then systemctl in the script produces
debugging logs when the script is invoked by a .service unit, but does
not when the script is running in a terminal. Then,
https://github.com/systemd/systemd/pull/18281#discussion_r561697482,
> I expect users to be (negatively) surprised.

In the previous commit, $SYSTEMD_EXEC_PID= is introduced. Then, we can
now detect whether a command is directly invoked by systemd or through
a script. Let's skip reading the kernel command line when a command is
invoked through a script.
2021-02-01 01:19:57 +09:00
Yu Watanabe
d754890843 import,home: update $SYSTEMD_EXEC_PID= if it is set
The subsequent execv() or execl() always calls tools provided by
systemd. So, it is safe to update the variable.
2021-02-01 01:19:52 +09:00