Compare commits

...
Sign in to create a new pull request.

16 commits

Author SHA1 Message Date
didyouexpectthat
0708629155
Merge pull request #1 from didyouexpectthat/avahi-patch
Unblock zt0 adapter from Avahi
2018-01-23 11:28:19 -08:00
didyouexpectthat
29e340f2b6
Unblock zt0 adapter from Avahi
Avahi blocks ZeroTier advertisements, so remove the zt0 deny-interfaces config.
2018-01-23 11:19:03 -08:00
didyouexpectthat
27ac1af22b Fix maintainer 2018-01-12 20:10:51 -08:00
didyouexpectthat
4022e3d25e Remove legacy file. 2018-01-12 20:06:01 -08:00
didyouexpectthat
952e2e4f32 Remove UI install scripts 2018-01-12 19:15:12 -08:00
didyouexpectthat
338ea431b6 Additional removal of patch 0002 2018-01-12 18:48:46 -08:00
didyouexpectthat
c7819dc028 Remove patch 0002 due to build failures with new UI 2018-01-12 18:47:45 -08:00
didyouexpectthat
24148f20cc Increment version information. 2018-01-12 18:44:17 -08:00
didyouexpectthat
3e92348ad2 Merge tag 'upstream/1.2.4'
Upstream version 1.2.4
2018-01-12 18:22:33 -08:00
NAStools
fb3e4fb68f Release v1.1.14-nt3 2016-12-09 10:22:03 -08:00
NAStools
784b1b95ff Clean up authtoken CGI 2016-12-09 10:20:28 -08:00
NAStools
c4546ac7e0 Release v1.1.14-nt2 2016-11-29 18:03:03 -08:00
NAStools
1a24759ef9 Configure package to use UI from macOS client 2016-11-29 18:02:18 -08:00
NAStools
dff338ae16 Include UI from macOS client 2016-11-29 17:51:00 -08:00
NAStools
3eb4fa66cf Release v1.1.14-nt1 2016-11-01 16:50:31 -07:00
NAStools
0a50b4a6b2 Modified packaging for ReadyNAS OS 2016-11-01 16:50:04 -07:00
21 changed files with 148 additions and 157 deletions

58
debian/changelog vendored
View file

@ -1,56 +1,24 @@
zerotier-one (1.2.4) unstable; urgency=medium
zerotier-one (1.2.4-nt1) unstable; urgency=medium
* See https://github.com/zerotier/ZeroTierOne for release notes.
* Imported Upstream version 1.2.4
-- Adam Ierymenko <adam.ierymenko@zerotier.com> Mon, 24 Mar 2017 01:00:00 -0700
-- didyouexpectthat <github@didyouexpect.us> Fri, 12 Jan 2018 18:26:28 -0800
zerotier-one (1.2.2) unstable; urgency=medium
zerotier-one (1.1.14-nt3) unstable; urgency=medium
* See https://github.com/zerotier/ZeroTierOne for release notes.
* Clean up authtoken CGI
-- Adam Ierymenko <adam.ierymenko@zerotier.com> Fri, 17 Mar 2017 01:00:00 -0700
-- NAStools <dev@nas.tools> Fri, 09 Dec 2016 10:20:55 -0800
zerotier-one (1.2.0) unstable; urgency=medium
zerotier-one (1.1.14-nt2) unstable; urgency=medium
* See https://github.com/zerotier/ZeroTierOne for release notes.
* Include UI from macOS client
* Configure package to use UI from macOS client
-- Adam Ierymenko <adam.ierymenko@zerotier.com> Tue, 14 Mar 2017 09:08:00 -0700
-- NAStools <dev@nas.tools> Tue, 29 Nov 2016 18:02:28 -0800
zerotier-one (1.1.14) unstable; urgency=medium
zerotier-one (1.1.14-nt1) unstable; urgency=medium
* See https://github.com/zerotier/ZeroTierOne for release notes.
* Initial release
-- Adam Ierymenko <adam.ierymenko@zerotier.com> Tue, 21 Jul 2016 07:14:12 -0700
zerotier-one (1.1.12) unstable; urgency=medium
* See https://github.com/zerotier/ZeroTierOne for release notes.
-- Adam Ierymenko <adam.ierymenko@zerotier.com> Tue, 12 Jul 2016 03:02:22 -0700
zerotier-one (1.1.10) unstable; urgency=medium
* See https://github.com/zerotier/ZeroTierOne for release notes.
* ZeroTier Debian packages no longer depend on http-parser since its ABI is too unstable.
-- Adam Ierymenko <adam.ierymenko@zerotier.com> Tue, 12 Jul 2016 12:29:00 -0700
zerotier-one (1.1.8) unstable; urgency=low
* See https://github.com/zerotier/ZeroTierOne for release notes.
-- Adam Ierymenko <adam.ierymenko@zerotier.com> Fri, 08 Jul 2016 01:56:00 -0700
zerotier-one (1.1.6) unstable; urgency=medium
* First Debian release on ZeroTier, Inc. private apt repository.
* See https://github.com/zerotier/ZeroTierOne for release notes.
-- Adam Ierymenko <adam.ierymenko@zerotier.com> Fri, 24 Jun 2016 10:00:00 -0700
zerotier-one (1.1.5) UNRELEASED; urgency=medium
* Development package -- first clean Debian packaging test.
-- Adam Ierymenko <adam.ierymenko@zerotier.com> Wed, 08 Jun 2016 10:05:01 -0700
-- NAStools <dev@nas.tools> Tue, 01 Nov 2016 16:30:45 -0700

16
debian/control vendored
View file

@ -1,17 +1,17 @@
Source: zerotier-one
Maintainer: Adam Ierymenko <adam.ierymenko@zerotier.com>
Maintainer: NAStools <github@didyouexpect.us>
Section: net
Priority: optional
Standards-Version: 3.9.6
Build-Depends: debhelper (>= 9), dh-systemd
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, dh-systemd
Vcs-Git: git://github.com/didyouexpectthat/zerotierone
Vcs-Browser: https://github.com/didyouexpectthat/zerotierone
Homepage: https://www.zerotier.com
Package: zerotier-one
Package: nastools-zerotier-one
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, iproute2, adduser, libstdc++6
Homepage: https://www.zerotier.com/
Depends: readynasos (>= 6.9.2), ${shlibs:Depends}, ${misc:Depends},
libnatpmp1, iproute2, libstdc++6
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

19
debian/control.wheezy vendored
View file

@ -1,19 +0,0 @@
Source: zerotier-one
Maintainer: Adam Ierymenko <adam.ierymenko@zerotier.com>
Section: net
Priority: optional
Standards-Version: 3.9.4
Build-Depends: debhelper (>= 9)
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, libstdc++6
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.

14
debian/gbp.conf vendored Normal file
View file

@ -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

6
debian/install vendored Normal file
View file

@ -0,0 +1,6 @@
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
debian/readynas/https.conf apps/nastools-zerotier-one
debian/readynas/authtoken apps/nastools-zerotier-one/cgi
zerotier-one apps/nastools-zerotier-one/sbin

3
debian/links vendored Normal file
View file

@ -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

7
debian/lintian-overrides vendored Normal file
View file

@ -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

3
debian/manpages vendored Normal file
View file

@ -0,0 +1,3 @@
doc/zerotier-cli.1
doc/zerotier-idtool.1
doc/zerotier-one.8

View file

@ -0,0 +1,23 @@
From: NAStools <dev@nas.tools>
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

1
debian/patches/series vendored Normal file
View file

@ -0,0 +1 @@
0001-Update-platformDefaultHomePath-for-ReadyNAS-OS.patch

5
debian/postinst vendored
View file

@ -6,4 +6,9 @@ case "$1" in
;;
esac
# avahi explicitly doesn't broadcast over ZeroTier
# so tell avahi to change the config
# avahi already reloads config on file change
sed -i 's/,zt0//' /etc/avahi/avahi-daemon.conf
#DEBHELPER#

21
debian/readynas/authtoken.c vendored Normal file
View file

@ -0,0 +1,21 @@
#include <stdio.h>
#include <stdlib.h>
int main() {
FILE *f;
char c[32];
f=fopen("/apps/nastools-zerotier-one/var/authtoken.secret","r");
if(!f)
return 1;
printf("Content-Type: text/plain\n\n");
size_t ret = fread(c, 1, sizeof(c), f);
if(!ret)
return 1;
fwrite(c, ret, 1, stdout);
fclose(f);
return 0;
}

13
debian/readynas/config.xml vendored Normal file
View file

@ -0,0 +1,13 @@
<Application resource-id="nastools-zerotier-one">
<Version>1.2.4-nt1</Version>
<MinFirmwareVer>6.9.2</MinFirmwareVer>
<Name>ZeroTier One NT</Name>
<Author>NAStools</Author>
<RequireReboot>0</RequireReboot>
<LaunchURL>https://localhost/apps/nastools-zerotier-one/ui/</LaunchURL>
<InfoURL>https://github.com/nastools/zerotierone</InfoURL>
<DebianPackage>nastools-zerotier-one</DebianPackage>
<Description lang="en-us">ZeroTier network virtualization service</Description>
<ServiceName>fvapp-nastools-zerotier-one.service</ServiceName>
<ConfigURL/>
</Application>

View file

@ -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

21
debian/readynas/https.conf vendored Normal file
View file

@ -0,0 +1,21 @@
<IfModule !mod_proxy.c>
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
</IfModule>
<IfModule !mod_proxy_http.c>
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so
</IfModule>
ScriptAlias /apps/nastools-zerotier-one/cgi /apps/nastools-zerotier-one/cgi
<Location /apps/nastools-zerotier-one>
Include "/etc/frontview/apache/Admin_Auth.conf"
</Location>
<IfModule mod_proxy.c>
<IfModule mod_proxy_http.c>
<Location /apps/nastools-zerotier-one/ui/>
ProxyPass http://localhost:9993/
ProxyPassReverse http://localhost:9993/
</Location>
</IfModule>
</IfModule>

BIN
debian/readynas/logo.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

16
debian/rules vendored
View file

@ -1,16 +1,14 @@
#!/usr/bin/make -f
CFLAGS=-O3 -fstack-protector-strong
CXXFLAGS=-O3 -fstack-protector-strong
%:
dh $@ --with systemd
dh $@
override_dh_auto_build:
make -j 2
make ZT_USE_MINIUPNPC=1 -j$(nproc)
gcc $$(pwd)/debian/readynas/authtoken.c -o $$(pwd)/debian/readynas/authtoken
chmod u+s $$(pwd)/debian/readynas/authtoken
override_dh_systemd_start:
dh_systemd_start --restart-after-upgrade
override_dh_fixperms:
dh_fixperms -Xauthtoken
override_dh_installinit:
dh_installinit --name=zerotier-one -- defaults
override_dh_auto_install:

11
debian/rules.wheezy vendored
View file

@ -1,11 +0,0 @@
#!/usr/bin/make -f
CFLAGS=-O3 -fstack-protector
CXXFLAGS=-O3 -fstack-protector
%:
dh $@
override_dh_auto_build:
make -j 2

1
debian/source/include-binaries vendored Normal file
View file

@ -0,0 +1 @@
debian/readynas/logo.png

View file

@ -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

View file

@ -1,14 +0,0 @@
description "ZeroTier One upstart startup script"
author "Adam Ierymenko <adam.ierymenko@zerotier.com>"
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