Commit graph

74140 commits

Author SHA1 Message Date
Yu Watanabe acddb3cb79 test-network: tun/tap fd may be owned by tentative worker processes
PID1 may invoke a helper process, e.g. sd-close, during the test.
So, processes other than networkd and PID1 may be shown.
```
testtap99: tap pi multi_queue vnet_hdr persist filter
        Attached to processes:systemd-network(2852)(sd-close)(2863)systemd(1)
```

Closes #33055.
2024-05-28 16:39:51 +02:00
Luca Boccassi aa6fe772e1
Merge pull request #33057 from poettering/partscan-no-part
blockdev-util: for partition block devices partition scanning is always off
2024-05-28 16:39:15 +02:00
Zbigniew Jędrzejewski-Szmek b95914f4b0 man: capsule support was added in v256
The version info added directly to --capsule. If we add the
same switch in other places in the future, we will have to move
this.

Closes https://github.com/systemd/systemd/issues/33048.
2024-05-28 16:30:54 +02:00
Luca Boccassi 78247be91d
Merge pull request #33063 from keszybz/wiki-links
Update wiki links
2024-05-28 16:21:45 +02:00
Zbigniew Jędrzejewski-Szmek 95a248c56f
Merge pull request #33008 from fbuihuu/optionally-link-ssh-dropins
Optionally link ssh dropins
2024-05-28 16:02:40 +02:00
Yu Watanabe 47e881ee65 test: lock device when sfdisk or mkfs
Or, trigger devices after the command incase the device is dm or md.

Fixes #33056.
2024-05-28 15:43:55 +02:00
Mike Yuan 1e1df05296 socket-util: use GREEDY_REALLOC_APPEND where appropriate
Also, previously GREEDY_REALLOC was used improperly,
causing the fds_array to be leaked when realloc() fails.
2024-05-28 15:42:14 +02:00
Lennart Poettering 7c1a1aa42c machined: downgrade warning if we cannot drop ref to systemd unit if disconnected from bus
if machined exits while a machine is still running, we'll issue the
UnrefUnit() call on the unit. This quite likely will fail if during
shutdown the bus connection is already down. But that's no reason to
warn at all, since the ref count will implicitly be dropped if our side
disappears from the bus. Hence, downgrade to LOG_DEBUG in case of
connection problems.
2024-05-28 15:05:11 +02:00
Luca Boccassi c7eb3ae308
Merge pull request #33052 from yuwata/missing-loop
Fixlets for missing_loop.h
2024-05-28 15:01:00 +02:00
Zbigniew Jędrzejewski-Szmek 80cdf708df README: update link for backports 2024-05-28 14:48:56 +02:00
Zbigniew Jędrzejewski-Szmek 75ced6d5ee various: update links to usr-merge 2024-05-28 14:48:56 +02:00
Zbigniew Jędrzejewski-Szmek bdc965253c docs: drop link to obsolete multiseat page
We link to the man page which replaced this historical document right above,
so just drop the whole paragraph.
2024-05-28 14:48:56 +02:00
Zbigniew Jędrzejewski-Szmek a37454bd90 man: update links to "API File Systems" 2024-05-28 14:48:56 +02:00
Zbigniew Jędrzejewski-Szmek d5c17aceb3 various: update links to more wiki pages 2024-05-28 14:48:53 +02:00
Zbigniew Jędrzejewski-Szmek 5507480cf4 man: update links to "Inhibitor Locks" 2024-05-28 14:48:53 +02:00
Zbigniew Jędrzejewski-Szmek b346d72c79 man: update links to "Compatibility with SysV" 2024-05-28 14:46:44 +02:00
Zbigniew Jędrzejewski-Szmek f81af0b082 man: update links to "New Control Group Interfaces" 2024-05-28 14:46:44 +02:00
Zbigniew Jędrzejewski-Szmek 03d35b5d18 man: update links to catalog docs 2024-05-28 14:46:44 +02:00
Mathias Lang 60d285a2b4 docs/CONTRIBUTING.md: Fix links in CONTRIBUTING
Get them to point to the rendered version, instead of
letting Github thinks they are absolute links in the
repository. The rendered version is much more user-friendly.
2024-05-28 12:53:18 +02:00
Lennart Poettering 3455bcb0df test: add superficial test for partscan test 2024-05-28 11:08:06 +02:00
Lennart Poettering fa65917623 blockdev-util: partition block devices never have partition scanning enabled 2024-05-28 11:08:06 +02:00
Yu Watanabe 36c5035f2a test: suppress logs generated by journal tests
Note, journal_file_dump() is only used by tests.

Closes #33035.
2024-05-28 10:38:53 +02:00
Yu Watanabe 61fdb5b214 test: wait for the kernel finishes to attach backing file to loop device
Fixes #32680.
2024-05-28 08:49:47 +02:00
Yu Watanabe eb6d3a5917 missing_loop.h: fix LOOP_SET_STATUS_SETTABLE_FLAGS
See https://github.com/torvalds/linux/blob/v6.10-rc1/include/uapi/linux/loop.h

Fixes a bug in b3fe33ff52.
2024-05-28 12:27:04 +09:00
Yu Watanabe fb45ced368 missing_loop: fix potential compile-time assertion
Fixes a bug introduced by 4d6437d33c.
2024-05-28 12:25:53 +09:00
Nicholas Little f4434c61b9
hwdb: Lenovo IdeaPad Z500 Touchpad Toggle (#33039)
Map scancode f3 to KEY_F21.
2024-05-28 09:56:53 +09:00
Daniel Winzen 983028cdc4
cryptsetup: mention correct action in log message 2024-05-27 17:05:23 +01:00
Daan De Meyer 096f923f7a meson: Run genkey command with --force
Sometimes meson decides to rerun the command even if the files already
exist. Let's run with --force so we don't fail if that's the case.
2024-05-27 17:48:55 +02:00
Franck Bui 50d80ec5ac meson: don't put a symlink pointing to '20-systemd-userdb.conf' in /etc in all cases
It's only needed on distros where sshd doesn't support drop-ins in /usr, which
is not the case on SUSE.
2024-05-27 17:20:55 +02:00
Franck Bui de0f11d790 meson: don't put a symlink pointing to '20-systemd-ssh-proxy.conf' in /etc in all cases
On distros like SUSE where ssh config dropins in /usr are supported, there's no
need for a symlink in /etc/ssh/ssh_config.d/ that points to the dropin
installed somewhere in /usr (that is not reachable by ssh).
2024-05-27 17:20:26 +02:00
Daan De Meyer d821a1103f
Merge pull request #33038 from DaanDeMeyer/mkosi
Various integration test improvents
2024-05-27 16:12:24 +02:00
Chris Hofstaedtler 815025d767 test: fix iscsi TEST-64-UDEV-STORAGE on Debian 2024-05-27 14:33:32 +02:00
Daan De Meyer fedac4c279 test: Extend meson + mkosi integration test docs
Let's also put the meson + mkosi docs first to nudge readers towards
it instead of the old fashioned way to run the integration tests.
2024-05-27 13:59:26 +02:00
Daan De Meyer 65638f4855 Rewrite testsuite README in markdown
Let's use markdown here like we do for everything else as well.
2024-05-27 13:59:05 +02:00
Luca Boccassi 86b89c7309
Merge pull request #33028 from yuwata/blockdev-util
blockdev-util: also check loop/partscan sysattr
2024-05-27 12:44:38 +02:00
Daan De Meyer 2189b3268d meson: Add genkey target
Let's automatically generate keys instead of requiring developers to
do it manually.
2024-05-27 12:02:31 +02:00
Daan De Meyer e2f9f3409a meson: Look up mkosi once 2024-05-27 12:02:31 +02:00
Luca Boccassi cafe40ec82 executor: check for all permission related errnos when setting up IPC namespace
Denials from AppArmor are raised as EACCES, so EPERM is not enough. Do
the same check as PrivateNetwork above.

Fixes https://github.com/systemd/systemd/issues/31037

Related to 06384eb3c5
2024-05-27 10:58:15 +02:00
Luca Boccassi e8b81df8b2 docs: add note about URL where to find recent Ubuntu CI logs 2024-05-27 09:50:50 +02:00
Daan De Meyer 09a2585686
Merge pull request #33013 from yuwata/journal-flush
journal: several fixlets for flushing runtime journal
2024-05-27 08:56:46 +02:00
Mike Yuan 8d4fa6531b man/run0: remove @ syntax for --machine=
For run0 (as opposed to systemd-run in general), connecting to
the system bus (of localhost or container) as a different user
than root and then trying to elevate privilege from that
makes little sense:
https://github.com/systemd/systemd/issues/32997#issuecomment-2127992973

The @ syntax is mostly useful when connecting to the user bus,
which is not a use case for run0. Hence, let's remove the example.
The syntax will be properly refused in #32999.
2024-05-27 09:40:47 +09:00
Mike Yuan 006c02b371 man/run0: remove -M alias for --machine=
run0 doesn't know about the former.
2024-05-27 09:40:47 +09:00
Yu Watanabe c7cd75b0bf
Merge pull request #33016 from YHNdnzj/transient-working-dir
core: several cleanups/fixes for WorkingDirectory= handling
2024-05-27 09:40:26 +09:00
Yu Watanabe bab8c851da blockdev-util: also check loop/partscan sysattr
With b9684a71fc (v5.19),
we cannot check partition scanning is enabled for a loopback block device
without checking the attribute.
2024-05-27 09:33:46 +09:00
Yu Watanabe f0c2668c99 blockdev-util: also check newer value of GENHD_FL_NO_PART flag
With 430cc5d3ab,
the value of GENHD_FL_NO_PART, previously named as GENHD_FL_NO_PART_SCAN,
is changed from 0x0200 to 0x0004. So, we need to check both flags.
2024-05-27 09:33:09 +09:00
Mike Yuan 7fbb637ac9 run: also show a pretty string for main exit status, if any
This brings output on par with unit_log_process_exit().
2024-05-27 04:31:33 +09:00
Mike Yuan 100bed702b blockdev-util: "partscan" sysattr now directly shows the enabled state
See also: https://lore.kernel.org/r/20240502130033.1958492-3-hch@lst.de
2024-05-26 13:52:31 +02:00
Yu Watanabe fbe1e72eff test: use SYSLOG_IDENTIFIER= filter instead of "journalctl -u"
"journalctl -u foo.service" may not work as expected, especially entries
for _TRANSPORT=stdout, for short-living services or when the service manager
generates debugging logs. Instead, SYSLOG_IDENTIFIER= should be reliable for
stdout. Let's use it.

An example case:
```
__CURSOR=s=06278e3bf011458e973c81d370a8f7a5;i=1e4dc;b=1b0258a5c78341609bf462c72d4541c3;m=308de65;t=6194c3895a13f;x=50c7e9af5b8cfc37
__REALTIME_TIMESTAMP=1716665017803071
__MONOTONIC_TIMESTAMP=50912869
_BOOT_ID=1b0258a5c78341609bf462c72d4541c3
SYSLOG_FACILITY=3
_UID=0
_GID=0
_MACHINE_ID=d3490e076ab24968bfa19a6aab26beb3
_HOSTNAME=H
_RUNTIME_SCOPE=system
_TRANSPORT=stdout
PRIORITY=6
_PID=2668
_STREAM_ID=3f9b8855636041988d003a9c63379b8a
SYSLOG_IDENTIFIER=echo
MESSAGE=foo
```
As you can see, there is no unit identifier.
2024-05-26 11:00:22 +02:00
Mike Yuan 52d8ba71b6
core: introduce unit_verify_contexts
Refuse WorkingDirectory=~ both in that and exec_invoke()
when dynamic user is used.
2024-05-26 13:41:43 +08:00
Mike Yuan 4dd884af1b
core/unit: don't set missing_ok if WorkingDirectory=~ is explicitly requested 2024-05-26 13:40:49 +08:00