Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Building packages on Debian 10 is not yet supported. You must use Debian 9 to build packages.

This article describes the general procedure for building DANOS packages from source. Packages must be built on a Debian host that corresponds to the version of Debian for the given DANOS release. The initial 1908 release is based on Debian 9 so you will need a Debian 9 environment of some kind to get started. The particular flavor of Debian environment is up to you, VM, container, chroot, etc.

These instructions have been automated using a Docker based environment in the following tool https://github.com/jsouthworth/danos-buildpackage. If you have Docker installed this tool may be run from the root of a package directory to build the package. It supports advanced build modes such as building against other local packages that have previously been built. Binaries for Linux (.elf), macOS (.mach-o), and Windows 10 (.exe) are available in the Releases tab for the tool.

Instructions

  1. Setup a Debian environment for development with the “devscripts” package installed.

  2. Add the Debian repos and signing keys for the given DANOS Release

    1. Example

      $ sudo tee /etc/apt/sources.list.d/danos.list << EOF
      deb http://s3-us-west-1.amazonaws.com/repos.danosproject.org/standard/ 1908 main
      deb http://s3-us-west-1.amazonaws.com/repos.danosproject.org/bootstrap/ 1908 main
      EOF
      
      $ wget -q -O- https://s3-us-west-1.amazonaws.com/repos.danosproject.org/Release.key | sudo apt-key add -
  3. Use ‘apt-get update’ to update the package cache

    1. Example

      $ sudo apt-get update
  4. Install the following necessary build packages

    1. Example

    $ sudo apt install lintian-profile-vyatta base-files-vyatta
  5. Clone the package source

    1. Example

      $ git clone https://github.com/danos/configd
      $ cd configd
  6. Install the build dependencies for the package you will be working on using the mk-build-deps script

    1. Example

      $ sudo mk-build-deps --install debian/control
  7. Build the package using the Debian build tools

    1. Example

      debuild -uc -us -i -b
    2. Note that you may see lintian warnings (W:) or non-fatal errors (E:). Before assuming your build has failed, check whether any ‘.deb’ files have been created / updated in the parent directory.

  8. Make your changes to the source

  9. Rebuild the package using the Debian build tools again

'

  • No labels