Commit graph

60739 commits

Author SHA1 Message Date
Frantisek Sumsal 23f3a6f5ff test: further extend systemctl's sanity coverage
Also, fix a race condition introduced by d16684fe13:
```
[   16.904218] H testsuite-26.sh[394]: + systemd-run --unit failed.service /bin/false
[   16.964783] H systemd[845]: failed.service: Executing: /bin/false
[   16.965062] H systemd[1]: Started failed.service.
[   16.965462] H testsuite-26.sh[844]: Running as unit: failed.service
[   16.966390] H testsuite-26.sh[394]: + systemctl is-failed failed.service
[   16.977970] H testsuite-26.sh[846]: active
[   16.978403] H systemd[1]: failed.service: Main process exited, code=exited, status=1/FAILURE
[   16.978478] H systemd[1]: failed.service: Failed with result 'exit-code'.
```
2022-11-02 18:26:27 +01:00
Frantisek Sumsal 1ca1bb03de man: use the correct 'Markers' property name for marking units
Follow-up to c9615f7352 and 70666e28a1.
2022-11-02 14:36:51 +01:00
Yu Watanabe a12ba535fa core: fix memleak in GetUnitFileLinks method 2022-11-02 09:09:48 +09:00
Yu Watanabe 005fdee2dd
Merge pull request #25229 from mrc0mmand/extend-coverage
test: extend the sanity coverage a bit
2022-11-02 08:24:38 +09:00
Yu Watanabe fcd7998880 test-network: wait for bound interface to be processed by udevd
If another bound interface (dummy98) will be removed before that dummy99
is processed by udevd, then removing dummy98 in the next step makes the
target interface (test1) bring down.

Follow-up for 3e2f7c46da.
2022-11-02 08:24:01 +09:00
Luca Boccassi 729a492881 docs: DPS and BLS have moved to uapi-group.org 2022-11-02 07:31:18 +09:00
Jörg Thalheim 16a42b84cf update credentials when reloading a service
Many long-running services will reload configuration and therefore
credentials on reload. Therefore its useful if a service reload will
also update credentials.

Tested in https://github.com/numtide/systemd-vaultd/pull/12
2022-11-01 22:57:41 +01:00
Frantisek Sumsal d16684fe13 test: add a couple of sanity tests for systemctl 2022-11-01 22:15:24 +01:00
Luca Boccassi 2f23762451
Merge pull request #25192 from yuwata/wait-online-altname
wait-online: support alternative interface names
2022-11-01 18:31:08 +01:00
Frantisek Sumsal c5c258ae0a test: rename TEST-26-SETENV to TEST-26-SYSTEMCTL 2022-11-01 17:53:42 +01:00
Frantisek Sumsal 70e9066bc2 test: add a couple of sanity tests for loginctl 2022-11-01 17:32:17 +01:00
Daan De Meyer 1c265fcd59 namespace: Add hidepid/subset support check
Using fsopen()/fsconfig(), we can check if hidepid/subset are supported to
avoid the noisy logs from the kernel if they aren't supported. This works
on centos/redhat 8 as well since they've backported fsopen()/fsconfig().
2022-11-01 16:12:58 +01:00
Daan De Meyer 300bba79c2 condition: Check that subsystem is enabled in ConditionSecurity=tpm2
Instead of succeeding when either the firmware reports a TPM device
or we find a TPM device, let's check that the firmware reports a TPM
device and the TPM subsystem is enabled in the kernel.

To check whether the subsystem enabled, we check if the relevant
subdirectory in /sys exists at all.
2022-11-01 14:50:47 +01:00
Yu Watanabe d8746f1620 test-network: explicitly prepare default.link
On CentOS CI (Arch), 99-default.link is masked. Let's explicitly provide
the same .link file with a different prefix number.
2022-11-01 22:38:37 +09:00
Yu Watanabe b95d35b5ed test-network: resolve interface name from alternative name 2022-11-01 22:38:37 +09:00
Yu Watanabe d7ff72ec9c test-network: fix use of undeclared variable 2022-11-01 22:38:37 +09:00
Yu Watanabe dee6c26f3e test-network: make link_exists() support alternative names 2022-11-01 22:38:37 +09:00
Yu Watanabe 2368ff812d network: update comment 2022-11-01 22:38:33 +09:00
Yu Watanabe 8f7220fc5e wait-online: support alternative names 2022-11-01 22:37:59 +09:00
Yu Watanabe 0d7e58038e wait-online: check received interface name 2022-11-01 22:37:08 +09:00
dependabot[bot] cd00185881 build(deps): bump github/codeql-action from 2.1.17 to 2.1.29
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.17 to 2.1.29.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2.1.17...ec3cf9c605b848da5f1e41e8452719eb1ccfb9a6)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-01 11:20:30 +00:00
dependabot[bot] 65444c9cba build(deps): bump meson from 0.63.2 to 0.63.3 in /.github/workflows
Bumps [meson](https://github.com/mesonbuild/meson) from 0.63.2 to 0.63.3.
- [Release notes](https://github.com/mesonbuild/meson/releases)
- [Commits](https://github.com/mesonbuild/meson/compare/0.63.2...0.63.3)

---
updated-dependencies:
- dependency-name: meson
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-01 11:19:52 +00:00
Yu Watanabe a39a9ac806 network: forcibly reconfigure all interfaces after sleep
Previously, interfaces are partially reconfigured in a spurious way.
Let's use the same way as `networkctl reconfigure`.

Hopefully fixes #14987 and #24997.
2022-11-01 11:47:33 +01:00
Yu Watanabe 3e2f7c46da test-network: add a testcase that all bound interfaces removed
Closes #4202.
2022-11-01 10:28:57 +00:00
dependabot[bot] a61119e299 build(deps): bump systemd/mkosi
Bumps [systemd/mkosi](https://github.com/systemd/mkosi) from 792cbc60eb2dc4a58d66bb3c212bf92f8d50f6ea to 14. This release includes the previously tagged commit.
- [Release notes](https://github.com/systemd/mkosi/releases)
- [Changelog](https://github.com/systemd/mkosi/blob/main/NEWS.md)
- [Commits](792cbc60eb...c9772ec920)

---
updated-dependencies:
- dependency-name: systemd/mkosi
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-01 10:26:17 +00:00
dependabot[bot] ed770fc10a build(deps): bump ossf/scorecard-action from 2.0.4 to 2.0.6
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.0.4 to 2.0.6.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](e363bfca00...99c53751e0)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-01 10:25:31 +00:00
Jan Janssen 0bab5534b3 coverage: Mark _coverage__exit as noreturn
../src/basic/coverage.h:15:48: warning: function '_coverage__exit' could
be declared with attribute 'noreturn' [-Wmissing-noreturn]
2022-11-01 10:23:50 +00:00
Youfu Zhang 2ab0042854 resolved: fix typo in feature level table 2022-11-01 16:23:54 +09:00
Yu Watanabe b438f59c7d
Merge pull request #25206 from p-fpv/main
hwdb: Add Lenovo G580
2022-11-01 16:23:09 +09:00
p-fpv f1c73e5b82 hwdb: Add Lenovo G580
Fixes #23066.
2022-11-01 13:13:13 +09:00
Yu Watanabe f0b75cda5a parse_hwdb: allow negative value for EVDEV_ABS_ properties 2022-11-01 13:10:20 +09:00
Yu Watanabe 2401f920f3 wait-online: split out link_update_name()
No functional changes, just refactoring and preparation for later
commits.
2022-11-01 11:35:27 +09:00
Yu Watanabe e53f43fee8 wait-online: ignore one more error in callback function 2022-11-01 11:35:27 +09:00
Luca Boccassi 40851a231d
Merge pull request #25207 from bluca/typo
Typo in manpage, missing +x
2022-10-31 23:12:21 +01:00
Luca Boccassi fb4f7271d9 test: add +x to assert.sh
The script has a shebang and .sh extension, so make it executable

W: systemd-tests: script-not-executable [usr/lib/systemd/tests/testdata/units/assert.sh]
2022-10-31 21:18:53 +00:00
Luca Boccassi 84033dd405 man: fix typo found by Lintian 2022-10-31 21:17:47 +00:00
Luca Boccassi 0be7f1936c
Merge pull request #25143 from yuwata/network-reconfigure-interface-when-renamed
network: reconfigure interface when renamed
2022-10-31 21:14:24 +01:00
Yu Watanabe 9f913d37a0 network: skip to reassign master ifindex if already set
Otherwise, the slave interface may go down, especially when the master
is bond.

Fixes #25067.
2022-10-31 21:13:49 +01:00
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