Commit Graph
63222 Commits
Author SHA1 Message Date
Yu Watanabe fb0e5f12c6 exec-util: drop meaningless casts 2023-03-17 20:38:15 +09:00
Yu Watanabe 8e8df8292a exec-util: tighten variable scope a bit 2023-03-17 20:38:15 +09:00
Daan De Meyer 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
Daan De Meyer 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
Yu Watanabe 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
Yu Watanabe 77c6bb895a Merge pull request #26803 from yuwata/udevadm-verify-summary
udevadm-verify: print a short summary
2023-03-17 12:14:04 +09:00
Daan De Meyer 58caedadbb mkosi: Enable some debugging options by default 2023-03-17 12:13:26 +09:00
Addison Snelling 0c868e3fad man: fix misspelled executable name (#26858) 2023-03-17 11:36:32 +09:00
Daan De Meyer 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
Frantisek Sumsal e912bef85d test: wrap mkfs.*/mksquashfs/mkswap binaries when running w/ ASan 2023-03-16 12:56:40 +00:00
Daan De Meyer 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
Daan De Meyer 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
Luca Boccassi 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
Yu Watanabe 7b4cae904b test: add tests for summary output of udevadm verify 2023-03-16 14:54:46 +09:00
Yu Watanabe f99deb1e94 test: reindent testsuite-17.11.sh 2023-03-16 14:54:46 +09:00
Yu Watanabe 7ec4e184ba udevadm-verify: add a short summary 2023-03-16 14:54:46 +09:00
Yu Watanabe 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
Luca Boccassi 77c26cd62a Merge pull request #26835 from poettering/userdb-modernizations
various userdbd modernizations
2023-03-16 00:25:01 +00:00
OMOJOLA JOSHUA 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
Yu Watanabe b2b5a95227 github: update default and example in template 2023-03-15 20:31:34 +01:00
Yu Watanabe cb6ff2a42c Merge pull request #26771 from YHNdnzj/machinectl-edit
machinectl: add verb edit and cat to operate on .nspawn files
2023-03-16 04:02:11 +09:00
Ludwig Nussel 361cacf49e manager: fix scope for environment generators
fixes regression introduced by 4870133bfa
2023-03-16 03:59:49 +09:00
Dmitry V. Levin f5b28e6bd8 test: fix testsuite-17.10.sh
Make sure /etc/udev/hwdb.d/ exists before creating a file inside it.

Fixes: 95cf8cae77 ("test: add coverage test for udevadm")
2023-03-16 03:59:01 +09:00
Yu Watanabe 0e5b4d767a Merge pull request #26831 from YHNdnzj/edit-util-followup
edit-util: follow-ups
2023-03-16 03:51:55 +09:00
Dmitry V. Levin 3ec58d0cd8 udev-rules: check for conflicting and duplicate expressions
Log an error when a rule line contains conflicting match expressions, e.g.
  NAME=="value", NAME!="value"

Log a warning when a rule line contains duplicate expressions, e.g.
  NAME=="value", NAME=="value"
2023-03-16 03:49:57 +09:00
Cornelius Hoffmann 2ff7856e1e Update github issue template to include systemd-dissect 2023-03-15 16:52:32 +01:00
Lennart Poettering b260be2ca7 userdbd: make static const what we can make so 2023-03-15 16:10:21 +01:00
Lennart Poettering 66a3869e7e userdbd: rework to use sd_event_add_child() instead of manual SIGCHLD
Let's modernize userdbd furzer, and use the common child handling we
nowadays have in sd-event, instead of rolling our own.

This also means we'll start using pidfds where we can.
2023-03-15 15:57:25 +01:00
Lennart Poettering 755424e94f userdbd: make use of FORK_CLOSE_ALL_FDS + FORK_REOPEN_LOG where we can 2023-03-15 15:57:25 +01:00
Lennart Poettering 54f5522664 userdbd: modernize signal handling
Let's make use of SD_EVENT_SIGNAL_PROCMASK so that we don't have to mask
the signals manually. Let's use sd_event_set_exit_signal() instead of
rolling our own SIGTERM/SIGINT handling. Let's use "floating" event
sources instead of keeping references on our own.

Let's also debug log if we can't enable watchdog handling.
2023-03-15 15:57:03 +01:00
Daan De Meyer f5abe8f957 Merge pull request #26784 from DaanDeMeyer/chase-fix
Allow creating files and directories with chase_symlinks_open() and further improvements
2023-03-15 15:51:47 +01:00
Daan De Meyer 39eb3ffaaa fs-util: Drop unlink_noerrno() 2023-03-15 13:27:20 +01:00
Mike Yuan af0292844d test: add testsuite-74.machinectl 2023-03-15 19:56:19 +08:00
Mike Yuan 1ed35a0d93 machinectl: add verb edit and cat to operate on .nspawn files
This allows operating on .nspawn files using machinectl.

Closes #26246
2023-03-15 19:56:19 +08:00
Mike Yuan d3bf024f1a edit-util: log unexpected errors if we fail to remove the parent dir 2023-03-15 19:50:26 +08:00
Daan De Meyer a45332500d Merge pull request #26820 from DaanDeMeyer/dir-fd-is-root
fd-util: Add dir_fd_is_root()
2023-03-15 12:48:14 +01:00
Mike Yuan 00b6baf2be edit-util: use path_equal 2023-03-15 19:45:33 +08:00
Daan De Meyer ea8282b6fc chase-symlinks: Add more assertions
Let's turn some runtime errors into assertions and add a few new
assertions.
2023-03-15 12:38:14 +01:00
Daan De Meyer 47f0e1b5e0 chase-symlinks: Rework open() functions and some chase flags
Currently, when CHASE_PARENT is specified, we chase the parent directory
of the symlink itself. Let's change this and chase the parent directory
of the symlink target so that trying to open the actual file later with
O_NOFOLLOW doesn't fail with ELOOP.

To get the current behavior, callers can add CHASE_NOFOLLOW to chase
the parent directory of the symlink itself.

Currently, when CHASE_MKDIR_0755 is specified, we create all components
of the path as directories. Instead, let's change the flag to only create
parent directories and leave the final component of the PATH untouched.
Also, allow CHASE_NONEXISTENT with CHASE_MKDIR_0755 now that it doesn't
create all components anymore.

Finally, rework chase_symlinks_and_open() and chase_symlinkat_at_and_open()
to always chase the parent directory and use xopenat() to open the final
component of the path. This allows us to pass O_CREAT to create the file or
directory (O_DIRECTORY) if it is missing. If CHASE_PARENT is configured, we
just reopen the parent directory that we chased.
2023-03-15 12:38:11 +01:00
bri d6c623e884 Add rebrands of Medion Akoya notebooks/tablets 2023-03-15 10:59:06 +00:00
Luca Boccassi 1be50af42e Merge pull request #26804 from fbuihuu/fixes-for-test-58-repart
Fixes for test 58 repart
2023-03-15 10:56:07 +00:00
Daan De Meyer af423b4ba9 fd-util: Add dir_fd_is_root() 2023-03-15 11:51:08 +01:00
Daan De Meyer 9bf8441503 mountpoint-util: Add path_get_mnt_id_at() 2023-03-15 11:51:06 +01:00
Luca Boccassi 62562ef5b4 Merge pull request #26825 from keszybz/log-message-fix
Log message fix
2023-03-15 10:49:35 +00:00
Zbigniew Jędrzejewski-Szmek add74820b7 core: fix "(null)" in output
We want an empty string, not NULL. I made some brainfart here.
Fixup for 1980a25dc0.
2023-03-15 09:33:17 +01:00
Zbigniew Jędrzejewski-Szmek 24aaf6c66c core: reduce scope of variable 2023-03-15 09:33:17 +01:00
Lennart Poettering 32e7970304 Merge pull request #26800 from t-8ch/memfd_create
memfd: add support for exec flags
2023-03-15 09:28:09 +01:00
Lennart Poettering 264c267686 Merge pull request #26794 from bluca/log_extra_fields
core: append LogExtraFields= values to log_unit* messages
2023-03-15 09:27:47 +01:00
Luca Boccassi d4b6ec980d core: make the memory pressure cgroup path writable when ProtectControlGroups=yes
The interface requires services to write to the cgroup file to activate notifications,
but with ProtectControlGroups=yes we make it read-only. Add a writable bind mount.

Follow-up for 6bb0084204
2023-03-15 09:23:17 +01:00
Franck Bui 693c3e1a59 test: assume run-unit-tests.py and unit tests are installed in the same directory
This avoids hard coding the path of the directory where the unit tests are
installed.
2023-03-15 09:19:33 +01:00