From 0a8c8388563ab3c98f3d0d2e3ea619d27ce84716 Mon Sep 17 00:00:00 2001 From: Tristan Weir Date: Wed, 11 Jul 2018 10:14:54 -0700 Subject: [PATCH] Update occurrences outside of import statement --- .travis.yml | 2 +- Dockerfile | 10 ++-- Makefile | 90 ++++++++++++++--------------- doc/cheatsheet.rst | 2 +- doc/command_line.rst | 2 +- doc/configuration.rst | 28 ++++----- doc/loader.rst | 4 +- tools/compose/migagenthost1/run.sh | 2 +- tools/compose/migagenthost2/run.sh | 2 +- tools/compose/migagenthost3/run.sh | 2 +- tools/compose/migworkstation/run.sh | 6 +- tools/docker_start.sh | 10 ++-- version.go | 2 +- 13 files changed, 81 insertions(+), 81 deletions(-) diff --git a/.travis.yml b/.travis.yml index dd914370..3227256c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: go go: - 1.8 -go_import_path: mig.ninja/mig +go_import_path: github.com/mozilla/mig addons: postgresql: "9.5" notifications: diff --git a/Dockerfile b/Dockerfile index 3d4d6ab3..2bd22ea3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,11 +22,11 @@ USER mig # Build the various tools that are found in a typical MIG environment. RUN export GOPATH=/go && \ cd /go/src/mig.ninja/mig && \ - go install mig.ninja/mig/mig-agent && \ - go install mig.ninja/mig/mig-api && \ - go install mig.ninja/mig/mig-scheduler && \ - go install mig.ninja/mig/client/mig-console && \ - go install mig.ninja/mig/client/mig && \ + go install github.com/mozilla/mig/mig-agent && \ + go install github.com/mozilla/mig/mig-api && \ + go install github.com/mozilla/mig/mig-scheduler && \ + go install github.com/mozilla/mig/client/mig-console && \ + go install github.com/mozilla/mig/client/mig && \ cp /go/src/mig.ninja/mig/tools/docker_start.sh /mig/docker_start.sh && \ chmod +x /mig/docker_start.sh diff --git a/Makefile b/Makefile index 99ad0f5a..d4f33433 100644 --- a/Makefile +++ b/Makefile @@ -84,7 +84,7 @@ endif CGOLDFLAGS := GO := GOOS=$(OS) GOARCH=$(ARCH) GO15VENDOREXPERIMENT=1 go -MIGVERFLAGS := -X mig.ninja/mig.Version=$(BUILDREV) +MIGVERFLAGS := -X github.com/mozilla/mig.Version=$(BUILDREV) GOLDFLAGS := -ldflags "$(MIGVERFLAGS) $(STRIPOPT)" INSTALL := install SERVERTARGETS := mig-scheduler mig-api mig-runner runner-compliance runner-scribe @@ -123,7 +123,7 @@ create-bindir: mig-agent: create-bindir @echo building mig-agent for $(OS)/$(ARCH) - $(GO) build $(GOOPTS) -o $(BINDIR)/mig-agent-$(BUILDREV)$(BINSUFFIX) $(GOLDFLAGS) mig.ninja/mig/mig-agent + $(GO) build $(GOOPTS) -o $(BINDIR)/mig-agent-$(BUILDREV)$(BINSUFFIX) $(GOLDFLAGS) github.com/mozilla/mig/mig-agent ln -fs "$$(pwd)/$(BINDIR)/mig-agent-$(BUILDREV)$(BINSUFFIX)" "$$(pwd)/$(BINDIR)/mig-agent-latest" [ -x "$(BINDIR)/mig-agent-$(BUILDREV)$(BINSUFFIX)" ] # If our build target is darwin and OSXPROCSIGID is set, sign the binary @@ -132,40 +132,40 @@ mig-agent: create-bindir fi mig-scheduler: create-bindir - $(GO) build $(GOOPTS) -o $(BINDIR)/mig-scheduler $(GOLDFLAGS) mig.ninja/mig/mig-scheduler + $(GO) build $(GOOPTS) -o $(BINDIR)/mig-scheduler $(GOLDFLAGS) github.com/mozilla/mig/mig-scheduler mig-api: create-bindir - $(GO) build $(GOOPTS) -o $(BINDIR)/mig-api $(GOLDFLAGS) mig.ninja/mig/mig-api + $(GO) build $(GOOPTS) -o $(BINDIR)/mig-api $(GOLDFLAGS) github.com/mozilla/mig/mig-api mig-runner: create-bindir - $(GO) build $(GOOPTS) -o $(BINDIR)/mig-runner $(GOLDFLAGS) mig.ninja/mig/mig-runner + $(GO) build $(GOOPTS) -o $(BINDIR)/mig-runner $(GOLDFLAGS) github.com/mozilla/mig/mig-runner mig-action-generator: create-bindir - $(GO) build $(GOOPTS) -o $(BINDIR)/mig-action-generator $(GOLDFLAGS) mig.ninja/mig/client/mig-action-generator + $(GO) build $(GOOPTS) -o $(BINDIR)/mig-action-generator $(GOLDFLAGS) github.com/mozilla/mig/client/mig-action-generator mig-loader: create-bindir - $(GO) build $(GOOPTS) -o $(BINDIR)/mig-loader$(BINSUFFIX) $(GOLDFLAGS) mig.ninja/mig/mig-loader + $(GO) build $(GOOPTS) -o $(BINDIR)/mig-loader$(BINSUFFIX) $(GOLDFLAGS) github.com/mozilla/mig/mig-loader if [ $(OS) = "darwin" -a ! -z "$(OSXPROCSIGID)" ]; then \ codesign -s "$(OSXPROCSIGID)" $(BINDIR)/mig-loader; \ fi mig-action-verifier: create-bindir - $(GO) build $(GOOPTS) -o $(BINDIR)/mig-action-verifier $(GOLDFLAGS) mig.ninja/mig/client/mig-action-verifier + $(GO) build $(GOOPTS) -o $(BINDIR)/mig-action-verifier $(GOLDFLAGS) github.com/mozilla/mig/client/mig-action-verifier mig-console: create-bindir - $(GO) build $(GOOPTS) -o $(BINDIR)/mig-console $(GOLDFLAGS) mig.ninja/mig/client/mig-console + $(GO) build $(GOOPTS) -o $(BINDIR)/mig-console $(GOLDFLAGS) github.com/mozilla/mig/client/mig-console mig-cmd: create-bindir - $(GO) build $(GOOPTS) -o $(BINDIR)/mig $(GOLDFLAGS) mig.ninja/mig/client/mig + $(GO) build $(GOOPTS) -o $(BINDIR)/mig $(GOLDFLAGS) github.com/mozilla/mig/client/mig mig-agent-search: create-bindir - $(GO) build $(GOOPTS) -o $(BINDIR)/mig-agent-search $(GOLDFLAGS) mig.ninja/mig/client/mig-agent-search + $(GO) build $(GOOPTS) -o $(BINDIR)/mig-agent-search $(GOLDFLAGS) github.com/mozilla/mig/client/mig-agent-search runner-compliance: create-bindir - $(GO) build $(GOOPTS) -o $(BINDIR)/runner-compliance $(GOLDFLAGS) mig.ninja/mig/runner-plugins/runner-compliance + $(GO) build $(GOOPTS) -o $(BINDIR)/runner-compliance $(GOLDFLAGS) github.com/mozilla/mig/runner-plugins/runner-compliance runner-scribe: create-bindir - $(GO) build $(GOOPTS) -o $(BINDIR)/runner-scribe $(GOLDFLAGS) mig.ninja/mig/runner-plugins/runner-scribe + $(GO) build $(GOOPTS) -o $(BINDIR)/runner-scribe $(GOLDFLAGS) github.com/mozilla/mig/runner-plugins/runner-scribe go_vendor_dependencies: govend -v -u @@ -309,44 +309,44 @@ doc: make -C doc doc test: test-modules - $(GO) test mig.ninja/mig/mig-agent/... - $(GO) test mig.ninja/mig/mig-scheduler/... - $(GO) test mig.ninja/mig/mig-api/... - $(GO) test mig.ninja/mig/mig-runner/... - $(GO) test mig.ninja/mig/mig-loader/... - $(GO) test mig.ninja/mig/client/... - $(GO) test mig.ninja/mig/database/... - $(GO) test mig.ninja/mig + $(GO) test github.com/mozilla/mig/mig-agent/... + $(GO) test github.com/mozilla/mig/mig-scheduler/... + $(GO) test github.com/mozilla/mig/mig-api/... + $(GO) test github.com/mozilla/mig/mig-runner/... + $(GO) test github.com/mozilla/mig/mig-loader/... + $(GO) test github.com/mozilla/mig/client/... + $(GO) test github.com/mozilla/mig/database/... + $(GO) test github.com/mozilla/mig test-modules: - $(GO) test mig.ninja/mig/modules/ - $(GO) test mig.ninja/mig/modules/agentdestroy - $(GO) test mig.ninja/mig/modules/example - $(GO) test mig.ninja/mig/modules/examplepersist - $(GO) test mig.ninja/mig/modules/file - $(GO) test mig.ninja/mig/modules/fswatch - $(GO) test mig.ninja/mig/modules/dispatch - $(GO) test mig.ninja/mig/modules/audit - $(GO) test mig.ninja/mig/modules/memory - $(GO) test mig.ninja/mig/modules/netstat - $(GO) test mig.ninja/mig/modules/ping - $(GO) test mig.ninja/mig/modules/pkg - $(GO) test mig.ninja/mig/modules/scribe - $(GO) test mig.ninja/mig/modules/timedrift - $(GO) test mig.ninja/mig/modules/sshkey + $(GO) test github.com/mozilla/mig/modules/ + $(GO) test github.com/mozilla/mig/modules/agentdestroy + $(GO) test github.com/mozilla/mig/modules/example + $(GO) test github.com/mozilla/mig/modules/examplepersist + $(GO) test github.com/mozilla/mig/modules/file + $(GO) test github.com/mozilla/mig/modules/fswatch + $(GO) test github.com/mozilla/mig/modules/dispatch + $(GO) test github.com/mozilla/mig/modules/audit + $(GO) test github.com/mozilla/mig/modules/memory + $(GO) test github.com/mozilla/mig/modules/netstat + $(GO) test github.com/mozilla/mig/modules/ping + $(GO) test github.com/mozilla/mig/modules/pkg + $(GO) test github.com/mozilla/mig/modules/scribe + $(GO) test github.com/mozilla/mig/modules/timedrift + $(GO) test github.com/mozilla/mig/modules/sshkey ifeq ($(WITHYARA),yes) - $(GO) test mig.ninja/mig/modules/yara + $(GO) test github.com/mozilla/mig/modules/yara endif vet: - $(GO) vet mig.ninja/mig/mig-agent/... - $(GO) vet mig.ninja/mig/mig-scheduler/... - $(GO) vet mig.ninja/mig/mig-api/... - $(GO) vet mig.ninja/mig/mig-runner/... - $(GO) vet mig.ninja/mig/client/... - $(GO) vet mig.ninja/mig/modules/... - $(GO) vet mig.ninja/mig/database/... - $(GO) vet mig.ninja/mig + $(GO) vet github.com/mozilla/mig/mig-agent/... + $(GO) vet github.com/mozilla/mig/mig-scheduler/... + $(GO) vet github.com/mozilla/mig/mig-api/... + $(GO) vet github.com/mozilla/mig/mig-runner/... + $(GO) vet github.com/mozilla/mig/client/... + $(GO) vet github.com/mozilla/mig/modules/... + $(GO) vet github.com/mozilla/mig/database/... + $(GO) vet github.com/mozilla/mig clean: rm -rf bin diff --git a/doc/cheatsheet.rst b/doc/cheatsheet.rst index 4bf48cc7..1b71c400 100644 --- a/doc/cheatsheet.rst +++ b/doc/cheatsheet.rst @@ -325,7 +325,7 @@ mig-agent-search `mig-agent-search` is a small client that lists agents based on a query. It is useful to test target queries before using them live. You can obtain it via `go -get mig.ninja/mig/client/mig-agent-search`. +get github.com/mozilla/mig/client/mig-agent-search`. .. code:: bash diff --git a/doc/command_line.rst b/doc/command_line.rst index c0febd91..85d61c5a 100644 --- a/doc/command_line.rst +++ b/doc/command_line.rst @@ -11,7 +11,7 @@ to be simple and fast to use for basic investigations. Unlike the mig-console, it does not provide access to previous actions, search or investigators management. -To install the MIG command line, use `go get mig.ninja/mig/client/mig`. This +To install the MIG command line, use `go get github.com/mozilla/mig/client/mig`. This command will place a binary called `mig` under $GOPATH/bin/mig. On first run, it will invite you to create a configuration: diff --git a/doc/configuration.rst b/doc/configuration.rst index 1ea9fc2e..64cd605c 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -60,7 +60,7 @@ Then retrieve MIG's source code using go get: .. code:: bash - $ go get mig.ninja/mig + $ go get github.com/mozilla/mig ``go get`` will place MIG under ``$GOPATH/src/mig.ninja/mig``. If you want you can run ``make test`` under this directory to verify the tests execute and ensure your go environment @@ -69,18 +69,18 @@ is setup correctly. .. code:: bash $ make test - GOOS=linux GOARCH=amd64 GO15VENDOREXPERIMENT=1 go test mig.ninja/mig/modules/ - ok mig.ninja/mig/modules 0.103s - GOOS=linux GOARCH=amd64 GO15VENDOREXPERIMENT=1 go test mig.ninja/mig/modules/agentdestroy - ok mig.ninja/mig/modules/agentdestroy 0.003s - GOOS=linux GOARCH=amd64 GO15VENDOREXPERIMENT=1 go test mig.ninja/mig/modules/example - ok mig.ninja/mig/modules/example 0.003s - GOOS=linux GOARCH=amd64 GO15VENDOREXPERIMENT=1 go test mig.ninja/mig/modules/examplepersist - ok mig.ninja/mig/modules/examplepersist 0.002s - GOOS=linux GOARCH=amd64 GO15VENDOREXPERIMENT=1 go test mig.ninja/mig/modules/file - ok mig.ninja/mig/modules/file 0.081s - GOOS=linux GOARCH=amd64 GO15VENDOREXPERIMENT=1 go test mig.ninja/mig/modules/fswatch - ok mig.ninja/mig/modules/fswatch 0.003s + GOOS=linux GOARCH=amd64 GO15VENDOREXPERIMENT=1 go test github.com/mozilla/mig/modules/ + ok github.com/mozilla/mig/modules 0.103s + GOOS=linux GOARCH=amd64 GO15VENDOREXPERIMENT=1 go test github.com/mozilla/mig/modules/agentdestroy + ok github.com/mozilla/mig/modules/agentdestroy 0.003s + GOOS=linux GOARCH=amd64 GO15VENDOREXPERIMENT=1 go test github.com/mozilla/mig/modules/example + ok github.com/mozilla/mig/modules/example 0.003s + GOOS=linux GOARCH=amd64 GO15VENDOREXPERIMENT=1 go test github.com/mozilla/mig/modules/examplepersist + ok github.com/mozilla/mig/modules/examplepersist 0.002s + GOOS=linux GOARCH=amd64 GO15VENDOREXPERIMENT=1 go test github.com/mozilla/mig/modules/file + ok github.com/mozilla/mig/modules/file 0.081s + GOOS=linux GOARCH=amd64 GO15VENDOREXPERIMENT=1 go test github.com/mozilla/mig/modules/fswatch + ok github.com/mozilla/mig/modules/fswatch 0.003s ... Deploy the Postgres database @@ -792,7 +792,7 @@ or ``go install``. .. code:: bash - $ go install -tags 'modnodefaults modmemory' mig.ninja/mig/mig-agent + $ go install -tags 'modnodefaults modmemory' github.com/mozilla/mig/mig-agent For details on the various tags that can be specified, see the source of the `modulepack package`_. diff --git a/doc/loader.rst b/doc/loader.rst index 2b509c5a..39376f0d 100644 --- a/doc/loader.rst +++ b/doc/loader.rst @@ -155,7 +155,7 @@ Once complete, build the loader binary with your configuration file. # test if the loader configuration variable contains something different than the default value # and if so, replace the link to the default configuration with the provided configuration if [ conf/mig-loader-myenv.go.inc != "conf/mig-loader-conf.go.inc" ]; then rm mig-loader/configuration.go; cp conf/mig-loader-myenv.go.inc mig-loader/configuration.go; fi - GOOS=linux GOARCH=amd64 GO15VENDOREXPERIMENT=1 go build -o bin/linux/amd64/mig-loader -ldflags "-X mig.ninja/mig.Version=20160512-0.9fe5f23.dev" mig.ninja/mig/mig-loader + GOOS=linux GOARCH=amd64 GO15VENDOREXPERIMENT=1 go build -o bin/linux/amd64/mig-loader -ldflags "-X github.com/mozilla/mig.Version=20160512-0.9fe5f23.dev" github.com/mozilla/mig/mig-loader You will end up with a mig-loader binary in ``bin/linux/amd64`` you can copy into your manifest when you create it in a later step. @@ -402,7 +402,7 @@ based, so first we make a loader package using our loader configuration. # test if the loader configuration variable contains something different than the default value # and if so, replace the link to the default configuration with the provided configuration if [ conf/mig-loader-myenv.go.inc != "conf/mig-loader-conf.go.inc" ]; then rm mig-loader/configuration.go; cp conf/mig-loader-myenv.go.inc mig-loader/configuration.go; fi - GOOS=linux GOARCH=amd64 GO15VENDOREXPERIMENT=1 go build -o bin/linux/amd64/mig-loader -ldflags "-X mig.ninja/mig.Version=20160516-0.8ba7319.dev" mig.ninja/mig/mig-loader + GOOS=linux GOARCH=amd64 GO15VENDOREXPERIMENT=1 go build -o bin/linux/amd64/mig-loader -ldflags "-X github.com/mozilla/mig.Version=20160516-0.8ba7319.dev" github.com/mozilla/mig/mig-loader rm -fr tmp install -s -D -m 0755 bin/linux/amd64/mig-loader tmp/sbin/mig-loader install -D -m 0644 LICENSE tmp/usr/share/doc/mig-loader/copyright diff --git a/tools/compose/migagenthost1/run.sh b/tools/compose/migagenthost1/run.sh index dc612d9f..4300d8b5 100644 --- a/tools/compose/migagenthost1/run.sh +++ b/tools/compose/migagenthost1/run.sh @@ -3,7 +3,7 @@ # If AGENTMODULES is set, rebuild the agent with the indicated module tags if [[ ! -z "$AGENTMODULES" ]]; then sudo env GOPATH=/go \ - go install -tags "$AGENTMODULES" mig.ninja/mig/mig-agent + go install -tags "$AGENTMODULES" github.com/mozilla/mig/mig-agent fi # Update API configuration using the environment diff --git a/tools/compose/migagenthost2/run.sh b/tools/compose/migagenthost2/run.sh index dc612d9f..4300d8b5 100644 --- a/tools/compose/migagenthost2/run.sh +++ b/tools/compose/migagenthost2/run.sh @@ -3,7 +3,7 @@ # If AGENTMODULES is set, rebuild the agent with the indicated module tags if [[ ! -z "$AGENTMODULES" ]]; then sudo env GOPATH=/go \ - go install -tags "$AGENTMODULES" mig.ninja/mig/mig-agent + go install -tags "$AGENTMODULES" github.com/mozilla/mig/mig-agent fi # Update API configuration using the environment diff --git a/tools/compose/migagenthost3/run.sh b/tools/compose/migagenthost3/run.sh index dc612d9f..4300d8b5 100644 --- a/tools/compose/migagenthost3/run.sh +++ b/tools/compose/migagenthost3/run.sh @@ -3,7 +3,7 @@ # If AGENTMODULES is set, rebuild the agent with the indicated module tags if [[ ! -z "$AGENTMODULES" ]]; then sudo env GOPATH=/go \ - go install -tags "$AGENTMODULES" mig.ninja/mig/mig-agent + go install -tags "$AGENTMODULES" github.com/mozilla/mig/mig-agent fi # Update API configuration using the environment diff --git a/tools/compose/migworkstation/run.sh b/tools/compose/migworkstation/run.sh index aa4e1525..5de5e0ed 100644 --- a/tools/compose/migworkstation/run.sh +++ b/tools/compose/migworkstation/run.sh @@ -3,15 +3,15 @@ # If AGENTMODULES is set, rebuild the agent with the indicated module tags if [[ ! -z "$AGENTMODULES" ]]; then sudo env GOPATH=/go \ - go install -tags "$AGENTMODULES" mig.ninja/mig/mig-agent + go install -tags "$AGENTMODULES" github.com/mozilla/mig/mig-agent fi # If CLIENTMODULES is set, rebuild the clients with the indicated module tags if [[ ! -z "$CLIENTMODULES" ]]; then sudo env GOPATH=/go \ - go install -tags "$CLIENTMODULES" mig.ninja/mig/client/mig-console + go install -tags "$CLIENTMODULES" github.com/mozilla/mig/client/mig-console sudo env GOPATH=/go \ - go install -tags "$CLIENTMODULES" mig.ninja/mig/client/mig + go install -tags "$CLIENTMODULES" github.com/mozilla/mig/client/mig fi # Update API configuration using the environment diff --git a/tools/docker_start.sh b/tools/docker_start.sh index 957bf86e..22525776 100644 --- a/tools/docker_start.sh +++ b/tools/docker_start.sh @@ -13,11 +13,11 @@ fail() { standalone_configure() { echo Performing initial container configuration... - go install mig.ninja/mig/mig-scheduler || fail - go install mig.ninja/mig/mig-api || fail - go install -tags 'modmemory' mig.ninja/mig/client/mig || fail - go install -tags 'modmemory' mig.ninja/mig/client/mig-console || fail - go install -tags 'modmemory' mig.ninja/mig/mig-agent || fail + go install github.com/mozilla/mig/mig-scheduler || fail + go install github.com/mozilla/mig/mig-api || fail + go install -tags 'modmemory' github.com/mozilla/mig/client/mig || fail + go install -tags 'modmemory' github.com/mozilla/mig/client/mig-console || fail + go install -tags 'modmemory' github.com/mozilla/mig/mig-agent || fail sudo sh -c "echo 'host all all 127.0.0.1/32 password' >> /etc/postgresql/9.5/main/pg_hba.conf" sudo service postgresql restart || fail diff --git a/version.go b/version.go index d070eded..e0b2d6f2 100644 --- a/version.go +++ b/version.go @@ -8,7 +8,7 @@ package mig /* import "github.com/mozilla/mig" */ // Version can be set at compile time to indicate the version of MIG // components. You'd typically want to set this during install using flags -// such as -ldflags "-X mig.ninja/mig.Version=20170913-0.06824ce0.dev" when +// such as -ldflags "-X github.com/mozilla/mig.Version=20170913-0.06824ce0.dev" when // calling the go build tools. var Version = ""