Commit Graph

75458 Commits

Author SHA1 Message Date
Mike Yuan
3a497fbff5 advanced-issue-labeler: use correct label for env-generator 2024-08-02 21:45:18 +02:00
jauge-technica
82f2a2f032 Added support for L2 BridgeMDB entries (#32894)
* Added support for L2 BridgeMDB entries
2024-08-02 16:31:20 +01:00
Frantisek Sumsal
4d1fbe53c1 test: don't use /skipped for subtests
Since, at least the old framework, checks for the presence of the file
at the end and marks the whole test as skipped if it exists.

Resolves: systemd/systemd-centos-ci#728
2024-08-02 16:44:25 +02:00
Yu Watanabe
40d90c9c01 localectl: introduce -l/--full option
Closes #33906.
2024-08-02 09:33:46 +02:00
Yu Watanabe
44557e03d8 Merge pull request #33032 from yuwata/sd-device-monitor-low-level-api
sd-device-monitor: expose low-level functions
2024-08-02 12:41:53 +09:00
Yu Watanabe
76459af531 Merge pull request #33876 from dbnicholson/firstboot-root-creds-only
firstboot: fix root params with creds and prompting disabled
2024-08-02 11:37:05 +09:00
Ronan Pigott
ddd710a355 resolved: don't treat conn reset as packet loss
tcp reset / icmp port-unreachable are markedly different conditions than
packet loss. It doesn't make much sense to retry in this case. It's
actually not clear if there is any benefit at all retrying tcp
connections, which were presumably already retried as necessary by the
tcp stack.
2024-08-02 11:29:25 +09:00
Yu Watanabe
0bc6fde08a test: add test case for restarting device monitor 2024-08-02 11:22:24 +09:00
Yu Watanabe
9d37cf28a3 sd-device-monitor: rename device_monitor_send_device() -> device_monitor_send() 2024-08-02 11:22:24 +09:00
Yu Watanabe
bab889c51e sd-device-monitor: expose low-level functions
To make it work without sd-event.

Prompted by recent chat:
> Hey all!
> reading man libudev, it says to use sd-device instead now. I've read that
> APIs header file and it seems it no longer has an equivalent to libudev's
> udev_monitor_get_fd, which AFAICT means I have to use sd-event to watch
> for events I'm interested in. I know I can "embed" sd-event in other event
> loops I might already have, but that seems overkill when I'm only interested
> in this one type of event and don't need sd-event for anything else.
2024-08-02 11:22:24 +09:00
Yu Watanabe
d3fa16131e sd-device-monitor: make device_monitor_receive_device() always initialize ret on success 2024-08-02 11:22:07 +09:00
Yu Watanabe
67825de267 sd-device-monitor: remove device_monitor_disconnect()
It is not necessary to be exposed anymore.
2024-08-02 11:16:33 +09:00
Yu Watanabe
98ca8eac11 udev: manage only socket address of device monitor
Previously, the main process of systemd-udevd manages worker process
with their sd_device_monitor object to save the destination address.
Let's save only destination address, and drop worker's sd_device_monitor
object.
2024-08-02 11:16:33 +09:00
Yu Watanabe
7abc0201d0 sd-device-monitor: introduce device_monitor_get_address()
Currently it is used internally, but will be used later at other places.
2024-08-02 11:16:33 +09:00
Yu Watanabe
1f267e77ed sd-device: allow to restart device monitor
Previously, sd_device_monitor_stop() closes socket, hence we cannot
restart monitoring unless recreating sd_device_monitor object.
Let's allow to restart monitor by sd_device_monitor_start().
2024-08-02 11:16:33 +09:00
Yu Watanabe
ece1e280ee sd-device-monitor: introduce sd_device_monitor_is_running() 2024-08-02 11:16:33 +09:00
Yu Watanabe
f49faf0562 sd-device-monitor: bind socket in device_monitor_new_full()
Previously, device_monitor_enable_receiving() does
- update filter,
- bind socket.

But, binding socket can be done in when the socket is opened.
Let's remove device_monitor_enable_receiving() and bind the socket in
device_monitor_new_full().
2024-08-02 11:16:33 +09:00
Yu Watanabe
bf1283c1fb sd-device-monitor: replace -1 with -EBADF 2024-08-02 11:16:33 +09:00
Yu Watanabe
0403221a2a test: modernize test-sd-device-monitor.c 2024-08-02 11:16:33 +09:00
Yu Watanabe
029709f932 socket-util: introduce netlink_socket_get_multicast_groups()
No functional change. Preparation for later commits.
2024-08-02 11:16:33 +09:00
Luca Boccassi
b51b12af8d Merge pull request #33904 from bluca/os_release_type
os-release: change RELEASE_TYPE value from 'pre-release' to 'development' and break into paragraphs
2024-08-01 23:29:37 +02:00
Luca Boccassi
3d689b675b os-release: break RELEASE_TYPE into paragraphs and clarify about rolling stable releases
Arch and Tumbleweed do not do EOLs but are still stable, so clarify the paragraph.
Also break the entry in paragraphs, to make it more readable when rendered.
2024-08-01 20:59:20 +01:00
Luca Boccassi
67f90b0d85 os-release: change RELEASE_TYPE value from 'pre-release' to 'development'
The point was made on https://lists.debian.org/debian-ctte/2024/08/msg00005.html
that 'pre-release sounds' like an RC candidate, ie, something that will change
very slightly in the released version. But this is not necessarily the case
for example at the beginnig of a Fedora Rawhide or Debian Testing release cycle,
so change it to a more generic 'development'

Follow-up for 7102dc52e6
2024-08-01 20:36:02 +01:00
Luca Boccassi
62bfb79b61 Merge pull request #33893 from yuwata/coverity
tree-wide: resolve several issues found by coverity
2024-08-01 20:33:53 +02:00
Luca Boccassi
98c2cb186b Merge pull request #32988 from AdrianVovk/os-release-prerelease
os-release: Add RELEASE_TYPE=
2024-08-01 18:56:15 +02:00
Adrian Vovk
d25a9bfa8f os-release: Introduce experiment RELEASE_TYPE
This is for experimental builds of the OS made to test some specific WIP
feature.

For example, let's say the distro in question is Asahi Linux and Apple
just released the M3 SoC. The Asahi developers will start porting to the
M3, and will quickly generate builds of Asahi Linux that can technically
boot but aren't ready for any kind of daily use. These images are marked
as experimental, and can be shared among the developers. If a user
somehow stumbles upon one of these images and tries to install it,
they'll be warned that they're about to install an experimental Apple M3
port of Asahi Linux. Eventually, once the Asahi developers think that
their M3 port is ready for a wider audience, they can merge it into the
mainline Asahi repos, where it will be distributed through the usual
nightly CI builds (where RELEASE_TYPE=pre-release; M3 support is no
longer experimental).
2024-08-01 17:22:23 +01:00
Adrian Vovk
7102dc52e6 os-release: Add RELEASE_TYPE=
This will allow GUIs to customize their behavior a little based on the
type of release.

For example, an OS installer may display a warning/disclaimer if
RELEASE_TYPE=prerelease. The software updates app might be a bit more
insistent about upgrading to the next major release if
RELEASE_TYPE=stable than if RELEASE_TYPE=lts
2024-08-01 17:22:13 +01:00
Yu Watanabe
f7012a93a7 import: check overflow
Fixes CID#1548022 and CID#1548075.
2024-08-01 22:45:53 +09:00
Yu Watanabe
fea2f92d8d test: use ASSERT_OK_ERRNO() for setenv() and unsetenv() 2024-08-01 22:42:08 +09:00
Yu Watanabe
6141fe925a test: resolve "Unchecked return value" coverity warning
Follow-up for c8210d98a4.
Fixes CID#1548920.
2024-08-01 22:42:08 +09:00
Yu Watanabe
a30ac8d52c vmspawn: check overflow earlier
Follow-up for 862c68a914.
Fixes CID#1550749.
2024-08-01 22:42:08 +09:00
Yu Watanabe
96bf7e1f3b test: resolve "Unchecked return value" coverity warning
Follow-up for 5fef5552a6.
Fixes CID#1558540.
2024-08-01 22:42:08 +09:00
Yu Watanabe
dc7607f687 test: resolve "Unchecked return value" coverity warning
Follow-up for 8c57700b6b.
Fixes CID#1558539.
2024-08-01 22:42:08 +09:00
Frantisek Sumsal
ce2344bbee test: attempt to install sshd-session from multiple places
On Fedora the sshd-session binary is under /usr/libexec/openssh/ so
cover this path as well in the old framework.

Follow-up for aaa7b36bd1.
2024-08-01 15:02:34 +02:00
dependabot[bot]
89322b8c09 build(deps): bump github/codeql-action from 3.25.11 to 3.25.15
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.11 to 3.25.15.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](b611370bb5...afb54ba388)

---
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>
2024-08-01 13:36:40 +02:00
dependabot[bot]
73eb21703e build(deps): bump meson from 1.4.1 to 1.5.1 in /.github/workflows
Bumps [meson](https://github.com/mesonbuild/meson) from 1.4.1 to 1.5.1.
- [Release notes](https://github.com/mesonbuild/meson/releases)
- [Commits](https://github.com/mesonbuild/meson/compare/1.4.1...1.5.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 13:34:28 +02:00
dependabot[bot]
5186b40c6f build(deps): bump systemd/mkosi
Bumps [systemd/mkosi](https://github.com/systemd/mkosi) from 4eba736412c702bbbe2c6d4a58a92fa977219249 to 63fc1fde5b1aac1abf07ac499068c2b62263dafb.
- [Release notes](https://github.com/systemd/mkosi/releases)
- [Changelog](https://github.com/systemd/mkosi/blob/main/NEWS.md)
- [Commits](4eba736412...63fc1fde5b)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 13:34:09 +02:00
dependabot[bot]
1d8de1d5ac build(deps): bump redhat-plumbers-in-action/differential-shellcheck
Bumps [redhat-plumbers-in-action/differential-shellcheck](https://github.com/redhat-plumbers-in-action/differential-shellcheck) from 5.3.0 to 5.4.0.
- [Release notes](https://github.com/redhat-plumbers-in-action/differential-shellcheck/releases)
- [Changelog](https://github.com/redhat-plumbers-in-action/differential-shellcheck/blob/main/docs/CHANGELOG.md)
- [Commits](60c9f2b924...cc6721c45a)

---
updated-dependencies:
- dependency-name: redhat-plumbers-in-action/differential-shellcheck
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 13:09:16 +02:00
dependabot[bot]
e2dca8d9c0 build(deps): bump ossf/scorecard-action from 2.3.3 to 2.4.0
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.3.3 to 2.4.0.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](dc50aa9510...62b2cac7ed)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 13:08:42 +02:00
Yu Watanabe
a8bc75089d journalctl: fix compile error on i386
Fixes the following error:
===
In file included from ../src/basic/macro.h:13,
                 from ../src/basic/dirent-util.h:8,
                 from ../src/journal/journalctl-misc.c:3:
../src/journal/journalctl-misc.c: In function 'show_log_ids':
../src/journal/journalctl-misc.c:107:22: error: comparison is always true due to limited range of data type [-Werror=type-limits]
  107 |         assert(n_ids < INT64_MAX);
      |                      ^
../src/fundamental/macro-fundamental.h:70:44: note: in definition of macro '_unlikely_'
   70 | #define _unlikely_(x) (__builtin_expect(!!(x), 0))
      |                                            ^
../src/basic/macro.h:165:22: note: in expansion of macro 'assert_message_se'
  165 | #define assert(expr) assert_message_se(expr, #expr)
      |                      ^~~~~~~~~~~~~~~~~
../src/journal/journalctl-misc.c:107:9: note: in expansion of macro 'assert'
  107 |         assert(n_ids < INT64_MAX);
      |         ^~~~~~
cc1: all warnings being treated as errors
===

Follow-up for 0a8c1f6212.
2024-08-01 10:49:40 +02:00
Yu Watanabe
12a12c5af5 Merge pull request #33888 from YHNdnzj/followups
core: a few follow-ups for recent PRs
2024-08-01 11:35:13 +09:00
Yu Watanabe
89cf6f0b0a Merge pull request #32448 from yuwata/journalctl-current-invocation
journalctl: introduce --list-invocations, -I, --invocation= options
2024-08-01 11:33:20 +09:00
Yu Watanabe
b1b30d0226 test: add test for journalctl --list-invocations and --invocation= 2024-08-01 07:31:44 +09:00
Yu Watanabe
7d3ae6b213 journalctl: add --list-invocations command and -I/--invocation options
The --list-invocations command is similar to --list-boots, but shows
invocation IDs of specified unit. This should be useful when showing
a specific invocation of a unit.

The --invocation option is similar to --boot, but takes a invocation ID
or an offset. The -I option is equivalent to --invocation=0.
2024-08-01 07:31:44 +09:00
Yu Watanabe
82721be7d6 logs-show: extend journal_get_boots() and friends to find invocation IDs
Currently the extended features are not used, but will be used later.
2024-08-01 07:31:44 +09:00
Yu Watanabe
1a997cb732 logs-show: introduce several helper functions
Currently these are not used, but will be used later.
2024-08-01 07:31:44 +09:00
Yu Watanabe
0a8c1f6212 use int64_t for index in show_log_ids() 2024-08-01 07:31:44 +09:00
Yu Watanabe
b3a16f3985 journalctl: split out show_log_ids() from action_list_boots()
No functional change, just refactoring and prepraration for later change.
2024-08-01 07:31:44 +09:00
Yu Watanabe
a581a2ce8d journalctl: update log messages 2024-08-01 07:31:44 +09:00
Yu Watanabe
6ecee6cf2b logs-show: rename BootId -> LogId
The struct itself is generic, and can be used for other ID.
Let's rename it to more generic one.
No functional change, just refactoring and preparation for later
commits.
2024-08-01 07:31:44 +09:00