diff --git a/.gitignore b/.gitignore index 7ed1255d9e..f7c731b4bc 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,7 @@ aclocal.m4 Makefile.in *.tar.gz *.tar.gz.asc +*.tar.?z .nfs* libtool .libs @@ -61,6 +62,10 @@ debian/frr.prerm.debhelper debian/frr.substvars debian/frr/ debian/tmp/ +*.deb +*.ddeb +*.dsc +*.changes *.pyc *.swp cscope.* diff --git a/Makefile.am b/Makefile.am index 15f86dff4f..dfa9d7a175 100644 --- a/Makefile.am +++ b/Makefile.am @@ -64,6 +64,7 @@ DIST_SUBDIRS = . bgpd \ vtysh doc tests \ solaris bgpd/rfp-example/librfp \ bgpd/rfp-example/rfptest \ + debianpkg \ # end if PKGSRC diff --git a/configure.ac b/configure.ac index 41ebab6a16..6c73391afa 100755 --- a/configure.ac +++ b/configure.ac @@ -1839,6 +1839,8 @@ AC_CONFIG_FILES([Makefile doc/Makefile tests/Makefile bgpd/rfp-example/rfptest/Makefile bgpd/rfp-example/librfp/Makefile redhat/frr.spec + debianpkg/Makefile + debianpkg/changelog snapcraft/snapcraft.yaml lib/version.h tests/lib/cli/test_cli.refout diff --git a/debian/control b/debian/control deleted file mode 100644 index 84b04c347d..0000000000 --- a/debian/control +++ /dev/null @@ -1,48 +0,0 @@ -Source: frr -Section: net -Priority: optional -Maintainer: Christian Hammers -Uploaders: Florian Weimer -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, dh-systemd, libsystemd-dev, python-ipaddr, bison, flex, libc-ares-dev, python3-dev -Standards-Version: 3.9.6 -Homepage: http://www.frr.net/ -XS-Testsuite: autopkgtest - -Package: frr -Architecture: any -Depends: ${shlibs:Depends}, logrotate (>= 3.2-11), iproute2 | iproute, ${misc:Depends}, libc-ares2 -Pre-Depends: adduser -Conflicts: zebra, zebra-pj, quagga -Replaces: zebra, zebra-pj -Suggests: snmpd -Description: BGP/OSPF/RIP routing daemon - Frr is free software which manages TCP/IP based routing protocols. - It supports BGP4, BGP4+, OSPFv2, OSPFv3, IS-IS, RIPv1, RIPv2, and RIPng as - well as the IPv6 versions of these. - . - Frr uses threading if the kernel supports it, but can also run on - kernels that do not support threading. Each protocol has its own daemon. - . - It is more than a routed replacement, it can be used as a Route Server and - a Route Reflector. - -Package: frr-dbg -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, frr (= ${binary:Version}) -Priority: extra -Section: debug -Description: BGP/OSPF/RIP routing daemon (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, and RIPng as well as the IPv6 versions of these. diff --git a/debian/frr-doc.install b/debian/frr-doc.install deleted file mode 100644 index d2d3f1bbd9..0000000000 --- a/debian/frr-doc.install +++ /dev/null @@ -1 +0,0 @@ -usr/share/info diff --git a/debian/frr.config b/debian/frr.config deleted file mode 100644 index f642bea1d5..0000000000 --- a/debian/frr.config +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -e - -. /usr/share/debconf/confmodule - diff --git a/debian/patches/50_vtysh__vtysh.conf.sample.diff b/debian/patches/50_vtysh__vtysh.conf.sample.diff deleted file mode 100644 index d60581f70c..0000000000 --- a/debian/patches/50_vtysh__vtysh.conf.sample.diff +++ /dev/null @@ -1,16 +0,0 @@ -Description: Change example to make it compatible with the Debian init scripts - per default. -Author: Christian Hammers - ---- old/vtysh/vtysh.conf.sample.orig 2004-10-30 23:07:40.000000000 +0200 -+++ new/vtysh/vtysh.conf.sample 2004-10-30 23:08:24.000000000 +0200 -@@ -1,7 +1,7 @@ - ! - ! Sample configuration file for vtysh. - ! --!service integrated-vtysh-config -+service integrated-vtysh-config - !hostname quagga-router --!username root nopassword -+username root nopassword - ! diff --git a/debian/patches/75_vtysh__vtysh.c__PAGER.diff b/debian/patches/75_vtysh__vtysh.c__PAGER.diff deleted file mode 100644 index 2dbf6b2441..0000000000 --- a/debian/patches/75_vtysh__vtysh.c__PAGER.diff +++ /dev/null @@ -1,26 +0,0 @@ -Description: Use the pager program that was choosen with the Debian - update-alternative system. (Updated line numbers for 0.99.22) -Author: Christian Hammers - ---- old/vtysh/vtysh.c.orig 2004-10-18 01:23:16.000000000 +0200 -+++ new/vtysh/vtysh.c 2004-10-18 01:25:15.000000000 +0200 -@@ -265,10 +265,16 @@ - - pager_defined = getenv ("VTYSH_PAGER"); - -- if (pager_defined) -+ if (pager_defined) { - vtysh_pager_name = strdup (pager_defined); -- else -- vtysh_pager_name = strdup ("more"); -+ } else { -+ struct stat pager_stat; -+ if (stat("/usr/bin/pager", &pager_stat) == 0) { -+ vtysh_pager_name = strdup ("/usr/bin/pager"); -+ } else { -+ vtysh_pager_name = strdup ("more"); -+ } -+ } - } - - /* Command execution over the vty interface. */ diff --git a/debian/patches/80_vtysh__vtysh.c__privs.diff b/debian/patches/80_vtysh__vtysh.c__privs.diff deleted file mode 100644 index 863c81391f..0000000000 --- a/debian/patches/80_vtysh__vtysh.c__privs.diff +++ /dev/null @@ -1,59 +0,0 @@ -Description: Fixes group permission. (line numbers adjusted for 0.99.22) - -Index: quagga-0.99.23.1/vtysh/vtysh.c -=================================================================== ---- quagga-0.99.23.1.orig/vtysh/vtysh.c 2015-04-16 07:58:08.000000000 -0700 -+++ quagga-0.99.23.1/vtysh/vtysh.c 2015-04-16 08:02:16.108035000 -0700 -@@ -26,6 +26,8 @@ - #include - #include - #include -+#include -+#include - - #include - #include -@@ -2026,6 +2028,9 @@ - char line[] = "write terminal\n"; - FILE *fp, *fp1; - -+ /* Setting file permissions */ -+ struct group *quagga_vty_group; -+ - fprintf (stdout,"Building Configuration...\n"); - - backup_config_file(integrate_default); -@@ -2058,16 +2063,31 @@ - - fclose (fp); - -+ errno = 0; -+ if ((quagga_vty_group = getgrnam(VTY_GROUP)) == NULL) -+ { -+ fprintf (stdout, "%% Can't get group %s: %s (%d)\n", -+ VTY_GROUP, strerror(errno), errno); -+ return CMD_WARNING; -+ } -+ -+ if ((chown(integrate_default, -1, quagga_vty_group->gr_gid)) != 0) -+ { -+ fprintf (stdout,"%% Can't chown configuration file %s: %s (%d)\n", -+ integrate_default, strerror(errno), errno); -+ return CMD_WARNING; -+ } -+ - if (chmod (integrate_default, CONFIGFILE_MASK) != 0) - { -- fprintf (stdout,"%% Can't chmod configuration file %s: %s (%d)\n", -+ fprintf (stdout,"%% Can't chmod configuration file %s: %s (%d)\n", - integrate_default, safe_strerror(errno), errno); - return CMD_WARNING; - } - - if (chmod (host.config, CONFIGFILE_MASK) != 0) - { -- fprintf (stdout,"%% Can't chmod configuration file %s: %s (%d)\n", -+ fprintf (stdout,"%% Can't chmod configuration file %s: %s (%d)\n", - integrate_default, safe_strerror(errno), errno); - return CMD_WARNING; - } diff --git a/debian/patches/82_vtysh__vtysh_user.c__pam.diff b/debian/patches/82_vtysh__vtysh_user.c__pam.diff deleted file mode 100644 index 5358ed8870..0000000000 --- a/debian/patches/82_vtysh__vtysh_user.c__pam.diff +++ /dev/null @@ -1,10 +0,0 @@ -Description: Adds explanation why vtysh does not work if PAM fails. -Author: Christian Hammers - ---- old/vtysh/vtysh_user.c.orig 2006-11-03 01:53:58.000000000 +0100 -+++ new/vtysh/vtysh_user.c 2006-11-03 01:59:02.000000000 +0100 -@@ -60,2 +60,4 @@ vtysh_pam (const char *user) - ret = pam_authenticate (pamh, 0); -+ if (ret != PAM_SUCCESS) -+ printf("Not authenticated. Check /etc/pam.d/quagga.\n"); - /* printf ("ret %d\n", ret); */ diff --git a/debian/patches/90_configure_ncurses.diff b/debian/patches/90_configure_ncurses.diff deleted file mode 100644 index 9d3dbb15d1..0000000000 --- a/debian/patches/90_configure_ncurses.diff +++ /dev/null @@ -1,47 +0,0 @@ -Description: To make checklib happy. - See http://rerun.lefant.net/checklib/log.quagga_0.99.5-1.html - (adjusted for 0.99.2) -Author: Christian Hammers - ---- old/configure 2011-09-27 00:30:23.000000000 +0200 -+++ new/configure 2011-09-27 00:30:28.000000000 +0200 -@@ -14207,7 +14207,8 @@ - $as_echo_n "(cached) " >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-ltermcap $LIBS" -+#42#DEBIAN# LIBS="-ltermcap $LIBS" -+LIBS="$LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -14238,7 +14238,8 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tputs" >&5 - $as_echo "$ac_cv_lib_termcap_tputs" >&6; } - if test "x$ac_cv_lib_termcap_tputs" = xyes; then : -- LIBREADLINE="$LIBREADLINE -ltermcap" -+ #42#DEBIAN# LIBREADLINE="$LIBREADLINE -ltermcap" -+ LIBREADLINE="$LIBREADLINE " - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tputs in -ltinfo" >&5 - $as_echo_n "checking for tputs in -ltinfo... " >&6; } -@@ -14285,7 +14289,8 @@ - $as_echo_n "(cached) " >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lcurses $LIBS" -+#42#DEBIAN# LIBS="-lcurses $LIBS" -+LIBS="$LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - -@@ -14355,7 +14355,8 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tputs" >&5 - $as_echo "$ac_cv_lib_ncurses_tputs" >&6; } - if test "x$ac_cv_lib_ncurses_tputs" = xyes; then : -- LIBREADLINE="$LIBREADLINE -lncurses" -+ #42#DEBIAN# LIBREADLINE="$LIBREADLINE -lncurses" -+ LIBREADLINE="$LIBREADLINE" - fi - - diff --git a/debian/patches/series b/debian/patches/series deleted file mode 100644 index b3f6cc1452..0000000000 --- a/debian/patches/series +++ /dev/null @@ -1,5 +0,0 @@ -90_configure_ncurses.diff -82_vtysh__vtysh_user.c__pam.diff -80_vtysh__vtysh.c__privs.diff -75_vtysh__vtysh.c__PAGER.diff -50_vtysh__vtysh.conf.sample.diff diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in deleted file mode 100644 index 04d24252cd..0000000000 --- a/debian/po/POTFILES.in +++ /dev/null @@ -1 +0,0 @@ -[type: gettext/rfc822deb] quagga.templates diff --git a/debian/po/cs.po b/debian/po/cs.po deleted file mode 100644 index df4f47d914..0000000000 --- a/debian/po/cs.po +++ /dev/null @@ -1,41 +0,0 @@ -# -# Translators, if you are not familiar with the PO format, gettext -# documentation is worth reading, especially sections dedicated to -# this format, e.g. by running: -# info -n '(gettext)PO Files' -# info -n '(gettext)Header Entry' -# -# Some information specific to po-debconf are available at -# /usr/share/doc/po-debconf/README-trans -# or http://www.debian.org/intl/l10n/po-debconf/README-trans -# -# Developers do not need to manually edit POT or PO files. -# -msgid "" -msgstr "" -"Project-Id-Version: quagga\n" -"Report-Msgid-Bugs-To: ch@debian.org\n" -"POT-Creation-Date: 2006-07-15 20:31+0200\n" -"PO-Revision-Date: 2005-07-13 18:52+0200\n" -"Last-Translator: Miroslav Kure \n" -"Language-Team: Czech \n" -"Language: cs\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#. Type: boolean -#. Description -#: ../quagga.templates:1001 -msgid "Do you really want to stop the Quagga daemon?" -msgstr "Opravdu chcete zastavit daemon Quagga?" - -#. Type: boolean -#. Description -#: ../quagga.templates:1001 -msgid "" -"WARNING: The Quagga routing daemon has to be stopped to proceed. This could " -"lead to BGP flaps or loss of network connectivity." -msgstr "" -"VAROVÁNÍ: Abyste mohli pokračovat, musí se směrovací daemon Quagga " -"pozastavit. To může vést ke zpanikaření BGP nebo ke ztrátě konektivity." diff --git a/debian/po/da.po b/debian/po/da.po deleted file mode 100644 index 22b2d56c66..0000000000 --- a/debian/po/da.po +++ /dev/null @@ -1,33 +0,0 @@ -# Danish translation quagga. -# Copyright (C) 2010 quagga & nedenstående oversættere. -# This file is distributed under the same license as the quagga package. -# Joe Hansen , 2010. -# -msgid "" -msgstr "" -"Project-Id-Version: quagga\n" -"Report-Msgid-Bugs-To: ch@debian.org\n" -"POT-Creation-Date: 2006-07-15 20:31+0200\n" -"PO-Revision-Date: 2010-09-09 23:51+0200\n" -"Last-Translator: Joe Hansen \n" -"Language-Team: Danish \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#. Type: boolean -#. Description -#: ../quagga.templates:1001 -msgid "Do you really want to stop the Quagga daemon?" -msgstr "Ønsker du virkelig at stoppe dæmonen Quagga?" - -#. Type: boolean -#. Description -#: ../quagga.templates:1001 -msgid "" -"WARNING: The Quagga routing daemon has to be stopped to proceed. This could " -"lead to BGP flaps or loss of network connectivity." -msgstr "" -"ADVARSEL: Ruteplanlægningsdæmonen Quagga skal stoppes for at fortsætte. " -"Dette kan føre til BGP-udfald eller tab af netværksforbindelse." diff --git a/debian/po/de.po b/debian/po/de.po deleted file mode 100644 index cbf919e2e5..0000000000 --- a/debian/po/de.po +++ /dev/null @@ -1,34 +0,0 @@ -# translation of po-debconf template to German -# Copyright (C) 2007, Matthias Julius -# This file is distributed under the same license as the quagga package. -# -# Matthias Julius , 2007. -msgid "" -msgstr "" -"Project-Id-Version: quagga 0.99.6-2\n" -"Report-Msgid-Bugs-To: ch@debian.org\n" -"POT-Creation-Date: 2006-07-15 20:31+0200\n" -"PO-Revision-Date: 2007-02-01 19:32-0500\n" -"Last-Translator: Matthias Julius \n" -"Language-Team: German \n" -"Language: de\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: KBabel 1.11.4\n" - -#. Type: boolean -#. Description -#: ../quagga.templates:1001 -msgid "Do you really want to stop the Quagga daemon?" -msgstr "Möchten Sie den Quagga-Daemon wirklich beenden?" - -#. Type: boolean -#. Description -#: ../quagga.templates:1001 -msgid "" -"WARNING: The Quagga routing daemon has to be stopped to proceed. This could " -"lead to BGP flaps or loss of network connectivity." -msgstr "" -"Warnung: Um fortzufahren muss der Quagga-Routing-Daemon beendet werden. Dies " -"könnte zu BGP-Flaps oder Verlust der Netzwerkverbindung führen." diff --git a/debian/po/es.po b/debian/po/es.po deleted file mode 100644 index 3b9e421a48..0000000000 --- a/debian/po/es.po +++ /dev/null @@ -1,57 +0,0 @@ -# quagga translation to spanish -# Copyright (C) 2004 Software in the Public Interest -# This file is distributed under the same license as the quagga package. -# -# Changes: -# - Initial translation -# Carlos Galisteo de Cabo , 2007 -# -# -# Traductores, si no conoce el formato PO, merece la pena leer la -# documentacin de gettext, especialmente las secciones dedicadas a este -# formato, por ejemplo ejecutando: -# info -n '(gettext)PO Files' -# info -n '(gettext)Header Entry' -# -# Equipo de traduccin al espaol, por favor lean antes de traducir -# los siguientes documentos: -# -# - El proyecto de traduccin de Debian al espaol -# http://www.debian.org/intl/spanish/coordinacion -# especialmente las notas de traduccin en -# http://www.debian.org/intl/spanish/notas -# -# - La gua de traduccin de po's de debconf: -# /usr/share/doc/po-debconf/README-trans -# o http://www.debian.org/intl/l10n/po-debconf/README-trans -# -msgid "" -msgstr "" -"Project-Id-Version: quagga_0.99.7-2\n" -"Report-Msgid-Bugs-To: ch@debian.org\n" -"POT-Creation-Date: 2006-07-15 20:31+0200\n" -"PO-Revision-Date: 2007-05-08 12:39+0200\n" -"Last-Translator: Carlos Galisteo \n" -"Language-Team: \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=ISO-8859-15\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: KBabel 1.11.4\n" - -#. Type: boolean -#. Description -#: ../quagga.templates:1001 -msgid "Do you really want to stop the Quagga daemon?" -msgstr "Est seguro de que quiere detener el servicio Quagga?" - -#. Type: boolean -#. Description -#: ../quagga.templates:1001 -msgid "" -"WARNING: The Quagga routing daemon has to be stopped to proceed. This could " -"lead to BGP flaps or loss of network connectivity." -msgstr "" -"ADVERTENCIA: Debe detenerse el servicio de encaminamiento Quagga para " -"continuar. sto podra provocar intermitencias en BGP o prdidas de " -"conectividad." diff --git a/debian/po/fr.po b/debian/po/fr.po deleted file mode 100644 index a96649d2fd..0000000000 --- a/debian/po/fr.po +++ /dev/null @@ -1,42 +0,0 @@ -# -# Translators, if you are not familiar with the PO format, gettext -# documentation is worth reading, especially sections dedicated to -# this format, e.g. by running: -# info -n '(gettext)PO Files' -# info -n '(gettext)Header Entry' -# -# Some information specific to po-debconf are available at -# /usr/share/doc/po-debconf/README-trans -# or http://www.debian.org/intl/l10n/po-debconf/README-trans -# -# Developers do not need to manually edit POT or PO files. -# -msgid "" -msgstr "" -"Project-Id-Version: quagga 0.99.1-3\n" -"Report-Msgid-Bugs-To: ch@debian.org\n" -"POT-Creation-Date: 2006-07-15 20:31+0200\n" -"PO-Revision-Date: 2005-07-21 10:52+0200\n" -"Last-Translator: Mohammed Adnne Trojette\n" -"Language-Team: French \n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-15\n" -"Content-Transfer-Encoding: 8bit\n" - -#. Type: boolean -#. Description -#: ../quagga.templates:1001 -msgid "Do you really want to stop the Quagga daemon?" -msgstr "Faut-il vraiment arrter le dmon Quagga?" - -#. Type: boolean -#. Description -#: ../quagga.templates:1001 -msgid "" -"WARNING: The Quagga routing daemon has to be stopped to proceed. This could " -"lead to BGP flaps or loss of network connectivity." -msgstr "" -"Veuillez noter que le dmon de routage Quagga doit tre arrt avant de " -"poursuivre cette installation. Cela peut provoquer des incohrences BGP ou " -"des pertes de connectivit." diff --git a/debian/po/it.po b/debian/po/it.po deleted file mode 100644 index d305956685..0000000000 --- a/debian/po/it.po +++ /dev/null @@ -1,35 +0,0 @@ -# Italian translation of quagga debconf messages -# Copyright (C) 2013, quagga package copyright holder -# This file is distributed under the same license as the quagga package. -# Beatrice Torracca , 2013. -msgid "" -msgstr "" -"Project-Id-Version: quagga\n" -"Report-Msgid-Bugs-To: ch@debian.org\n" -"POT-Creation-Date: 2006-07-15 20:31+0200\n" -"PO-Revision-Date: 2013-11-03 11:52+0200\n" -"Last-Translator: Beatrice Torracca \n" -"Language-Team: Italian \n" -"Language: it\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Virtaal 0.7.1\n" - -#. Type: boolean -#. Description -#: ../quagga.templates:1001 -msgid "Do you really want to stop the Quagga daemon?" -msgstr "Arrestare veramente il demone Quagga?" - -#. Type: boolean -#. Description -#: ../quagga.templates:1001 -msgid "" -"WARNING: The Quagga routing daemon has to be stopped to proceed. This could " -"lead to BGP flaps or loss of network connectivity." -msgstr "" -"ATTENZIONE: per procedere il demone di instradamento Quagga deve essere " -"fermato. Questo può portare a flap BGP o a perdita della connettività di " -"rete." diff --git a/debian/po/ja.po b/debian/po/ja.po deleted file mode 100644 index 0991d99236..0000000000 --- a/debian/po/ja.po +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (C) 2008 Christian Hammers -# This file is distributed under the same license as quagga package. -# Hideki Yamane (Debian-JP) , 2008. -# -msgid "" -msgstr "" -"Project-Id-Version: quagga 0.99.11-1\n" -"Report-Msgid-Bugs-To: ch@debian.org\n" -"POT-Creation-Date: 2006-07-15 20:31+0200\n" -"PO-Revision-Date: 2008-12-28 22:26+0900\n" -"Last-Translator: Hideki Yamane (Debian-JP) \n" -"Language-Team: Japanese \n" -"Language: ja\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#. Type: boolean -#. Description -#: ../quagga.templates:1001 -msgid "Do you really want to stop the Quagga daemon?" -msgstr "Quagga デーモンを本当に停止しますか?" - -#. Type: boolean -#. Description -#: ../quagga.templates:1001 -msgid "" -"WARNING: The Quagga routing daemon has to be stopped to proceed. This could " -"lead to BGP flaps or loss of network connectivity." -msgstr "" -"警告: Quagga ルーティングデーモンの停止が実施されました。これによって BGP " -"ルートフラップの発生やネットワーク接続の切断が起こされる可能性があります。" diff --git a/debian/po/nl.po b/debian/po/nl.po deleted file mode 100644 index a9df615e0c..0000000000 --- a/debian/po/nl.po +++ /dev/null @@ -1,35 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: quagga\n" -"Report-Msgid-Bugs-To: ch@debian.org\n" -"POT-Creation-Date: 2006-07-15 20:31+0200\n" -"PO-Revision-Date: 2007-03-15 18:49+0100\n" -"Last-Translator: Bart Cornelis \n" -"Language-Team: debian-l10n-dutch \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Language: Dutch\n" - -#. Type: boolean -#. Description -#: ../quagga.templates:1001 -msgid "Do you really want to stop the Quagga daemon?" -msgstr "Bent u zeker dat u de Quagga-achtergronddienst wilt stoppen?" - -#. Type: boolean -#. Description -#: ../quagga.templates:1001 -msgid "" -"WARNING: The Quagga routing daemon has to be stopped to proceed. This could " -"lead to BGP flaps or loss of network connectivity." -msgstr "" -"WAARSCHUWING: De Quagga 'routing'-achtergronddienst dient stopgezet te " -"worden voor u verder gaat. Dit kan BGP-flaps en verliezen van " -"netwerkverbinding veroorzaken." diff --git a/debian/po/pt.po b/debian/po/pt.po deleted file mode 100644 index 05f9b2e383..0000000000 --- a/debian/po/pt.po +++ /dev/null @@ -1,34 +0,0 @@ -# Portuguese translations for quagga package. -# Copyright (C) 2007 Miguel Figueiredo -# This file is distributed under the same license as the quagga package. -# Miguel Figueiredo , 2007. -# -msgid "" -msgstr "" -"Project-Id-Version: quagga 0.99.6-6\n" -"Report-Msgid-Bugs-To: ch@debian.org\n" -"POT-Creation-Date: 2006-07-15 20:31+0200\n" -"PO-Revision-Date: 2007-04-26 23:07+0100\n" -"Last-Translator: Miguel Figueiredo \n" -"Language-Team: Portuguese \n" -"Language: pt\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. Type: boolean -#. Description -#: ../quagga.templates:1001 -msgid "Do you really want to stop the Quagga daemon?" -msgstr "Deseja mesmo parar o daemon Quagga?" - -#. Type: boolean -#. Description -#: ../quagga.templates:1001 -msgid "" -"WARNING: The Quagga routing daemon has to be stopped to proceed. This could " -"lead to BGP flaps or loss of network connectivity." -msgstr "" -"AVISO: O daemon de routing tem de ser parado para continuar. Isto pode levar " -"a distúrbio do BGP ou perda da ligação de rede." diff --git a/debian/po/pt_BR.po b/debian/po/pt_BR.po deleted file mode 100644 index 49b399c3e7..0000000000 --- a/debian/po/pt_BR.po +++ /dev/null @@ -1,34 +0,0 @@ -# quagga Brazilian Portuguese po-debconf translation -# Copyright (C) 2007 THE quagga'S COPYRIGHT HOLDER -# This file is distributed under the same license as the quagga package. -# Jefferson Alexandre dos Santos , 2007. -msgid "" -msgstr "" -"Project-Id-Version: quagga\n" -"Report-Msgid-Bugs-To: ch@debian.org\n" -"POT-Creation-Date: 2006-07-15 20:31+0200\n" -"PO-Revision-Date: 2007-09-29 00:34-0300\n" -"Last-Translator: Jefferson Alexandre dos Santos\n" -"Language-Team: Brazilian Portuguese \n" -"Language: pt_BR\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#. Type: boolean -#. Description -#: ../quagga.templates:1001 -msgid "Do you really want to stop the Quagga daemon?" -msgstr "Você realmente deseja parar o daemon Quagga?" - -#. Type: boolean -#. Description -#: ../quagga.templates:1001 -msgid "" -"WARNING: The Quagga routing daemon has to be stopped to proceed. This could " -"lead to BGP flaps or loss of network connectivity." -msgstr "" -"AVISO: O daemon de roteamento Quagga precisa ser parado para prosseguir. " -"Isto pode causar \"BGP flaps\" ou perda de conectividade de rede." diff --git a/debian/po/ru.po b/debian/po/ru.po deleted file mode 100644 index e1db9d37d3..0000000000 --- a/debian/po/ru.po +++ /dev/null @@ -1,37 +0,0 @@ -# translation of ru.po to Russian -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# -# Yuri Kozlov , 2009. -msgid "" -msgstr "" -"Project-Id-Version: quagga 0.99.13-1\n" -"Report-Msgid-Bugs-To: ch@debian.org\n" -"POT-Creation-Date: 2006-07-15 20:31+0200\n" -"PO-Revision-Date: 2009-07-19 09:04+0400\n" -"Last-Translator: Yuri Kozlov \n" -"Language-Team: Russian \n" -"Language: ru\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: KBabel 1.11.4\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" -"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" - -#. Type: boolean -#. Description -#: ../quagga.templates:1001 -msgid "Do you really want to stop the Quagga daemon?" -msgstr "Действительно остановить службу Quagga?" - -#. Type: boolean -#. Description -#: ../quagga.templates:1001 -msgid "" -"WARNING: The Quagga routing daemon has to be stopped to proceed. This could " -"lead to BGP flaps or loss of network connectivity." -msgstr "" -"ПРЕДУПРЕЖДЕНИЕ: Для продолжения работы служба маршрутизации Quagga должна " -"быть остановлена. Это может привести к перестройке таблиц BGP или потере " -"связности узлов сети." diff --git a/debian/po/sv.po b/debian/po/sv.po deleted file mode 100644 index f97c5b8276..0000000000 --- a/debian/po/sv.po +++ /dev/null @@ -1,40 +0,0 @@ -# Translators, if you are not familiar with the PO format, gettext -# documentation is worth reading, especially sections dedicated to -# this format, e.g. by running: -# info -n '(gettext)PO Files' -# info -n '(gettext)Header Entry' -# Some information specific to po-debconf are available at -# /usr/share/doc/po-debconf/README-trans -# or http://www.debian.org/intl/l10n/po-debconf/README-trans -# Developers do not need to manually edit POT or PO files. -# , fuzzy -# -# -msgid "" -msgstr "" -"Project-Id-Version: quagga 0.99.1-6\n" -"Report-Msgid-Bugs-To: ch@debian.org\n" -"POT-Creation-Date: 2006-07-15 20:31+0200\n" -"PO-Revision-Date: 2005-10-04 06:56+0200\n" -"Last-Translator: Daniel Nylander \n" -"Language-Team: Swedish \n" -"Language: sv\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-1\n" -"Content-Transfer-Encoding: 8bit\n" - -#. Type: boolean -#. Description -#: ../quagga.templates:1001 -msgid "Do you really want to stop the Quagga daemon?" -msgstr "Vill du stoppa Quagga-daemonen?" - -#. Type: boolean -#. Description -#: ../quagga.templates:1001 -msgid "" -"WARNING: The Quagga routing daemon has to be stopped to proceed. This could " -"lead to BGP flaps or loss of network connectivity." -msgstr "" -"VARNING: routingdaemonen Quagga mste stoppas fr att fortstta. Detta kan " -"leda till BGP-flaps eller att ntverksfrbindelsen avbryts." diff --git a/debian/po/templates.pot b/debian/po/templates.pot deleted file mode 100644 index c6fb636872..0000000000 --- a/debian/po/templates.pot +++ /dev/null @@ -1,31 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: ch@debian.org\n" -"POT-Creation-Date: 2006-07-15 20:31+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#. Type: boolean -#. Description -#: ../quagga.templates:1001 -msgid "Do you really want to stop the Quagga daemon?" -msgstr "" - -#. Type: boolean -#. Description -#: ../quagga.templates:1001 -msgid "" -"WARNING: The Quagga routing daemon has to be stopped to proceed. This could " -"lead to BGP flaps or loss of network connectivity." -msgstr "" diff --git a/debian/rules b/debian/rules deleted file mode 100755 index 5744505e64..0000000000 --- a/debian/rules +++ /dev/null @@ -1,102 +0,0 @@ -#!/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=systemd,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=yes \ - --enable-poll=yes \ - --enable-cumulus=yes \ - --enable-pimd=yes \ - --enable-dependency-tracking \ - --enable-bgp-vnc=no; \ - 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 -ifeq ($(WANT_SNMP), 1) - install -D -m 644 ./zebra/GNOME-PRODUCT-ZEBRA-MIB debian/tmp/usr/share/snmp/mibs/GNOME-PRODUCT-ZEBRA-MIB -else - mkdir -p debian/tmp/usr/share/snmp/mibs/ -endif - - # 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/watch b/debian/watch deleted file mode 100644 index 46ff1c7dab..0000000000 --- a/debian/watch +++ /dev/null @@ -1,8 +0,0 @@ -# Example watch control file for uscan -# Rename this file to "watch" and then you can run the "uscan" command -# to check for upstream updates and more. -# Site Directory Pattern Version Script -version=3 -opts=uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha|b|a)[\-\.]?\d*)$/$1~$2/ \ - http://download.savannah.gnu.org/releases/frr/quagga-(\d.*)\.(?:tgz|tar\.(?:gz|bz2|xz)) -# Bart Martens Fri, 25 Jan 2013 06:38:53 +0000 diff --git a/debianpkg/Makefile.am b/debianpkg/Makefile.am new file mode 100644 index 0000000000..5ab5b4c4fc --- /dev/null +++ b/debianpkg/Makefile.am @@ -0,0 +1,38 @@ + +EXTRA_DIST = README.Debian README.Maintainer \ + changelog compat control copyright \ + rules source/format tests/control \ + tests/daemons watchfrr.rc \ + backports/README backports/rules \ + backports/debian8/debian/source/format \ + backports/debian8/exclude \ + backports/debian8/versionext \ + backports/debian9/debian/source/format \ + backports/debian9/exclude \ + backports/debian9/versionext \ + backports/ubuntu12.04/debian/control \ + backports/ubuntu12.04/debian/frr.install \ + backports/ubuntu12.04/debian/frr.postinst \ + backports/ubuntu12.04/debian/frr.postrm \ + backports/ubuntu12.04/debian/rules \ + backports/ubuntu12.04/debian/source/format \ + backports/ubuntu12.04/exclude \ + backports/ubuntu12.04/versionext \ + backports/ubuntu14.04/debian/control \ + backports/ubuntu14.04/debian/frr.install \ + backports/ubuntu14.04/debian/frr.postinst \ + backports/ubuntu14.04/debian/frr.postrm \ + backports/ubuntu14.04/debian/rules \ + backports/ubuntu14.04/debian/source/format \ + backports/ubuntu14.04/exclude \ + backports/ubuntu14.04/versionext \ + backports/ubuntu16.04/debian/source/format \ + backports/ubuntu16.04/exclude \ + backports/ubuntu16.04/versionext \ + frr-doc.docs frr-doc.info frr-doc.install \ + frr-doc.lintian-overrides frr.conf \ + frr.dirs frr.docs frr.install \ + frr.lintian-overrides frr.logrotate \ + frr.manpages frr.pam frr.postinst frr.postrm \ + frr.preinst frr.prerm \ + frr-pythontools.install diff --git a/debian/README.Debian b/debianpkg/README.Debian similarity index 100% rename from debian/README.Debian rename to debianpkg/README.Debian diff --git a/debian/README.Maintainer b/debianpkg/README.Maintainer similarity index 100% rename from debian/README.Maintainer rename to debianpkg/README.Maintainer diff --git a/debianpkg/README.deb_build.md b/debianpkg/README.deb_build.md new file mode 100644 index 0000000000..3156c3672d --- /dev/null +++ b/debianpkg/README.deb_build.md @@ -0,0 +1,102 @@ +Building your own FRRouting Debian Package +========================================== +(Tested on Ubuntu 12.04, 14.04, 16.04 and Debian 8) + +1. Follow the package installation as outlined in doc/Building_on_XXXX.md + (XXXX refers your OS Distribution) to install the required build packages + +2. Install the following additional packages: + + apt-get install realpath equivs groff fakeroot debhelper + +3. Checkout FRR under a **unpriviledged** user account + + git clone https://github.com/frrouting/frr.git frr + +4. Run Bootstrap and make distribution tar.gz + + cd frr + ./bootstrap.sh + ./configure --with-pkg-extra-version=-MyDebPkgVersion + make dist + + Note: configure parameters are not important for the Debian Package + building - except the `with-pkg-extra-version` if you want to give the + Debian Package a specific name to mark your own unoffical build + +5. Edit `debianpkg/rules` and set the configuration as needed + + Look for section `dh_auto_configure` to modify the configure + options as needed. Options might be different between main `rules` and + `backports/XXXX/debian/rules`. Please adjust as needed on all files + +6. Create backports debian sources + + Move the `debianpkg` to `debian` and create the backports + (Debian requires to not ship a `debian` directory inside the source + directory to avoid build conflicts with the reserved `debian` subdirectory + name during the build) + + mv debianpkg debian + make -f debian/rules backports + + This will create a `frr_*.orig.tar.gz` with the source (same as dist tar), + and multiple `frr_*.debian.tar.xz` and `frr_*.dsc` for the debian package + source on each backport supported distribution + +6. Create a new directory to build the package and populate with package src + + mkdir frrpkg + cd frrpkg + tar xf ~/frr/frr_*.orig.tar.gz + cd frr* + . /etc/os-release + tar xf ~/frr/frr_*${ID}${VERSION_ID}*.debian.tar.xz + +7. Build Debian Package Dependencies and install them as needed + + sudo mk-build-deps --install debian/control + +8. Build Debian Package + + debuild -b -uc -us + +DONE. + +If all works correctly, then you should end up with the Debian packages under +`frrpkg`. If distributed, please make sure you distribute it together with +the sources (`frr_*.orig.tar.gz`, `frr_*.debian.tar.xz` and `frr_*.dsc`) + + +Enabling daemons after installation of the package: +--------------------------------------------------- + +1. Edit `/etc/frr/daemons` and enable required routing daemons (Zebra is +probably needed for most deployments, so make sure to enable it.) + +2. Check your firewall / IPtables to make sure the routing protocols are +allowed. + +3. Enable FRR at startup + + - On `init.d` based systems (Ubuntu 12.04) + + sudo update-rc.d frr defaults + + - On `systemd` based systems (Debian 8, Ubuntu 14.04, 16.04) + + sudo systemctl enable frr + +4. Start/Restart the daemons (or reboot) + + - On `init.d` based systems (Ubuntu 12.04) + + sudo invoke-rc.d frr start + + - on `systemd` based systems (Debian 8, Ubuntu 14.04, 16.04) + + sudo systemctl start frr + + +Configuration is stored in `/etc/frr/*.conf` files and daemon selection +is stored in `/etc/frr/daemons`. diff --git a/debianpkg/backports/.gitignore b/debianpkg/backports/.gitignore new file mode 100644 index 0000000000..3b20d26891 --- /dev/null +++ b/debianpkg/backports/.gitignore @@ -0,0 +1,2 @@ +*/*.dirhash +*/debian/changelog diff --git a/debianpkg/backports/README b/debianpkg/backports/README new file mode 100644 index 0000000000..efd322e1d9 --- /dev/null +++ b/debianpkg/backports/README @@ -0,0 +1,28 @@ +This directory contains the debian directories for backports to other debian +platforms. These are built via the `3.0 (custom)' source format, which +allows one to build a source package directly out of tarballs (e.g. an +orig.tar.gz tarball and a debian.tar.gz file), at which point the format can +be changed to a real format (e.g. `3.0 (quilt)'). + +Source packages are assembled via targets of the same name as the system to +which the backport is done (e.g. `precise'), included in debian/rules. + +To create a new debian backport: + +* Add its name to `KNOWN_BACKPORTS', defined in debian/rules. +* Create a directory of the same name in debian/backports. +* Add the files `exclude', `versionext', and `debian/source/format' under + this directory: + * `exclude' contains whitespace-separated paths (relative to the root of + the source dir) that should be excluded from the source package (e.g. + debian/patches). + * `versionext' contains the suffix added to the version number for this + backport's build. Distributions often have guidelines for what this + should be. If left empty, no new debian/changelog entry is created. + * `debian/source/format' should contain the source format of the resulting + source package. As of of the writing of this document the only supported + format is `3.0 (quilt)'. +* Add appropriate files under the `debian/' subdirectory. These will be + included in the source package, overriding any top-level `debian/' files + with equivalent paths. + diff --git a/debianpkg/backports/debian8/debian/source/format b/debianpkg/backports/debian8/debian/source/format new file mode 100644 index 0000000000..163aaf8d82 --- /dev/null +++ b/debianpkg/backports/debian8/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debianpkg/backports/debian8/exclude b/debianpkg/backports/debian8/exclude new file mode 100644 index 0000000000..e69de29bb2 diff --git a/debianpkg/backports/debian8/versionext b/debianpkg/backports/debian8/versionext new file mode 100644 index 0000000000..4824521f8c --- /dev/null +++ b/debianpkg/backports/debian8/versionext @@ -0,0 +1 @@ +-1~debian8+1 diff --git a/debianpkg/backports/debian9/debian/source/format b/debianpkg/backports/debian9/debian/source/format new file mode 100644 index 0000000000..163aaf8d82 --- /dev/null +++ b/debianpkg/backports/debian9/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debianpkg/backports/debian9/exclude b/debianpkg/backports/debian9/exclude new file mode 100644 index 0000000000..e69de29bb2 diff --git a/debianpkg/backports/debian9/versionext b/debianpkg/backports/debian9/versionext new file mode 100644 index 0000000000..db85932115 --- /dev/null +++ b/debianpkg/backports/debian9/versionext @@ -0,0 +1 @@ +-1~debian9+1 diff --git a/debianpkg/backports/rules b/debianpkg/backports/rules new file mode 100755 index 0000000000..d0c6dcc066 --- /dev/null +++ b/debianpkg/backports/rules @@ -0,0 +1,137 @@ +.PHONY: backports $(KNOWN_BACKPORTS) + +# error out if these files are missing +required_files = $(foreach backport,$(KNOWN_BACKPORTS), \ + $(addprefix debian/backports/$(backport)/, \ + debian/source/format \ + versionext \ + exclude)) +$(if $(filter-out $(wildcard $(required_files)),$(required_files)), \ + $(error missing required backports files: \ + $(filter-out $(wildcard $(required_files)),$(required_files)). \ + see debian/backports/README) \ +) + +TARBALLDIR ?= $(shell dh_testdir debian/changelog && realpath .) + +define backports-targets +# if this file is empty, no automatic changelog entry is created +VERSIONEXT_$(1) ?= $(strip \ + $(shell cat $(wildcard debian/backports/$(1)/versionext))) +DEBIAN_VERSION_$(1) = $(DEBIAN_VERSION)$$(VERSIONEXT_$(1)) +BACKPORTDIR_$(1) = $(realpath debian/backports/$(1)) + +# as of right now, must be '3.0 (quilt)' +SOURCEFORMAT_$(1) ?= $(strip \ + $(shell cat debian/backports/$(1)/debian/source/format)) + +# files checked for the dirhash (see below) +FINDCMD_$(1) = find -L debian/backports/$(1)/debian \ + -type f \ + ! -path debian/backports/$(1)/debian/changelog + +# files *not* pulled from the root debian directory into the backport tarball: +# debian/changelog (copied and edited for backport version entry) +# debian/backports itself (relevant contents are copied out separately) +# anything provided in the current backports debian dir +# anything specified in the 'exclude' file in the current backports debian dir +EXCLUDEROOT_$(1) = debian/changelog debian/backports \ + $$(subst debian/backports/$(1)/,,$$(shell $$(FINDCMD_$(1)))) \ + $$(shell cat debian/backports/$(1)/exclude) + +EXCLUDEROOT_TAR_$(1) = $$(foreach file,$$(EXCLUDEROOT_$(1)),--exclude $$(file)) +EXCLUDEROOT_FIND_$(1) = $$(foreach file,$$(EXCLUDEROOT_$(1)),-o -path $$(file)) + +# find command resulting in all files that *will* be pulled into the backport +# tarball. +FINDCMDROOT_$(1) = find -L debian/ \ + '(' -false $$(EXCLUDEROOT_FIND_$(1)) ')' -prune -o \ + -type f -a '!' '(' -false $$(EXCLUDEROOT_FIND_$(1)) ')' + +# usually using `find' output for dependencies has the downfall of not tracking +# file removal. Work around that by introducing a dependency on a file whose +# name contains the hash of `find' output, so that the name will change when a +# file is deleted. +DIRHASH_$(1) = \ + $$(shell $$(FINDCMD_$(1)) | sha1sum | sed -r 's/^(......).*/\1/') +DIRHASHROOT_$(1) = \ + $$(shell $$(FINDCMDROOT_$(1)) | sha1sum | sed -r 's/^(......).*/\1/') + +CONTROL_$(1) = $$(strip \ + $$(if $$(wildcard $$(BACKPORTDIR_$(1))/debian/control), \ + $$(BACKPORTDIR_$(1))/debian/control, \ + $(realpath debian/control) \ + )) + +# TARGETS: + +$(1): $(TARBALLDIR)/$(SRCPKG)_$$(DEBIAN_VERSION_$(1)).dsc ; + +# we use 3.0 (custom) to build a source package directly from tarballs, +# bypassing the usual checks (which wouldn't like our combination-of- +# directories approach) +$(TARBALLDIR)/$(SRCPKG)_$$(DEBIAN_VERSION_$(1)).dsc: + dpkg-source -l$$(BACKPORTDIR_$(1))/debian/changelog \ + -c$$(CONTROL_$(1)) \ + --format='3.0 (custom)' \ + --target-format='$$(SOURCEFORMAT_$(1))' \ + -b . $$^ + mv $(TARBALLDIR)/../$$(notdir $$@) $$@ + +ifeq ($$(SOURCEFORMAT_$(1)),3.0 (quilt)) +# this target depends on the orig.tar.gz file, for which there is no target in +# this makefile. It is assumed to either already exist or be built by a target +# provided elsewhere in debian/rules (e.g. via pristine-tar) +$$(if $$(findstring $(ORIG_VERSION),$$(DEBIAN_VERSION_$(1))), \ + $$(info downstream version matches upstream version (good)), \ + $$(error quilt format expects downstream version \ + ($$(DEBIAN_VERSION_$(1))) to contain upstream version \ + ($(ORIG_VERSION)). Make a new debian/changelog entry \ + to reflect the new upstream release) \ +) + +$(TARBALLDIR)/$(SRCPKG)_$$(DEBIAN_VERSION_$(1)).dsc: \ + $(TARBALLDIR)/$(SRCPKG)_$(ORIG_VERSION).orig.tar.gz \ + $(TARBALLDIR)/$(SRCPKG)_$$(DEBIAN_VERSION_$(1)).debian.tar.xz +else +$$(error unsupported source format for $(1) backport: $$(SOURCEFORMAT_$(1))) +endif #SOURCEFORMAT_$(1) + +# for 3.0 (quilt) +$(TARBALLDIR)/$(SRCPKG)_$$(DEBIAN_VERSION_$(1)).debian.tar.xz: \ + $$(BACKPORTDIR_$(1))/debian/changelog \ + $$(shell $$(FINDCMD_$(1))) \ + $$(BACKPORTDIR_$(1))/$$(DIRHASH_$(1)).backport.dirhash \ + $$(shell $$(FINDCMDROOT_$(1))) \ + $$(BACKPORTDIR_$(1))/$$(DIRHASHROOT_$(1)).root.dirhash \ + $$(BACKPORTDIR_$(1))/exclude + rm -f $$(subst .tar.xz,.tar,$$@) $$@ + tar -chf $$(subst .tar.xz,.tar,$$@) \ + --exclude-vcs $$(EXCLUDEROOT_TAR_$(1)) debian/ + cd debian/backports/$(1) && tar -uhf $$(subst .tar.xz,.tar,$$@) \ + --exclude-vcs debian/ + xz $$(subst .tar.xz,.tar,$$@) + +$$(BACKPORTDIR_$(1))/debian/changelog: \ + debian/changelog \ + debian/backports/$(1)/versionext + rm -f debian/backports/$(1)/debian/changelog + cp $$< $$@ + $(if $$(VERSIONEXT_$(1)), \ + dch -c $$@ -v '$$(DEBIAN_VERSION_$(1))' -b \ + 'backport to $(1) systems', \ + ) + +$$(BACKPORTDIR_$(1))/$$(DIRHASH_$(1)).backport.dirhash: + rm -f debian/backports/$(1)/*.backport.dirhash + touch $$@ + +$$(BACKPORTDIR_$(1))/$$(DIRHASHROOT_$(1)).root.dirhash: + rm -f debian/backports/$(1)/*.root.dirhash + touch $$@ + +endef # backports-targets +$(foreach backport,$(KNOWN_BACKPORTS),$(eval \ + $(call backports-targets,$(backport)))) + +backports: $(KNOWN_BACKPORTS) diff --git a/debianpkg/backports/ubuntu12.04/debian/control b/debianpkg/backports/ubuntu12.04/debian/control new file mode 100644 index 0000000000..17ceeb0381 --- /dev/null +++ b/debianpkg/backports/ubuntu12.04/debian/control @@ -0,0 +1,56 @@ +Source: frr +Section: net +Priority: optional +Maintainer: Nobody +Uploaders: Nobody +XSBC-Original-Maintainer: +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, autotools-dev, libpcre3-dev, gawk, chrpath, libsnmp-dev, git, dh-autoreconf, libjson0, libjson0-dev, pkg-config, python (>= 2.7), python-ipaddr +Standards-Version: 3.9.6 +Homepage: http://www.frrouting.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/frrouting/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 (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. + +Package: frr-pythontools +Section: net +Architecture: all +Depends: ${misc:Depends}, frr (= ${binary:Version}), python (>= 2.7), python-ipaddr +Description: BGP/OSPF/RIP/RIPng/ISIS/PIM/LDP routing daemon (Python Tools) + 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/debianpkg/backports/ubuntu12.04/debian/frr.install b/debianpkg/backports/ubuntu12.04/debian/frr.install new file mode 120000 index 0000000000..83ecca5958 --- /dev/null +++ b/debianpkg/backports/ubuntu12.04/debian/frr.install @@ -0,0 +1 @@ +../../ubuntu14.04/debian/frr.install \ No newline at end of file diff --git a/debianpkg/backports/ubuntu12.04/debian/frr.postinst b/debianpkg/backports/ubuntu12.04/debian/frr.postinst new file mode 120000 index 0000000000..eb98053c7b --- /dev/null +++ b/debianpkg/backports/ubuntu12.04/debian/frr.postinst @@ -0,0 +1 @@ +../../ubuntu14.04/debian/frr.postinst \ No newline at end of file diff --git a/debianpkg/backports/ubuntu12.04/debian/frr.postrm b/debianpkg/backports/ubuntu12.04/debian/frr.postrm new file mode 120000 index 0000000000..4f4380872f --- /dev/null +++ b/debianpkg/backports/ubuntu12.04/debian/frr.postrm @@ -0,0 +1 @@ +../../ubuntu14.04/debian/frr.postrm \ No newline at end of file diff --git a/debianpkg/backports/ubuntu12.04/debian/rules b/debianpkg/backports/ubuntu12.04/debian/rules new file mode 100755 index 0000000000..5c3e1363ce --- /dev/null +++ b/debianpkg/backports/ubuntu12.04/debian/rules @@ -0,0 +1,179 @@ +#!/usr/bin/make -f + +# FRRouting Configuration options +###################################### +# +# WANT_xxxx --> Set to 1 for enable, 0 for disable +# The following are the defaults. They can be overridden by setting a +# env variable to a different value +# +# export WANT_LDP=1 +# export WANT_PIM=1 +# export WANT_OSPFAPI=1 +# export WANT_TCP_ZEBRA=0 +# export WANT_BGP_VNC=0 +# export WANT_CUMULUS_MODE=0 +# export WANT_MULTIPATH=1 +# +# If multipath is enabled (WANT_MULTIPATH=1), then set number of multipaths here +# Please be aware that 0 is NOT disabled, but treated as unlimited +# export MULTIPATH=256 +# +# Set the following to the value required (or leave undefined for the default below) +# WANT_FRR_USER is used for the username and groupname of the FRR user account +# export WANT_FRR_USER=frr +# export WANT_FRR_VTY_GROUP=frrvty +# +#################################### + +export DH_VERBOSE=1 +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +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 ($(WANT_LDP), 0) + USE_LDP=--enable-ldpd +else + USE_LDP=--disable-ldpd +endif + +ifneq ($(WANT_PIM), 0) + USE_PIM=--enable-pimd +else + USE_PIM=--disable-pimd +endif + +ifneq ($(WANT_OSPFAPI), 0) + USE_OSPFAPI=--enable-ospfapi=yes +else + USE_OSPFAPI=--enable-ospfapi=no +endif + +ifeq ($(WANT_TCP_ZEBRA),1) + USE_TCP_ZEBRA=--enable-tcp-zebra +endif + +ifneq ($(WANT_BGP_VNC), 0) + USE_BGP_VNC=--enable-bgp-vnc=yes +else + USE_BGP_VNC=--enable-bgp-vnc=no +endif + +ifndef WANT_FRR_USER + USE_FRR_USER=--enable-user=frr + USE_FRR_GROUP=--enable-group=frr +else + USE_FRR_USER=$(WANT_FRR_USER) + USE_FRR_GROUP=$(WANT_FRR_USER) +endif + +ifndef WANT_FRR_VTY_GROUP + USE_FRR_VTY_GROUP=--enable-vty-group=frrvty +else + USE_FRR_VTY_GROUP=--enable-vty-group=$(WANT_FRR_VTY_GROUP) +endif + +ifneq ($(WANT_MULTIPATH), 0) + ifdef MULTIPATH + USE_MULTIPATH=--enable-multipath=$(MULTIPATH) + else + USE_MULTIPATH=--enable-multipath=256 + endif +else + USE_MULTIPATH=--disable-multipath +endif + +ifeq ($(WANT_CUMULUS_NODE), 1) + USE_CUMULUS=--enable-cumulus=yes +else + USE_CUMULUS=--enable-cumulus=no +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) \ + $(USE_OSPFAPI) \ + $(USE_MULTIPATH) \ + $(USE_LDP) \ + $(USE_TCP_ZEBRA) \ + --enable-fpm \ + $(USE_FRR_USER) $(USE_FRR_GROUP) \ + $(USE_FRR_VTY_GROUP) \ + --enable-configfile-mask=0640 \ + --enable-logfile-mask=0640 \ + --with-libpam \ + --enable-systemd=no \ + --enable-poll=yes \ + $(USE_CUMULUS) \ + $(USE_PIM) \ + --enable-dependency-tracking \ + $(USE_BGP_VNC) \ + $(shell dpkg-buildflags --export=configure); \ + 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 + + # installed in frr-pythontools + rm debian/tmp/usr/lib/frr/frr-reload.py + + # 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 + sed -i "/dependency_libs/ s/'.*'/''/" debian/tmp/usr/lib/frr/modules/*.la + diff --git a/debianpkg/backports/ubuntu12.04/debian/source/format b/debianpkg/backports/ubuntu12.04/debian/source/format new file mode 100644 index 0000000000..163aaf8d82 --- /dev/null +++ b/debianpkg/backports/ubuntu12.04/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debianpkg/backports/ubuntu12.04/exclude b/debianpkg/backports/ubuntu12.04/exclude new file mode 100644 index 0000000000..e69de29bb2 diff --git a/debianpkg/backports/ubuntu12.04/versionext b/debianpkg/backports/ubuntu12.04/versionext new file mode 100644 index 0000000000..159e2e4160 --- /dev/null +++ b/debianpkg/backports/ubuntu12.04/versionext @@ -0,0 +1 @@ +-1~ubuntu12.04+1 diff --git a/debianpkg/backports/ubuntu14.04/debian/control b/debianpkg/backports/ubuntu14.04/debian/control new file mode 100644 index 0000000000..c22bd3bd58 --- /dev/null +++ b/debianpkg/backports/ubuntu14.04/debian/control @@ -0,0 +1,56 @@ +Source: frr +Section: net +Priority: optional +Maintainer: Nobody +Uploaders: Nobody +XSBC-Original-Maintainer: +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, autotools-dev, libpcre3-dev, gawk, chrpath, libsnmp-dev, git, dh-autoreconf, libjson-c-dev, libjson-c2, pkg-config, python (>= 2.7), python-ipaddr +Standards-Version: 3.9.6 +Homepage: http://www.frrouting.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/frrouting/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 (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: BGP/OSPF/RIP/RIPng/ISIS/PIM/LDP routing daemon (documentation) + 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. + +Package: frr-pythontools +Section: net +Architecture: all +Depends: ${misc:Depends}, frr (= ${binary:Version}), python (>= 2.7), python-ipaddr +Description: BGP/OSPF/RIP/RIPng/ISIS/PIM/LDP routing daemon (Python Tools) + 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/debianpkg/backports/ubuntu14.04/debian/frr.install b/debianpkg/backports/ubuntu14.04/debian/frr.install new file mode 100644 index 0000000000..adce915e1f --- /dev/null +++ b/debianpkg/backports/ubuntu14.04/debian/frr.install @@ -0,0 +1,21 @@ +etc/frr/ +usr/bin/vtysh +usr/include/frr/ +usr/lib/ +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/watchfrr.8 +usr/share/snmp/mibs/ +tools/etc/* etc/ +tools/*.service lib/systemd/system +debian/frr.conf usr/lib/tmpfiles.d diff --git a/debian/frr.postinst b/debianpkg/backports/ubuntu14.04/debian/frr.postinst similarity index 96% rename from debian/frr.postinst rename to debianpkg/backports/ubuntu14.04/debian/frr.postinst index 9020d7bf7a..b1d463a33d 100644 --- a/debian/frr.postinst +++ b/debianpkg/backports/ubuntu14.04/debian/frr.postinst @@ -32,9 +32,7 @@ if [ "$1" = "abort-upgrade" ]; then exit 0 fi -. /usr/share/debconf/confmodule - -db_stop +update-rc.d frr defaults > /dev/null #DEBHELPER# diff --git a/debianpkg/backports/ubuntu14.04/debian/frr.postrm b/debianpkg/backports/ubuntu14.04/debian/frr.postrm new file mode 100644 index 0000000000..48c23321f7 --- /dev/null +++ b/debianpkg/backports/ubuntu14.04/debian/frr.postrm @@ -0,0 +1,14 @@ +#!/bin/bash -e + +if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi +${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*"} +# set -u not because of debhelper + +update-rc.d -f frr remove >> /dev/null + +if [ "$1" = "purge" ]; then + rm -rf /etc/frr /var/run/frr /var/log/frr + userdel frr >/dev/null 2>&1 || true +fi + +#DEBHELPER# diff --git a/debianpkg/backports/ubuntu14.04/debian/rules b/debianpkg/backports/ubuntu14.04/debian/rules new file mode 100755 index 0000000000..b1f539def6 --- /dev/null +++ b/debianpkg/backports/ubuntu14.04/debian/rules @@ -0,0 +1,185 @@ +#!/usr/bin/make -f + +# FRRouting Configuration options +###################################### +# +# WANT_xxxx --> Set to 1 for enable, 0 for disable +# The following are the defaults. They can be overridden by setting a +# env variable to a different value +# +# export WANT_LDP=1 +# export WANT_PIM=1 +# export WANT_OSPFAPI=1 +# export WANT_TCP_ZEBRA=0 +# export WANT_BGP_VNC=0 +# export WANT_CUMULUS_MODE=0 +# export WANT_MULTIPATH=1 +# +# If multipath is enabled (WANT_MULTIPATH=1), then set number of multipaths here +# Please be aware that 0 is NOT disabled, but treated as unlimited +# export MULTIPATH=256 +# +# Set the following to the value required (or leave undefined for the default below) +# WANT_FRR_USER is used for the username and groupname of the FRR user account +# export WANT_FRR_USER=frr +# export WANT_FRR_VTY_GROUP=frrvty +# +#################################### + +export DH_VERBOSE=1 +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +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 ($(WANT_LDP), 0) + USE_LDP=--enable-ldpd +else + USE_LDP=--disable-ldpd +endif + +ifneq ($(WANT_PIM), 0) + USE_PIM=--enable-pimd +else + USE_PIM=--disable-pimd +endif + +ifneq ($(WANT_OSPFAPI), 0) + USE_OSPFAPI=--enable-ospfapi=yes +else + USE_OSPFAPI=--enable-ospfapi=no +endif + +ifeq ($(WANT_TCP_ZEBRA),1) + USE_TCP_ZEBRA=--enable-tcp-zebra +endif + +ifneq ($(WANT_BGP_VNC), 0) + USE_BGP_VNC=--enable-bgp-vnc=yes +else + USE_BGP_VNC=--enable-bgp-vnc=no +endif + +ifndef WANT_FRR_USER + USE_FRR_USER=--enable-user=frr + USE_FRR_GROUP=--enable-group=frr +else + USE_FRR_USER=$(WANT_FRR_USER) + USE_FRR_GROUP=$(WANT_FRR_USER) +endif + +ifndef WANT_FRR_VTY_GROUP + USE_FRR_VTY_GROUP=--enable-vty-group=frrvty +else + USE_FRR_VTY_GROUP=--enable-vty-group=$(WANT_FRR_VTY_GROUP) +endif + +ifneq ($(WANT_MULTIPATH), 0) + ifdef MULTIPATH + USE_MULTIPATH=--enable-multipath=$(MULTIPATH) + else + USE_MULTIPATH=--enable-multipath=256 + endif +else + USE_MULTIPATH=--disable-multipath +endif + +ifeq ($(WANT_CUMULUS_NODE), 1) + USE_CUMULUS=--enable-cumulus=yes +else + USE_CUMULUS=--enable-cumulus=no +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) \ + $(USE_OSPFAPI) \ + $(USE_MULTIPATH) \ + $(USE_LDP) \ + $(USE_TCP_ZEBRA) \ + --enable-fpm \ + $(USE_FRR_USER) $(USE_FRR_GROUP) \ + $(USE_FRR_VTY_GROUP) \ + --enable-configfile-mask=0640 \ + --enable-logfile-mask=0640 \ + --with-libpam \ + --enable-systemd=no \ + --enable-poll=yes \ + $(USE_CUMULUS) \ + $(USE_PIM) \ + --enable-dependency-tracking \ + $(USE_BGP_VNC) \ + $(shell dpkg-buildflags --export=configure); \ + 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 + + # installed in frr-pythontools + rm debian/tmp/usr/lib/frr/frr-reload.py + + # 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 + sed -i "/dependency_libs/ s/'.*'/''/" debian/tmp/usr/lib/frr/modules/*.la + +override_dh_systemd_start: + dh_systemd_start frr.service + +override_dh_systemd_enable: + dh_systemd_enable frr.service + diff --git a/debianpkg/backports/ubuntu14.04/debian/source/format b/debianpkg/backports/ubuntu14.04/debian/source/format new file mode 100644 index 0000000000..163aaf8d82 --- /dev/null +++ b/debianpkg/backports/ubuntu14.04/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debianpkg/backports/ubuntu14.04/exclude b/debianpkg/backports/ubuntu14.04/exclude new file mode 100644 index 0000000000..e69de29bb2 diff --git a/debianpkg/backports/ubuntu14.04/versionext b/debianpkg/backports/ubuntu14.04/versionext new file mode 100644 index 0000000000..c5be0650af --- /dev/null +++ b/debianpkg/backports/ubuntu14.04/versionext @@ -0,0 +1 @@ +-1~ubuntu14.04+1 diff --git a/debianpkg/backports/ubuntu16.04/debian/source/format b/debianpkg/backports/ubuntu16.04/debian/source/format new file mode 100644 index 0000000000..163aaf8d82 --- /dev/null +++ b/debianpkg/backports/ubuntu16.04/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debianpkg/backports/ubuntu16.04/exclude b/debianpkg/backports/ubuntu16.04/exclude new file mode 100644 index 0000000000..e69de29bb2 diff --git a/debianpkg/backports/ubuntu16.04/versionext b/debianpkg/backports/ubuntu16.04/versionext new file mode 100644 index 0000000000..dc33d97a12 --- /dev/null +++ b/debianpkg/backports/ubuntu16.04/versionext @@ -0,0 +1 @@ +-1~ubuntu16.04+1 diff --git a/debian/changelog b/debianpkg/changelog.in similarity index 98% rename from debian/changelog rename to debianpkg/changelog.in index 4ea86929fc..8f3f4753de 100644 --- a/debian/changelog +++ b/debianpkg/changelog.in @@ -1,10 +1,16 @@ -frr (3.1-dev) Released; urgency=medium +frr (@VERSION@) RELEASED; urgency=medium * New Enabled: PIM draft Unnumbered - -- frr Wed, 5 Apr 2017 22:29:42 -0500 + -- FRRouting-Dev Wed, 18 Oct 2017 17:01:42 -0700 -frr (3.0) Released; urgency=medium +frr (3.0-1) RELEASED; urgency=medium + + * Added Debian 9 Backport + + -- FRRouting-Dev Mon, 16 Oct 2017 03:28:00 -0700 + +frr (3.0-0) RELEASED; urgency=medium * New Enabled: BGP Shutdown Message * New Enabled: BGP Large Community @@ -22,14 +28,15 @@ frr (3.0) Released; urgency=medium * New Enabled: PIM Sparse Mode * New Enabled: NHRP RFC 2332 * New Enabled: Label Manager + * Switched from hardening-wrapper to dpkg-buildflags. - -- frr Wed, 5 Apr 2017 22:23:42 -0500 + -- FRRouting-Dev Fri, 13 Oct 2017 16:17:26 -0700 -frr (2.1) Released; urgency=medium +frr (2.0-0) RELEASED; urgency=medium * Switchover to FRR - -- frr Mon, 23 Jan 2017 16:30:22 -0400 + -- FRRouting-Dev Mon, 23 Jan 2017 16:30:22 -0400 quagga (0.99.24+cl3u5) RELEASED; urgency=medium diff --git a/debian/compat b/debianpkg/compat similarity index 100% rename from debian/compat rename to debianpkg/compat diff --git a/debianpkg/control b/debianpkg/control new file mode 100644 index 0000000000..297a7cf106 --- /dev/null +++ b/debianpkg/control @@ -0,0 +1,54 @@ +Source: frr +Section: net +Priority: optional +Maintainer: Nobody +Uploaders: Nobody +XSBC-Original-Maintainer: +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, autotools-dev, libpcre3-dev, gawk, chrpath, libsnmp-dev, git, dh-autoreconf, libjson-c-dev, libjson-c2 | libjson-c3, dh-systemd, libsystemd-dev, bison, flex, libc-ares-dev, pkg-config, python (>= 2.7), python-ipaddr +Standards-Version: 3.9.6 +Homepage: http://www.frrouting.org/ + +Package: frr +Architecture: any +Depends: ${shlibs:Depends}, logrotate (>= 3.2-11), iproute2 | iproute, ${misc:Depends}, libc-ares2 +Pre-Depends: adduser +Conflicts: zebra, zebra-pj, quagga +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/frrouting/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 (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: BGP/OSPF/RIP/RIPng/ISIS/PIM/LDP routing daemon (documentation) + 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. + +Package: frr-pythontools +Section: net +Architecture: all +Depends: ${misc:Depends}, frr (= ${binary:Version}), python (>= 2.7), python-ipaddr +Description: BGP/OSPF/RIP/RIPng/ISIS/PIM/LDP routing daemon (Python Tools) + 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/copyright b/debianpkg/copyright similarity index 100% rename from debian/copyright rename to debianpkg/copyright diff --git a/debian/frr-doc.docs b/debianpkg/frr-doc.docs similarity index 100% rename from debian/frr-doc.docs rename to debianpkg/frr-doc.docs diff --git a/debian/frr-doc.info b/debianpkg/frr-doc.info similarity index 100% rename from debian/frr-doc.info rename to debianpkg/frr-doc.info diff --git a/debianpkg/frr-doc.install b/debianpkg/frr-doc.install new file mode 100644 index 0000000000..e5910fec8f --- /dev/null +++ b/debianpkg/frr-doc.install @@ -0,0 +1,2 @@ +usr/share/info +doc/*.png usr/share/info diff --git a/debian/frr-doc.lintian-overrides b/debianpkg/frr-doc.lintian-overrides similarity index 100% rename from debian/frr-doc.lintian-overrides rename to debianpkg/frr-doc.lintian-overrides diff --git a/debianpkg/frr-pythontools.install b/debianpkg/frr-pythontools.install new file mode 100644 index 0000000000..aee093cf69 --- /dev/null +++ b/debianpkg/frr-pythontools.install @@ -0,0 +1 @@ +tools/frr-reload.py usr/lib/frr/ diff --git a/debian/frr.conf b/debianpkg/frr.conf similarity index 100% rename from debian/frr.conf rename to debianpkg/frr.conf diff --git a/debian/frr.dirs b/debianpkg/frr.dirs similarity index 100% rename from debian/frr.dirs rename to debianpkg/frr.dirs diff --git a/debian/frr.docs b/debianpkg/frr.docs similarity index 100% rename from debian/frr.docs rename to debianpkg/frr.docs diff --git a/debian/frr.install b/debianpkg/frr.install similarity index 94% rename from debian/frr.install rename to debianpkg/frr.install index 8fc5fa5fa6..2d86009dba 100644 --- a/debian/frr.install +++ b/debianpkg/frr.install @@ -2,7 +2,6 @@ etc/frr/ usr/bin/vtysh usr/include/frr/ usr/lib/ -tools/frr-reload.py usr/lib/frr/ tools/frr usr/lib/frr usr/share/doc/frr/ usr/share/man/man1/vtysh.1 diff --git a/debian/frr.lintian-overrides b/debianpkg/frr.lintian-overrides similarity index 51% rename from debian/frr.lintian-overrides rename to debianpkg/frr.lintian-overrides index e21bd9256d..e352ad6cf4 100644 --- a/debian/frr.lintian-overrides +++ b/debianpkg/frr.lintian-overrides @@ -1,3 +1,4 @@ frr: non-dev-pkg-with-shlib-symlink usr/lib/libfrrospfapiclient.so.0.0.0 usr/lib/libfrrospfapiclient.so frr: non-dev-pkg-with-shlib-symlink usr/lib/libfrr.so.0.0.0 usr/lib/libfrr.so -frr: package-name-doesnt-match-sonames libfrrospf0 libfrrospfapiclient0 libfrr0 +frr: non-dev-pkg-with-shlib-symlink usr/lib/libfrrfpm_pb.so.0.0.0 usr/lib/libfrrfpm_pb.so +frr: package-name-doesnt-match-sonames libfrr0 libfrrfpm-pb0 libfrrospfapiclient0 diff --git a/debian/frr.logrotate b/debianpkg/frr.logrotate similarity index 100% rename from debian/frr.logrotate rename to debianpkg/frr.logrotate diff --git a/debian/frr.manpages b/debianpkg/frr.manpages similarity index 100% rename from debian/frr.manpages rename to debianpkg/frr.manpages diff --git a/debian/frr.pam b/debianpkg/frr.pam similarity index 100% rename from debian/frr.pam rename to debianpkg/frr.pam diff --git a/debianpkg/frr.postinst b/debianpkg/frr.postinst new file mode 100644 index 0000000000..cbc45f03eb --- /dev/null +++ b/debianpkg/frr.postinst @@ -0,0 +1,36 @@ +#!/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 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 + +#DEBHELPER# + diff --git a/debian/frr.postrm b/debianpkg/frr.postrm similarity index 100% rename from debian/frr.postrm rename to debianpkg/frr.postrm diff --git a/debian/frr.preinst b/debianpkg/frr.preinst similarity index 100% rename from debian/frr.preinst rename to debianpkg/frr.preinst diff --git a/debian/frr.prerm b/debianpkg/frr.prerm similarity index 94% rename from debian/frr.prerm rename to debianpkg/frr.prerm index e0df24e10f..4b71202810 100644 --- a/debian/frr.prerm +++ b/debianpkg/frr.prerm @@ -1,7 +1,5 @@ #!/bin/bash -e -. /usr/share/debconf/confmodule - if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi ${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*"} diff --git a/debianpkg/rules b/debianpkg/rules new file mode 100755 index 0000000000..04d28762aa --- /dev/null +++ b/debianpkg/rules @@ -0,0 +1,218 @@ +#!/usr/bin/make -f + +# FRRouting Configuration options +###################################### +# +# WANT_xxxx --> Set to 1 for enable, 0 for disable +# The following are the defaults. They can be overridden by setting a +# env variable to a different value +# +# export WANT_LDP=1 +# export WANT_PIM=1 +# export WANT_OSPFAPI=1 +# export WANT_TCP_ZEBRA=0 +# export WANT_BGP_VNC=0 +# export WANT_CUMULUS_MODE=0 +# export WANT_MULTIPATH=1 +# +# If multipath is enabled (WANT_MULTIPATH=1), then set number of multipaths here +# Please be aware that 0 is NOT disabled, but treated as unlimited +# export MULTIPATH=256 +# +# Set the following to the value required (or leave undefined for the default below) +# WANT_FRR_USER is used for the username and groupname of the FRR user account +# export WANT_FRR_USER=frr +# export WANT_FRR_VTY_GROUP=frrvty +# +#################################### + +export DH_VERBOSE=1 +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +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 ($(WANT_LDP), 0) + USE_LDP=--enable-ldpd +else + USE_LDP=--disable-ldpd +endif + +ifneq ($(WANT_PIM), 0) + USE_PIM=--enable-pimd +else + USE_PIM=--disable-pimd +endif + +ifneq ($(WANT_OSPFAPI), 0) + USE_OSPFAPI=--enable-ospfapi=yes +else + USE_OSPFAPI=--enable-ospfapi=no +endif + +ifeq ($(WANT_TCP_ZEBRA),1) + USE_TCP_ZEBRA=--enable-tcp-zebra +endif + +ifneq ($(WANT_BGP_VNC), 0) + USE_BGP_VNC=--enable-bgp-vnc=yes +else + USE_BGP_VNC=--enable-bgp-vnc=no +endif + +ifndef WANT_FRR_USER + USE_FRR_USER=--enable-user=frr + USE_FRR_GROUP=--enable-group=frr +else + USE_FRR_USER=$(WANT_FRR_USER) + USE_FRR_GROUP=$(WANT_FRR_USER) +endif + +ifndef WANT_FRR_VTY_GROUP + USE_FRR_VTY_GROUP=--enable-vty-group=frrvty +else + USE_FRR_VTY_GROUP=--enable-vty-group=$(WANT_FRR_VTY_GROUP) +endif + +ifneq ($(WANT_MULTIPATH), 0) + ifdef MULTIPATH + USE_MULTIPATH=--enable-multipath=$(MULTIPATH) + else + USE_MULTIPATH=--enable-multipath=256 + endif +else + USE_MULTIPATH=--disable-multipath +endif + +ifeq ($(WANT_CUMULUS_NODE), 1) + USE_CUMULUS=--enable-cumulus=yes +else + USE_CUMULUS=--enable-cumulus=no +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=systemd,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) \ + $(USE_OSPFAPI) \ + $(USE_MULTIPATH) \ + $(USE_LDP) \ + $(USE_TCP_ZEBRA) \ + --enable-fpm \ + $(USE_FRR_USER) $(USE_FRR_GROUP) \ + $(USE_FRR_VTY_GROUP) \ + --enable-configfile-mask=0640 \ + --enable-logfile-mask=0640 \ + --enable-werror \ + --with-libpam \ + --enable-systemd=yes \ + --enable-poll=yes \ + $(USE_CUMULUS) \ + $(USE_PIM) \ + --enable-dependency-tracking \ + $(USE_BGP_VNC) \ + $(shell dpkg-buildflags --export=configure); \ + 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 + + # installed in frr-pythontools + rm debian/tmp/usr/lib/frr/frr-reload.py + + # 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 +ifeq ($(WANT_SNMP), 1) + install -D -m 644 ./zebra/GNOME-PRODUCT-ZEBRA-MIB debian/tmp/usr/share/snmp/mibs/GNOME-PRODUCT-ZEBRA-MIB +else + mkdir -p debian/tmp/usr/share/snmp/mibs/ +endif + + # cleaning .la files + sed -i "/dependency_libs/ s/'.*'/''/" debian/tmp/usr/lib/*.la + sed -i "/dependency_libs/ s/'.*'/''/" debian/tmp/usr/lib/frr/modules/*.la + +override_dh_systemd_start: + dh_systemd_start frr.service + +override_dh_systemd_enable: + dh_systemd_enable frr.service + +# backports +SRCPKG = frr +KNOWN_BACKPORTS = debian8 debian9 ubuntu12.04 ubuntu14.04 ubuntu16.04 +DEBIAN_VERSION := $(shell dh_testdir && \ + dpkg-parsechangelog -c1 < debian/changelog | \ + sed -rn 's/^Version: ?//p') +ORIG_VERSION := $(DEBIAN_VERSION) +-include debian/backports/rules + +ifneq ($(TARBALLDIR),) +ifeq ($(wildcard frr-$(ORIG_VERSION).tar.gz),frr-$(ORIG_VERSION).tar.gz) + +$(TARBALLDIR)/$(SRCPKG)_$(ORIG_VERSION).orig.tar.gz: \ + frr-$(ORIG_VERSION).tar.gz + cp $< $@ + +else # wildcard frr-$(ORIG_VERSION).tar.gz + +# better error message on missing .orig.tar.gz +$(TARBALLDIR)/$(SRCPKG)_$(ORIG_VERSION).orig.tar.gz: + @ echo "\`$(TARBALLDIR)/$(SRCPKG)-$(ORIG_VERSION).tar.gz'" not \ + found and not generated by debian/rules. Provided you have the \ + necessary packages installed, you can generate it yourself via \ + "\"./bootstrap.sh && ./configure && make dist\"". + exit 1 + +endif # wildcard frr-$(ORIG_VERSION).tar.gz +endif # TARBALLDIR nonempty diff --git a/debian/source/format b/debianpkg/source/format similarity index 100% rename from debian/source/format rename to debianpkg/source/format diff --git a/debian/tests/control b/debianpkg/tests/control similarity index 100% rename from debian/tests/control rename to debianpkg/tests/control diff --git a/debian/tests/daemons b/debianpkg/tests/daemons similarity index 100% rename from debian/tests/daemons rename to debianpkg/tests/daemons diff --git a/debian/watchfrr.rc b/debianpkg/watchfrr.rc similarity index 100% rename from debian/watchfrr.rc rename to debianpkg/watchfrr.rc diff --git a/doc/Building_FRR_on_Debian9.md b/doc/Building_FRR_on_Debian9.md new file mode 100644 index 0000000000..1536c25932 --- /dev/null +++ b/doc/Building_FRR_on_Debian9.md @@ -0,0 +1,121 @@ +Building FRR on Debian 9 from Git Source +======================================== + +Install required packages +------------------------- + +Add packages: + + sudo apt-get install git autoconf automake libtool make \ + libreadline-dev texinfo libjson-c-dev pkg-config bison flex \ + python-pip libc-ares-dev python3-dev python-pytest + +Get FRR, compile it and install it (from Git) +--------------------------------------------- + +**This assumes you want to build and install FRR from source and not using +any packages** + +### Add frr groups and user + + sudo addgroup --system --gid 92 frr + sudo addgroup --system --gid 85 frrvty + sudo adduser --system --ingroup frr --home /var/run/frr/ \ + --gecos "FRR suite" --shell /bin/false frr + sudo usermod -a -G frrvty frr + +### Download Source, configure and compile it +(You may prefer different options on configure statement. These are just +an example.) + + git clone https://github.com/frrouting/frr.git frr + cd frr + git checkout stable/3.0 + ./bootstrap.sh + ./configure \ + --enable-exampledir=/usr/share/doc/frr/examples/ \ + --localstatedir=/var/run/frr \ + --sbindir=/usr/lib/frr \ + --sysconfdir=/etc/frr \ + --enable-vtysh \ + --enable-isisd \ + --enable-pimd \ + --enable-watchfrr \ + --enable-ospfclient=yes \ + --enable-ospfapi=yes \ + --enable-multipath=64 \ + --enable-user=frr \ + --enable-group=frr \ + --enable-vty-group=frrvty \ + --enable-configfile-mask=0640 \ + --enable-logfile-mask=0640 \ + --enable-rtadv \ + --enable-fpm \ + --enable-ldpd \ + --with-pkg-git-version \ + --with-pkg-extra-version=-MyOwnFRRVersion + make + make check + sudo make install + +### Create empty FRR configuration files + + sudo install -m 755 -o frr -g frr -d /var/log/frr + sudo install -m 775 -o frr -g frrvty -d /etc/frr + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/zebra.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf + sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf + sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf + +### Enable IP & IPv6 forwarding + +Edit `/etc/sysctl.conf` and uncomment the following values (ignore the +other settings) + + # Uncomment the next line to enable packet forwarding for IPv4 + net.ipv4.ip_forward=1 + + # Uncomment the next line to enable packet forwarding for IPv6 + # Enabling this option disables Stateless Address Autoconfiguration + # based on Router Advertisements for this host + net.ipv6.conf.all.forwarding=1 + +**Reboot** or use `sysctl -p` to apply the same config to the running system + +### Troubleshooting + +**Local state directory** + +The local state directory must exist and have the correct permissions applied +for the frrouting daemons to start. In the above ./configure example the +local state directory is set to /var/run/frr (--localstatedir=/var/run/frr) +Debian considers /var/run/frr to be temporary and this is removed after a +reboot. + +When using a different local state directory you need to create the new +directory and change the ownership to the frr user, for example: + + mkdir /var/opt/frr + chown frr /var/opt/frr + +**Shared library error** + +If you try and start any of the frrouting daemons you may see the below error +due to the frrouting shared library directory not being found: + + ./zebra: error while loading shared libraries: libfrr.so.0: cannot open shared object file: No such file or directory + +The fix is to add the following line to /etc/ld.so.conf which will continue to +reference the library directory after the system reboots. To load the library +directory path immediately run the ldconfig command after adding the line to +the file eg: + + echo include /usr/local/lib >> /etc/ld.so.conf + ldconfig diff --git a/tools/frr.service b/tools/frr.service index 51dbbe2f32..4301ec9dc7 100644 --- a/tools/frr.service +++ b/tools/frr.service @@ -1,6 +1,6 @@ [Unit] -Description=Cumulus Linux FRR -After=syslog.target networking.service +Description=FRRouting +After=networking.service OnFailure=heartbeat-failed@%n.service [Service]