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

Update qm manpage to fix install instructions #671

Open
aesteve-rh opened this issue Dec 3, 2024 · 3 comments
Open

Update qm manpage to fix install instructions #671

aesteve-rh opened this issue Dec 3, 2024 · 3 comments

Comments

@aesteve-rh
Copy link
Collaborator

Currently installing as instructed in the man at: https://github.com/containers/qm/blob/main/qm.8.md?plain=1#L68
Results in an error:

# dnf install --installroot=/usr/lib/qm/rootfs setools-console
error: cannot open Packages database in /usr/lib/qm/rootfs/var/lib/rpm
Error: Error: rpmdb open failed

Probably since /usr/lib/qm/rootfs is just partial rootfs, and /etc/qm and /var/qm may be needed as well.

Explore the way to handle it and document it properly.

@Yarboa
Copy link
Collaborator

Yarboa commented Dec 5, 2024

@aesteve-rh
Probably this one will do the trick

 dnf install --setopt=reposdir=/etc/qm/yum.repos.d --installroot=/usr/lib/qm/rootfs -y <pkg>

Did you give it a try?

@aesteve-rh
Copy link
Collaborator Author

Did you give it a try?

Yeah, it does not work for me either.

@mkemel
Copy link
Contributor

mkemel commented Jan 14, 2025

The reason it stopped working is that we moved /var/lib/rpm to /usr/share/rpm, and put an absolute symlink /var/lib/rpm -> /usr/share/rpm. Now it was changed to a relative one https://gitlab.com/CentOS/automotive/src/automotive-image-builder/-/merge_requests/181.

When the symlink is fixed (you can fix it in place as well with ln -sf ../../usr/share/rpm /var/qm/lib/rpm) - the above command will work. BUT, /var and /etc in qm rootfs are not the correct ones, and we've been doing it wrong until now. Alex has suggested a script that would do it the right way: https://gitlab.com/CentOS/automotive/src/automotive-image-builder/-/merge_requests/181#note_2294016285

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