1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-11 09:18:07 +03:00
Commit Graph

66613 Commits

Author SHA1 Message Date
Frantisek Sumsal
2d49429e58 tools: pylint meson-render-jinja2.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal
d853b9be98 tools: pylint analyze-dump-sort.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal
fecdbd7227 tools: pylint dump-auxv.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal
de9eca7e86 tools: pylint gdb-sd_dump_hashmaps.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal
8708cd47b2 tools: pylint list-discoverable-partitions.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal
54a9070ce5 tools: pylint xml_helper.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal
234909f9d6 tools: pylint update-man-rules.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal
019e726958 tools: pylint update-dbus-docs.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal
c6041b8bf8 tools: pylint make-man-index.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal
947727681b tools: pylint make-directive-index.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal
564602400f tools: pylint make-autosuspend-rules.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal
782051f3cb tools: pylint generate-gperfs.py 2023-08-10 18:13:29 +02:00
Frantisek Sumsal
8b1932cf2d tools: pylint dbus_exporter.py 2023-08-10 11:08:17 +02:00
Frantisek Sumsal
f56accb6ef tools: pylint check-includes.py 2023-08-10 11:08:17 +02:00
Frantisek Sumsal
b4048aaa1e tools: pylint catalog-report.py 2023-08-10 11:08:17 +02:00
Frantisek Sumsal
e7ecc24eda tools: pylint analyze-dump-sort.py 2023-08-10 11:08:17 +02:00
Yu Watanabe
ca15b59f1f Revert "Revert "tmpfiles.d: adjust /dev/vfio/vfio access mode""
This reverts commit 33b91308c2.

The commit b42482af90 dropped
'--exclude-prefix=/dev' from systemd-tmpfiles-setup.service. So, the
possibly later invocation of the service changes the permission set by
udevd.

As commmented in the head of this file, settings should be consistent
with udev rules. Only missing entry here is vfio. Let's re-add the
entry for the device.

Addresses https://github.com/systemd/systemd/pull/28681#issuecomment-1666949888.
2023-08-09 11:27:39 +09:00
Yu Watanabe
685e0dd192 veritysetup-generator: fix ordering of generated units
Fixes a bug introduced by 08b04ec7e7 and
953006dcb0.

Fixes #28725.
2023-08-09 11:26:09 +09:00
Yu Watanabe
20e7b94b72
Merge pull request #28731 from yuwata/sd-dhcp-server-cleanups
sd-dhcp-server: cleanups
2023-08-09 11:25:44 +09:00
Luca Boccassi
bcb299e461
Merge pull request #28727 from yuwata/proc-cmdline-cleanups
tree-wide: fixlet and optimization for parsing kernel command line
2023-08-09 01:18:13 +01:00
Yu Watanabe
9289e093ae meson: use install_emptydir() and drop meson-make-symlink.sh
The script is mostly equivalent to 'mkdir -p' and 'ln -sfr'.
Let's replace it with install_emptydir() builtin function and
inline meson call.
2023-08-08 22:11:34 +01:00
Yu Watanabe
809da721f0 sd-dhcp-server: propagate error on parsing DHCP packet
Otherwise, we silently ignore the received packet and that makes hard to
debug issue.
2023-08-09 05:33:24 +09:00
Yu Watanabe
7b1fac1e52 dhcp: rename function argument 2023-08-09 05:26:18 +09:00
mordner
653c90ec0e man: fix typo in journalctl 2023-08-08 22:05:10 +02:00
Fabian Vogt
327cd2d3db units/initrd-parse-etc.service: Conflict with emergency.target
If emergency.target is started while initrd-parse-etc.service/start is queued,
the initrd-parse-etc job did not get canceled. In parallel to the emergency
units, it eventually runs the service, which starts initrd-cleanup.service,
which in turn isolates initrd-switch-root.target. This stops the emergency
units and effectively starts the initrd boot process again, which likely
fails again like the initial attempt. The system is thus stuck in an endless
loop, never really reaching emergency.target.

With this conflict added, starting emergency.target automatically cancels
initrd-parse-etc.service/start, avoiding the loop.
2023-08-08 20:24:39 +01:00
Dan Streetman
60696b22d9 openssl: add log_openssl_errors()
Add a macro to log all errors in the openssl 'thread error queue'.

This consolidates all the openssl-generated errors to return -EIO and log at
debug level.

Also add a 'invalid' test in test-openssl, to allow manual verification that
the openssl error(s) are logged.
2023-08-08 19:40:37 +01:00
Jan Kuparinen
6eb151e989 po: Translated using Weblate (Finnish)
Currently translated at 86.3% (196 of 227 strings)

Co-authored-by: Jan Kuparinen <copper_fin@hotmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/fi/
Translation: systemd/main
2023-08-09 03:22:54 +09:00
Yu Watanabe
a8d3315ba4 tree-wise: drop unnecessary use of proc_cmdline_key_streq()
If the key does not contain '-' or '_', then it is not necessary to use
proc_cmdline_key_streq(), and streq() is sufficient.

This also adds missing assertions about 'key' argument.
2023-08-09 03:16:31 +09:00
Yu Watanabe
91acee9906 resolve: ignore nameserver= and domain= kernel command line options without value
Otherwise, manager_parse_dns_server_string_and_warn() or
manager_parse_search_domains_and_warn() will trigger assertion.
2023-08-09 03:16:03 +09:00
Lennart Poettering
5a96b32dea libfido2: pick up debug logging from libfido2, and funnel it through our log subsystem
Fixes: #27984
2023-08-08 15:41:43 +02:00
Luca Boccassi
5c240bdd50
Merge pull request #28710 from rpigott/zsh-non-template-cache
zsh completion speedups
2023-08-08 12:06:40 +01:00
Yu Watanabe
074d90926f udev: set ID_NAME and ID_SERIAL to MMC/memstick devices again
Fixes a bug introduced by 998db5871f.

Fixes #28671.
2023-08-08 12:05:30 +01:00
Ronan Pigott
2cbda74862 zsh: reintroduce pattern argument to uncached verbs
The systemctl completion previously made use of PREFIX as a pattern
argument to list-unit-files and list-units. This had the problem of
erroneously filtering the results that were stored in the cache, and
erroneously filtering results that might have been requested according
to the users configuration (e.g. _correct completer, certain
matcher-lists or tag-orders, etc.).

Unfortunately, the runtime of list-unit-files increases when no pattern
argument is provided, and systemctl show, used to filter those units,
can become unacceptably slow when provided with too many units to
describe.

Let's re-introduce the pattern argument to list-unit-files and
list-units where necessary in order to alleviate these bottlenecks
without poisining the cache. A 'use-pattern' style is introduced that
may be used to disable this behavior if it is undesired. We can still
expect that certain completions, like `systemctl start <TAB>` will be
slow, like before. To fix this we will need systemd to learn a more
efficient way of filtering the units than parsing systemctl show.
2023-08-08 01:57:45 -07:00
Yu Watanabe
beddf8ba29 busctl: fix showing array of dictionary in JSON format
This partially reverts the commit 684bce3d54
and fixes the issue introduced by it.

Fixes #28711.
2023-08-08 09:33:16 +01:00
Ronan Pigott
c8e2cd79c1 zsh: use sys_really_all_units for non-template names
The systemctl invocations used for these completions match the ones used
for the _sys_really_all_units parameter, so we should really just use
the cached parameter rather than recomputing the result.
2023-08-07 18:00:04 -07:00
Lennart Poettering
ab9617a766 shutdown: handle gracefully if MD_LEVEL udev propery is not set
See: #28490
2023-08-07 20:59:44 +01:00
Lennart Poettering
3c8680585c varlink: don't allocate fd control buffer on each read()
We'll need this on each read() again, hence let's just allocate this
once and then reuse it for subsequent read()s.

Follow-up for: #28639
2023-08-07 20:57:45 +01:00
Daan De Meyer
b57e752220 mkosi: Unmount /etc/resolv.conf if it's a mountpoint 2023-08-07 20:56:55 +01:00
Jan Macku
97eb826821 ci(lint): exclude .in files from ShellCheck lint
Exclude all `.in` files because they may contain unsupported syntax, and
they have to be preprocessed first. For example:

```sh
Error: SHELLCHECK_WARNING:
./src/rpm/systemd-update-helper.in:130:37: warning[SC1083]: This { is literal. Check expression (missing ;/\n?) or quote it.
```

Related to: https://github.com/systemd/systemd/pull/28521
2023-08-07 19:28:23 +02:00
Zbigniew Jędrzejewski-Szmek
69674726e3
Merge pull request #28521 from keszybz/rpm-reload
rpm: add %systemd_postun_with_reload and %systemd_user_postun_with_reload
2023-08-07 19:27:13 +02:00
Vincent Haupert
81e0478110 repart: derive verity salt and uuid from seed 2023-08-07 16:03:44 +01:00
Daan De Meyer
2208d49263 repart: Extend check for read-only verity partitions
Let's check for verity signature partitions as well. Let's also
check the configured verity mode, which is another way to indicate
verity partitions aside from the type UUID.
2023-08-07 16:54:40 +02:00
Lennart Poettering
c578345334 update TODO 2023-08-07 16:51:49 +02:00
Emil Renner Berthing
2bca841137 90-loaderentry: support installing device trees
Like the cmdline file we look for a devicetree file in
$KERNEL_INSTALL_CONF_ROOT, /etc/kernel and /usr/lib/kernel. If it is
present we look for the specified device tree that comes with the kernel
we're adding and install it into $ENTRY_DIR_ABS and add a devicetree
stanza to the loader entry.

Unfortunately it seems there is no common consensus on where to install
device tree blobs, so we have to look in a few different places for it.
2023-08-07 14:54:23 +02:00
Zbigniew Jędrzejewski-Szmek
9ff28e312b rpm: add %systemd_user_daemon_reexec
This macros wraps the call to daemon-reexec in all user managers. It would be
called for example from systemd %post right after the call to systemctl
daemon-reexec.

This will be used in the Fedora systemd package to fix a long-standing FIXME.

Tested via building and reinstalling the systemd package with the patches.
2023-08-07 12:15:54 +02:00
Zbigniew Jędrzejewski-Szmek
c6699598e2 rpm: use rpm.execute() in more cases
7bde8293a4 converted all the posix.execp()
calls, but I do not see why we shouldn't also convert the posix.exec()
calls.
2023-08-07 12:15:52 +02:00
Zbigniew Jędrzejewski-Szmek
631d2b05ec rpm: add %systemd_postun_with_reload and %systemd_user_postun_with_reload
For some units, the package would like to issue a reload. The machinery was
already in place since c9615f7352:

  systemctl reload-or-restart --marked

  Enqueues restart jobs for all units that have the 'needs-restart'
  mark, and reload jobs for units that have the 'needs-reload' mark.
  When a unit marked for reload does not support reload, restart will
  be queued.

The new macros allow a reload to be issued instead of a restart.

Based on the discussion on fedora-devel:
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/IJSUGIEJNYZZRE53FF4YFUEBRHRAVIXR/

Tested using dummy package https://github.com/keszybz/rpm-test-reload.
2023-08-07 12:12:55 +02:00
Zbigniew Jędrzejewski-Szmek
8ea8e23f40 manager: fix reloading in reload-or-restart --marked
bus_unit_queue_job_one has two callers:
- bus_unit_queue_job which would do the appropriate transormations
  to turn JOB_TRY_RESTART into JOB_TRY_RELOAD,
- and method_enqueue_marked_jobs which did not.
In effect, method_enqueue_marked_jobs() would queue restart jobs for
units which has Markers= needs-reload or needs-restart.

When the chunk of code which does the transformations is moved from
bus_unit_queue_job to bus_unit_queue_job_one, there is no change for
bus_unit_queue_job, and method_enqueue_marked_jobs is fixed.

The additional checks that are done seem reasonable to do from
method_enqueue_marked_jobs: we shouldn't be restarting units which are
configured to not allow that, or force unwanted start of dbus-broker.
2023-08-07 12:12:55 +02:00
Marc Pervaz Boocha
f3d1d7609d Teach 60-ukify.install to search the staging dir
60-ukify.install would only work with initrd provided by command line
arguements. Fixed to look for both microcode and initrd is found in
$KERNEL_INSTALL_STAGING_AREA which is placed by initrd generator like
mkinitcpio
2023-08-07 12:11:05 +02:00
Lennart Poettering
27edb18db0
Merge pull request #28627 from yuwata/udev-default-children-max
udev: allow to set 0 for the maximum number of worker process
2023-08-07 11:36:20 +02:00