1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

Merge remote-tracking branch 'cumulus/dev'

This commit is contained in:
Roopa Prabhu
2016-06-06 13:18:29 -07:00
85 changed files with 10702 additions and 1544 deletions

26
debian/changelog vendored Normal file
View File

@@ -0,0 +1,26 @@
ifupdown2 (1.1-cl3u3) RELEASED; urgency=medium
* Closes: CM-11214. Interface configuration parsing error when keyword vlan is the interface name.
-- dev-support <dev-support@cumulusnetworks.com> Sun, 05 Jun 2016 08:55:50 -0700
ifupdown2 (1.1-cl3u2) RELEASED; urgency=medium
* Closes: CM-10478. checks for invalid address-virtual attributes
* New. Deprecated: `mstpctl-stp` attribute
* New. Deprecated: lacp parameters: bond-ad-sys-priority, bond-ad-sys-mac-addr
* New. Enabled: addon module for configuring vrf
* New. Enabled: bridge: display warning when (in vlan unware bridge) an untagged bridge is not configured
* New. Enabled: adjusting MTU for vlan devices depending on lower device mtu
* New. Enabled: introduce checks for reserved vrf table names
* New. Enabled: ifquery: new option '--with-defaults' to include default attributes
* New. Enabled: bridge: disabling ipv6 on bridge if any VXLAN port
* New. Enabled: vrf awareness in dhcp addon module
-- dev-support <dev-support@cumulusnetworks.com> Tue, 3 May 2016 14:42:42 -0700
ifupdown2 (1.1-cl3u1) unstable; urgency=low
* Initial release.
-- dev-support <dev-support@cumulusnetworks.com> Thu, 20 Aug 2015 06:14:24 -0700

4
debian/clean vendored Normal file
View File

@@ -0,0 +1,4 @@
man/ifquery.8
man/ifreload.8
man/ifup.8
man/ifupdown-addons-interfaces.5

1
debian/compat vendored Normal file
View File

@@ -0,0 +1 @@
9

31
debian/control vendored Normal file
View File

@@ -0,0 +1,31 @@
Source: ifupdown2
Section: admin
Priority: optional
Maintainer: Cumulus Networks dev support <dev-support@cumulusnetworks.com>
Standards-Version: 3.9.6
Build-Depends: python-setuptools, dh-python, python-all (>= 2.6.6-3), debhelper (>= 9~), python-docutils, dh-systemd
Homepage: https://github.com/CumulusNetworks/ifupdown2
X-Python-Version: >= 2.6
Package: ifupdown2
Architecture: all
Suggests: python-gvgen, python-mako
Replaces: ifupdown
Conflicts: ifupdown
Provides: ifupdown
Depends: ${python:Depends}, ${misc:Depends}, python-argcomplete, python-ipaddr
Description: Network Interface Management tool similar to ifupdown
ifupdown2 is ifupdown re-written in Python. It replaces ifupdown and provides
the same user interface as ifupdown for network interface configuration.
Like ifupdown, ifupdown2 is a high level tool to configure (or, respectively
deconfigure) network interfaces based on interface definitions in
/etc/network/interfaces. It is capable of detecting network interface
dependencies and comes with several new features which are available as
new command options to ifup/ifdown/ifquery commands. It also comes with a new
command ifreload to reload interface configuration with minimum
disruption. Most commands are also capable of input and output in JSON format.
It is backward compatible with ifupdown /etc/network/interfaces format and
supports newer simplified format. It also supports interface templates with
python-mako for large scale interface deployments. See
/usr/share/doc/ifupdown2/README.rst for details about ifupdown2. Examples
are available under /usr/share/doc/ifupdown2/examples.

17
debian/copyright vendored
View File

@@ -1,5 +1,6 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: ifupdown2
<<<<<<< HEAD
Source: http://www.cumulusnetworks.com
Files: *
@@ -8,6 +9,19 @@ License: GPL-2
Files: debian/*
Copyright: 2013 Cumulus Networks
=======
Upstream-Contact: Cumulus Networks dev support <dev-support@cumulusnetworks.com>
Source: http://www.cumulusnetworks.com
Files: *
Copyright: 2014 Cumulus Networks
License: GPL-2
Files: debian/*
Copyright: 2014 Cumulus Networks
License: GPL-2
>>>>>>> cumulus/dev
License: GPL-2
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -23,8 +37,11 @@ License: GPL-2
.
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
<<<<<<< HEAD
# Please also look if there are files or directories which have a
# different copyright/license attached and list them here.
# Please avoid to pick license terms that are more restrictive than the
# packaged work, as it may make Debian's contributions unacceptable upstream.
=======
>>>>>>> cumulus/dev

1
debian/ifupdown2.bash-completion vendored Normal file
View File

@@ -0,0 +1 @@
completion/ifup

3
debian/ifupdown2.dirs vendored Normal file
View File

@@ -0,0 +1,3 @@
/etc/network/interfaces.d/
/var/lib/ifupdown2/policy.d/
/var/lib/ifupdown2/hooks/

1
debian/ifupdown2.docs vendored Normal file
View File

@@ -0,0 +1 @@
docs/README.rst

1
debian/ifupdown2.examples vendored Normal file
View File

@@ -0,0 +1 @@
docs/examples/*

3
debian/ifupdown2.install vendored Normal file
View File

@@ -0,0 +1,3 @@
sbin/ifupdown2 /usr/share/ifupdown2/
sbin/start-networking /usr/share/ifupdown2/sbin/
debian/networking /etc/default/

6
debian/ifupdown2.links vendored Normal file
View File

@@ -0,0 +1,6 @@
usr/share/ifupdown2/ifupdown2 sbin/ifup
usr/share/ifupdown2/ifupdown2 sbin/ifdown
usr/share/ifupdown2/ifupdown2 sbin/ifquery
usr/share/ifupdown2/ifupdown2 sbin/ifreload
usr/share/man/man8/ifup.8.gz usr/share/man/man8/ifdown.8.gz

5
debian/ifupdown2.manpages vendored Normal file
View File

@@ -0,0 +1,5 @@
man/ifup.8
man/ifquery.8
man/ifreload.8
man/ifupdown-addons-interfaces.5
man/interfaces.5

15
debian/ifupdown2.networking.service vendored Normal file
View File

@@ -0,0 +1,15 @@
[Unit]
Description=ifupdown2 networking initialization
Documentation=man:interfaces(5) man:ifup(8) man:ifdown(8)
[Service]
Type=oneshot
RemainAfterExit=yes
SyslogIdentifier=networking
TimeoutStopSec=30s
ExecStart=/usr/share/ifupdown2/sbin/start-networking start
ExecStop=/usr/share/ifupdown2/sbin/start-networking stop
ExecReload=/usr/share/ifupdown2/sbin/start-networking reload
[Install]
WantedBy=basic.target network.target

76
debian/ifupdown2.postinst vendored Normal file
View File

@@ -0,0 +1,76 @@
#!/bin/sh
# postinst script for ifupdown2
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
process_udev()
{
# override default udev bridge and hotplug rules because they interfere with
# networking init script
udev_user_rulesdir=/etc/udev/rules.d/
udev_sys_rulesdir=/lib/udev/rules.d/
if [ -e $udev_user_rulesdir ]; then
udev_ifupdown2_overrides="80-networking.rules
60-bridge-network-interface.rules"
for u in ${udev_ifupdown2_overrides}
do
if [ -e ${udev_sys_rulesdir}/$u -a ! -e ${udev_user_rulesdir}/$u ]; then
(cd ${udev_user_rulesdir} && ln -sf /dev/null $u)
fi
done
fi
}
MYNAME="${0##*/}"
report() { echo "${MYNAME}: $*" ; }
report_warn() { report "Warning: $*" >&2 ; }
report_err() { report "Error: $*" >&2 ; }
case "$1" in
configure)
# Generic stuff done on all configurations
if [ -f /etc/network/interfaces ] ; then
if ! grep -q "^[[:space:]]*iface[[:space:]]\+lo0\?[[:space:]]\+inet[[:space:]]\+loopback\>" /etc/network/interfaces ; then
report_warn "No 'iface lo' definition found in /etc/network/interfaces"
fi
if ! grep -q "^[[:space:]]*\(allow-\|\)auto[[:space:]]\+\(.*[[:space:]]\+\|\)lo0\?\([[:space:]]\+\|$\)" /etc/network/interfaces ; then
report_warn "No 'auto lo' statement found in /etc/network/interfaces"
fi
else # ! -f /etc/network/interfaces
if [ -z "$2" ]; then
echo "Creating /etc/network/interfaces."
echo "# interfaces(5) file used by ifup(8) and ifdown(8)" > /etc/network/interfaces
echo "auto lo" >> /etc/network/interfaces
echo "iface lo inet loopback" >> /etc/network/interfaces
else
report_warn "/etc/network/interfaces does not exist"
fi
fi
process_udev
;;
purge)
;;
esac
#DEBHELPER#
exit 0

69
debian/ifupdown2.postrm vendored Normal file
View File

@@ -0,0 +1,69 @@
#!/bin/sh
# postrm script for ifupdown2
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postrm> `remove'
# * <postrm> `purge'
# * <old-postrm> `upgrade' <new-version>
# * <new-postrm> `failed-upgrade' <old-version>
# * <new-postrm> `abort-install'
# * <new-postrm> `abort-install' <old-version>
# * <new-postrm> `abort-upgrade' <old-version>
# * <disappearer's-postrm> `disappear' <overwriter>
# <overwriter-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
process_udev()
{
if [ -e /etc/udev/rules.d/80-networking.rules ]; then
udevlink=$(readlink /etc/udev/rules.d/80-networking.rules 2>/dev/null || true)
[ -n "$udevlink" -a "$udevlink" = "/dev/null" ] && rm -f /etc/udev/rules.d/80-networking.rules
fi
if [ -e /etc/udev/rules.d/60-bridge-network-interface.rules ]; then
udevlink=$(readlink /etc/udev/rules.d/60-bridge-network-interface.rules 2>/dev/null || true)
[ -n "$udevlink" -a "$udevlink" = "/dev/null" ] && rm -f /etc/udev/rules.d/60-bridge-network-interface.rules
fi
}
postrm_remove()
{
process_udev
}
# Note: We don't remove /etc/network/interfaces
postrm_purge()
{
rm -f /run/network/ifstatenew
}
case "$1" in
purge)
postrm_purge
;;
remove)
postrm_remove
;;
upgrade|disappear|failed-upgrade|abort-install|abort-upgrade)
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

13
debian/ifupdown2.preinst vendored Normal file
View File

@@ -0,0 +1,13 @@
#! /bin/sh
set -e
case "$1" in
install|upgrade)
# workaround 3.0.0 internal install error. This can be removed in a
# few weeks.
if [ -f /etc/default/networking/networking.default ]; then
dpkg-maintscript-helper rm_conffile /etc/default/networking/networking.default 1.1 -- $@
rm -rf /etc/default/networking
fi
;;
esac

23
debian/networking vendored Normal file
View File

@@ -0,0 +1,23 @@
#
#
# Parameters for the networking service
#
#
# Change the below to yes if you want verbose logging to be enabled
VERBOSE="no"
# Change the below to yes if you want debug logging to be enabled
DEBUG="no"
# Change the below to yes if you want logging to go to syslog
SYSLOG="no"
# Exclude interfaces
EXCLUDE_INTERFACES=
# Set to 'yes' if you want to skip ifdown during system reboot
# and shutdown. This is of interest in large scale interface
# deployments where you dont want to wait for interface
# deconfiguration to speed up shutdown/reboot
SKIP_DOWN_AT_SYSRESET="yes"

21
debian/rules vendored Executable file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/make -f
#export DH_VERBOSE=1
export PYBUILD_NAME=ifupdown2
export PYBUILD_INSTALL_ARGS=--install-lib=/usr/share/ifupdown2 --install-scripts=/usr/share/ifupdown2
%:
dh $@ --with python2 --with systemd --buildsystem=pybuild
override_dh_installman:
./scripts/genmanpages.sh ./man.rst ./man
dh_installman
override_dh_systemd_start:
dh_systemd_start --name=networking --no-start
override_dh_systemd_enable:
dh_systemd_enable --name=networking
override_dh_compress:
dh_compress -X.py

1
debian/source/format vendored Normal file
View File

@@ -0,0 +1 @@
3.0 (git)