Bug 1781803

Summary: supermin on aarch64 doesn't copy symlinks correctly
Product: [Fedora] Fedora Reporter: Richard W.M. Jones <rjones>
Component: superminAssignee: Richard W.M. Jones <rjones>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: ptoscano, rjones
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-10 18:50:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Log from failed supermin build (with policycoreutils)
none
Log from successful supermin build (without policycoreutils) none

Description Richard W.M. Jones 2019-12-10 15:52:21 UTC
Description of problem:

Possibly related to or caused by the fix for bug 1770304?

On aarch64 only (and not other architectures) symlinks aren't
copied into the ext2 appliance correctly.  For example:

$ supermin -v -v -v --build /usr/lib64/guestfs/supermin.d -f ext2 -o /var/tmp/appliance.d

Examine /var/tmp/appliance.d/root, under /usr/lib64 inside the image:

$ guestfish --ro -a root -m /dev/sda
><fs> ll /lib64 | grep ssl
-rw-r--r--  1 root root      65 Nov 21 14:07 .libssl.so.1.1.1d.hmac
lrwxrwxrwx  1 root root      22 Dec 10 15:32 .libssl.so.1.1.hmac -> .libssl.so.1.1.1d.hmac
-rwxr-xr-x  1 root root  619400 Nov 21 14:06 libssl.so.1.1.1d

The file /usr/lib64/libssl.so.1.1 is missing.  However it is copied
in according to the supermin log.

Version-Release number of selected component (if applicable):

supermin-5.1.20-10.fc32.aarch64

Note for unknown reasons this only seems to affect aarch64, and
works fine on other architectures.

How reproducible:

100%

Steps to Reproduce:
1. See example above.

Comment 1 Richard W.M. Jones 2019-12-10 16:55:25 UTC
This bug is very strange.

This command fails:

$ supermin --prepare `cat /usr/lib64/guestfs/supermin.d/packages` -o /var/tmp/supermin.d
$ supermin --build /var/tmp/supermin.d -f ext2 -o /var/tmp/appliance.d

This command works:

$ supermin --prepare `grep -v policycoreutils /usr/lib64/guestfs/supermin.d/packages` -o /var/tmp/supermin.d
$ supermin --build /var/tmp/supermin.d -f ext2 -o /var/tmp/appliance.d

The difference is the inclusion of policycoreutils in the package list.  However
I see nothing wrong in policycoreutils.

Comment 2 Richard W.M. Jones 2019-12-10 17:07:02 UTC
Created attachment 1643685 [details]
Log from failed supermin build (with policycoreutils)

Comment 3 Richard W.M. Jones 2019-12-10 17:07:44 UTC
Created attachment 1643686 [details]
Log from successful supermin build (without policycoreutils)

Comment 4 Richard W.M. Jones 2019-12-10 17:13:15 UTC
policycoreutils pulls in a notably large number of extra packages, it does
make me wonder why we need it at all.  Anyway it could be one of these
dependencies which is causing the problem, but I cannot see any
immediate problems in any of them.

-supermin: build: 170 packages, including dependencies
+supermin: build: 188 packages, including dependencies
+  - brotli-1.0.7-8.fc32.aarch64
+  - curl-7.67.0-2.fc32.aarch64
+  - cyrus-sasl-lib-2.1.27-2.fc31.aarch64
+  - libarchive-3.4.0-1.fc32.aarch64
+  - libcurl-7.67.0-2.fc32.aarch64
+  - libdb-utils-5.3.28-39.fc32.aarch64
+  - libmetalink-0.1.3-9.fc31.aarch64
+  - libnghttp2-1.40.0-1.fc32.aarch64
+  - libpsl-0.21.0-2.fc31.aarch64
+  - libselinux-utils-3.0-1.fc32.aarch64
+  - libssh-0.9.2-1.fc32.aarch64
+  - libssh-config-0.9.2-1.fc32.noarch
+  - lua-libs-5.3.5-6.fc31.aarch64
+  - openldap-2.4.47-3.fc31.aarch64
+  - policycoreutils-3.0-1.fc32.aarch64
+  - publicsuffix-list-dafsa-20190417-2.fc31.noarch
+  - rpm-4.15.1-1.fc32.aarch64
+  - rpm-libs-4.15.1-1.fc32.aarch64

Comment 5 Richard W.M. Jones 2019-12-10 18:50:20 UTC
A further fix was required for bug 1770304:

https://github.com/libguestfs/supermin/commit/62d5c774d6c8fcac11e28fcba99754b5478e5088

*** This bug has been marked as a duplicate of bug 1770304 ***