Search code examples
packagerpmopensusedeb

Open Build Service: Access internet during built


I want to use openSUSE build service for building debian packages and supplied the needed files: packageName_version.tar.gz, packageName.dsc, debian.changelog, debian.control, debian.rules.

For building, I use biicode, which unfortunately is not in the debian/ubuntu package repository. It can be installed either using a ppa or a bash script they provide for download. To do this, I have the following rules in debian.rules:

biicode-install:
    wget http://apt.biicode.com/install.sh
    chmod +x install.sh
    ./install.sh
    rm install.sh
    echo "Installed biicode version: "$(bii --version)
    bii setup:cpp

biicode-setup: biicode-install
    # Init project
    bii init -l
    bii find

build: build-stamp
build-stamp: biicode-setup
    dh_testdir

    # Add here commands to compile the package.
    bii cpp:configure || bii cpp:configure
    bii cpp:build
    # --- end custom part for compiling

    touch build-stamp

However, running the osc build fails with

[   62s]  debian/rules build
[   62s] wget http://apt.biicode.com/install.sh
[   62s] --2015-11-18 18:16:20--  http://apt.biicode.com/install.sh
[   62s] Resolving apt.biicode.com (apt.biicode.com)... failed: Name or service not known.
[   62s] wget: unable to resolve host address `apt.biicode.com'
[   62s] make: *** [biicode-install] Error 4
[   62s] dpkg-buildpackage: error: debian/rules build gave error exit status 2

I tested it with many of the predefined repositories (Debian_7.0, Debian_8.0, xUbuntu_15.10, ...) and all had the same problem. I assume, the virtual machines used for the build don't have internet access. Is there a way to give it internet access?

Or is there a way to install ppa dependencies into a build? I can't use Build or Build-Depend in debian.control, because biicode is not in the default repositories but only available as ppa or bash install script.


Solution

  • Most build systems (OBS, Koji) does not allow internet access during build time. This is intentionally to support reproducible builds. When you are downloading some bits from wild internet, then nobody can guarantee that those bits will be the same tomorrow.

    You must download that install.sh yourself and add it to your package.