Commit Graph

46662 Commits

Author SHA1 Message Date
Yu Watanabe
a61738b3a6 network/address: make Address= in [Network] support an empty string
Closes #30485.
2023-12-21 04:08:53 +09:00
Yu Watanabe
b993e7e72e network: also log drop-in config files
We have already show used drop-in config files in networkctl, but
also showing that in log may be useful.

Closes #30483.
2023-12-21 03:37:17 +09:00
Yu Watanabe
935cf7b3a1 Merge pull request #30548 from yuwata/analyze-check-all-executables
analyze: check all executables
2023-12-21 03:36:35 +09:00
Yu Watanabe
47ac844ee6 network/neighbor: fix log message and comment 2023-12-21 03:33:58 +09:00
Mike Yuan
bc9e592c4f systemctl: configure boot loader options only when going through firmware
Fixes #30497
2023-12-21 01:35:55 +09:00
Yu Watanabe
c780591bba Merge pull request #30538 from poettering/ptyfwd-reset-color
ptyfwd: reset colors when we exit the pty forwarding logic
2023-12-21 01:17:00 +09:00
Yu Watanabe
0d1290977d Merge pull request #30543 from YHNdnzj/execute-cleanup
core/execute: trivial cleanup
2023-12-21 01:16:34 +09:00
Yu Watanabe
abf0ccc1c6 analyze-verify: verify all executables
ExecStart= and friends for .service and .socket can be specified
multiple times.
This also checks all commands for .mount and .swap, not only for the
current control command.
2023-12-20 23:56:16 +09:00
Lennart Poettering
518c4f0488 ptyfwd: make sure pty_forward_free() follows our usual semantics regarding NULL 2023-12-20 15:49:59 +01:00
Lennart Poettering
e7d2b00e0d ptyfwd: reset colors when we exit the pty forwarding logic
Just in case there was still a color set, make sure to reset things.
2023-12-20 15:49:09 +01:00
Yu Watanabe
760e7a3cb1 Merge pull request #30537 from poettering/run-arg-service-type-fix
run: arg_service_type is not supposed to be allocated from heap
2023-12-20 23:46:11 +09:00
Yu Watanabe
63d0491bbc Merge pull request #30536 from yuwata/network-bridge-vlan-debugging-logs
network/bridge-vlan: add debugging logs and documentation update
2023-12-20 23:46:01 +09:00
Mike Yuan
e03975b90f core/execute: use assertion for _done function
As per our usual coding style.
2023-12-20 21:56:49 +08:00
Mike Yuan
a7774a8ccb core/execute: remove unneeded brackets
I did not merge the if-s, since I think it's easier to read
in the current form with those long socketpair() calls.
2023-12-20 21:52:59 +08:00
Daan De Meyer
929f41c652 bootctl: update/list/remove all instances of systemd-boot in /EFI/BOOT
systemd-boot might be installed in /EFI/BOOT under more names than
just /EFI/BOOT/BOOTX64.efi. The prime example is shim which loads
its second stage binary from /EFI/BOOT/grubx64.efi. To accomodate
use cases where systemd-boot is installed as /EFI/BOOT/grubx64.efi,
let's always check the entire /EFI/BOOT directory for binaries that
identify as systemd-boot and list/update/remove those as well.

Let's keep this somewhat generic though and not install ourselves as
grubx64.efi since that would mean having to check for shim which is
a can of worms we probably don't want to open.
2023-12-20 13:56:02 +01:00
Yu Watanabe
8f876e8d98 Merge pull request #30525 from YHNdnzj/networkctl-mask
networkctl: introduce verb mask and unmask
2023-12-20 21:00:36 +09:00
Lennart Poettering
e132be4642 run: underline section titles in --help as we usually do 2023-12-20 12:14:24 +01:00
Lennart Poettering
4b5baf7514 run: arg_service_type is not supposed to be allocated from heap 2023-12-20 12:13:18 +01:00
Yu Watanabe
1e67047f99 network/bridge-vlan: add debugging logs about set or removed VLAN IDs
Addresses https://github.com/systemd/systemd/pull/29987#issuecomment-1863937968.
2023-12-20 19:47:08 +09:00
Yu Watanabe
d562667f7d userdb: fix typo
Follow-up for 523121d543.
2023-12-20 15:12:10 +09:00
Mike Yuan
28bb29cbb4 networkctl: introduce verb mask and unmask
Suggested in https://github.com/systemd/systemd/pull/29928#discussion_r1386626565
2023-12-20 12:46:46 +08:00
Mike Yuan
7ce6a0960f networkctl-config-file: check for masked config before editing/showing 2023-12-20 12:46:46 +08:00
Mike Yuan
078fad363e networkctl-config-file: split out reload_daemons 2023-12-20 12:46:46 +08:00
Mike Yuan
c5f51d5f3f networkctl-cat: insert a newline between different config files 2023-12-20 12:46:45 +08:00
Mike Yuan
15fde154f8 networkctl: split out networkctl-config-file.[ch] 2023-12-20 12:46:43 +08:00
Mike Yuan
2886cadc72 shared/install: use RET_GATHER more 2023-12-20 12:44:50 +08:00
Yu Watanabe
e2ceb696d6 Merge pull request #30493 from teknoraver/main
Add verbose output on unit start #5717
2023-12-20 13:42:59 +09:00
Lennart Poettering
1a424b0721 varlink: these two errors where added to the spec, we aren't squatting the namespace anymore
4443c57f1e
2023-12-20 12:22:05 +08:00
Yu Watanabe
5d889f3ab8 signal-util: align table 2023-12-20 03:07:46 +09:00
Yu Watanabe
97df9fa065 time-util: make usleep_safe() return earlier if 0 is passed 2023-12-20 03:07:46 +09:00
Daan De Meyer
a412a1b92a test: Skip various tests when /sys is not mounted
When running tests in a container, /sys might not be mounted, so
let's make sure we skip tests that depend on /sys in this case.
2023-12-19 16:38:57 +01:00
Matteo Croce
b408d46b83 systemctl: show success messages when showing transaction
Extend `--show-transaction` so it shows a success message when an unit
is successfully started.
2023-12-19 04:52:41 -08:00
Matteo Croce
e22ad53d5c dbus-wait-for-jobs: change 'quiet' flag to enum
Change the 'quiet' flag to `bus_wait_for_jobs()` to an enum, so we can
select with more granularity the type of information logged.
2023-12-19 04:52:41 -08:00
Yu Watanabe
422d8905c0 find-esp: add debugging log about failure in parsing env variable
Addresses https://github.com/systemd/systemd/pull/30321#discussion_r1429716344.
2023-12-19 12:01:26 +01:00
Lukas Nykryn
3b2e7dc5a2 udev: allow/denylist for reading sysfs attributes when composing a NIC name
Users can currently pick specific versions of NIC naming, but that
does not guarantee that NIC names won't change after the kernel adds
a new sysfs attribute.

This patch allows for an allow/deny list of sysfs attributes
that could be used when composing the name.

These lists can be supplied as an hwdb entry in the form of
/etc/udev/hwdb.d/50-net-naming-allowlist.hwdb
net:naming:drvirtio_net
  ID_NET_NAME_ALLOW=0
  ID_NET_NAME_ALLOW_ACPI_INDEX=1
  ID_NET_NAME_ALLOW_ADDR_ASSIGN_TYPE=1
  ID_NET_NAME_ALLOW_ADDRESS=1
  ID_NET_NAME_ALLOW_ARI_ENABLED=1
  ID_NET_NAME_ALLOW_DEV_PORT=1
  ID_NET_NAME_ALLOW_FUNCTION_ID=1
  ID_NET_NAME_ALLOW_IFLINK=1
  ID_NET_NAME_ALLOW_INDEX=1
  ID_NET_NAME_ALLOW_LABEL=1
  ID_NET_NAME_ALLOW_PHYS_PORT_NAME=1
  ID_NET_NAME_ALLOW_TYPE=1
2023-12-19 19:15:52 +09:00
Yu Watanabe
91436851d5 Merge pull request #30491 from fbuihuu/vconsole-handle-kd-grahpics-mode
vconsole-setup: handle the case where the vc is in KD_GRAPHICS mode m…
2023-12-19 11:49:31 +09:00
Lennart Poettering
8722c7e7bc siphash: make sure siphash24_compress_usec_t() works the same on LE/BE archs
Let's be systematic here, and always hash LE values. It doesn't matter
in our current codebase, but it might one day.
2023-12-19 11:48:53 +09:00
Yu Watanabe
03251a0b40 Merge pull request #30518 from mrc0mmand/assorted-tweaks
A couple of assorted tweaks
2023-12-19 11:48:40 +09:00
Lennart Poettering
e22ca70008 ether-addr-util: split out logic to mark MAC addresses as random 2023-12-19 11:48:05 +09:00
Ronan Pigott
d4fd7fb5d7 typo: transer -> transfer 2023-12-19 11:46:47 +09:00
Frantisek Sumsal
e80c6ea740 pcrlock: use empty_or_dash() more 2023-12-18 17:26:19 +01:00
Frantisek Sumsal
3c4d0ec940 analyze: use strempty() 2023-12-18 17:25:10 +01:00
Frantisek Sumsal
159d1e2659 journalctl: also refuse --cursor-file= with --since=
We already refuse the other two cursor-related options (--cursor= and
--after-cursor=) with --since=, so let's do the same with
--cursor-file=.

Closes: #20523
2023-12-18 17:06:43 +01:00
Franck Bui
0d29fd46d1 vconsole-setup: remember the correct error value when open_terminal() fails 2023-12-18 15:48:56 +01:00
Franck Bui
58161db61b vconsole-setup: handle the case where the vc is in KD_GRAPHICS mode more gracefully
Regardless of whether a vc path is passed, the behavior of
systemd-vconsole-setup wasn't ideal when either the passed vc or /dev/tty1 was
in graphics mode.

When a vc in graphics mode was passed, no message was emitted despite the fact
that the font settings couldn't be applied. The previous code might have
assumed that setfont(8) would throw a warning but that's not case.

When no argument was passed, systemd-vconsole-setup was supposed to
automatically select a valid tty, init it and copy the font setting to the
remaining ttys. However if the selected virtual console was in KD_GRAPHICS mode
the initialization of the font failed not only for the selected source vc but
for all of them.
2023-12-18 15:48:53 +01:00
Lennart Poettering
f5fcf851b5 Merge pull request #30515 from poettering/dnslabelmax
extend most DNS label buffers by one
2023-12-18 15:12:27 +01:00
networkException
4e0db87e4c core: allow interface altnames in RestrictNetworkInterfaces=
This patch enables IFNAME_VALID_ALTERNATIVE for checks guarding the
parsing of RestrictNetworkInterfaces=.

The underlying implementation for this option already supports
altnames.
2023-12-18 15:12:10 +01:00
Lennart Poettering
a19e7f3101 Merge pull request #30321 from yuwata/find-esp
find-esp: gracefully handle btrfs RAID
2023-12-18 15:11:54 +01:00
Lennart Poettering
dadc06bc6c Merge pull request #30150 from poettering/homectl-interactive
add "homectl firstboot" verb, that runs at first boot and can create a user, interactively or from creds
2023-12-18 15:11:23 +01:00
Daan De Meyer
c88753db45 shutdown: Send EXIT_STATUS before final sync
There's a race condition where the EXIT_STATUS= message we send
just before shutting down the VM doesn't arrive on the host,
presumably because the VM is shut down before the kernel has had a
chance to forward the message to the host.

Since there's no obvious way to wait until the message has been
flushed to the host, let's send the message before we execute the
final sync() instead of after executing the final sync(). In my
testing, this seems to either guarantee the message is sent or
introduces sufficient delay that the kernel always has time to flush
its socket buffers to the host.
2023-12-18 13:21:17 +01:00