From fef655d362cb0c30c3397a1edc0af731d16c3c7c Mon Sep 17 00:00:00 2001 From: Silas McCroskey Date: Tue, 14 Feb 2017 22:44:17 +0700 Subject: [PATCH] debian: move ubuntu 14.04 files into new backports system `git diff'ed the main (cmaster) branch against the 14.04 branch to determine changed debian files, then pulled them into debian/backports via `git cat-file'. Added 'debian/patches' to the exclude file, since the existing patches interfere with the build and are unused by our build. Used '-0~ubuntu14.04+1' as the version extention, to denote: no patches (-0), debian packaging files changed for backport (+1). Original commit by Silas with updates on fork name by Martin Signed-off-by: Martin Winter --- debian/backports/ubuntu14.04/debian/control | 45 +++++++++ .../backports/ubuntu14.04/debian/frr.install | 24 +++++ debian/backports/ubuntu14.04/debian/rules | 98 +++++++++++++++++++ .../ubuntu14.04/debian/source/format | 1 + debian/backports/ubuntu14.04/exclude | 1 + debian/backports/ubuntu14.04/versionext | 1 + 6 files changed, 170 insertions(+) create mode 100644 debian/backports/ubuntu14.04/debian/control create mode 100644 debian/backports/ubuntu14.04/debian/frr.install create mode 100644 debian/backports/ubuntu14.04/debian/rules create mode 100644 debian/backports/ubuntu14.04/debian/source/format create mode 100644 debian/backports/ubuntu14.04/exclude create mode 100644 debian/backports/ubuntu14.04/versionext diff --git a/debian/backports/ubuntu14.04/debian/control b/debian/backports/ubuntu14.04/debian/control new file mode 100644 index 000000000..16bdc163a --- /dev/null +++ b/debian/backports/ubuntu14.04/debian/control @@ -0,0 +1,45 @@ +Source: frr +Section: net +Priority: optional +Maintainer: Nobody +Uploaders: Nobody +Build-Depends: debhelper (>= 7.0.50~), libncurses5-dev, libreadline-dev, texlive-latex-base, texlive-generic-recommended, libpam0g-dev | libpam-dev, libcap-dev, texinfo (>= 4.7), imagemagick, ghostscript, groff, po-debconf, autotools-dev, hardening-wrapper, libpcre3-dev, gawk, chrpath, libsnmp-dev, git, dh-autoreconf, libjson0, libjson0-dev, python-ipaddr +Standards-Version: 3.9.6 +Homepage: http://www.freerangerouting.org/ +XS-Testsuite: autopkgtest + +Package: frr +Architecture: any +Depends: ${shlibs:Depends}, logrotate (>= 3.2-11), ${misc:Depends} +Pre-Depends: adduser +Conflicts: zebra, zebra-pj +Replaces: zebra, zebra-pj +Suggests: snmpd +Description: BGP/OSPF/RIP/RIPng/ISIS/PIM/LDP routing daemon forked from Quagga + FRR is free software which manages TCP/IP based routing protocols. + It supports BGP4, BGP4+, OSPFv2, OSPFv3, IS-IS, RIPv1, RIPv2, RIPng, + PIM and LDP as well as the IPv6 versions of these. + . + FRR is a fork of Quagga with an open community model. The main git + lives on https://github.com/freerangerouting/frr.git + +Package: frr-dbg +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, frr (= ${binary:Version}) +Priority: extra +Section: debug +Description: BGP/OSPF/RIP/RIPng/ISIS/PIM/LDP routing daemon forked from Quagga (debug symbols) + This package provides debugging symbols for all binary packages built + from frr source package. It's highly recommended to have this package + installed before reporting any FRR crashes to either FRR developers or + Debian package maintainers. + +Package: frr-doc +Section: net +Architecture: all +Depends: ${misc:Depends} +Suggests: frr +Description: Documentation files for FRR + This package includes info files for frr, a free software which manages + TCP/IP based routing protocols. It supports BGP4, BGP4+, OSPFv2, OSPFv3, + IS-IS, RIPv1, RIPv2, RIPng, PIM and LDP as well as the IPv6 versions of these. diff --git a/debian/backports/ubuntu14.04/debian/frr.install b/debian/backports/ubuntu14.04/debian/frr.install new file mode 100644 index 000000000..95916754e --- /dev/null +++ b/debian/backports/ubuntu14.04/debian/frr.install @@ -0,0 +1,24 @@ +etc/frr/ +usr/bin/vtysh +usr/include/frr/ +usr/lib/ +tools/frr-reload.py usr/lib/frr/ +tools/frr etc/init.d/ +usr/share/doc/frr/ +usr/share/man/man1/vtysh.1 +usr/share/man/man1/frr.1 +usr/share/man/man8 +usr/share/man/man8/bgpd.8 +usr/share/man/man8/ospf6d.8 +usr/share/man/man8/ospfd.8 +usr/share/man/man8/ripd.8 +usr/share/man/man8/ripngd.8 +usr/share/man/man8/zebra.8 +usr/share/man/man8/isisd.8 +usr/share/man/man8/pimd.8 +usr/share/man/man8/ldpd.8 +usr/share/man/man8/watchfrr.8 +usr/share/snmp/mibs/ +cumulus/etc/* etc/ +tools/*.service lib/systemd/system +debian/frr.conf usr/lib/tmpfiles.d diff --git a/debian/backports/ubuntu14.04/debian/rules b/debian/backports/ubuntu14.04/debian/rules new file mode 100644 index 000000000..cf6307601 --- /dev/null +++ b/debian/backports/ubuntu14.04/debian/rules @@ -0,0 +1,98 @@ +#!/usr/bin/make -f + +export DH_VERBOSE=1 +export DEB_BUILD_HARDENING=1 +export DH_OPTIONS=-v + +ifeq ($(WANT_SNMP), 1) + USE_SNMP=--enable-snmp + $(warning "DEBIAN: SNMP enabled, sorry for your inconvenience") +else + $(warning "DEBIAN: SNMP disabled, see README.Debian") +endif + +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + DEBIAN_JOBS := $(subst parallel=,,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) +endif + +ifdef DEBIAN_JOBS +MAKEFLAGS += -j$(DEBIAN_JOBS) +endif + +%: + dh $@ --with=autoreconf --parallel --dbg-package=frr-dbg --list-missing + +override_dh_auto_configure: + # FRR needs /proc to check some BSD vs Linux specific stuff. + # Else it fails with an obscure error message pointing out that + # IPCTL_FORWARDING is an undefined symbol which is not very helpful. + @if ! [ -d /proc/1 ]; then \ + echo "./configure needs a mounted /proc"; \ + exit 1; \ + fi + + if ! [ -e config.status ]; then \ + dh_auto_configure -- \ + --enable-exampledir=/usr/share/doc/frr/examples/ \ + --localstatedir=/var/run/frr \ + --sbindir=/usr/lib/frr \ + --sysconfdir=/etc/frr \ + $(USE_SNMP) \ + --enable-ospfapi=yes \ + --enable-vtysh=yes \ + --enable-isisd=yes \ + --enable-multipath=256 \ + --enable-user=frr \ + --enable-group=frr \ + --enable-vty-group=frrvty \ + --enable-configfile-mask=0640 \ + --enable-logfile-mask=0640 \ + --enable-werror \ + --enable-gcc-rdynamic \ + --with-libpam \ + --enable-systemd=no \ + --disable-rr-semantics \ + --enable-poll=yes \ + --enable-cumulus=yes \ + --enable-pimd=no \ + --enable-dependency-tracking; \ + fi + +override_dh_auto_build: + #dh_auto_build + $(MAKE) + dh_auto_build -- -C doc draft-zebra-00.txt + + + # doc/ is a bit crazy +ifeq ($(GENERATE_PDF), 1) + dh_auto_build -- -C doc frr.pdf || true # pdfetex fails with exit code 1 but still produces a good looking .pdf +endif + rm -vf doc/frr.info + dh_auto_build -- -C doc frr.info + rm -vf doc/frr.info.html* + +override_dh_auto_test: + +override_dh_auto_install: + dh_auto_install + + # cleaning up the info dir + rm -f debian/tmp/usr/share/info/dir* + + # install config files + mkdir -p debian/tmp/etc/frr/ + perl -pi -e 's#^!log file #!log file /var/log/frr/#' debian/tmp/usr/share/doc/frr/examples/*sample* + + # installing the FRR specific SNMP MIB + install -D -m 644 ./zebra/GNOME-PRODUCT-ZEBRA-MIB debian/tmp/usr/share/snmp/mibs/GNOME-PRODUCT-ZEBRA-MIB + + # cleaning .la files + sed -i "/dependency_libs/ s/'.*'/''/" debian/tmp/usr/lib/*.la + +override_dh_systemd_start: + dh_systemd_start frr.service + +override_dh_systemd_enable: + dh_systemd_enable frr.service + diff --git a/debian/backports/ubuntu14.04/debian/source/format b/debian/backports/ubuntu14.04/debian/source/format new file mode 100644 index 000000000..163aaf8d8 --- /dev/null +++ b/debian/backports/ubuntu14.04/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/backports/ubuntu14.04/exclude b/debian/backports/ubuntu14.04/exclude new file mode 100644 index 000000000..6857a8d44 --- /dev/null +++ b/debian/backports/ubuntu14.04/exclude @@ -0,0 +1 @@ +debian/patches diff --git a/debian/backports/ubuntu14.04/versionext b/debian/backports/ubuntu14.04/versionext new file mode 100644 index 000000000..5ebeee771 --- /dev/null +++ b/debian/backports/ubuntu14.04/versionext @@ -0,0 +1 @@ +-0~ubuntu14.04+1 -- 2.39.2