Commit Graph
75598 Commits
Author SHA1 Message Date
Daan De Meyer 6d2984d21b core: Introduce unit_is_filtered() 2024-08-14 14:18:40 +02:00
Daan De Meyer 14702b9c18 core: Use RateLimit struct to store ratelimits
This makes it easier to serialize these ratelimits with
JSON_BUILD_CALLBACK().
2024-08-14 14:18:40 +02:00
Daan De Meyer 2031fe7461 basic: Various cleanups for ratelimit functions 2024-08-14 14:18:40 +02:00
Daan De Meyer db043a9b1a test: Use usual setup in integration-test-setup script 2024-08-14 14:18:40 +02:00
Daan De Meyer dba138b863 test: Fix section of StateDirectory= 2024-08-14 14:18:40 +02:00
Daan De Meyer c022fcd80c mkosi: Install llvm
For llvm-symbolizer which is required to sanitize address sanitizer
reports.
2024-08-14 14:18:40 +02:00
Daan De Meyer 7628565604 mkosi: Disable pagination in gdb 2024-08-14 14:18:40 +02:00
Luca Boccassi 33a2307ac7 Merge pull request #33957 from yuwata/network-generator-vlan
network-generator: fixlets for vlan interfaces
2024-08-14 12:45:25 +02:00
Yu Watanabe 2a774f0648 network-generator: drop wrong warning for rd.peerdns without value 2024-08-14 15:39:12 +09:00
Yu Watanabe 551b21eb0a network-generator: ignore kernel command line without value
And drop duplicated log messages.
2024-08-14 15:36:26 +09:00
Yu Watanabe b3b4d626ce network-generator: use extract_first_word()
Now, ip= with trailing colon is refused.
2024-08-14 15:29:45 +09:00
Dr. David Alan Gilbert c76fdfc51b nspawn: Fix help typo
'an an' -> 'an'
2024-08-14 13:45:27 +09:00
James Muir c5903cde63 man/systemd-sysusers, man/systemd-tmpfiles: fix sentence fragments
add "are executed" so that those two sentences have a verb.
2024-08-13 19:27:21 +02:00
Daan De Meyer d89ee0fcf9 nspawn: Assume unified cgroup hierarchy if there's no systemd in the image
If there's no systemd installation in the image, assume the unified
cgroup hierarchy.
2024-08-13 19:09:26 +02:00
Daan De Meyer 74cc5e2041 docs: Mention the new mount API in the container interface doc
Let's mention that the new mount API may be used to establish new
mounts in a container without needing the /run/host/incoming directory.
2024-08-13 12:20:43 +02:00
Luca Boccassi 5936b4054a Merge pull request #33979 from YHNdnzj/edit-util-no-duplicate-strip
edit-util: a few cleanups; support networkctl edit --stdin
2024-08-13 01:48:06 +02:00
Lukas Nykryn fe5a6c47af systemd-run: add unit and invocation_id JSON output 2024-08-12 20:19:01 +02:00
Mike Yuan 119cba7835 networkctl: support edit --stdin 2024-08-12 16:23:23 +02:00
Mike Yuan 40f5c372c2 edit-util: several cleanups for --stdin handling
Follow-up for 329050c5e2

I don't particularly favor the duplicated strstrip()
and such, so let's ensure if we get fixed data it's
only trimmed once. Subsequently we can benefit more
by making all copies reflinks.
2024-08-12 16:23:23 +02:00
Mike Yuan 3b5b2ff8fa edit-util: do not try to recreate temp file if missing
We initially read from temp file, then strip it, and write
back to it. If the file suddenly disappeared during the process,
it indicates someone else is touching our temp file
behind our back. Let's not silently continue.
2024-08-12 16:06:37 +02:00
Mike Yuan 7a729f876b edit-util: clean up run_editor() a bit
- Add missing assertions
- Close all fds before spawning editor
- Use FOREACH_STRING() + empty_to_null() where appropriate
  Note that this slightly changes the behavior, in that
  empty envvars would be treated as unset and we'd try
  the next candidate. But the new behavior is better IMO.
2024-08-12 16:04:11 +02:00
Luca Boccassi 10ac85d0da mkosi: update debian commit reference
* 6e0f4f74ba Update changelog for 256.4-3 release
* 4b142f9c37 Depend on new linux-bpf-dev package where available
* f5fe5ecf4d autopkgtest: use hint-testsuite-triggers to ensure other packages changes trigger our testsuite
* 407932845d autopkgtest: run upstream test last
* 31458d03c2 Stop installing legaly pkla file in upstream CI too
* 484643291a Use d/not-installed instead of manual removals
* 752bb4c34c Stop shipping empty /etc/init.d directory
* 174603ffc2 Use debian/clean instead of override in d/rules
* 9a355e5a51 Drop redundant pot build
* 3d249c88cb Update changelog for 256.4-2 release
2024-08-11 17:26:41 +02:00
Ivan Shapovalov 711a157738 core/exec-invoke: call setpriority() after sched_setattr()
The nice value is part of struct sched_attr, and consequently invoking
sched_setattr() after setpriority() would clobber the nice value with
the default (as we are not setting it in struct sched_attr).

It would be best to combine both calls, but for now simply invoke
setpriority() after sched_setattr() to make sure Nice= remains effective
when used together with CPUSchedulingPolicy=.
2024-08-10 19:09:14 +02:00
Mike Yuan 7036dd8b27 terminal-util: do not query kernel cmdline for pty size
This is pointless and noisy even for debug level.
2024-08-10 13:01:56 +02:00
Luca Boccassi 0dd6fe931d Merge pull request #33961 from bluca/busctl_exit
busctl: add support for --timeout and --num-matches for monitor verb
2024-08-09 14:48:40 +02:00
Luca Boccassi 702d74b62a busctl: add --num-matches= for monitor verb
Useful in scripts when one wants to wait for a specific
signal before continuing
2024-08-09 12:12:28 +01:00
Nick Rosbrook 82c482d573 core/unit: do not use unit path cache in unit_need_daemon_reload()
When unit_need_daemon_reload() calls unit_find_dropin_paths() to check
for new drop-in configs, the manager's unit path cache is used to limit
which directories are considered. If a new drop-in directory is created,
it may not be in the unit path cache, and hence unit_need_daemon_reload()
may return false, despite a new drop-in being present. However, if a
unit path cache is not given to unit_file_find_dropin_paths() at all,
then it behaves as if the target path was found in the unit path cache.

So, to fix this, adapt unit_find_dropin_paths() to take a boolean
argument indicating whether or not to pass along the unit path cache.
Set this to false in unit_need_daemon_reload().

Fixes #31752
2024-08-09 19:25:42 +09:00
Yu Watanabe 15642d2f38 network-generator: use network_acquire() at more places 2024-08-09 19:12:01 +09:00
Yu Watanabe b8a57ea56b network-generator: introduce network_acquire() and netdev_acquire()
No functional change, just refactoring.
2024-08-09 19:12:01 +09:00
Yu Watanabe bdd6787ee5 network-generator: trivial cleanups 2024-08-09 19:12:01 +09:00
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