1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-25 10:04:04 +03:00

66532 Commits

Author SHA1 Message Date
Yu Watanabe
23acdb8d0b test: shorten timeout for 'udevadm monitor'
The command should never finish, it is not necessary to wait so long.
2023-08-05 05:03:20 +09:00
Yu Watanabe
b768379e8b test: add short test for device node permission 2023-08-05 04:52:16 +09:00
Yu Watanabe
31845ef554 unit: make udev rules take precesence over tmpfiles
Without this change, there are no ordering between udevd and tmpfiles,
and if tmpfiles is invoked later it may discard the permission set by
udevd.

Fixes an issue introduced by b42482af904ae0b94a6e4501ec595448f0ba1c06.

Fixes #28588 and #28653.
2023-08-05 04:38:39 +09:00
Yu Watanabe
33b91308c2 Revert "tmpfiles.d: adjust /dev/vfio/vfio access mode"
The issue needs to be fixed by setting proper ordering between the
tmpfiles and udevd.

See issue #28653, especially
https://github.com/systemd/systemd/issues/28653#issuecomment-1665181625.

This reverts commit a3d610998ad3b4c88224fe89a048a84dbceb652b.
2023-08-05 04:32:01 +09:00
Zbigniew Jędrzejewski-Szmek
8cb0008977 journalctl: fix loggging invocation
Fixup for f882a986c271c3de1c622df0f1586946b4a09fef.
2023-08-04 20:21:13 +01:00
Luca Boccassi
7f878268ff
Merge pull request #28679 from keszybz/two-new-news-tweaks
Two news tweaks
2023-08-04 19:24:46 +01:00
Daan De Meyer
73e6b6974b
Merge pull request #28669 from DaanDeMeyer/mkosi-fix
mkosi: Make sure our systemd build always overrides the distros
2023-08-04 20:16:55 +02:00
Daan De Meyer
5dd814d7cd tmpfiles: Consider ENOPKG as information not available
We already handle the case where /etc/machine-id is empty. Let's make
sure we also handle the case where /etc/machine-id is "uninitialized".
2023-08-04 20:16:23 +02:00
Luca Boccassi
bdfa3f3a5c portablectl: fix regression when using --force without extension parameters
c18f4eb9e96836a made it possible to use --force with various verbs, by
going through the newer D-Bus methods. Except it didn't, as it regressed
during PR review refactorings, and nobody noticed because there were no
tests for it. Fix it, and add tests.

Follow-up for c18f4eb9e96836a6a8285ec42fd8a34c8909f6d9
2023-08-04 18:29:57 +01:00
Luca Boccassi
0e387e1295
Merge pull request #28673 from YHNdnzj/hibernate-resume-escape-node
hibernate-resume-generator: escape device path passed to hibernate-resume
2023-08-04 16:46:56 +01:00
Daan De Meyer
33772b5da6 mkosi: Use SuccessActionExitStatus= in mkosi-check-and-shutdown.service 2023-08-04 16:49:07 +02:00
Daan De Meyer
6ac5aa97ec mkosi: Make sure our systemd build always overrides the distros
Currently, we install the systemd install tree in the base image and
then build the initrd and final images from the base image. This means
if that any systemd package is pulled in during the initrd or final
image builds, it will override our version.

To fix this, we stop installing our build of systemd in the base image,
and store it in the output directory instead. That allows us to refer to
it using ExtraTrees= in the final and initrd image builds to install it
after all the distro packages have been installed, ensuring our version
always takes priority.
2023-08-04 16:49:07 +02:00
Daan De Meyer
f2f8ed193c mkosi: Update to latest 2023-08-04 16:48:58 +02:00
Daan De Meyer
a1fedc613f test-user-util: Drop tty check in gid_to_name() test
The tty user is not guaranteed to exist, so let's remove the dependency
from the test.
2023-08-04 16:48:39 +02:00
Zbigniew Jędrzejewski-Szmek
b77ff21ade NEWS: adjust grammar 2023-08-04 15:45:26 +01:00
Zbigniew Jędrzejewski-Szmek
e9ae4187bb NEWS: expand list of new Startup* settings
This way users can grep/search the NEWS file for when a given setting was
added.
2023-08-04 15:45:26 +01:00
Kingbom Dou
8f1c446979 timesyncd: emit signal when timesyncd NTPServers property changes
Emit signal when timesyncd LinkNTPServers property changes

Tested:
```
 Monitoring bus message stream.
```
```
> Type=signal  Endian=l  Flags=1  Version=1 Cookie=21  Timestamp="Fri 2023-05-19 07:50:47.427051 UT"
  Sender=:1.623  Path=/org/freedesktop/timesync1  Interface=org.freedesktop.DBus.Properties  Memberd
  UniqueName=:1.623
  MESSAGE "sa{sv}as" {
          STRING "org.freedesktop.timesync1.Manager";
          ARRAY "{sv}" {
                  DICT_ENTRY "sv" {
                          STRING "LinkNTPServers";
                          VARIANT "as" {
                                  ARRAY "s" {
                                          STRING "10.8.8.18";
                                          STRING "10.8.8.19";
                                  };
                          };
                  };
          };
          ARRAY "s" {
          };
  };
```
```
> Type=signal  Endian=l  Flags=1  Version=1 Cookie=28  Timestamp="Fri 2023-05-19 07:53:22.609416 UT"
  Sender=:1.623  Path=/org/freedesktop/timesync1  Interface=org.freedesktop.DBus.Properties  Memberd
  UniqueName=:1.623
  MESSAGE "sa{sv}as" {
          STRING "org.freedesktop.timesync1.Manager";
          ARRAY "{sv}" {
                  DICT_ENTRY "sv" {
                          STRING "LinkNTPServers";
                          VARIANT "as" {
                                  ARRAY "s" {
                                          STRING "10.8.8.18";
                                          STRING "10.8.8.20";
                                  };
                          };
                  };
          };
          ARRAY "s" {
          };
  };
```
```
> Type=signal  Endian=l  Flags=1  Version=1 Cookie=6  Timestamp="Fri 2023-05-19 08:12:26.964666 UTC"
  Sender=:1.627  Path=/org/freedesktop/timesync1  Interface=org.freedesktop.DBus.Properties  Memberd
  UniqueName=:1.627
  MESSAGE "sa{sv}as" {
          STRING "org.freedesktop.timesync1.Manager";
          ARRAY "{sv}" {
                  DICT_ENTRY "sv" {
                          STRING "LinkNTPServers";
                          VARIANT "as" {
                                  ARRAY "s" {
                                          STRING "10.8.8.18";
                                  };
                          };
                  };
          };
          ARRAY "s" {
          };
  };
```
```
> Type=signal  Endian=l  Flags=1  Version=1 Cookie=162  Timestamp="Mon 2023-07-10 09:06:18.865654 UTC"
  Sender=:1.1  Path=/org/freedesktop/timesync1  Interface=org.freedesktop.DBus.Properties  Member=PropertiesChanged
  UniqueName=:1.1
  MESSAGE "sa{sv}as" {
          STRING "org.freedesktop.timesync1.Manager";
          ARRAY "{sv}" {
                  DICT_ENTRY "sv" {
                          STRING "RuntimeNTPServers";
                          VARIANT "as" {
                                  ARRAY "s" {
                                          STRING "10.2.16.10";
                                  };
                          };
                  };
          };
          ARRAY "s" {
          };
  };
```

Signed-off-by: Kingbom Dou <doujinbao@bytedance.com>
2023-08-04 14:25:41 +01:00
Mike Yuan
caf8d692ed
hibernate-resume-generator: escape device path passed to hibernate-resume
Follow-up for #27330

Fixes #28668
2023-08-04 21:04:45 +08:00
Mike Yuan
83d373d213
man/systemd.unit: DefaultTimeoutStartSec= -> DefaultDeviceTimeoutSec=
for device unit job timeouts

Follow-up for #24044
2023-08-04 20:53:02 +08:00
Antonio Alvarez Feijoo
000680a68d man/systemd-fsck@.service: clarify passno and noauto combination in /etc/fstab
Fixes #28657
2023-08-04 11:33:18 +01:00
Daan De Meyer
bd6c95c00b debug-generator: Use generator_add_symlink() 2023-08-04 11:32:42 +01:00
Dan Streetman
aff853f8ea tpm2: use CreatePrimary() to create primary keys instead of Create()
Older versions used CreatePrimary() to create a transient primary key to use
when creating a sealed data object. That was changed in v254 to use Create()
instead, which should result in the same transient key, but it seems some
hardware TPMs refuse to allow using Create() to generate primary keys.

This reverts to using CreatePrimary() to create primary key.

Fixes: #28654
2023-08-04 10:13:27 +01:00
Mike Yuan
07bd7b3868
Merge pull request #28648 from yuwata/shutdown-skip-recursive-mount-run
shutdown: several fixlets
2023-08-04 12:45:32 +08:00
Daan De Meyer
7e48f3ba71 tree-wide: Fix -Wmaybe-uninitialized compilation warnings 2023-08-04 00:25:23 +01:00
OMOJOLA JOSHUA
fc7eb1325b Add tool to display emergency log message full-screen on boot failure. 2023-08-04 00:24:54 +01:00
Yu Watanabe
2159662608 switch-root: reopen target directory after it is mounted
Fixes a bug introduced by f717d7a40a696b351415976f22a4f498c401de41.
2023-08-04 04:05:21 +09:00
Yu Watanabe
6b219b74de shutdown: do not umount recursively before MS_MOVE
Unmounting filesystem will be done gracefully by shutdown itself.

Follow-up for f2c1d491a539035d6cc1fa53a7cef0cbc8d52902 and
268d1244e87a35ff8dff56c92ef375ebf69d462e.
2023-08-04 03:58:10 +09:00
Yu Watanabe
d709d1b20e shutdown: disable recursive mount of /run/ on switching root
Mounting /run/ recursively may be harmless, but not necessary on
shutdown as the new root is /run/initramfs.

Follow-up for b12d41a8bb7c99f7d7a1c7821a886d98b42d9ce0.
2023-08-04 03:57:32 +09:00
Oğuz Ersen
5a087ba25c po: Translated using Weblate (Turkish)
Currently translated at 88.1% (200 of 227 strings)

Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/tr/
Translation: systemd/main
2023-08-04 02:22:55 +09:00
Mike Yuan
ef7f5baae8 vconsole: support KEYMAP=kernel for preserving kernel keymap
Follow-up for #26089 and #28505

Currently, if default-keymap is not empty, there's no way
to ask vconsole-setup to retain the kernel keymap. Let's
accept a special value "kernel" for that purpose.

Addresses the problem mentioned in https://github.com/systemd/systemd/pull/28505#issuecomment-1663681665
2023-08-04 02:20:39 +09:00
Maxim Mikityanskiy
fa8216e206 hwdb: Mute SW rfkill keys on MSI Wind U100
Kernel patch [1] fixed bugs in rfkill handling on MSI Wind U100. Now
that the HW rfkill reports the correct state, and the SW rfkill is
controllable from userspace, it's necessary to mute KEY_WLAN and
KEY_BLUETOOTH generated on HW rfkill state changes. Otherwise, the
userspace will react to these keys and toggle the SW rfkill as well,
which is not desired, because the user may end up with non-functional
radios if HW and SW rfkills are out of sync.

Blocking these keycodes doesn't impair user experience, because the
desktop environment can still react to HW rfkill events and act
accordingly (for example, show notifications).

While at it, use "unknown" instead of "reserved" to mute keys, to avoid
the "atkbd serio0: Unknown key pressed" flood in dmesg.

[1]: https://lore.kernel.org/all/20230721145423.161057-1-maxtram95@gmail.com/
2023-08-04 02:18:13 +09:00
Yu Watanabe
48575a59d2
Merge pull request #28628 from yuwata/meson-use-template-part6
meson: use template to declare executables (part 6)
2023-08-04 02:16:07 +09:00
Daan De Meyer
0f4259bcf2 mkosi: Update to latest
We modify all our scripts to execute in the image instead of on the
hosts. In the future we can adapt them to run on the host.
2023-08-03 17:03:05 +02:00
Daan De Meyer
1f1efbbf55
Merge pull request #28632 from DaanDeMeyer/repart-synthesize
repart: Add --copy-from option
2023-08-03 13:49:31 +02:00
Yu Watanabe
dc4a00555a meson: set suite for all tests, and adjust suite for some tests 2023-08-03 20:37:16 +09:00
Yu Watanabe
cbc55c4cce meson: also merge declarations of fuzzers with other executables 2023-08-03 20:37:16 +09:00
Yu Watanabe
130c87b16a meson: merge declarations of normal and test executables 2023-08-03 20:37:16 +09:00
Yu Watanabe
09fa0a0721 test: rename udev-rule-runner -> test-udev-rule-runner
This partially revert 0454cf05d38d289474ca65c1917d414b2958f6b5.
The executable actually does not work with itself, but needs to be
combined with test-udev.py. But, even so, the executable is for testing.

In the next commit, test and normal executables are declared in the same
way, and naming of the executable becomes essential to classify them.
Let's rename the executable and prefix with 'test-'.
2023-08-03 20:37:16 +09:00
Yu Watanabe
adedcd39a8 meson: use template to declare udev plugins 2023-08-03 20:37:16 +09:00
Yu Watanabe
12b4cffdae meson: introduce HAVE_DMI flag
The condition is used at several places. Let's introduce a simple flag
for that.
2023-08-03 20:37:16 +09:00
Yu Watanabe
ff2dedcffd test: fix test executable name
Follow-up for 82a1d6d09625b656c991f25e82b5651c74a55945.
2023-08-03 20:36:54 +09:00
Yu Watanabe
e5cc6d107c meson: move several test declarations
One of the notable change is that previously test-sysusers.sh was installed
unconditionally, but now it is installed only when sysusers is enabled.

Another change is that test-sysv-generator is now re-introduced which
was mistakenly dropped by 6c713961ab0831fe744a2df9c4e9e258b6ba3105.
2023-08-03 20:33:52 +09:00
Daan De Meyer
1e46985a60 repart: Add --copy-from option
--copy-from synthesizes partition definitions from the given image
which are then applied to the repart algorithm. In its most basic
form, this allows copying an image to another device but it can
also be combined with --definitions to copy + add partitions in the
same call to repart.
2023-08-03 11:12:25 +02:00
Luca Boccassi
e3b7fe92e9
Merge pull request #28651 from kraj/kraj/include-fixes
Add missing system includes for `LOCK_EX` and `struct timex`
2023-08-03 00:12:05 +01:00
Khem Raj
ac8db36cbc include missing sys/file.h for LOCK_EX 2023-08-02 14:45:27 -07:00
Khem Raj
e6456caf76 test/test-sizeof: Include sys/timex.h for struct timex
Fixes

../git/src/test/test-sizeof.c:64:41: error: incomplete definition of type 'struct timex'
   64 |         check(typeof(((struct timex *)0)->freq), SIZEOF_TIMEX_MEMBER);
      |                      ~~~~~~~~~~~~~~~~~~~^
2023-08-02 14:45:27 -07:00
Yu Watanabe
0b056cbc2d
Merge pull request #28640 from medhefgo/boot-count
bless-boot: Actually return successfully
2023-08-03 06:45:09 +09:00
Yu Watanabe
f882a986c2 journalctl: do not add io event source for stdout if it is a file
Fixes a bug introduced by 713342d9b09d717e9942ed08bd620c9159a98fb8.

Fixes #28636.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2228089.
2023-08-02 22:04:13 +01:00
Frantisek Sumsal
b456f2266a varlink: allocate the buffer for varlink FDs on the heap
Since it's ~16K, which might cause issues in environments with limited
stack space.

Resolves: #28635
2023-08-02 22:03:46 +01:00
Yu Watanabe
c4521fc17b udev: decrease devlink priority for encrypted partitions
Decrease devlink priority for encrypted partitions, and make the priority for
decrypted DM devices relatively higher. This is for the case that an encrypted
partition and its decrypted DM device have the same label.
2023-08-02 22:03:14 +01:00