Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions deb/common/control
Original file line number Diff line number Diff line change
Expand Up @@ -102,22 +102,3 @@ Description: Rootless support for Docker.
Either VPNKit or slirp4netns (>= 0.4.0) needs to be installed separately.
Homepage: https://docs.docker.com/engine/security/rootless/

Package: docker-compose-plugin
Priority: optional
Architecture: linux-any
Enhances: docker-ce-cli
Description: Docker Compose (V2) plugin for the Docker CLI.
.
This plugin provides the 'docker compose' subcommand.
.
The binary can also be run standalone as a direct replacement for
Docker Compose V1 ('docker-compose').
Homepage: https://github.com/docker/compose

Package: docker-scan-plugin
Priority: optional
# TODO change once we support scan-plugin on other architectures (see dpkg-architecture -L)
Architecture: linux-amd64
Enhances: docker-ce-cli
Description: Docker scan cli plugin.
Homepage: https://github.com/docker/scan-cli-plugin
45 changes: 0 additions & 45 deletions deb/common/rules
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,6 @@ override_dh_auto_build:
cd /go/src/github.com/docker/cli && \
LDFLAGS='' DISABLE_WARN_OUTSIDE_CONTAINER=1 make VERSION=$(VERSION) GITCOMMIT=$(CLI_GITCOMMIT) dynbinary manpages

# Build the compose plugin
cd /go/src/github.com/docker/compose \
&& make VERSION=$(COMPOSE_VERSION) DESTDIR=/usr/libexec/docker/cli-plugins build

# Build the scan-plugin
# TODO change once we support scan-plugin on other architectures
if [ "$(TARGET_ARCH)" = "amd64" ]; then \
cd /go/src/github.com/docker/scan-cli-plugin \
&& PLATFORM_BINARY=docker-scan COMMIT=$(SCAN_GITCOMMIT) TAG_NAME=$(SCAN_VERSION) make native-build \
&& mkdir -p /usr/libexec/docker/cli-plugins/ \
&& mv bin/docker-scan /usr/libexec/docker/cli-plugins/; \
fi

# Build the CLI plugins
# Make sure to set LDFLAGS="" since, dpkg-buildflags sets it to some weird values
set -e;cd /sources && \
Expand All @@ -49,16 +36,6 @@ override_dh_auto_test:
ver="$$(cli/build/docker --version)"; \
test "$$ver" = "Docker version $(VERSION), build $(CLI_GITCOMMIT)" && echo "PASS: cli version OK" || (echo "FAIL: cli version ($$ver) did not match" && exit 1)

ver="$$(/usr/libexec/docker/cli-plugins/docker-compose docker-cli-plugin-metadata | awk '{ gsub(/[",:]/,"")}; $$1 == "Version" { print $$2 }')"; \
test "$$ver" = "$(COMPOSE_VERSION)" && echo "PASS: docker-compose version OK" || (echo "FAIL: docker-compose version ($$ver) did not match" && exit 1)

# FIXME: --version currently doesn't work as it makes a connection to the daemon, so using the plugin metadata instead
# TODO change once we support scan-plugin on other architectures
if [ "$(TARGET_ARCH)" = "amd64" ]; then \
ver="$$(/usr/libexec/docker/cli-plugins/docker-scan docker-cli-plugin-metadata | awk '{ gsub(/[",:]/,"")}; $$1 == "Version" { print $$2 }')"; \
test "$$ver" = "$(SCAN_VERSION)" && echo "PASS: docker-scan version OK" || (echo "FAIL: docker-scan version ($$ver) did not match" && exit 1); \
fi

override_dh_strip:
# Go has lots of problems with stripping, so just don't

Expand All @@ -81,15 +58,6 @@ override_dh_auto_install:
install -D -m 0755 /usr/local/bin/docker-proxy debian/docker-ce/usr/bin/docker-proxy
install -D -m 0755 /usr/local/bin/docker-init debian/docker-ce/usr/bin/docker-init

# docker-compose-plugin install
install -D -m 0755 /usr/libexec/docker/cli-plugins/docker-compose debian/docker-compose-plugin/usr/libexec/docker/cli-plugins/docker-compose

# docker-scan-plugin install
# TODO change once we support scan-plugin on other architectures
if [ "$(TARGET_ARCH)" = "amd64" ]; then \
install -D -m 0755 /usr/libexec/docker/cli-plugins/docker-scan debian/docker-scan-plugin/usr/libexec/docker/cli-plugins/docker-scan; \
fi

# docker-ce-rootless-extras install
install -D -m 0755 /usr/local/bin/rootlesskit debian/docker-ce-rootless-extras/usr/bin/rootlesskit
install -D -m 0755 /usr/local/bin/rootlesskit-docker-proxy debian/docker-ce-rootless-extras/usr/bin/rootlesskit-docker-proxy
Expand All @@ -109,18 +77,5 @@ override_dh_install:
# TODO Can we do this from within our container?
dh_apparmor --profile-name=docker-ce -pdocker-ce

override_dh_gencontrol:
# Use separate version for the compose-plugin package, then generate the other control files as usual
# TODO override "Source" field in control as well (to point to compose, as it doesn't match the package name)
dh_gencontrol -pdocker-compose-plugin -- -v$${COMPOSE_DEB_VERSION#v}-$${PKG_REVISION}~$${DISTRO}.$${VERSION_ID}~$${SUITE}

# Use separate version for the scan-plugin package, then generate the other control files as usual
# TODO override "Source" field in control as well (to point to scan-cli-plugin, as it doesn't match the package name)
# TODO change once we support scan-plugin on other architectures (see dpkg-architecture -L)
if [ "$(TARGET_ARCH)" = "amd64" ]; then \
dh_gencontrol -pdocker-scan-plugin -- -v$${SCAN_DEB_VERSION#v}~$${DISTRO}-$${SUITE}; \
fi
dh_gencontrol --remaining-packages

%:
dh $@ --with=bash-completion $(shell command -v dh_systemd_enable > /dev/null 2>&1 && echo --with=systemd)
40 changes: 0 additions & 40 deletions plugins/scan.installer.disabled

This file was deleted.

32 changes: 2 additions & 30 deletions rpm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ PLUGINS_DIR=$(realpath $(CURDIR)/../plugins)
GO_BASE_IMAGE=golang
GO_IMAGE?=$(GO_BASE_IMAGE):$(GO_VERSION)-buster
GEN_RPM_VER=$(shell ./gen-rpm-ver $(realpath $(CURDIR)/../src/github.com/docker/cli) "$(VERSION)")
GEN_COMPOSE_RPM_VER=$(shell ./gen-rpm-ver $(realpath $(CURDIR)/../src/github.com/docker/compose) "$(DOCKER_COMPOSE_REF)")
GEN_SCAN_RPM_VER=$(shell ./gen-rpm-ver $(realpath $(CURDIR)/../src/github.com/docker/scan-cli-plugin) "$(DOCKER_SCAN_REF)")
CLI_GITCOMMIT?=$(shell cd $(realpath $(CURDIR)/../src/github.com/docker/cli) && git rev-parse --short HEAD)
ENGINE_GITCOMMIT?=$(shell cd $(realpath $(CURDIR)/../src/github.com/docker/docker) && git rev-parse --short HEAD)
SCAN_GITCOMMIT?=$(shell cd $(realpath $(CURDIR)/../src/github.com/docker/scan-cli-plugin) && git rev-parse --short HEAD)

ifdef BUILD_IMAGE
BUILD_IMAGE_FLAG=--build-arg $(BUILD_IMAGE)
Expand All @@ -22,11 +19,7 @@ BUILD?=DOCKER_BUILDKIT=1 \
.


ifeq ($(ARCH),x86_64)
SPEC_FILES?=docker-ce.spec docker-ce-cli.spec docker-ce-rootless-extras.spec docker-compose-plugin.spec docker-scan-plugin.spec
else
SPEC_FILES?=docker-ce.spec docker-ce-cli.spec docker-ce-rootless-extras.spec docker-compose-plugin.spec
endif
SPEC_FILES?=docker-ce.spec docker-ce-cli.spec docker-ce-rootless-extras.spec

SPECS?=$(addprefix SPECS/, $(SPEC_FILES))
RPMBUILD_FLAGS?=-ba\
Expand All @@ -35,11 +28,6 @@ RPMBUILD_FLAGS?=-ba\
--define '_release $(word 2,$(GEN_RPM_VER))' \
--define '_version $(word 1,$(GEN_RPM_VER))' \
--define '_origversion $(word 4, $(GEN_RPM_VER))' \
--define '_compose_rpm_version $(word 1,$(GEN_COMPOSE_RPM_VER))' \
--define '_compose_version $(word 4,$(GEN_COMPOSE_RPM_VER))' \
--define '_scan_rpm_version $(word 1,$(GEN_SCAN_RPM_VER))' \
--define '_scan_version $(word 4,$(GEN_SCAN_RPM_VER))' \
--define '_scan_gitcommit $(SCAN_GITCOMMIT)' \
$(RPMBUILD_EXTRA_FLAGS) \
$(SPECS)

Expand Down Expand Up @@ -98,7 +86,7 @@ $(DISTROS): sources
$(CHOWN) -R $(shell id -u):$(shell id -g) "rpmbuild/$@"

.PHONY: sources
sources: rpmbuild/SOURCES/engine.tgz rpmbuild/SOURCES/cli.tgz rpmbuild/SOURCES/compose.tgz rpmbuild/SOURCES/scan-cli-plugin.tgz rpmbuild/SOURCES/docker.service rpmbuild/SOURCES/docker.socket rpmbuild/SOURCES/plugin-installers.tgz
sources: rpmbuild/SOURCES/engine.tgz rpmbuild/SOURCES/cli.tgz rpmbuild/SOURCES/docker.service rpmbuild/SOURCES/docker.socket rpmbuild/SOURCES/plugin-installers.tgz

rpmbuild/SOURCES/engine.tgz:
mkdir -p $(@D)
Expand All @@ -116,22 +104,6 @@ rpmbuild/SOURCES/cli.tgz:
alpine \
tar -C / -c -z -f /v/cli.tgz --exclude .git cli

rpmbuild/SOURCES/compose.tgz:
mkdir -p $(@D)
docker run --rm -w /v \
-v $(realpath $(CURDIR)/../src/github.com/docker/compose):/compose \
-v $(CURDIR)/$(@D):/v \
alpine \
tar -C / -c -z -f /v/compose.tgz --exclude .git compose

rpmbuild/SOURCES/scan-cli-plugin.tgz:
mkdir -p $(@D)
docker run --rm -w /v \
-v $(realpath $(CURDIR)/../src/github.com/docker/scan-cli-plugin):/scan-cli-plugin \
-v $(CURDIR)/$(@D):/v \
alpine \
tar -C / -c -z -f /v/scan-cli-plugin.tgz --exclude .git scan-cli-plugin

rpmbuild/SOURCES/docker.service: ../systemd/docker.service
mkdir -p $(@D)
cp $< $@
Expand Down
12 changes: 4 additions & 8 deletions rpm/SPECS/docker-ce-cli.spec
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ popd
# Build all associated plugins
pushd ${RPM_BUILD_DIR}/src/plugins
for installer in *.installer; do
if [ "${installer}" != "scan.installer" ]; then
bash ${installer} build
fi
bash ${installer} build
done
popd

Expand All @@ -84,11 +82,9 @@ install -p -m 755 cli/build/docker ${RPM_BUILD_ROOT}%{_bindir}/docker
# install plugins
pushd ${RPM_BUILD_DIR}/src/plugins
for installer in *.installer; do
if [ "${installer}" != "scan.installer" ]; then
DESTDIR=${RPM_BUILD_ROOT} \
PREFIX=%{_libexecdir}/docker/cli-plugins \
bash ${installer} install_plugin
fi
DESTDIR=${RPM_BUILD_ROOT} \
PREFIX=%{_libexecdir}/docker/cli-plugins \
bash ${installer} install_plugin
done
popd

Expand Down
58 changes: 0 additions & 58 deletions rpm/SPECS/docker-compose-plugin.spec

This file was deleted.

59 changes: 0 additions & 59 deletions rpm/SPECS/docker-scan-plugin.spec

This file was deleted.