1
0
mirror of https://github.com/systemd/systemd.git synced 2025-08-02 04:22:27 +03:00
Commit Graph

63505 Commits

Author SHA1 Message Date
8102ff2e3d bootctl: introduce uki_read_pretty_name()
No functional change, just prepration for later commits.
2023-03-17 20:40:34 +09:00
748b15c277 bootctl: find matching section in read_pe_section()
No functional change, just refactoring.
2023-03-17 20:40:34 +09:00
03221e746d bootctl: return 0 instead of EXIT_SUCCESS 2023-03-17 20:40:34 +09:00
ab94d98b29 bootctl: move verb_kernel_identity()
No functional change, just for making beautify later diffs.
2023-03-17 20:40:34 +09:00
58f5f60f1a os-util: add missing headers
For 'bool' and 'usec_t'.
2023-03-17 20:40:34 +09:00
6ad9af0b13 exec-util: introduce EXEC_DIR_SKIP_REMAINING flag
Will be used in later commits.
2023-03-17 20:38:15 +09:00
f691157b87 exec-util: extract the core logic of execute_directories() as execute_strv()
Then, we can use it with a custom enumerator of executables.

No functional change, preparation for later commits.
2023-03-17 20:38:15 +09:00
753e38d984 exec-util: enumerate executables earlier
Then, return earlier if no executable found.
2023-03-17 20:38:15 +09:00
fb0e5f12c6 exec-util: drop meaningless casts 2023-03-17 20:38:15 +09:00
8e8df8292a exec-util: tighten variable scope a bit 2023-03-17 20:38:15 +09:00
dfb487ef74 Merge pull request #26849 from DaanDeMeyer/fwd-colors
journald-console: Add colors when forwarding to console
2023-03-17 12:02:35 +01:00
c6b9baaa5b systemctl: drop stray empty line 2023-03-17 10:47:44 +01:00
bb7c4a93ea systemctl: always print circular deps. at the end
Before:
a.target
○ └─b.target
    ├─...
●   └─paths.target

After:
a.target
○ └─b.target
●   ├─paths.target
    └─...
2023-03-17 10:47:04 +01:00
1e7ff4ba88 boot: Add undefined sanitizer support
Sadly, no stack traces, but this is better than nothing.
2023-03-17 10:39:39 +01:00
0b482b37f9 meson: Share more C flags 2023-03-17 10:39:32 +01:00
f64f82aa8d boot: Add support for -ftrapv 2023-03-17 10:35:29 +01:00
48e1b2c250 boot: Add support for -fstack-protector 2023-03-17 10:35:29 +01:00
a05f03225e boot: Detect nested assertions 2023-03-17 10:35:29 +01:00
5a4711e489 systemctl: fix formatting of circular dep.
Before:
a.target
○ └─b.target
    └─...
●   └─paths.target

After:
a.target
○ └─b.target
    ├─...
●   └─paths.target
2023-03-17 10:09:07 +01:00
a9f2f486f3 systemctl: fix indentation of circular deps
We're still at level `level` here.

Before:
b.target
○ ├─a.target
  │   └─...
● └─paths.target

After:
b.target
○ ├─a.target
  │ └─...
● └─paths.target

Fixes #26052.
2023-03-17 10:05:47 +01:00
6742397921 Merge pull request #26783 from yuwata/loop-ref-follow-up
udev: slightly extend comment and add more tests
2023-03-17 10:00:43 +01:00
58dfcc57f2 test: add a testcase that dir_fd_is_root() is not confused by bind mount
See the comment in dir_fd_is_root() and
https://github.com/systemd/systemd/pull/26820#issuecomment-1469554966.
2023-03-17 09:49:21 +01:00
77c6bb895a Merge pull request #26803 from yuwata/udevadm-verify-summary
udevadm-verify: print a short summary
2023-03-17 12:14:04 +09:00
58caedadbb mkosi: Enable some debugging options by default 2023-03-17 12:13:26 +09:00
0c868e3fad man: fix misspelled executable name (#26858) 2023-03-17 11:36:32 +09:00
e21be7976a repart: Report better errors if partition sizes are too small 2023-03-16 23:15:19 +01:00
d28c6ce62c repart: Zero full verity signature partition size
systemd-dissect requires the entirety of the partition following the
signature to be zeroed, so let's do just that.
2023-03-16 22:11:31 +01:00
6eccec00fb repart: Make sure we seek to beginning of partition target before copy 2023-03-16 22:10:50 +01:00
9f94d2741f mkosi: Use default timeout of 10s
Let's override the default timeout to something more reasonable for
mkosi builds.
2023-03-16 18:19:37 +01:00
fe0637079f udev/ata_id: use unliagned helpers
The array is a union, aligned as uint16_t, so we were accessing fields at
offsets of two, so we didn't do actually do unaligned access. But let's make
this explicit.
2023-03-16 17:35:17 +01:00
42fff80cb8 udev/v4l_id: use O_CLOEXEC|O_NOCTTY
This is the usual set of flags. O_CLOEXEC doesn't matter because we don't spawn
anything, but O_NOCTTY could possibly make a difference if the helper is called
on a wrong device type.
2023-03-16 16:46:44 +01:00
8a4c11e0e2 meson: add udev builtins to dist-check
They now pass, and we might as well test them to avoid unexpected
regressions.
2023-03-16 16:46:44 +01:00
5356761da6 udev: implement --version in all builtins
Those are separate binaries, and occasionally people will get a misplaced
binary that doesn't match the rest of the installed system and be confused, so
it good to be able to check the version. It is also nice to have the same
interface in all binaries.

Note that we usually use a separate 'enum ARG_VERSION = 0x100' for an option
without a short name. We can use a less verbose approach of simply taking any
unused letter, which works just as well and even the compiler would warn us
if we tried to use the letter in another place. This way we avoid a few lines
of boilerplate.

The help texts are adjusted to have an empty line between the synopsis and
option list, and no empty lines after the option list.
2023-03-16 16:46:44 +01:00
bd36d0281a udev/cdrom_id: do not abort on unknown options
Copy-pasta is good, but you have to pick a reliable source.
2023-03-16 16:46:44 +01:00
32c2d046c6 udev/mtd_probe: convert to run() 2023-03-16 16:46:44 +01:00
8b89b9d7c3 udev/mtd_probe: implement --help 2023-03-16 16:46:44 +01:00
4b0f967484 udev/fido_id: implement --help 2023-03-16 16:46:44 +01:00
66026fca95 udev/ata_id: stop using errno, fix logic
The code was setting errno, which we don't do, and which is hard to get right…
Rework the code to use the usual negative-errno convention and add some
debug logging.

disk_scsi_inquiry_command() was working partially by accident: the v3 fallback
would enter the v4 check path, and pass it because the v4 data would still be
initialized to 0.
2023-03-16 16:46:43 +01:00
4dfe41e234 udev/ata_id: drop unused output parameter 2023-03-16 16:45:11 +01:00
e912bef85d test: wrap mkfs.*/mksquashfs/mkswap binaries when running w/ ASan 2023-03-16 12:56:40 +00:00
a4180c0fb3 journald-console: Add colors when forwarding to console
Let's color output when we're forwarding to the console. To make this
work, we inherit TERM from pid 1 and use it to decide whether we should
output colors or not.
2023-03-16 11:22:58 +01:00
197dd3a9a4 terminal-util: Don't assume terminal is dumb if connected to /dev/null
If we're connected to /dev/null, we're likely going to be writing
colors to something that's not stdout/stderr, so let's fall back to
checking TERM if that's the case.
2023-03-16 11:21:28 +01:00
e0b8bbbdbe doc: update ELF_PACKAGE_METADATA to use linker flag instead of manual script
bfd/gold/mold/lld support this flag, so document it explicitly, and drop the
manually written linker script which is no longer necessary
2023-03-16 08:38:39 +01:00
7b4cae904b test: add tests for summary output of udevadm verify 2023-03-16 14:54:46 +09:00
f99deb1e94 test: reindent testsuite-17.11.sh 2023-03-16 14:54:46 +09:00
7ec4e184ba udevadm-verify: add a short summary 2023-03-16 14:54:46 +09:00
3b1b0f1aeb sd-journal: fix segfault
Unfortunately, journal_file_next_entry() returns 0 when the next entry
not found. The commit cc938e4a0a adds
FIXME comment about that. We should really fix that, but the function and
its return value are used in many place, hence checking all usecases is not
easy. So, let's workaround that here, and handle the 0 return value by
the caller.

Follow-up for 34af74946e.

Fixes #26822.
2023-03-16 00:26:22 +00:00
77c26cd62a Merge pull request #26835 from poettering/userdb-modernizations
various userdbd modernizations
2023-03-16 00:25:01 +00:00
71243af72f updated usage of SD_BUS_METHOD_WITH_NAMES macros to SD_BUS_METHOD_WIT… (#26840)
* localed: update usage of SD_BUS_METHOD_WITH_NAMES macros to SD_BUS_METHOD_WITH_ARGS
2023-03-15 22:52:24 +00:00
b2b5a95227 github: update default and example in template 2023-03-15 20:31:34 +01:00