debian-forge-composer/test/data/manifests
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
..
fedora_32-aarch64-ami-boot.json distro/{rhel8,rhel84}: set systemd default targets 2021-01-21 11:58:06 +01:00
fedora_32-aarch64-openstack-boot.json distro/{rhel8,rhel84}: set systemd default targets 2021-01-21 11:58:06 +01:00
fedora_32-aarch64-qcow2-boot.json distro/{rhel8,rhel84}: set systemd default targets 2021-01-21 11:58:06 +01:00
fedora_32-x86_64-ami-boot.json distro/{rhel8,rhel84}: set systemd default targets 2021-01-21 11:58:06 +01:00
fedora_32-x86_64-fedora_iot_commit-boot.json distro/{rhel8,rhel84}: set systemd default targets 2021-01-21 11:58:06 +01:00
fedora_32-x86_64-openstack-boot.json distro/{rhel8,rhel84}: set systemd default targets 2021-01-21 11:58:06 +01:00
fedora_32-x86_64-qcow2-boot.json distro/{rhel8,rhel84}: set systemd default targets 2021-01-21 11:58:06 +01:00
fedora_32-x86_64-qcow2-customize.json distro/{rhel8,rhel84}: set systemd default targets 2021-01-21 11:58:06 +01:00
fedora_32-x86_64-vhd-boot.json distro/{rhel8,rhel84}: set systemd default targets 2021-01-21 11:58:06 +01:00
fedora_32-x86_64-vmdk-boot.json distro/{rhel8,rhel84}: set systemd default targets 2021-01-21 11:58:06 +01:00
fedora_33-aarch64-ami-boot.json image-info: Add workaround for listing services by status 2021-02-01 11:22:57 +01:00
fedora_33-x86_64-ami-boot.json image-info: Add workaround for listing services by status 2021-02-01 11:22:57 +01:00
fedora_33-x86_64-fedora_iot_commit-boot.json image-info: Add workaround for listing services by status 2021-02-01 11:22:57 +01:00
fedora_33-x86_64-openstack-boot.json image-info: Add workaround for listing services by status 2021-02-01 11:22:57 +01:00
fedora_33-x86_64-qcow2-boot.json image-info: Add workaround for listing services by status 2021-02-01 11:22:57 +01:00
fedora_33-x86_64-qcow2-customize.json image-info: Add workaround for listing services by status 2021-02-01 11:22:57 +01:00
fedora_33-x86_64-vhd-boot.json image-info: Add workaround for listing services by status 2021-02-01 11:22:57 +01:00
fedora_33-x86_64-vmdk-boot.json image-info: Add workaround for listing services by status 2021-02-01 11:22:57 +01:00
rhel_8-aarch64-ami-boot.json distro/{rhel8,rhel84}: set systemd default targets 2021-01-21 11:58:06 +01:00
rhel_8-aarch64-openstack-boot.json distro/{rhel8,rhel84}: set systemd default targets 2021-01-21 11:58:06 +01:00
rhel_8-aarch64-qcow2-boot.json distro/{rhel8,rhel84}: set systemd default targets 2021-01-21 11:58:06 +01:00
rhel_8-aarch64-rhel_edge_commit-boot.json distro/{rhel8,rhel84}: set systemd default targets 2021-01-21 11:58:06 +01:00
rhel_8-aarch64-tar-boot.json test: restructure dir layout 2020-10-21 09:04:13 +02:00
rhel_8-ppc64le-qcow2-boot.json distro/{rhel8,rhel84}: set systemd default targets 2021-01-21 11:58:06 +01:00
rhel_8-ppc64le-tar-boot.json test: restructure dir layout 2020-10-21 09:04:13 +02:00
rhel_8-s390x-qcow2-boot.json distro/{rhel8,rhel84}: set systemd default targets 2021-01-21 11:58:06 +01:00
rhel_8-s390x-tar-boot.json test: restructure dir layout 2020-10-21 09:04:13 +02:00
rhel_8-x86_64-ami-boot.json distro/{rhel8,rhel84}: set systemd default targets 2021-01-21 11:58:06 +01:00
rhel_8-x86_64-openstack-boot.json distro/{rhel8,rhel84}: set systemd default targets 2021-01-21 11:58:06 +01:00
rhel_8-x86_64-qcow2-boot.json distro/{rhel8,rhel84}: set systemd default targets 2021-01-21 11:58:06 +01:00
rhel_8-x86_64-qcow2-customize.json distro/{rhel8,rhel84}: set systemd default targets 2021-01-21 11:58:06 +01:00
rhel_8-x86_64-rhel_edge_commit-boot.json distro/{rhel8,rhel84}: set systemd default targets 2021-01-21 11:58:06 +01:00
rhel_8-x86_64-tar-boot.json distro/{rhel8,rhel84}: set systemd default targets 2021-01-21 11:58:06 +01:00
rhel_8-x86_64-vhd-boot.json distro/{rhel8,rhel84}: set systemd default targets 2021-01-21 11:58:06 +01:00
rhel_8-x86_64-vmdk-boot.json distro/{rhel8,rhel84}: set systemd default targets 2021-01-21 11:58:06 +01:00
rhel_84-x86_64-ami-boot.json distro/{rhel8,rhel84}: set systemd default targets 2021-01-21 11:58:06 +01:00
rhel_84-x86_64-openstack-boot.json distro/{rhel8,rhel84}: set systemd default targets 2021-01-21 11:58:06 +01:00
rhel_84-x86_64-qcow2-boot.json distro/rhel84: remove rng-tools from qcow2 2021-02-01 11:20:35 +01:00
rhel_84-x86_64-qcow2-customize.json distro/rhel84: remove rng-tools from qcow2 2021-02-01 11:20:35 +01:00
rhel_84-x86_64-vhd-boot.json distro/{rhel8,rhel84}: set systemd default targets 2021-01-21 11:58:06 +01:00
rhel_84-x86_64-vmdk-boot.json distro/{rhel8,rhel84}: set systemd default targets 2021-01-21 11:58:06 +01:00