debian-forge-composer/test/data
Tomas Hozza 1a3cbb282a image-info: Add workaround for listing services by status
`image-info` tools parses output of `systemctl list-unit-files` run on a
different tree (with `--root` option), to determine the list of enabled
and disabled services on the inspected image. However since Fedora 33
(and presumably since systemd v246), the output of `systemctl
list-unit-files` changed. Some units previously reported as "enabled" or
"disabled" are now reported as "alias", which means, that they are just
a symlink to a different unit.

There is no systemd command, that would take an "alias" unit and would
report its state as "enabled" or "disabled" and could run on a different
tree (with "--root" option).

To make the list of reported services in the given state consistent on
systems with older and new (v246+) systemd version, check all "alias"
units and append them to the list of services with a specific status,
if their target is also listed in in the list.

Example of the `systemctl list-unit-files` output change:

~]# rpm -q systemd
systemd-246.6-3.fc33.x86_64
~]# systemctl list-unit-files ctrl-alt-del.target
UNIT FILE           STATE VENDOR PRESET
ctrl-alt-del.target alias -

~]# rpm -q systemd
systemd-245.8-2.fc32.x86_64
~]# systemctl list-unit-files ctrl-alt-del.target
UNIT FILE           STATE   VENDOR PRESET
ctrl-alt-del.target enabled disabled

This change makes it possible to produce consistent output for an
inspected image, regardless if the `image-info` tool is run on Fedora
32, Fedora 33 or RHEL-8.

Also regenerate all Fedora 33 test cases, since this commit changes the
content of produced list of enabled / disabled services since Fedora 33.
The list is now consistent with what would be produced by `image-info`
for an image on older Fedora (e.g. 32) or RHEL-8.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-02-01 11:22:57 +01:00
..
ansible schutzbot: add rhel 8.4 tests to jenkins pipeline 2020-11-19 10:36:49 +01:00
azure tests: ship all tests in the -tests sub-package 2020-10-06 13:08:26 +02:00
cloud-init tests: ship all tests in the -tests sub-package 2020-10-06 13:08:26 +02:00
composer cmd/composer: drop koji configuration 2020-11-11 18:16:42 +01:00
kerberos tests: ship all tests in the -tests sub-package 2020-10-06 13:08:26 +02:00
keyring tests: ship all tests in the -tests sub-package 2020-10-06 13:08:26 +02:00
koji test/koji: move the koji test to schutzbot 2020-11-02 19:59:28 +01:00
manifests image-info: Add workaround for listing services by status 2021-02-01 11:22:57 +01:00
repositories test/repositories: add Fedora 33 aarch64 ones 2020-12-01 08:27:44 +01:00
vendor test/vendor/dnsname: ship the pre-built fedora version 2020-10-06 13:08:26 +02:00
x509 test: generate certificates on fly instead of shipping them in the test RPM 2020-11-05 13:48:48 +01:00