Source: influxdb Source-Version: 1.1.0+dfsg1-0.1 Severity: wishlist Tags: patch
Hi! There's a new upstream release out. Here's a patch updating the package to that. Also included a fix for the init script to actually log stuff. Thanks, Guillem
--- a/debian/changelog 2016-10-25 19:19:04.000000000 +0200 +++ b/debian/changelog 2016-12-02 11:14:09.000000000 +0100 @@ -1,4 +1,13 @@ +influxdb (1.1.0+dfsg1-0.1) UNRELEASED; urgency=medium + + * New upstream release. + * Fix build to work on github.com/dgrijalva/jwt-go v2. + * Pass --no-close to start-stop-daemon --start to get actual logging. + + -- Guillem Jover <gjo...@sipwise.com> Fri, 02 Dec 2016 10:45:18 +0100 + influxdb (1.0.2+dfsg1-1) unstable; urgency=medium + [ Alexandre Viau ] * Update default configuration file. --- a/debian/influxdb.init 2016-10-25 19:19:04.000000000 +0200 +++ b/debian/influxdb.init 2016-12-02 10:47:20.000000000 +0100 @@ -94,7 +94,7 @@ case $1 in fi start-stop-daemon --start --quiet --oknodo --exec $daemon \ - --chuid $GROUP:$USER --pidfile $pidfile --background \ + --chuid $GROUP:$USER --pidfile $pidfile --background --no-close \ -- -pidfile $pidfile -config $config $INFLUXD_OPTS \ >>$STDOUT 2>>$STDERR --- a/debian/patches/disable-reporting.patch 2016-10-25 19:19:04.000000000 +0200 +++ b/debian/patches/disable-reporting.patch 2016-12-02 10:50:24.000000000 +0100 @@ -13,7 +13,7 @@ Last-Update: 2015-08-11 --- a/cmd/influxd/run/config.go +++ b/cmd/influxd/run/config.go -@@ -56,7 +56,7 @@ +@@ -56,7 +56,7 @@ type Config struct { ContinuousQuery continuous_querier.Config `toml:"continuous_queries"` // Server reporting @@ -24,7 +24,7 @@ Last-Update: 2015-08-11 BindAddress string `toml:"bind-address"` --- a/cmd/influxd/run/server.go +++ b/cmd/influxd/run/server.go -@@ -78,7 +78,7 @@ +@@ -78,7 +78,7 @@ type Server struct { Monitor *monitor.Monitor // Server reporting and registration @@ -33,7 +33,7 @@ Last-Update: 2015-08-11 // Profiling CPUProfile string -@@ -147,7 +147,7 @@ +@@ -147,7 +147,7 @@ func NewServer(c *Config, buildInfo *Bui MetaClient: meta.NewClient(c.Meta), @@ -42,7 +42,7 @@ Last-Update: 2015-08-11 httpAPIAddr: c.HTTPD.BindAddress, httpUseTLS: c.HTTPD.HTTPSEnabled, -@@ -441,7 +441,7 @@ +@@ -434,7 +434,7 @@ func (s *Server) Open() error { } // Start the reporting service, if not disabled. --- a/debian/patches/jwt-v2.patch 1970-01-01 01:00:00.000000000 +0100 +++ b/debian/patches/jwt-v2.patch 2016-12-02 11:33:33.226604712 +0100 @@ -0,0 +1,34 @@ +Description: Fix build with github.com/dgrijalva/jwt-go v2 +Author: Guillem Jover <gjo...@sipwise.com> +Last-Update: 2016-12-02 + +--- + services/httpd/handler.go | 11 ++--------- + 1 file changed, 2 insertions(+), 9 deletions(-) + +--- a/services/httpd/handler.go ++++ b/services/httpd/handler.go +@@ -901,21 +901,14 @@ func authenticate(inner func(http.Respon + return + } + +- claims, ok := token.Claims.(jwt.MapClaims) +- if !ok { +- h.httpError(w, "problem authenticating token", http.StatusInternalServerError) +- h.Logger.Print("Could not assert JWT token claims as jwt.MapClaims") +- return +- } +- + // Make sure an expiration was set on the token. +- if exp, ok := claims["exp"].(float64); !ok || exp <= 0.0 { ++ if exp, ok := token.Claims["exp"].(float64); !ok || exp <= 0.0 { + h.httpError(w, "token expiration required", http.StatusUnauthorized) + return + } + + // Get the username from the token. +- username, ok := claims["username"].(string) ++ username, ok := token.Claims["username"].(string) + if !ok { + h.httpError(w, "username in token must be a string", http.StatusUnauthorized) + return --- a/debian/patches/series 2016-10-25 19:19:04.000000000 +0200 +++ b/debian/patches/series 2016-12-02 11:12:13.000000000 +0100 @@ -1 +1,2 @@ disable-reporting.patch +jwt-v2.patch