Import Debian changes 1.0.27-1

tinc (1.0.27-1) unstable; urgency=medium

  * New upstream release.
  * Bump Standards-Version.
  * Add native systemd unit files.
  * Automatically convert networks listed in nets.boot to systemd service
    instances on upgrade.
This commit is contained in:
Guus Sliepen 2016-04-10 01:39:16 +02:00
commit c167efd01b
52 changed files with 1811 additions and 958 deletions

14
debian/NEWS vendored Normal file
View file

@ -0,0 +1,14 @@
tinc (1.0.27-1) unstable; urgency=medium
This package now provides native systemd service files, allowing multiple
instances of tinc to be managed. Existing networks listed in
/etc/tinc/nets.boot will be converted to service instances once during this
upgrade. Afterwards, you can enable and disable networks using:
systemctl enable tinc@<netname>
systemctl disable tinc@<netname>
If you do not have systemd installed, the SysV init script will continue to
work as usual. For more information, see README.Debian.
-- Guus Sliepen <guus@debian.org> Sun, 10 Apr 2016 01:33:55 +0200

59
debian/README.Debian vendored
View file

@ -1,17 +1,54 @@
tinc for Debian
----------------------
---------------
The manual for tinc is also available as info pages, type `info tinc'
to read it.
The system startup script for tinc, /etc/init.d/tinc, uses the file
/etc/tinc/nets.boot to find out which networks have to be started.
There are several ways in which tinc may be automatically started at boot:
Alternatively, you can create a stanza in /etc/network/interfaces, and add a
line with "tinc-net <netname>". This will cause a tincd to be started which
uses the configuration from /etc/tinc/<netname>. You can use an inet static
(with address and netmask options) or inet dhcp stanza, in which case the ifup
will configure the VPN interface and you do not need to have a tinc-up script.
Systemd
-------
Since 1.0.27-1, the tinc package comes with native systemd service files.
To enable and start a net, call:
systemctl enable tinc@<netname>
systemctl start tinc@<netname>
This will cause a tincd to be started which uses the configuration from
/etc/tinc/<netname>, and also makes sure that it will be started next time your
system boots.
Apart from controlling individual instances, you can also start/stop/reload all
enabled instances simultaneously by omitting @<netname>, for example:
systemctl reload tinc
Note that when you have systemd installed on your system, the file
/etc/tinc/nets.boot will not be used anymore to automatically start tinc
daemons. If the variable EXTRA is defined in /etc/default/tinc, it will be
passed on to tinc. The variable LIMITS is however not used.
The service files that come with this package start tinc unconditionally.
However, tinc does support socket activation. If you wish to write a socket
unit for tinc, use the ListenStream option to specify on which port(s) and
address(es) tinc should listen.
SysVinit
--------
The system startup script for tinc, /etc/init.d/tinc, uses the file
/etc/tinc/nets.boot to find out which networks have to be started. Use one
netname per line. Lines starting with a # are ignored.
/etc/network/interfaces
-----------------------
You can create a stanza in /etc/network/interfaces, and add a line with
"tinc-net <netname>". This will cause a tincd to be started which uses the
configuration from /etc/tinc/<netname>. You can use an inet static (with
address and netmask options) or inet dhcp stanza, in which case the ifup will
configure the VPN interface and you do not need to have a tinc-up script.
The following options are also recognized and map directly to the corresponding
command line options for tincd:
@ -37,7 +74,7 @@ iface vpn inet static
This will start a tinc daemon that reads its configuration from
/etc/tinc/myvpn, logs at debug level 1, locks itself in RAM, runs as user
nobody, writes the PID to /tmp/tinc.pid, and creates a network interface called
"vpn". Ifup then sets the address and netmask on that interface.
nobody, and creates a network interface called "vpn". Ifup then sets the
address and netmask on that interface.
-- Guus Sliepen <guus@debian.org>, Fri, 25 June 2012, 20:28:35 +0200
-- Guus Sliepen <guus@debian.org>, Sun, 10 April 2016, 01:38:08 +0200

10
debian/changelog vendored
View file

@ -1,3 +1,13 @@
tinc (1.0.27-1) unstable; urgency=medium
* New upstream release.
* Bump Standards-Version.
* Add native systemd unit files.
* Automatically convert networks listed in nets.boot to systemd service
instances on upgrade.
-- Guus Sliepen <guus@debian.org> Sun, 10 Apr 2016 01:39:16 +0200
tinc (1.0.26-1) unstable; urgency=medium
* New upstream release.

4
debian/control vendored
View file

@ -2,8 +2,8 @@ Source: tinc
Section: net
Priority: optional
Maintainer: Guus Sliepen <guus@debian.org>
Standards-Version: 3.9.6
Build-Depends: libssl-dev, debhelper (>= 9), gettext, texinfo, zlib1g-dev, liblzo2-dev, libvdeplug-dev
Standards-Version: 3.9.7
Build-Depends: libssl-dev, debhelper (>= 9), gettext, texinfo, zlib1g-dev, liblzo2-dev, libvdeplug-dev, dh-systemd
Homepage: http://www.tinc-vpn.org/
Package: tinc

28
debian/preinst vendored Normal file
View file

@ -0,0 +1,28 @@
#!/bin/sh
NETSFILE="/etc/tinc/nets.boot"
SYSTEM="/lib/systemd/system"
WANTS="/etc/systemd/system/multi-user.target.wants"
set -e
case "$1" in
upgrade)
if dpkg --compare-versions "$2" '<<' "1.0.27-1"; then
if [ -f "$NETSFILE" ]; then
echo -n "Creating systemd service instances from nets.boot:"
mkdir -p "$WANTS"
egrep '^[ ]*[a-zA-Z0-9_-]+' $NETSFILE | while read net args; do
echo -n " $net"
ln -s "$SYSTEM/tinc@.service" "$WANTS/tinc@$net.service" 2>/dev/null || true
done
echo "."
fi
fi
;;
*)
;;
esac
#DEBHELPER#

17
debian/rules vendored
View file

@ -1,16 +1,7 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
%:
dh $@ --parallel
dh $@ --parallel --with systemd
override_dh_auto_configure:
dh_auto_configure -- --enable-uml --enable-vde
@ -22,7 +13,7 @@ override_dh_auto_install:
override_dh_installinit:
dh_installinit -R
dh_installinit --name=tinc@ --noscripts
override_dh_clean:
dh_clean
rm -f src/device.c
override_dh_systemd_start:
dh_systemd_start --restart-after-upgrade

16
debian/tinc.service vendored Normal file
View file

@ -0,0 +1,16 @@
# This is a mostly empty service, but allows commands like stop, start, reload
# to propagate to all tinc@ service instances.
[Unit]
Description=Tinc VPN
After=network.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/true
ExecReload=/bin/true
WorkingDirectory=/etc/tinc
[Install]
WantedBy=multi-user.target

17
debian/tinc@.service vendored Normal file
View file

@ -0,0 +1,17 @@
[Unit]
Description=Tinc net %i
PartOf=tinc.service
ReloadPropagatedFrom=tinc.service
[Service]
Type=simple
WorkingDirectory=/etc/tinc/%i
ExecStart=/usr/sbin/tinc -n %i start -D
ExecReload=/usr/sbin/tinc -n %i reload
ExecStop=/usr/sbin/tinc -n %i stop
TimeoutStopSec=5
Restart=always
RestartSec=60
[Install]
WantedBy=tinc.service