1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-25 01:34:28 +03:00
Commit Graph

66505 Commits

Author SHA1 Message Date
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 b12d41a8bb.
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 0454cf05d3.
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 82a1d6d096.
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 6c713961ab.
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 713342d9b0.

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
Yu Watanabe
28fd786bf5
Merge pull request #28646 from yuwata/network-generator-ip-dhcp
network-generator: make ip=dhcp works with container manager
2023-08-03 05:48:58 +09:00
Khem Raj
213ddf2d05 include sys/file.h for LOCK_EX
Fixes
| ../git/src/basic/user-util.c:708:30: error: use of undeclared identifier 'LOCK_EX'; did you mean 'LOCK_BSD'?
|   708 |         r = unposix_lock(fd, LOCK_EX);
|       |                              ^~~~~~~
|       |                              LOCK_BSD

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-08-02 19:49:15 +01:00
Etienne Dechamps
6b2d576f2b NEWS: PrivateNetwork implies PrivateMounts
This is clearly a change that can break existing units, and broke my
system in at least two different ways. For this reason this should have
been added to NEWS in #26458, specifically c2da3bf, but wasn't.
2023-08-03 03:00:21 +09:00
Yu Watanabe
c25aa6c8ac network-generator: make network file generated from ip=dhcp matches only physical interfaces
Otherwise, it also matches later created virtual devices, and that
breaks networks generated and managed by container management services,
like docker.

Closes #28626.
2023-08-03 02:51:53 +09:00
Yu Watanabe
8d580dde76 meson: fix name of test-network-generator
As the test executable is named based on the first source file.
2023-08-03 02:21:50 +09:00
Jan Janssen
e80037b10f boot: Make file info size a constant 2023-08-02 16:22:42 +02:00
Jan Janssen
66fd078ba8 boot: Fix boot counting for XBOOTLDR entries
We were passing the dir handle for the ESP to
config_entry_bump_counters(), which will obviously fail if the entry
actually resides on the XBOOTLDR partition.

Fixes: #28637
2023-08-02 16:06:57 +02:00
Jan Janssen
8f30a066ff bless-boot: Actually return successfully
$ journalctl -u systemd-bless-boot.service
systemd[1]: Starting Mark the Current Boot Loader Entry as Good...
systemd-bless-boot[536]: Marked boot as 'good'. (Boot attempt counter is at 2.)
systemd-bless-boot[536]: Can't find boot counter source file for '/loader/entries/arch.conf': Device or resource busy
systemd[1]: Finished Mark the Current Boot Loader Entry as Good.
2023-08-02 15:16:33 +02:00
Luca Boccassi
6639ac474e
Merge pull request #28623 from yuwata/udev-builtin-net_id-cleanups
udev: several cleanups for net_id builtin (part 4)
2023-08-01 22:09:32 +01:00
Luca Boccassi
39f4ef2592
Merge pull request #28630 from fbuihuu/update-testsuite-for-opensuse
Update testsuite for opensuse
2023-08-01 22:08:52 +01:00
Daan De Meyer
2d9b3468b2 sysupdate: Move fdisk partition flags helpers to fdisk-util.c 2023-08-01 22:32:38 +02:00
Daan De Meyer
821d0cf0dc repart: Rename partition_exclude/defer() to partition_type_exclude/defer() 2023-08-01 22:32:38 +02:00
dependabot[bot]
f3d812baf7 build(deps): bump systemd/mkosi
Bumps [systemd/mkosi](https://github.com/systemd/mkosi) from 5866c0ff3b36d350c943016e5a3b115f7a95d37f to c6dd95b6eae0386579071cbf44fd838ce28b7237.
- [Release notes](https://github.com/systemd/mkosi/releases)
- [Changelog](https://github.com/systemd/mkosi/blob/main/NEWS.md)
- [Commits](5866c0ff3b...c6dd95b6ea)

---
updated-dependencies:
- dependency-name: systemd/mkosi
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-01 20:27:17 +00:00
Daan De Meyer
d713104abe ukify: Only run systemd-measure after adding all sections
We were running systemd-measure before adding the sbat section,
let's fix that.

Also make sure we only pass --linux to systemd-measure once instead
of twice.
2023-08-01 21:11:15 +01:00
Franck Bui
33ce0a8992 test: install systemd-homed for openSUSE
This new sub-package has been recently introduced.
2023-08-01 19:40:38 +02:00
Franck Bui
ba0ff9fc0f test: console fonts are located in /usr/share on openSUSE 2023-08-01 19:38:13 +02:00
Yu Watanabe
46f0a4e7ac test: skip tests earlier when we do not have enough privileges
Hopefully fixes #28624.
2023-08-02 02:36:52 +09:00
Daan De Meyer
54c3326066
Merge pull request #28620 from yuwata/meson-use-template-part5
meson: use template to declare executables (part 5)
2023-08-01 18:10:52 +02:00
Yu Watanabe
82cb5f2ad1 udev-builtin-net_id: first parse USB or BCMA identifier, then parse PCI properties
Previously, we first generate names based on the PCI slot and ACPI
onboard index, and then append an identifier based on USB or BCMA bus
if it exists in between the PCI bus and the interface.

However, if there exists USB or BCMA bus, the name based on the
ACPI onboard index is not used.

So, let's invert the order; first generate USB or BCMA identifier if the
bus exists, then prepend the name with the PCI slot identifier.

With this change, we can drop Names struct, and each naming logic
becomes self-consistent.
2023-08-02 00:00:32 +09:00
Yu Watanabe
415ade00aa udev-builtin-net_id: split out names_pci_onboard_label() from dev_pci_onboard()
Then call it only when it is necessary. The label is used only when the
interface is directly connected to the PCI bus, and it does not have the
SR-IOV feature (or the naming based on SR-IOV is disabled).
2023-08-01 23:35:34 +09:00
Yu Watanabe
f831aef509 udev-builtin-net_id: drop redundant copy of BCMA identifier in names_bcma()
Then, this makes names based on the BCMA and PCI identifiers in
names_bcma().

No functional change, just refactoring.
2023-08-01 23:35:34 +09:00
Yu Watanabe
d3523818e8 udev-builtin-net_id: split out get_bcma_specifier() from names_bcma()
This contains redundant copy of BCMA identifier, but that will be
dropped in the next commit.

No functional change, just refactoring and preparation for later
commits.
2023-08-01 23:35:34 +09:00
Yu Watanabe
f7ae5d1857 udev-builtin-net_id: drop redundant copy of USB identifier in names_usb()
This makes the names based on the USB identifier (and possibly with PCI
specifier) built in names_usb()

No functional change, just refactoring.
2023-08-01 23:35:34 +09:00
Yu Watanabe
045fb967a7 udeb-builtin-net_id: split out get_usb_specifier() from names_usb()
This contains redundant copy of USB identifier, but that will be
dropped in the next commit.

No functional change, just refactoring and preparation for later
commits.
2023-08-01 23:35:34 +09:00
Yu Watanabe
baab0a61dd
Merge pull request #28619 from yuwata/udev-builtin-net_id-cleanups-part3
udev: several cleanups and fixlets for net_id builtin (part 3)
2023-08-01 23:35:03 +09:00
Luca Boccassi
241dbc6e99
Merge pull request #28423 from dvdhrm/pr/memfd
basic/memfd: untangle historic `sealed` property
2023-08-01 15:33:24 +01:00
Daan De Meyer
05cae4cf8e
Merge pull request #28621 from DaanDeMeyer/repart-fix
Revert https://github.com/systemd/systemd/pull/28556
2023-08-01 16:32:35 +02:00