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

75718 Commits

Author SHA1 Message Date
Yu Watanabe
e31a55edf1 network-generator: parse vlan ID from vlan interface name
Fixes #33954.
2024-08-09 19:12:01 +09:00
Yu Watanabe
c40ef3f8ff network-generator: allow to create bridge or friends without slave interfaces 2024-08-09 19:11:49 +09:00
Yu Watanabe
9eee6b1b3f network-generator: vlan= can be specified multiple times 2024-08-09 15:39:38 +09:00
Yu Watanabe
c0981de289 test: add one more test case without hostname 2024-08-09 15:39:38 +09:00
Yu Watanabe
6c7f562207 test: modernize test-network-generator 2024-08-09 14:58:08 +09:00
Luca Boccassi
79488ac003 test: note in README how to get full list of Ubuntu CI jobs 2024-08-08 15:13:38 +01:00
Renan Guilherme
3a576084e2 hwdb: Fix accelerometer mount matrix for ASUS T100TAS 2024-08-08 11:53:11 +02:00
Luca Boccassi
989e843e75 busctl: add support for --timeout to monitor verb
Useful in scripts when you want to exit successfully after a certain time
2024-08-08 09:18:41 +01:00
Daan De Meyer
6e9536c971
Merge pull request #33959 from DaanDeMeyer/crash
Two crash handler improvements
2024-08-08 08:14:46 +02:00
Luca Boccassi
1e2aa88bb2 nspawn: fix settings leak for init parameter
Fixes https://github.com/systemd/systemd/issues/33960

Follow-up for ce2291730d
2024-08-08 06:58:52 +02:00
Daan De Meyer
570a11eb9d crash-handler: Drop 10s sleep before we spawn the crash shell
It pointlessly delays getting to the crash shell so let's drop the
10s sleep.
2024-08-07 21:26:53 +02:00
Daan De Meyer
bc3477fdc5 crash-handler: Call vhangup on /dev/console before spawning crash shell
When pid 1 crashes, the getty unit for the console will happily keep
running which means we end up with two shells competing for the same
tty. Let's call vhangup on /dev/console to kill every other process
attached to the console before we spawn the crash shell. The getty
units have Restart=always but lucky for us, pid 1 just crashed in fire
and flames so it isn't actually able to restart the getty unit.
2024-08-07 21:24:57 +02:00
Daan De Meyer
2561e2a356 mkosi: Disable debuginfod
We generally don't care about library debuginfo so let's just disable
debuginfod so it doesn't get in the way when debugging.

We use /root/.gdbinit as the systemwide gdbinit location is distribution
specific.
2024-08-07 21:24:57 +02:00
Yu Watanabe
f548bc4011 meson: enable -Wunterminated-string-initialization
With af1a6db58f, now we can build with the
option.
2024-08-07 13:34:36 +02:00
Daan De Meyer
4fde35f27e
Merge pull request #33951 from DaanDeMeyer/nspawn
nspawn: Allow specifying custom init program
2024-08-07 07:32:50 +02:00
Cristian Rodríguez
af1a6db58f basic|boot: silence Wunterminated-string-initialization gcc15 warnings
gcc15 has -Wunterminated-string-initialization in -Wextra and
warns about string constants that are not null terminated even though
the functions do do out of bounds access.
Silence the warnings by simply not providing an explicit size.
2024-08-07 00:14:53 +02:00
Daan De Meyer
ce2291730d nspawn: Allow specifying custom init program
This allows for example forcing to use /sbin/init instead of always
using /usr/lib/systemd/systemd if it exists. Or it allows using a
different path altogether.
2024-08-06 23:00:17 +02:00
Michal Sekletar
68511cebe5 coredump: generate properly symbolized stacktrace for containerized processes 2024-08-06 18:32:42 +02:00
Nick Rosbrook
18a8f03e51 sysusers: check if requested group name matches user name in queue
When creating a user, check if the requested group name matches a user
name in the queue. If that matched user name is also going to be a group
name, then use it for the new user too. In other words, allow the
following:

 u foo -
 u bar -:foo

when both foo and bar are new users.

Fixes #33547
2024-08-06 13:02:58 +02:00
Daan De Meyer
d3f0b4f3d2 nspawn: Drop unused includes 2024-08-06 10:25:06 +02:00
Daan De Meyer
92d885d870
Merge pull request #33942 from yuwata/udevadm-info-attribute-walk-json
udevadm-info: support json output for --attribute-walk
2024-08-06 10:23:45 +02:00
Yu Watanabe
5a5a7093b8
Merge pull request #33933 from yuwata/systemctl-bus-transport-and-runtime-scope
systemctl: fix bus transport and runtime scope handling
2024-08-06 09:12:28 +09:00
Yu Watanabe
c243302ee0
Merge pull request #33941 from yuwata/network-dhcp-pd-route-type
network/dhcp-pd: introduce UnassignedSubnetPolicy= to customize type of 'catch-all' route
2024-08-06 09:11:54 +09:00
Yu Watanabe
1056457d11 systemctl: gracefully adjust bus transport and runtime scope when --boot-loader-entry=help
This fixes the following assertion:
===
SYSTEMD_LOG_LEVEL=debug systemctl --user -H foo --boot-loader-entry=help
Assertion 'transport != BUS_TRANSPORT_REMOTE || runtime_scope == RUNTIME_SCOPE_SYSTEM' failed at src/shared/bus-util.c:284, function bus_connect_transport(). Ignoring.
Failed to connect to bus: Operation not supported
===

Fixes a bug introduced by 97af80c5a7.
Fixes #33661.
Fixes oss-fuzz#70153.
2024-08-06 05:33:25 +09:00
Yu Watanabe
d133508493 test-network: add test case for UnassignedSubnetPolicy= 2024-08-06 05:24:20 +09:00
Yu Watanabe
a61869d4a5 network/dhcp-pd: allow to customize route type for delegated prefix
Closes #33929.
2024-08-06 05:24:16 +09:00
Yu Watanabe
67ea8a4c0e udevadm-info: support json output for --attribute-walk
Closes #33852.
2024-08-06 05:22:10 +09:00
Arnaud Patard
e7a93e7521 src/pcrlock/pcrlock.c: Handle empty pcrlock.d directories
Running the following commands:

  # mkdir -p /var/lib/pcrlock.d/123-empty.pcrlock.d
  # /usr/lib/systemd/systemd-pcrlock predict --pcr=1+2+3+4+5+16

Will result in:

...
Floating point exception

Running the following commands:
  # mkdir -p /var/lib/pcrlock.d/123-empty.pcrlock.d
  # /usr/lib/systemd/systemd-pcrlock make-policy --pcr=1+2+3+4+5+16

Will result to this (partial) log:
...
Predicted future PCRs in 133us.
[]
...
Written policy digest 0000000000000000000000000000000000000000000000000000000000000000 to NV index 0x1921da6
...

So, add missing checks to handle gracefully cases where there's no variant
inside the component.

Signed-off-by: Arnaud Patard <arnaud.patard@collabora.com>
2024-08-05 18:32:26 +01:00
Luca Boccassi
1e0ef01439 logind: add PreparingForShutdownWithMetadata property
The PrepareForShutdownWithMetadata signal was added via
e4aab5cf1a but a corresponding property
was not. A property has to be a single type, so the bool needs to be
one of the key/value pairs as 'ba{sv}' is not a valid property.
2024-08-05 19:30:15 +02:00
Daan De Meyer
bec6b53f3c
Merge pull request #33912 from DaanDeMeyer/mkosi
test: Add a way to quickly iterate on an integration test
2024-08-05 16:21:48 +02:00
Daan De Meyer
857e4528f5 mkosi: Prevent busybox from getting pulled into opensuse images
OpenSUSE's busybox has a bunch of Provides for basic tools that cause
it to get pulled into images unless the corresponding tool is explicitly
installed so let's add explicit tools to make sure we don't get busybox.
2024-08-05 16:20:55 +02:00
rajmohan r
1592d2f900 systemd-analyze: Add svg scaling options
+ Scale the x-axis of the resulting plot by a factor (default 1.0)
+ Add activation timestamps to each bar

Signed-off-by: rajmohan r <rajmohan.r@kpit.com>
2024-08-05 15:23:44 +02:00
Daan De Meyer
af153e36ae test: Add a way to quickly iterate on an integration test
Rebuilding the integration test every time is very slow. Let's
introduce a way to iterate on an integration test without rebuilding
the image every time. By making a btrfs snapshot before we run the
integration test, we can then systemctl soft-reboot after running
the test to restore the rootfs to a pristine state before running
the test again.

As /run/nextroot will get nuked on reboot or soft-reboot, we introduce
a tmpfiles snippet to make sure it is recreated every (soft-)reboot
and adapt the existing tests to deal with this new symlink.
2024-08-05 15:13:38 +02:00
Daan De Meyer
edc6592e53 mkosi: Switch back to btrfs
The next commit will introduce a way to iterate on integration
tests which depends on btrfs specific features.

We leave CentOS on ext4 as its kernel does not support btrfs.
2024-08-05 15:00:24 +02:00
Daan De Meyer
ea696c5f53 mkosi: Enable Autologin= again on Debian
Debian uses /usr/bin/login from the shadow package instead of util-linux
which doesn't support credentials. Let's enable autologin the old
fashioned way for now.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833256
2024-08-05 15:00:24 +02:00
Daan De Meyer
dd1c01b20f test: Implement TEST_SHELL for mkosi based test runner
TEST_SHELL can be used to get a shell in the integration test
environment without actually immediately starting the test.
2024-08-05 15:00:24 +02:00
Daan De Meyer
33f400a9e0 test: Rename INTERACTIVE_DEBUG to TEST_SHELL 2024-08-05 15:00:24 +02:00
Daan De Meyer
5f5b6fa901 docs: Update upgrade commands in HACKING.md
- Add the required options to make the package managers non interactive
- Use apt-get instead of apt
- Remove --reinstall from apt-get command so we only install newer packages
- Add --needed to pacman command so we only install newer packages
2024-08-05 15:00:24 +02:00
Daan De Meyer
63bafef12b mkosi: Drop locale tmpfiles snippet
Not required anymore as we don't do /usr only anymore and the symlink
will be created by the debian systemd package.
2024-08-05 15:00:24 +02:00
Luca Boccassi
526f767313
Merge pull request #33939 from yuwata/resolve-varlink
resolve: type field in result of ResolveService may be NULL
2024-08-05 11:37:39 +02:00
Luca Boccassi
2e59aa50da
Merge pull request #33944 from yuwata/journal-max-retention-sec
journal: do not rotate journal when MaxRetentionSec= is set
2024-08-05 11:28:48 +02:00
Yu Watanabe
b55027efe4 journal: set flushed flag even if we fail to open runtime journals
As at this stage, a persistent journal file has been already opened, and
saved seqnum has been reset, and any later journal entries will be stored
to the file. Hence we should not open the runtime journal file by
server_system_journal_open() again.
2024-08-05 11:27:20 +02:00
Yu Watanabe
0d113f8e70 journal: comment the default value in journald.conf 2024-08-05 15:33:32 +09:00
Yu Watanabe
b63c18db03 journal: do not rotate journal when MaxRetentionSec= is set
The setting is about vacuuming archived journal files. It is not
necessary to rotate the current journal. Note, journal file rotation is
controlled by MaxFileSec=.

Fixes #31315.
2024-08-05 15:33:32 +09:00
Yu Watanabe
ce12bd19a0 udevadm-info: trival cleanups
- drop trailing an empty line,
- use FOREACH_ARRAY() macro,
- add short comment for boolean argument.
2024-08-05 12:27:10 +09:00
Yu Watanabe
b48ab08732 resolve: refuse invalid service without type field
Fixes Fixes #33935.
2024-08-05 10:47:11 +09:00
Yu Watanabe
cc194dddc2 resolve: voidify unused result of function call 2024-08-05 10:47:11 +09:00
Yu Watanabe
0c7bb54238 network: split out core logic route_type_is_reject()
Preparation for later change.
2024-08-05 09:15:15 +09:00
Marc Reisner
2d00f4c306
sleep: add HibernateOnACPower= option (#33846)
* Add HibernateOnACPower= systemd-sleep configuration option
2024-08-05 00:01:34 +01:00
Luca Boccassi
bd5b586ad0
Merge pull request #33918 from YHNdnzj/exec-cred-cleanup
core/exec-credential: several cleanups
2024-08-04 14:20:27 +02:00