Packaging, how to do, where to start, what to read?

Hey guys,

I want to make openSUSE packages, but I don’t know where to start. I know basic things like compiling the source code etc. But I don’t know how to make packages. Where should I start learning it. Is there any program which gives a GUI or some automatization?

Thanks in advance :slight_smile:

Portal: Development/Topics - openSUSE
or if you just want to build rpms from sources for your own use: how to build rpms as an ordinary user?

Hi,

openSUSE has OBS (openSUSE Build System) which is awesome. Considering that you can build software from source, OBS makes it easy for everyone to package software following openSUSE packaging guidelines.

The first thing you need to know is provided by MAX RPM [see links]. This should be a bit of your packaging starters guide.

Aditionally, you should join the following mailling lists and hang around with the openSUSE Community on IRC, where you can get some pret:ty cool help.

Some links you might want to check:

And on irc://irc.opensuse.org you should join:
#opensuse-factory
#opensuse-buildservice

You should join both mailing lists (same as channel followed by @opensuse.org) and opensuse-packaging@opensuse.org.

To subscribe the mailing lists, please send an email to list+subscribe@opensuse.org… Quick examples:

opensuse-buildservice+subscribe@opensuse.org

Reminder: Keep in mind that after subscription the normal email for the mailing lists do not include de ‘+subscribe’ :wink:

Hope this helps, hope to see you around.

Peace,
Nelson Marques

Start building some packages locally, using the ‘build’ script. This will give you a good feel how to write spec files. I recently published an example how to build guvcview

Issues in compiling my first program in Opensuse 11.3 (post #12 there) but you could try something easier which does not require packman libraries.

In any case: do NOT try to build guvcview on OBS. It is banned due to legal reasons.

You can use openSUSE Build Service (http://build.opensuse.org) to search for the package you are trying to build. Many times someone already has a package for it. This is quite cool and reflects how open and collaborative openSUSE can be. You can see other people’s specs, take ideas, see how problems are solved (ex: rpmlint errors) and learn a lot… and specially; have a lot of fun!

Another quick tip for people… The repository openSUSE:Tools has ‘spec-cleaner’ (used mostly as ‘spec-cleaner -fi fubar.spec’). This is a very cool tool for your packages, specially if you are trying to push them to openSUSE as it replaces the ‘tabs’ for ‘soaces’ fixes somesyntax, provides cool indications on how to do things (ex: how to comment a patch), etc.