1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-31 07:51:21 +03:00
Commit Graph

54182 Commits

Author SHA1 Message Date
Yu Watanabe
fe8e156e7a network: tc/cake: introduce PriorityQueueingProfile= setting 2021-11-09 10:58:44 +09:00
Yu Watanabe
863542e1ce network: tc/cake: introduce MPUBytes= setting 2021-11-09 10:58:44 +09:00
Yu Watanabe
4bff808648 network: tc/cake: introduce NAT= setting 2021-11-09 10:58:44 +09:00
Yu Watanabe
a049cf166c network: tc/cake: introduce FlowIsolationMode= setting 2021-11-09 10:58:44 +09:00
Yu Watanabe
b6eccfda1a network: tc/cake: introduce CompensationMode= setting 2021-11-09 10:58:44 +09:00
Yu Watanabe
3a86a31e0c network: tc/cake: do not pass 0 if OverheadBytes= is not specified 2021-11-09 10:58:44 +09:00
Yu Watanabe
025cd94e1c network: tc/cake: introduce AutoRateIngress= setting 2021-11-09 10:58:44 +09:00
Yu Watanabe
69978eb910 man: use "…" for specifying ranges 2021-11-09 10:58:44 +09:00
Yu Watanabe
ca2c3e921f man: move Bandwidth= setting at the beginning of the [CAKE] section
For consistency with tc-cake(8).
2021-11-09 10:58:44 +09:00
Yu Watanabe
fb076d5f6c sd-netlink: add more attributes for CAKE 2021-11-09 10:58:44 +09:00
Jan Janssen
42e3bb357c meson: Add --warn-common and --fatal-warnings to link flags 2021-11-09 08:57:29 +09:00
Yu Watanabe
aac977c892
Merge pull request #21265 from poettering/userdb-fixes
userdb: various userdb fixes and minor feature additions
2021-11-09 08:14:52 +09:00
Lennart Poettering
43f4b5101c man: document new --json= mode 2021-11-08 21:42:53 +01:00
Lennart Poettering
9897989ef3 man: document new --multipler= switch 2021-11-08 21:42:53 +01:00
Lennart Poettering
18e94a40b8 userwork: make sure to return correct errors when service is not specified correctly
Fixes: #21215 #21222
2021-11-08 21:42:53 +01:00
Lennart Poettering
790e3ed3cc userdbctl: always show summary after printing table (unless legend is off)
We do this in many (most?) other tools, do so here too. It's quite
useful info to count users/groups/…
2021-11-08 21:40:30 +01:00
Lennart Poettering
4083d825e9 userdbctl: add a switch for explicitly enabling/disabling multiplexer-based lookups
This is incredibly useful for debugging.
2021-11-08 21:40:30 +01:00
Lennart Poettering
e032cbd591 userdbctl: make JSON output mode details configurable like in the other tools
Let's add --json= with the same parser as in the other tools, and honour
it.
2021-11-08 21:40:30 +01:00
Lennart Poettering
0595ff1680 userdbctl: explicitly handle ESRCH/ENOLINK from userdb_all()
Similar in style to previous commit, let's handle these two errors
properly, i.e. as equivalent to no entries found. Let's debug log about
them, to make things either to deal with when debugging (after all
userdbctl to a large degree are debugging tools).
2021-11-08 21:40:30 +01:00
Lennart Poettering
e908961d2e userwork: properly handle ENOLINK error from lower-level userdb code
The lower-level userdb code will return ENOLINK if varlink lookups are
disabled explicitly and we couldn#t find an answer any other way. Let's
not propagate this to clients, since they don't have control over this
feature anyway: we decide internally when to disable varlink lookups
(e.g. if DropIn lookups are requested we disable them) and to the client
side that should not be visible: if we can't find a record with the
flags we pick then we should report then we can't find any, and that's
it.

Fixes: #21223
2021-11-08 21:40:30 +01:00
Lennart Poettering
5c12ee3656 man: extend os-release docs a bit regarding quotes
Fixes: #21194
2021-11-08 18:21:00 +00:00
Zbigniew Jędrzejewski-Szmek
e2de2d28f4
Merge pull request #20813 from unusual-thoughts/exittype_v2
Reintroduce ExitType
2021-11-08 15:06:37 +01:00
Albert Brox
da845dabf5 implement aliasing for systemd-analyze verify 2021-11-08 12:08:23 +00:00
Christian Brauner
a6d1760024 build: preserve correct mode when generating files via jinja2
When using "capture : true" in custom_target()s the mode of the source
file is not preserved when the generated file is not installed and so
needs to be tweaked manually. Switch from output capture to creating the
target file and copy the permissions from the input file.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-11-08 12:06:48 +00:00
Henri Chain
e83a422797 Use ExitType=cgroup for autostart generated services
This fixes a bug[1] with some generated autostart app services which
fork and exit immediately after main application process start,
that caused them not to launch during session startup, as the entire
cgroup was immediately killed by systemd.

This can also happen with apps such as file browsers, whose initial
process will exit after the window is closed, but who intend to leave a
daemon child running.

Since the forking model of a .desktop application cannot be known at
service generation time otherwise, ExitType=cgroup is the only effective
way to fix this bug.

[1] https://bugs.kde.org/show_bug.cgi?id=433299
2021-11-08 10:15:24 +01:00
Henri Chain
596e447076 Reintroduce ExitType
This introduces `ExitType=main|cgroup` for services.
Similar to how `Type` specifies the launch of a service, `ExitType` is
concerned with how systemd determines that a service exited.

- If set to `main` (the current behavior), the service manager will consider
  the unit stopped when the main process exits.

- The `cgroup` exit type is meant for applications whose forking model is not
  known ahead of time and which might not have a specific main process.
  The service will stay running as long as at least one process in the cgroup
  is running. This is intended for transient or automatically generated
  services, such as graphical applications inside of a desktop environment.

Motivation for this is #16805. The original PR (#18782) was reverted (#20073)
after realizing that the exit status of "the last process in the cgroup" can't
reliably be known (#19385)

This version instead uses the main process exit status if there is one and just
listens to the cgroup empty event otherwise.

The advantages of a service with `ExitType=cgroup` over scopes are:
- Integrated logging / stdout redirection
- Avoids the race / synchronisation issue between launch and scope creation
- More extensive use of drop-ins and thus distro-level configuration:
  by moving from scopes to services we can have drop ins that will affect
  properties that can only be set during service creation,
  like `OOMPolicy` and security-related properties
- It makes systemd-xdg-autostart-generator usable by fixing [1], as obviously
  only services can be used in the generator, not scopes.

[1] https://bugs.kde.org/show_bug.cgi?id=433299
2021-11-08 10:15:23 +01:00
Dan Streetman
bf47f71c1c test: refactor test-procfs-util for clarity and skip test on perm failure
After commit c3dead53d5 the test can fail
if the procfs file(s) aren't writable, because the check for permission
failure happens after a call that will never fail, since setting the
limit to the existing limit will always pass.

This also refactors the function slightly to make the test var names
clearer.
2021-11-08 08:37:08 +01:00
Peter Hutterer
2d8840eb66 hwdb: remove the tablet pad entry for the UC-Logic 1060N
This entry only matches on vid/pid, so the pen event node of the device
would also get assigned the ID_INPUT_TABLET_PAD property - making it
break with libinput.

On top of that, UC-Logic's tablets re-use USB ids, so now we're breaking
multiple devices this way.

To get this device tagged correctly, use libwacom which has the
per-device hwdb entries.

Fixes #17953

This reverts commit 0fbe78ac7a
2021-11-08 07:39:17 +01:00
Ettore Atalan
6e671b3f07 po: Translated using Weblate (German)
Currently translated at 77.7% (147 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-11-08 10:04:26 +09:00
Luca Boccassi
5df64f148d
Merge pull request #21237 from bluca/analyze_skip
analyze: allow a custom policy to skip a check
2021-11-06 11:19:40 +00:00
Lennart Poettering
0cdb32ef52
Merge pull request #21171 from DaanDeMeyer/tty-dimensions
exec: Add TTYRows and TTYColumns properties to set TTY dimensions
2021-11-06 10:16:45 +01:00
Lennart Poettering
84f261853c user-record: show CIFS extra mount options, in output too
Follow-up for 4c2ee5c7f2
2021-11-06 00:27:34 +01:00
Frantisek Sumsal
a0ac3652fc test: wait until lvm-activate-$vgroup.service finishes
The new lvm autoactivation method runs `vgchange` via
`systemd-run --no-block`[0], which means that checking if the unit
is in the `active` state is not enough, since the main binary might
still be running. Let's fix this by waiting until the unit reaches
the `exited` sub state.

Follow-up to:
  * 29f8bef05e
  * e50d743f99

[0] https://sourceware.org/git/?p=lvm2.git;a=blob;f=udev/69-dm-lvm.rules.in;h=39e5b98074010745f78a7a86a05929700c9cd690;hb=67722b312390cdab29c076c912e14bd739c5c0f6#l83

Example:
```
[   17.102002] systemd-udevd[282]: sdf: '/usr/bin/systemd-run -r --no-block --property DefaultDependencies=no --unit lvm-activate-iscsi_lvm2212 /usr/bin/lvm vgchange -aay --nohints iscsi_lvm2212'(err) 'Running as unit: lvm-activate-iscsi_>
[   17.102522] systemd-udevd[282]: sdf: Process '/usr/bin/systemd-run -r --no-block --property DefaultDependencies=no --unit lvm-activate-iscsi_lvm2212 /usr/bin/lvm vgchange -aay --nohints iscsi_lvm2212' succeeded.
[   17.102697] systemd-udevd[282]: sdf: Adding watch on '/dev/sdf'
[   17.104944] systemd[1]: lvm-activate-iscsi_lvm2212.service: Changed dead -> running
...
[   17.105434] systemd[1]: Started /usr/bin/lvm vgchange -aay --nohints iscsi_lvm2212.
[   17.105601] systemd[931]: lvm-activate-iscsi_lvm2212.service: Executing: /usr/bin/lvm vgchange -aay --nohints iscsi_lvm2212
...
[   17.420228] testsuite-64.sh[268]: + systemctl -q is-active lvm-activate-iscsi_lvm2212.service
[   17.420228] testsuite-64.sh[268]: + return 0
[   17.420228] testsuite-64.sh[268]: + test -e /dev/disk/by-path/ip-127.0.0.1:3260-iscsi-iqn.2021-09.com.example:iscsi.lvm.test-lun-4
[   17.420228] testsuite-64.sh[268]: + udevadm settle
[   17.420228] testsuite-64.sh[268]: + test -e /dev/iscsi_lvm2212/mypart1
...
[   17.451313] systemd[1]: testsuite-64.service: Main process exited, code=exited, status=1/FAILURE
[   17.451475] systemd[1]: testsuite-64.service: Failed with result 'exit-code'.
...
[   17.555759] systemd[1]: Starting End the test...
[   17.556972] sh[941]: + systemctl poweroff --no-block
...
[   17.688923] lvm[931]:   2 logical volume(s) in volume group "iscsi_lvm2212" now active
...
[   17.838484] systemd[1]: lvm-activate-iscsi_lvm2212.service: Child 931 belongs to lvm-activate-iscsi_lvm2212.service.
[   17.838718] systemd[1]: lvm-activate-iscsi_lvm2212.service: Main process exited, code=exited, status=0/SUCCESS (success)

```
2021-11-05 22:48:38 +00:00
xdavidwu
0cfb0971f0 coredump: fix filename in journal when not compressed
Since 587f2a5e56, filename for
not-compressed coredump is missing from save_external_coredump, making
it write COREDUMP_FILENAME= (empty) in journal, making `coredumpctl`
report it missing but it is actually saved.
This fixes it.
2021-11-05 22:47:16 +00:00
Luca Boccassi
82100ef486 analyze: allow a custom policy to skip a check with weight=0
In some cases an offline analysis should ignore some fields, for example
a portable service in an image will never list RootImage/RootDirectory, as
they are added at runtime, and thus can be skipped.
2021-11-05 22:37:34 +00:00
Daan De Meyer
51462135fb exec: Add TTYRows and TTYColumns properties to set TTY dimensions 2021-11-05 21:32:14 +00:00
Daan De Meyer
b4bf9007cb getty: Pass tty to use by agetty via stdin
If the tty arg is set to "-", agetty uses the stdin fd as the tty.
Let's pass the tty this way so that we keep an fd open to the tty
at all times. If all fd's to a tty are closed, the kernel might
reset the tty which we want to avoid.
2021-11-05 21:32:11 +00:00
Tony Asleson
788a0ef179 test: exercise sytemd-integritysetup & generator
Ensures we can open a dm-integrity volume formated with
integritysetup.
2021-11-05 21:17:17 +00:00
Jan Janssen
ad102dd09a sd-boot: Add .osrel section
This allows starting systemd-boot from \EFI\Linux for easier testing
and bisection without risking an unbootable system as the user does not
need to replace their working loader.
2021-11-05 22:11:43 +01:00
Luca Boccassi
03e93377dc analyze: explain how the weight/range policy fields are used 2021-11-05 21:09:43 +00:00
Lennart Poettering
874cbf675d
Merge pull request #21252 from poettering/homed-record-dir-env-var
homed: add env var to override dir where we fine stored user records
2021-11-05 21:52:00 +01:00
Lennart Poettering
7cdd5c0d4c user-record: fix display of access mode 2021-11-05 21:37:45 +01:00
Lennart Poettering
30df35869c user-record: show fs/luks/gpt UUIDs as proper UUIDs
These are not defined by us, but are defined as proper UUIDs by their
respective specs, hence show them as such.
2021-11-05 21:37:20 +01:00
Lennart Poettering
67302b38b4 docs: document systemd-homed development env vars 2021-11-05 19:07:52 +01:00
Lennart Poettering
005daeed2b homed: add env var to override dir where we fine stored user records
This adds an env var which we can use to redirect where homed stores and
looks for user records kept on the host. This is useful for debugging
purposes so that one can easily run another homed instnce that doesn't
interfere with the main instance.
2021-11-05 18:35:28 +01:00
Jan Janssen
d874a13efc test: Add test for flag macros 2021-11-05 16:27:41 +01:00
Zbigniew Jędrzejewski-Szmek
20f7ada699
Merge pull request #20056 from calestyo/split-up-sysusers.d-systemd.conf.in
sysusers: split up systemd.conf
2021-11-05 15:30:33 +01:00
Luca Boccassi
8389fd19d2
Merge pull request #20138 from keszybz/coding-style-variable-decls
A coding style tweak and checking of sd_notify() calls and voidification of pager_open()
2021-11-05 13:57:30 +00:00
Zbigniew Jędrzejewski-Szmek
5f035b13de meson-render-jinja2: use ast.literal_eval()
Imports are sorted in the usual fashion: stdlib first.

literal_eval() parses string/numbers/lists/sets/dicts, and nothing else, while
eval will execute any python code. Using literal_eval() is generally more
correct, because it avoids the risk of side effects from the parsed expression.
In this case, we generate the parsed strings ourselves, so it's very unlikely
to have anything unexpected in the expressions. But let's do the correct thing
anyway.
2021-11-05 14:56:32 +01:00
Zbigniew Jędrzejewski-Szmek
7f9521d5e1
Merge pull request #21225 from medhefgo/boot-cleanup
Boot cleanup
2021-11-05 14:53:47 +01:00