diff --git a/debian/control b/debian/control index 46b8307..dea8d25 100644 --- a/debian/control +++ b/debian/control @@ -1,17 +1,17 @@ Source: zerotier-one -Maintainer: Adam Ierymenko +Maintainer: NAStools Section: net Priority: optional Standards-Version: 3.9.6 -Build-Depends: debhelper (>= 9), liblz4-dev, libnatpmp-dev, dh-systemd, ruby-ronn -Vcs-Git: git://github.com/zerotier/ZeroTierOne -Vcs-Browser: https://github.com/zerotier/ZeroTierOne -Homepage: https://www.zerotier.com/ +Build-Depends: debhelper (>= 9), liblz4-dev, libnatpmp-dev, ruby-ronn +Vcs-Git: git://github.com/nastools/zerotierone +Vcs-Browser: https://github.com/nastools/zerotierone +Homepage: https://www.zerotier.com -Package: zerotier-one +Package: nastools-zerotier-one Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, liblz4-1, libnatpmp1, iproute2 -Homepage: https://www.zerotier.com/ +Depends: readynasos (>= 6.6.0), ${shlibs:Depends}, ${misc:Depends}, + libnatpmp1, iproute2 Description: ZeroTier network virtualization service ZeroTier One lets you join ZeroTier virtual networks and have them appear as tun/tap ports on your system. See diff --git a/debian/control.wheezy b/debian/control.wheezy deleted file mode 100644 index 0cbd151..0000000 --- a/debian/control.wheezy +++ /dev/null @@ -1,19 +0,0 @@ -Source: zerotier-one -Maintainer: Adam Ierymenko -Section: net -Priority: optional -Standards-Version: 3.9.4 -Build-Depends: debhelper (>= 9), ruby-ronn -Vcs-Git: git://github.com/zerotier/ZeroTierOne -Vcs-Browser: https://github.com/zerotier/ZeroTierOne -Homepage: https://www.zerotier.com/ - -Package: zerotier-one -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, iproute -Homepage: https://www.zerotier.com/ -Description: ZeroTier network virtualization service - ZeroTier One lets you join ZeroTier virtual networks and - have them appear as tun/tap ports on your system. See - https://www.zerotier.com/ for instructions and - documentation. diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 0000000..28456f2 --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,14 @@ +[DEFAULT] +pristine-tar = True +debian-branch = master +debian-tag = readynas/%(version)s +debian-tag-msg = %(pkg)s ReadyNAS OS release %(version)s + +[git-buildpackage] +export-dir = ../build-area/ +color = on +pristine-tar-commit = True + +[git-dch] +# ignore merge commit messages +git-log = --no-merges diff --git a/debian/install b/debian/install new file mode 100644 index 0000000..f4ef971 --- /dev/null +++ b/debian/install @@ -0,0 +1,4 @@ +debian/readynas/config.xml apps/nastools-zerotier-one +debian/readynas/fvapp-nastools-zerotier-one.service apps/nastools-zerotier-one +debian/readynas/logo.png apps/nastools-zerotier-one +zerotier-one apps/nastools-zerotier-one/sbin diff --git a/debian/links b/debian/links new file mode 100644 index 0000000..7eef662 --- /dev/null +++ b/debian/links @@ -0,0 +1,3 @@ +apps/nastools-zerotier-one/sbin/zerotier-one usr/sbin/zerotier-cli +apps/nastools-zerotier-one/sbin/zerotier-one usr/sbin/zerotier-idtool +apps/nastools-zerotier-one/sbin/zerotier-one usr/sbin/zerotier-one diff --git a/debian/lintian-overrides b/debian/lintian-overrides new file mode 100644 index 0000000..61c7fb5 --- /dev/null +++ b/debian/lintian-overrides @@ -0,0 +1,7 @@ +## Overrides from NAStools +# Overrides for ReadyNAS packaging +nastools-zerotier-one: non-standard-toplevel-dir apps/ +nastools-zerotier-one: file-in-unusual-dir apps/nastools-zerotier-one/* + +# Debian's libminiupnpc is too old, so let ZT include its own +nastools-zerotier-one: embedded-library apps/nastools-zerotier-one/sbin/zerotier-one: libminiupnpc diff --git a/debian/manpages b/debian/manpages new file mode 100644 index 0000000..2f03aa0 --- /dev/null +++ b/debian/manpages @@ -0,0 +1,3 @@ +doc/zerotier-cli.1 +doc/zerotier-idtool.1 +doc/zerotier-one.8 diff --git a/debian/patches/0001-Update-platformDefaultHomePath-for-ReadyNAS-OS.patch b/debian/patches/0001-Update-platformDefaultHomePath-for-ReadyNAS-OS.patch new file mode 100644 index 0000000..9acf2fa --- /dev/null +++ b/debian/patches/0001-Update-platformDefaultHomePath-for-ReadyNAS-OS.patch @@ -0,0 +1,23 @@ +From: NAStools +Date: Tue, 1 Nov 2016 16:09:41 -0700 +Subject: Update platformDefaultHomePath() for ReadyNAS OS + +--- + osdep/OSUtils.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/osdep/OSUtils.cpp b/osdep/OSUtils.cpp +index 3a04308..0a9ade6 100644 +--- a/osdep/OSUtils.cpp ++++ b/osdep/OSUtils.cpp +@@ -244,8 +244,8 @@ std::string OSUtils::platformDefaultHomePath() + // BSD likes /var/db instead of /var/lib + return std::string("/var/db/zerotier-one"); + #else +- // Use /var/lib for Linux and other *nix +- return std::string("/var/lib/zerotier-one"); ++ // Use /apps/nastools-zerotier-one/var for ReadyNAS OS ++ return std::string("/apps/nastools-zerotier-one/var"); + #endif + + #endif diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..e4a416a --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +0001-Update-platformDefaultHomePath-for-ReadyNAS-OS.patch diff --git a/debian/readynas/config.xml b/debian/readynas/config.xml new file mode 100644 index 0000000..05bc556 --- /dev/null +++ b/debian/readynas/config.xml @@ -0,0 +1,13 @@ + + + 6.6.0 + ZeroTier One NT + NAStools + 0 + + https://github.com/nastools/zerotierone + nastools-zerotier-one + ZeroTier network virtualization service (CLI only) + fvapp-nastools-zerotier-one.service + + diff --git a/debian/zerotier-one.service b/debian/readynas/fvapp-nastools-zerotier-one.service similarity index 54% rename from debian/zerotier-one.service rename to debian/readynas/fvapp-nastools-zerotier-one.service index a0126b7..adc8d71 100644 --- a/debian/zerotier-one.service +++ b/debian/readynas/fvapp-nastools-zerotier-one.service @@ -1,9 +1,9 @@ [Unit] Description=ZeroTier One -After=network.target +After=network.target apache2.service [Service] -ExecStart=/usr/sbin/zerotier-one +ExecStart=/apps/nastools-zerotier-one/sbin/zerotier-one Restart=always KillMode=process diff --git a/debian/readynas/logo.png b/debian/readynas/logo.png new file mode 100644 index 0000000..971b24f Binary files /dev/null and b/debian/readynas/logo.png differ diff --git a/debian/rules b/debian/rules index cf0b04f..c34429d 100755 --- a/debian/rules +++ b/debian/rules @@ -1,16 +1,6 @@ #!/usr/bin/make -f -CFLAGS=-O3 -fstack-protector-strong -CXXFLAGS=-O3 -fstack-protector-strong - %: - dh $@ --with systemd - -override_dh_auto_build: - make ZT_USE_MINIUPNPC=1 -j 2 - -override_dh_systemd_start: - dh_systemd_start --restart-after-upgrade + dh $@ -override_dh_installinit: - dh_installinit --name=zerotier-one -- defaults +override_dh_auto_install: diff --git a/debian/rules.wheezy b/debian/rules.wheezy deleted file mode 100755 index e51d794..0000000 --- a/debian/rules.wheezy +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/make -f - -CFLAGS=-O3 -fstack-protector -CXXFLAGS=-O3 -fstack-protector - -%: - dh $@ - -override_dh_auto_build: - make ZT_USE_MINIUPNPC=1 -j 2 - diff --git a/debian/source.lintian-overrides b/debian/source.lintian-overrides new file mode 100644 index 0000000..96c149f --- /dev/null +++ b/debian/source.lintian-overrides @@ -0,0 +1,5 @@ +## Overrides from NAStools +# Nothing we can do about these, since they're upstream +zerotier-one source: source-is-missing ext/installfiles/mac/ui/ztui.min.js +zerotier-one source: source-is-missing ext/installfiles/mac/ui/simpleajax.min.js +zerotier-one source: source-is-missing ext/installfiles/mac/ui/react.min.js diff --git a/debian/format b/debian/source/format similarity index 100% rename from debian/format rename to debian/source/format diff --git a/debian/source/include-binaries b/debian/source/include-binaries new file mode 100644 index 0000000..997e03f --- /dev/null +++ b/debian/source/include-binaries @@ -0,0 +1 @@ +debian/readynas/logo.png diff --git a/debian/zerotier-one.init b/debian/zerotier-one.init deleted file mode 100644 index 41a22a5..0000000 --- a/debian/zerotier-one.init +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh - -### BEGIN INIT INFO -# Provides: zerotier-one -# Required-Start: $remote_fs $syslog -# Required-Stop: $remote_fs $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: -# Short-Description: ZeroTier One network virtualization service -### END INIT INFO - -PATH=/bin:/usr/bin:/sbin:/usr/sbin -DESC="zerotier-one daemon" -NAME=zerotier-one -DAEMON=/usr/sbin/zerotier-one -PIDFILE=/var/lib/zerotier-one/zerotier-one.pid -SCRIPTNAME=/etc/init.d/"$NAME" -EXTRA_OPTS=-d - -test -f $DAEMON || exit 0 - -. /lib/lsb/init-functions - -case "$1" in -start) log_daemon_msg "Starting ZeroTier One" "zerotier-one" - start_daemon -p $PIDFILE $DAEMON $EXTRA_OPTS - log_end_msg $? - ;; -stop) log_daemon_msg "Stopping ZeroTier One" "zerotier-one" - killproc -p $PIDFILE $DAEMON - RETVAL=$? - [ $RETVAL -eq 0 ] && [ -e "$PIDFILE" ] && rm -f $PIDFILE - log_end_msg $RETVAL - ;; -restart) log_daemon_msg "Restarting ZeroTier One" "zerotier-one" - $0 stop - $0 start - ;; -reload|force-reload) log_daemon_msg "Reloading ZeroTier One" "zerotier-one" - log_end_msg 0 - ;; -status) - status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $? - ;; -*) log_action_msg "Usage: /etc/init.d/cron {start|stop|status|restart|reload|force-reload}" - exit 2 - ;; -esac -exit 0 diff --git a/debian/zerotier-one.upstart b/debian/zerotier-one.upstart deleted file mode 100644 index 7753580..0000000 --- a/debian/zerotier-one.upstart +++ /dev/null @@ -1,14 +0,0 @@ -description "ZeroTier One upstart startup script" - -author "Adam Ierymenko " - -start on (local-filesystems and net-device-up IFACE!=lo) -stop on runlevel [!2345] - -respawn -respawn limit 2 300 - -#pre-start script -#end script - -exec /usr/sbin/zerotier-one