Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

dnf -y install rootfiles fails #191

Open
cgwalters opened this issue Jan 24, 2024 · 10 comments
Open

dnf -y install rootfiles fails #191

cgwalters opened this issue Jan 24, 2024 · 10 comments

Comments

@cgwalters
Copy link
Member

$ podman run --rm -ti quay.io/centos-bootc/centos-bootc:stream9 dnf -y install rootfiles
...
  Installing       : rootfiles-8.1-31.el9.noarch                                                                                                                                                                                                                                       1/1 
error: failed to open dir root of /root/: File exists

One can work around this right now with a RUN mkdir -p /var/roothome; but we should try to fix that package to use systemd-tmpfiles instead probably.

@runcom
Copy link

runcom commented Jan 24, 2024

this happened to me too when also running rpm-ostree compose image with a yaml for a base image

@rhatdan
Copy link
Collaborator

rhatdan commented Jan 24, 2024

@rhatdan
Copy link
Collaborator

rhatdan commented Jan 24, 2024

Do we have a specific location where this content should exists? /usr/rootskel?

@rhatdan
Copy link
Collaborator

rhatdan commented Jan 24, 2024

/etc/rootskel

@cgwalters
Copy link
Member Author

I think it'd be better to use tmpfiles.d snippets to write these instead.

@rhatdan
Copy link
Collaborator

rhatdan commented Jan 24, 2024

Here is what I have so far:

rootfiles.patch

@cgwalters
Copy link
Member Author

Looks ok to me

@rhatdan
Copy link
Collaborator

rhatdan commented Jan 24, 2024

Will see what maintainer says.

@pcdubs
Copy link

pcdubs commented Apr 24, 2024

Still seeing this in Rawhide and F40, was able to get past it with the work around.

It looks like the patch got stalled , I'll ping on the bug

@cgwalters
Copy link
Member Author

It's so complicated and messy because in practice, we don't run systemd-tmpfiles in container builds, so anyone who wants to write to e.g. /root/.ssh will end up needing to make /var/roothome too.

I've concluded the real fix is to pre-create that directory in /var even without systemd-tmpfiles...which hits the same issue as #354 (comment)

And with e.g. https://gitlab.com/bootc-org/fedora-bootc/base-images-experimental we don't need to depend on any changes to rpm-ostree for anything, we can just...RUN mkdir -m 0700 /var/roothome after the tmpfiles.d generation if we want.

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

No branches or pull requests

4 participants