-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch all references to github.com/containers/libpod -> podman #6909
Conversation
Is this going to break go modules? @vrothberg |
@mheon It took a while to get this to compile. I had to rename some stuff in homedir. Mainly move |
The module has been renamed as well, so we're good.
BUT it will break @lsm5 's blog post. Once merged, @lsm5 you may need to change the references in your bindings blog post. While the redirect works, the go packages are now renamed and don't resolve anymore. |
Needs a rebase |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I just realized that this change could be a rather big disturbance in the force. As we disable go modules for compilation, we need to follow |
Luckily there's go modules. Let me change the Makefile a bit to make it work. |
The following patch will make it compile again. diff --git a/Makefile b/Makefile
index 0c19e9f65e8f..d88ad1908ecd 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,3 @@
-export GO111MODULE=off
export GOPROXY=https://proxy.golang.org
GO ?= go
@@ -38,11 +37,7 @@ PRE_COMMIT = $(shell command -v bin/venv/bin/pre-commit ~/.local/bin/pre-commit
SOURCES = $(shell find . -path './.*' -prune -o -name "*.go")
-GO_BUILD ?= $(GO) build
-# Go module support: set `-mod=vendor` to use the vendored sources
-ifeq ($(shell go help mod >/dev/null 2>&1 && echo true), true)
- GO_BUILD ?= GO111MODULE=on $(GO) build -mod=vendor
-endif
+GO_BUILD ?= $(GO) build -mod=vendor
BUILDTAGS_CROSS ?= containers_image_openpgp exclude_graphdriver_btrfs exclude_graphdriver_devicemapper exclude_graphdriver_overlay
ifneq (,$(findstring varlink,$(BUILDTAGS)))
@@ -171,11 +166,11 @@ gofmt: ## Verify the source code gofmt
.PHONY: test/checkseccomp/checkseccomp
test/checkseccomp/checkseccomp: .gopathok $(wildcard test/checkseccomp/*.go)
- $(GO_BUILD) -ldflags '$(LDFLAGS_PODMAN)' -tags "$(BUILDTAGS)" -o $@ $(PROJECT)/test/checkseccomp
+ $(GO_BUILD) -ldflags '$(LDFLAGS_PODMAN)' -tags "$(BUILDTAGS)" -o $@ ./test/checkseccomp
.PHONY: test/goecho/goechoe
test/goecho/goecho: .gopathok $(wildcard test/goecho/*.go)
- $(GO_BUILD) -ldflags '$(LDFLAGS_PODMAN)' -o $@ $(PROJECT)/test/goecho
+ $(GO_BUILD) -ldflags '$(LDFLAGS_PODMAN)' -o $@ ./test/goecho
.PHONY: bin/podman
@@ -185,18 +180,18 @@ ifeq (,$(findstring systemd,$(BUILDTAGS)))
@echo "Podman is being compiled without the systemd build tag. Install libsystemd on \
Ubuntu or systemd-devel on rpm based distro for journald support."
endif
- $(GO_BUILD) $(BUILDFLAGS) -gcflags '$(GCFLAGS)' -asmflags '$(ASMFLAGS)' -ldflags '$(LDFLAGS_PODMAN)' -tags "$(BUILDTAGS)" -o $@ $(PROJECT)/cmd/podman
+ $(GO_BUILD) $(BUILDFLAGS) -gcflags '$(GCFLAGS)' -asmflags '$(ASMFLAGS)' -ldflags '$(LDFLAGS_PODMAN)' -tags "$(BUILDTAGS)" -o $@ ./cmd/podman
.PHONY: podman
podman: bin/podman
.PHONY: bin/podman-remote
bin/podman-remote: .gopathok $(SOURCES) go.mod go.sum $(PODMAN_VARLINK_DEPENDENCIES) ## Build with podman on remote environment
- $(GO_BUILD) $(BUILDFLAGS) -gcflags '$(GCFLAGS)' -asmflags '$(ASMFLAGS)' -ldflags '$(LDFLAGS_PODMAN)' -tags "${REMOTETAGS}" -o $@ $(PROJECT)/cmd/podman
+ $(GO_BUILD) $(BUILDFLAGS) -gcflags '$(GCFLAGS)' -asmflags '$(ASMFLAGS)' -ldflags '$(LDFLAGS_PODMAN)' -tags "${REMOTETAGS}" -o $@ ./cmd/podman
.PHONY: bin/podman-remote-static
podman-remote-static: bin/podman-remote-static
- CGO_ENABLED=0 $(GO_BUILD) $(BUILDFLAGS) -gcflags '$(GCFLAGS)' -asmflags '$(ASMFLAGS)' -ldflags '$(LDFLAGS_PODMAN_STATIC)' -tags "${REMOTETAGS}" -o bin/podman-remote-static $(PROJECT)/cmd/podman
+ CGO_ENABLED=0 $(GO_BUILD) $(BUILDFLAGS) -gcflags '$(GCFLAGS)' -asmflags '$(ASMFLAGS)' -ldflags '$(LDFLAGS_PODMAN_STATIC)' -tags "${REMOTETAGS}" -o bin/podman-remote-static ./cmd/podman
.PHONY: podman-remote
podman-remote: bin/podman-remote
@@ -210,7 +205,7 @@ podman.msi: podman-remote podman-remote-windows install-podman-remote-windows-do
podman-remote-%: .gopathok $(PODMAN_VARLINK_DEPENDENCIES) ## Build podman for a specific GOOS
$(eval BINSFX := $(shell test "$*" != "windows" || echo ".exe"))
- CGO_ENABLED=0 GOOS=$* $(GO_BUILD) -gcflags '$(GCFLAGS)' -asmflags '$(ASMFLAGS)' -ldflags '$(LDFLAGS_PODMAN)' -tags "${REMOTETAGS}" -o bin/$@$(BINSFX) $(PROJECT)/cmd/podman
+ CGO_ENABLED=0 GOOS=$* $(GO_BUILD) -gcflags '$(GCFLAGS)' -asmflags '$(ASMFLAGS)' -ldflags '$(LDFLAGS_PODMAN)' -tags "${REMOTETAGS}" -o bin/$@$(BINSFX) ./cmd/podman
local-cross: $(CROSS_BUILD_TARGETS) ## Cross local compilation
@@ -218,7 +213,7 @@ bin/podman.cross.%: .gopathok
TARGET="$*"; \
GOOS="$${TARGET%%.*}" \
GOARCH="$${TARGET##*.}" \
- $(GO_BUILD) -gcflags '$(GCFLAGS)' -asmflags '$(ASMFLAGS)' -ldflags '$(LDFLAGS_PODMAN)' -tags '$(BUILDTAGS_CROSS)' -o "$@" $(PROJECT)/cmd/podman
+ $(GO_BUILD) -gcflags '$(GCFLAGS)' -asmflags '$(ASMFLAGS)' -ldflags '$(LDFLAGS_PODMAN)' -tags '$(BUILDTAGS_CROSS)' -o "$@" ./cmd/podman
# Update nix/nixpkgs.json its latest master commit
.PHONY: nixpkgs
@@ -285,11 +280,11 @@ dbuild: libpodimage
.PHONY: dbuild-podman-remote
dbuild-podman-remote: libpodimage
- ${CONTAINER_RUNTIME} run --name=${LIBPOD_INSTANCE} --privileged -v ${PWD}:/go/src/${PROJECT} --rm ${LIBPOD_IMAGE} go build -ldflags '$(LDFLAGS_PODMAN)' -tags "$(REMOTETAGS)" -o bin/podman-remote $(PROJECT)/cmd/podman
+ ${CONTAINER_RUNTIME} run --name=${LIBPOD_INSTANCE} --privileged -v ${PWD}:/go/src/${PROJECT} --rm ${LIBPOD_IMAGE} $(GOBUILD) -ldflags '$(LDFLAGS_PODMAN)' -tags "$(REMOTETAGS)" -o bin/podman-remote ./cmd/podman
.PHONY: dbuild-podman-remote-darwin
dbuild-podman-remote-darwin: libpodimage
- ${CONTAINER_RUNTIME} run --name=${LIBPOD_INSTANCE} --privileged -v ${PWD}:/go/src/${PROJECT} --rm ${LIBPOD_IMAGE} env GOOS=darwin go build -ldflags '$(LDFLAGS_PODMAN)' -tags "${REMOTETAGS}" -o bin/podman-remote-darwin $(PROJECT)/cmd/podman
+ ${CONTAINER_RUNTIME} run --name=${LIBPOD_INSTANCE} --privileged -v ${PWD}:/go/src/${PROJECT} --rm ${LIBPOD_IMAGE} env GOOS=darwin $(GOBUILD) -ldflags '$(LDFLAGS_PODMAN)' -tags "${REMOTETAGS}" -o bin/podman-remote-darwin ./cmd/podman
.PHONY: test
test: libpodimage ## Run tests on built image |
@vrothberg added your patch. |
As much as I like rebasing. at some point we need to get this merged. |
We can only merge when it's green :^) |
65dadc6
to
c309883
Compare
Easier said then done. |
d1677a3
to
7ad25a3
Compare
@mheon @vrothberg @edsantiago @cevich Any ideas what is going on special test ginkgo tests are failing with permission denied? |
@edsantiago Passes the test with your PR. Thanks |
IMO, let's start cutting v2.1.0 release candidates once we have your |
(And then we can stop doing backports for non-critical issues to v2.0 once the v2.1 release happens) |
This LGTM though |
needs a rebase |
Signed-off-by: Daniel J Walsh <[email protected]>
Tests are green. I don't feel comfortable LGTM'ing this but I sure hope someone else does. How many rebases? |
Note we cannot cherry-pick patches after merging the changes here any more; all references have to be changed back to "libpod" for the 2.0 branch. LGTM but I want @mheon to ACK on the cherry-pick issue. |
@vrothberg Let's do it, we need to get master switched. We'll have to start being a lot more selective about what we backport. |
so this ain't ending up in a v2.0.x tag anytime soon, yes? |
There's no chance we're backporting this, but depending on difficulty we could re-create on the 2.0 branch? |
Signed-off-by: Daniel J Walsh [email protected]