Skip to content

Commit

Permalink
static: remove target_platform and switch to xx
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max committed Jun 29, 2022
1 parent 2318e36 commit b742291
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 200 deletions.
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ src/github.com/docker/scan-cli-plugin:
git init $@
git -C $@ remote add origin "$(DOCKER_SCAN_REPO)"

src/github.com/tonistiigi/xx:
$(call title,Init $(XX_REPO))
git init $@
git -C $@ remote add origin "$(XX_REPO)"

.PHONY: checkout-cli
checkout-cli: src/github.com/docker/cli
Expand Down Expand Up @@ -83,6 +87,11 @@ checkout-scan-cli-plugin: src/github.com/docker/scan-cli-plugin
.PHONY: checkout
checkout: checkout-cli checkout-docker checkout-buildx checkout-compose checkout-scan-cli-plugin ## checkout source at the given reference(s)

.PHONY: checkout-xx
checkout-xx: src/github.com/tonistiigi/xx
$(call title,Checkout $(XX_REPO)#$(XX_REF))
./scripts/checkout.sh src/github.com/tonistiigi/xx "$(XX_REF)"

.PHONY: clean
clean: clean-src ## remove build artifacts
$(MAKE) -C rpm clean
Expand All @@ -101,9 +110,8 @@ centos-% fedora-% rhel-%: checkout ## build rpm packages for the specified distr
debian-% raspbian-% ubuntu-%: checkout ## build deb packages for the specified distro
$(MAKE) -C deb $@


.PHONY: static
static: checkout ## build static package
static: checkout checkout-xx ## build static package
$(MAKE) -C static build

.PHONY: verify
Expand Down
4 changes: 4 additions & 0 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ DOCKER_SCAN_REF ?= v0.17.0
DOCKER_COMPOSE_REF ?= v2.6.1
DOCKER_BUILDX_REF ?= v0.8.2

# XX is used as cross-compilation helper for static bundles
XX_REPO ?= https://github.com/tonistiigi/xx.git
XX_REF ?= v1.1.1

# Use "stage" to install dependencies from download-stage.docker.com during the
# verify step. Leave empty or use any other value to install from download.docker.com
VERIFY_PACKAGE_REPO ?= staging
Expand Down
146 changes: 0 additions & 146 deletions scripts/target-platform

This file was deleted.

2 changes: 2 additions & 0 deletions static/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ENGINE_DIR=$(realpath $(CURDIR)/../src/github.com/docker/docker)
BUILDX_DIR=$(realpath $(CURDIR)/../src/github.com/docker/buildx)
COMPOSE_DIR=$(realpath $(CURDIR)/../src/github.com/docker/compose)
SCAN_DIR=$(realpath $(CURDIR)/../src/github.com/docker/scan-cli-plugin)
XX_DIR=$(realpath $(CURDIR)/../src/github.com/tonistiigi/xx)

STATIC_VERSION=$(shell ./gen-static-ver $(CLI_DIR) $(VERSION))
HASH_CMD=docker run -v $(CURDIR):/sum -w /sum debian:jessie bash hash_files
Expand All @@ -15,6 +16,7 @@ export ENGINE_DIR
export BUILDX_DIR
export COMPOSE_DIR
export SCAN_DIR
export XX_DIR

export STATIC_VERSION

Expand Down

0 comments on commit b742291

Please sign in to comment.