Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

microdnf fails when passing --setopt=tsflags=nodocs #637

Closed
jmtd opened this issue Nov 7, 2019 · 9 comments
Closed

microdnf fails when passing --setopt=tsflags=nodocs #637

jmtd opened this issue Nov 7, 2019 · 9 comments
Labels
status/review Sheduled for a review type/bug

Comments

@jmtd
Copy link
Collaborator

jmtd commented Nov 7, 2019

Hi,

With microdnf=3.0.1-3.el8 (latest version available in ubi8 right now), microdnf behaves strangely when supplying --setopt=tsflags=nodocs, as is the default in the cekit jinja template:

[root@6443f6637153 /]# microdnf --setopt=tsflags=nodocs install -y unzip tar rsync shadow-utils
(process:10): librhsm-WARNING **: 16:09:11.044: Found 0 entitlement certificates
(process:10): librhsm-WARNING **: 16:09:11.047: Found 0 entitlement certificates
(process:10): libdnf-WARNING **: 16:09:11.047: Loading "/etc/dnf/dnf.conf": IniParser: Can't open file
Downloading metadata...
Downloading metadata...
Downloading metadata...
Package                                                                                                                                          Repository                                               Size
Installing:                                                                                                                                                                                                  
 libsemanage-2.9-1.el8.x86_64                                                                                                                    ubi-8-baseos                                         168.8 kB
 rsync-3.1.3-6.el8.x86_64                                                                                                                        ubi-8-baseos                                         413.7 kB
 shadow-utils-2:4.6-8.el8.x86_64                                                                                                                 ubi-8-baseos                                           1.3 MB
 tar-2:1.30-4.el8.x86_64                                                                                                                         ubi-8-baseos                                         858.4 kB
 unzip-6.0-41.el8.x86_64                                                                                                                         ubi-8-baseos                                         197.3 kB
Transaction Summary:
 Installing:        5 packages
 Reinstalling:      0 packages
 Upgrading:         0 packages
 Removing:          0 packages
 Downgrading:       0 packages
Downloading packages...
Running transaction test...
[root@6443f6637153 /]# echo $?
141

This fails builds. One workarounds seem to exist: don't pass --setopt=tsflags=nodocs, although that (might) mean that behaviour is different (not sure that microdnf is even honouring this)

This might get fixed in microdnf itself, although I haven't filed it there yet. But the lead time on getting that fix deployed would likely be quite long, and rule out us using the ubi8-minimal images for some shorter-term projects. So I'm filing this wondering what you might think about working around it in cekit?

@jmtd jmtd added status/review Sheduled for a review type/bug labels Nov 7, 2019
@jmtd jmtd changed the title microdnf behaviour when installing multiple packages: sometimes fails microdnf fails when passing --setopt=tsflags=nodocs Nov 7, 2019
@luck3y
Copy link
Contributor

luck3y commented Nov 7, 2019

As a possible workaround we could install dnf as the first package and then use that, though this reduces some of the differences between minimal and full. We'd need some indication or a pre-run script as a cekit module to do this though, as cekit won't understand that it begins with package manager A and then switches to B.

@jmtd
Copy link
Collaborator Author

jmtd commented Nov 7, 2019

upstream microdnf bug https://bugzilla.redhat.com/show_bug.cgi?id=1769831

@spolti
Copy link
Contributor

spolti commented Nov 7, 2019

Without removing the flag it also failed while installing only the dnf package.

@goldmann
Copy link
Contributor

goldmann commented Nov 8, 2019

@spolti Does it mean that the proposed workaround by @jmtd (not passing --setopt=tsflags=nodocs) does not work?

@goldmann
Copy link
Contributor

goldmann commented Nov 8, 2019

Ah, now I understand. The workaround is still valid, it's just that we cannot work with @luck3y's workaround. One solution would be to add a module that would use microdnf command to install dnf, and not as packages.

@goldmann
Copy link
Contributor

goldmann commented Nov 8, 2019

Upstream microdnf issue: rpm-software-management/microdnf#50

@spolti
Copy link
Contributor

spolti commented Nov 8, 2019

@goldmann correct, the workaround that Ken suggested will not work. So far the only one that apparently works is removing the nodocs flag.

@jmtd
Copy link
Collaborator Author

jmtd commented Nov 12, 2019

I guess we could stop using nodocs and do a post-install "rm -rf /usr/share/doc" or similar

ryanemerson added a commit to infinispan/infinispan-images that referenced this issue Dec 19, 2019
The :latest ubi-minimal tag will not work with cekit due to cekit/cekit#637
and the underlying microdnf issue
https://bugzilla.redhat.com/show_bug.cgi?id=1769831, therefore it's
necessary to ensure that the last working tag, 8.0-213, is used.

In general it is good practice to use a specific image tag for
reproducible builds, so we should continue to explicitly provide the tag
in the future.
@jmtd
Copy link
Collaborator Author

jmtd commented Feb 9, 2021

This was resolved in microdnf at some point; the issue is not present in microdnf-3.4.0-1.el8.x86_64 (

@jmtd jmtd closed this as completed Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/review Sheduled for a review type/bug
Projects
None yet
Development

No branches or pull requests

4 participants