summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | ukify: support pesign as alternative to sbsignEmanuele Giuseppe Esposito2023-05-102-48/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sbsign is not available everywhere, for example RHEL does not have it. Add pesign as alternative to it. pesign will use options "--secureboot-certificate-name" (mandatory) and "--secureboot-certificate-dir" (optional), while sbsign will use "--secureboot-private-key" and "--secureboot-certificate". By default, use sbsign. If no key/cert is provided or sbsign is not found, try pesign. Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
| * | ukify: typo in doc and print when package is missingEmanuele Giuseppe Esposito2023-05-102-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a package is missing, a subprocess is started with None as command argument. Error raised by subprocess is therefore not helpful at all to understand what needs to be done to fix that error. Also fix doc since systemd-stub will look for .cmdline files, and not .cmdline.efi files. Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
* | | Merge pull request #27596 from yuwata/drop-pureYu Watanabe2023-05-114-13/+15
|\ \ \ | | | | | | | | drop two more inappropriate _pure_ attributes and several cleanups
| * | | core: replace hashmap_get() with hashmap_contains() where appropriateYu Watanabe2023-05-101-4/+4
| | | |
| * | | core: drop unused argumentYu Watanabe2023-05-101-5/+3
| | | |
| * | | core: several cleanups for job_get_timeout()Yu Watanabe2023-05-102-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | - add missing assertion, - rename the argument for storing result, - always initialize result on success.
| * | | tree-wide: drop _pure_ attribute from non-pure functionsYu Watanabe2023-05-102-2/+2
| | | | | | | | | | | | | | | | | | | | Prompted by #27595. Follow-ups for 6723c28f36ea566faf61d3610012cd89f95ee4a0.
* | | | Merge pull request #27603 from mrc0mmand/more-test-shenanigansYu Watanabe2023-05-1170-464/+415
|\ \ \ \ | | | | | | | | | | test: merge PID1-related tests into TEST-07-PID1
| * | | | test: abstract the common test parts into a utility scriptFrantisek Sumsal2023-05-107-73/+150
| | | | | | | | | | | | | | | | | | | | | | | | | Also, instead of bailing out on the first failed subtest, always run all subtests and print a summary at the end (with an appropriate exit code).
| * | | | test: merge TEST-20-MAINPIDGAMES into TEST-07-PID1Frantisek Sumsal2023-05-105-46/+39
| | | | |
| * | | | test: merge TEST-51-ISSUE-16115 into TEST-07-PID1Frantisek Sumsal2023-05-108-34/+16
| | | | |
| * | | | test: merge TEST-47-ISSUE-14566 into TEST-07-PID1Frantisek Sumsal2023-05-107-45/+32
| | | | |
| * | | | test: move TEST-23's units into a dedicated subfolderFrantisek Sumsal2023-05-1012-0/+1
| | | | | | | | | | | | | | | | | | | | To remain consistent with other tests.
| * | | | test: merge TEST-12-ISSUE-3171 into TEST-07-PID1Frantisek Sumsal2023-05-105-70/+50
| | | | |
| * | | | test: merge TEST-11-ISSUE-3166 into TEST-07-PID1Frantisek Sumsal2023-05-106-34/+16
| | | | |
| * | | | test: merge TEST-10-ISSUE-2467 with TEST-07-PID1Frantisek Sumsal2023-05-108-40/+27
| | | | |
| * | | | test: merge TEST-09-ISSUE-2691 into TEST-07-PID1Frantisek Sumsal2023-05-104-24/+5
| | | | |
| * | | | test: merge TEST-08-ISSUE-2730 into TEST-07-PID1Frantisek Sumsal2023-05-1010-61/+23
| | | | |
| * | | | test: rename TEST-07-ISSUE-1981 to TEST-07-PID1Frantisek Sumsal2023-05-104-33/+52
| |/ / /
* | | | build(deps): bump actions/checkout from 3.3.0 to 3.5.2dependabot[bot]2023-05-1111-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps [actions/checkout](https://github.com/actions/checkout) from 3.3.0 to 3.5.2. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/ac593985615ec2ede58e132d2e21d2b1cbd6127c...8e5e7e5ab8b370d6c329ec480221332ada57f0ab) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
* | | | build(deps): bump meson from 1.0.1 to 1.1.0 in /.github/workflowsdependabot[bot]2023-05-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps [meson](https://github.com/mesonbuild/meson) from 1.0.1 to 1.1.0. - [Release notes](https://github.com/mesonbuild/meson/releases) - [Commits](https://github.com/mesonbuild/meson/compare/1.0.1...1.1.0) --- updated-dependencies: - dependency-name: meson dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
* | | | build(deps): bump actions/upload-artifact from 3.1.1 to 3.1.2dependabot[bot]2023-05-112-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.1 to 3.1.2. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v3.1.1...0b7f8abb1508181956e8e162db84b466c27e18ce) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
* | | | build(deps): bump github/super-linter from 4.10.1 to 5.0.0dependabot[bot]2023-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps [github/super-linter](https://github.com/github/super-linter) from 4.10.1 to 5.0.0. - [Release notes](https://github.com/github/super-linter/releases) - [Changelog](https://github.com/github/super-linter/blob/main/docs/release-process.md) - [Commits](https://github.com/github/super-linter/compare/454ba4482ce2cd0c505bc592e83c06e1e37ade61...45fc0d88288beee4701c62761281edfee85655d7) --- updated-dependencies: - dependency-name: github/super-linter dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
* | | | build(deps): bump actions/github-script from 6.4.0 to 6.4.1dependabot[bot]2023-05-112-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps [actions/github-script](https://github.com/actions/github-script) from 6.4.0 to 6.4.1. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/98814c53be79b1d30f795b907e553d8679345975...d7906e4ad0b1822421a7e6a35d5ca353c962f410) --- updated-dependencies: - dependency-name: actions/github-script dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
* | | | tmpfiles: Add merge support for copy files actionDaan De Meyer2023-05-103-10/+26
| | | | | | | | | | | | | | | | | | | | If '+' is specified with 'C', let's merge the tree with any existing tree.
* | | | repart: Fix deny list logicDaan De Meyer2023-05-102-91/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, we always excluded the top level directories that were covered by child partition mount points, regardless of the source directory and the target directory of the copy files operation. This means that even if we were populating a XBOOTLDR partition, if there was an EFI partition in the image, we'd exclude /boot unconditionally, leading to the XBOOTLDR partition to be empty. Also, because of the same cause, if we were copying a nested source directory (e.g. /abc/def) to the root directory in the root partition, if /abc/def/usr existed and was populated with files and directories, the root partition would have those files under /usr, even if a /usr partition was defined. To fix these issues, instead of unconditionally excluding the top level partition mount points under <source>, let's make sure that when we're copying files from any source directory to the root directory of a root partition, that we exclude the partition mount point directories under the source directory instead of the top level ones.
* | | | udev: do not set ID_PATH and by-path symlink for nvmf disksYu Watanabe2023-05-101-1/+9
|/ / / | | | | | | | | | Prompted by #27391.
* | | dirent: conditionalize dirent assert based on dirent64 existenceSam James2023-05-102-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >=musl-1.2.4 doesn't define dirent64 and its LFS friends as its "native" functions are already LFS-aware. Check for dirent64 in meson.build and only assert if it exists. Bug: https://bugs.gentoo.org/905900 Closes: https://github.com/systemd/systemd/pull/25809
* | | network/tc: rename settings in log messages tooMike Yuan2023-05-101-3/+3
| | | | | | | | | | | | Follow-up for c03ef420fa7157b8d4881636fe72596a06e08bb6
* | | sd-bus: bus_message_type_from_string is not pureXi Ruoyao2023-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC document [1] says: The pure attribute prohibits a function from modifying the state of the program that is observable by means other than inspecting the function’s return value. And there is an example: `int hash (char *) __attribute__ ((pure));` ... Even though hash takes a non-const pointer argument it must not modify the array it points to, ... But we are modifying the object pointed to by the pointer u, which is clearly a violation of the semantic of pure. With -ftrivial-auto-var-init (enabled by -Dmode=release), on some targets (GCC 12.2 on AArch64 and GCC 13.1 on x86_64) performs an optimization: as the variable "u" in bus_match_parse has been zero-initialized (by the -ftrivial-auto-var-init option) and never modified (because a "pure" bus_message_type_from_string is not allowed to modify it), "u" will be always 0. Then 0 is used to initialize .value_u8 field of struct bus_match_component. This then causes a infinite event loop, so "systemctl restart" never stops, and pam_systemd timeouts communicating with logind, etc. So we should remove the "pure" attribute here. Fixes #26395. [1]:https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-pure-function-attribute
* | | Merge pull request #27597 from mrc0mmand/more-test-shenanigansYu Watanabe2023-05-104-138/+151
|\ \ \ | | | | | | | | test: slightly extend systemd-cryptenroll coverage
| * | | test: slightly extend systemd-cryptenroll coverageFrantisek Sumsal2023-05-091-0/+35
| | | |
| * | | cryptenroll: fix an assertion with weak passwordsFrantisek Sumsal2023-05-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Passing 0 to log_xxx_errno() leads to an assertion, so let's not do that: $ NEWPASSWORD="" build-san/systemd-cryptenroll --unlock-key-file=/tmp/password --password "$img" /tmp/password has 0644 mode that is too permissive, please adjust the ownership and access mode. Assertion '(_error) != 0' failed at src/cryptenroll/cryptenroll-password.c:164, function enroll_password(). Aborting. Aborted (core dumped)
| * | | test: TEST-70-TPM2 cleanupFrantisek Sumsal2023-05-091-137/+115
| | | | | | | | | | | | | | | | No functional changes.
| * | | test: add coverage for #27533Frantisek Sumsal2023-05-091-0/+0
| | | | | | | | | | | | | | | | | | | | Issue: https://github.com/systemd/systemd/issues/27533 Fix: https://github.com/systemd/systemd/pull/27553
| * | | test: discard kill's outputFrantisek Sumsal2023-05-091-1/+1
| | | |
* | | | core/mount: replace invalid UTF-8 code points in "what" and "options"Michal Sekletar2023-05-101-6/+29
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, these strings were copied w/o any modification. However, if mount table contained e.g. remote fs mount like NFS or CIFS that was mounted from server running with non UTF-8 locale then those strings might have contained some non UTF-8 characters. If then client asked about status of such mount unit we tried to forward these non UTF-8 strings over D-Bus. That is the violation of the protocol and we ended up kicked from the bus.
* | | test: merge unit file related tests into TEST-23-UNIT-FILEFrantisek Sumsal2023-05-1044-325/+262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename TEST-23-TYPE-EXEC to TEST-23-UNIT-FILE and merge it with following tests: - TEST-37-RUNTIMEDIRECTORYPRESERV - TEST-40-EXEC-COMMAND-EX - TEST-41-ONESHOT-RESTART - TEST-42-EXECSTOPPOST - TEST-57-ONSUCCESS-UPHOLD
* | | units: Add CAP_NET_ADMIN condition to systemd-networkd-wait-online@.service ↵Daan De Meyer2023-05-091-0/+1
| | | | | | | | | | | | | | | | | | | | | as well It was added to CAP_NET_ADMIN but we forgot to add it to the template service as well.
* | | sd-dhcp-client: client ID always has non-zero dataYu Watanabe2023-05-091-1/+1
| | | | | | | | | | | | | | | Follow-up for f04c991a2fbb3531c3b464ed8e6dd7543e521f7a. Fixes CID#1510978.
* | | Merge pull request #27534 from keszybz/deperlifyYu Watanabe2023-05-0921-3008/+2556
|\ \ \ | |_|/ |/| | Rewrite udev-test.pl in Python
| * | mkosi,ci: do not install perlZbigniew Jędrzejewski-Szmek2023-05-094-4/+0
| | |
| * | test: use sed and grep instead of perlZbigniew Jędrzejewski-Szmek2023-05-091-16/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This gets rid of the all-but-one remaining uses of perl. I tested the new code on my machine, so I'm fairly confident that it works as expected. install_iscsi() has one majestic perl invocation, but we can't get rid of it easily: it extends the code of tgt-admin to print some list of files. Obviously this only works because tgt-admin is written in perl, and perl will be installed if tgt-admin is installed. install_iscsi() is used in TEST-64-UDEV-STORAGE conditionally if tgtadm is installed, so this can stay as is.
| * | tools/oss-fuzz: s/perl/awk/Zbigniew Jędrzejewski-Szmek2023-05-091-2/+2
| | | | | | | | | | | | | | | The pattern is not exactly the same, but I don't think we need to be super-precise here.
| * | test-execute: use bash instead of perlZbigniew Jędrzejewski-Szmek2023-05-091-1/+1
| | | | | | | | | | | | I think this is easier to grok too.
| * | test-udev: skip test on python3.6Zbigniew Jędrzejewski-Szmek2023-05-091-1/+1
| | |
| * | README: require python >= 3.7, clean up module descriptionsZbigniew Jędrzejewski-Szmek2023-05-091-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libpython was added in 2cc86f094a8c316f7feb0336df3827a3264b116d, it seems because of python-systemd module that we built. But libpython by itself is not enough for actual python programs, and now we also list python itself, so let's drop libpython from the list. meson requires >= 3.7. We have CI that runs on CentOS8 with Python 3.6, but let's not provide official support for an EOL Python version. Individual distributions can provide backports, but we don't need to mention that in the user-facing docs. According to [1], 3.7 is on life support and 3.6 is EOL. [1] https://devguide.python.org/versions/
| * | tools/check-includes: compat with Python 3.7Zbigniew Jędrzejewski-Szmek2023-05-091-1/+2
| | | | | | | | | | | | I thought that 3.8 is enough. But Centos8 CI chokes on the walrus.
| * | test/run-unit-tests, TEST-02: skip tests where the interpeter is not installedZbigniew Jędrzejewski-Szmek2023-05-092-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the interpeter is missing, we get an exit code of 127. Let's treat those tests as skipped too. If we could run the test far enough so that it could do the check itself, it would return 77 anyway. $ test/asdf; echo $? exec: Failed to execute process 'test/asdf': The file specified the interpreter '/bin/asdf', which is not an executable command. 127 $ test/asdf; echo $? /usr/bin/env: ‘/bin/asdf’: No such file or directory 127 This should resolve the problem that TEST-02 fails or Debian's 'unit-tests' fail when python3 is not installed. Installing python3 via the mechanism that is used to construct TEST images, i.e. the dracut dependency chasing scheme, would be a lot of work for python with its modules in multiple locations and hundreds of little files. So I think it OK to just skip the test there, and also in other cases where python is not available.
| * | test: rework how udev-test is invokedZbigniew Jędrzejewski-Szmek2023-05-095-37/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of the build, we would populate build/test/sys/ using sys-script.py, and then udev-test.p[ly] would create a tmpfs instance on build/test/tmpfs and copy the sys tree to build/test/tmpfs/sys. Also, we had udev-test.p[ly] which called test-udev. test-udev was marked as a manual test and installed, but neither udev-test.p[ly] or sys-script.py were. test-udev is renamed to udev-rule-runner, which reduces confusion and frees up the test-udev name. udev-test.py is renamed to test-udev.py. All three files are now installed. test-udev.py is modified to internally call sys-script.py to set up the sys tree. Copying and creating it from scratch should take the same amount of time. We avoid having a magic directory, everything is now done underneath a temporary directory. test-udev.py is now a normal installed test, and run-unit-tests.py will pick it up. When test-udev.py is invoked from meson, the path to udev-rule-runner is passed via envvar; when it is invoked via run-unit-tests.py or directly, it looks for udev-rule-runner in a relative path. The goal of this whole change is to let Debian drop the 'udev' test. It called sys-script.py and udev-test.pl from the source directory and had to recreate a bunch of the logic. Now test-udev.py will now be called via 'upstream'.