1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-24 21:34:08 +03:00
Commit Graph

57960 Commits

Author SHA1 Message Date
Luca Boccassi
a2cf73f0b6 dissect: ID from os-release should be non-empty, not just non-NULL 2022-05-20 12:05:34 +01:00
Jan Janssen
6c405f20a3 macro: Use C11 static_assert
Now that we require C11 everywhere, we can always use static_assert.
2022-05-20 12:49:50 +02:00
Jan Janssen
b1672234e0 boot: Build with C11 too 2022-05-20 12:47:43 +02:00
Zbigniew Jędrzejewski-Szmek
eb45cf97a9 kernel-install: fix detection of entry-token if $BOOT_ROOT is configured
If $BOOT_ROOT is specified, but entry-token not, we'd skip the detection
altogether, effectively defaulting to entry-token=machine-id.
The case where $BOOT_ROOT was not specied, but entry-token was configured
was handled correctly.
This patch makes the handling of both symmetrical, i.e. will only set what
wasn't configured.
2022-05-20 09:44:22 +02:00
Zbigniew Jędrzejewski-Szmek
4db4c28dc6 kernel-install: debug the configuration detection if --verbose
No changes to behaviour, but let's print everything out as we discover it.

The docs say that BOOT_ROOT can be specified by the environment. I have
it locally in /etc/kernel/install.conf, and then the override doesn't work.
It'd be nice to handle such cases more reliably.
2022-05-20 09:44:22 +02:00
Khem Raj
29b7114c5d Add sys/stat.h for S_IFDIR
Fixes
../git/src/shared/mkdir-label.c:13:61: error: use of undeclared identifier 'S_IFDIR'
        r = mac_selinux_create_file_prepare_at(dirfd, path, S_IFDIR);

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-05-20 14:54:02 +09:00
Daan De Meyer
dcb4e45ad8 sd-bus: Fix introspect memory leak
We have to free the contents of the set on top of the set itself.

Fixes #23443.
2022-05-20 14:53:28 +09:00
Zbigniew Jędrzejewski-Szmek
b21ba8ac6b kernel-install: bail if machine id generation fails
The call is unlikely to fail, but systemd-id128 might not be installed.
We shouldn't continue with the empty string.
2022-05-19 15:38:25 +02:00
Zbigniew Jędrzejewski-Szmek
94cbddf439 kernel-install: actually export KERNEL_INSTALL_VERBOSE
:(
2022-05-19 15:38:25 +02:00
Zbigniew Jędrzejewski-Szmek
1ab191b3a9
Merge pull request #23432 from bnf/docs-relative-links
docs: use relative links
2022-05-19 08:54:49 +02:00
Daan De Meyer
1751d8c80c portable: Remove unnecessary assert()
Fixes #23433

matches is plumbed through until it finally gets used in unit_match()
which can deal with NULL matches so the assert() is unnecessary and
can be removed.

The two call sites of extract_image_and_extensions() also don't
assert() on matches either.
2022-05-19 15:39:25 +09:00
Luca Boccassi
7269d39a91 test: double timeout of TEST-50-DISSECT
It times out on slow CIs near the end of the test, eg:

[  553.539368] kernel: loop_reread_partitions: partition scan of loop3 () failed (rc=-5)
TEST-50-DISSECT: (timeout)

https://autopkgtest.ubuntu.com/results/autopkgtest-focal-upstream-systemd-ci-systemd-ci/focal/ppc64el/s/systemd-upstream/20220518_172659_bf20f@/log.gz
2022-05-19 15:36:06 +09:00
Yu Watanabe
f9aabf2c2c meson: install 70-power-switch.rules
Fixes a bug introduced by 155078c835.

Fixes #23425.
2022-05-19 05:04:58 +09:00
Tomasz Pala
d1df0466d9 udev: fixed config_parse_ifalias() logic not to skip setting IFLA_IFALIAS
this flaw was introduced in 6a74900002
2022-05-19 05:04:26 +09:00
Benjamin Franzke
63812e15c6 docs: streamline headline structure in JOURNAL_EXPORT_FORMATS.md
Add one general first-level headline and transform
the existing ones into second-level headlines.
2022-05-18 20:34:10 +02:00
Benjamin Franzke
5c90c67a34 docs: use relative links
Allows for links to work both on systemd.io (or forks) and
when viewed on https://github.com/systemd/systemd/tree/main/docs

Note that the markdown links are converted by jekyll-relative-links[1]
to html. This plugin is enabled by default on github pages[2][3].

Due to a bug in jekyll-relative-links – see
https://github.com/benbalter/jekyll-relative-links/issues/61 –
we need to avoid line-wrapped links when using relative markdown links.

[1] https://github.com/benbalter/jekyll-relative-links
[2] https://github.blog/2016-12-05-relative-links-for-github-pages/
[3] https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/about-github-pages-and-jekyll#plugins
2022-05-18 20:34:10 +02:00
Zbigniew Jędrzejewski-Szmek
e4885958dc
Merge pull request #23417 from bnf/docs-dark-mode
docs: add dark mode
2022-05-18 13:09:50 +02:00
Yu Watanabe
69ce09afc2 doc: fix typo 2022-05-18 17:57:05 +09:00
Yu Watanabe
99b5421c48
Merge pull request #23422 from keszybz/two-doc-tweaks
Two doc tweaks
2022-05-18 17:36:33 +09:00
Zbigniew Jędrzejewski-Szmek
b16e93d73e README: fix typo 2022-05-18 08:29:17 +02:00
Zbigniew Jędrzejewski-Szmek
50db8d97b9 NEWS: reword description of credstore
The "in" at the end made the sentence hard to parse…
2022-05-18 08:29:17 +02:00
Benjamin Franzke
2eca6d602f docs: overhaul styling for example log messages on startpage
* Use brand-green for demo log messages on the startpage
   instead of the default `green` color defined by the browser vendor
   (after all, the brand green color is intended to reflect the
   boot status output)
 * Add a matching blue intro color (mixed using HSL from brand-green
   by 55deg hue rotation and 4% lightness)
 * Use a defined font-size
   (to avoid blurry rendering at 13.33333px, due to font-size: smaller)
 * Add possibility for the browser to show horizontal scrollbar
   (avoid overflow in mobile view)
2022-05-17 23:00:18 +02:00
Benjamin Franzke
9b266e4349 docs: add dark mode
Respect the user agent property  `prefers-color-scheme` by
rendering the documentation in dark mode, if requested.

Reorganise CSS to store the color palette into CSS variables
and reference these from another set of CSS variables that
are dynamically switched based on the prefers-color-scheme
media query.

Light mode variables stay they same as before,
but to ease color mixing, the current RGB values
have been transformed to HSL (using chrome devtools).
The current body background is now --sd-gray-extralight,
the current body color is now --sd-gray-extradark.
Other gray-variations, needed for dark-mode constrasts
are derived from these colors using HSL lightness shifting.

The systemd brand black color is used as dark mode background
and a matching extralight gray font color has been selected.

The link font-weight is reduced to 400 in dark mode,
as the green color on dark ground becomes to overwhelming
with a bold font.

The systemd logo color is dynamically swapped by using
the special fill value `currentColor` for dark/light-mode
depending parts – as per specification on brand.systemd.io
2022-05-17 23:00:18 +02:00
Benjamin Franzke
62bbb96d00 docs: regenerate highlight style and streamline background overwrite
* Update to rougify 3.26.1 styling
 * Adapt background overwrite by removing default background color
   and only adding explicit overwrites for syntax error
   (error stylings appear for example in json-excerpts –
   see HACKING.md – and are therefore hidden by our css)
2022-05-17 23:00:18 +02:00
Benjamin Franzke
818e46ae7c docs: avoid multiple first-level headlines
One document should only contain one main
headline, both for structuring and for
visual reasons.

Relevant cases found via:

  git grep -A2 '^# ' docs/
2022-05-17 23:00:18 +02:00
Benjamin Franzke
85b5930b7b docs: provide a first level headline for the frontpage
* Provides a nice introduction to the intro paragraph
 * Ensures text of subpages start at the same position as the intro text
   on the homepage
   => less visual "jumps" while navigating
2022-05-17 23:00:18 +02:00
Benjamin Franzke
bd59f2bf92 docs: respect default browser font-size
16px is default by all browser vendors when
font-setting is defined to be 'medium'.

Scale all font sizes and margins to
based on 16px base size.
2022-05-17 23:00:18 +02:00
Benjamin Franzke
68f0d3ff12 docs: add reasonable difference between h2 and h3 font-size 2022-05-17 23:00:18 +02:00
Benjamin Franzke
cfcbf1dafb docs: replace <pre>, <code> and <tt> tags by backticks
Let jekyll render a proper codeblock, instead
of using custom HTML code in markdown.
Also <tt> is deprecated.
2022-05-17 22:35:54 +02:00
Benjamin Franzke
86a3a73bb4 docs: adapt theme color meta property
The theme color is used on android to style the chrome
browser-ui with a color that suits the webpage.

Use the dark brand color instead of a random default blue color
in order to fit to the rest of the color scheme.
2022-05-17 22:35:54 +02:00
Benjamin Franzke
74de5ddb99 docs: remove unneeded font-related attributes from svg logo
The font has been vectorized and therefore all
font related properties are ignored anyway.
2022-05-17 22:35:54 +02:00
Benjamin Franzke
b336535c6e docs: use whole numbers for circle in page-logo
0.001 is usually rounded to 0 by browsers, still,
better to be explicit and save some bytes.
2022-05-17 22:35:54 +02:00
Benjamin Franzke
f08446a4f5 docs: replace invalid h1 font-weight
h1 font weight is defined to be 100 but no font-face
definition for weight 100 is included.
The browser will use the nearest available font-weight
instead. As that is 400, we do specify it explicitly now.
2022-05-17 22:35:53 +02:00
Benjamin Franzke
d5ce270ced docs: remove link to missing apple-touch-icon 2022-05-17 21:13:24 +02:00
Benjamin Franzke
f32c5aa16c docs: remove invalid link to feed.xml 2022-05-17 21:13:21 +02:00
Benjamin Franzke
55813558cd docs: remove trailing space 2022-05-17 21:13:19 +02:00
Benjamin Franzke
add4a110f7 docs: configure editorconfig for css and html 2022-05-17 21:13:17 +02:00
Luca Boccassi
bd144c9643
Merge pull request #23412 from yuwata/network-bond-param
networkctl: bond param
2022-05-17 20:11:55 +01:00
Luca Boccassi
070f737083 Update TODO 2022-05-17 17:47:38 +01:00
Zbigniew Jędrzejewski-Szmek
80c48dd3a2
Merge pull request #23114 from yuwata/resolve-dnssec
resolve: always request additional record to verify negative answer
2022-05-17 16:53:09 +02:00
Zbigniew Jędrzejewski-Szmek
776fabbc8b Add a "test" that prints the SBAT table
The SBAT section was included in a special section in the EFI code, but
the contents weren't directly visible in any way. Let's add a "test" that
prints them for visual inspection.

If there's some external linter for this format, we could hook it up in the
future.
2022-05-17 16:45:15 +02:00
Yu Watanabe
9ce14a75e7 test-boot-timestamp: use ERRNO_IS_PRIVILEGE() to also mask -EPERM
Fixes #23395.
2022-05-17 15:54:24 +02:00
Yu Watanabe
acfe3b65e1 test-network: add test for showing Bond parameters 2022-05-17 22:35:27 +09:00
Yu Watanabe
05e022a913 networkctl: fix units for bond parameters
Fixes RHBZ#2086166 (https://bugzilla.redhat.com/show_bug.cgi?id=2086166).
2022-05-17 22:35:18 +09:00
Luca Boccassi
3b7493dcfa
Merge pull request #23409 from keszybz/network-online-docs
Network online docs
2022-05-17 13:42:51 +01:00
Yu Watanabe
1a8922ddec
Merge pull request #23407 from keszybz/bpf-cleanup-warning
Clean up bpf cleanup warning
2022-05-17 20:31:10 +09:00
Zbigniew Jędrzejewski-Szmek
45b1321653 docs: say how to delay network-online.target
Could be related to https://access.redhat.com/solutions/4879291.
Unfortunately I can't access this page, but the title seems
relevant.
2022-05-17 12:50:09 +02:00
Zbigniew Jędrzejewski-Szmek
3b098432be docs: copy the page about network-online.target from the wiki
From https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/.

I changed the order in the page, but didn't change the text too much. Now the
discussion of the different targets is at the top, and they are ordered like
during boot (network-pre.target first, then network.target, and
network-online.target last). The parts about LSB and $network are pushed down a
bit. I think it is still useful to have them, but not as the main entry point
into the discussion. I tried to clean up the grammar and wording a bit.

One meanigful change is that we now don't say that network-online.target means
interfaces are up and IP addresses have been assigned. In other places we were
saying that the actual implementation is provided by
NetworkManager-wait-online.service, so the actual meaning is not under our
control. The text is changed to say "usually".

The last paragraph is new, I think it's good to say that
"dnf-makecache.service" is fine to use "network-online.target".
2022-05-17 12:50:09 +02:00
Zbigniew Jędrzejewski-Szmek
ba187c9c9c manager: skip BPF cleanup if we never initialized
This fixes a spurious warning from the manager running in user mode:

systemd[1668]: Reached target sockets.target.
systemd[1669]: Failed to create BPF map: Operation not permitted
systemd[1669]: Finished systemd-tmpfiles-setup.service.
systemd[1669]: Listening on dbus.socket.
systemd[1669]: Reached target sockets.target.
systemd[1669]: Reached target basic.target.
systemd[1]: Started user@6.service.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2084955.
2022-05-17 10:55:40 +02:00
Yu Watanabe
bfd671061c test-execute: skip one more test when PID1 is not systemd
Fixes #23332.
2022-05-17 10:50:33 +02:00