I have an old old game from Fedora, in a package named six. It has a bug and I want to add a couple of simple features. I asked here about one part of the process, (see How to deal with build dependencies in source RPM? ) got some answers, and find that the learning curve is just too much for my old brain. Documentation tends to want to cover everything a package can do and it's hard for me to pick out the pieces I need.
What I am really hoping for is a complete workflow (hopefully just a list of commands and a mention of the directories involved).
It would start with this (it works and may even be standard):
- Find the SRPM with rpm -qi six | grep Source
- Fetch with rpm -i six-0.5.3-38.fc35.src.rpm
result: sources and spec files in ~/rpmbuild
What I need filled in are the following steps after I modify and test the new version:
- build new SRPM (can mock do this?)
- build new RPMs and install them locally (I will test and repeat as needed)
- report bug and fixes, possibly as a pull request
The steps may be reorganized if needed. I know mock can build RPMs from a SRPM, but I did not see how to go direct from sources to installation, and building fails outside of mock (some problem with qt-mt).
I'm hoping for a list of commands that will work together to do these things. I've done what I could short of spending a week understanding the terminology mismatches between the various man pages. Or just odd usages (why does a REbuild of a SRPM build binary RPMS but not an SRPM?)
BTW if you want to see the bug I mentioned,
- install six
- start it
- set Black to human
- set White to expert
- set Swap enabled
- click on any hex in the top (or bottom) row and watch six report a crash and quit.
You can try again, clicking in the middle of the board and notice it does not crash.
I'm not all that surprised the bug hasn't been noticed before. Swap is usually only enabled between experienced players. I doubt an experienced player would make the first move in the top or bottom row against another.
CodePudding user response:
You handle it very well. You are actually missing only one thing. After you install the src.rpm with:
rpm -i six-0.5.3-38.fc35.src.rpm
You have six.spec in ~/rpmbuild/SPECS
and six-SOMETHING.tar.gz in ~/rpmbuild/SOURCES
The quick and dirty way is to unpack that six-SOMETHING.tar.gz. Modify the the file and pack it back. Into the same structure as had the original tar ball.
And then just:
rpmbuild -bs ~/rpmbuild/SPECS/six.spec
this will produce the src.rpm and you can then build it using mock:
mock six.src.rpm
(an even quicker and dirtier way is to call rpmbuild -ba which builds the rpm directly, but mock is a cleaner way).
The standard way of handling fixes in packages is to add a patch. https://rpm-packaging-guide.github.io/#patching-software But if you do not care about sustainability and long-term security, then the path above is just fine.
If you want to file a bug against fedora six's package you can do it here https://bugz.fedoraproject.org/six
