diff --git a/components/packaging/README.md b/components/packaging/README.md index f0254edb1c..1acf87360e 100644 --- a/components/packaging/README.md +++ b/components/packaging/README.md @@ -1,20 +1,20 @@ # Docker CE Packaging -This repo contains open source scripts for packaging the +This repo contains the open source scripts for packaging [Docker CE products](https://store.docker.com/search?offering=community&q=&type=edition). This repository is solely maintained by Docker, Inc. The scripts will build for this list of packages types: -* DEB packages for Ubuntu Trusty 14.04 -* DEB packages for Ubuntu Xenial 16.04 -* DEB packages for Ubuntu Yakkety 16.10 -* DEB packages for Ubuntu Zesty 17.04 -* DEB packages for Debian Stretch -* DEB packages for Debian Jessie -* DEB packages for Debian Wheezy -* RPM packages for Fedora 24 +* DEB packages for Ubuntu 17.04 Zesty +* DEB packages for Ubuntu 16.10 Yakkety +* DEB packages for Ubuntu 16.04 Xenial +* DEB packages for Ubuntu 14.04 Trusty +* DEB packages for Debian 9 Stretch +* DEB packages for Debian 8 Jessie +* DEB packages for Debian 7 Wheezy * RPM packages for Fedora 25 +* RPM packages for Fedora 24 * RPM packages for CentOS 7 * TGZ and ZIP files with static binaries diff --git a/components/packaging/static/Makefile b/components/packaging/static/Makefile index 14711884eb..1c8d25d952 100644 --- a/components/packaging/static/Makefile +++ b/components/packaging/static/Makefile @@ -4,8 +4,10 @@ CLI_DIR:=$(CURDIR)/../../cli ENGINE_VER=$(shell cat $(ENGINE_DIR)/VERSION) VERSION=$(shell cat $(ENGINE_DIR)/VERSION) CHOWN=docker run --rm -v $(CURDIR):/v -w /v alpine chown +HASH_CMD=docker run -v $(CURDIR):/sum -it -w /sum debian:jessie bash hash_files +DIR_TO_HASH:=build/linux -.PHONY: help clean static static-linux cross-mac cross-win cross-arm static-cli static-engine cross-all-cli cross-win-engine +.PHONY: help clean static static-linux cross-mac cross-win cross-arm static-cli static-engine cross-all-cli cross-win-engine hash_files help: ## show make targets @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) @@ -24,6 +26,10 @@ static-linux: static-cli static-engine ## create tgz with linux x86_64 client an done tar -C build/linux -c -z -f build/linux/docker-$(VERSION).tgz docker +hash_files: + @echo "Hashing directory $(DIR_TO_HASH)" + $(HASH_CMD) "$(DIR_TO_HASH)" + cross-mac: cross-all-cli ## create tgz with darwin x86_64 client only mkdir -p build/mac/docker cp $(CLI_DIR)/build/docker-darwin-amd64 build/mac/docker/docker diff --git a/components/packaging/static/hash_files b/components/packaging/static/hash_files new file mode 100644 index 0000000000..a8851fcc0e --- /dev/null +++ b/components/packaging/static/hash_files @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Simple script to hash all the files in a given directory + +DIR_TO_LOOK_IN=${1:-build/linux} + +for f in $(find "$DIR_TO_LOOK_IN" -type f); do + for hash_algo in md5 sha256; do + "${hash_algo}sum" "$f" > "$f.$hash_algo" + done +done