1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-24 06:04:05 +03:00

71925 Commits

Author SHA1 Message Date
Yu Watanabe
bf995423fd test: add test case for issue #31776 2024-03-21 04:44:39 +09:00
Yu Watanabe
cb2be36650 journalctl: make --until work again with --after-cursor and --lines
Fixes a regression introduced by 81fb5375b3b3bfc22d023d7908ad9eee4b3c1ffb.

If one of the cursor option is specified, we first seek to the cursor position.
So, the current position may be out of the time range specified by --until,
and we need to verify the timestamp of the current position.

Fixes #31776.

Co-authored-by: Reid Wahl <nrwahl@protonmail.com>
2024-03-21 04:43:45 +09:00
Yu Watanabe
8810b782a1 test: fix typo
Follow-up for 66444455867f5f6313151a480d2651d7ac90dcac.
2024-03-21 03:58:05 +09:00
Yu Watanabe
2e097e4a91 resolve: fix typo
Follow-up for ce5b9d5b3c2466dd35691be0a662c4e3353a2bbf.
2024-03-21 03:56:36 +09:00
Yu Watanabe
2503c377fa resolve: fix typo
Follow-up for 47690634f157150e7b69c832d1f2d64d18b3f124.
2024-03-21 03:55:37 +09:00
Unique-Usman
c0cd99eee6 Follow up with the PR #31819 2024-03-20 15:48:05 +00:00
Luca Boccassi
c3a55dc469
Merge pull request #31844 from keszybz/missing-extra-checks
Add static asserts to verify that our missing_*.h headers defines are actually correct
2024-03-20 15:47:05 +00:00
Yu Watanabe
1c8e8ec0ff Revert "test: temporarily adjust the default mount rate limit"
This reverts commit 3f4b00a34a425566ca8494846b0e74ca8c7693d3.

The issue #30573 seems to be fixed somehow. Let's revert the workaround.
2024-03-20 15:36:05 +01:00
cunshunxia
cc59d1014f man: fix a few issues in manpage
fix: #31482

Signed-off-by: cunshunxia <cunshunxia@tencent.com>
2024-03-20 15:24:11 +01:00
Luca Boccassi
aa5703f66f
Merge pull request #31827 from rpigott/resolved-faster-dnssec
Reduce superfluous dnssec transactions
2024-03-20 13:17:40 +00:00
Frantisek Sumsal
e9f8ad4073
Merge pull request #31867 from jamacku/update-freezer
Update development freeze GitHub Action; now milestones are taken into account
2024-03-20 13:37:37 +01:00
Jan Macku
ec8c80eddb ci(freezer): update devel-freezer GHA to v1.1.0
The new version of `devel-freezer` GitHub Action adds support for milestones, labels, and more. Now, when the `rc` tag is published, it won't post a development freeze comment on PRs included in the next milestone.

This commit also sets a delay of the 20s for PR validation to give some time for updating labels and milestones on submitted PRs.
2024-03-20 12:37:18 +01:00
Zbigniew Jędrzejewski-Szmek
0dee6f7a7b basic/missing_audit: add explanatory comment
It seems we need to check for the header file because it's not available in
some fuzzer builds.
2024-03-20 12:26:24 +01:00
Zbigniew Jędrzejewski-Szmek
aee547b97b basic/missing_*.h: indentation tweaks 2024-03-20 12:26:16 +01:00
Zbigniew Jędrzejewski-Szmek
4d6437d33c basic/missing_*.h: add asserts that the values are as expected
It's great that we provide fallback values, but if we got one of those wrong,
it could be a long time before anyone noticed. So let's add asserts that the
our internal defines actually match the official ones, when the latter are
available.

I did not add '#include "macro.h"' to missing_{audit,capability}, because
those are processed by an awk script that would need additional include
directories and could be confused by the additional lines. We don't include
those headers standalone anyway, so this is not necessary anyway.
2024-03-20 12:26:16 +01:00
Zbigniew Jędrzejewski-Szmek
7258971b13 basic/missing_ioprio: include the proper header file
IOPRIO_* is defined in linux/ioprio.h, so we were always using our fallback
definitions.

The header list in meson.build is sorted. I'm not sure why it wasn't.
2024-03-20 12:25:47 +01:00
Gerd Hoffmann
102138a12e sd-boot: add support for custom mode.
Custom mode allows to write updates to db, dbx, KEK and PK without
signature.  See the comment block for a more detailed description.

In case the PK update has no signature try to enable custom mode.
2024-03-20 11:04:14 +00:00
Jan Macku
2547791075 ci(freezer): update metadata and development_freeze workflow
use custom action to gather PR metadata and download artifact rather then inline script
2024-03-20 10:44:31 +01:00
Jan Macku
b026b9edf5 ci(metadata): remove fetch-depth: 0 it's not needed anymore 2024-03-20 10:35:40 +01:00
Gerd Hoffmann
3037616d8e kernel-install: fix uki-copy deinstall
For "kernel-install remove ..." only the kernel version is passed, not
the kernel image.  So auto-detecting KERNEL_INSTALL_IMAGE_TYPE and
setting KERNEL_INSTALL_LAYOUT does not work for uninstall.

The 90-uki-copy.install plugin must consider this and *not* exit early
for the "remove" command, otherwise $BOOT_ROOT will be filled with stale
kernel images.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2024-03-20 11:35:13 +09:00
Ronan Pigott
cd40efc671 dnssd: don't advertise subtype PTRs to the browsing domain
The RFC6763 § 9 recommendation is to advertise only the two-label
service names.

Fixes: 88123aa21c26 ("dnssd: support service subtypes")
2024-03-19 22:47:00 +00:00
Daan De Meyer
30f08c303a mkosi: Update debian to latest
Fixes mkosi builds
2024-03-19 22:46:03 +00:00
Yu Watanabe
46325d9324 terminal-util: fix underlying with SYSTEMD_COLORS=no
Fixes #31857.
2024-03-19 22:21:56 +01:00
dependabot[bot]
8f76cb55b8 build(deps): bump pkg/arch from 733045c to b33762d
Bumps pkg/arch from `733045c` to `b33762d`.

---
updated-dependencies:
- dependency-name: pkg/arch
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-19 22:17:07 +01:00
Zbigniew Jędrzejewski-Szmek
7aed434371 Rename uid0 to run0
Naming is always a matter of preference, and the old name would certainly work,
but I think the new one has the following advantages:
- A verb is better than a noun.
- The name more similar to "the competition", i.e. 'sudo', 'pkexec', 'runas',
  'doas', which generally include an action verb.
- The connection between 'systemd-run' and 'run0' is more obvious.

There has been no release yet with the old name, so we can rename without
caring for backwards compatibility.
2024-03-19 16:37:22 +01:00
Zbigniew Jędrzejewski-Szmek
d1f3cd7aaa units: add one more equivalency of '-' in '_' on kernel cmdline
c0aeff4b999318d4da48328fff0ea93c8c457ace added this in one unit file, but the
same problem occurs here. (There are no other files where this would apply.)
I think we should solve this systematically somehow, but it's not clear how to
do that, so until we have that better solution, let's apply the manual solution
so that our units work as expected.
2024-03-19 13:06:44 +00:00
Daan De Meyer
db7374e156 Document new vsock literals
Fixes #31849
2024-03-19 12:31:36 +00:00
Unique-Usman
e19186359a Add a set of assertion macros to tests.h
(ASSERT_OK(), ASSERT_EQ(), ASSERT_GE(), ASSERT_LE()) that log the failed condition before crashing and convert test-gpt.c test file to use them
2024-03-19 11:37:45 +00:00
Abraham Samuel Adekunle
6644445586 Add new unittest for shared:recovery-key 2024-03-19 11:02:39 +00:00
Yu Watanabe
169b282bf9
Merge pull request #31841 from AdrianVovk/homed-trivial
Small homed changes + revert
2024-03-19 17:22:34 +09:00
Yu Watanabe
27e3e6a321
Merge pull request #31772 from yuwata/network-persistent-storage-use-fd
network: pass fd of persistent storage, then use ProtectSystem=strict again
2024-03-19 16:37:15 +09:00
Yu Watanabe
a9e7894d38 unit/network: use ProtectSystem=strict again
Now, networkd accesses the state directory through the file descriptor
passed from systemd-networkd-persistent-storage.service.
Hence, the networkd itself does not need to access the state directory
through its path, and we can use more stronger mode for ProtectSystem=.
2024-03-19 15:15:32 +09:00
Yu Watanabe
bfd8f70cb8 network/varlink: pass file descriptor of state directory with SetPersistentStorage method
The state directory is owned by systemd-networkd-persistent-storage.service,
at least technically. Let's not directly access the storage through the path,
but through the fd.

Addresses https://github.com/systemd/systemd/pull/31746#issuecomment-1993556966.

Suggested-by: Mike Yuan <me@yhndnzj.com>
2024-03-19 15:15:32 +09:00
Ronan Pigott
ce5b9d5b3c resolved: request DS with DNSKEY
When validating, when we lookup a DNSKEY for validation we will almost
certainly need the corresponding DS to complete the chain of trust.
Let's go ahead and request it right away so that we don't have to wait
in this common case.
2024-03-18 15:10:07 -07:00
Ronan Pigott
47690634f1 resolved: don't request the SOA for every dns label
When validating insecure delegations we don't actually need to request
the SOA for every single dns label. We need the DS records for the zone,
and we can seek them by querying for DS directly (in case we are at a
zone cut) and then following the SOA referrals or the parent name until
we have found a chain of trust.

Extra transactions and roundtrips, especially transactions for RRs that
aren't actually needed to validate and therefore aren't likely to be in
the recursive resolver's own cache are a big slowdown during validation.

Consequently, this change results in an enourmous speed up in validating
most names from our own cold-cache (10x or more), by eliminating a large
number of superfluous dnssec transactions.
2024-03-18 15:10:07 -07:00
Adrian Vovk
1f8aa8456e
homed: Minor man page improvements 2024-03-18 15:31:18 -04:00
Adrian Vovk
7555fc9122
homed: Minor function name cleanup
It's not actually a dbus method, just function that all the various dbus
methods end up calling to update the user record. So rename it to
reflect as such
2024-03-18 15:31:17 -04:00
Adrian Vovk
5d490208a8
Revert "homed: Add InhibitSuspend() method"
I'm moving this functionality into logind instead.

This reverts commit 691b99160de4bc856e676dba6e07b33d2fa0908e.
2024-03-18 15:31:16 -04:00
Daan De Meyer
01285611b0
Merge pull request #31838 from DaanDeMeyer/opensuse
mkosi: OpenSUSE fixes
2024-03-18 17:20:15 +01:00
Edson Juliano Drosdeck
f1c198719d Fix Positivo N14NPE-N and N15NPE-N key toggle touchpad and search key 2024-03-18 15:35:50 +00:00
Daan De Meyer
a1eeb4d753 mkosi: Install systemd-experimental in OpenSUSE initrd
systemd-repart is part of systemd-experimental and we need systemd-repart
in the initrd so let's install systemd-experimental in the initrd.
2024-03-18 16:20:15 +01:00
Daan De Meyer
bd9bec99d0 mkosi: Install python3-pefile in OpenSUSE image
ukify is part of systemd-experimental on OpenSUSE and not its own
package. Because the OpenSUSE systemd maintainers do not want to
introduce a python dependency for systemd-experimental, we have to
install python3-pefile manually to make sure ukify works properly.
2024-03-18 16:20:00 +01:00
Luca Boccassi
399560aa30
Merge pull request #31747 from yuwata/ptyfwd
ptyfwd: do not erase line after NL
2024-03-18 14:10:45 +00:00
Yu Watanabe
c73f2b7295 test: fix typo
Follow-up for fcf38e2cb33a9bc0c17352f64d47c270075b3cbb.
2024-03-18 22:48:24 +09:00
Ronan Pigott
88123aa21c dnssd: support service subtypes
A service subtype is used for selective enumeration of services.
2024-03-18 13:16:48 +00:00
Luca Boccassi
15d4bedf3d
Merge pull request #31778 from yuwata/kbd-util
kbd-util: allow to override the default keymap directories
2024-03-18 12:20:36 +00:00
Nick Rosbrook
6fec0fed10 shared/install: correctly install alias for units outside search path
Currently, if a unit file is enabled from outside of the search path,
and that unit has an alias, then the symlink ends up pointing outside of
the search path too. For example:

 $ cat /tmp/a.service
 [Service]
 ExecStart=sleep infinity

 [Install]
 Alias=b.service
 WantedBy=multi-user.target

 $ systemctl enable /tmp/a.service
 Created symlink /etc/systemd/system/a.service → /tmp/a.service.
 Created symlink /etc/systemd/system/b.service → /tmp/a.service.
 Created symlink /etc/systemd/system/multi-user.target.wants/a.service → /tmp/a.service.

This then means the alias is treated as a separate unit:

 $ systemctl start a.service
 $ sudo systemctl status a
 ● a.service
  Loaded: loaded (/etc/systemd/system/a.service; enabled; preset: enabled)
  Active: active (running) since Fri 2024-03-15 15:17:49 EDT; 9s ago
 Main PID: 769593 (sleep)
   Tasks: 1 (limit: 18898)
  Memory: 220.0K
     CPU: 5ms
  CGroup: /system.slice/a.service
          └─769593 sleep infinity

 Mar 15 15:17:49 six systemd[1]: Started a.service.
 $ sudo systemctl status b
 ○ b.service
  Loaded: loaded (/etc/systemd/system/b.service; alias)
  Active: inactive (dead)

To fix this, make sure the alias uses a target that is inside the search
path. Since the unit file itself is outside of the search path, a
symlink inside the search path will have been created already. Hence,
just point the alias symlink to that recently created symlink.
2024-03-18 11:58:07 +00:00
Ronan Pigott
ce88017255 resolved: wait to gc transactions if they might still give an answer
In some cases when a query completes there are still pending
transactions that are no longer useful to answer the query. But if this
query is repeated in the future and we don't have the answers cached,
we're going to ask and ignore the answer again.

Instead of purging these superfluous transactions, let's wait and see if
they produce an answer, since we already asked the question, and use it
to fill our cache.
2024-03-18 11:10:11 +00:00
Luca Boccassi
48570c9273
Merge pull request #31811 from yuwata/network-pin-persistent-storage
network: pin file descriptor of persistent storage
2024-03-18 11:08:21 +00:00
Abraham Samuel Adekunle
fcf38e2cb3 Add unittest file for basic:label 2024-03-18 11:04:42 +00:00