Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]

5 Building Package Formats


5.1 From Spec Files (RPM)

To create an RPM package, you need:

  • the spec file which is the build recipe

  • a file with the extension .changes that can be used to document the package history

  • the original source archive

  • optional patches which changes the original source code to fix problems regarding security, the build process, or other issues

  • other files which do not fall into one of the previous categories

For existing packages, this is already the case. To build an existing package, the general procedure is as follows:

  1. If you have not done so yet, set up your project as shown in Section 4.1, “Setting Up Your Home Project”.

  2. In the terminal, choose or create a directory on a local partition that has enough space to hold the package sources.

  3. Check out the project that contains the package:

    geeko > osc checkout PROJECT PACKAGE

    This creates a PROJECT:PACKAGE directory in the current directory.

  4. Change the directory:

    geeko > cd PROJECT:PACKAGE
  5. Decide for which build target (for example openSUSE Tumbleweed for x86_64), you want to create the RPM package and execute:

    geeko > osc build openSUSE:Tumbleweed x86_64 *.spec
  6. Inspect the build process.

    Successful Build
    [   15s] RPMLINT report:
    [   15s] ===============
    [   16s] 2 packages and 0 specfiles checked; 0 errors, 0 warnings.
    [   16s]
    [   16s]
    [   16s] venus finished "build PACKAGE.spec" at Fri Sep  1 11:54:31 UTC 2017.
    [   16s]
    Unsuccessful Build
    [    8s] venus failed "build PACKAGE.spec" at Fri Sep  1 11:58:55 UTC 2017.
    [    8s]
    The buildroot was: /var/tmp/build-root/openSUSE_Tumbleweed-x86_64

    A successful build ends always with the creation of the RPM and SRPM files.

  7. For a detailed log, see the file /var/tmp/build-root/openSUSE_Tumbleweed-x86_64/.build.log.

Print this page