Luca Boccassi
ed35851693
run: fix generated unit name clash after soft-reboot
...
When sd-run connects to D-Bus rather than the private socket, it will
generate the transient unit name using the bus ID assigned by the D-Bus
broker/daemon. The issue is that this ID is only unique per D-Bus run,
if the broker/daemon restarts it starts again from 1, and it's a simple
incremental counter for each client.
So if a transient unit run-u6.service starts and fails, and it is not
collected (default on failure), and the system soft-reboots, any new
transient unit might conflict as the counter will restart:
Failed to start transient service unit: Unit run-u6.service was already loaded or has a fragment file.
Get the soft-reboot counter, and if it's greater than zero, append it
to the autogenerated unit name to avoid clashes.
2024-03-28 11:19:46 +09:00
Yu Watanabe
2a4fb037cb
Merge pull request #31989 from mrc0mmand/test-loop-dev-check
...
test: check for /dev/loop-control when checking lodev availability
2024-03-28 11:19:32 +09:00
Yu Watanabe
74158eec0e
Merge pull request #31963 from yuwata/journalctl-authenticate-cleanups
...
journalctl-authenticate: several cleanups
2024-03-28 11:19:21 +09:00
Yu Watanabe
5e4aad5e96
Merge pull request #31985 from DaanDeMeyer/mkosi
...
mkosi: Copy built packages to output directory
2024-03-28 10:21:34 +09:00
Yu Watanabe
a128119a1d
timedate: fix typo
...
Follow-up for 3a51e31be9 .
2024-03-28 09:55:11 +09:00
Yu Watanabe
66a0fdcaa5
journalctl-authenticate: return earlier if we are not on a TTY
...
No functional change, just refactoring.
2024-03-28 09:40:34 +09:00
Yu Watanabe
ef277c961f
journalctl-authenticate: use open_tmpfile_linkable() and link_tmpfile()
...
This also
- use path_join(),
- rename variables to more descriptive names.
2024-03-28 09:38:10 +09:00
Yu Watanabe
2dac05e62b
journalctl-authenticate: drop unnecessary safe_close()
...
Follow-up for 7560fffcd2 .
Addresses https://github.com/systemd/systemd/pull/31879#discussion_r1539063239 .
2024-03-28 09:36:29 +09:00
Yu Watanabe
4c56862170
journalctl-authenticate: use is_dir() and refuse symlink for /var/log/journal
...
I am not sure it is explicitly documented that /var/log/journal should
be a directory, rather than a symlink to a directory, but the current
code of journald seems not to support symlinked directory well. Let's
refuse that at least here and now.
2024-03-28 09:36:29 +09:00
Luca Boccassi
e6bd341e7d
analyze: fix plot with soft-reboot
...
Clamp times and start counting from when soft-reboot is started
to avoid creating a huge graph, like it's done for the user
instance.
2024-03-27 22:25:45 +00:00
Frantisek Sumsal
c75ee69e59
test: cleanup the test script a bit
2024-03-27 20:15:02 +01:00
Frantisek Sumsal
0348b500ef
test: check for /dev/loop-control when checking lodev availability
...
losetup in util-linux 2.40 started reporting lost loop devices [0] and
it has an unfortunate side-effect where it reports lost devices even in
containers, which then makes the loop device check "falsely" pass [1].
Let's just check for /dev/loop-control explicitly to "work around" this.
[0] a6ca0456cc
[1] https://github.com/util-linux/util-linux/issues/2824
2024-03-27 19:35:30 +01:00
Michal Koutný
3a51e31be9
timedated: Respond on org.freedesktop.timedate1.SetNTP only when really finished
...
The method returns prematurely (before jobs it triggers terminate). This
is externally visible because other methods may fail if jobs did not
finish.
Postpone the DBus method response until we collect all signals for
finished jobs.
systemd-timedated keeps track of in-flight DBus requests and answers
them all in unspecified order when jobs finish. The capacity of requests
in systemd-timedated is limited.
Fixes : #17739
2024-03-27 17:28:24 +00:00
Daan De Meyer
5524d2838c
mkosi: Copy built packages to output directory
...
This allows the built packages to be inspected if needed, or installed
on the host system for anyone who's daring enough to do so.
2024-03-27 16:14:17 +01:00
Daan De Meyer
e11fe427f8
mkosi: Update to latest
2024-03-27 16:14:15 +01:00
Yu Watanabe
a3ed665a29
network/dhcp-server: introduce PersistLeases= setting
...
Requested at https://github.com/systemd/systemd/pull/31772#issuecomment-2000053357 .
2024-03-27 13:21:15 +00:00
Antonio Alvarez Feijoo
f824cd660a
journalctl-show/util: add missing header
...
```
[1237/2836] Compiling C object journalctl.p/src_journal_journalctl-show.c.o
FAILED: journalctl.p/src_journal_journalctl-show.c.o
cc -Ijournalctl.p -I. -I.. -Isrc/basic -I../src/basic -Isrc/fundamental -I../src/fundamental -Isrc/systemd -I../src/systemd -I../src/libsystemd/sd-bus -I../src/libsystemd/sd-device -I../src/libsystemd/sd-event -I../src/libsystemd/sd-hwdb -I../src/libsystemd/sd-id128 -I../src/libsystemd/sd-journal -I../src/libsystemd/sd-netlink -I../src/libsystemd/sd-network -I../src/libsystemd/sd-resolve -Isrc/shared -I../src/shared -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O0 -g -Wno-missing-field-initializers -Wno-unused-parameter -Wno-nonnull-compare -Warray-bounds -Warray-bounds=2 -Wdate-time -Wendif-labels -Werror=format=2 -Werror=format-signedness -Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Werror=missing-declarations -Werror=missing-prototypes -Werror=overflow -Werror=override-init -Werror=return-type -Werror=shift-count-overflow -Werror=shift-overflow=2 -Werror=undef -Wfloat-equal -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-aliasing=2 -Wstrict-prototypes -Wsuggest-attribute=noreturn -Wunused-function -Wwrite-strings -Wzero-length-bounds -fdiagnostics-show-option -fno-common -fstack-protector -fstack-protector-strong --param=ssp-buffer-size=4 -Wno-unused-result -Werror=shadow -fno-strict-aliasing -fvisibility=hidden -fno-omit-frame-pointer -include config.h -pthread -MD -MQ journalctl.p/src_journal_journalctl-show.c.o -MF journalctl.p/src_journal_journalctl-show.c.o.d -o journalctl.p/src_journal_journalctl-show.c.o -c ../src/journal/journalctl-show.c
../src/journal/journalctl-show.c: In function ‘setup_event’:
../src/journal/journalctl-show.c:330:38: error: ‘STDOUT_FILENO’ undeclared (first use in this function)
330 | r = sd_event_add_io(e, NULL, STDOUT_FILENO, EPOLLHUP|EPOLLERR, NULL, INT_TO_PTR(-ECANCELED));
| ^~~~~~~~~~~~~
../src/journal/journalctl-show.c:330:38: note: each undeclared identifier is reported only once for each function it appears in
[1238/2836] Compiling C object journalctl.p/src_journal_journalctl-util.c.o
FAILED: journalctl.p/src_journal_journalctl-util.c.o
cc -Ijournalctl.p -I. -I.. -Isrc/basic -I../src/basic -Isrc/fundamental -I../src/fundamental -Isrc/systemd -I../src/systemd -I../src/libsystemd/sd-bus -I../src/libsystemd/sd-device -I../src/libsystemd/sd-event -I../src/libsystemd/sd-hwdb -I../src/libsystemd/sd-id128 -I../src/libsystemd/sd-journal -I../src/libsystemd/sd-netlink -I../src/libsystemd/sd-network -I../src/libsystemd/sd-resolve -Isrc/shared -I../src/shared -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O0 -g -Wno-missing-field-initializers -Wno-unused-parameter -Wno-nonnull-compare -Warray-bounds -Warray-bounds=2 -Wdate-time -Wendif-labels -Werror=format=2 -Werror=format-signedness -Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Werror=missing-declarations -Werror=missing-prototypes -Werror=overflow -Werror=override-init -Werror=return-type -Werror=shift-count-overflow -Werror=shift-overflow=2 -Werror=undef -Wfloat-equal -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-aliasing=2 -Wstrict-prototypes -Wsuggest-attribute=noreturn -Wunused-function -Wwrite-strings -Wzero-length-bounds -fdiagnostics-show-option -fno-common -fstack-protector -fstack-protector-strong --param=ssp-buffer-size=4 -Wno-unused-result -Werror=shadow -fno-strict-aliasing -fvisibility=hidden -fno-omit-frame-pointer -include config.h -pthread -MD -MQ journalctl.p/src_journal_journalctl-util.c.o -MF journalctl.p/src_journal_journalctl-util.c.o.d -o journalctl.p/src_journal_journalctl-util.c.o -c ../src/journal/journalctl-util.c
../src/journal/journalctl-util.c: In function ‘acquire_journal’:
../src/journal/journalctl-util.c:36:60: error: ‘STDIN_FILENO’ undeclared (first use in this function)
36 | r = sd_journal_open_files_fd(&j, (int[]) { STDIN_FILENO }, 1, arg_journal_additional_open_flags);
| ^~~~~~~~~~~~
../src/journal/journalctl-util.c:36:60: note: each undeclared identifier is reported only once for each function it appears in
```
Fixes ade2db83fe
2024-03-27 13:14:46 +00:00
Yu Watanabe
95d3570b47
sd-ndisc-router: introduce sd_ndisc_router_set_sender_address()
...
Currently this is not used, but will be used later to modify the sender
address.
2024-03-27 13:13:12 +00:00
Yu Watanabe
9f3587ae44
ndisc-option: add HomeAgent option support
...
Currently, these are not used, but will be used later in sd-radv.
2024-03-27 13:12:30 +00:00
Luca Boccassi
5e8adf9f50
Merge pull request #31965 from yuwata/logs-show-cleanups
...
logs-show: several cleanups
2024-03-27 13:09:56 +00:00
Luca Boccassi
c3c5be4836
Merge pull request #31964 from yuwata/journalctl-filter-cleanups
...
journalctl-filter: several cleanups
2024-03-27 13:07:43 +00:00
Daan De Meyer
a22236b471
Merge pull request #31954 from DaanDeMeyer/mkosi
...
mkosi: Re-enable OpenSUSE build
2024-03-27 13:27:44 +01:00
Daan De Meyer
0a6bf709dd
mkosi: Specify --without docs if needed for fedora/centos
2024-03-27 13:00:11 +01:00
Daan De Meyer
afc6ecd9cb
Update pkg/fedora to latest
2024-03-27 12:58:17 +01:00
Daan De Meyer
6327988d65
mkosi: Merge base and system images
...
The only reason to have these split up is to be able to build extension
images that use the base image as a base tree and install extra packages.
Until we have such a use case, let's merge the base and system images to
simplify things a bit.
We keep the mkosi.images/ directory to not cause too many conflicts with
the integration tests PR.
2024-03-27 12:20:50 +01:00