1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 10:25:37 +03:00
Commit Graph

60695 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
3c3e14a7d8 meson: systemd-repart.standalone
Repart is growing into an important tool on its own, and users might
want to install newer versions on systems that have older systemd. Let's
make this easier by providing a standalone binary.

Related to https://github.com/systemd/mkosi/issues/1228.
2022-10-31 21:12:55 +01:00
Yu Watanabe
04b2541000 udev: drop trivial wrapper for udev_watch_begin() 2022-10-31 21:12:27 +01:00
Marek Vasut
f80b7d1a89 udev: Handle AMBA bus the same way as generic platform bus
On various ARM systems, it is possible to find devices on AMBA bus.
This is defined in Linux kernel drivers/amba/bus.c as separate bus
type. Udev currently does not recognize this when building ID_PATH
which leads to ID_PATH containing the suffix from next recognized
parent device. On ST STM32MP15xx with SDIO WiFi, the ID_PATH looks
like 'platform-soc', which is not unique and basically useless. On
NXP i.MX8M Plus with SDIO WiFi, ID_PATH is 'platform-30b40000.mmc'
which is far more useful.

Add the 'amba' subsystem handling the same way 'platform' subsystem
is handled to get ID_PATH 'platform-soc-amba-48004000.sdmmc' on the
former, which is far more useful compared to 'platform-soc'.

---

```
$ udevadm info --attribute-walk --path=/devices/platform/soc/48004000.mmc/mmc_host/mmc1/mmc1:0001/mmc1:0001:1/net/wlan0

Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/devices/platform/soc/48004000.mmc/mmc_host/mmc1/mmc1:0001/mmc1:0001:1/net/wlan0':
    KERNEL=="wlan0"
    SUBSYSTEM=="net"
    DRIVER==""
    ATTR{addr_assign_type}=="0"
    ATTR{addr_len}=="6"
    ATTR{address}=="10:98:c3:5f:4b:80"
    ATTR{broadcast}=="ff:ff:ff:ff:ff:ff"
    ATTR{carrier_changes}=="1"
    ATTR{carrier_down_count}=="1"
    ATTR{carrier_up_count}=="0"
    ATTR{dev_id}=="0x0"
    ATTR{dev_port}=="0"
    ATTR{flags}=="0x1002"
    ATTR{gro_flush_timeout}=="0"
    ATTR{ifalias}==""
    ATTR{ifindex}=="3"
    ATTR{iflink}=="3"
    ATTR{link_mode}=="0"
    ATTR{mtu}=="1500"
    ATTR{napi_defer_hard_irqs}=="0"
    ATTR{netdev_group}=="0"
    ATTR{operstate}=="down"
    ATTR{power/control}=="auto"
    ATTR{power/runtime_active_time}=="0"
    ATTR{power/runtime_status}=="unsupported"
    ATTR{power/runtime_suspended_time}=="0"
    ATTR{proto_down}=="0"
    ATTR{queues/rx-0/rps_cpus}=="0"
    ATTR{queues/rx-0/rps_flow_cnt}=="0"
    ATTR{queues/tx-0/byte_queue_limits/hold_time}=="1000"
    ATTR{queues/tx-0/byte_queue_limits/inflight}=="0"
    ATTR{queues/tx-0/byte_queue_limits/limit}=="0"
    ATTR{queues/tx-0/byte_queue_limits/limit_max}=="1879048192"
    ATTR{queues/tx-0/byte_queue_limits/limit_min}=="0"
    ATTR{queues/tx-0/tx_maxrate}=="0"
    ATTR{queues/tx-0/tx_timeout}=="0"
    ATTR{queues/tx-0/xps_rxqs}=="0"
    ATTR{statistics/collisions}=="0"
    ATTR{statistics/multicast}=="0"
    ATTR{statistics/rx_bytes}=="0"
    ATTR{statistics/rx_compressed}=="0"
    ATTR{statistics/rx_crc_errors}=="0"
    ATTR{statistics/rx_dropped}=="0"
    ATTR{statistics/rx_errors}=="0"
    ATTR{statistics/rx_fifo_errors}=="0"
    ATTR{statistics/rx_frame_errors}=="0"
    ATTR{statistics/rx_length_errors}=="0"
    ATTR{statistics/rx_missed_errors}=="0"
    ATTR{statistics/rx_nohandler}=="0"
    ATTR{statistics/rx_over_errors}=="0"
    ATTR{statistics/rx_packets}=="0"
    ATTR{statistics/tx_aborted_errors}=="0"
    ATTR{statistics/tx_bytes}=="0"
    ATTR{statistics/tx_carrier_errors}=="0"
    ATTR{statistics/tx_compressed}=="0"
    ATTR{statistics/tx_dropped}=="0"
    ATTR{statistics/tx_errors}=="0"
    ATTR{statistics/tx_fifo_errors}=="0"
    ATTR{statistics/tx_heartbeat_errors}=="0"
    ATTR{statistics/tx_packets}=="0"
    ATTR{statistics/tx_window_errors}=="0"
    ATTR{threaded}=="0"
    ATTR{tx_queue_len}=="1000"
    ATTR{type}=="1"

  looking at parent device '/devices/platform/soc/48004000.mmc/mmc_host/mmc1/mmc1:0001/mmc1:0001:1':
    KERNELS=="mmc1:0001:1"
    SUBSYSTEMS=="sdio"
    DRIVERS=="brcmfmac"
    ATTRS{class}=="0x00"
    ATTRS{coredump}=="(write-only)"
    ATTRS{device}=="0xa9bf"
    ATTRS{power/control}=="auto"
    ATTRS{power/runtime_active_time}=="0"
    ATTRS{power/runtime_status}=="unsupported"
    ATTRS{power/runtime_suspended_time}=="0"
    ATTRS{revision}=="0.0"
    ATTRS{vendor}=="0x02d0"

  looking at parent device '/devices/platform/soc/48004000.mmc/mmc_host/mmc1/mmc1:0001':
    KERNELS=="mmc1:0001"
    SUBSYSTEMS=="mmc"
    DRIVERS==""
    ATTRS{device}=="0xa9bf"
    ATTRS{ocr}=="0x00200000"
    ATTRS{power/control}=="auto"
    ATTRS{power/runtime_active_time}=="0"
    ATTRS{power/runtime_status}=="unsupported"
    ATTRS{power/runtime_suspended_time}=="0"
    ATTRS{rca}=="0x0001"
    ATTRS{revision}=="0.0"
    ATTRS{type}=="SDIO"
    ATTRS{vendor}=="0x02d0"

  looking at parent device '/devices/platform/soc/48004000.mmc/mmc_host/mmc1':
    KERNELS=="mmc1"
    SUBSYSTEMS=="mmc_host"
    DRIVERS==""
    ATTRS{power/control}=="auto"
    ATTRS{power/runtime_active_time}=="0"
    ATTRS{power/runtime_status}=="unsupported"
    ATTRS{power/runtime_suspended_time}=="0"

  looking at parent device '/devices/platform/soc/48004000.mmc':
    KERNELS=="48004000.mmc"
    SUBSYSTEMS=="amba" <------------------------------------------------------- AMBA is here
    DRIVERS=="mmci-pl18x"
    ATTRS{driver_override}=="(null)"
    ATTRS{id}=="00253180"
    ATTRS{power/autosuspend_delay_ms}=="50"
    ATTRS{power/control}=="on"
    ATTRS{power/runtime_active_time}=="666709"
    ATTRS{power/runtime_status}=="active"
    ATTRS{power/runtime_suspended_time}=="0"

  looking at parent device '/devices/platform/soc':
    KERNELS=="soc"
    SUBSYSTEMS=="platform"
    DRIVERS=="simple-pm-bus"
    ATTRS{driver_override}=="(null)"
    ATTRS{power/control}=="auto"
    ATTRS{power/runtime_active_time}=="0"
    ATTRS{power/runtime_status}=="unsupported"
    ATTRS{power/runtime_suspended_time}=="0"

  looking at parent device '/devices/platform':
    KERNELS=="platform"
    SUBSYSTEMS==""
    DRIVERS==""
    ATTRS{power/control}=="auto"
    ATTRS{power/runtime_active_time}=="0"
    ATTRS{power/runtime_status}=="unsupported"
    ATTRS{power/runtime_suspended_time}=="0"
```
2022-10-31 21:12:12 +01:00
Erik Moqvist
85bc6b0549
sd-bus: convenience functions to emit a signal to a destination (#25123)
* sd-bus: convenience functions to emit a signal to a destination
2022-10-31 20:11:48 +00:00
Charles Hardin
a0961675d3 udev-builtin-net_id: support getting usb path off the host
To support predictable interface names in various embeeded systems
add support for an additional naming scheming using the USB host
interface. Several asics have usb controllers that are platform
devices and not children of a pci interface. These embedded systems
should be able to enumerate interfaces by udev path as well to support
configurations and policies.

Signed-off-by: Charles Hardin <charles.hardin@chargepoint.com>
2022-10-31 21:11:24 +01:00
Antonio Alvarez Feijoo
0cf1692493 dissect: add --list option
New option to print the paths of all the files and directories in the image to
stdout.
2022-10-31 21:11:09 +01:00
Luca Boccassi
fad1ce5c58
Merge pull request #25092 from fbuihuu/random-seed-tweaks
Random seed tweaks
2022-10-31 21:10:39 +01:00
Luca Boccassi
034fe54cd5
Merge pull request #24958 from Werkov/meson-generated-directives
Generate dirrectives for fuzzer tests
2022-10-31 21:04:30 +01:00
Luca Boccassi
c2fa46b6b9
Merge pull request #25134 from medhefgo/macro
macro: Small IN_SET improvements
2022-10-31 21:03:39 +01:00
Luca Boccassi
768b86b84a
Merge pull request #25136 from yuwata/udev-id-renaming
udev: cleanup for ID_RENAMING property
2022-10-31 21:02:41 +01:00
Luca Boccassi
7319adcd1b
Merge pull request #25142 from yuwata/network-fix-race-in-device-renaming-vs-dhcp
network,dhcp: fix theoretical race in device renaming
2022-10-31 21:01:57 +01:00
Luca Boccassi
4b9cfe08ba
Merge pull request #25166 from yuwata/network-router-preference
network: adjust route metric based on router preference
2022-10-31 20:59:36 +01:00
William Roberts
026d249969 docs/HACKING.md: clarify some portions
Clarify portions of HACKING.md so folks don't spend as much time as I
did on it.

Signed-off-by: William Roberts <william.c.roberts@intel.com>
2022-10-31 20:56:37 +01:00
Release o'Lantern
e8dc52766e Finalise 👻 SpOoOky 👻 NEWS for v252 2022-10-31 18:59:18 +00:00
Luca Boccassi
6f96359dfc Disable code freeze banner 2022-10-31 18:57:13 +00:00
Luca Boccassi
eabbb24a9f
Merge pull request #25202 from poettering/measure-phase-fix
measure: honour phases when signing
2022-10-31 19:50:31 +01:00
Luca Boccassi
b13f0d0d0d
Merge pull request #25200 from bluca/news
Update NEWS, hwdb
2022-10-31 16:53:10 +01:00
Lennart Poettering
2e6a0579cc measure: honour phases when signing 2022-10-31 16:52:00 +01:00
Lennart Poettering
28acd1e6c3 measure: banks and phases list are always non-empty
When parsing parameters, we populate these lists with defaults when
empty, hence we can rely that there's at least one bank and one phase
defined.
2022-10-31 16:51:12 +01:00
Lennart Poettering
6032283b2f resolved: fix copypasta in resolved varlink API
As reported by @holtmann
2022-10-31 14:57:35 +01:00
Luca Boccassi
1ba770a659 Update hwdb
ninja -C build update-hwdb
2022-10-31 12:15:16 +00:00
Luca Boccassi
ea3e581d39 Update NEWS with latest changes 2022-10-31 12:15:16 +00:00
Luca Boccassi
f3e70c8ae5 NEWS: update contributors list 2022-10-31 11:59:57 +00:00
Luca Boccassi
38c6289d6b
Merge pull request #25197 from weblate/weblate-systemd-master
Translations update from Fedora Weblate
2022-10-31 12:54:24 +01:00
Charles Lee
a0a2dd64d9 po: Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 100.0% (193 of 193 strings)

Co-authored-by: Charles Lee <lchopn@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/zh_CN/
Translation: systemd/main
2022-10-31 12:54:01 +01:00
Gogo Gogsi
4489b6ae04 po: Translated using Weblate (Croatian)
Currently translated at 100.0% (193 of 193 strings)

Co-authored-by: Gogo Gogsi <linux.hr@protonmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/hr/
Translation: systemd/main
2022-10-31 12:54:01 +01:00
Lennart Poettering
5bdf35c14e man: make clear NNP has no effect on processes invoked through systemd-run/at/crontab and such things 2022-10-31 12:53:52 +01:00
Lennart Poettering
6d040d84f5 update TODO 2022-10-31 12:38:48 +01:00
Jan Janssen
6e50cf38a6 NEWS: Clarify overlapping UKI PE section offsets 2022-10-31 11:08:13 +01:00
Yu Watanabe
0e523432aa
Merge pull request #25193 from takaswie/topic/udev/builtin/hwdb/ieee1394/support-legacy-layout-of-configuration-rom
hwdb: ieee1394-unit-function: arrangement for legacy device
2022-10-31 15:03:44 +09:00
Takashi Sakamoto
c017623254 hwdb: ieee1394-unit-function: add comment about legacy AV/C devices
It appears that exceptional layout of legacy device requires extra care of
hwdb entry for node device since Linux FireWire subsystem do not pick up
numeric model identifier in vendor directory. In detail, see:

 * https://github.com/systemd/systemd/issues/25029

In the case, udev rule without model attribute is used. Thus hwdb entry
for generic AV/C device should match both cases with and without the
attribute. The wildcard added by a commit 5e577da5f8 ("hwdb: drop model
specifier from general entries") satisfies this condition,

This commit adds comment about it.
2022-10-31 12:48:31 +09:00
Takashi Sakamoto
8bc468190b hwdb: ieee1394-unit-function: fullfill for Sony DCR-TRV310
It appeared that Sony DCR-TRV310 has legacy layout of configuration ROM
against 1394 TA standard documentation.

 * https://github.com/systemd/systemd/issues/25029

For the case, numeric model identifier and descriptor leaf for model name
are not picked up. This commit fulfill corresponding entry so that
applications can use model name from hardware database.
2022-10-31 12:48:31 +09:00
Yu Watanabe
0f9a160ae1
Merge pull request #25190 from mrc0mmand/reenable-test_macsec
test-network: re-enable test_macsec
2022-10-31 10:39:11 +09:00
Frantisek Sumsal
f9073c24de test-network: suppress a couple of minor pylint complaints 2022-10-30 20:52:24 +01:00
Frantisek Sumsal
ef11b841cd test-network: sort standard imports before "third-party" ones 2022-10-30 20:52:20 +01:00
Frantisek Sumsal
e43776595c test-network: drop a couple of useless f-strings 2022-10-30 20:43:35 +01:00
Frantisek Sumsal
0677130e81 test-network: use raw strings where appropriate 2022-10-30 20:43:28 +01:00
Frantisek Sumsal
b3de9d7bda test-network: re-enable test_macsec
The outstanding kernel panic should be already fixed in recent enough
kernels by [0]. To make the test safe to run anywhere, let's implement
a simple kernel version check and run the test only if we're running
with at least kernel 6.x. The patch might be in some 5.x kernels as
well, but let's be on the safe side and use 6.x as a baseline here
(which is currently the case for Arch and Fedora Rawhide anyway).

[0] https://lore.kernel.org/netdev/7b3fd03e1a46047e5ffe2a389fe74501f0a93206.1656519221.git.sd@queasysnail.net/T/#u
2022-10-30 20:42:11 +01:00
Jan Janssen
dcebf1d87e boot: Mark some functions as static 2022-10-30 14:17:11 +01:00
Yu Watanabe
479da1107a udev: always create device symlinks for USB disks
Previously, ata_id might not be able to retrieve attributes correctly,
and properties from usb_id were used as a fallback. See issue #24921
and PR #24923. To keep backward compatibility, still we need to create
symlinks based on USB serial.

Fixes #25179.
2022-10-30 12:02:02 +01:00
Yu Watanabe
269585dcc8 udev: fix for parsing MAC address
Fixes a bug introduced by 5bbcfbaa11.

Fixes #25181.
2022-10-30 11:55:00 +01:00
Yu Watanabe
59ab79a73d test: support non-summer time
Follow-up for 759ed0a253.
2022-10-30 08:26:00 +00:00
Steve Ramage
1d87f03a6e
man: Add documentation for AssertCredential= (#25178)
Fixes #25177.

Co-authored-by: Steve Ramage <gitcommits@sjrx.net>
2022-10-30 06:07:21 +09:00
Jochen Sprickerhof
27435a2c40 Remove duplicated word 2022-10-29 14:19:43 +09:00
David Seifert
17dc285bd4 test: remove brittle iszero_safe() test
The test relies on finite -> infinite conversion happening
when increasing DBL_MAX.

Fixes #25044.
2022-10-29 11:18:44 +09:00
Nick Rosbrook
6dfaeac370 man: document reboot --poweroff exception
When reboot is invoked, the -p/--poweroff option is intentionally
ignored. Update the man page to reflect this exception.
2022-10-29 06:39:32 +09:00
Luca Boccassi
9109009d24 tmpfiles: downgrade missing creds/source path log to debug
When installing systemd 252 in debian:

Setting up systemd (252~rc3-2) ...
Installing new version of config file /etc/systemd/logind.conf ...
Installing new version of config file /etc/systemd/system.conf ...
Installing new version of config file /etc/systemd/user.conf ...
/usr/lib/tmpfiles.d/provision.conf:13: Credential 'login.motd' not specified, skipping line.
/usr/lib/tmpfiles.d/provision.conf:14: Credential 'login.issue' not specified, skipping line.
/usr/lib/tmpfiles.d/provision.conf:17: Credential 'network.hosts' not specified, skipping line.
/usr/lib/tmpfiles.d/provision.conf:22: Credential 'ssh.authorized_keys.root' not specified, skipping line.
/usr/lib/tmpfiles.d/systemd.conf:43: Copy source path '/.extra/tpm2-pcr-signature.json' does not exist, skipping line.
/usr/lib/tmpfiles.d/systemd.conf:44: Copy source path '/.extra/tpm2-pcr-public-key.pem' does not exist, skipping line.

Downgrade to debug level
2022-10-29 05:29:47 +09:00
Yu Watanabe
f5a0162d20 install: process all Wants= symlinks even if some of them fail
Follow-up for 94e7298d30.

Fixes CID#1499992.
2022-10-28 14:36:53 +02:00
Yu Watanabe
ee3cbfdbbc test-network: rewrite wait-online address family tests
Fixes #25154.
2022-10-28 12:26:52 +02:00
Luca Boccassi
60e9a39ac7
Merge pull request #25164 from yuwata/network-route-table-0
network: fix handling of route table 0
2022-10-28 11:23:26 +02:00