rpm-software-management / mock

Mock is a tool for a reproducible build of RPM packages.
GNU General Public License v2.0
376 stars 220 forks source link

docs: add the case of user's default.cfg. #1339

Closed junaruga closed 3 months ago

junaruga commented 4 months ago

I am using Fedora. I was looking for a way of using an user's own default.cfg instead of the /etc/mock/default.cfg. Because I wanted to use the Fedora rawhide as default instead of the current default to the latest Fedora stable version 39.

$ ls /etc/mock/default.cfg -l
lrwxrwxrwx. 1 root root 20 Feb 26 14:57 /etc/mock/default.cfg -> fedora-39-x86_64.cfg

I didn't want to modify the /etc/mock/default.cfg. Because it might prevent the future update of the file by upgrading the mock-core-configs RPM package.

I was not able to find the user's default.cfg in the current documents. Below is a part of explaining the default.cfg. But it doesn't explain about the user's default.config explicitly.

https://github.com/rpm-software-management/mock/blob/fc1f7d4d22777d17f41aa6482e627f1895258110/mock/docs/mock.1#L59-L69

So, I finally found a way to set up the user's default.cfg. That is one of either ways below.

$ ln -s /etc/mock/fedora-rawhide-x86_64.cfg ~/.config/mock/default.cfg

or

$ cp /etc/mock/fedora-rawhide-x86_64.cfg ~/.config/mock/default.cfg

So, this PR is my proposal to update the current document to add this topic. You can see the modified configuration.md here on my forked repository.

praiskup commented 4 months ago

Thank you for the patch, @junaruga

junaruga commented 4 months ago

I rebased this PR as your suggestion on the latest main branch. You can check the modified document here. I referred to the mock's man page mock(1). I updated the commit message too.