-
Notifications
You must be signed in to change notification settings - Fork 20
RSE porting guide
Unxmaal contributed this short concise port guide at some point. I've updated it for fresh porting in 2023. There is only 007.
Make sure have all the RPM structure setup and RSE 007 installed and working. Your sugshell should be working. You should sort of know what sugshell is doing.
- Read this: https://github.com/sgidevnet/sgug-rse/wiki#building-your-own-packages
- test out re-building/packaging an existing RSE package before trying your first port.
- look in FC31
- they all live here in 2 places:
- https://archives.fedoraproject.org/pub/archive/fedora/linux/updates/31/Everything/SRPMS/Packages/
- https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/31/Everything/source/tree/Packages/
If you find your package in there your are 80% of the way already. Take that SRCRPM and use it as the basis of your port to RSE.
~/rpmbuild
~/sgug-rse.git #cloned from sgidev/sgug-rse
- fork sgug-rse.git to your own repo
- clone it to some sgi machine with 007 (RSE 007 should have working ssh and git)
- cd sgug-rse
- git checkout -b wip-testing
- touch a file, git add and commit it, git push origin wip-testing
- From Github, create a pull request to merge the upstream sgidev/sgug-rse.git wip-testing branch into your fork's wip-testing branch
- on your local repo, git pull origin wip-testing
- Pick something to port
- Check for an updated version here: https://download-ib01.fedoraproject.org/pub/fedora/linux/updates/31/Everything/SRPMS/Packages/
- Else look here http://fedora.mirrors.pair.com/linux/releases/31/Everything/source/tree/Packages/
cd ~/rpmbuild
rpm -Uvh http://fedora.mirrors.pair.com/linux/releases/31/Everything/source/tree/Packages/a/auto-destdir-1.11-16.fc31.src.rpm
- Now try to build it!
rpmbuild -ba --undefine=_disable_source_fetch -ba SPECS/auto-destdir.spec
- If it builds, sudo install it:
sudo rpm -Uvh /usr/people/edodd/rpmbuild/RPMS/mips/auto-destdir*.rpm
- On my non-SGI workstation, in sgug-rse/
git checkout wip-testing
git checkout -b auto-destdir
-
On my SGI
scp SPECS/auto-destdir.spec me@myhost:/Users/me/projects/github/mygit/sgug-rse/packages/auto-destdir/SPECS/.
-
On my workstation
git add SPECS/auto-destdir.spec
git commit -m "added auto-destdir"
git push origin wip-testing
- On github, my fork
- Create a Pull Request, across forks, from your repo's auto-destdir branch into sgidev/sgug-rse's wip branch
First, copy the official FC31 spec file to ".spec.origfedora" . Include this with your fixed spec.
Typically this happens when you're missing a dep. If you know you have a dep and it's named differently, comment the BuildDep line out; don't delete it.
There could also be a Linuxism, or some other problem.
Generally, please don't delete lines. Comment them out.
- cd ~/rpmbuild/SOURCES
- extract foo-bar.1.0.0.tar.gz
- cp -Ra foo-bar.1.0.0 foo-bar.1.0.0.orig
- cd foo-bar.1.0.0/
- Play some code golf!
- cd ~/rpmbuild/SOURCES
- diff -Naur foo-bar.1.0.0.orig foo-bar.1.0.0 > foo-bar.irixfixes.patch
In the spec file, we start our patch numbers at 100:
Patch100: foo-bar.irixfixes.patch
You can look at other specs to see how to patch.
I prefer the lazy %autosetup -p1
.
Write out the spec file, then try to rpmbuild per above. If it works, great!
scp the patch and the spec, then git add, commit and push per above.
Copyright 2022 Contributors to the SGUG-RSE project.
Join us on Discord: https://discord.gg/skp987v