Skip to content

RSE porting guide

andy diller edited this page Jan 16, 2023 · 5 revisions

Unxmaal contributed this short concise port guide at some point.

Structurally:

In your homedir:

~/rpmbuild
~/sgug-rse.git #cloned from sgidev/sgug-rse

On Github:

  • fork sgug-rse.git to your own repo
  • clone it to some machine (git may not work with ssh on irix)
  • cd sgug-rse
  • git checkout -b wip
  • touch a file, git add and commit it, git push origin wip
  • From Github, create a pull request to merge the upstream sgidev/sgug-rse.git wip branch into your fork's wip branch
  • on your local repo, git pull origin wip

Making a new port

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

Adding a working spec to wip

(Since git+ssh doesn't work on my SGI, I copy stuff over to another system).

  • On my non-SGI workstation, in sgug-rse/
git checkout wip
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 
  • On github, my fork
  • Create a Pull Request, across forks, from your repo's auto-destdir branch into sgidev/sgug-rse's wip branch

Failure Scenario 1: something's wrong in the spec

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.

Failure Scenario 2: the source needs to be patched.

  • 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.