Mailinglist Archive: opensuse-buildservice (153 mails)

< Previous Next >
Re: [opensuse-buildservice] Build C++ Files for different distributions
  • From: Greg Freemyer <greg.freemyer@xxxxxxxxx>
  • Date: Tue, 25 Nov 2014 11:07:29 -0500
  • Message-id: <>
On Tue, Nov 25, 2014 at 8:48 AM, Greg Freemyer <greg.freemyer@xxxxxxxxx> wrote:

On November 25, 2014 5:13:56 AM EST, Tobias Lauterbach <tol@xxxxxxxxxxxx>
Hi Stefan, hi Greg,

thank you very much for your reply.

With your help I managed to compile a hello World example with success
on a few distributions.
But I have two problems:

1. The built packages are empty. I guess I have to somehow add an
instruction how to build the package(define which binaries should be
installed with the package)?
My workspace:

2. Only CentOS Builds are started at the moment. The Debian and Ubuntu
builds are marked as "excluded". I haven´t figured out why yet. Do you
have any idea?

One last thing for my understanding:
Do I have to create an archive of my sources every time? Cause on our
build server we have a source folder. I think it seems a bit
unnecessary to do that every time when it needs to be unpacked shortly
after that in the build distribution.

Kind regards,

It looks like you are making progress.

A couple high level comments:

- your first post was OBS specific and this mailing list is one of the few
resources that exist to answer it. Now your questions are generic packaging
questions, so you have the entire universe of packaging resources available
to you. In particular, every RPM based distro uses specfiles to build the

That means, if someone is packaging your code for fedora, then they have an
existing specfile, so you can go grab a copy of that one and use it on OBS to
build fedora RPMs here.

- you will soon learn that a specfile for fedora rarely works perfectly for
opensuse, or any other distro. Assuming the changes are minimal then "%if
distro" logic can allow you to customize the specfile for different distros.

- OBS predefines various macros, some of which might be OBS specific, I'm not
sure. I only package via OBS.

- debian style distros don't use specfiles. OBS is not a standalone
packaging solution, it uses each distros native packaging tools so you have
to learn how to package for every distro you support. In general that is
RPMs and DEBs, but there may be others on OBS I don't know about.

- this mailing list is for overall OBS discussion. Once you start asking
about what goes into a specfile, etc you have made the transition to
packaging and the opensuse-packaging list is the place that focuses on those
issues. Not that you will get kicked out of here, but you will have a
different set of subscribers there and I suspect your questions will be
exposed to a broader range of packagers there.

A couple more generic comments.

- Both -buildservice and -packaging are open lists meaning you don't
have to subscribe to post. If you don't subscribe I would make a
point of asking to be kept in CC on replies.

- Both lists are archived various places. My favorite search site for
the archives is Here's a sample search
for "rpm": <> - It gets a
couple thousands hits, so not a great choice of search terms but it
shows you the names of the opensuse lists discussing rpms on the left
middle panel.

- is a rather large build farm. On the bottom of
every page is a link to "status monitor". There will be times that
OBS seems slow. By looking at the status monitor you can see how well
the overall farm is doing. I tend to scroll down to the bottom a look
at the monthly load graphs. You will see the load is highly variable
and a big set of builds (10's of thousands of projects to build at one
time) can take days to work through.

- osc is a command line tool that is great for interacting with OBS.
It can do local builds on your own linux machine. It is available for
lots of distros. I use it a lot. The typical workflow for me is:

osc co <project> # checkout a copy of a project to my local linux box
edit specfile or make other changes
osc build # test out my changes
repeat edit / build sequence as needed to get the build working
install RPM to local machine and test
repeat until the binaries, etc. in the RPM do what you want
osc vc # update the changes file to explain why the
project is being updated
osc commit # push the changes back to OBS for compiling with
multiple distros / versions

By using osc like that to do local builds you are much less impacted
if the farm itself is busy. Even at its fastest the farm is slower
than a local build.

To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >