]> git.proxmox.com Git - mirror_frr.git/commitdiff
debian: move ubuntu 12.04 files into new backports system
authorSilas McCroskey <smccroskey@cumulusnetworks.com>
Tue, 14 Feb 2017 15:34:56 +0000 (22:34 +0700)
committerMartin Winter <mwinter@opensourcerouting.org>
Tue, 10 Oct 2017 14:52:45 +0000 (07:52 -0700)
`git diff'ed the main (cmaster) branch against the 12.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~ubuntu12.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 <mwinter@opensourcerouting.org>
debian/backports/ubuntu12.04/debian/control [new file with mode: 0644]
debian/backports/ubuntu12.04/debian/frr.install [new file with mode: 0644]
debian/backports/ubuntu12.04/debian/frr.postinst [new file with mode: 0644]
debian/backports/ubuntu12.04/debian/rules [new file with mode: 0644]
debian/backports/ubuntu12.04/debian/source/format [new file with mode: 0644]
debian/backports/ubuntu12.04/exclude [new file with mode: 0644]
debian/backports/ubuntu12.04/versionext [new file with mode: 0644]

diff --git a/debian/backports/ubuntu12.04/debian/control b/debian/backports/ubuntu12.04/debian/control
new file mode 100644 (file)
index 0000000..da7aa03
--- /dev/null
@@ -0,0 +1,45 @@
+Source: frr
+Section: net
+Priority: optional
+Maintainer: Nobody <nobody@freerangerouting.org>
+Uploaders: Nobody <nobody@freerangerouting.org>
+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, quagga
+Replaces: zebra, zebra-pj, quagga
+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/ubuntu12.04/debian/frr.install b/debian/backports/ubuntu12.04/debian/frr.install
new file mode 100644 (file)
index 0000000..9591675
--- /dev/null
@@ -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/ubuntu12.04/debian/frr.postinst b/debian/backports/ubuntu12.04/debian/frr.postinst
new file mode 100644 (file)
index 0000000..d4c33cd
--- /dev/null
@@ -0,0 +1,48 @@
+#!/bin/bash -e
+
+######################
+PASSWDFILE=/etc/passwd
+GROUPFILE=/etc/group
+
+frruid=`egrep "^frr:" $PASSWDFILE | awk -F ":" '{ print $3 }'`
+frrgid=`egrep "^frr:" $GROUPFILE | awk -F ":" '{ print $3 }'`
+frrvtygid=`egrep "^frrvty:" $GROUPFILE | awk -F ":" '{ print $3 }'`
+
+[ -n ${frruid} ]    || (echo "No uid for frr in ${PASSWDFILE}"   && /bin/false)
+[ -n ${frrgid} ]    || (echo "No gid for frr in ${GROUPFILE}"    && /bin/false)
+[ -n ${frrVTYgid} ] || (echo "No gid for frrvty in ${GROUPFILE}" && /bin/false)
+
+chown -R ${frruid}:${frrgid} /etc/frr
+touch /etc/frr/vtysh.conf
+chgrp ${frrvtygid} /etc/frr/vtysh*
+chmod 440 /etc/sudoers.d/frr_sudoers
+chmod 644 /etc/frr/*
+
+ENVIRONMENTFILE=/etc/environment
+if ! grep --quiet VTYSH_PAGER=/bin/cat ${ENVIRONMENTFILE}; then
+    echo "VTYSH_PAGER=/bin/cat"  >> ${ENVIRONMENTFILE}
+fi
+##################################################
+
+if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
+${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*"}
+
+# This is most likely due to the answer "no" to the "really stop the server"
+# question in the prerm script.
+if [ "$1" = "abort-upgrade" ]; then
+  exit 0
+fi
+
+. /usr/share/debconf/confmodule
+
+db_stop
+
+if [ -x "/etc/init.d/frr" ] || [ -e "/etc/init/frr.conf" ]; then
+       if [ ! -e "/etc/init/frr.conf" ]; then
+               update-rc.d frr defaults >/dev/null
+       fi
+       invoke-rc.d frr start || exit $?
+fi
+
+#DEBHELPER#
+
diff --git a/debian/backports/ubuntu12.04/debian/rules b/debian/backports/ubuntu12.04/debian/rules
new file mode 100644 (file)
index 0000000..122405a
--- /dev/null
@@ -0,0 +1,92 @@
+#!/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 \
+               --enable-poll=yes \
+               --enable-cumulus=yes \
+               --disable-rr-semantics \
+               --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
+
diff --git a/debian/backports/ubuntu12.04/debian/source/format b/debian/backports/ubuntu12.04/debian/source/format
new file mode 100644 (file)
index 0000000..163aaf8
--- /dev/null
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/backports/ubuntu12.04/exclude b/debian/backports/ubuntu12.04/exclude
new file mode 100644 (file)
index 0000000..6857a8d
--- /dev/null
@@ -0,0 +1 @@
+debian/patches
diff --git a/debian/backports/ubuntu12.04/versionext b/debian/backports/ubuntu12.04/versionext
new file mode 100644 (file)
index 0000000..0a8f3c9
--- /dev/null
@@ -0,0 +1 @@
+-0~ubuntu12.04+1