vendor: update all dependencies

* Update all dependencies
  * Remove all `[[constraint]]` from Gopkg.toml
  * Add in the minimum number of `[[override]]` to build
  * Remove go get of github.com/inconshreveable/mousetrap as it is vendored
  * Update docs with new policy on constraints
This commit is contained in:
Nick Craig-Wood 2018-05-02 17:09:45 +01:00
parent 21383877df
commit 6427029c4e
4902 changed files with 1443417 additions and 227283 deletions

View file

@ -6,6 +6,7 @@ import (
"encoding/json"
"fmt"
"os"
"path/filepath"
"syscall"
"github.com/kardianos/osext"
@ -103,8 +104,10 @@ func (d *Context) parent() (child *os.Process, err error) {
d.rpipe.Close()
encoder := json.NewEncoder(d.wpipe)
err = encoder.Encode(d)
if err = encoder.Encode(d); err != nil {
return
}
_, err = fmt.Fprint(d.wpipe, "\n\n")
return
}
@ -121,12 +124,22 @@ func (d *Context) openFiles() (err error) {
}
if len(d.PidFileName) > 0 {
if d.PidFileName, err = filepath.Abs(d.PidFileName); err != nil {
return err
}
if d.pidFile, err = OpenLockFile(d.PidFileName, d.PidFilePerm); err != nil {
return
}
if err = d.pidFile.Lock(); err != nil {
return
}
if len(d.Chroot) > 0 {
// Calculate PID-file absolute path in child's environment
if d.PidFileName, err = filepath.Rel(d.Chroot, d.PidFileName); err != nil {
return err
}
d.PidFileName = "/" + d.PidFileName
}
}
if len(d.LogFileName) > 0 {
@ -203,6 +216,13 @@ func (d *Context) child() (err error) {
}
initialized = true
decoder := json.NewDecoder(os.Stdin)
if err = decoder.Decode(d); err != nil {
d.pidFile.Remove()
return
}
// create PID file after context decoding to know PID file full path.
if len(d.PidFileName) > 0 {
d.pidFile = NewLockFile(os.NewFile(4, d.PidFileName))
if err = d.pidFile.WritePid(); err != nil {
@ -210,12 +230,6 @@ func (d *Context) child() (err error) {
}
}
decoder := json.NewDecoder(os.Stdin)
if err = decoder.Decode(d); err != nil {
d.pidFile.Remove()
return
}
if err = syscall.Close(0); err != nil {
d.pidFile.Remove()
return