I’m wanting to get such development processes as I have a little more streamlined, and to follow whatever best practices there are to make my job easier/better. Not sure what else needs to be done to my nethserver-automx and nethserver-acme-dns packages, but there’s no way they’re bug-free. So time to learn at least a little bit of git and see how I can make that work for me.
I see https://wiki.nethserver.org/doku.php?id=developer:developer_howto that talks about installing mock and using the
make-rpms command to build things. I’m not sure what benefit that has other than saving the tedium of building a new tarball every time I change something in the source, but that’s enough for now. I’m having some trouble with that, but before I really get into troubleshooting, I want to see if I understand how it’s supposed to work (and fill in gaps in that understanding).
Environment: A Neth 7.5 VM, up to date, with nethserver-mock installed, a non-root user created and added to the mock group.
It looks like the make-rpms command expects to work on the root of a git repository. Right now I have individual subdirectories for my different projects (~/nethserver-automx, ~/nethserver-acme-dns, etc.), with the .spec file in ~/rpm-build/SPECS. When I need to build a RPM, I tar up (for example) ~/nethserver-automx, put that in ~/rpm-build/SOURCES, and
rpmbuild -ba --sign nethserver-automx.spec.
If I now want to use mock, it looks like I copy nethserver-automx.spec to ~/nethserver-automx, change to that directory,
git add -A,
git commit -m "Initial commit". Then
- Do I have it right so far?
make-rpmssign the RPMs as well, or would I need to do that myself?
make-rpms finishes, it puts a number of new files into the working directory. The RPMS themselves, of course, as well as a couple of log files, and I think a couple of others (from memory, as I’m not logged in to that environment at the moment). Git sees them, of course.
- Do I just leave those files there and never add/commit them?