Mailinglist Archive: opensuse-buildservice (266 mails)

< Previous Next >
[opensuse-buildservice] OBS 101: How to threat packages with multiple spec files
Hi guys,

if you have an OBS package containing multiple spec files, you may have
discovered that OBS only builds the spec file matching the OBS package
name. If you want to have the other(s) spec file(s) built, you should
use a link, don't use copypac!

For example, devel:languages:python / python-nose is a OBS package
containing four (!) spec files. In this case, documentation building is
separate because doc building dependencies (python-Sphinx) would create
a build cycle. A second set of packages are Python3-related, because
d:l:p builds both Python and Python3 at the moment. So we end up with
the following list of spec files [1]:


As you can see here [2], only python-nose.spec is build, so we have to
do the following (on a command line near you, given you have the rights
to do it in the project):

$ osc linkpac devel:languages:python python-nose \
devel:languages:python python-nose-doc
$ osc linkpac devel:languages:python python-nose \
devel:languages:python python3-nose
$ osc linkpac devel:languages:python python-nose \
devel:languages:python python3-nose-doc

Even though you end up with four OBS packages, you only have to modify /
fix "python-nose" due to the links. This is much better than using
copypac (as I've seen recently). Of course you should only split up into
several spec files if there's a very good reason for the extra work.
Here are some:

- To avoid build cycles
- To off-load looong-running parts of a package build, like:
+ Running a testsuite ($PACKAGE-testsuite.spec)
+ Building documentation ($PACKAGE-doc.spec)
- When building the same thing against a different set of (build)
requirements, like:
+ Different $DYNAMIC_LANGUAGE interpreter versions
(usually $INTERPRETER-$PACKAGE.spec)

With kind regards,
Sascha Peilicke
SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nuernberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer HRB 16746 (AG Nürnberg)

< Previous Next >