From 44f0a949c53cfa943e724572b741d53b18a34b8f Mon Sep 17 00:00:00 2001 From: Jonathan Boulle Date: Mon, 20 Oct 2014 11:30:50 -0700 Subject: [PATCH] *: switch to Godeps --- Godeps/Godeps.json | 34 ++++ Godeps/Readme | 5 + Godeps/_workspace/.gitignore | 2 + .../github.com/cloudsigma/cepgo/.gitignore | 23 +++ .../src}/github.com/cloudsigma/cepgo/LICENSE | 0 .../github.com/cloudsigma/cepgo/README.md | 0 .../src}/github.com/cloudsigma/cepgo/cepgo.go | 2 +- .../github.com/cloudsigma/cepgo/cepgo_test.go | 0 .../github.com/coreos/go-systemd/dbus/dbus.go | 2 +- .../coreos/go-systemd/dbus/dbus_test.go | 0 .../coreos/go-systemd/dbus/methods.go | 4 +- .../coreos/go-systemd/dbus/methods_test.go | 2 +- .../coreos/go-systemd/dbus/properties.go | 2 +- .../github.com/coreos/go-systemd/dbus/set.go | 0 .../coreos/go-systemd/dbus/set_test.go | 0 .../coreos/go-systemd/dbus/subscription.go | 4 +- .../go-systemd/dbus/subscription_set.go | 0 .../go-systemd/dbus/subscription_set_test.go | 0 .../go-systemd/dbus/subscription_test.go | 0 .../dotcloud/docker/pkg/netlink/MAINTAINERS | 0 .../dotcloud/docker/pkg/netlink/netlink.go | 0 .../docker/pkg/netlink/netlink_linux.go | 0 .../docker/pkg/netlink/netlink_unsupported.go | 0 .../src}/github.com/guelfey/go.dbus/LICENSE | 0 .../guelfey/go.dbus/README.markdown | 0 .../src}/github.com/guelfey/go.dbus/auth.go | 0 .../guelfey/go.dbus/auth_external.go | 0 .../github.com/guelfey/go.dbus/auth_sha1.go | 0 .../src}/github.com/guelfey/go.dbus/call.go | 0 .../src}/github.com/guelfey/go.dbus/conn.go | 0 .../github.com/guelfey/go.dbus/conn_darwin.go | 0 .../github.com/guelfey/go.dbus/conn_other.go | 0 .../github.com/guelfey/go.dbus/conn_test.go | 0 .../src}/github.com/guelfey/go.dbus/dbus.go | 0 .../github.com/guelfey/go.dbus/decoder.go | 0 .../src}/github.com/guelfey/go.dbus/doc.go | 0 .../github.com/guelfey/go.dbus/encoder.go | 0 .../guelfey/go.dbus/examples_test.go | 0 .../src}/github.com/guelfey/go.dbus/export.go | 0 .../guelfey/go.dbus/introspect/call.go | 2 +- .../guelfey/go.dbus/introspect/introspect.go | 0 .../go.dbus/introspect/introspectable.go | 2 +- .../github.com/guelfey/go.dbus/message.go | 0 .../github.com/guelfey/go.dbus/prop/prop.go | 4 +- .../github.com/guelfey/go.dbus/proto_test.go | 0 .../src}/github.com/guelfey/go.dbus/sig.go | 0 .../github.com/guelfey/go.dbus/sig_test.go | 0 .../guelfey/go.dbus/transport_darwin.go | 0 .../guelfey/go.dbus/transport_generic.go | 0 .../guelfey/go.dbus/transport_unix.go | 0 .../guelfey/go.dbus/transport_unix_test.go | 0 .../guelfey/go.dbus/transport_unixcred.go | 0 .../github.com/guelfey/go.dbus/variant.go | 0 .../guelfey/go.dbus/variant_lexer.go | 0 .../guelfey/go.dbus/variant_parser.go | 0 .../guelfey/go.dbus/variant_test.go | 0 .../src}/github.com/tarm/goserial/LICENSE | 0 .../src}/github.com/tarm/goserial/README.md | 0 .../github.com/tarm/goserial/basic_test.go | 61 ++++++ .../src}/github.com/tarm/goserial/serial.go | 0 .../github.com/tarm/goserial/serial_linux.go | 0 .../github.com/tarm/goserial/serial_posix.go | 0 .../tarm/goserial/serial_windows.go | 0 .../_workspace/src}/gopkg.in/yaml.v1/LICENSE | 0 .../src}/gopkg.in/yaml.v1/LICENSE.libyaml | 0 .../src}/gopkg.in/yaml.v1/README.md | 0 .../_workspace/src}/gopkg.in/yaml.v1/apic.go | 0 .../src}/gopkg.in/yaml.v1/decode.go | 0 .../src}/gopkg.in/yaml.v1/decode_test.go | 4 +- .../src}/gopkg.in/yaml.v1/emitterc.go | 0 .../src}/gopkg.in/yaml.v1/encode.go | 0 .../src}/gopkg.in/yaml.v1/encode_test.go | 4 +- .../src}/gopkg.in/yaml.v1/parserc.go | 0 .../src}/gopkg.in/yaml.v1/readerc.go | 0 .../src}/gopkg.in/yaml.v1/resolve.go | 0 .../src}/gopkg.in/yaml.v1/scannerc.go | 0 .../src}/gopkg.in/yaml.v1/sorter.go | 0 .../src}/gopkg.in/yaml.v1/suite_test.go | 0 .../src}/gopkg.in/yaml.v1/writerc.go | 0 .../_workspace/src}/gopkg.in/yaml.v1/yaml.go | 0 .../_workspace/src}/gopkg.in/yaml.v1/yamlh.go | 0 .../src}/gopkg.in/yaml.v1/yamlprivateh.go | 0 config/config.go | 2 +- .../metadata/cloudsigma/server_context.go | 2 +- system/networkd.go | 2 +- system/systemd.go | 2 +- .../github.com/coreos/go-systemd/.travis.yml | 8 - .../github.com/coreos/go-systemd/LICENSE | 191 ------------------ .../github.com/coreos/go-systemd/README.md | 44 ---- .../coreos/go-systemd/activation/files.go | 56 ----- .../go-systemd/activation/files_test.go | 84 -------- .../coreos/go-systemd/activation/listeners.go | 38 ---- .../go-systemd/activation/listeners_test.go | 88 -------- .../examples/activation/activation.go | 44 ---- .../examples/activation/httpserver/README.md | 19 -- .../activation/httpserver/hello.service | 11 - .../activation/httpserver/hello.socket | 5 - .../activation/httpserver/httpserver.go | 26 --- .../go-systemd/examples/activation/listen.go | 50 ----- .../go-systemd/fixtures/start-stop.service | 5 - .../fixtures/subscribe-events-set.service | 5 - .../fixtures/subscribe-events.service | 5 - .../coreos/go-systemd/journal/send.go | 168 --------------- third_party/github.com/coreos/go-systemd/test | 3 - .../guelfey/go.dbus/_examples/eavesdrop.go | 30 --- .../guelfey/go.dbus/_examples/introspect.go | 21 -- .../guelfey/go.dbus/_examples/list-names.go | 27 --- .../guelfey/go.dbus/_examples/notification.go | 17 -- .../guelfey/go.dbus/_examples/prop.go | 68 ------- .../guelfey/go.dbus/_examples/server.go | 45 ----- .../guelfey/go.dbus/_examples/signal.go | 24 --- .../github.com/tarm/goserial/basic_test.go | 39 ---- 112 files changed, 145 insertions(+), 1141 deletions(-) create mode 100644 Godeps/Godeps.json create mode 100644 Godeps/Readme create mode 100644 Godeps/_workspace/.gitignore create mode 100644 Godeps/_workspace/src/github.com/cloudsigma/cepgo/.gitignore rename {third_party => Godeps/_workspace/src}/github.com/cloudsigma/cepgo/LICENSE (100%) rename {third_party => Godeps/_workspace/src}/github.com/cloudsigma/cepgo/README.md (100%) rename {third_party => Godeps/_workspace/src}/github.com/cloudsigma/cepgo/cepgo.go (98%) rename {third_party => Godeps/_workspace/src}/github.com/cloudsigma/cepgo/cepgo_test.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/coreos/go-systemd/dbus/dbus.go (96%) rename {third_party => Godeps/_workspace/src}/github.com/coreos/go-systemd/dbus/dbus_test.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/coreos/go-systemd/dbus/methods.go (98%) rename {third_party => Godeps/_workspace/src}/github.com/coreos/go-systemd/dbus/methods_test.go (98%) rename {third_party => Godeps/_workspace/src}/github.com/coreos/go-systemd/dbus/properties.go (98%) rename {third_party => Godeps/_workspace/src}/github.com/coreos/go-systemd/dbus/set.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/coreos/go-systemd/dbus/set_test.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/coreos/go-systemd/dbus/subscription.go (97%) rename {third_party => Godeps/_workspace/src}/github.com/coreos/go-systemd/dbus/subscription_set.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/coreos/go-systemd/dbus/subscription_set_test.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/coreos/go-systemd/dbus/subscription_test.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/dotcloud/docker/pkg/netlink/MAINTAINERS (100%) rename {third_party => Godeps/_workspace/src}/github.com/dotcloud/docker/pkg/netlink/netlink.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/dotcloud/docker/pkg/netlink/netlink_linux.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/dotcloud/docker/pkg/netlink/netlink_unsupported.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/LICENSE (100%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/README.markdown (100%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/auth.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/auth_external.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/auth_sha1.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/call.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/conn.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/conn_darwin.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/conn_other.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/conn_test.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/dbus.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/decoder.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/doc.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/encoder.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/examples_test.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/export.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/introspect/call.go (86%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/introspect/introspect.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/introspect/introspectable.go (95%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/message.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/prop/prop.go (97%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/proto_test.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/sig.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/sig_test.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/transport_darwin.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/transport_generic.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/transport_unix.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/transport_unix_test.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/transport_unixcred.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/variant.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/variant_lexer.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/variant_parser.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/guelfey/go.dbus/variant_test.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/tarm/goserial/LICENSE (100%) rename {third_party => Godeps/_workspace/src}/github.com/tarm/goserial/README.md (100%) create mode 100644 Godeps/_workspace/src/github.com/tarm/goserial/basic_test.go rename {third_party => Godeps/_workspace/src}/github.com/tarm/goserial/serial.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/tarm/goserial/serial_linux.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/tarm/goserial/serial_posix.go (100%) rename {third_party => Godeps/_workspace/src}/github.com/tarm/goserial/serial_windows.go (100%) rename {third_party => Godeps/_workspace/src}/gopkg.in/yaml.v1/LICENSE (100%) rename {third_party => Godeps/_workspace/src}/gopkg.in/yaml.v1/LICENSE.libyaml (100%) rename {third_party => Godeps/_workspace/src}/gopkg.in/yaml.v1/README.md (100%) rename {third_party => Godeps/_workspace/src}/gopkg.in/yaml.v1/apic.go (100%) rename {third_party => Godeps/_workspace/src}/gopkg.in/yaml.v1/decode.go (100%) rename {third_party => Godeps/_workspace/src}/gopkg.in/yaml.v1/decode_test.go (99%) rename {third_party => Godeps/_workspace/src}/gopkg.in/yaml.v1/emitterc.go (100%) rename {third_party => Godeps/_workspace/src}/gopkg.in/yaml.v1/encode.go (100%) rename {third_party => Godeps/_workspace/src}/gopkg.in/yaml.v1/encode_test.go (98%) rename {third_party => Godeps/_workspace/src}/gopkg.in/yaml.v1/parserc.go (100%) rename {third_party => Godeps/_workspace/src}/gopkg.in/yaml.v1/readerc.go (100%) rename {third_party => Godeps/_workspace/src}/gopkg.in/yaml.v1/resolve.go (100%) rename {third_party => Godeps/_workspace/src}/gopkg.in/yaml.v1/scannerc.go (100%) rename {third_party => Godeps/_workspace/src}/gopkg.in/yaml.v1/sorter.go (100%) rename {third_party => Godeps/_workspace/src}/gopkg.in/yaml.v1/suite_test.go (100%) rename {third_party => Godeps/_workspace/src}/gopkg.in/yaml.v1/writerc.go (100%) rename {third_party => Godeps/_workspace/src}/gopkg.in/yaml.v1/yaml.go (100%) rename {third_party => Godeps/_workspace/src}/gopkg.in/yaml.v1/yamlh.go (100%) rename {third_party => Godeps/_workspace/src}/gopkg.in/yaml.v1/yamlprivateh.go (100%) delete mode 100644 third_party/github.com/coreos/go-systemd/.travis.yml delete mode 100644 third_party/github.com/coreos/go-systemd/LICENSE delete mode 100644 third_party/github.com/coreos/go-systemd/README.md delete mode 100644 third_party/github.com/coreos/go-systemd/activation/files.go delete mode 100644 third_party/github.com/coreos/go-systemd/activation/files_test.go delete mode 100644 third_party/github.com/coreos/go-systemd/activation/listeners.go delete mode 100644 third_party/github.com/coreos/go-systemd/activation/listeners_test.go delete mode 100644 third_party/github.com/coreos/go-systemd/examples/activation/activation.go delete mode 100644 third_party/github.com/coreos/go-systemd/examples/activation/httpserver/README.md delete mode 100644 third_party/github.com/coreos/go-systemd/examples/activation/httpserver/hello.service delete mode 100644 third_party/github.com/coreos/go-systemd/examples/activation/httpserver/hello.socket delete mode 100644 third_party/github.com/coreos/go-systemd/examples/activation/httpserver/httpserver.go delete mode 100644 third_party/github.com/coreos/go-systemd/examples/activation/listen.go delete mode 100644 third_party/github.com/coreos/go-systemd/fixtures/start-stop.service delete mode 100644 third_party/github.com/coreos/go-systemd/fixtures/subscribe-events-set.service delete mode 100644 third_party/github.com/coreos/go-systemd/fixtures/subscribe-events.service delete mode 100644 third_party/github.com/coreos/go-systemd/journal/send.go delete mode 100755 third_party/github.com/coreos/go-systemd/test delete mode 100644 third_party/github.com/guelfey/go.dbus/_examples/eavesdrop.go delete mode 100644 third_party/github.com/guelfey/go.dbus/_examples/introspect.go delete mode 100644 third_party/github.com/guelfey/go.dbus/_examples/list-names.go delete mode 100644 third_party/github.com/guelfey/go.dbus/_examples/notification.go delete mode 100644 third_party/github.com/guelfey/go.dbus/_examples/prop.go delete mode 100644 third_party/github.com/guelfey/go.dbus/_examples/server.go delete mode 100644 third_party/github.com/guelfey/go.dbus/_examples/signal.go delete mode 100644 third_party/github.com/tarm/goserial/basic_test.go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json new file mode 100644 index 0000000..3154f14 --- /dev/null +++ b/Godeps/Godeps.json @@ -0,0 +1,34 @@ +{ + "ImportPath": "github.com/coreos/coreos-cloudinit", + "GoVersion": "go1.3.1", + "Packages": [ + "./..." + ], + "Deps": [ + { + "ImportPath": "github.com/cloudsigma/cepgo", + "Rev": "1bfc4895bf5c4d3b599f3f6ee142299488c8739b" + }, + { + "ImportPath": "github.com/coreos/go-systemd/dbus", + "Rev": "4fbc5060a317b142e6c7bfbedb65596d5f0ab99b" + }, + { + "ImportPath": "github.com/dotcloud/docker/pkg/netlink", + "Comment": "v0.11.1-359-g55d41c3e21e1", + "Rev": "55d41c3e21e1593b944c06196ffb2ac57ab7f653" + }, + { + "ImportPath": "github.com/guelfey/go.dbus", + "Rev": "f6a3a2366cc39b8479cadc499d3c735fb10fbdda" + }, + { + "ImportPath": "github.com/tarm/goserial", + "Rev": "cdabc8d44e8e84f58f18074ae44337e1f2f375b9" + }, + { + "ImportPath": "gopkg.in/yaml.v1", + "Rev": "feb4ca79644e8e7e39c06095246ee54b1282c118" + } + ] +} diff --git a/Godeps/Readme b/Godeps/Readme new file mode 100644 index 0000000..4cdaa53 --- /dev/null +++ b/Godeps/Readme @@ -0,0 +1,5 @@ +This directory tree is generated automatically by godep. + +Please do not edit. + +See https://github.com/tools/godep for more information. diff --git a/Godeps/_workspace/.gitignore b/Godeps/_workspace/.gitignore new file mode 100644 index 0000000..f037d68 --- /dev/null +++ b/Godeps/_workspace/.gitignore @@ -0,0 +1,2 @@ +/pkg +/bin diff --git a/Godeps/_workspace/src/github.com/cloudsigma/cepgo/.gitignore b/Godeps/_workspace/src/github.com/cloudsigma/cepgo/.gitignore new file mode 100644 index 0000000..8365624 --- /dev/null +++ b/Godeps/_workspace/src/github.com/cloudsigma/cepgo/.gitignore @@ -0,0 +1,23 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test diff --git a/third_party/github.com/cloudsigma/cepgo/LICENSE b/Godeps/_workspace/src/github.com/cloudsigma/cepgo/LICENSE similarity index 100% rename from third_party/github.com/cloudsigma/cepgo/LICENSE rename to Godeps/_workspace/src/github.com/cloudsigma/cepgo/LICENSE diff --git a/third_party/github.com/cloudsigma/cepgo/README.md b/Godeps/_workspace/src/github.com/cloudsigma/cepgo/README.md similarity index 100% rename from third_party/github.com/cloudsigma/cepgo/README.md rename to Godeps/_workspace/src/github.com/cloudsigma/cepgo/README.md diff --git a/third_party/github.com/cloudsigma/cepgo/cepgo.go b/Godeps/_workspace/src/github.com/cloudsigma/cepgo/cepgo.go similarity index 98% rename from third_party/github.com/cloudsigma/cepgo/cepgo.go rename to Godeps/_workspace/src/github.com/cloudsigma/cepgo/cepgo.go index 6aeff27..ce2deeb 100644 --- a/third_party/github.com/cloudsigma/cepgo/cepgo.go +++ b/Godeps/_workspace/src/github.com/cloudsigma/cepgo/cepgo.go @@ -48,7 +48,7 @@ import ( "fmt" "runtime" - "github.com/coreos/coreos-cloudinit/third_party/github.com/tarm/goserial" + "github.com/coreos/coreos-cloudinit/Godeps/_workspace/src/github.com/tarm/goserial" ) const ( diff --git a/third_party/github.com/cloudsigma/cepgo/cepgo_test.go b/Godeps/_workspace/src/github.com/cloudsigma/cepgo/cepgo_test.go similarity index 100% rename from third_party/github.com/cloudsigma/cepgo/cepgo_test.go rename to Godeps/_workspace/src/github.com/cloudsigma/cepgo/cepgo_test.go diff --git a/third_party/github.com/coreos/go-systemd/dbus/dbus.go b/Godeps/_workspace/src/github.com/coreos/go-systemd/dbus/dbus.go similarity index 96% rename from third_party/github.com/coreos/go-systemd/dbus/dbus.go rename to Godeps/_workspace/src/github.com/coreos/go-systemd/dbus/dbus.go index a6f8793..ba7968e 100644 --- a/third_party/github.com/coreos/go-systemd/dbus/dbus.go +++ b/Godeps/_workspace/src/github.com/coreos/go-systemd/dbus/dbus.go @@ -23,7 +23,7 @@ import ( "strings" "sync" - "github.com/coreos/coreos-cloudinit/third_party/github.com/guelfey/go.dbus" + "github.com/coreos/coreos-cloudinit/Godeps/_workspace/src/github.com/guelfey/go.dbus" ) const signalBuffer = 100 diff --git a/third_party/github.com/coreos/go-systemd/dbus/dbus_test.go b/Godeps/_workspace/src/github.com/coreos/go-systemd/dbus/dbus_test.go similarity index 100% rename from third_party/github.com/coreos/go-systemd/dbus/dbus_test.go rename to Godeps/_workspace/src/github.com/coreos/go-systemd/dbus/dbus_test.go diff --git a/third_party/github.com/coreos/go-systemd/dbus/methods.go b/Godeps/_workspace/src/github.com/coreos/go-systemd/dbus/methods.go similarity index 98% rename from third_party/github.com/coreos/go-systemd/dbus/methods.go rename to Godeps/_workspace/src/github.com/coreos/go-systemd/dbus/methods.go index 2020106..4f552b7 100644 --- a/third_party/github.com/coreos/go-systemd/dbus/methods.go +++ b/Godeps/_workspace/src/github.com/coreos/go-systemd/dbus/methods.go @@ -18,7 +18,7 @@ package dbus import ( "errors" - "github.com/coreos/coreos-cloudinit/third_party/github.com/guelfey/go.dbus" + "github.com/coreos/coreos-cloudinit/Godeps/_workspace/src/github.com/guelfey/go.dbus" ) func (c *Conn) initJobs() { @@ -208,7 +208,7 @@ func (c *Conn) SetUnitProperties(name string, runtime bool, properties ...Proper } func (c *Conn) GetUnitTypeProperty(unit string, unitType string, propertyName string) (*Property, error) { - return c.getProperty(unit, "org.freedesktop.systemd1." + unitType, propertyName) + return c.getProperty(unit, "org.freedesktop.systemd1."+unitType, propertyName) } // ListUnits returns an array with all currently loaded units. Note that diff --git a/third_party/github.com/coreos/go-systemd/dbus/methods_test.go b/Godeps/_workspace/src/github.com/coreos/go-systemd/dbus/methods_test.go similarity index 98% rename from third_party/github.com/coreos/go-systemd/dbus/methods_test.go rename to Godeps/_workspace/src/github.com/coreos/go-systemd/dbus/methods_test.go index 2c92b33..123de37 100644 --- a/third_party/github.com/coreos/go-systemd/dbus/methods_test.go +++ b/Godeps/_workspace/src/github.com/coreos/go-systemd/dbus/methods_test.go @@ -18,7 +18,7 @@ package dbus import ( "fmt" - "github.com/coreos/coreos-cloudinit/third_party/github.com/guelfey/go.dbus" + "github.com/coreos/coreos-cloudinit/Godeps/_workspace/src/github.com/guelfey/go.dbus" "math/rand" "os" "path/filepath" diff --git a/third_party/github.com/coreos/go-systemd/dbus/properties.go b/Godeps/_workspace/src/github.com/coreos/go-systemd/dbus/properties.go similarity index 98% rename from third_party/github.com/coreos/go-systemd/dbus/properties.go rename to Godeps/_workspace/src/github.com/coreos/go-systemd/dbus/properties.go index fcd1d88..a3593a9 100644 --- a/third_party/github.com/coreos/go-systemd/dbus/properties.go +++ b/Godeps/_workspace/src/github.com/coreos/go-systemd/dbus/properties.go @@ -17,7 +17,7 @@ limitations under the License. package dbus import ( - "github.com/coreos/coreos-cloudinit/third_party/github.com/guelfey/go.dbus" + "github.com/coreos/coreos-cloudinit/Godeps/_workspace/src/github.com/guelfey/go.dbus" ) // From the systemd docs: diff --git a/third_party/github.com/coreos/go-systemd/dbus/set.go b/Godeps/_workspace/src/github.com/coreos/go-systemd/dbus/set.go similarity index 100% rename from third_party/github.com/coreos/go-systemd/dbus/set.go rename to Godeps/_workspace/src/github.com/coreos/go-systemd/dbus/set.go diff --git a/third_party/github.com/coreos/go-systemd/dbus/set_test.go b/Godeps/_workspace/src/github.com/coreos/go-systemd/dbus/set_test.go similarity index 100% rename from third_party/github.com/coreos/go-systemd/dbus/set_test.go rename to Godeps/_workspace/src/github.com/coreos/go-systemd/dbus/set_test.go diff --git a/third_party/github.com/coreos/go-systemd/dbus/subscription.go b/Godeps/_workspace/src/github.com/coreos/go-systemd/dbus/subscription.go similarity index 97% rename from third_party/github.com/coreos/go-systemd/dbus/subscription.go rename to Godeps/_workspace/src/github.com/coreos/go-systemd/dbus/subscription.go index 495862e..e8b04af 100644 --- a/third_party/github.com/coreos/go-systemd/dbus/subscription.go +++ b/Godeps/_workspace/src/github.com/coreos/go-systemd/dbus/subscription.go @@ -20,7 +20,7 @@ import ( "errors" "time" - "github.com/coreos/coreos-cloudinit/third_party/github.com/guelfey/go.dbus" + "github.com/coreos/coreos-cloudinit/Godeps/_workspace/src/github.com/guelfey/go.dbus" ) const ( @@ -101,7 +101,7 @@ func (c *Conn) SubscribeUnits(interval time.Duration) (<-chan map[string]*UnitSt // SubscribeUnitsCustom is like SubscribeUnits but lets you specify the buffer // size of the channels, the comparison function for detecting changes and a filter // function for cutting down on the noise that your channel receives. -func (c *Conn) SubscribeUnitsCustom(interval time.Duration, buffer int, isChanged func(*UnitStatus, *UnitStatus) bool, filterUnit func (string) bool) (<-chan map[string]*UnitStatus, <-chan error) { +func (c *Conn) SubscribeUnitsCustom(interval time.Duration, buffer int, isChanged func(*UnitStatus, *UnitStatus) bool, filterUnit func(string) bool) (<-chan map[string]*UnitStatus, <-chan error) { old := make(map[string]*UnitStatus) statusChan := make(chan map[string]*UnitStatus, buffer) errChan := make(chan error, buffer) diff --git a/third_party/github.com/coreos/go-systemd/dbus/subscription_set.go b/Godeps/_workspace/src/github.com/coreos/go-systemd/dbus/subscription_set.go similarity index 100% rename from third_party/github.com/coreos/go-systemd/dbus/subscription_set.go rename to Godeps/_workspace/src/github.com/coreos/go-systemd/dbus/subscription_set.go diff --git a/third_party/github.com/coreos/go-systemd/dbus/subscription_set_test.go b/Godeps/_workspace/src/github.com/coreos/go-systemd/dbus/subscription_set_test.go similarity index 100% rename from third_party/github.com/coreos/go-systemd/dbus/subscription_set_test.go rename to Godeps/_workspace/src/github.com/coreos/go-systemd/dbus/subscription_set_test.go diff --git a/third_party/github.com/coreos/go-systemd/dbus/subscription_test.go b/Godeps/_workspace/src/github.com/coreos/go-systemd/dbus/subscription_test.go similarity index 100% rename from third_party/github.com/coreos/go-systemd/dbus/subscription_test.go rename to Godeps/_workspace/src/github.com/coreos/go-systemd/dbus/subscription_test.go diff --git a/third_party/github.com/dotcloud/docker/pkg/netlink/MAINTAINERS b/Godeps/_workspace/src/github.com/dotcloud/docker/pkg/netlink/MAINTAINERS similarity index 100% rename from third_party/github.com/dotcloud/docker/pkg/netlink/MAINTAINERS rename to Godeps/_workspace/src/github.com/dotcloud/docker/pkg/netlink/MAINTAINERS diff --git a/third_party/github.com/dotcloud/docker/pkg/netlink/netlink.go b/Godeps/_workspace/src/github.com/dotcloud/docker/pkg/netlink/netlink.go similarity index 100% rename from third_party/github.com/dotcloud/docker/pkg/netlink/netlink.go rename to Godeps/_workspace/src/github.com/dotcloud/docker/pkg/netlink/netlink.go diff --git a/third_party/github.com/dotcloud/docker/pkg/netlink/netlink_linux.go b/Godeps/_workspace/src/github.com/dotcloud/docker/pkg/netlink/netlink_linux.go similarity index 100% rename from third_party/github.com/dotcloud/docker/pkg/netlink/netlink_linux.go rename to Godeps/_workspace/src/github.com/dotcloud/docker/pkg/netlink/netlink_linux.go diff --git a/third_party/github.com/dotcloud/docker/pkg/netlink/netlink_unsupported.go b/Godeps/_workspace/src/github.com/dotcloud/docker/pkg/netlink/netlink_unsupported.go similarity index 100% rename from third_party/github.com/dotcloud/docker/pkg/netlink/netlink_unsupported.go rename to Godeps/_workspace/src/github.com/dotcloud/docker/pkg/netlink/netlink_unsupported.go diff --git a/third_party/github.com/guelfey/go.dbus/LICENSE b/Godeps/_workspace/src/github.com/guelfey/go.dbus/LICENSE similarity index 100% rename from third_party/github.com/guelfey/go.dbus/LICENSE rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/LICENSE diff --git a/third_party/github.com/guelfey/go.dbus/README.markdown b/Godeps/_workspace/src/github.com/guelfey/go.dbus/README.markdown similarity index 100% rename from third_party/github.com/guelfey/go.dbus/README.markdown rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/README.markdown diff --git a/third_party/github.com/guelfey/go.dbus/auth.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/auth.go similarity index 100% rename from third_party/github.com/guelfey/go.dbus/auth.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/auth.go diff --git a/third_party/github.com/guelfey/go.dbus/auth_external.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/auth_external.go similarity index 100% rename from third_party/github.com/guelfey/go.dbus/auth_external.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/auth_external.go diff --git a/third_party/github.com/guelfey/go.dbus/auth_sha1.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/auth_sha1.go similarity index 100% rename from third_party/github.com/guelfey/go.dbus/auth_sha1.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/auth_sha1.go diff --git a/third_party/github.com/guelfey/go.dbus/call.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/call.go similarity index 100% rename from third_party/github.com/guelfey/go.dbus/call.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/call.go diff --git a/third_party/github.com/guelfey/go.dbus/conn.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/conn.go similarity index 100% rename from third_party/github.com/guelfey/go.dbus/conn.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/conn.go diff --git a/third_party/github.com/guelfey/go.dbus/conn_darwin.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/conn_darwin.go similarity index 100% rename from third_party/github.com/guelfey/go.dbus/conn_darwin.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/conn_darwin.go diff --git a/third_party/github.com/guelfey/go.dbus/conn_other.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/conn_other.go similarity index 100% rename from third_party/github.com/guelfey/go.dbus/conn_other.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/conn_other.go diff --git a/third_party/github.com/guelfey/go.dbus/conn_test.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/conn_test.go similarity index 100% rename from third_party/github.com/guelfey/go.dbus/conn_test.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/conn_test.go diff --git a/third_party/github.com/guelfey/go.dbus/dbus.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/dbus.go similarity index 100% rename from third_party/github.com/guelfey/go.dbus/dbus.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/dbus.go diff --git a/third_party/github.com/guelfey/go.dbus/decoder.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/decoder.go similarity index 100% rename from third_party/github.com/guelfey/go.dbus/decoder.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/decoder.go diff --git a/third_party/github.com/guelfey/go.dbus/doc.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/doc.go similarity index 100% rename from third_party/github.com/guelfey/go.dbus/doc.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/doc.go diff --git a/third_party/github.com/guelfey/go.dbus/encoder.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/encoder.go similarity index 100% rename from third_party/github.com/guelfey/go.dbus/encoder.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/encoder.go diff --git a/third_party/github.com/guelfey/go.dbus/examples_test.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/examples_test.go similarity index 100% rename from third_party/github.com/guelfey/go.dbus/examples_test.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/examples_test.go diff --git a/third_party/github.com/guelfey/go.dbus/export.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/export.go similarity index 100% rename from third_party/github.com/guelfey/go.dbus/export.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/export.go diff --git a/third_party/github.com/guelfey/go.dbus/introspect/call.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/introspect/call.go similarity index 86% rename from third_party/github.com/guelfey/go.dbus/introspect/call.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/introspect/call.go index 4a40fd4..f511836 100644 --- a/third_party/github.com/guelfey/go.dbus/introspect/call.go +++ b/Godeps/_workspace/src/github.com/guelfey/go.dbus/introspect/call.go @@ -2,7 +2,7 @@ package introspect import ( "encoding/xml" - "github.com/coreos/coreos-cloudinit/third_party/github.com/guelfey/go.dbus" + "github.com/coreos/coreos-cloudinit/Godeps/_workspace/src/github.com/guelfey/go.dbus" "strings" ) diff --git a/third_party/github.com/guelfey/go.dbus/introspect/introspect.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/introspect/introspect.go similarity index 100% rename from third_party/github.com/guelfey/go.dbus/introspect/introspect.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/introspect/introspect.go diff --git a/third_party/github.com/guelfey/go.dbus/introspect/introspectable.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/introspect/introspectable.go similarity index 95% rename from third_party/github.com/guelfey/go.dbus/introspect/introspectable.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/introspect/introspectable.go index c86c8a1..9cbda45 100644 --- a/third_party/github.com/guelfey/go.dbus/introspect/introspectable.go +++ b/Godeps/_workspace/src/github.com/guelfey/go.dbus/introspect/introspectable.go @@ -2,7 +2,7 @@ package introspect import ( "encoding/xml" - "github.com/coreos/coreos-cloudinit/third_party/github.com/guelfey/go.dbus" + "github.com/coreos/coreos-cloudinit/Godeps/_workspace/src/github.com/guelfey/go.dbus" "reflect" ) diff --git a/third_party/github.com/guelfey/go.dbus/message.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/message.go similarity index 100% rename from third_party/github.com/guelfey/go.dbus/message.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/message.go diff --git a/third_party/github.com/guelfey/go.dbus/prop/prop.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/prop/prop.go similarity index 97% rename from third_party/github.com/guelfey/go.dbus/prop/prop.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/prop/prop.go index 0cac057..092124a 100644 --- a/third_party/github.com/guelfey/go.dbus/prop/prop.go +++ b/Godeps/_workspace/src/github.com/guelfey/go.dbus/prop/prop.go @@ -3,8 +3,8 @@ package prop import ( - "github.com/coreos/coreos-cloudinit/third_party/github.com/guelfey/go.dbus" - "github.com/coreos/coreos-cloudinit/third_party/github.com/guelfey/go.dbus/introspect" + "github.com/coreos/coreos-cloudinit/Godeps/_workspace/src/github.com/guelfey/go.dbus" + "github.com/coreos/coreos-cloudinit/Godeps/_workspace/src/github.com/guelfey/go.dbus/introspect" "sync" ) diff --git a/third_party/github.com/guelfey/go.dbus/proto_test.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/proto_test.go similarity index 100% rename from third_party/github.com/guelfey/go.dbus/proto_test.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/proto_test.go diff --git a/third_party/github.com/guelfey/go.dbus/sig.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/sig.go similarity index 100% rename from third_party/github.com/guelfey/go.dbus/sig.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/sig.go diff --git a/third_party/github.com/guelfey/go.dbus/sig_test.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/sig_test.go similarity index 100% rename from third_party/github.com/guelfey/go.dbus/sig_test.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/sig_test.go diff --git a/third_party/github.com/guelfey/go.dbus/transport_darwin.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/transport_darwin.go similarity index 100% rename from third_party/github.com/guelfey/go.dbus/transport_darwin.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/transport_darwin.go diff --git a/third_party/github.com/guelfey/go.dbus/transport_generic.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/transport_generic.go similarity index 100% rename from third_party/github.com/guelfey/go.dbus/transport_generic.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/transport_generic.go diff --git a/third_party/github.com/guelfey/go.dbus/transport_unix.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/transport_unix.go similarity index 100% rename from third_party/github.com/guelfey/go.dbus/transport_unix.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/transport_unix.go diff --git a/third_party/github.com/guelfey/go.dbus/transport_unix_test.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/transport_unix_test.go similarity index 100% rename from third_party/github.com/guelfey/go.dbus/transport_unix_test.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/transport_unix_test.go diff --git a/third_party/github.com/guelfey/go.dbus/transport_unixcred.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/transport_unixcred.go similarity index 100% rename from third_party/github.com/guelfey/go.dbus/transport_unixcred.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/transport_unixcred.go diff --git a/third_party/github.com/guelfey/go.dbus/variant.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/variant.go similarity index 100% rename from third_party/github.com/guelfey/go.dbus/variant.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/variant.go diff --git a/third_party/github.com/guelfey/go.dbus/variant_lexer.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/variant_lexer.go similarity index 100% rename from third_party/github.com/guelfey/go.dbus/variant_lexer.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/variant_lexer.go diff --git a/third_party/github.com/guelfey/go.dbus/variant_parser.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/variant_parser.go similarity index 100% rename from third_party/github.com/guelfey/go.dbus/variant_parser.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/variant_parser.go diff --git a/third_party/github.com/guelfey/go.dbus/variant_test.go b/Godeps/_workspace/src/github.com/guelfey/go.dbus/variant_test.go similarity index 100% rename from third_party/github.com/guelfey/go.dbus/variant_test.go rename to Godeps/_workspace/src/github.com/guelfey/go.dbus/variant_test.go diff --git a/third_party/github.com/tarm/goserial/LICENSE b/Godeps/_workspace/src/github.com/tarm/goserial/LICENSE similarity index 100% rename from third_party/github.com/tarm/goserial/LICENSE rename to Godeps/_workspace/src/github.com/tarm/goserial/LICENSE diff --git a/third_party/github.com/tarm/goserial/README.md b/Godeps/_workspace/src/github.com/tarm/goserial/README.md similarity index 100% rename from third_party/github.com/tarm/goserial/README.md rename to Godeps/_workspace/src/github.com/tarm/goserial/README.md diff --git a/Godeps/_workspace/src/github.com/tarm/goserial/basic_test.go b/Godeps/_workspace/src/github.com/tarm/goserial/basic_test.go new file mode 100644 index 0000000..3a72224 --- /dev/null +++ b/Godeps/_workspace/src/github.com/tarm/goserial/basic_test.go @@ -0,0 +1,61 @@ +package serial + +import ( + "testing" + "time" +) + +func TestConnection(t *testing.T) { + c0 := &Config{Name: "/dev/ttyUSB0", Baud: 115200} + c1 := &Config{Name: "/dev/ttyUSB1", Baud: 115200} + + s1, err := OpenPort(c0) + if err != nil { + t.Fatal(err) + } + + s2, err := OpenPort(c1) + if err != nil { + t.Fatal(err) + } + + ch := make(chan int, 1) + go func() { + buf := make([]byte, 128) + var readCount int + for { + n, err := s2.Read(buf) + if err != nil { + t.Fatal(err) + } + readCount++ + t.Logf("Read %v %v bytes: % 02x %s", readCount, n, buf[:n], buf[:n]) + select { + case <-ch: + ch <- readCount + close(ch) + default: + } + } + }() + + if _, err = s1.Write([]byte("hello")); err != nil { + t.Fatal(err) + } + if _, err = s1.Write([]byte(" ")); err != nil { + t.Fatal(err) + } + time.Sleep(time.Second) + if _, err = s1.Write([]byte("world")); err != nil { + t.Fatal(err) + } + time.Sleep(time.Second / 10) + + ch <- 0 + s1.Write([]byte(" ")) // We could be blocked in the read without this + c := <-ch + exp := 5 + if c >= exp { + t.Fatalf("Expected less than %v read, got %v", exp, c) + } +} diff --git a/third_party/github.com/tarm/goserial/serial.go b/Godeps/_workspace/src/github.com/tarm/goserial/serial.go similarity index 100% rename from third_party/github.com/tarm/goserial/serial.go rename to Godeps/_workspace/src/github.com/tarm/goserial/serial.go diff --git a/third_party/github.com/tarm/goserial/serial_linux.go b/Godeps/_workspace/src/github.com/tarm/goserial/serial_linux.go similarity index 100% rename from third_party/github.com/tarm/goserial/serial_linux.go rename to Godeps/_workspace/src/github.com/tarm/goserial/serial_linux.go diff --git a/third_party/github.com/tarm/goserial/serial_posix.go b/Godeps/_workspace/src/github.com/tarm/goserial/serial_posix.go similarity index 100% rename from third_party/github.com/tarm/goserial/serial_posix.go rename to Godeps/_workspace/src/github.com/tarm/goserial/serial_posix.go diff --git a/third_party/github.com/tarm/goserial/serial_windows.go b/Godeps/_workspace/src/github.com/tarm/goserial/serial_windows.go similarity index 100% rename from third_party/github.com/tarm/goserial/serial_windows.go rename to Godeps/_workspace/src/github.com/tarm/goserial/serial_windows.go diff --git a/third_party/gopkg.in/yaml.v1/LICENSE b/Godeps/_workspace/src/gopkg.in/yaml.v1/LICENSE similarity index 100% rename from third_party/gopkg.in/yaml.v1/LICENSE rename to Godeps/_workspace/src/gopkg.in/yaml.v1/LICENSE diff --git a/third_party/gopkg.in/yaml.v1/LICENSE.libyaml b/Godeps/_workspace/src/gopkg.in/yaml.v1/LICENSE.libyaml similarity index 100% rename from third_party/gopkg.in/yaml.v1/LICENSE.libyaml rename to Godeps/_workspace/src/gopkg.in/yaml.v1/LICENSE.libyaml diff --git a/third_party/gopkg.in/yaml.v1/README.md b/Godeps/_workspace/src/gopkg.in/yaml.v1/README.md similarity index 100% rename from third_party/gopkg.in/yaml.v1/README.md rename to Godeps/_workspace/src/gopkg.in/yaml.v1/README.md diff --git a/third_party/gopkg.in/yaml.v1/apic.go b/Godeps/_workspace/src/gopkg.in/yaml.v1/apic.go similarity index 100% rename from third_party/gopkg.in/yaml.v1/apic.go rename to Godeps/_workspace/src/gopkg.in/yaml.v1/apic.go diff --git a/third_party/gopkg.in/yaml.v1/decode.go b/Godeps/_workspace/src/gopkg.in/yaml.v1/decode.go similarity index 100% rename from third_party/gopkg.in/yaml.v1/decode.go rename to Godeps/_workspace/src/gopkg.in/yaml.v1/decode.go diff --git a/third_party/gopkg.in/yaml.v1/decode_test.go b/Godeps/_workspace/src/gopkg.in/yaml.v1/decode_test.go similarity index 99% rename from third_party/gopkg.in/yaml.v1/decode_test.go rename to Godeps/_workspace/src/gopkg.in/yaml.v1/decode_test.go index a290645..905a73d 100644 --- a/third_party/gopkg.in/yaml.v1/decode_test.go +++ b/Godeps/_workspace/src/gopkg.in/yaml.v1/decode_test.go @@ -2,7 +2,7 @@ package yaml_test import ( . "gopkg.in/check.v1" - "gopkg.in/yaml.v1" + "github.com/coreos/coreos-cloudinit/Godeps/_workspace/src/gopkg.in/yaml.v1" "math" "reflect" "time" @@ -372,7 +372,7 @@ var unmarshalTests = []struct { map[string]time.Duration{"a": 3 * time.Second}, }, - // Issue #24. + // Issue #24. { "a: ", map[string]string{"a": ""}, diff --git a/third_party/gopkg.in/yaml.v1/emitterc.go b/Godeps/_workspace/src/gopkg.in/yaml.v1/emitterc.go similarity index 100% rename from third_party/gopkg.in/yaml.v1/emitterc.go rename to Godeps/_workspace/src/gopkg.in/yaml.v1/emitterc.go diff --git a/third_party/gopkg.in/yaml.v1/encode.go b/Godeps/_workspace/src/gopkg.in/yaml.v1/encode.go similarity index 100% rename from third_party/gopkg.in/yaml.v1/encode.go rename to Godeps/_workspace/src/gopkg.in/yaml.v1/encode.go diff --git a/third_party/gopkg.in/yaml.v1/encode_test.go b/Godeps/_workspace/src/gopkg.in/yaml.v1/encode_test.go similarity index 98% rename from third_party/gopkg.in/yaml.v1/encode_test.go rename to Godeps/_workspace/src/gopkg.in/yaml.v1/encode_test.go index 83dc490..075e3df 100644 --- a/third_party/gopkg.in/yaml.v1/encode_test.go +++ b/Godeps/_workspace/src/gopkg.in/yaml.v1/encode_test.go @@ -2,7 +2,7 @@ package yaml_test import ( "fmt" - "gopkg.in/yaml.v1" + "github.com/coreos/coreos-cloudinit/Godeps/_workspace/src/gopkg.in/yaml.v1" . "gopkg.in/check.v1" "math" "strconv" @@ -220,7 +220,7 @@ var marshalTests = []struct { "a: 3s\n", }, - // Issue #24. + // Issue #24. { map[string]string{"a": ""}, "a: \n", diff --git a/third_party/gopkg.in/yaml.v1/parserc.go b/Godeps/_workspace/src/gopkg.in/yaml.v1/parserc.go similarity index 100% rename from third_party/gopkg.in/yaml.v1/parserc.go rename to Godeps/_workspace/src/gopkg.in/yaml.v1/parserc.go diff --git a/third_party/gopkg.in/yaml.v1/readerc.go b/Godeps/_workspace/src/gopkg.in/yaml.v1/readerc.go similarity index 100% rename from third_party/gopkg.in/yaml.v1/readerc.go rename to Godeps/_workspace/src/gopkg.in/yaml.v1/readerc.go diff --git a/third_party/gopkg.in/yaml.v1/resolve.go b/Godeps/_workspace/src/gopkg.in/yaml.v1/resolve.go similarity index 100% rename from third_party/gopkg.in/yaml.v1/resolve.go rename to Godeps/_workspace/src/gopkg.in/yaml.v1/resolve.go diff --git a/third_party/gopkg.in/yaml.v1/scannerc.go b/Godeps/_workspace/src/gopkg.in/yaml.v1/scannerc.go similarity index 100% rename from third_party/gopkg.in/yaml.v1/scannerc.go rename to Godeps/_workspace/src/gopkg.in/yaml.v1/scannerc.go diff --git a/third_party/gopkg.in/yaml.v1/sorter.go b/Godeps/_workspace/src/gopkg.in/yaml.v1/sorter.go similarity index 100% rename from third_party/gopkg.in/yaml.v1/sorter.go rename to Godeps/_workspace/src/gopkg.in/yaml.v1/sorter.go diff --git a/third_party/gopkg.in/yaml.v1/suite_test.go b/Godeps/_workspace/src/gopkg.in/yaml.v1/suite_test.go similarity index 100% rename from third_party/gopkg.in/yaml.v1/suite_test.go rename to Godeps/_workspace/src/gopkg.in/yaml.v1/suite_test.go diff --git a/third_party/gopkg.in/yaml.v1/writerc.go b/Godeps/_workspace/src/gopkg.in/yaml.v1/writerc.go similarity index 100% rename from third_party/gopkg.in/yaml.v1/writerc.go rename to Godeps/_workspace/src/gopkg.in/yaml.v1/writerc.go diff --git a/third_party/gopkg.in/yaml.v1/yaml.go b/Godeps/_workspace/src/gopkg.in/yaml.v1/yaml.go similarity index 100% rename from third_party/gopkg.in/yaml.v1/yaml.go rename to Godeps/_workspace/src/gopkg.in/yaml.v1/yaml.go diff --git a/third_party/gopkg.in/yaml.v1/yamlh.go b/Godeps/_workspace/src/gopkg.in/yaml.v1/yamlh.go similarity index 100% rename from third_party/gopkg.in/yaml.v1/yamlh.go rename to Godeps/_workspace/src/gopkg.in/yaml.v1/yamlh.go diff --git a/third_party/gopkg.in/yaml.v1/yamlprivateh.go b/Godeps/_workspace/src/gopkg.in/yaml.v1/yamlprivateh.go similarity index 100% rename from third_party/gopkg.in/yaml.v1/yamlprivateh.go rename to Godeps/_workspace/src/gopkg.in/yaml.v1/yamlprivateh.go diff --git a/config/config.go b/config/config.go index 04c4a37..e3378d2 100644 --- a/config/config.go +++ b/config/config.go @@ -22,7 +22,7 @@ import ( "reflect" "strings" - "github.com/coreos/coreos-cloudinit/third_party/gopkg.in/yaml.v1" + "github.com/coreos/coreos-cloudinit/Godeps/_workspace/src/gopkg.in/yaml.v1" ) // CloudConfig encapsulates the entire cloud-config configuration file and maps diff --git a/datasource/metadata/cloudsigma/server_context.go b/datasource/metadata/cloudsigma/server_context.go index ec7b7d4..5d28900 100644 --- a/datasource/metadata/cloudsigma/server_context.go +++ b/datasource/metadata/cloudsigma/server_context.go @@ -22,7 +22,7 @@ import ( "os" "strings" - "github.com/coreos/coreos-cloudinit/third_party/github.com/cloudsigma/cepgo" + "github.com/coreos/coreos-cloudinit/Godeps/_workspace/src/github.com/cloudsigma/cepgo" ) const ( diff --git a/system/networkd.go b/system/networkd.go index 3c43921..0055a5b 100644 --- a/system/networkd.go +++ b/system/networkd.go @@ -24,9 +24,9 @@ import ( "strings" "time" + "github.com/coreos/coreos-cloudinit/Godeps/_workspace/src/github.com/dotcloud/docker/pkg/netlink" "github.com/coreos/coreos-cloudinit/config" "github.com/coreos/coreos-cloudinit/network" - "github.com/coreos/coreos-cloudinit/third_party/github.com/dotcloud/docker/pkg/netlink" ) const ( diff --git a/system/systemd.go b/system/systemd.go index 44317e1..8200333 100644 --- a/system/systemd.go +++ b/system/systemd.go @@ -26,8 +26,8 @@ import ( "path/filepath" "strings" + "github.com/coreos/coreos-cloudinit/Godeps/_workspace/src/github.com/coreos/go-systemd/dbus" "github.com/coreos/coreos-cloudinit/config" - "github.com/coreos/coreos-cloudinit/third_party/github.com/coreos/go-systemd/dbus" ) func NewUnitManager(root string) UnitManager { diff --git a/third_party/github.com/coreos/go-systemd/.travis.yml b/third_party/github.com/coreos/go-systemd/.travis.yml deleted file mode 100644 index 8c9f56e..0000000 --- a/third_party/github.com/coreos/go-systemd/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go -go: 1.2 - -install: - - echo "Skip install" - -script: - - ./test diff --git a/third_party/github.com/coreos/go-systemd/LICENSE b/third_party/github.com/coreos/go-systemd/LICENSE deleted file mode 100644 index 37ec93a..0000000 --- a/third_party/github.com/coreos/go-systemd/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -"Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own -identifying information. (Don't include the brackets!) The text should be -enclosed in the appropriate comment syntax for the file format. We also -recommend that a file or class name and description of purpose be included on -the same "printed page" as the copyright notice for easier identification within -third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. diff --git a/third_party/github.com/coreos/go-systemd/README.md b/third_party/github.com/coreos/go-systemd/README.md deleted file mode 100644 index 0ee09fe..0000000 --- a/third_party/github.com/coreos/go-systemd/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# go-systemd - -Go bindings to systemd. The project has three packages: - -- activation - for writing and using socket activation from Go -- journal - for writing to systemd's logging service, journal -- dbus - for starting/stopping/inspecting running services and units - -Go docs for the entire project are here: - -http://godoc.org/github.com/coreos/go-systemd - -## Socket Activation - -An example HTTP server using socket activation can be quickly setup by -following this README on a Linux machine running systemd: - -https://github.com/coreos/go-systemd/tree/master/examples/activation/httpserver - -## Journal - -Using this package you can submit journal entries directly to systemd's journal taking advantage of features like indexed key/value pairs for each log entry. - -## D-Bus - -The D-Bus API lets you start, stop and introspect systemd units. The API docs are here: - -http://godoc.org/github.com/coreos/go-systemd/dbus - -### Debugging - -Create `/etc/dbus-1/system-local.conf` that looks like this: - -``` - - - - - - - -``` diff --git a/third_party/github.com/coreos/go-systemd/activation/files.go b/third_party/github.com/coreos/go-systemd/activation/files.go deleted file mode 100644 index 74b4fc1..0000000 --- a/third_party/github.com/coreos/go-systemd/activation/files.go +++ /dev/null @@ -1,56 +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 activation implements primitives for systemd socket activation. -package activation - -import ( - "os" - "strconv" - "syscall" -) - -// based on: https://gist.github.com/alberts/4640792 -const ( - listenFdsStart = 3 -) - -func Files(unsetEnv bool) []*os.File { - if unsetEnv { - // there is no way to unset env in golang os package for now - // https://code.google.com/p/go/issues/detail?id=6423 - defer os.Setenv("LISTEN_PID", "") - defer os.Setenv("LISTEN_FDS", "") - } - - pid, err := strconv.Atoi(os.Getenv("LISTEN_PID")) - if err != nil || pid != os.Getpid() { - return nil - } - - nfds, err := strconv.Atoi(os.Getenv("LISTEN_FDS")) - if err != nil || nfds == 0 { - return nil - } - - var files []*os.File - for fd := listenFdsStart; fd < listenFdsStart+nfds; fd++ { - syscall.CloseOnExec(fd) - files = append(files, os.NewFile(uintptr(fd), "LISTEN_FD_"+strconv.Itoa(fd))) - } - - return files -} diff --git a/third_party/github.com/coreos/go-systemd/activation/files_test.go b/third_party/github.com/coreos/go-systemd/activation/files_test.go deleted file mode 100644 index a1c6948..0000000 --- a/third_party/github.com/coreos/go-systemd/activation/files_test.go +++ /dev/null @@ -1,84 +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 activation - -import ( - "bytes" - "io" - "os" - "os/exec" - "testing" -) - -// correctStringWritten fails the text if the correct string wasn't written -// to the other side of the pipe. -func correctStringWritten(t *testing.T, r *os.File, expected string) bool { - bytes := make([]byte, len(expected)) - io.ReadAtLeast(r, bytes, len(expected)) - - if string(bytes) != expected { - t.Fatalf("Unexpected string %s", string(bytes)) - } - - return true -} - -// TestActivation forks out a copy of activation.go example and reads back two -// strings from the pipes that are passed in. -func TestActivation(t *testing.T) { - cmd := exec.Command("go", "run", "../examples/activation/activation.go") - - r1, w1, _ := os.Pipe() - r2, w2, _ := os.Pipe() - cmd.ExtraFiles = []*os.File{ - w1, - w2, - } - - cmd.Env = os.Environ() - cmd.Env = append(cmd.Env, "LISTEN_FDS=2", "FIX_LISTEN_PID=1") - - err := cmd.Run() - if err != nil { - t.Fatalf(err.Error()) - } - - correctStringWritten(t, r1, "Hello world") - correctStringWritten(t, r2, "Goodbye world") -} - -func TestActivationNoFix(t *testing.T) { - cmd := exec.Command("go", "run", "../examples/activation/activation.go") - cmd.Env = os.Environ() - cmd.Env = append(cmd.Env, "LISTEN_FDS=2") - - out, _ := cmd.CombinedOutput() - if bytes.Contains(out, []byte("No files")) == false { - t.Fatalf("Child didn't error out as expected") - } -} - -func TestActivationNoFiles(t *testing.T) { - cmd := exec.Command("go", "run", "../examples/activation/activation.go") - cmd.Env = os.Environ() - cmd.Env = append(cmd.Env, "LISTEN_FDS=0", "FIX_LISTEN_PID=1") - - out, _ := cmd.CombinedOutput() - if bytes.Contains(out, []byte("No files")) == false { - t.Fatalf("Child didn't error out as expected") - } -} diff --git a/third_party/github.com/coreos/go-systemd/activation/listeners.go b/third_party/github.com/coreos/go-systemd/activation/listeners.go deleted file mode 100644 index cdb2cf4..0000000 --- a/third_party/github.com/coreos/go-systemd/activation/listeners.go +++ /dev/null @@ -1,38 +0,0 @@ -/* -Copyright 2014 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 activation - -import ( - "fmt" - "net" -) - -// Listeners returns net.Listeners for all socket activated fds passed to this process. -func Listeners(unsetEnv bool) ([]net.Listener, error) { - files := Files(unsetEnv) - listeners := make([]net.Listener, len(files)) - - for i, f := range files { - var err error - listeners[i], err = net.FileListener(f) - if err != nil { - return nil, fmt.Errorf("Error setting up FileListener for fd %d: %s", f.Fd(), err.Error()) - } - } - - return listeners, nil -} diff --git a/third_party/github.com/coreos/go-systemd/activation/listeners_test.go b/third_party/github.com/coreos/go-systemd/activation/listeners_test.go deleted file mode 100644 index c3627d6..0000000 --- a/third_party/github.com/coreos/go-systemd/activation/listeners_test.go +++ /dev/null @@ -1,88 +0,0 @@ -/* -Copyright 2014 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 activation - -import ( - "io" - "net" - "os" - "os/exec" - "testing" -) - -// correctStringWritten fails the text if the correct string wasn't written -// to the other side of the pipe. -func correctStringWrittenNet(t *testing.T, r net.Conn, expected string) bool { - bytes := make([]byte, len(expected)) - io.ReadAtLeast(r, bytes, len(expected)) - - if string(bytes) != expected { - t.Fatalf("Unexpected string %s", string(bytes)) - } - - return true -} - -// TestActivation forks out a copy of activation.go example and reads back two -// strings from the pipes that are passed in. -func TestListeners(t *testing.T) { - cmd := exec.Command("go", "run", "../examples/activation/listen.go") - - l1, err := net.Listen("tcp", ":9999") - if err != nil { - t.Fatalf(err.Error()) - } - l2, err := net.Listen("tcp", ":1234") - if err != nil { - t.Fatalf(err.Error()) - } - - t1 := l1.(*net.TCPListener) - t2 := l2.(*net.TCPListener) - - f1, _ := t1.File() - f2, _ := t2.File() - - cmd.ExtraFiles = []*os.File{ - f1, - f2, - } - - r1, err := net.Dial("tcp", "127.0.0.1:9999") - if err != nil { - t.Fatalf(err.Error()) - } - r1.Write([]byte("Hi")) - - r2, err := net.Dial("tcp", "127.0.0.1:1234") - if err != nil { - t.Fatalf(err.Error()) - } - r2.Write([]byte("Hi")) - - cmd.Env = os.Environ() - cmd.Env = append(cmd.Env, "LISTEN_FDS=2", "FIX_LISTEN_PID=1") - - out, err := cmd.Output() - if err != nil { - println(string(out)) - t.Fatalf(err.Error()) - } - - correctStringWrittenNet(t, r1, "Hello world") - correctStringWrittenNet(t, r2, "Goodbye world") -} diff --git a/third_party/github.com/coreos/go-systemd/examples/activation/activation.go b/third_party/github.com/coreos/go-systemd/examples/activation/activation.go deleted file mode 100644 index b21e966..0000000 --- a/third_party/github.com/coreos/go-systemd/examples/activation/activation.go +++ /dev/null @@ -1,44 +0,0 @@ -// Activation example used by the activation unit tests. -package main - -import ( - "fmt" - "os" - - "github.com/coreos/coreos-cloudinit/third_party/github.com/coreos/go-systemd/activation" -) - -func fixListenPid() { - if os.Getenv("FIX_LISTEN_PID") != "" { - // HACK: real systemd would set LISTEN_PID before exec'ing but - // this is too difficult in golang for the purpose of a test. - // Do not do this in real code. - os.Setenv("LISTEN_PID", fmt.Sprintf("%d", os.Getpid())) - } -} - -func main() { - fixListenPid() - - files := activation.Files(false) - - if len(files) == 0 { - panic("No files") - } - - if os.Getenv("LISTEN_PID") == "" || os.Getenv("LISTEN_FDS") == "" { - panic("Should not unset envs") - } - - files = activation.Files(true) - - if os.Getenv("LISTEN_PID") != "" || os.Getenv("LISTEN_FDS") != "" { - panic("Can not unset envs") - } - - // Write out the expected strings to the two pipes - files[0].Write([]byte("Hello world")) - files[1].Write([]byte("Goodbye world")) - - return -} diff --git a/third_party/github.com/coreos/go-systemd/examples/activation/httpserver/README.md b/third_party/github.com/coreos/go-systemd/examples/activation/httpserver/README.md deleted file mode 100644 index a350cca..0000000 --- a/third_party/github.com/coreos/go-systemd/examples/activation/httpserver/README.md +++ /dev/null @@ -1,19 +0,0 @@ -## socket activated http server - -This is a simple example of using socket activation with systemd to serve a -simple HTTP server on http://127.0.0.1:8076 - -To try it out `go get` the httpserver and run it under the systemd-activate helper - -``` -export GOPATH=`pwd` -go get github.com/coreos/go-systemd/examples/activation/httpserver -sudo /usr/lib/systemd/systemd-activate -l 127.0.0.1:8076 ./bin/httpserver -``` - -Then curl the URL and you will notice that it starts up: - -``` -curl 127.0.0.1:8076 -hello socket activated world! -``` diff --git a/third_party/github.com/coreos/go-systemd/examples/activation/httpserver/hello.service b/third_party/github.com/coreos/go-systemd/examples/activation/httpserver/hello.service deleted file mode 100644 index c8dea0f..0000000 --- a/third_party/github.com/coreos/go-systemd/examples/activation/httpserver/hello.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Hello World HTTP -Requires=network.target -After=multi-user.target - -[Service] -Type=simple -ExecStart=/usr/local/bin/httpserver - -[Install] -WantedBy=multi-user.target diff --git a/third_party/github.com/coreos/go-systemd/examples/activation/httpserver/hello.socket b/third_party/github.com/coreos/go-systemd/examples/activation/httpserver/hello.socket deleted file mode 100644 index 723ed7e..0000000 --- a/third_party/github.com/coreos/go-systemd/examples/activation/httpserver/hello.socket +++ /dev/null @@ -1,5 +0,0 @@ -[Socket] -ListenStream=127.0.0.1:8076 - -[Install] -WantedBy=sockets.target diff --git a/third_party/github.com/coreos/go-systemd/examples/activation/httpserver/httpserver.go b/third_party/github.com/coreos/go-systemd/examples/activation/httpserver/httpserver.go deleted file mode 100644 index 67e0cb5..0000000 --- a/third_party/github.com/coreos/go-systemd/examples/activation/httpserver/httpserver.go +++ /dev/null @@ -1,26 +0,0 @@ -package main - -import ( - "io" - "net/http" - - "github.com/coreos/coreos-cloudinit/third_party/github.com/coreos/go-systemd/activation" -) - -func HelloServer(w http.ResponseWriter, req *http.Request) { - io.WriteString(w, "hello socket activated world!\n") -} - -func main() { - listeners, err := activation.Listeners(true) - if err != nil { - panic(err) - } - - if len(listeners) != 1 { - panic("Unexpected number of socket activation fds") - } - - http.HandleFunc("/", HelloServer) - http.Serve(listeners[0], nil) -} diff --git a/third_party/github.com/coreos/go-systemd/examples/activation/listen.go b/third_party/github.com/coreos/go-systemd/examples/activation/listen.go deleted file mode 100644 index 5dfc65b..0000000 --- a/third_party/github.com/coreos/go-systemd/examples/activation/listen.go +++ /dev/null @@ -1,50 +0,0 @@ -// Activation example used by the activation unit tests. -package main - -import ( - "fmt" - "os" - - "github.com/coreos/coreos-cloudinit/third_party/github.com/coreos/go-systemd/activation" -) - -func fixListenPid() { - if os.Getenv("FIX_LISTEN_PID") != "" { - // HACK: real systemd would set LISTEN_PID before exec'ing but - // this is too difficult in golang for the purpose of a test. - // Do not do this in real code. - os.Setenv("LISTEN_PID", fmt.Sprintf("%d", os.Getpid())) - } -} - -func main() { - fixListenPid() - - listeners, _ := activation.Listeners(false) - - if len(listeners) == 0 { - panic("No listeners") - } - - if os.Getenv("LISTEN_PID") == "" || os.Getenv("LISTEN_FDS") == "" { - panic("Should not unset envs") - } - - listeners, err := activation.Listeners(true) - if err != nil { - panic(err) - } - - if os.Getenv("LISTEN_PID") != "" || os.Getenv("LISTEN_FDS") != "" { - panic("Can not unset envs") - } - - c0, _ := listeners[0].Accept() - c1, _ := listeners[1].Accept() - - // Write out the expected strings to the two pipes - c0.Write([]byte("Hello world")) - c1.Write([]byte("Goodbye world")) - - return -} diff --git a/third_party/github.com/coreos/go-systemd/fixtures/start-stop.service b/third_party/github.com/coreos/go-systemd/fixtures/start-stop.service deleted file mode 100644 index a1f8c36..0000000 --- a/third_party/github.com/coreos/go-systemd/fixtures/start-stop.service +++ /dev/null @@ -1,5 +0,0 @@ -[Unit] -Description=start stop test - -[Service] -ExecStart=/bin/sleep 400 diff --git a/third_party/github.com/coreos/go-systemd/fixtures/subscribe-events-set.service b/third_party/github.com/coreos/go-systemd/fixtures/subscribe-events-set.service deleted file mode 100644 index a1f8c36..0000000 --- a/third_party/github.com/coreos/go-systemd/fixtures/subscribe-events-set.service +++ /dev/null @@ -1,5 +0,0 @@ -[Unit] -Description=start stop test - -[Service] -ExecStart=/bin/sleep 400 diff --git a/third_party/github.com/coreos/go-systemd/fixtures/subscribe-events.service b/third_party/github.com/coreos/go-systemd/fixtures/subscribe-events.service deleted file mode 100644 index a1f8c36..0000000 --- a/third_party/github.com/coreos/go-systemd/fixtures/subscribe-events.service +++ /dev/null @@ -1,5 +0,0 @@ -[Unit] -Description=start stop test - -[Service] -ExecStart=/bin/sleep 400 diff --git a/third_party/github.com/coreos/go-systemd/journal/send.go b/third_party/github.com/coreos/go-systemd/journal/send.go deleted file mode 100644 index a29bcbf..0000000 --- a/third_party/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.Fprintln(w, "%s=%s", 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/third_party/github.com/coreos/go-systemd/test b/third_party/github.com/coreos/go-systemd/test deleted file mode 100755 index 6e04365..0000000 --- a/third_party/github.com/coreos/go-systemd/test +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -e - -go test -v ./... diff --git a/third_party/github.com/guelfey/go.dbus/_examples/eavesdrop.go b/third_party/github.com/guelfey/go.dbus/_examples/eavesdrop.go deleted file mode 100644 index d2ff168..0000000 --- a/third_party/github.com/guelfey/go.dbus/_examples/eavesdrop.go +++ /dev/null @@ -1,30 +0,0 @@ -package main - -import ( - "fmt" - "github.com/coreos/coreos-cloudinit/third_party/github.com/guelfey/go.dbus" - "os" -) - -func main() { - conn, err := dbus.SessionBus() - if err != nil { - fmt.Fprintln(os.Stderr, "Failed to connect to session bus:", err) - os.Exit(1) - } - - for _, v := range []string{"method_call", "method_return", "error", "signal"} { - call := conn.BusObject().Call("org.freedesktop.DBus.AddMatch", 0, - "eavesdrop='true',type='"+v+"'") - if call.Err != nil { - fmt.Fprintln(os.Stderr, "Failed to add match:", call.Err) - os.Exit(1) - } - } - c := make(chan *dbus.Message, 10) - conn.Eavesdrop(c) - fmt.Println("Listening for everything") - for v := range c { - fmt.Println(v) - } -} diff --git a/third_party/github.com/guelfey/go.dbus/_examples/introspect.go b/third_party/github.com/guelfey/go.dbus/_examples/introspect.go deleted file mode 100644 index 5ccdcaf..0000000 --- a/third_party/github.com/guelfey/go.dbus/_examples/introspect.go +++ /dev/null @@ -1,21 +0,0 @@ -package main - -import ( - "encoding/json" - "github.com/coreos/coreos-cloudinit/third_party/github.com/guelfey/go.dbus" - "github.com/coreos/coreos-cloudinit/third_party/github.com/guelfey/go.dbus/introspect" - "os" -) - -func main() { - conn, err := dbus.SessionBus() - if err != nil { - panic(err) - } - node, err := introspect.Call(conn.Object("org.freedesktop.DBus", "/org/freedesktop/DBus")) - if err != nil { - panic(err) - } - data, _ := json.MarshalIndent(node, "", " ") - os.Stdout.Write(data) -} diff --git a/third_party/github.com/guelfey/go.dbus/_examples/list-names.go b/third_party/github.com/guelfey/go.dbus/_examples/list-names.go deleted file mode 100644 index 8cf7403..0000000 --- a/third_party/github.com/guelfey/go.dbus/_examples/list-names.go +++ /dev/null @@ -1,27 +0,0 @@ -package main - -import ( - "fmt" - "github.com/coreos/coreos-cloudinit/third_party/github.com/guelfey/go.dbus" - "os" -) - -func main() { - conn, err := dbus.SessionBus() - if err != nil { - fmt.Fprintln(os.Stderr, "Failed to connect to session bus:", err) - os.Exit(1) - } - - var s []string - err = conn.BusObject().Call("org.freedesktop.DBus.ListNames", 0).Store(&s) - if err != nil { - fmt.Fprintln(os.Stderr, "Failed to get list of owned names:", err) - os.Exit(1) - } - - fmt.Println("Currently owned names on the session bus:") - for _, v := range s { - fmt.Println(v) - } -} diff --git a/third_party/github.com/guelfey/go.dbus/_examples/notification.go b/third_party/github.com/guelfey/go.dbus/_examples/notification.go deleted file mode 100644 index b627383..0000000 --- a/third_party/github.com/guelfey/go.dbus/_examples/notification.go +++ /dev/null @@ -1,17 +0,0 @@ -package main - -import "github.com/coreos/coreos-cloudinit/third_party/github.com/guelfey/go.dbus" - -func main() { - conn, err := dbus.SessionBus() - if err != nil { - panic(err) - } - obj := conn.Object("org.freedesktop.Notifications", "/org/freedesktop/Notifications") - call := obj.Call("org.freedesktop.Notifications.Notify", 0, "", uint32(0), - "", "Test", "This is a test of the DBus bindings for go.", []string{}, - map[string]dbus.Variant{}, int32(5000)) - if call.Err != nil { - panic(call.Err) - } -} diff --git a/third_party/github.com/guelfey/go.dbus/_examples/prop.go b/third_party/github.com/guelfey/go.dbus/_examples/prop.go deleted file mode 100644 index 5e347f3..0000000 --- a/third_party/github.com/guelfey/go.dbus/_examples/prop.go +++ /dev/null @@ -1,68 +0,0 @@ -package main - -import ( - "fmt" - "github.com/coreos/coreos-cloudinit/third_party/github.com/guelfey/go.dbus" - "github.com/coreos/coreos-cloudinit/third_party/github.com/guelfey/go.dbus/introspect" - "github.com/coreos/coreos-cloudinit/third_party/github.com/guelfey/go.dbus/prop" - "os" -) - -type foo string - -func (f foo) Foo() (string, *dbus.Error) { - fmt.Println(f) - return string(f), nil -} - -func main() { - conn, err := dbus.SessionBus() - if err != nil { - panic(err) - } - reply, err := conn.RequestName("com.github.guelfey.Demo", - dbus.NameFlagDoNotQueue) - if err != nil { - panic(err) - } - if reply != dbus.RequestNameReplyPrimaryOwner { - fmt.Fprintln(os.Stderr, "name already taken") - os.Exit(1) - } - propsSpec := map[string]map[string]*prop.Prop{ - "com.github.guelfey.Demo": { - "SomeInt": { - int32(0), - true, - prop.EmitTrue, - func(c *prop.Change) *dbus.Error { - fmt.Println(c.Name, "changed to", c.Value) - return nil - }, - }, - }, - } - f := foo("Bar") - conn.Export(f, "/com/github/guelfey/Demo", "com.github.guelfey.Demo") - props := prop.New(conn, "/com/github/guelfey/Demo", propsSpec) - n := &introspect.Node{ - Name: "/com/github/guelfey/Demo", - Interfaces: []introspect.Interface{ - introspect.IntrospectData, - prop.IntrospectData, - { - Name: "com.github.guelfey.Demo", - Methods: introspect.Methods(f), - Properties: props.Introspection("com.github.guelfey.Demo"), - }, - }, - } - conn.Export(introspect.NewIntrospectable(n), "/com/github/guelfey/Demo", - "org.freedesktop.DBus.Introspectable") - fmt.Println("Listening on com.github.guelfey.Demo / /com/github/guelfey/Demo ...") - - c := make(chan *dbus.Signal) - conn.Signal(c) - for _ = range c { - } -} diff --git a/third_party/github.com/guelfey/go.dbus/_examples/server.go b/third_party/github.com/guelfey/go.dbus/_examples/server.go deleted file mode 100644 index 84bd0db..0000000 --- a/third_party/github.com/guelfey/go.dbus/_examples/server.go +++ /dev/null @@ -1,45 +0,0 @@ -package main - -import ( - "fmt" - "github.com/coreos/coreos-cloudinit/third_party/github.com/guelfey/go.dbus" - "github.com/coreos/coreos-cloudinit/third_party/github.com/guelfey/go.dbus/introspect" - "os" -) - -const intro = ` - - - - - - ` + introspect.IntrospectDataString + ` ` - -type foo string - -func (f foo) Foo() (string, *dbus.Error) { - fmt.Println(f) - return string(f), nil -} - -func main() { - conn, err := dbus.SessionBus() - if err != nil { - panic(err) - } - reply, err := conn.RequestName("com.github.guelfey.Demo", - dbus.NameFlagDoNotQueue) - if err != nil { - panic(err) - } - if reply != dbus.RequestNameReplyPrimaryOwner { - fmt.Fprintln(os.Stderr, "name already taken") - os.Exit(1) - } - f := foo("Bar!") - conn.Export(f, "/com/github/guelfey/Demo", "com.github.guelfey.Demo") - conn.Export(introspect.Introspectable(intro), "/com/github/guelfey/Demo", - "org.freedesktop.DBus.Introspectable") - fmt.Println("Listening on com.github.guelfey.Demo / /com/github/guelfey/Demo ...") - select {} -} diff --git a/third_party/github.com/guelfey/go.dbus/_examples/signal.go b/third_party/github.com/guelfey/go.dbus/_examples/signal.go deleted file mode 100644 index 5784aa9..0000000 --- a/third_party/github.com/guelfey/go.dbus/_examples/signal.go +++ /dev/null @@ -1,24 +0,0 @@ -package main - -import ( - "fmt" - "github.com/coreos/coreos-cloudinit/third_party/github.com/guelfey/go.dbus" - "os" -) - -func main() { - conn, err := dbus.SessionBus() - if err != nil { - fmt.Fprintln(os.Stderr, "Failed to connect to session bus:", err) - os.Exit(1) - } - - conn.BusObject().Call("org.freedesktop.DBus.AddMatch", 0, - "type='signal',path='/org/freedesktop/DBus',interface='org.freedesktop.DBus',sender='org.freedesktop.DBus'") - - c := make(chan *dbus.Signal, 10) - conn.Signal(c) - for v := range c { - fmt.Println(v) - } -} diff --git a/third_party/github.com/tarm/goserial/basic_test.go b/third_party/github.com/tarm/goserial/basic_test.go deleted file mode 100644 index f6532ba..0000000 --- a/third_party/github.com/tarm/goserial/basic_test.go +++ /dev/null @@ -1,39 +0,0 @@ -package serial - -import ( - "testing" -) - -func TestConnection(t *testing.T) { - if testing.Short() { - return - } - c0 := &Config{Name: "COM5", Baud: 115200} - - /* - c1 := new(Config) - c1.Name = "COM5" - c1.Baud = 115200 - */ - - s, err := OpenPort(c0) - if err != nil { - t.Fatal(err) - } - - _, err = s.Write([]byte("test")) - if err != nil { - t.Fatal(err) - } - - buf := make([]byte, 128) - _, err = s.Read(buf) - if err != nil { - t.Fatal(err) - } -} - -// BUG(tarmigan): Add loopback test -func TestLoopback(t *testing.T) { - -}