diff --git a/go.mod b/go.mod index 8371ed6..9f184da 100644 --- a/go.mod +++ b/go.mod @@ -9,9 +9,10 @@ replace github.com/coreos/etcd/client => ./etcd/client require ( github.com/coreos/etcd v3.3.25+incompatible // indirect github.com/coreos/etcd/client v0.0.0-00010101000000-000000000000 - github.com/coreos/go-systemd v0.0.0-20141015001424-e3e4f602334e + github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f - github.com/godbus/dbus v0.0.0-20141007185835-25a4b8ca48c6 + github.com/godbus/dbus v4.1.0+incompatible // indirect + github.com/godbus/dbus/v5 v5.0.3 github.com/hashicorp/errwrap v1.1.0 // indirect github.com/rkt/rkt v1.30.0 golang.org/x/net v0.0.0-20201031054903-ff519b6c9102 diff --git a/go.sum b/go.sum index 0f6ee56..a994b13 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,13 @@ github.com/coreos/go-systemd v0.0.0-20141015001424-e3e4f602334e h1:UL9vt+QLxHxLGvYzWBtmrWX3Gn386D/JLo+A+lZXF7c= github.com/coreos/go-systemd v0.0.0-20141015001424-e3e4f602334e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf h1:iW4rZ826su+pqaw19uhpSCzhj44qo35pNgKFGqzDKkU= +github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/godbus/dbus v0.0.0-20141007185835-25a4b8ca48c6 h1:ktNNkmZO+GEJH27RAe03xbhUuXOFgAr5p59K25XYyhk= -github.com/godbus/dbus v0.0.0-20141007185835-25a4b8ca48c6/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= +github.com/godbus/dbus v4.1.0+incompatible h1:WqqLRTsQic3apZUK9qC5sGNfXthmPXzUZ7nQPrNITa4= +github.com/godbus/dbus v4.1.0+incompatible/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= +github.com/godbus/dbus/v5 v5.0.3 h1:ZqHaoEF7TBzh4jzPmqVhE/5A1z9of6orkAe5uHoAeME= +github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/rkt/rkt v1.30.0 h1:ZI5RQtSibfjicSttV/HLiHuWreYClEJA2Or5XKAdJb0= diff --git a/locksmithctl/send_need_reboot.go b/locksmithctl/send_need_reboot.go index 02433be..15de484 100644 --- a/locksmithctl/send_need_reboot.go +++ b/locksmithctl/send_need_reboot.go @@ -20,7 +20,7 @@ import ( "strconv" "time" - "github.com/godbus/dbus" + dbus "github.com/godbus/dbus/v5" ) var ( diff --git a/updateengine/client.go b/updateengine/client.go index 5bb9ab1..c22f33b 100644 --- a/updateengine/client.go +++ b/updateengine/client.go @@ -19,7 +19,7 @@ import ( "os" "strconv" - "github.com/godbus/dbus" + dbus "github.com/godbus/dbus/v5" ) const ( @@ -36,7 +36,7 @@ const ( // Client is a dbus client subscribed to updateengine status updates type Client struct { conn *dbus.Conn - object *dbus.Object + object dbus.BusObject ch chan *dbus.Signal } diff --git a/updateengine/client_test.go b/updateengine/client_test.go index e14be10..55e9d0f 100644 --- a/updateengine/client_test.go +++ b/updateengine/client_test.go @@ -19,7 +19,7 @@ import ( "testing" "time" - "github.com/godbus/dbus" + dbus "github.com/godbus/dbus/v5" ) func makeSig(curOp string) *dbus.Signal { diff --git a/updateengine/status.go b/updateengine/status.go index f6487cd..cc82f90 100644 --- a/updateengine/status.go +++ b/updateengine/status.go @@ -18,7 +18,7 @@ import ( "errors" "fmt" - "github.com/godbus/dbus" + dbus "github.com/godbus/dbus/v5" ) // Status is a struct containing the information passed by updateengine on every diff --git a/vendor/github.com/coreos/go-systemd/NOTICE b/vendor/github.com/coreos/go-systemd/NOTICE new file mode 100644 index 0000000..23a0ada --- /dev/null +++ b/vendor/github.com/coreos/go-systemd/NOTICE @@ -0,0 +1,5 @@ +CoreOS Project +Copyright 2018 CoreOS, Inc + +This product includes software developed at CoreOS, Inc. +(http://www.coreos.com/). diff --git a/vendor/github.com/coreos/go-systemd/journal/journal.go b/vendor/github.com/coreos/go-systemd/journal/journal.go new file mode 100644 index 0000000..a0f4837 --- /dev/null +++ b/vendor/github.com/coreos/go-systemd/journal/journal.go @@ -0,0 +1,225 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package journal provides write bindings to the local systemd journal. +// It is implemented in pure Go and connects to the journal directly over its +// unix socket. +// +// To read from the journal, see the "sdjournal" package, which wraps the +// sd-journal a C API. +// +// http://www.freedesktop.org/software/systemd/man/systemd-journald.service.html +package journal + +import ( + "bytes" + "encoding/binary" + "errors" + "fmt" + "io" + "io/ioutil" + "net" + "os" + "strconv" + "strings" + "sync" + "sync/atomic" + "syscall" + "unsafe" +) + +// Priority of a journal message +type Priority int + +const ( + PriEmerg Priority = iota + PriAlert + PriCrit + PriErr + PriWarning + PriNotice + PriInfo + PriDebug +) + +var ( + // This can be overridden at build-time: + // https://github.com/golang/go/wiki/GcToolchainTricks#including-build-information-in-the-executable + journalSocket = "/run/systemd/journal/socket" + + // unixConnPtr atomically holds the local unconnected Unix-domain socket. + // Concrete safe pointer type: *net.UnixConn + unixConnPtr unsafe.Pointer + // onceConn ensures that unixConnPtr is initialized exactly once. + onceConn sync.Once +) + +func init() { + onceConn.Do(initConn) +} + +// Enabled checks whether the local systemd journal is available for logging. +func Enabled() bool { + onceConn.Do(initConn) + + if (*net.UnixConn)(atomic.LoadPointer(&unixConnPtr)) == nil { + return false + } + + if _, err := net.Dial("unixgram", journalSocket); err != nil { + return false + } + + return true +} + +// Send a message to the local systemd journal. vars is a map of journald +// fields to values. Fields must be composed of uppercase letters, numbers, +// and underscores, but must not start with an underscore. Within these +// restrictions, any arbitrary field name may be used. Some names have special +// significance: see the journalctl documentation +// (http://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html) +// for more details. vars may be nil. +func Send(message string, priority Priority, vars map[string]string) error { + conn := (*net.UnixConn)(atomic.LoadPointer(&unixConnPtr)) + if conn == nil { + return errors.New("could not initialize socket to journald") + } + + socketAddr := &net.UnixAddr{ + Name: journalSocket, + Net: "unixgram", + } + + data := new(bytes.Buffer) + appendVariable(data, "PRIORITY", strconv.Itoa(int(priority))) + appendVariable(data, "MESSAGE", message) + for k, v := range vars { + appendVariable(data, k, v) + } + + _, _, err := conn.WriteMsgUnix(data.Bytes(), nil, socketAddr) + if err == nil { + return nil + } + if !isSocketSpaceError(err) { + return err + } + + // Large log entry, send it via tempfile and ancillary-fd. + file, err := tempFd() + if err != nil { + return err + } + defer file.Close() + _, err = io.Copy(file, data) + if err != nil { + return err + } + rights := syscall.UnixRights(int(file.Fd())) + _, _, err = conn.WriteMsgUnix([]byte{}, rights, socketAddr) + if err != nil { + return err + } + + return nil +} + +// Print prints a message to the local systemd journal using Send(). +func Print(priority Priority, format string, a ...interface{}) error { + return Send(fmt.Sprintf(format, a...), priority, nil) +} + +func appendVariable(w io.Writer, name, value string) { + if err := validVarName(name); err != nil { + fmt.Fprintf(os.Stderr, "variable name %s contains invalid character, ignoring\n", name) + } + if strings.ContainsRune(value, '\n') { + /* When the value contains a newline, we write: + * - the variable name, followed by a newline + * - the size (in 64bit little endian format) + * - the data, followed by a newline + */ + fmt.Fprintln(w, name) + binary.Write(w, binary.LittleEndian, uint64(len(value))) + fmt.Fprintln(w, value) + } else { + /* just write the variable and value all on one line */ + fmt.Fprintf(w, "%s=%s\n", name, value) + } +} + +// validVarName validates a variable name to make sure journald will accept it. +// The variable name must be in uppercase and consist only of characters, +// numbers and underscores, and may not begin with an underscore: +// https://www.freedesktop.org/software/systemd/man/sd_journal_print.html +func validVarName(name string) error { + if name == "" { + return errors.New("Empty variable name") + } else if name[0] == '_' { + return errors.New("Variable name begins with an underscore") + } + + for _, c := range name { + if !(('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || c == '_') { + return errors.New("Variable name contains invalid characters") + } + } + return nil +} + +// isSocketSpaceError checks whether the error is signaling +// an "overlarge message" condition. +func isSocketSpaceError(err error) bool { + opErr, ok := err.(*net.OpError) + if !ok || opErr == nil { + return false + } + + sysErr, ok := opErr.Err.(*os.SyscallError) + if !ok || sysErr == nil { + return false + } + + return sysErr.Err == syscall.EMSGSIZE || sysErr.Err == syscall.ENOBUFS +} + +// tempFd creates a temporary, unlinked file under `/dev/shm`. +func tempFd() (*os.File, error) { + file, err := ioutil.TempFile("/dev/shm/", "journal.XXXXX") + if err != nil { + return nil, err + } + err = syscall.Unlink(file.Name()) + if err != nil { + return nil, err + } + return file, nil +} + +// initConn initializes the global `unixConnPtr` socket. +// It is meant to be called exactly once, at program startup. +func initConn() { + autobind, err := net.ResolveUnixAddr("unixgram", "") + if err != nil { + return + } + + sock, err := net.ListenUnixgram("unixgram", autobind) + if err != nil { + return + } + + atomic.StorePointer(&unixConnPtr, unsafe.Pointer(sock)) +} diff --git a/vendor/github.com/coreos/go-systemd/journal/send.go b/vendor/github.com/coreos/go-systemd/journal/send.go deleted file mode 100644 index b52e120..0000000 --- a/vendor/github.com/coreos/go-systemd/journal/send.go +++ /dev/null @@ -1,168 +0,0 @@ -/* -Copyright 2013 CoreOS Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package journal provides write bindings to the systemd journal -package journal - -import ( - "bytes" - "encoding/binary" - "errors" - "fmt" - "io" - "io/ioutil" - "net" - "os" - "strconv" - "strings" - "syscall" -) - -// Priority of a journal message -type Priority int - -const ( - PriEmerg Priority = iota - PriAlert - PriCrit - PriErr - PriWarning - PriNotice - PriInfo - PriDebug -) - -var conn net.Conn - -func init() { - var err error - conn, err = net.Dial("unixgram", "/run/systemd/journal/socket") - if err != nil { - conn = nil - } -} - -// Enabled returns true iff the systemd journal is available for logging -func Enabled() bool { - return conn != nil -} - -// Send a message to the systemd journal. vars is a map of journald fields to -// values. Fields must be composed of uppercase letters, numbers, and -// underscores, but must not start with an underscore. Within these -// restrictions, any arbitrary field name may be used. Some names have special -// significance: see the journalctl documentation -// (http://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html) -// for more details. vars may be nil. -func Send(message string, priority Priority, vars map[string]string) error { - if conn == nil { - return journalError("could not connect to journald socket") - } - - data := new(bytes.Buffer) - appendVariable(data, "PRIORITY", strconv.Itoa(int(priority))) - appendVariable(data, "MESSAGE", message) - for k, v := range vars { - appendVariable(data, k, v) - } - - _, err := io.Copy(conn, data) - if err != nil && isSocketSpaceError(err) { - file, err := tempFd() - if err != nil { - return journalError(err.Error()) - } - _, err = io.Copy(file, data) - if err != nil { - return journalError(err.Error()) - } - - rights := syscall.UnixRights(int(file.Fd())) - - /* this connection should always be a UnixConn, but better safe than sorry */ - unixConn, ok := conn.(*net.UnixConn) - if !ok { - return journalError("can't send file through non-Unix connection") - } - unixConn.WriteMsgUnix([]byte{}, rights, nil) - } else if err != nil { - return journalError(err.Error()) - } - return nil -} - -func appendVariable(w io.Writer, name, value string) { - if !validVarName(name) { - journalError("variable name contains invalid character, ignoring") - } - if strings.ContainsRune(value, '\n') { - /* When the value contains a newline, we write: - * - the variable name, followed by a newline - * - the size (in 64bit little endian format) - * - the data, followed by a newline - */ - fmt.Fprintln(w, name) - binary.Write(w, binary.LittleEndian, uint64(len(value))) - fmt.Fprintln(w, value) - } else { - /* just write the variable and value all on one line */ - fmt.Fprintf(w, "%s=%s\n", name, value) - } -} - -func validVarName(name string) bool { - /* The variable name must be in uppercase and consist only of characters, - * numbers and underscores, and may not begin with an underscore. (from the docs) - */ - - valid := name[0] != '_' - for _, c := range name { - valid = valid && ('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || c == '_' - } - return valid -} - -func isSocketSpaceError(err error) bool { - opErr, ok := err.(*net.OpError) - if !ok { - return false - } - - sysErr, ok := opErr.Err.(syscall.Errno) - if !ok { - return false - } - - return sysErr == syscall.EMSGSIZE || sysErr == syscall.ENOBUFS -} - -func tempFd() (*os.File, error) { - file, err := ioutil.TempFile("/dev/shm/", "journal.XXXXX") - if err != nil { - return nil, err - } - syscall.Unlink(file.Name()) - if err != nil { - return nil, err - } - return file, nil -} - -func journalError(s string) error { - s = "journal error: " + s - fmt.Fprintln(os.Stderr, s) - return errors.New(s) -} diff --git a/vendor/github.com/coreos/go-systemd/login1/dbus.go b/vendor/github.com/coreos/go-systemd/login1/dbus.go index d00dd11..6d2c99b 100644 --- a/vendor/github.com/coreos/go-systemd/login1/dbus.go +++ b/vendor/github.com/coreos/go-systemd/login1/dbus.go @@ -1,23 +1,22 @@ -/* -Copyright 2014 CoreOS Inc. +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Integration with the systemd logind API. See http://www.freedesktop.org/wiki/Software/systemd/logind/ +// Package login1 provides integration with the systemd logind API. See http://www.freedesktop.org/wiki/Software/systemd/logind/ package login1 import ( + "fmt" "os" "strconv" @@ -32,10 +31,10 @@ const ( // Conn is a connection to systemds dbus endpoint. type Conn struct { conn *dbus.Conn - object *dbus.Object + object dbus.BusObject } -// New() establishes a connection to the system bus and authenticates. +// New establishes a connection to the system bus and authenticates. func New() (*Conn, error) { c := new(Conn) @@ -46,6 +45,17 @@ func New() (*Conn, error) { return c, nil } +// Close closes the dbus connection +func (c *Conn) Close() { + if c == nil { + return + } + + if c.conn != nil { + c.conn.Close() + } +} + func (c *Conn) initConnection() error { var err error c.conn, err = dbus.SystemBusPrivate() @@ -75,7 +85,176 @@ func (c *Conn) initConnection() error { return nil } +// Session object definition. +type Session struct { + ID string + UID uint32 + User string + Seat string + Path dbus.ObjectPath +} + +// User object definition. +type User struct { + UID uint32 + Name string + Path dbus.ObjectPath +} + +func (s Session) toInterface() []interface{} { + return []interface{}{s.ID, s.UID, s.User, s.Seat, s.Path} +} + +func sessionFromInterfaces(session []interface{}) (*Session, error) { + if len(session) < 5 { + return nil, fmt.Errorf("invalid number of session fields: %d", len(session)) + } + id, ok := session[0].(string) + if !ok { + return nil, fmt.Errorf("failed to typecast session field 0 to string") + } + uid, ok := session[1].(uint32) + if !ok { + return nil, fmt.Errorf("failed to typecast session field 1 to uint32") + } + user, ok := session[2].(string) + if !ok { + return nil, fmt.Errorf("failed to typecast session field 2 to string") + } + seat, ok := session[3].(string) + if !ok { + return nil, fmt.Errorf("failed to typecast session field 2 to string") + } + path, ok := session[4].(dbus.ObjectPath) + if !ok { + return nil, fmt.Errorf("failed to typecast session field 4 to ObjectPath") + } + + ret := Session{ID: id, UID: uid, User: user, Seat: seat, Path: path} + return &ret, nil +} + +func userFromInterfaces(user []interface{}) (*User, error) { + if len(user) < 3 { + return nil, fmt.Errorf("invalid number of user fields: %d", len(user)) + } + uid, ok := user[0].(uint32) + if !ok { + return nil, fmt.Errorf("failed to typecast user field 0 to uint32") + } + name, ok := user[1].(string) + if !ok { + return nil, fmt.Errorf("failed to typecast session field 1 to string") + } + path, ok := user[2].(dbus.ObjectPath) + if !ok { + return nil, fmt.Errorf("failed to typecast user field 2 to ObjectPath") + } + + ret := User{UID: uid, Name: name, Path: path} + return &ret, nil +} + +// GetSession may be used to get the session object path for the session with the specified ID. +func (c *Conn) GetSession(id string) (dbus.ObjectPath, error) { + var out interface{} + if err := c.object.Call(dbusInterface+".GetSession", 0, id).Store(&out); err != nil { + return "", err + } + + ret, ok := out.(dbus.ObjectPath) + if !ok { + return "", fmt.Errorf("failed to typecast session to ObjectPath") + } + + return ret, nil +} + +// ListSessions returns an array with all current sessions. +func (c *Conn) ListSessions() ([]Session, error) { + out := [][]interface{}{} + if err := c.object.Call(dbusInterface+".ListSessions", 0).Store(&out); err != nil { + return nil, err + } + + ret := []Session{} + for _, el := range out { + session, err := sessionFromInterfaces(el) + if err != nil { + return nil, err + } + ret = append(ret, *session) + } + return ret, nil +} + +// ListUsers returns an array with all currently logged in users. +func (c *Conn) ListUsers() ([]User, error) { + out := [][]interface{}{} + if err := c.object.Call(dbusInterface+".ListUsers", 0).Store(&out); err != nil { + return nil, err + } + + ret := []User{} + for _, el := range out { + user, err := userFromInterfaces(el) + if err != nil { + return nil, err + } + ret = append(ret, *user) + } + return ret, nil +} + +// LockSession asks the session with the specified ID to activate the screen lock. +func (c *Conn) LockSession(id string) { + c.object.Call(dbusInterface+".LockSession", 0, id) +} + +// LockSessions asks all sessions to activate the screen locks. This may be used to lock any access to the machine in one action. +func (c *Conn) LockSessions() { + c.object.Call(dbusInterface+".LockSessions", 0) +} + +// TerminateSession forcibly terminate one specific session. +func (c *Conn) TerminateSession(id string) { + c.object.Call(dbusInterface+".TerminateSession", 0, id) +} + +// TerminateUser forcibly terminates all processes of a user. +func (c *Conn) TerminateUser(uid uint32) { + c.object.Call(dbusInterface+".TerminateUser", 0, uid) +} + // Reboot asks logind for a reboot optionally asking for auth. func (c *Conn) Reboot(askForAuth bool) { c.object.Call(dbusInterface+".Reboot", 0, askForAuth) } + +// Inhibit takes inhibition lock in logind. +func (c *Conn) Inhibit(what, who, why, mode string) (*os.File, error) { + var fd dbus.UnixFD + + err := c.object.Call(dbusInterface+".Inhibit", 0, what, who, why, mode).Store(&fd) + if err != nil { + return nil, err + } + + return os.NewFile(uintptr(fd), "inhibit"), nil +} + +// Subscribe to signals on the logind dbus +func (c *Conn) Subscribe(members ...string) chan *dbus.Signal { + for _, member := range members { + c.conn.BusObject().Call("org.freedesktop.DBus.AddMatch", 0, + fmt.Sprintf("type='signal',interface='org.freedesktop.login1.Manager',member='%s'", member)) + } + ch := make(chan *dbus.Signal, 10) + c.conn.Signal(ch) + return ch +} + +// PowerOff asks logind for a power off optionally asking for auth. +func (c *Conn) PowerOff(askForAuth bool) { + c.object.Call(dbusInterface+".PowerOff", 0, askForAuth) +} diff --git a/vendor/github.com/godbus/dbus/.travis.yml b/vendor/github.com/godbus/dbus/.travis.yml new file mode 100644 index 0000000..2e1bbb7 --- /dev/null +++ b/vendor/github.com/godbus/dbus/.travis.yml @@ -0,0 +1,40 @@ +dist: precise +language: go +go_import_path: github.com/godbus/dbus +sudo: true + +go: + - 1.6.3 + - 1.7.3 + - tip + +env: + global: + matrix: + - TARGET=amd64 + - TARGET=arm64 + - TARGET=arm + - TARGET=386 + - TARGET=ppc64le + +matrix: + fast_finish: true + allow_failures: + - go: tip + exclude: + - go: tip + env: TARGET=arm + - go: tip + env: TARGET=arm64 + - go: tip + env: TARGET=386 + - go: tip + env: TARGET=ppc64le + +addons: + apt: + packages: + - dbus + - dbus-x11 + +before_install: diff --git a/vendor/github.com/godbus/dbus/CONTRIBUTING.md b/vendor/github.com/godbus/dbus/CONTRIBUTING.md new file mode 100644 index 0000000..c88f9b2 --- /dev/null +++ b/vendor/github.com/godbus/dbus/CONTRIBUTING.md @@ -0,0 +1,50 @@ +# How to Contribute + +## Getting Started + +- Fork the repository on GitHub +- Read the [README](README.markdown) for build and test instructions +- Play with the project, submit bugs, submit patches! + +## Contribution Flow + +This is a rough outline of what a contributor's workflow looks like: + +- Create a topic branch from where you want to base your work (usually master). +- Make commits of logical units. +- Make sure your commit messages are in the proper format (see below). +- Push your changes to a topic branch in your fork of the repository. +- Make sure the tests pass, and add any new tests as appropriate. +- Submit a pull request to the original repository. + +Thanks for your contributions! + +### Format of the Commit Message + +We follow a rough convention for commit messages that is designed to answer two +questions: what changed and why. The subject line should feature the what and +the body of the commit should describe the why. + +``` +scripts: add the test-cluster command + +this uses tmux to setup a test cluster that you can easily kill and +start for debugging. + +Fixes #38 +``` + +The format can be described more formally as follows: + +``` +: + + + +