Commit Graph

75623 Commits

Author SHA1 Message Date
Chengen Du
6bd12be3fa udev: Handle PTP device symlink properly on udev action 'change'
PTP device symlink creation rules are currently executed only when the
udev action is 'add'. If a user reloads the rules and runs the udevadm
trigger command to reapply changes, the symlink may be deleted, which
can prevent the chronyd service from restarting properly.

Signed-off-by: Chengen Du <chengen.du@canonical.com>
2024-08-15 15:38:46 +09:00
Yu Watanabe
6ddf879ce8 Merge pull request #33955 from yuwata/sd-journal-fix-sd_journal_seek_monotonic_usec
sd-journal: fix sd_journal_seek_monotonic_usec()
2024-08-15 15:38:19 +09:00
Thorsten Scherer
932cc94436 repart: Fix misleading typo in GPT partition flag
Bit 60 is the one corresponding to ReadOnly, not 50.  Fix this.
2024-08-15 05:59:58 +09:00
Yu Watanabe
6dd1465b2a Merge pull request #32067 from ssahani/bareudp1
network: netdev - BareUDP Add support for srcportmin
2024-08-15 05:35:32 +09:00
Yu Watanabe
4b509053ec sd-journal: rename offset -> ret_offset 2024-08-15 04:43:32 +09:00
Yu Watanabe
1e59254ac2 sd-journal: swap condition to reduce indentation
No functional change, just refactoring.
2024-08-15 04:43:32 +09:00
Yu Watanabe
3fc1e4f63a sd-journal: drop unnecessary temporal variable 'k'
No functional change, just refactoring.
2024-08-15 04:43:32 +09:00
Yu Watanabe
24ce1703c4 sd-journal: add trailing comma 2024-08-15 04:43:32 +09:00
Yu Watanabe
12dcb12df3 test: add test cases for sd_journal_seek_realtime_usec() and sd_journal_seek_monotonic_usec() 2024-08-15 04:43:32 +09:00
Yu Watanabe
9c04f67884 sd-journal: fix sd_journal_seek_monotonic_usec()
This fixes the following issues:

- We have a journal file, which contains entries of boot A and B. Let T
  be the timestamp of the _last_ entry of boot A.
  If sd_journal_seek_monotonic_usec() is called for boot A with a timestamp
  _after_ T, following sd_journal_next() will provide the _first_ entry of
  boot A, rather than the first entry of boot B.

- We have two journal files X and Y. The file X contains entries of boot A.
  Let T be the timestamp of the _last_ entry of boot A in file X. The file Y
  contains entries of boot A after timestamp T.
  If sd_journal_seek_monotonic_usec() is called for boot A with a
  timestamp _after_ T, following sd_journal_next() will provide the
  _first_ entry of boot A, whose timestamp is of course earlier than T.
2024-08-15 04:43:32 +09:00
Yu Watanabe
a2e4b8d866 test: modernize test-journal-interleaving 2024-08-15 04:43:32 +09:00
Yu Watanabe
4f94470ded test: replace ASSERT_TRUE() for dns_cache_lookup() with ASSERT_OK_POSITIVE()
As it may return negative errno on error, and returns number of found
entries on success.
2024-08-15 04:43:32 +09:00
Yu Watanabe
538766ddf4 test: add ASSERT_OK_POSITIVE() and ASSERT_OK_ZERO() 2024-08-15 04:43:20 +09:00
Luca Boccassi
cf91785137 Merge pull request #33991 from DaanDeMeyer/manager-json-split
Various refactorings and fixes
2024-08-14 21:35:04 +02:00
Susant Sahani
3859ef162b test-network: Add test for BareUDP srcportmin 2024-08-14 23:18:26 +05:30
Susant Sahani
7918894302 network: netdev - BareUDP Add support for srcportmin
Allows to configure the lowest value of the UDP tunnel source port range.
2024-08-14 23:18:20 +05:30
Mike Yuan
c2d9b477ef Merge pull request #33990 from yuwata/run-json-follow-ups
run: several follow-ups for recent change
2024-08-14 16:06:03 +02:00
Daan De Meyer
2250c996cf core-varlink: Introduce manager_varlink_managed_oom_connect()
In the next commit, we'll introduce a varlink server for the user
manager. As preparation for that, let's introduce a new function to
initialize only the managed OOM connection whenever we send a managed
OOM update.
2024-08-14 14:21:48 +02:00
Mike Yuan
c557f6f540 core-varlink: merge two FLAGS_SET() where appropriate 2024-08-14 14:19:47 +02:00
Daan De Meyer
e3878ff657 sd-json: Use goto finish instead of return
sd_json_buildv() uses a "finish" goto label for cleanup so make sure
we goto that label on failure instead of returning directly.
2024-08-14 14:18:40 +02:00
Daan De Meyer
32c9bf14ce taint: Add taint_strv() to get taints as an array 2024-08-14 14:18:40 +02:00
Daan De Meyer
406e41cdef core: Clean up includes a little 2024-08-14 14:18:40 +02:00
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
00ca5d3ad9 run: use sd_json_variant_set_field_id128() 2024-08-14 15:53:42 +09:00
Yu Watanabe
9ec6d26e41 sd-json: add sd_json_variant_set_field_id128() and _uuid() 2024-08-14 15:52:39 +09:00
Yu Watanabe
35c952bf1c run: drop unnecessary initializations
Follow-up for fe5a6c47af.
2024-08-14 15:45:49 +09: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