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

Please add bootstrap sysroot to DNF Use Cases doc #2017

Open
jaxvanyang opened this issue Nov 14, 2023 · 4 comments
Open

Please add bootstrap sysroot to DNF Use Cases doc #2017

jaxvanyang opened this issue Nov 14, 2023 · 4 comments

Comments

@jaxvanyang
Copy link

Hi, I'm new to Fedora, while reading the doc, I found:

In case you use DNF to achieve a goal which is not documented here, either you found an error in the documentation or you misuse DNF. In either case we would appreciate if you share the case with us so we can help you to use DNF in the correct way or add the case to the list.

So I'm sharing my use case here: bootstrap sysroot for building bootable image and cross compilation. I'm using mmdebstrap/bdebstrap for this use case of Debian/Ubuntu. Things are really easy with these tools. I did some search for similar tool in the Fedora world but no such package manager wrapper found. Anyway, I finally found DNF can do this thing. I wonder if it's a common use case of DNF. If it is, it should be documented. And I want to know the appropriate way of doing this.

I use something like this to create a minimal sysroot:

# chroot/ must has valid repo configs
dnf -y --forcearch=riscv64 --installroot=chroot install '@core'
# I have to disable the default repos as no riscv64 available
chroot chroot dnf config-manager --set-disabled rawhide updates \
  updates-testing fedora fedora-modular fedora-cisco-openh264 \
  updates-modular updates-testing-modular rawhide-modular

I also found some koji and virt-builder stuff for building image, but didn't read too much as I also want a simple chroot. So if DNF is suitable for bootstraping sysroot, could you please document it with some same-arch & cross-arch examples? Thanks.

Some reference links:

@jan-kolarik
Copy link
Member

Hi, before I'd start diving further into your description, I've stopped at the following point:

I did some search for similar tool in the Fedora world but no such package manager wrapper found.

I've noticed the "bootstrap" and "Fedora" keywords and it immediately brought Mock to my mind. Have you considered it?

@jaxvanyang
Copy link
Author

I've noticed the "bootstrap" and "Fedora" keywords and it immediately brought Mock to my mind. Have you considered it?

Thanks, I didn't find that in my search result before. Feature bootstrap | Mock looks like what I need. I'll try that. So people seldom use DNF for bootstraping sysroot? If so, this issue can be closed.

@jan-kolarik
Copy link
Member

Hmm, upon further consideration and research, I agree that this is indeed not an unusual use case, and there should be improved documentation for it. Given our primary focus on the development of DNF5 now, and considering the relevance of this use case, it makes sense to include some examples in the DNF5 documentation. This can then be reused for DNF as well.

@jaxvanyang
Copy link
Author

That would be great. I have tried Mock, but it is specific for building packages and not very configurable for bootstraping. Haven't get it work for bootstraping RISC-V chroot. It is also just a wrapper of DNF, so I'll continue to use my own script for these things. But Mock's way of bootstraping is a good reference. Thanks for your information again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

2 participants