Skip to content

Ubuntu packaging guide

Mingwei Zhang edited this page Mar 25, 2019 · 15 revisions

Package requirements

Mostly wandio dependecies:

sudo apt-get install zlib1g-dev libbz2-dev libcurl4-openssl-dev debhelper autotools-dev

Build Steps:

  1. download bgpstream tar file
  2. type command similar to bzr dh-make hello 2.10 hello-2.10.tar.gz to extract tar file and create temporary debian/ directory
    • select single for package type
  3. remove *ex *EX files
  4. modify control file
  5. modify rules file (mainly to avoid dependency error)
  6. build package by dpkg-buildpackage -us -uc
  7. examine package content by dpkg --contents ../PACKAGE.deb

Important configuration files

debian/control

Source: bgpstream
Section: Network
Priority: optional
Maintainer: Mingwei Zhang <mingwei@caida.org>
Build-Depends: debhelper (>=9),autotools-dev
Standards-Version: 3.9.6
Homepage: https://bgpstream.caida.org

Package: bgpstream
Architecture: any
# Depends: ${shlibs:Depends}, ${misc:Depends}
Description: BGPStream main package
BGPStream - An open-source software framework for live and historical BGP data analysis,
supporting scientific research, operational monitoring, and post-event analysis.

debian/rules

#!/usr/bin/make -f

%:
  dh $@  --with autotools_dev


override_dh_shlibdeps:
  dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info

New Installation Guide

Build local repository with Freight

https://github.com/freight-team/freight

remove package from freight: https://oitibs.com/remove-package-from-freight/

Add freight repository to you local system

echo "deb http://hammer02.caida.org:18080 $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/bgpstream.list
sudo wget -O /etc/apt/trusted.gpg.d/bgpstream.gpg http://hammer02.caida.org:18080/keyring.gpg
sudo apt-get update

BGPStream 1.2.0

BGPStream 1.2.0 consists of three sub-packages:

  1. bgpstream1-tools: includes bgpreader and bgpcorsaro binaries
  2. libbgpstream1: includes run-time shared libraries, which is also depended by bgpstream-tools
  3. libbgpstream1-dev: includes C header files, which is dependended by pybgpstream project

To install any of the package, you will need to first add freight repository to your local system (the step above). Then you can just standard apt-get install command to install any of the subpackages. The dependencies should be automatically taken care of.

sudo apt-get -y install bgpstream1-tools

Fresh machine build guide

  1. check out github code with debian folder
  2. run autogen.sh first
  3. install necessary dependencies: libwandio1-dev (4.0)
  4. run debuild -uc -us

Reference

Build guide:

Detailed guide on writing the debian subfolder files:

Disable wandio dependency check:

What's in the debian directory:

Create PPA: