Commit Graph
62924 Commits
Author SHA1 Message Date
Gerd Hoffmann 3d5f0bfe4e kernel-install: handle uki installs automatically
Detect image type using "bootctl kernel-identify $kernel",
store result in KERNEL_INSTALL_IMAGE_TYPE.

Extend layout autodetection to check the kernel image type
and pick layout=uki for UKIs.

Resolves: #25822
2023-03-07 08:14:46 +01:00
Gerd Hoffmann 642617f431 kernel-install: remove math slang from man page 2023-03-07 08:14:46 +01:00
Gerd Hoffmann c7314ee7e2 90-uki-copy.install: create $BOOT/EFI/Linux directory if needed
Do not consider a missing 'Linux' subdirectory an error.
Just create it instead.
2023-03-07 08:14:46 +01:00
Gerd Hoffmann 78088b8f43 bootctl: tweak DOS header magic check
Read the magic first, try reading the full DOS exe header only in case
the magic check succeeds.

This avoids throwing an header read error on small dummy files as used
by test-kernel-install.
2023-03-07 08:14:46 +01:00
Yu Watanabe 9200e520ad Merge pull request #26669 from YHNdnzj/journalctl-lines-since-until
journalctl: fix output when --lines is used with --since or --until
2023-03-07 12:02:47 +09:00
Joshua Goins ebc03f5d7a udev: Don't mark as tablet if device has relative coordinates
Tablets don't typically have relative coordinates (they are separated on
the kernel device layer). However, some Logitech mice report similar
supported events, so use the existence of EV_REL to determiner whether or
not the device is really a tablet.

Fixes bug introduced by 0855ce6772.

Fixes: #26600
2023-03-07 09:42:11 +09:00
Luca Boccassi df40b7ef5a Merge pull request #26686 from yuwata/iovec
tree-wide: replace IOVEC_INIT with IOVEC_MAKE
2023-03-06 21:00:04 +00:00
Josef Miegl 417283c5c3 network: geneve: add InheritInnerProtocol flag 2023-03-06 20:58:30 +00:00
Adrian Vovk 27e695840c base-filesystem: Support Arch-style multilib
On distros like Arch and on carbonOS, libraries end up in /usr/lib.
Thus, /lib64 should point to /usr/lib. This commit adds this
functionality as a final fallback (if neither Debian-style nor
Fedora-style multilib can be detected)
2023-03-06 20:53:43 +00:00
Luca Boccassi db73b9d2ab Merge pull request #26502 from DaanDeMeyer/chase-symlinks-additions
Several chase_symlinks() additions
2023-03-06 20:51:06 +00:00
Luca Boccassi 52bdfbf7d7 Merge pull request #26687 from yuwata/c2x
C2X support
2023-03-06 20:50:17 +00:00
Yu Watanabe 84d0dc53ac time-util: drop redundant call of tzset()
It is also called at the beginning of `parse_timestamp_maybe_with_tz()`.
2023-03-06 20:39:37 +00:00
Adrian Vovk d249c23211 gpt-auto: Check for /boot before putting ESP there
We prefer /efi as a mount point for the ESP, and use /boot as a fallback
if /efi doesn't exist. However, when root=tmpfs, neither /efi nor /boot
exist. gpt-auto should mount to /efi in this case, but it mounted to
/boot instead. This is because gpt-auto didn't check for the existence
of /boot. Here, we correct this
2023-03-06 20:37:57 +00:00
Daan De Meyer 9cc018fa93 mkosi: Update to latest
Latest version builds nspawn from source which hopefully gets rid of
the spurious "Connection timed out" errors we've been seeing in CI.
2023-03-06 19:30:40 +01:00
Lennart Poettering c8170f9c39 TODO 2023-03-06 18:49:09 +01:00
Daan De Meyer 9a98c0f2b1 chase-symlinks: Add chase_symlinks_at_and_open() 2023-03-06 13:53:01 +01:00
Daan De Meyer e864dfa671 chase-symlinks: Add CHASE_MKDIR_0755 2023-03-06 13:42:43 +01:00
Daan De Meyer 28aa650eb7 chase-symlinks: Add CHASE_PARENT
Let's simplify chasing the parent directory of some path by adding
CHASE_PARENT.
2023-03-06 13:42:43 +01:00
Daan De Meyer 7bf4057d79 chase-symlinks: Return "." as path from chase_symlinks_at() instead of NULL 2023-03-06 13:42:40 +01:00
Daan De Meyer 577efd82f2 chase-symlinks: Skip shortcuts if CHASE_PROHIBIT_SYMLINKS is set 2023-03-06 13:41:02 +01:00
Dmitry V. Levin 42a467b552 udev_rules_parse_file: do not skip ENOENT
Starting with commit ed88bcfb7c,
udev_rules_parse_file() silently skips files it fails to open with
ENOENT error, e.g. when they are broken symlinks.  As this behavior is
undocumented and it seems to be unintended, let's treat ENOENT like any
other error.  This change would also simplify the implementation of the
udev rules syntax checker mentioned in #26606.

udev_rules_load(), the only user of udev_rules_parse_file(), is not
affected by this change because it essentially ignores the value
returned by the latter, the only visible difference would be a log
message issued for every udev rules file that couldn't be open because
of ENOENT.

Fixes: ed88bcfb7c ("Be more careful when checking for empty files")
2023-03-06 17:42:12 +09:00
Yu Watanabe 25e12db5e4 Merge pull request #26650 from yuwata/udev-trigger
test: generate debugging logs for udevd after restart
2023-03-06 16:36:34 +09:00
Yu Watanabe a6d46fe64b test: add header build tests for newer C and C++ standards 2023-03-06 10:21:47 +09:00
Cristian RodríguezandYu Watanabe 5545f336fd Include <threads.h> if possible to get thread_local definition
IN C23, thread_local is a reserved keyword and we shall therefore
do nothing to redefine it. glibc has it defined for older standard
version with the right conditions.

v2 by Yu Watanabe:
Move the definition to missing_threads.h like the way we define e.g.
missing syscalls or missing definitions, and include it by the users.

Co-authored-by: Yu Watanabe <watanabe.yu+github@gmail.com>
2023-03-06 10:04:39 +09:00
Yu Watanabe ce16d177dd tree-wide: replace IOVEC_INIT with IOVEC_MAKE
We use gnu11 to build, hence we can use structured initializer with
casting, and it is not necessary to use different patterns on
initialization and assignment.

Addresses https://github.com/systemd/systemd/pull/26560#discussion_r1118875447.
2023-03-06 09:30:28 +09:00
Yu Watanabe a0229fb14d sd-journal: wrap long line
Addresses https://github.com/systemd/systemd/pull/26560#discussion_r1118875967.
2023-03-06 09:16:13 +09:00
Zbigniew Jędrzejewski-Szmek efcde781de meson: adjust for removal of gnu-efi compat
gnu-efi-3.0.11-13.fc39 in Fedora dropped the old include paths.
2023-03-05 19:11:58 +00:00
Yu Watanabe ae9f36397f Revert "hwdb: fix swapped buttons for Logitech Lift left"
This reverts commit 81cfea95e5.

The modalias seems to match a generic Logitech USB receiver even the
connected mouce is not for left hand.

Fixes #26671 and #26676.
2023-03-05 14:21:22 +01:00
Zbigniew Jędrzejewski-Szmek cfba58fe79 Merge pull request #26651 from yuwata/meson-cleanups
Several meson cleanups
2023-03-05 13:38:55 +01:00
Mike Yuan f582695107 journalctl: fix output when --since is used with --lines
Before this commit, if --since is used with --lines=N,
we seek to the place of --since and search afterwards
there, resulting in outputing the first N lines.

After this commit, we only do the above if --since is used without
--reverse and --lines. Otherwise we seek to the tail first and check
if the entry is within the range of --since later.
2023-03-05 19:37:04 +08:00
Daan De Meyer 877e68e702 mkosi: Install dnf on centos and fedora
dnf is not installed by default anymore, but it's still useful to
have in our images, so let's install it explicitly.
2023-03-05 18:05:19 +09:00
Mike Yuan 81fb5375b3 journalctl: fix output when --until is used with --lines
Before this commit, when --lines is specified, we jump to the tail and
search afterwards from there, thus breaking --until if used together.

After this commit:
If both --until and any of --reverse and --lines is specified, things get
a little tricky. We seek to the place of --until first. If only --reverse or
--reverse and --lines is specified, we search backwards and let the output
counter handle --lines for us. If only --lines is used, we just jump backwards
arg_lines and search afterwards from there.
2023-03-05 11:53:03 +08:00
Yu Watanabe 561f17a1e4 Merge pull request #26668 from yuwata/man-link-rename
man: add/update example in systemd.link
2023-03-04 22:14:22 +09:00
Yu Watanabe 181d719542 man: add an example to (re-)apply new settings to a network interface
Closes #26601.
2023-03-04 20:07:56 +09:00
Yu Watanabe 9b7f499ff1 man: sync the default .link file in example 2023-03-04 14:35:01 +09:00
Yu Watanabe f482e22484 Merge pull request #26653 from poettering/tmpfile-linkable-replace
teach link_tmpfile() to optionally replace files
2023-03-04 02:53:59 +09:00
Frantisek Sumsal ac76d1ec69 README: update CentOS CI URLs to the new instance 2023-03-03 18:38:40 +01:00
Frantisek Sumsal c63bfd0884 systemctl: explicitly cast the constants to uint64_t
Otherwise under certain conditions `va_arg()` might get garbage instead
of the expected value, i.e.:

$ sudo build-o0/systemctl disable asdfasfaf
sd_bus_message_appendv: Got uint64_t: 0
Failed to disable unit: Unit file asdfasfaf.service does not exist.

$ sudo build-o1/systemctl disable asdfasfaf
sd_bus_message_appendv: Got uint64_t: 7954875719681572864
Failed to disable unit: Invalid argument

(reproduced on an armv7hl machine)

Resolves: #26568
Follow-up to: bf1bea43f1
Related issue: https://github.com/systemd/systemd/pull/14470#discussion_r362893735
2023-03-03 15:57:34 +00:00
Luca Boccassi 0c70d5e623 Merge pull request #26646 from poettering/nspawn-private
nspawn: ensure all mount propagation is turned off between host and container, except for the "tunnel" dir
2023-03-03 15:57:13 +00:00
Luca Boccassi 4ed17fb88c Merge pull request #26649 from yuwata/parse-timstamp
test: fix and extend test for parse_timestamp()
2023-03-03 15:56:53 +00:00
Yu Watanabe af766bb844 test: trigger new events after all currently queued events are processed
Otherwise, udevd may be busy and udevadm may not receive the reply
for the control packet within the time limit.
2023-03-03 23:25:01 +09:00
Yu Watanabe ff0a9199d4 man: fix doubled word 2023-03-03 23:13:23 +09:00
наб f8b7ff8493 man: fix typo (#26655) 2023-03-03 23:01:51 +09:00
Lennart Poettering acbab8697e hwdb: port to flink_tmpfile()
And modernize heavily while doing so.

Fixes: #21787

(Strictly speaking, this leaves a race window open: the the system is
powered off in the short interval when we linked in the prepared hwdb
file into the dir under a temporary name and are about to rename it to
the final name, then the file might be left over after all. But this
minimizes the window so much that this shouldn't be an issue in
real-life. Key after all is that with this change we'll build up the
hwdb file under O_TMPFILE, and thus are robust to power loss during the
slow operation)
2023-03-03 13:44:12 +01:00
Lennart Poettering 23e208e742 tmpfile-util: teach link_tmpfile() to optionally replace files 2023-03-03 13:44:12 +01:00
Lennart Poettering 16a9ad557d Merge pull request #26355 from poettering/journal-no-rtc
journald: support ordering journal entries by boot ID if no RTC is available
2023-03-03 13:13:13 +01:00
Yu Watanabe 9f819781ca time-util: refuse non-zero gmtoff with non-UTC timezone
Also this moves the range check for gmtoff to parse_timestamp_impl(), to
address the post-merge comment:
https://github.com/systemd/systemd/pull/26409#discussion_r1118650190
2023-03-03 20:39:19 +09:00
Yu Watanabe 87e0fd575e time-util: extend comment a bit 2023-03-03 20:39:19 +09:00
Yu Watanabe 8beb47c824 time-util: rename len -> tz_offset
And merge parse_timestamp_with_tz() with parse_timestamp_impl().
Addresses the post-merge comment:
https://github.com/systemd/systemd/pull/26409#discussion_r1118647440
2023-03-03 20:39:19 +09:00
Yu Watanabe ca9c9d8d8e time-util: fix typo
Follow-up for 7a9afae604.
2023-03-03 20:39:19 +09:00