From 9f269d5c0e18dbd4a6c3cb9d25f0fa7f3ed2174d Mon Sep 17 00:00:00 2001 From: root Date: Sun, 9 Apr 2017 12:09:51 +0200 Subject: [PATCH] [TASK] switch goxc --- .build-packages | 7 --- .gitignore | 2 + .goxc.json | 3 +- .travis.yml | 3 +- contrib/packages/debian/changelog | 5 -- contrib/packages/debian/compat | 1 - contrib/packages/debian/control | 61 ------------------- contrib/packages/debian/copyright | 15 ----- contrib/packages/debian/etc/yanic.conf | 1 + contrib/packages/debian/gbp.conf | 2 - .../debian/lib/systemd/system/yanic.service | 11 ++++ contrib/packages/debian/rules | 4 -- contrib/packages/debian/source/format | 1 - .../packages/debian/var/lib/yanic/state.empty | 1 + .../var/www/html/meshviewer/data/index.html | 5 ++ contrib/packages/debian/watch | 4 -- contrib/packages/debian/yanic.service | 1 - 17 files changed, 24 insertions(+), 103 deletions(-) delete mode 100755 .build-packages delete mode 100644 contrib/packages/debian/changelog delete mode 100644 contrib/packages/debian/compat delete mode 100644 contrib/packages/debian/control delete mode 100644 contrib/packages/debian/copyright create mode 120000 contrib/packages/debian/etc/yanic.conf delete mode 100644 contrib/packages/debian/gbp.conf create mode 100644 contrib/packages/debian/lib/systemd/system/yanic.service delete mode 100755 contrib/packages/debian/rules delete mode 100644 contrib/packages/debian/source/format create mode 100644 contrib/packages/debian/var/lib/yanic/state.empty create mode 100644 contrib/packages/debian/var/www/html/meshviewer/data/index.html delete mode 100644 contrib/packages/debian/watch delete mode 120000 contrib/packages/debian/yanic.service diff --git a/.build-packages b/.build-packages deleted file mode 100755 index 26c946b..0000000 --- a/.build-packages +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -#cd $GOPATH/src/github.com/FreifunkBremen/yanic/contrib/packages; -cd contrib/packages; -dpkg-buildpackage -us -uc -cd -; - diff --git a/.gitignore b/.gitignore index dee6171..1824fe6 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,8 @@ _testmain.go *.exe *.test *.prof + +/build /profile.cov webroot /config.toml diff --git a/.goxc.json b/.goxc.json index 1b21019..62a5f8d 100644 --- a/.goxc.json +++ b/.goxc.json @@ -1,5 +1,6 @@ { "AppName": "yanic", + "ArtifactsDest": "./build", "TasksExclude": [ "validate" ], @@ -8,7 +9,7 @@ "deb": { "metadata": { "description": "Yet another node info collector", - "maintainer": "FreifunkBremen" + "maintainer": "FreifunkBremen \u003cgeno+ffhb@fireorbit.de\u003e" }, "other-mapped-files": { "/": "contrib/packages/debian" diff --git a/.travis.yml b/.travis.yml index 93d34b4..8780b07 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,8 @@ script: - go install github.com/FreifunkBremen/yanic/cmd/yanic - go install github.com/FreifunkBremen/yanic/cmd/yanic-query before_deploy: -- "./.build-packages" +- go get github.com/laher/goxc +- goxc -pv=$(date +%Y%m%d) deploy: provider: packagecloud repository: yanic diff --git a/contrib/packages/debian/changelog b/contrib/packages/debian/changelog deleted file mode 100644 index 2d1d395..0000000 --- a/contrib/packages/debian/changelog +++ /dev/null @@ -1,5 +0,0 @@ -yanic (0.0~git20170326.0.b131fac-1) UNRELEASED; urgency=medium - - * Initial release (Closes: TODO) - - -- root Thu, 06 Apr 2017 15:30:03 +0200 diff --git a/contrib/packages/debian/compat b/contrib/packages/debian/compat deleted file mode 100644 index f599e28..0000000 --- a/contrib/packages/debian/compat +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/contrib/packages/debian/control b/contrib/packages/debian/control deleted file mode 100644 index 4e93882..0000000 --- a/contrib/packages/debian/control +++ /dev/null @@ -1,61 +0,0 @@ -Source: yanic -Section: devel -Priority: extra -Maintainer: Debian Go Packaging Team -Uploaders: root -Build-Depends: debhelper (>= 10), - dh-golang -Standards-Version: 3.9.8 -Homepage: https://github.com/FreifunkBremen/yanic -Vcs-Browser: https://anonscm.debian.org/cgit/pkg-go/packages/yanic.git -Vcs-Git: https://anonscm.debian.org/git/pkg-go/packages/yanic.git -XS-Go-Import-Path: github.com/FreifunkBremen/yanic - -Package: yanic -Architecture: any -Built-Using: ${misc:Built-Using} -Depends: ${shlibs:Depends}, - ${misc:Depends} -Description: Yet another node info collector - for respondd to be used with MeshViewer, InfluxDB and Grafana - Yanic ``` - -------------------------------------------------------------------------------- - . - \ \ / /_ _ _ __ (_) ___ - \ V / _| '_ \| |/ __| - | | (_| | | | | | (__ |_|\__,_|_| |_|_|\___| - Yet another node info collector `` (previously respond-collector - (https://github.com/FreifunkBremen/respond-collector)) - . - Build Status (https://travis-ci.org/FreifunkBremen/yanic) Coverage Status - (https://coveralls.io/github/FreifunkBremen/respond-collector?branch=master) - . - yanic is a respondd client that fetches, stores and publishes information - about a Freifunk network. The goals: * Generating JSON for Meshviewer - (https://github.com/ffrgb/meshviewer) * Storing statistics in InfluxDB - (https://influxdata.com/) to be analyzed by Grafana (http://grafana.org/) - * Provide a little webserver for a standalone installation with a - meshviewer Usage - . - Usage of ./yanic: - -config path/to/config.toml - . - Configuration Read comments in config_example.toml - (config_example.toml) for more information. Live• - meshviewer (https://map.bremen.freifunk.net) Freifunk Bremen - with a patch to show state-version of nodes.json• grafana - (https://grafana.bremen.freifunk.net) Freifunk Bremen show data of - InfluxDBHow it works It sends the gluon-neighbour-info request and - collects the answers. - . - It will send UDP packets with multicast group ff02:0:0:0:0:0:2:1001 and - port 1001. - . - If a node does not answer, it will request with the last know address - under the port 1001. Related projects Collecting data from respondd: * - Node informant (https://github.com/ffdo/node-informant) written in Go * - HopGlass Server (https://github.com/plumpudding/hopglass-server) written - in Node.js - . - Respondd for servers: * ffnord-alfred-announce - (https://github.com/ffnord/ffnord-alfred-announce) from FreiFunkNord * - respondd (https://github.com/Sunz3r/ext-respondd) from Sunz3r diff --git a/contrib/packages/debian/copyright b/contrib/packages/debian/copyright deleted file mode 100644 index 25f1378..0000000 --- a/contrib/packages/debian/copyright +++ /dev/null @@ -1,15 +0,0 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: yanic -Source: https://github.com/FreifunkBremen/yanic - -Files: * -Copyright: 2016 Freifunk Bremen -License: TODO - -Files: debian/* -Copyright: 2017 root -License: TODO -Comment: Debian packaging is licensed under the same terms as upstream - -License: TODO -TODO \ No newline at end of file diff --git a/contrib/packages/debian/etc/yanic.conf b/contrib/packages/debian/etc/yanic.conf new file mode 120000 index 0000000..21baf88 --- /dev/null +++ b/contrib/packages/debian/etc/yanic.conf @@ -0,0 +1 @@ +../../../../config_example.toml \ No newline at end of file diff --git a/contrib/packages/debian/gbp.conf b/contrib/packages/debian/gbp.conf deleted file mode 100644 index cec628c..0000000 --- a/contrib/packages/debian/gbp.conf +++ /dev/null @@ -1,2 +0,0 @@ -[DEFAULT] -pristine-tar = True diff --git a/contrib/packages/debian/lib/systemd/system/yanic.service b/contrib/packages/debian/lib/systemd/system/yanic.service new file mode 100644 index 0000000..3853f27 --- /dev/null +++ b/contrib/packages/debian/lib/systemd/system/yanic.service @@ -0,0 +1,11 @@ +[Unit] +Description=yanic + +[Service] +Type=simple +ExecStart=/usr/bin/yanic -config /etc/yanic.conf +Restart=always +Environment=PATH=/usr/bin:/usr/local/bin + +[Install] +WantedBy=multi-user.target diff --git a/contrib/packages/debian/rules b/contrib/packages/debian/rules deleted file mode 100755 index 1c8c7aa..0000000 --- a/contrib/packages/debian/rules +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/make -f - -%: - dh $@ --buildsystem=golang --with=golang,systemd diff --git a/contrib/packages/debian/source/format b/contrib/packages/debian/source/format deleted file mode 100644 index 163aaf8..0000000 --- a/contrib/packages/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/contrib/packages/debian/var/lib/yanic/state.empty b/contrib/packages/debian/var/lib/yanic/state.empty new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/contrib/packages/debian/var/lib/yanic/state.empty @@ -0,0 +1 @@ +{} diff --git a/contrib/packages/debian/var/www/html/meshviewer/data/index.html b/contrib/packages/debian/var/www/html/meshviewer/data/index.html new file mode 100644 index 0000000..05bed6e --- /dev/null +++ b/contrib/packages/debian/var/www/html/meshviewer/data/index.html @@ -0,0 +1,5 @@ +

Yanic - Meshviewer output

+ diff --git a/contrib/packages/debian/watch b/contrib/packages/debian/watch deleted file mode 100644 index e897ff4..0000000 --- a/contrib/packages/debian/watch +++ /dev/null @@ -1,4 +0,0 @@ -version=3 -opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/yanic-\$1\.tar\.gz/,\\ -uversionmangle=s/(\d)[_\.\-\+]?(RC|rc|pre|dev|beta|alpha)[.]?(\d*)$/\$1~\$2\$3/ \\ - https://github.com/FreifunkBremen/yanic/tags .*/v?(\d\S*)\.tar\.gz diff --git a/contrib/packages/debian/yanic.service b/contrib/packages/debian/yanic.service deleted file mode 120000 index 0a95c22..0000000 --- a/contrib/packages/debian/yanic.service +++ /dev/null @@ -1 +0,0 @@ -../../init/linux-systemd/yanic.service \ No newline at end of file