From 7b05eebe6a66ab7c0a2c6ec391b4f97aa56463b7 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sun, 22 May 2016 15:04:37 +0200 Subject: [PATCH] Initial version --- .gitignore | 1 + .travis.yml | 9 + Godeps/Godeps.json | 168 + Godeps/Readme | 5 + Makefile | 9 + bindata.go | 235 ++ config.example.yaml | 172 ++ configfile.go | 328 ++ configfile_test.go | 245 ++ duplicity_backup_suite_test.go | 13 + help.txt | 22 + main.go | 168 + .../Luzifer/go_helpers/which/which.go | 54 + vendor/github.com/Luzifer/rconfig/.travis.yml | 8 + vendor/github.com/Luzifer/rconfig/LICENSE | 13 + vendor/github.com/Luzifer/rconfig/README.md | 94 + vendor/github.com/Luzifer/rconfig/config.go | 314 ++ .../Luzifer/rconfig/vardefault_providers.go | 27 + .../asaskevich/govalidator/.travis.yml | 14 + .../github.com/asaskevich/govalidator/LICENSE | 21 + .../asaskevich/govalidator/README.md | 398 +++ .../asaskevich/govalidator/arrays.go | 58 + .../asaskevich/govalidator/converter.go | 49 + .../asaskevich/govalidator/error.go | 31 + .../asaskevich/govalidator/numerics.go | 57 + .../asaskevich/govalidator/patterns.go | 83 + .../asaskevich/govalidator/types.go | 378 +++ .../asaskevich/govalidator/utils.go | 213 ++ .../asaskevich/govalidator/validator.go | 921 ++++++ .../asaskevich/govalidator/wercker.yml | 15 + .../github.com/mitchellh/go-homedir/LICENSE | 21 + .../github.com/mitchellh/go-homedir/README.md | 14 + .../mitchellh/go-homedir/homedir.go | 132 + .../github.com/nightlyone/lockfile/.gitignore | 27 + .../nightlyone/lockfile/.gitmodules | 3 + .../nightlyone/lockfile/.travis.yml | 2 + vendor/github.com/nightlyone/lockfile/LICENSE | 19 + .../github.com/nightlyone/lockfile/README.md | 52 + .../nightlyone/lockfile/appveyor.yml | 12 + .../nightlyone/lockfile/lockfile.go | 125 + .../nightlyone/lockfile/lockfile_unix.go | 28 + .../nightlyone/lockfile/lockfile_windows.go | 32 + vendor/github.com/onsi/ginkgo/.gitignore | 4 + vendor/github.com/onsi/ginkgo/.travis.yml | 15 + vendor/github.com/onsi/ginkgo/CHANGELOG.md | 136 + vendor/github.com/onsi/ginkgo/LICENSE | 20 + vendor/github.com/onsi/ginkgo/README.md | 115 + .../github.com/onsi/ginkgo/config/config.go | 170 ++ vendor/github.com/onsi/ginkgo/ginkgo_dsl.go | 536 ++++ .../internal/codelocation/code_location.go | 32 + .../internal/containernode/container_node.go | 151 + .../onsi/ginkgo/internal/failer/failer.go | 92 + .../ginkgo/internal/leafnodes/benchmarker.go | 95 + .../ginkgo/internal/leafnodes/interfaces.go | 19 + .../onsi/ginkgo/internal/leafnodes/it_node.go | 46 + .../ginkgo/internal/leafnodes/measure_node.go | 61 + .../onsi/ginkgo/internal/leafnodes/runner.go | 113 + .../ginkgo/internal/leafnodes/setup_nodes.go | 41 + .../ginkgo/internal/leafnodes/suite_nodes.go | 54 + .../synchronized_after_suite_node.go | 89 + .../synchronized_before_suite_node.go | 182 ++ .../onsi/ginkgo/internal/remote/aggregator.go | 250 ++ .../internal/remote/forwarding_reporter.go | 90 + .../internal/remote/output_interceptor.go | 10 + .../remote/output_interceptor_unix.go | 52 + .../internal/remote/output_interceptor_win.go | 33 + .../onsi/ginkgo/internal/remote/server.go | 204 ++ .../ginkgo/internal/spec/index_computer.go | 55 + .../onsi/ginkgo/internal/spec/spec.go | 197 ++ .../onsi/ginkgo/internal/spec/specs.go | 122 + .../ginkgo/internal/specrunner/random_id.go | 15 + .../ginkgo/internal/specrunner/spec_runner.go | 324 ++ .../onsi/ginkgo/internal/suite/suite.go | 171 ++ .../internal/testingtproxy/testing_t_proxy.go | 76 + .../ginkgo/internal/writer/fake_writer.go | 31 + .../onsi/ginkgo/internal/writer/writer.go | 71 + .../onsi/ginkgo/reporters/default_reporter.go | 83 + .../onsi/ginkgo/reporters/fake_reporter.go | 59 + .../onsi/ginkgo/reporters/junit_reporter.go | 139 + .../onsi/ginkgo/reporters/reporter.go | 15 + .../reporters/stenographer/console_logging.go | 64 + .../stenographer/fake_stenographer.go | 138 + .../reporters/stenographer/stenographer.go | 542 ++++ .../ginkgo/reporters/teamcity_reporter.go | 92 + .../onsi/ginkgo/types/code_location.go | 15 + .../onsi/ginkgo/types/synchronization.go | 30 + vendor/github.com/onsi/ginkgo/types/types.go | 143 + vendor/github.com/onsi/gomega/.gitignore | 3 + vendor/github.com/onsi/gomega/.travis.yml | 11 + vendor/github.com/onsi/gomega/CHANGELOG.md | 68 + vendor/github.com/onsi/gomega/LICENSE | 20 + vendor/github.com/onsi/gomega/README.md | 17 + .../github.com/onsi/gomega/format/format.go | 276 ++ vendor/github.com/onsi/gomega/gomega_dsl.go | 335 ++ .../gomega/internal/assertion/assertion.go | 98 + .../asyncassertion/async_assertion.go | 197 ++ .../testingtsupport/testing_t_support.go | 40 + vendor/github.com/onsi/gomega/matchers.go | 345 +++ .../matchers/assignable_to_type_of_matcher.go | 31 + .../onsi/gomega/matchers/be_a_directory.go | 54 + .../onsi/gomega/matchers/be_a_regular_file.go | 54 + .../gomega/matchers/be_an_existing_file.go | 38 + .../onsi/gomega/matchers/be_closed_matcher.go | 45 + .../onsi/gomega/matchers/be_empty_matcher.go | 26 + .../matchers/be_equivalent_to_matcher.go | 33 + .../onsi/gomega/matchers/be_false_matcher.go | 25 + .../onsi/gomega/matchers/be_nil_matcher.go | 18 + .../gomega/matchers/be_numerically_matcher.go | 119 + .../onsi/gomega/matchers/be_sent_matcher.go | 71 + .../gomega/matchers/be_temporally_matcher.go | 65 + .../onsi/gomega/matchers/be_true_matcher.go | 25 + .../onsi/gomega/matchers/be_zero_matcher.go | 27 + .../onsi/gomega/matchers/consist_of.go | 80 + .../matchers/contain_element_matcher.go | 56 + .../matchers/contain_substring_matcher.go | 37 + .../onsi/gomega/matchers/equal_matcher.go | 27 + .../onsi/gomega/matchers/have_key_matcher.go | 53 + .../matchers/have_key_with_value_matcher.go | 73 + .../onsi/gomega/matchers/have_len_matcher.go | 27 + .../gomega/matchers/have_occurred_matcher.go | 29 + .../gomega/matchers/have_prefix_matcher.go | 35 + .../gomega/matchers/have_suffix_matcher.go | 35 + .../gomega/matchers/match_error_matcher.go | 50 + .../gomega/matchers/match_json_matcher.go | 61 + .../gomega/matchers/match_regexp_matcher.go | 42 + .../onsi/gomega/matchers/panic_matcher.go | 42 + .../onsi/gomega/matchers/receive_matcher.go | 126 + .../onsi/gomega/matchers/succeed_matcher.go | 30 + .../goraph/bipartitegraph/bipartitegraph.go | 41 + .../bipartitegraph/bipartitegraphmatching.go | 161 + .../matchers/support/goraph/edge/edge.go | 61 + .../matchers/support/goraph/node/node.go | 7 + .../matchers/support/goraph/util/util.go | 7 + .../onsi/gomega/matchers/type_support.go | 165 + vendor/github.com/onsi/gomega/types/types.go | 17 + vendor/github.com/spf13/pflag/.travis.yml | 17 + vendor/github.com/spf13/pflag/LICENSE | 28 + vendor/github.com/spf13/pflag/README.md | 256 ++ vendor/github.com/spf13/pflag/bool.go | 97 + vendor/github.com/spf13/pflag/count.go | 97 + vendor/github.com/spf13/pflag/duration.go | 86 + vendor/github.com/spf13/pflag/flag.go | 836 +++++ vendor/github.com/spf13/pflag/float32.go | 91 + vendor/github.com/spf13/pflag/float64.go | 87 + vendor/github.com/spf13/pflag/golangflag.go | 97 + vendor/github.com/spf13/pflag/int.go | 87 + vendor/github.com/spf13/pflag/int32.go | 91 + vendor/github.com/spf13/pflag/int64.go | 87 + vendor/github.com/spf13/pflag/int8.go | 91 + vendor/github.com/spf13/pflag/int_slice.go | 128 + vendor/github.com/spf13/pflag/ip.go | 96 + vendor/github.com/spf13/pflag/ipmask.go | 122 + vendor/github.com/spf13/pflag/ipnet.go | 100 + vendor/github.com/spf13/pflag/string.go | 82 + vendor/github.com/spf13/pflag/string_slice.go | 105 + vendor/github.com/spf13/pflag/uint.go | 91 + vendor/github.com/spf13/pflag/uint16.go | 89 + vendor/github.com/spf13/pflag/uint32.go | 89 + vendor/github.com/spf13/pflag/uint64.go | 91 + vendor/github.com/spf13/pflag/uint8.go | 91 + vendor/gopkg.in/yaml.v2/LICENSE | 188 ++ vendor/gopkg.in/yaml.v2/LICENSE.libyaml | 31 + vendor/gopkg.in/yaml.v2/README.md | 131 + vendor/gopkg.in/yaml.v2/apic.go | 742 +++++ vendor/gopkg.in/yaml.v2/decode.go | 683 +++++ vendor/gopkg.in/yaml.v2/emitterc.go | 1685 ++++++++++ vendor/gopkg.in/yaml.v2/encode.go | 306 ++ vendor/gopkg.in/yaml.v2/parserc.go | 1096 +++++++ vendor/gopkg.in/yaml.v2/readerc.go | 391 +++ vendor/gopkg.in/yaml.v2/resolve.go | 203 ++ vendor/gopkg.in/yaml.v2/scannerc.go | 2710 +++++++++++++++++ vendor/gopkg.in/yaml.v2/sorter.go | 104 + vendor/gopkg.in/yaml.v2/writerc.go | 89 + vendor/gopkg.in/yaml.v2/yaml.go | 346 +++ vendor/gopkg.in/yaml.v2/yamlh.go | 716 +++++ vendor/gopkg.in/yaml.v2/yamlprivateh.go | 173 ++ 176 files changed, 25611 insertions(+) create mode 100644 .gitignore create mode 100644 .travis.yml create mode 100644 Godeps/Godeps.json create mode 100644 Godeps/Readme create mode 100644 Makefile create mode 100644 bindata.go create mode 100644 config.example.yaml create mode 100644 configfile.go create mode 100644 configfile_test.go create mode 100644 duplicity_backup_suite_test.go create mode 100644 help.txt create mode 100644 main.go create mode 100644 vendor/github.com/Luzifer/go_helpers/which/which.go create mode 100644 vendor/github.com/Luzifer/rconfig/.travis.yml create mode 100644 vendor/github.com/Luzifer/rconfig/LICENSE create mode 100644 vendor/github.com/Luzifer/rconfig/README.md create mode 100644 vendor/github.com/Luzifer/rconfig/config.go create mode 100644 vendor/github.com/Luzifer/rconfig/vardefault_providers.go create mode 100644 vendor/github.com/asaskevich/govalidator/.travis.yml create mode 100644 vendor/github.com/asaskevich/govalidator/LICENSE create mode 100644 vendor/github.com/asaskevich/govalidator/README.md create mode 100644 vendor/github.com/asaskevich/govalidator/arrays.go create mode 100644 vendor/github.com/asaskevich/govalidator/converter.go create mode 100644 vendor/github.com/asaskevich/govalidator/error.go create mode 100644 vendor/github.com/asaskevich/govalidator/numerics.go create mode 100644 vendor/github.com/asaskevich/govalidator/patterns.go create mode 100644 vendor/github.com/asaskevich/govalidator/types.go create mode 100644 vendor/github.com/asaskevich/govalidator/utils.go create mode 100644 vendor/github.com/asaskevich/govalidator/validator.go create mode 100644 vendor/github.com/asaskevich/govalidator/wercker.yml create mode 100644 vendor/github.com/mitchellh/go-homedir/LICENSE create mode 100644 vendor/github.com/mitchellh/go-homedir/README.md create mode 100644 vendor/github.com/mitchellh/go-homedir/homedir.go create mode 100644 vendor/github.com/nightlyone/lockfile/.gitignore create mode 100644 vendor/github.com/nightlyone/lockfile/.gitmodules create mode 100644 vendor/github.com/nightlyone/lockfile/.travis.yml create mode 100644 vendor/github.com/nightlyone/lockfile/LICENSE create mode 100644 vendor/github.com/nightlyone/lockfile/README.md create mode 100644 vendor/github.com/nightlyone/lockfile/appveyor.yml create mode 100644 vendor/github.com/nightlyone/lockfile/lockfile.go create mode 100644 vendor/github.com/nightlyone/lockfile/lockfile_unix.go create mode 100644 vendor/github.com/nightlyone/lockfile/lockfile_windows.go create mode 100644 vendor/github.com/onsi/ginkgo/.gitignore create mode 100644 vendor/github.com/onsi/ginkgo/.travis.yml create mode 100644 vendor/github.com/onsi/ginkgo/CHANGELOG.md create mode 100644 vendor/github.com/onsi/ginkgo/LICENSE create mode 100644 vendor/github.com/onsi/ginkgo/README.md create mode 100644 vendor/github.com/onsi/ginkgo/config/config.go create mode 100644 vendor/github.com/onsi/ginkgo/ginkgo_dsl.go create mode 100644 vendor/github.com/onsi/ginkgo/internal/codelocation/code_location.go create mode 100644 vendor/github.com/onsi/ginkgo/internal/containernode/container_node.go create mode 100644 vendor/github.com/onsi/ginkgo/internal/failer/failer.go create mode 100644 vendor/github.com/onsi/ginkgo/internal/leafnodes/benchmarker.go create mode 100644 vendor/github.com/onsi/ginkgo/internal/leafnodes/interfaces.go create mode 100644 vendor/github.com/onsi/ginkgo/internal/leafnodes/it_node.go create mode 100644 vendor/github.com/onsi/ginkgo/internal/leafnodes/measure_node.go create mode 100644 vendor/github.com/onsi/ginkgo/internal/leafnodes/runner.go create mode 100644 vendor/github.com/onsi/ginkgo/internal/leafnodes/setup_nodes.go create mode 100644 vendor/github.com/onsi/ginkgo/internal/leafnodes/suite_nodes.go create mode 100644 vendor/github.com/onsi/ginkgo/internal/leafnodes/synchronized_after_suite_node.go create mode 100644 vendor/github.com/onsi/ginkgo/internal/leafnodes/synchronized_before_suite_node.go create mode 100644 vendor/github.com/onsi/ginkgo/internal/remote/aggregator.go create mode 100644 vendor/github.com/onsi/ginkgo/internal/remote/forwarding_reporter.go create mode 100644 vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor.go create mode 100644 vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor_unix.go create mode 100644 vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor_win.go create mode 100644 vendor/github.com/onsi/ginkgo/internal/remote/server.go create mode 100644 vendor/github.com/onsi/ginkgo/internal/spec/index_computer.go create mode 100644 vendor/github.com/onsi/ginkgo/internal/spec/spec.go create mode 100644 vendor/github.com/onsi/ginkgo/internal/spec/specs.go create mode 100644 vendor/github.com/onsi/ginkgo/internal/specrunner/random_id.go create mode 100644 vendor/github.com/onsi/ginkgo/internal/specrunner/spec_runner.go create mode 100644 vendor/github.com/onsi/ginkgo/internal/suite/suite.go create mode 100644 vendor/github.com/onsi/ginkgo/internal/testingtproxy/testing_t_proxy.go create mode 100644 vendor/github.com/onsi/ginkgo/internal/writer/fake_writer.go create mode 100644 vendor/github.com/onsi/ginkgo/internal/writer/writer.go create mode 100644 vendor/github.com/onsi/ginkgo/reporters/default_reporter.go create mode 100644 vendor/github.com/onsi/ginkgo/reporters/fake_reporter.go create mode 100644 vendor/github.com/onsi/ginkgo/reporters/junit_reporter.go create mode 100644 vendor/github.com/onsi/ginkgo/reporters/reporter.go create mode 100644 vendor/github.com/onsi/ginkgo/reporters/stenographer/console_logging.go create mode 100644 vendor/github.com/onsi/ginkgo/reporters/stenographer/fake_stenographer.go create mode 100644 vendor/github.com/onsi/ginkgo/reporters/stenographer/stenographer.go create mode 100644 vendor/github.com/onsi/ginkgo/reporters/teamcity_reporter.go create mode 100644 vendor/github.com/onsi/ginkgo/types/code_location.go create mode 100644 vendor/github.com/onsi/ginkgo/types/synchronization.go create mode 100644 vendor/github.com/onsi/ginkgo/types/types.go create mode 100644 vendor/github.com/onsi/gomega/.gitignore create mode 100644 vendor/github.com/onsi/gomega/.travis.yml create mode 100644 vendor/github.com/onsi/gomega/CHANGELOG.md create mode 100644 vendor/github.com/onsi/gomega/LICENSE create mode 100644 vendor/github.com/onsi/gomega/README.md create mode 100644 vendor/github.com/onsi/gomega/format/format.go create mode 100644 vendor/github.com/onsi/gomega/gomega_dsl.go create mode 100644 vendor/github.com/onsi/gomega/internal/assertion/assertion.go create mode 100644 vendor/github.com/onsi/gomega/internal/asyncassertion/async_assertion.go create mode 100644 vendor/github.com/onsi/gomega/internal/testingtsupport/testing_t_support.go create mode 100644 vendor/github.com/onsi/gomega/matchers.go create mode 100644 vendor/github.com/onsi/gomega/matchers/assignable_to_type_of_matcher.go create mode 100644 vendor/github.com/onsi/gomega/matchers/be_a_directory.go create mode 100644 vendor/github.com/onsi/gomega/matchers/be_a_regular_file.go create mode 100644 vendor/github.com/onsi/gomega/matchers/be_an_existing_file.go create mode 100644 vendor/github.com/onsi/gomega/matchers/be_closed_matcher.go create mode 100644 vendor/github.com/onsi/gomega/matchers/be_empty_matcher.go create mode 100644 vendor/github.com/onsi/gomega/matchers/be_equivalent_to_matcher.go create mode 100644 vendor/github.com/onsi/gomega/matchers/be_false_matcher.go create mode 100644 vendor/github.com/onsi/gomega/matchers/be_nil_matcher.go create mode 100644 vendor/github.com/onsi/gomega/matchers/be_numerically_matcher.go create mode 100644 vendor/github.com/onsi/gomega/matchers/be_sent_matcher.go create mode 100644 vendor/github.com/onsi/gomega/matchers/be_temporally_matcher.go create mode 100644 vendor/github.com/onsi/gomega/matchers/be_true_matcher.go create mode 100644 vendor/github.com/onsi/gomega/matchers/be_zero_matcher.go create mode 100644 vendor/github.com/onsi/gomega/matchers/consist_of.go create mode 100644 vendor/github.com/onsi/gomega/matchers/contain_element_matcher.go create mode 100644 vendor/github.com/onsi/gomega/matchers/contain_substring_matcher.go create mode 100644 vendor/github.com/onsi/gomega/matchers/equal_matcher.go create mode 100644 vendor/github.com/onsi/gomega/matchers/have_key_matcher.go create mode 100644 vendor/github.com/onsi/gomega/matchers/have_key_with_value_matcher.go create mode 100644 vendor/github.com/onsi/gomega/matchers/have_len_matcher.go create mode 100644 vendor/github.com/onsi/gomega/matchers/have_occurred_matcher.go create mode 100644 vendor/github.com/onsi/gomega/matchers/have_prefix_matcher.go create mode 100644 vendor/github.com/onsi/gomega/matchers/have_suffix_matcher.go create mode 100644 vendor/github.com/onsi/gomega/matchers/match_error_matcher.go create mode 100644 vendor/github.com/onsi/gomega/matchers/match_json_matcher.go create mode 100644 vendor/github.com/onsi/gomega/matchers/match_regexp_matcher.go create mode 100644 vendor/github.com/onsi/gomega/matchers/panic_matcher.go create mode 100644 vendor/github.com/onsi/gomega/matchers/receive_matcher.go create mode 100644 vendor/github.com/onsi/gomega/matchers/succeed_matcher.go create mode 100644 vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraph.go create mode 100644 vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraphmatching.go create mode 100644 vendor/github.com/onsi/gomega/matchers/support/goraph/edge/edge.go create mode 100644 vendor/github.com/onsi/gomega/matchers/support/goraph/node/node.go create mode 100644 vendor/github.com/onsi/gomega/matchers/support/goraph/util/util.go create mode 100644 vendor/github.com/onsi/gomega/matchers/type_support.go create mode 100644 vendor/github.com/onsi/gomega/types/types.go create mode 100644 vendor/github.com/spf13/pflag/.travis.yml create mode 100644 vendor/github.com/spf13/pflag/LICENSE create mode 100644 vendor/github.com/spf13/pflag/README.md create mode 100644 vendor/github.com/spf13/pflag/bool.go create mode 100644 vendor/github.com/spf13/pflag/count.go create mode 100644 vendor/github.com/spf13/pflag/duration.go create mode 100644 vendor/github.com/spf13/pflag/flag.go create mode 100644 vendor/github.com/spf13/pflag/float32.go create mode 100644 vendor/github.com/spf13/pflag/float64.go create mode 100644 vendor/github.com/spf13/pflag/golangflag.go create mode 100644 vendor/github.com/spf13/pflag/int.go create mode 100644 vendor/github.com/spf13/pflag/int32.go create mode 100644 vendor/github.com/spf13/pflag/int64.go create mode 100644 vendor/github.com/spf13/pflag/int8.go create mode 100644 vendor/github.com/spf13/pflag/int_slice.go create mode 100644 vendor/github.com/spf13/pflag/ip.go create mode 100644 vendor/github.com/spf13/pflag/ipmask.go create mode 100644 vendor/github.com/spf13/pflag/ipnet.go create mode 100644 vendor/github.com/spf13/pflag/string.go create mode 100644 vendor/github.com/spf13/pflag/string_slice.go create mode 100644 vendor/github.com/spf13/pflag/uint.go create mode 100644 vendor/github.com/spf13/pflag/uint16.go create mode 100644 vendor/github.com/spf13/pflag/uint32.go create mode 100644 vendor/github.com/spf13/pflag/uint64.go create mode 100644 vendor/github.com/spf13/pflag/uint8.go create mode 100644 vendor/gopkg.in/yaml.v2/LICENSE create mode 100644 vendor/gopkg.in/yaml.v2/LICENSE.libyaml create mode 100644 vendor/gopkg.in/yaml.v2/README.md create mode 100644 vendor/gopkg.in/yaml.v2/apic.go create mode 100644 vendor/gopkg.in/yaml.v2/decode.go create mode 100644 vendor/gopkg.in/yaml.v2/emitterc.go create mode 100644 vendor/gopkg.in/yaml.v2/encode.go create mode 100644 vendor/gopkg.in/yaml.v2/parserc.go create mode 100644 vendor/gopkg.in/yaml.v2/readerc.go create mode 100644 vendor/gopkg.in/yaml.v2/resolve.go create mode 100644 vendor/gopkg.in/yaml.v2/scannerc.go create mode 100644 vendor/gopkg.in/yaml.v2/sorter.go create mode 100644 vendor/gopkg.in/yaml.v2/writerc.go create mode 100644 vendor/gopkg.in/yaml.v2/yaml.go create mode 100644 vendor/gopkg.in/yaml.v2/yamlh.go create mode 100644 vendor/gopkg.in/yaml.v2/yamlprivateh.go diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8d7b786 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +duplicity-backup diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..ceed82a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,9 @@ +language: go + +go: + - 1.5 + - 1.6 + - tip + +install: make setup-testenv +script: make test diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json new file mode 100644 index 0000000..f68e419 --- /dev/null +++ b/Godeps/Godeps.json @@ -0,0 +1,168 @@ +{ + "ImportPath": "github.com/Luzifer/duplicity-backup", + "GoVersion": "go1.6", + "GodepVersion": "v62", + "Deps": [ + { + "ImportPath": "github.com/Luzifer/go_helpers/which", + "Comment": "v1.3.0", + "Rev": "6abbbafaada02b63dd8f9e185921fd8b3c35b6c2" + }, + { + "ImportPath": "github.com/Luzifer/rconfig", + "Comment": "v1.0.3-2-g2677653", + "Rev": "26776536e61487fdffbd3ce87f827177a5903f98" + }, + { + "ImportPath": "github.com/asaskevich/govalidator", + "Comment": "v4-6-gdf81827", + "Rev": "df81827fdd59d8b4fb93d8910b286ab7a3919520" + }, + { + "ImportPath": "github.com/mitchellh/go-homedir", + "Rev": "981ab348d865cf048eb7d17e78ac7192632d8415" + }, + { + "ImportPath": "github.com/nightlyone/lockfile", + "Rev": "b30dcbfa86e3a1eaa4e6622de2ce57be2c138c10" + }, + { + "ImportPath": "github.com/onsi/ginkgo", + "Comment": "v1.2.0-14-g1b59c57", + "Rev": "1b59c57df76ede42c08590546916e6a18685857d" + }, + { + "ImportPath": "github.com/onsi/ginkgo/config", + "Comment": "v1.2.0-14-g1b59c57", + "Rev": "1b59c57df76ede42c08590546916e6a18685857d" + }, + { + "ImportPath": "github.com/onsi/ginkgo/internal/codelocation", + "Comment": "v1.2.0-14-g1b59c57", + "Rev": "1b59c57df76ede42c08590546916e6a18685857d" + }, + { + "ImportPath": "github.com/onsi/ginkgo/internal/containernode", + "Comment": "v1.2.0-14-g1b59c57", + "Rev": "1b59c57df76ede42c08590546916e6a18685857d" + }, + { + "ImportPath": "github.com/onsi/ginkgo/internal/failer", + "Comment": "v1.2.0-14-g1b59c57", + "Rev": "1b59c57df76ede42c08590546916e6a18685857d" + }, + { + "ImportPath": "github.com/onsi/ginkgo/internal/leafnodes", + "Comment": "v1.2.0-14-g1b59c57", + "Rev": "1b59c57df76ede42c08590546916e6a18685857d" + }, + { + "ImportPath": "github.com/onsi/ginkgo/internal/remote", + "Comment": "v1.2.0-14-g1b59c57", + "Rev": "1b59c57df76ede42c08590546916e6a18685857d" + }, + { + "ImportPath": "github.com/onsi/ginkgo/internal/spec", + "Comment": "v1.2.0-14-g1b59c57", + "Rev": "1b59c57df76ede42c08590546916e6a18685857d" + }, + { + "ImportPath": "github.com/onsi/ginkgo/internal/specrunner", + "Comment": "v1.2.0-14-g1b59c57", + "Rev": "1b59c57df76ede42c08590546916e6a18685857d" + }, + { + "ImportPath": "github.com/onsi/ginkgo/internal/suite", + "Comment": "v1.2.0-14-g1b59c57", + "Rev": "1b59c57df76ede42c08590546916e6a18685857d" + }, + { + "ImportPath": "github.com/onsi/ginkgo/internal/testingtproxy", + "Comment": "v1.2.0-14-g1b59c57", + "Rev": "1b59c57df76ede42c08590546916e6a18685857d" + }, + { + "ImportPath": "github.com/onsi/ginkgo/internal/writer", + "Comment": "v1.2.0-14-g1b59c57", + "Rev": "1b59c57df76ede42c08590546916e6a18685857d" + }, + { + "ImportPath": "github.com/onsi/ginkgo/reporters", + "Comment": "v1.2.0-14-g1b59c57", + "Rev": "1b59c57df76ede42c08590546916e6a18685857d" + }, + { + "ImportPath": "github.com/onsi/ginkgo/reporters/stenographer", + "Comment": "v1.2.0-14-g1b59c57", + "Rev": "1b59c57df76ede42c08590546916e6a18685857d" + }, + { + "ImportPath": "github.com/onsi/ginkgo/types", + "Comment": "v1.2.0-14-g1b59c57", + "Rev": "1b59c57df76ede42c08590546916e6a18685857d" + }, + { + "ImportPath": "github.com/onsi/gomega", + "Comment": "v1.0-55-g6331bf5", + "Rev": "6331bf5a5b5e7a832348789eb3cedff7a6917103" + }, + { + "ImportPath": "github.com/onsi/gomega/format", + "Comment": "v1.0-55-g6331bf5", + "Rev": "6331bf5a5b5e7a832348789eb3cedff7a6917103" + }, + { + "ImportPath": "github.com/onsi/gomega/internal/assertion", + "Comment": "v1.0-55-g6331bf5", + "Rev": "6331bf5a5b5e7a832348789eb3cedff7a6917103" + }, + { + "ImportPath": "github.com/onsi/gomega/internal/asyncassertion", + "Comment": "v1.0-55-g6331bf5", + "Rev": "6331bf5a5b5e7a832348789eb3cedff7a6917103" + }, + { + "ImportPath": "github.com/onsi/gomega/internal/testingtsupport", + "Comment": "v1.0-55-g6331bf5", + "Rev": "6331bf5a5b5e7a832348789eb3cedff7a6917103" + }, + { + "ImportPath": "github.com/onsi/gomega/matchers", + "Comment": "v1.0-55-g6331bf5", + "Rev": "6331bf5a5b5e7a832348789eb3cedff7a6917103" + }, + { + "ImportPath": "github.com/onsi/gomega/matchers/support/goraph/bipartitegraph", + "Comment": "v1.0-55-g6331bf5", + "Rev": "6331bf5a5b5e7a832348789eb3cedff7a6917103" + }, + { + "ImportPath": "github.com/onsi/gomega/matchers/support/goraph/edge", + "Comment": "v1.0-55-g6331bf5", + "Rev": "6331bf5a5b5e7a832348789eb3cedff7a6917103" + }, + { + "ImportPath": "github.com/onsi/gomega/matchers/support/goraph/node", + "Comment": "v1.0-55-g6331bf5", + "Rev": "6331bf5a5b5e7a832348789eb3cedff7a6917103" + }, + { + "ImportPath": "github.com/onsi/gomega/matchers/support/goraph/util", + "Comment": "v1.0-55-g6331bf5", + "Rev": "6331bf5a5b5e7a832348789eb3cedff7a6917103" + }, + { + "ImportPath": "github.com/onsi/gomega/types", + "Comment": "v1.0-55-g6331bf5", + "Rev": "6331bf5a5b5e7a832348789eb3cedff7a6917103" + }, + { + "ImportPath": "github.com/spf13/pflag", + "Rev": "b084184666e02084b8ccb9b704bf0d79c466eb1d" + }, + { + "ImportPath": "gopkg.in/yaml.v2", + "Rev": "53feefa2559fb8dfa8d81baad31be332c97d6c77" + } + ] +} 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/Makefile b/Makefile new file mode 100644 index 0000000..c9e2dd3 --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +bindata: + go-bindata help.txt + +setup-testenv: + go get github.com/onsi/ginkgo/ginkgo + go get github.com/onsi/gomega + +test: + $(GOPATH)/bin/ginkgo diff --git a/bindata.go b/bindata.go new file mode 100644 index 0000000..dcc815a --- /dev/null +++ b/bindata.go @@ -0,0 +1,235 @@ +// Code generated by go-bindata. +// sources: +// help.txt +// DO NOT EDIT! + +package main + +import ( + "bytes" + "compress/gzip" + "fmt" + "io" + "io/ioutil" + "os" + "path/filepath" + "strings" + "time" +) + +func bindataRead(data []byte, name string) ([]byte, error) { + gz, err := gzip.NewReader(bytes.NewBuffer(data)) + if err != nil { + return nil, fmt.Errorf("Read %q: %v", name, err) + } + + var buf bytes.Buffer + _, err = io.Copy(&buf, gz) + clErr := gz.Close() + + if err != nil { + return nil, fmt.Errorf("Read %q: %v", name, err) + } + if clErr != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +type asset struct { + bytes []byte + info os.FileInfo +} + +type bindataFileInfo struct { + name string + size int64 + mode os.FileMode + modTime time.Time +} + +func (fi bindataFileInfo) Name() string { + return fi.name +} +func (fi bindataFileInfo) Size() int64 { + return fi.size +} +func (fi bindataFileInfo) Mode() os.FileMode { + return fi.mode +} +func (fi bindataFileInfo) ModTime() time.Time { + return fi.modTime +} +func (fi bindataFileInfo) IsDir() bool { + return false +} +func (fi bindataFileInfo) Sys() interface{} { + return nil +} + +var _helpTxt = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xac\x93\x3f\x73\xdb\x30\x0c\xc5\x77\x7d\x0a\x8c\xed\xa0\x64\xcf\xd6\x8b\x2f\x53\x87\x5e\x7b\xbd\x0e\x3e\x0f\x30\x05\x49\xbc\xd0\xa4\x0e\x04\x93\xda\x43\x3f\x7b\xc1\x3f\x76\xe4\xa4\xde\xca\x4d\xe4\xc3\x8f\x4f\x8f\xc0\x2f\xc6\x65\x21\x06\xe4\x90\xfc\x00\x43\x5a\x9c\x35\x56\x8e\x20\x01\x0c\x13\x0a\xc1\x1e\xcd\x73\x5a\xe0\xd5\xca\x0c\x8e\x62\x84\x19\x4f\x27\x47\x5d\xf7\x33\xe2\x44\x0f\x1d\xbc\x55\xf5\x4d\xbb\x35\xe1\x70\x40\x3f\xec\xba\xee\xcb\x0b\x5a\x87\x7b\x47\xf0\x58\xf7\x62\xae\x68\xba\x1b\xeb\xf1\xea\x62\x34\x26\xf0\x60\xfd\x94\x3d\xc9\x7c\xd9\xe7\xa4\x6e\x94\x65\x1c\xa1\xbf\x09\xdb\x90\x23\x65\xe5\x3a\xfa\x2d\x8c\x9e\x42\x8a\xab\xff\x1c\x6d\xa5\x38\x1b\xa5\x37\x89\x99\xbc\xf4\x65\x73\x4d\xf9\xaa\xa7\xb1\x40\xea\x91\x09\x5e\xd0\x7a\x1a\xc0\xfa\x95\x27\xe5\x30\x45\x09\x4c\xb0\xcd\x42\x58\x50\xe6\x1d\x6c\x05\x79\x22\xd9\x01\x7c\xaf\xa7\x11\xa2\xfe\x8f\xab\x34\xb8\x87\xc1\x72\xf9\xb9\x22\xcb\x5f\x64\x54\x76\x5c\xe3\x2e\x88\xf5\xba\xe0\xe8\x85\xf8\x28\xf3\x39\xa4\x8f\x9c\x28\x28\x29\xde\x0a\xfc\x47\xd2\xa7\x61\x7b\xaa\x39\x35\x6d\x18\xaf\xd2\xa6\x25\x44\xdb\x68\x7a\x9b\x1d\x8f\x37\x9f\x2f\x1c\x16\xcc\xae\x5a\x69\x0e\x4b\x53\x8d\x80\x93\x66\x16\x05\x5c\x30\xe8\x5a\xf2\xdd\x93\xc3\xa9\xf4\x44\xdf\xab\x70\xb4\x53\xdf\x42\xe9\xc7\x6b\x68\x3e\x4b\x8c\x62\x83\x87\x31\x68\x60\xb3\x5d\x3f\xe4\x6b\xed\xe4\xee\x96\xab\xf3\xfa\xb4\xa1\x11\x93\x93\x07\xf8\x73\x7f\x57\x6f\xbc\x7f\xdf\xc0\x77\x47\x3c\xb8\xcf\xc5\x93\x7a\x7d\xbe\x38\x72\xd7\xa8\xa7\xbc\xad\x79\xcf\xc1\x0d\x25\xab\x2c\x7e\xf3\xd6\x1c\x69\xdf\x91\x49\xd9\xf6\xff\xf1\x96\x2f\xa9\xde\x06\xda\xa7\x29\xfb\x1a\x3e\xa2\xbe\xb1\xf5\xb2\x8a\xa7\x4d\x64\xcc\x7e\x43\x92\x25\x49\x45\xb0\xf4\x9c\x7c\x86\xf8\xf7\x88\x4d\x00\x04\xd1\x16\x2b\x8a\x3c\xff\x5a\x08\x66\x46\x3f\x95\x91\xe9\x7b\xed\x83\x98\x9f\xe3\x5f\xab\x18\xa8\x33\xd3\xc6\x0a\x16\x0e\x13\xe3\x01\xce\x65\xea\x47\xc3\xb1\x12\xbb\xbf\x01\x00\x00\xff\xff\xd7\x01\xa8\x37\x87\x04\x00\x00") + +func helpTxtBytes() ([]byte, error) { + return bindataRead( + _helpTxt, + "help.txt", + ) +} + +func helpTxt() (*asset, error) { + bytes, err := helpTxtBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "help.txt", size: 1159, mode: os.FileMode(420), modTime: time.Unix(1463914687, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +// Asset loads and returns the asset for the given name. +// It returns an error if the asset could not be found or +// could not be loaded. +func Asset(name string) ([]byte, error) { + cannonicalName := strings.Replace(name, "\\", "/", -1) + if f, ok := _bindata[cannonicalName]; ok { + a, err := f() + if err != nil { + return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err) + } + return a.bytes, nil + } + return nil, fmt.Errorf("Asset %s not found", name) +} + +// MustAsset is like Asset but panics when Asset would return an error. +// It simplifies safe initialization of global variables. +func MustAsset(name string) []byte { + a, err := Asset(name) + if err != nil { + panic("asset: Asset(" + name + "): " + err.Error()) + } + + return a +} + +// AssetInfo loads and returns the asset info for the given name. +// It returns an error if the asset could not be found or +// could not be loaded. +func AssetInfo(name string) (os.FileInfo, error) { + cannonicalName := strings.Replace(name, "\\", "/", -1) + if f, ok := _bindata[cannonicalName]; ok { + a, err := f() + if err != nil { + return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err) + } + return a.info, nil + } + return nil, fmt.Errorf("AssetInfo %s not found", name) +} + +// AssetNames returns the names of the assets. +func AssetNames() []string { + names := make([]string, 0, len(_bindata)) + for name := range _bindata { + names = append(names, name) + } + return names +} + +// _bindata is a table, holding each asset generator, mapped to its name. +var _bindata = map[string]func() (*asset, error){ + "help.txt": helpTxt, +} + +// AssetDir returns the file names below a certain +// directory embedded in the file by go-bindata. +// For example if you run go-bindata on data/... and data contains the +// following hierarchy: +// data/ +// foo.txt +// img/ +// a.png +// b.png +// then AssetDir("data") would return []string{"foo.txt", "img"} +// AssetDir("data/img") would return []string{"a.png", "b.png"} +// AssetDir("foo.txt") and AssetDir("notexist") would return an error +// AssetDir("") will return []string{"data"}. +func AssetDir(name string) ([]string, error) { + node := _bintree + if len(name) != 0 { + cannonicalName := strings.Replace(name, "\\", "/", -1) + pathList := strings.Split(cannonicalName, "/") + for _, p := range pathList { + node = node.Children[p] + if node == nil { + return nil, fmt.Errorf("Asset %s not found", name) + } + } + } + if node.Func != nil { + return nil, fmt.Errorf("Asset %s not found", name) + } + rv := make([]string, 0, len(node.Children)) + for childName := range node.Children { + rv = append(rv, childName) + } + return rv, nil +} + +type bintree struct { + Func func() (*asset, error) + Children map[string]*bintree +} +var _bintree = &bintree{nil, map[string]*bintree{ + "help.txt": &bintree{helpTxt, map[string]*bintree{}}, +}} + +// RestoreAsset restores an asset under the given directory +func RestoreAsset(dir, name string) error { + data, err := Asset(name) + if err != nil { + return err + } + info, err := AssetInfo(name) + if err != nil { + return err + } + err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755)) + if err != nil { + return err + } + err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode()) + if err != nil { + return err + } + err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime()) + if err != nil { + return err + } + return nil +} + +// RestoreAssets restores an asset under the given directory recursively +func RestoreAssets(dir, name string) error { + children, err := AssetDir(name) + // File + if err != nil { + return RestoreAsset(dir, name) + } + // Dir + for _, child := range children { + err = RestoreAssets(dir, filepath.Join(name, child)) + if err != nil { + return err + } + } + return nil +} + +func _filePath(dir, name string) string { + cannonicalName := strings.Replace(name, "\\", "/", -1) + return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...) +} + diff --git a/config.example.yaml b/config.example.yaml new file mode 100644 index 0000000..a3032ce --- /dev/null +++ b/config.example.yaml @@ -0,0 +1,172 @@ +### +# Backup source +### +# +# Root of the backup to create. If no explicit excludes or includes are +# defined all files inside this directory will be backed up. +root: /home + +# Hostname for notifications (if left out the hostname of the machine +# is used for this. +#hostname: mystation + +### +# Backup destination +### +# +# Destination for the backup. Check the duplicity man-page for all +# possible destinations to use. +dest: s3+http://foobar-backup-bucket/backup-folder/ + +# Some examples of destinations usable for your backup: +#dest: ftp://user[:password]@other.host[:port]/some_dir +#dest: rsync://user@host.com[:port]//absolute_path +#dest: ssh://user[:password]@other.host[:port]/[/]some_dir + +# The "ftp_password" is used for several backends despite the options +# name. You can use this option instead of passing the password in the +# `dest` parameter as that one is visible in the process list during +# the backup is running. +#ftp_password: password + +### +# Amazon WebServices S3 configuration +### +# +# Uncomment the lines in this section if you're using Amazon S3 +aws: +# access_key_id: foobar_aws_key_id +# secret_access_key: foobar_aws_access_key + +# Without setting the storage class the standard storage is used. With +# this option you can switch to "infrequent access" (--s3-use-ia) or +# "reduced redundancy" (--s3-use-rrs) storage class. +# storage_class: --s3-use-ia + +### +# Google Cloud Storage configuration +### +# +# Uncomment the lines in this section if you're using GCS +google_cloud: +# access_key_id: foobar_gcs_key_id +# secret_access_key: foobar_gcs_secret_id + +### +# OpenStack Object Storage (Swift) configuration +### +# +# Uncomment the lines in this section if you're using OpenStack +swift: +# username: foobar_swift_tenant:foobar_swift_username +# password: foobar_swift_password +# auth_url: foobar_swift_authurl +# auth_version: 2 + +### +# Include list of directories +### +# +# Specify directories inside your `root` to backup only these ones +# You can't specify directories outside the root. If you want to backup +# all the data inside the root leave this list empty. +inclist: + - /home/myuser/projects + +### +# Exclude list of directories +### +# +# Specify directories inside your `root` to exclude these ones +# You can't specify directories outside the root. If you want to backup +# all the data inside the root leave this list empty. +exclist: + - /home/muser/projects/testproject + +### +# Other file selection options +### +# +# Instead managing the inclist / exclist parameters in this file you +# can write a text file containing lines with +/- patterns to include +# or exclude files and directories from the backup. +# See http://duplicity.nongnu.org/duplicity.1.html#sect9 for details +#incexcfile: /home/myuser/.config/backup-files.txt + +# Exclude all device files. This can be useful for security/permissions +# reasons or if rdiff-backup is not handling device files correctly. +#excdevicefiles: true + +### +# Encryption configuration +### +# +encryption: +# Enable / disable encryption of your backup. If you enable encryption +# you either need to specify a password or a GPG key. + enable: true + +# If you're using a `gpg_sign_key` to sign your backup this password is +# used to unlock the GPG key. If you're not using a GPG key it is used +# to symmetrically encrypt the backup. + passphrase: foobar_gpg_passphrase + +# Specify the GPG key(s) to use for encryption / signing the backup. +# You may use different keys for those tasks. If you specify a signing +# key you need to specify the password above to unlock the key. +# gpg_encryption_key: foobar_gpg_key +# gpg_sign_key: foobar_gpg_key + +# If you want to hide the GPG key IDs for security reasons you can +# enable this option. +# hide_key_id: true + +# You can specify the keyring which contains your above specified keys +# in case they are not present in the default keyring. +# secret_keyring: /home/myuser/.gnupg/duplicity.gpg + +### +# Static backup options +### +# +# Here you can specify other options for duplicity not handled in this +# configuration file. Reference is the manpage of duplicity. Please +# ensure you're specifying the options in command array format. +static_options: ["--full-if-older-than", "14D", "--s3-use-new-style"] + +### +# Backup cleanup options +### +# +cleanup: +# Chose the cleanup type and the configured value for that cleanup type: +# remove-older-than