Skip to content

dnf --installroot documentation needs updating for newer Fedora and DNF #6119

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

Open
DCKcode opened this issue Apr 9, 2025 · 2 comments
Open

Comments

@DCKcode
Copy link

DCKcode commented Apr 9, 2025

Currently Buildah's documentation mentions two examples where dnf --installroot is used to generate a rootfs for Buildah:

Best I can tell this still works on EL9, EL10 as well as Fedora 40 and below. However, trying these on Fedora 41+, these commands don't actually work. Presumably this is because Fedora 41+ have switched to DNF5, which is not fully backwards compatible with earlier versions of DNF.

In my testing I needed to at least add the option --use-host-config to my dnf invocation to reproduce these commands on Fedora 41. That itself would be an easy fix, but I noticed at least on some Fedora 41 variants an additional workaround is necessary when attempting to do the rootless install the buildah unshare documentation describes. I'm not sure that's a workaround that'd be appropriate to include in documentation, or whether that points to an issue elsewhere.

@tanwald
Copy link

tanwald commented May 9, 2025

I cannot build images from scratch since Fedora 42.

I used the following within a script that I run with buildah unshare:

dnf install \
    --use-host-config \
    --releasever 42 \
    --assumeyes \
    --noplugins \
    --nodocs \
    --setopt countme=false \
    --setopt install_weak_deps=0 \
    $PKGS

Since Fedora 42 I get the following errors:

>>> Finished pre-transaction scriptlet: filesystem-0:3.18-36.fc42.x86_64                                                                                                                                                                                                         
>>> [RPM] Unable to get systemd shutdown inhibition lock: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.    
...
>>> Running sysusers scriptlet: setup-0:2.15.0-13.fc42.noarch                                                                                                                                                                                                                    
>>> Error in sysusers scriptlet: setup-0:2.15.0-13.fc42.noarch                                                                                                                                                                                                                   
>>> [RPM] %sysusers(setup-2.15.0-13.fc42.noarch) scriptlet failed, exit status 127                                                                                                                                                                                               
[10/72] Installing filesystem-0:3.18-36.fc42.x86_64                                                                                                                                                                                      100% |   1.7 MiB/s | 212.4 KiB |  00m00s
>>> [RPM] setup-2.15.0-13.fc42.noarch: install failed                                                                                                                                                                                                                            
>>> [RPM] failed to open /etc/group for id/name lookup: No such file or directory                                                                                                                                                                                                
>>> [RPM] group mail does not exist - using root  
...
Transaction failed: Rpm transaction failed.

Adding --setopt persistdir=$(mktemp -d) did not help.

@rhatdan
Copy link
Member

rhatdan commented May 10, 2025

Looks like the install is trying to communicate with systemd?

Could you try this in rootful mode?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants