Control: tags 1039401 + patch Control: tags 1039401 + pending
Dear maintainer, I've prepared an NMU for uanytun (versioned as 0.3.7-2.2) and uploaded it to DELAYED/3. Please feel free to tell me if I should cancel it. Regards, Nadzeya
diffstat for uanytun-0.3.7 uanytun-0.3.7 changelog | 9 +++++++++ rules | 9 +++++++++ uanytun-generator | 20 ++++++++++++++++++++ uanytun-launcher | 31 +++++++++++++++++++++++++++++++ uanytun.service | 14 ++++++++++++++ [email protected] | 19 +++++++++++++++++++ 6 files changed, 102 insertions(+) diff -Nru uanytun-0.3.7/debian/changelog uanytun-0.3.7/debian/changelog --- uanytun-0.3.7/debian/changelog 2026-07-21 19:50:59.000000000 +0200 +++ uanytun-0.3.7/debian/changelog 2026-09-25 18:18:25.000000000 +0200 @@ -1,3 +1,12 @@ +uanytun (0.3.7-2.2) unstable; urgency=medium + + * Non-maintainer upload. + * Add native systemd units, as systemd-sysv-generator was removed + upstream in systemd v260 (Closes: #1039401) + * The init script stays installed for sysvinit users + + -- Nadzeya Hutsko <[email protected]> Fri, 25 Sep 2026 18:18:25 +0200 + uanytun (0.3.7-2.1) unstable; urgency=medium * Non-maintainer upload. diff -Nru uanytun-0.3.7/debian/rules uanytun-0.3.7/debian/rules --- uanytun-0.3.7/debian/rules 2026-07-21 19:46:02.000000000 +0200 +++ uanytun-0.3.7/debian/rules 2026-09-25 16:58:56.000000000 +0200 @@ -53,6 +53,12 @@ # Fix unusual path: mv debian/uanytun/usr/share/uanytun/examples/uanytun debian/uanytun/usr/share/uanytun/examples/config echo "example configurations can be found at /usr/share/uanytun/examples/config" > debian/uanytun/etc/uanytun/README + # ExecStart of [email protected], and the generator that hands + # uanytun.service the tunnels from /etc/uanytun/autostart + install -D -m 755 debian/uanytun-launcher \ + debian/uanytun/usr/libexec/uanytun-launcher + install -D -m 755 debian/uanytun-generator \ + debian/uanytun/usr/lib/systemd/system-generators/uanytun-generator # Build architecture-independent files here. binary-indep: install @@ -65,6 +71,9 @@ dh_installchangelogs ChangeLog dh_installdocs dh_installexamples + # Enabled but left stopped, as postinst only ran update-rc.d for the + # init script and never started it + dh_installsystemd --no-start dh_installinit dh_installsysusers dh_installman doc/uanytun.8 diff -Nru uanytun-0.3.7/debian/uanytun-generator uanytun-0.3.7/debian/uanytun-generator --- uanytun-0.3.7/debian/uanytun-generator 1970-01-01 01:00:00.000000000 +0100 +++ uanytun-0.3.7/debian/uanytun-generator 2026-09-25 16:58:37.000000000 +0200 @@ -0,0 +1,20 @@ +#!/bin/sh +# +# Makes uanytun.service start, stop and reload every tunnel listed in +# /etc/uanytun/autostart, the way /etc/init.d/uanytun did + +set -eu + +WANTDIR="$1/uanytun.service.wants" +SERVICE="/usr/lib/systemd/system/[email protected]" +AUTOSTART="/etc/uanytun/autostart" + +[ -f "$AUTOSTART" ] || exit 0 + +mkdir -p "$WANTDIR" + +for NAME in $(sed 's/#.*//' "$AUTOSTART" | grep -e '\w') ; do + ln -sf "$SERVICE" "$WANTDIR/uanytun@$NAME.service" +done + +exit 0 diff -Nru uanytun-0.3.7/debian/uanytun-launcher uanytun-0.3.7/debian/uanytun-launcher --- uanytun-0.3.7/debian/uanytun-launcher 1970-01-01 01:00:00.000000000 +0100 +++ uanytun-0.3.7/debian/uanytun-launcher 2026-09-25 16:58:33.000000000 +0200 @@ -0,0 +1,31 @@ +#!/bin/sh +# +# Starts one tunnel for [email protected] from the config that +# /etc/init.d/uanytun used. ExecStart cannot do it alone, as every +# non comment line of the config becomes one --option argument +# +# --write-pid is dropped, as systemd follows the process + +set -e + +NAME="$1" +CONFIG_DIR="/etc/uanytun" +CONFIG="$CONFIG_DIR/$NAME/config" + +DAEMONOPTS="" +[ -f "/etc/default/uanytun" ] && . "/etc/default/uanytun" + +[ -f "$CONFIG" ] || { + echo "uanytun: $CONFIG does not exist" >&2 + exit 1 +} + +POSTUP="" +[ -f "$CONFIG_DIR/$NAME/post-up.sh" ] && POSTUP="-x $CONFIG_DIR/$NAME/post-up.sh" + +CHROOTDIR=$(sed -n 's/^chroot[[:space:]]*//p' "$CONFIG") +[ -n "$CHROOTDIR" ] && mkdir -p "$CHROOTDIR" + +DAEMONARG=$(sed 's/#.*//' "$CONFIG" | grep -e '\w' | sed 's/^/--/' | tr '\n' ' ') + +exec /usr/sbin/uanytun --nodaemonize $POSTUP $DAEMONOPTS $DAEMONARG diff -Nru uanytun-0.3.7/debian/uanytun.service uanytun-0.3.7/debian/uanytun.service --- uanytun-0.3.7/debian/uanytun.service 1970-01-01 01:00:00.000000000 +0100 +++ uanytun-0.3.7/debian/uanytun.service 2026-09-25 16:58:09.000000000 +0200 @@ -0,0 +1,14 @@ +[Unit] +Description=uanytun service +Documentation=man:uanytun(8) +After=network.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/bin/true +ExecReload=/bin/true +WorkingDirectory=/etc/uanytun + +[Install] +WantedBy=multi-user.target diff -Nru uanytun-0.3.7/debian/[email protected] uanytun-0.3.7/debian/[email protected] --- uanytun-0.3.7/debian/[email protected] 1970-01-01 01:00:00.000000000 +0100 +++ uanytun-0.3.7/debian/[email protected] 2026-09-25 16:58:26.000000000 +0200 @@ -0,0 +1,19 @@ +[Unit] +Description=uanytun tunnel %i +Documentation=man:uanytun(8) +PartOf=uanytun.service +Wants=network-online.target +After=network-online.target nss-lookup.target + +[Service] +Type=exec +ExecStart=/usr/libexec/uanytun-launcher %i +Restart=on-failure +PrivateTmp=yes +ProtectHome=yes +ProtectSystem=full +DeviceAllow=/dev/net/tun rw +DevicePolicy=closed + +[Install] +WantedBy=multi-user.target

