Bug 1666835 - Problem handling architecture compatibility
Summary: Problem handling architecture compatibility
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 29
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Jaroslav Mracek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-16 17:12 UTC by Romain Forlot
Modified: 2019-11-27 23:04 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-11-27 23:04:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Romain Forlot 2019-01-16 17:12:54 UTC
Description of problem:

I work to build image of an embedded Linux distro, for cars among others. So, I willing to use DNF as package manager but encounters some trouble about crossbuild. Idea here is to initialize a chroot environment using dnf --installroot to be able to crossbuild. But this is the initialization part which involves DNF that bother me for now. :)

We aren't able to set up the build chroot because of our packages architectures. Ours packages come from a Yocto build, (yet another build system :) which separates the packages in two architectures, which could be equivalent to basearch and arch where basearch would be aarch64 by example and arch some unknown machine specific arch. But the machine specific architecture isn't different at all from the basearch, it's just a convenient way to separate machine specific stuff and the rest.

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

dnf-4.0.9-2.fc29.noarch
libdnf-0.22.3-1.fc29.x86_64
libsolv-0.7.2-1.fc29.x86_64

How reproducible:

Try to install in a separate root  (with --installroot) directory package from an unknown but compatible architecture.

Steps to Reproduce:
1. Create an empty chroot dir

$ mkdir -p /opt/chroot/etc/dnf

2. Configure dnf using a repo with 2 compatible arch but with one unknown from dnf/libsolv:

$ cat /opt/chroot/etc/dnf/dnf.conf
[main]
keepcache=1
debuglevel=10
reposdir=/dev/null
logfile=/var/log/dnf.log
retries=20
obsoletes=1
assumeyes=1
syslog_ident=mock
syslog_device=
install_weak_deps=0
metadata_expire=0
deltarpm=False
best=1

# repos

[AGL-oss]
name=AGL by IoT.bzh - aarch64 - OSS
baseurl=https://iot.bzh/download/public/rpm/AGL-FF/
gpgcheck=0

3. Try to install some package in the chroot dir:

$ sudo /usr/bin/dnf --installroot /opt/chroot --disableplugin=local --forcearch=aarch64 install bash

Actual results:

timer: config: 1 ms
Loaded plugins: builddep, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, needs-restarting, playground, repoclosure, repodiff, repograph, repomanage, reposync
DNF version: 4.0.9
Command: dnf --installroot /opt/chroot --disableplugin=local --forcearch=aarch64 install bash 
Installroot: /var/lib/mock/test
Releasever: master
cachedir: /var/lib/mock/test/var/cache/dnf
Base command: install
Extra commands: ['--installroot', '/var/lib/mock/test', '--disableplugin=local', '--releasever=master', '--forcearch=aarch64', 'install', 'bash']
repo: using cache for: AGL-oss
not found other for: AGL by IoT.bzh - aarch64 - OSS
not found modules for: AGL by IoT.bzh - aarch64 - OSS
not found deltainfo for: AGL by IoT.bzh - aarch64 - OSS
not found updateinfo for: AGL by IoT.bzh - aarch64 - OSS
AGL-oss: using metadata from mer. 16 janv. 2019 16:00:53 CET.
Last metadata expiration check: 0:00:09 ago on mer. 16 janv. 2019 17:54:14 CET.
timer: sack setup: 20 ms
Completion plugin: Generating completion cache...
--> Starting dependency resolution
--> Finished dependency resolution
timer: depsolve: 4 ms
Error: 
 Problem: conflicting requests
  - nothing provides base-files needed by bash-4.4-r0.aarch64
Cleaning up.

Expected results:

timer: config: 1 ms
Loaded plugins: builddep, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, needs-restarting, playground, repoclosure, repodiff, repograph, repomanage, reposync
DNF version: 4.0.9
Command: dnf --installroot /var/lib/mock/test --disableplugin=local --releasever=master --forcearch=aarch64 install bash 
Installroot: /var/lib/mock/test
Releasever: master
cachedir: /var/lib/mock/test/var/cache/dnf
Base command: install
Extra commands: ['--installroot', '/var/lib/mock/test', '--disableplugin=local', '--releasever=master', '--forcearch=aarch64', 'install', 'bash']
AGL by IoT.bzh - aarch64 - OSS                                            2.8 kB/s | 3.0 kB     00:01    
reviving: 'AGL-oss' can be revived - repomd matches.
not found other for: AGL by IoT.bzh - aarch64 - OSS
not found modules for: AGL by IoT.bzh - aarch64 - OSS
not found deltainfo for: AGL by IoT.bzh - aarch64 - OSS
not found updateinfo for: AGL by IoT.bzh - aarch64 - OSS
AGL-oss: using metadata from mer. 16 janv. 2019 16:00:53 CET.
timer: sack setup: 1146 ms
Completion plugin: Generating completion cache...
--> Starting dependency resolution
---> Package base-files.m3ulcb 3.0.14-r89 will be installed
---> Package bash.aarch64 4.4-r0 will be installed
---> Package coreutils.aarch64 8.27-r0 will be installed
---> Package libacl1.aarch64 2.2.52-r0 will be installed
---> Package libattr1.aarch64 2.4.47-r0 will be installed
---> Package libc6.aarch64 2.26-r0 will be installed
---> Package libcap2.aarch64 2.25-r0 will be installed
---> Package libgmp10.aarch64 6.1.2-r0 will be installed
---> Package libtinfo5.aarch64 6.0+20171125-r0 will be installed
---> Package smack.aarch64 1.3.1-r0 will be installed
---> Package update-alternatives-opkg.aarch64 0.3.5-r0 will be installed
--> Finished dependency resolution
timer: depsolve: 1172 ms
Dependencies resolved.
==========================================================================================================
 Package                            Arch              Version                     Repository         Size
==========================================================================================================
Installing:
 bash                               aarch64           4.4-r0                      AGL-oss           378 k
Installing dependencies:
 base-files                         m3ulcb            3.0.14-r89                  AGL-oss            15 k
 coreutils                          aarch64           8.27-r0                     AGL-oss           699 k
 libacl1                            aarch64           2.2.52-r0                   AGL-oss            17 k
 libattr1                           aarch64           2.4.47-r0                   AGL-oss            12 k
 libc6                              aarch64           2.26-r0                     AGL-oss           1.0 M
 libcap2                            aarch64           2.25-r0                     AGL-oss            16 k
 libgmp10                           aarch64           6.1.2-r0                    AGL-oss           184 k
 libtinfo5                          aarch64           6.0+20171125-r0             AGL-oss            48 k
 smack                              aarch64           1.3.1-r0                    AGL-oss            27 k
 update-alternatives-opkg           aarch64           0.3.5-r0                    AGL-oss           8.3 k

Transaction Summary
==========================================================================================================
Install  11 Packages

Total download size: 2.4 M
Installed size: 10 M
Downloading Packages:
(1/11): base-files-3.0.14-r89.m3ulcb.rpm                                  174 kB/s |  15 kB     00:00    
(2/11): libacl1-2.2.52-r0.aarch64.rpm                                     1.0 MB/s |  17 kB     00:00    
(3/11): libattr1-2.4.47-r0.aarch64.rpm                                    640 kB/s |  12 kB     00:00    
(4/11): bash-4.4-r0.aarch64.rpm                                           2.5 MB/s | 378 kB     00:00    
(5/11): libcap2-2.25-r0.aarch64.rpm                                       920 kB/s |  16 kB     00:00    
(6/11): coreutils-8.27-r0.aarch64.rpm                                     3.6 MB/s | 699 kB     00:00    
(7/11): libgmp10-6.1.2-r0.aarch64.rpm                                     7.0 MB/s | 184 kB     00:00    
(8/11): libtinfo5-6.0+20171125-r0.aarch64.rpm                             2.8 MB/s |  48 kB     00:00    
(9/11): smack-1.3.1-r0.aarch64.rpm                                        1.8 MB/s |  27 kB     00:00    
(10/11): libc6-2.26-r0.aarch64.rpm                                        9.3 MB/s | 1.0 MB     00:00    
(11/11): update-alternatives-opkg-0.3.5-r0.aarch64.rpm                    299 kB/s | 8.3 kB     00:00    
----------------------------------------------------------------------------------------------------------
Total                                                                     9.8 MB/s | 2.4 MB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
timer: transaction test: 27 ms
Running transaction
RPMDB altered outside of DNF.
RPM transaction start.
  Preparing        :                                                                                  1/1 
  Installing       : update-alternatives-opkg-0.3.5-r0.aarch64                                       1/11 
  Installing       : libacl1-2.2.52-r0.aarch64                                                       2/11 
  Running scriptlet: libacl1-2.2.52-r0.aarch64                                                       2/11 
error: failed to exec scriptlet interpreter /bin/sh: No such file or directory
warning: %post(libacl1-2.2.52-r0.aarch64) scriptlet failed, exit status 127

Error in POSTIN scriptlet in rpm package libacl1
  Installing       : libattr1-2.4.47-r0.aarch64                                                      3/11 
  Running scriptlet: libattr1-2.4.47-r0.aarch64                                                      3/11 
error: failed to exec scriptlet interpreter /bin/sh: No such file or directory
warning: %post(libattr1-2.4.47-r0.aarch64) scriptlet failed, exit status 127

Error in POSTIN scriptlet in rpm package libattr1
  Installing       : libc6-2.26-r0.aarch64                                                           4/11 
  Running scriptlet: libc6-2.26-r0.aarch64                                                           4/11 
error: failed to exec scriptlet interpreter /bin/sh: No such file or directory
warning: %post(libc6-2.26-r0.aarch64) scriptlet failed, exit status 127

Error in POSTIN scriptlet in rpm package libc6
  Installing       : libcap2-2.25-r0.aarch64                                                         5/11 
  Running scriptlet: libcap2-2.25-r0.aarch64                                                         5/11 
error: failed to exec scriptlet interpreter /bin/sh: No such file or directory
warning: %post(libcap2-2.25-r0.aarch64) scriptlet failed, exit status 127

Error in POSTIN scriptlet in rpm package libcap2
  Installing       : libgmp10-6.1.2-r0.aarch64                                                       6/11 
  Running scriptlet: libgmp10-6.1.2-r0.aarch64                                                       6/11 
error: failed to exec scriptlet interpreter /bin/sh: No such file or directory
warning: %post(libgmp10-6.1.2-r0.aarch64) scriptlet failed, exit status 127

Error in POSTIN scriptlet in rpm package libgmp10
  Installing       : libtinfo5-6.0+20171125-r0.aarch64                                               7/11 
  Running scriptlet: libtinfo5-6.0+20171125-r0.aarch64                                               7/11 
error: failed to exec scriptlet interpreter /bin/sh: No such file or directory
warning: %post(libtinfo5-6.0+20171125-r0.aarch64) scriptlet failed, exit status 127

Error in POSTIN scriptlet in rpm package libtinfo5
  Installing       : smack-1.3.1-r0.aarch64                                                          8/11 
  Running scriptlet: smack-1.3.1-r0.aarch64                                                          8/11 
error: failed to exec scriptlet interpreter /bin/sh: No such file or directory
warning: %post(smack-1.3.1-r0.aarch64) scriptlet failed, exit status 127

Error in POSTIN scriptlet in rpm package smack
  Installing       : coreutils-8.27-r0.aarch64                                                       9/11 
  Running scriptlet: coreutils-8.27-r0.aarch64                                                       9/11 
error: failed to exec scriptlet interpreter /bin/sh: No such file or directory
warning: %post(coreutils-8.27-r0.aarch64) scriptlet failed, exit status 127

Error in POSTIN scriptlet in rpm package coreutils
  Installing       : bash-4.4-r0.aarch64                                                            10/11 
  Running scriptlet: bash-4.4-r0.aarch64                                                            10/11 
error: failed to exec scriptlet interpreter /bin/sh: No such file or directory
warning: %post(bash-4.4-r0.aarch64) scriptlet failed, exit status 127

Error in POSTIN scriptlet in rpm package bash
  Running scriptlet: base-files-3.0.14-r89.m3ulcb                                                   11/11 
error: failed to exec scriptlet interpreter /bin/sh: No such file or directory
error: %prein(base-files-3.0.14-r89.m3ulcb) scriptlet failed, exit status 127

Error in PREIN scriptlet in rpm package base-files
RPM transaction over.
Errors occurred during transaction.
  Verifying        : base-files-3.0.14-r89.m3ulcb                                                    1/11 
  Verifying        : bash-4.4-r0.aarch64                                                             2/11 
  Verifying        : coreutils-8.27-r0.aarch64                                                       3/11 
  Verifying        : libacl1-2.2.52-r0.aarch64                                                       4/11 
  Verifying        : libattr1-2.4.47-r0.aarch64                                                      5/11 
  Verifying        : libc6-2.26-r0.aarch64                                                           6/11 
  Verifying        : libcap2-2.25-r0.aarch64                                                         7/11 
  Verifying        : libgmp10-6.1.2-r0.aarch64                                                       8/11 
  Verifying        : libtinfo5-6.0+20171125-r0.aarch64                                               9/11 
  Verifying        : smack-1.3.1-r0.aarch64                                                         10/11 
  Verifying        : update-alternatives-opkg-0.3.5-r0.aarch64                                      11/11 
timer: verify transaction: 6162 ms
timer: transaction: 11126 ms
Completion plugin: Generating completion cache...

Installed:
  bash-4.4-r0.aarch64                        coreutils-8.27-r0.aarch64          libacl1-2.2.52-r0.aarch64 
  libattr1-2.4.47-r0.aarch64                 libc6-2.26-r0.aarch64              libcap2-2.25-r0.aarch64   
  libgmp10-6.1.2-r0.aarch64                  libtinfo5-6.0+20171125-r0.aarch64  smack-1.3.1-r0.aarch64    
  update-alternatives-opkg-0.3.5-r0.aarch64 

Failed:
  base-files-3.0.14-r89.m3ulcb                                                                            

Cleaning up.
Error: Transaction failed

Additional info:

The Expected result has been taken after a modification of *poolarch.c* file from libsolv package by adding the line:

  "aarch64",    "aarch64:m3ulcb",

to the builtin archpolicies variable and rebuild/reinstall the rpm package.

I was thinking that putting "m3ulcb:aarch64" line in file /opt/chroot/etc/dnf/vars/arch would modify the default builtin archpolicies but no. Does it possible to be able to overwrite/overload/append archpolicies ? Or may be this isn't the good way to do that...

Comment 1 Jaroslav Mracek 2019-03-25 16:18:29 UTC
According to your proposal I created a pull-request (https://github.com/openSUSE/libsolv/pull/310) for libsolv.

Comment 2 Romain Forlot 2019-03-25 17:48:28 UTC
Hum, this is not the good way I think and more a temporary workaround. Because "m3ulcb" is just one of the possibilities. As I said before, the problem comes from the way Yocto builds the packages and marks the BSP packages with the name of the machine instead of the architecture.

An image built for the machine/board "m3ulcb" will produce kernel, kernel modules and such packages with "m3ulcb" for the architecture and all others packages with aarch64.

Anyway, could we have a way to specify compatibility between arch with a files like for RPM with the "rpmrc" file which gives you the ability to specify such things. I would have even thought that it should works with the file /etc/dnf/vars/arch but no.

Comment 3 Jaroslav Mracek 2019-03-26 09:00:09 UTC
According to conversation in https://github.com/rpm-software-management/rpm/pull/645#event-2228670021 we should considered it as a unsupported user case. Additionally it would requires changes in RPM, LIBDNF, LIBSOLV therefore it is to complicate and difficult to convince community about importance of the implementation. I also believe that there are different approaches how to mark specific builds from certain machine. Please try to use a vendor or a disttag.

Comment 4 Jaroslav Mracek 2019-03-26 21:07:15 UTC
Probably there is a way how to implement in easily. See https://github.com/openSUSE/libsolv/pull/310#issuecomment-476596610

Comment 5 Ben Cotton 2019-10-31 19:01:59 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Ben Cotton 2019-11-27 23:04:31 UTC
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.