Commit graph

68884 commits

Author SHA1 Message Date
Frantisek Sumsal 04dc383b40 packit: run tests on Fedora Rawhide via Testing Farm
Let's utilize the full power of Packit and run some tests with the just
built RPMs. This makes use of the Fedora infrastructure provided by
the Testing Farm project [0][1].

With the current configuration, the `tests` job runs tests from the
Fedora tests repository [2] in a very similar fashion like Ubuntu CI
does, just with different metadata all around it. ATTOW there are only
two tests, which are wrappers around unit tests and integration tests;
the latter one currently runs only nspawn-based tests, since there's no
KVM on the test VMs, and, for now, I'd like to see how well the infra is
going to manage our upstream traffic and how stable the whole thing is
end up being before increasing the work load.

[0] https://docs.testing-farm.io/Testing%20Farm/0.1/index.html
[1] https://packit.dev/docs/configuration/upstream/tests
[2] https://src.fedoraproject.org/tests/systemd
2023-11-20 21:45:59 +01:00
Frantisek Sumsal f258a76332 test: don't use ddebug() before it's defined
I'm pretty sure this is not the only case, but it's the one I recently
noticed. Even though we call ddebug() from a function, that function is
called before ddebug() is defined, resulting in the same issue as if we
called just ddebug() in its place, i.e.:

..//test-functions: line 276: ddebug: command not found
2023-11-20 21:26:17 +01:00
Frantisek Sumsal 6162caa288 test: move a couple of binaries to the BASICTOOLS array
As they're not optional.
2023-11-20 21:26:14 +01:00
Frantisek Sumsal 8ddbd9e078 test: support NO_BUILD=yes on Fedora 2023-11-20 21:26:11 +01:00
Frantisek Sumsal b54bc139ae test: make the LOOKS_LIKE_* variables proper booleans 2023-11-20 21:26:08 +01:00
Luca Boccassi 514c70eb52 test-condition: skip group test during Debian package build
The group names won't match in a package build chroot and the test might
fail, skip it.

https://buildd.debian.org/status/fetch.php?pkg=systemd&arch=hppa&ver=255%7Erc2-2&stamp=1700424353&raw=0
2023-11-20 10:51:42 +00:00
onenowy a3f5976ded hwdb: add Predator PHN16-71
enable microphone mute, predator sense button and fix the keyboard backlight up button changes display brightness.
2023-11-19 12:39:59 +00:00
Yu Watanabe 4bf4b439b2
Merge pull request #30070 from weblate/weblate-systemd-master
Translations update from Fedora Weblate
2023-11-18 22:59:20 +09:00
Yu Watanabe fbf946ce22 network/dhcp: actually refuse to assign DHCP option when an invalid string is passed
Prompted by #30029.
2023-11-18 11:19:17 +00:00
Luca Boccassi 67df554047
Merge pull request #30078 from yuwata/test-setup-logging
test: call test_setup_logging()
2023-11-18 11:18:22 +00:00
Charles Lee 32bf76c50c po: Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 100.0% (227 of 227 strings)

Co-authored-by: Charles Lee <lchopn@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/zh_CN/
Translation: systemd/main
2023-11-18 12:18:18 +01:00
Weblate e5c6aa7230 po: Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/
Translation: systemd/main
2023-11-18 12:18:18 +01:00
Charles Lee 36552cacce po: Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 100.0% (227 of 227 strings)

Co-authored-by: Charles Lee <lchopn@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/zh_CN/
Translation: systemd/main
2023-11-18 12:18:18 +01:00
Yu Watanabe 5acea42501 fuzz: always call fuzz_setup_logging() 2023-11-18 03:04:27 +09:00
Yu Watanabe 965040d811 test: always call test_setup_logging() 2023-11-18 03:04:27 +09:00
Luca Boccassi 48bfc6791d mkosi ci: enable jammy-proposed
This will bring in the fix for rawhide/tumbleweed builds (new libsolv
capable of handling zstd). If all goes well it will migrate to jammy
proper in a week and it can be reverted
2023-11-17 14:14:18 +00:00
Christian Hesse 111df871ee NEWS: drop duplicate 'of' 2023-11-17 21:55:32 +09:00
Luca Boccassi 41113e1c10
Merge pull request #30064 from bluca/unbork_direct_io
loop-util: restart loop_configure and reopen FD when O_DIRECT fails
2023-11-17 09:40:09 +00:00
Luca Boccassi 91b3e889ed
Merge pull request #30066 from bluca/test
fsck/shell test fixes
2023-11-17 09:39:48 +00:00
Luca Boccassi dcddb2fc6b test: avoid asserting on default user shell
In some build environments it might differ:

/* test_get_user_creds_one("root", "root", 0, 0, "/root", "/usr/bin/bash") */
got "root", 0, 0, "/root", "/bin/sh": Success
Assertion 'path_equal(rshell, shell)' failed at src/test/test-user-util.c:345, function test_get_user_creds_one(). Aborting.

https://buildd.debian.org/status/fetch.php?pkg=systemd&arch=alpha&ver=255%7Erc2-1&stamp=1700147880&raw=0
2023-11-16 23:17:31 +00:00
Luca Boccassi 210dcd8fc6 test: minix fsck not found on alpha
It seems even this one is not everywhere, so relax the test:

/* test_fsck_exists */
Assertion 'fsck_exists_for_fstype("minix") == 1' failed at src/test/test-path-util.c:624, function test_fsck_exists(). Aborting.

https://buildd.debian.org/status/fetch.php?pkg=systemd&arch=alpha&ver=255%7Erc2-1&stamp=1700147880&raw=0
2023-11-16 23:01:46 +00:00
Luca Boccassi d579c42e9d loop-util: use the right error variable in log_debug_errno after fd_reopen 2023-11-16 21:13:10 +00:00
Luca Boccassi f5bb0a3163 loop-util: restart loop_configure and reopen FD when O_DIRECT fails
On kernel 5.10.178, when a squashfs file is stored on an EXT4 filesystem
backed by a dm-crypt volume, dissecting fails:

$ SYSTEMD_LOG_LEVEL=debug systemd-dissect /var/foo/bar.raw
Opened '/var/foo/bar.raw' in O_RDONLY access mode, with O_DIRECT enabled.
Couldn't find any partition table to derive sector size of.
loop2: Acquired exclusive lock.
Could not enable direct IO mode, proceeding in buffered IO mode.
Successfully acquired /dev/loop2, devno=7:2, nr=2, diskseq=87
Opened /dev/loop2 (fd=3, whole_block_devnum=7:2, diskseq=87).
      Name: bar.raw
      Size: 67.2M
 Sec. Size: 512
     Arch.: n/a

Successfully forked off '(sd-dissect)' as PID 4110.
Mounting /proc/self/fd/3 (squashfs) on /tmp/dissect-Zk3K5F (MS_RDONLY|MS_NODEV "")...
Failed to mount /proc/self/fd/3 (type squashfs) on /tmp/dissect-Zk3K5F (MS_RDONLY|MS_NODEV ""): Input/output error
Failed to mount dissected image: Input/output error
Failed to read /etc/hostname of image: No such file or directory
/etc/machine-id file of image is empty.
Failed to read has-init-system boolean: Input/output error
(sd-dissect) failed with exit status 1.
Failed to acquire image metadata: Input/output error

The kernel shows I/O errors:

kernel: blk_update_request: I/O error, dev loop2, sector 0 op 0x0:(READ) flags 0x800 phys_seg 1 prio class 0
kernel: SQUASHFS error: Failed to read block 0x0: -5
kernel: unable to read squashfs_super_block

This is independent of a particular filesystem and can be reproduced
reliably in my setup, starting from freshly formatted disks.

Instead of continuing when O_DIRECT fails, start over the setup
process without the flag, including opening a new FD, to make the
kernel happy.
2023-11-16 21:12:40 +00:00
Luca Boccassi 905dd9d6e6
Merge pull request #30055 from YHNdnzj/logind-handle-action
logind-action: several cleanups
2023-11-16 16:04:37 +00:00
Lennart Poettering face0d0efa update TODO 2023-11-16 13:46:55 +01:00
Lennart Poettering 3c28ebace0 update TODO 2023-11-16 13:34:25 +01:00
Frantisek Sumsal f1e02423a9 login: mark the TTY property as "emits change"
Triggered by the SetTTY() method.

Follow-up to 092e6cd19a.
Addresses: https://github.com/systemd/systemd/pull/30043#pullrequestreview-1733628935
2023-11-16 11:26:26 +00:00
Luca Boccassi 9037ebf991
Merge pull request #30052 from dtardon/udev-fixes
Two small udev fixes
2023-11-16 11:25:24 +00:00
Mike Yuan 99416b6d4e
logind-action: check if inhibit_what is valid
Fixes #30037
2023-11-16 17:49:33 +08:00
Mike Yuan febe81313e
logind-inhibit: introduce inhibit_what_is_valid 2023-11-16 17:49:33 +08:00
Mike Yuan ddd0c2be81
logind-action: split out logic for handle_action_sleep
Preparation for #29853
2023-11-16 17:49:33 +08:00
Mike Yuan 51eeeb7bde
logind: return "no" if sleep operation is disabled
According to org.freedesktop.login1:

> If "na" is returned, the operation is not available because
> hardware, kernel, or drivers do not support it. If "yes" is
> returned, the operation is supported and the user may execute
> the operation without further authentication. If "no" is returned,
> the operation is available but the user is not allowed to execute
> the operation.

Therefore, we should return "no" if sleep is explicitly disabled,
otherwise we return "na".
2023-11-16 17:49:33 +08:00
Mike Yuan 15b5bb6262
TODO: remove an already implemented entry
Follow-up for #23640
2023-11-16 17:49:32 +08:00
Yo-Jung Lin eb8258c1bc hwdb: Mark Dell platform accel sensor location to base
Dell would like to disable screen rotation for the platform eternally.
Mark the aceel sensor location base to disable it.
2023-11-16 09:36:38 +00:00
Luca Boccassi fd13d32ba7
Merge pull request #30047 from yuwata/sd-bus-assert-return
sd-bus: several fixlets found by making assert_return() critical
2023-11-16 09:34:31 +00:00
Yu Watanabe 25ac30bdb8 log: rename variables to store function call results 2023-11-16 09:21:10 +00:00
David Tardon 3afe909b75 udev-manager: fix log message 2023-11-16 10:16:11 +01:00
David Tardon 08d5c74a01 test: read from the right device 2023-11-16 10:16:11 +01:00
Yu Watanabe ebfbc5b9d8
Merge pull request #30043 from mrc0mmand/more-assert_return
More `assert_return()` shenanigans
2023-11-16 11:28:33 +09:00
Yu Watanabe 335185f1f2
Merge pull request #30045 from poettering/discover-image-tweaklets
discover-image: tiny tweaklets
2023-11-16 11:28:04 +09:00
Yu Watanabe 4d8b8f79d0
Merge pull request #30044 from poettering/dissect-tool-tweaklets
systemd-dissect --discover tweaklets
2023-11-16 11:27:47 +09:00
Luca Boccassi 461ef3981f sd-dhcp: use CMSG_FIND_AND_COPY_DATA to avoid build failures on x32 architectures
On architectures where timeval is 64bit but size_t is 32bit
we have to use CMSG_FIND_AND_COPY_DATA. This affects x32 and riscv32.

Follow-up for 905d0ea7b0
2023-11-16 11:26:57 +09:00
Yu Watanabe 69f1c33425 test: sd_bus_process() may assign NULL even if it returns positive
Let's not trigger assert_return() needlessly.

Prompted by #30029.
2023-11-16 09:35:44 +09:00
Yu Watanabe ce5a6d5307 test: several cleanups for test-bus-chat
- use sd_bus_query_sender_creds() to retrieve credentials,
- read credentials only when we get credentials, to avoid triggering
  assert_return(),
- downgrade log level of expected failure, and update log message about
  unexpected success.

Prompted by #30029.
2023-11-16 09:35:44 +09:00
Yu Watanabe 02dd646b16 sd-bus: drop SD_BUS_CREDS_AUGMENT flag
On checking if the message has enough credentials, the special flag
needs to be dropped.

Fixes a bug introduced by 705a415f68.
2023-11-16 09:35:44 +09:00
Yu Watanabe 22185cb71e sd-bus: insert missing space 2023-11-16 09:35:44 +09:00
Lennart Poettering 5df1a5538b discover-image: use TAKE_PTR() where appropriate 2023-11-15 22:53:35 +01:00
Lennart Poettering 25cdbd0428 discover-image: reindent string table 2023-11-15 22:53:35 +01:00
Lennart Poettering ba113008de dissect: set dash as ersatz string 2023-11-15 22:51:37 +01:00
Lennart Poettering 8f488d4634 dissect: right-align size column in --discover table 2023-11-15 22:51:37 +01:00