1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-08 05:57:26 +03:00

55644 Commits

Author SHA1 Message Date
Yu Watanabe
dc7e9c1bc4 meson: use the compiler command array as is
Also check if the flags used when building bpf are supported by clang.
2022-01-14 17:01:58 +09:00
Yu Watanabe
a6ac8b5a4d meson: check if clang supports bpf 2022-01-14 16:43:31 +09:00
Yu Watanabe
ea78d2fb11 meson: require bpftool version >= 5.6
Closes #22051.
2022-01-14 16:43:31 +09:00
Benjamin Berg
048d469999 man: Add more details about desktop file processing
In particular, mention the contract the generator has with external
ExecCondition= binaries that may be provided by desktop environments.

But, also mention all the other relevant keys. In particular
X-systemd-skip= is important to be documented.
2022-01-14 16:20:45 +09:00
Evgeny Vereshchagin
007721e939 ci: turn meson warnings into errors 2022-01-14 01:53:37 +03:00
Luca Boccassi
e6d692ddfd
Merge pull request #22111 from medhefgo/boot-cleanup
boot: Cleanup
2022-01-13 22:50:52 +00:00
Yu Watanabe
902bbdc4b6 network: use scope link for direct unicast routes by default
Strictly speaking, this breaks the backward compatibility, but I guess
in most cases people already sets Scope=link for such routes.

This behavior matches with how 'ip route' command adds such route by
default.

Prompted by https://twitter.com/jplitza/status/1480500562391179270.
2022-01-13 22:46:52 +00:00
Luca Boccassi
fad7ad2b8b
Merge pull request #22106 from yuwata/dhcp6-broken-NTP
sd-dhcp6-client: handle broken NTP server option gracefully
2022-01-13 22:43:07 +00:00
Daan De Meyer
4d6455c075 journal: Don't discard -b arg when followed by -e
Allowing -e to be used to view the last logs of a previous boot seems
like a useful feature so let's not discard -b options anymore when
followed by -e.

Fixes #22107
2022-01-14 01:10:22 +09:00
Jan Janssen
2d1ac308c5 boot: Use FreePool from boot services directly
This should hopefully allow the compiler to optimize this a bit even
when gnu-efi is not compiled with LTO.
2022-01-13 14:30:51 +01:00
Jan Janssen
27c106bab8 boot: Add missing assert to file_read() 2022-01-13 14:30:51 +01:00
Jan Janssen
e1e086d1f7 boot: Use _cleanup_ in shim
Also, better be safe than sorry and check the return value.
2022-01-13 14:30:51 +01:00
Jan Janssen
acd28f3912 boot: Don't try to free loaded_image
EFI_LOADED_IMAGE is a protocol pointer and thus, we shouldn't try
to free it.
2022-01-13 14:29:46 +01:00
Jan Janssen
85eb489e23 boot: Use EFI_FILE* instead of EFI_FILE_HANDLE
They are both the same, but the former is shorter and also closer
to how file handles are represented in the UEFI spec.
2022-01-13 14:26:43 +01:00
Jan Janssen
41b74a18b2 boot: Fix invalid free
LocateDevicePath() advances the device path pointer, making it invalid
when freed.
2022-01-13 14:19:32 +01:00
Yu Watanabe
2ebb69bc09 boot: add missing error check
Follow-up for 661615a0afacee3545cde0a48286c0fef983f8fe.

Fixes CID#1468973.
2022-01-13 14:17:15 +01:00
Evgeny Vereshchagin
4e1ab496ae {build|unit}-test: show meson-log.txt when meson fails
to make it easier to figure out why it fails.

For example in https://github.com/systemd/systemd/runs/4799774735?check_suite_focus=true
it failed with
```

meson.build:1003:8: ERROR: Command "/usr/bin/clang -print-targets" failed with status 1.

A full log can be found at /home/runner/work/systemd/systemd/build/meson-logs/meson-log.txt
Error: Process completed with exit code 1.
```
and it wasn't clear what exactly happened there.
2022-01-13 20:27:25 +09:00
Hugo Carvalho
d2ceeb624c po: Translated using Weblate (Portuguese)
Currently translated at 100.0% (189 of 189 strings)

Co-authored-by: Hugo Carvalho <hugokarvalho@hotmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/pt/
Translation: systemd/main
2022-01-13 20:24:05 +09:00
Yu Watanabe
95c514e9a5 test: add testcase for broken NTP server option
For issue #22099.
2022-01-13 20:21:40 +09:00
Yu Watanabe
37408dd264 test: voidify test functions
This also drops unnecessary arguments, and unbreak several lines.
2022-01-13 20:20:48 +09:00
Yu Watanabe
16de849fd8 sd-dhcp6-client: expose client_parse_message()
To introduce tests for the function in later commits.
2022-01-13 20:20:19 +09:00
Yu Watanabe
0ac9daa4a1 sd-dhcp6-client: ignore broken non-critical options
The commit b89a3758e92894162e3c2dcb594a55acff3274d5 made the validity
check of the received message stricter. E.g. if the client received a
message with broken NTP server option, then the entire message is
dropped.

This relaxes the check. If some non-critical options are broken, then
ignore the options, but the message itself is still accepted.

Fixes #22099.
2022-01-13 20:20:19 +09:00
Yu Watanabe
2811b1263b
Merge pull request #22100 from bluca/test_part
Fix TEST-58-REPART on ppc64el
2022-01-13 14:00:36 +09:00
Luca Boccassi
8e65d93e85 test: do not assume x86-64 arch in TEST-58-REPART 2022-01-12 23:27:05 +00:00
Luca Boccassi
a94b9977d5 test: add partition IDs for s390x and ppc64el to TEST-50-DISSECT 2022-01-12 22:59:20 +00:00
Daan De Meyer
df207ccb7b journal: Skip data objects with invalid offsets
We already skip invalid objects, but don't yet skip invalid offsets.
Let's skip these as well to improve robustness when we're dealing with
corrupted journals.

Before:

```
➜  systemd git:(main) build/journalctl -r -n 5 --file ~/Downloads/system@0005d2b275abaaf8-f243a2818cb39b98.journal_
Failed to get journal fields: Cannot assign requested address
-- No entries --
```

After:

```
➜  systemd git:(main) ✗ build/journalctl -r -n 5 --file ~/Downloads/system@0005d2b275abaaf8-f243a2818cb39b98.journal_
Dec 09 08:32:38 snowball3 NetworkManager[911]: <info>  [1639038758.1464] device (wlp1s0): supplicant interface state: scanning -> authenticating
Dec 09 08:32:38 snowball3 kernel: wlp1s0: send auth to ec:a9:40:79:fb:ad (try 1/3)
Dec 09 08:32:38 snowball3 kernel: wlp1s0: authenticate with ec:a9:40:79:fb:ad
Dec 09 08:32:38 snowball3 wpa_supplicant[1003]: wlp1s0: SME: Trying to authenticate with ec:a9:40:79:fb:ad (SSID='UPC949397B' freq=5500 MHz)
```
2022-01-12 22:16:40 +01:00
Benjamin Berg
6d0aef1dd1 xdg-autostart-service: Ignore missing desktop-sepcific condition binary
If a desktop specific ExecCondition= binary does not exist, this just
means that the desktop environment is not available. As such, it is not
an error condition that should prevent the service from being installed
in the .wants target.

Fix this by simply returning zero.
2022-01-12 16:11:09 +01:00
Zbigniew Jędrzejewski-Szmek
ffb8c82715
Merge pull request #22092 from keszybz/docs-links
Add more doc pages, adjust links, add explanatory headers to examples and relax license to CC-0
2022-01-12 16:06:39 +01:00
Zbigniew Jędrzejewski-Szmek
78afbb67d2 docs: promise stability for the journal json format too 2022-01-12 16:05:59 +01:00
Zbigniew Jędrzejewski-Szmek
717e92ceb9 man+docs: adjust links to the new page 2022-01-12 16:05:59 +01:00
Zbigniew Jędrzejewski-Szmek
d9044a43f6 docs: import the Journal JSON Format description as subsection
I don't think we need a separate page for this, so both "export" formats share
a page.  We can just link to the approprate section when necessary.
2022-01-12 16:05:59 +01:00
Zbigniew Jędrzejewski-Szmek
5e3ab38e70 docs: import the Journal Export Format description from the wiki
This is a straightforward import, only links are adjusted.
2022-01-12 16:05:59 +01:00
Zbigniew Jędrzejewski-Szmek
d6e2c1ab71 policy files: adjust landing page link 2022-01-12 16:05:59 +01:00
Zbigniew Jędrzejewski-Szmek
931bc1957b docs: use https:// for fd.o links 2022-01-12 16:05:59 +01:00
Zbigniew Jędrzejewski-Szmek
2777a4a3bf README: link to the new page
Lennart's blog is now mostly of historical interest, and the wiki
landing page has been replaced by systemd.io.
2022-01-12 16:05:59 +01:00
Zbigniew Jędrzejewski-Szmek
a794a4d872 NEWS: adjust links to moved pages
All those pages contain a redirect at the top of the page, so it doesn't
make much sense to tell people to take the detour. Linking directly will
also increase the search rankings of the new pages.
2022-01-12 16:05:59 +01:00
Zbigniew Jędrzejewski-Szmek
b85c1905e0 shutdown: adjust log message
Instead of saying "with options 'n/a'", let's just say "with options ''".
We really don't have any options.
2022-01-12 16:05:59 +01:00
Zbigniew Jędrzejewski-Szmek
9bd4181ef5 network: add example file that enables DHCP on ethernet links
The file has instructions how to "enable" it by symlinking into the
appropriate place. If we create a different mechanism to do enablement
later on, we can always adjust the instructions.

Closes #3998.
2022-01-12 16:05:59 +01:00
Zbigniew Jędrzejewski-Szmek
418e1f2892 network: license all config files as CC0
Same justification as the previous commit.

$ for i in network/*-*; do git blame $i;done | less
shows that those files were written by Tom Gundersen, Lennart Poettering, Yu
Watanabe, me, and Marc-André Lureau.
2022-01-12 16:05:59 +01:00
Luca Boccassi
ac172d7063
Merge pull request #22090 from mbiebl/units-oomd-alias
units: don't install dbus-org.freedesktop.oom1.service alias
2022-01-12 15:03:00 +00:00
Yu Watanabe
0a1f0bf405
Merge pull request #21728 from Werkov/bfq-io-weight
bfq.io.weight followups and cleanup
2022-01-12 22:22:43 +09:00
Yu Watanabe
174eab0066
Merge pull request #22037 from fbuihuu/watchdog-minor-improvements
Watchdog minor improvements
2022-01-12 22:09:50 +09:00
Lidong Zhong
edc6390e29 shutdown: release the watchdog finally
During reboot or kexec, watchdog will be setup before systemd is
replaced by systemd-shutdown binary. But while systemd-shutdown is
executed, the watchdog will not really be released. Log shown as
following:

[   39.371202] watchdog: watchdog0: watchdog did not stop!
[   39.383659] systemd-shutdown[1]: Syncing filesystems and block
devices.
[   39.423727] systemd-shutdown[1]: Sending SIGTERM to remaining
processes...
[   39.440857] systemd-journald[526]: Received SIGTERM from PID 1
(systemd-shutdow).
[   39.461047] systemd-shutdown[1]: Sending SIGKILL to remaining
processes...
[   39.466736] systemd-shutdown[1]: Using hardware watchdog 'iTCO_wdt',
version 0, device /dev/watchdog
[   39.467835] systemd-shutdown[1]: Unmounting file systems.
[   39.469721] [2171]: Remounting '/' read-only in with options
'attr2,inode64,logbufs=8,logbsize=32k,noquota'.
[   39.550266] systemd-shutdown[1]: All filesystems unmounted.
[   39.550274] systemd-shutdown[1]: Deactivating swaps.
[   39.550443] systemd-shutdown[1]: All swaps deactivated.
[   39.550449] systemd-shutdown[1]: Detaching loop devices.
[   39.550697] systemd-shutdown[1]: All loop devices detached.
[   39.550703] systemd-shutdown[1]: Detaching DM devices.
[   39.551269] systemd-shutdown[1]: Not all DM devices detached, 1
left.
[   39.551277] systemd-shutdown[1]: Cannot finalize remaining DM
devices, continuing.
[   39.580044] systemd-shutdown[1]: Successfully changed into root
pivot.
[   39.580050] systemd-shutdown[1]: Returning to initrd...
[   39.587921] watchdog: watchdog0: watchdog did not stop!
[   39.774130] dracut Warning: Break before pre-shutdown

after applying fix

[   59.520379] watchdog: watchdog0: watchdog did not stop!
[   59.542286] systemd-shutdown[1]: Syncing filesystems and block
devices.
[   59.583313] systemd-shutdown[1]: Sending SIGTERM to remaining
processes...
[   59.600133] systemd-journald[517]: Received SIGTERM from PID 1
(systemd-shutdow).
[   59.624435] systemd-shutdown[1]: Sending SIGKILL to remaining
processes...
[   59.629288] systemd-shutdown[1]: Using hardware watchdog
'iTCO_wdt', version 0, device /dev/watchdog
[   59.630468] systemd-shutdown[1]: Unmounting file systems.
[   59.632219] [2172]: Remounting '/' read-only in with options
'attr2,inode64,logbufs=8,logbsize=32k,noquota'.
[   59.727588] systemd-shutdown[1]: All filesystems unmounted.
[   59.727596] systemd-shutdown[1]: Deactivating swaps.
[   59.727719] systemd-shutdown[1]: All swaps deactivated.
[   59.727725] systemd-shutdown[1]: Detaching loop devices.
[   59.727974] systemd-shutdown[1]: All loop devices detached.
[   59.727979] systemd-shutdown[1]: Detaching DM devices.
[   59.728547] systemd-shutdown[1]: Not all DM devices detached, 1
left.
[   59.728556] systemd-shutdown[1]: Cannot finalize remaining DM
devices, continuing.
[   59.758160] systemd-shutdown[1]: Successfully changed into root
pivot.
[   59.758167] systemd-shutdown[1]: Returning to initrd...
[   59.950305] dracut Warning: Break before pre-shutdown
2022-01-12 22:07:17 +09:00
Luca Boccassi
e80b51dad2
Merge pull request #22043 from medhefgo/boot-bitlocker
boot: Add BitLocker TPM key sealing workaround
2022-01-12 13:05:30 +00:00
Yu Watanabe
d5ff7bdbb7
Merge pull request #22088 from medhefgo/meson
meson: Small improvements
2022-01-12 22:01:27 +09:00
Michael Biebl
d338b1713a test: enable systemd-oomd.service
Enable the service to ensure dbus-org.freedesktop.oom1.service exists
and D-Bus activation works.

See #18469
2022-01-12 12:29:34 +01:00
Zbigniew Jędrzejewski-Szmek
ae527ed688 network: say that our example files are licensed as CC0
This matches what we have for example programs under man/, and is nice
because it allows people to copy the files as they wish without worrying
about copyright. The files are too trivial to copyright anyway.
2022-01-12 11:41:10 +01:00
Michael Biebl
794aa5f57f units: don't install dbus-org.freedesktop.oom1.service alias
The systemd-oomd.service unit contains

[Install]
WantedBy=multi-user.target
Alias=dbus-org.freedesktop.oom1.service

which means the symlink is supposed to be created dynamically when the
service is enabled.
2022-01-12 08:16:45 +01:00
yangmingtai
647082cf7f fix test-string-util failed when locale is not utf8 2022-01-12 05:06:05 +09:00
Yu Watanabe
d5f8fd5b00 network: dhcp6: do not request address if UseAddress=no
Fixes #22068.
2022-01-11 17:05:12 +00:00