These scripts have not been used for a while now, and should not be used again
because they are for releasing docker, not moby
Signed-off-by: Daniel Nephin <dnephin@docker.com>
| 2 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,29 +0,0 @@ |
| 1 |
-Source: docker-engine |
|
| 2 |
-Section: admin |
|
| 3 |
-Priority: optional |
|
| 4 |
-Maintainer: Docker <support@docker.com> |
|
| 5 |
-Standards-Version: 3.9.6 |
|
| 6 |
-Homepage: https://dockerproject.org |
|
| 7 |
-Vcs-Browser: https://github.com/docker/docker |
|
| 8 |
-Vcs-Git: git://github.com/docker/docker.git |
|
| 9 |
- |
|
| 10 |
-Package: docker-engine |
|
| 11 |
-Architecture: linux-any |
|
| 12 |
-Depends: iptables, ${misc:Depends}, ${perl:Depends}, ${shlibs:Depends}
|
|
| 13 |
-Recommends: aufs-tools, |
|
| 14 |
- ca-certificates, |
|
| 15 |
- cgroupfs-mount | cgroup-lite, |
|
| 16 |
- git, |
|
| 17 |
- xz-utils, |
|
| 18 |
- ${apparmor:Recommends}
|
|
| 19 |
-Conflicts: docker (<< 1.5~), docker.io, lxc-docker, lxc-docker-virtual-package, docker-engine-cs |
|
| 20 |
-Description: Docker: the open-source application container engine |
|
| 21 |
- Docker is an open source project to build, ship and run any application as a |
|
| 22 |
- lightweight container |
|
| 23 |
- . |
|
| 24 |
- Docker containers are both hardware-agnostic and platform-agnostic. This means |
|
| 25 |
- they can run anywhere, from your laptop to the largest EC2 compute instance and |
|
| 26 |
- everything in between - and they don't require you to use a particular |
|
| 27 |
- language, framework or packaging system. That makes them great building blocks |
|
| 28 |
- for deploying and scaling web apps, databases, and backend services without |
|
| 29 |
- depending on a particular stack or provider. |
| 3 | 2 |
deleted file mode 100644 |
| ... | ... |
@@ -1,12 +0,0 @@ |
| 1 |
-#contrib/syntax/vim/doc/* /usr/share/vim/vimfiles/doc/ |
|
| 2 |
-#contrib/syntax/vim/ftdetect/* /usr/share/vim/vimfiles/ftdetect/ |
|
| 3 |
-#contrib/syntax/vim/syntax/* /usr/share/vim/vimfiles/syntax/ |
|
| 4 |
-contrib/*-integration usr/share/docker-engine/contrib/ |
|
| 5 |
-contrib/check-config.sh usr/share/docker-engine/contrib/ |
|
| 6 |
-contrib/completion/fish/docker.fish usr/share/fish/vendor_completions.d/ |
|
| 7 |
-contrib/completion/zsh/_docker usr/share/zsh/vendor-completions/ |
|
| 8 |
-contrib/init/systemd/docker.service lib/systemd/system/ |
|
| 9 |
-contrib/init/systemd/docker.socket lib/systemd/system/ |
|
| 10 |
-contrib/mk* usr/share/docker-engine/contrib/ |
|
| 11 |
-contrib/nuke-graph-directory.sh usr/share/docker-engine/contrib/ |
|
| 12 |
-contrib/syntax/nano/Dockerfile.nanorc usr/share/nano/ |
| 2 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,20 +0,0 @@ |
| 1 |
-#!/bin/sh |
|
| 2 |
-set -e |
|
| 3 |
- |
|
| 4 |
-case "$1" in |
|
| 5 |
- configure) |
|
| 6 |
- if [ -z "$2" ]; then |
|
| 7 |
- if ! getent group docker > /dev/null; then |
|
| 8 |
- groupadd --system docker |
|
| 9 |
- fi |
|
| 10 |
- fi |
|
| 11 |
- ;; |
|
| 12 |
- abort-*) |
|
| 13 |
- # How'd we get here?? |
|
| 14 |
- exit 1 |
|
| 15 |
- ;; |
|
| 16 |
- *) |
|
| 17 |
- ;; |
|
| 18 |
-esac |
|
| 19 |
- |
|
| 20 |
-#DEBHELPER# |
| 2 | 1 |
deleted file mode 100755 |
| ... | ... |
@@ -1,53 +0,0 @@ |
| 1 |
-#!/usr/bin/make -f |
|
| 2 |
- |
|
| 3 |
-VERSION = $(shell cat VERSION) |
|
| 4 |
-SYSTEMD_VERSION := $(shell dpkg-query -W -f='$${Version}\n' systemd | cut -d- -f1)
|
|
| 5 |
-SYSTEMD_GT_227 := $(shell [ '$(SYSTEMD_VERSION)' ] && [ '$(SYSTEMD_VERSION)' -gt 227 ] && echo true ) |
|
| 6 |
- |
|
| 7 |
-override_dh_gencontrol: |
|
| 8 |
- # if we're on Ubuntu, we need to Recommends: apparmor |
|
| 9 |
- echo 'apparmor:Recommends=$(shell dpkg-vendor --is Ubuntu && echo apparmor)' >> debian/docker-engine.substvars |
|
| 10 |
- dh_gencontrol |
|
| 11 |
- |
|
| 12 |
-override_dh_auto_build: |
|
| 13 |
- ./hack/make.sh dynbinary |
|
| 14 |
- # ./man/md2man-all.sh runs outside the build container (if at all), since we don't have go-md2man here |
|
| 15 |
- |
|
| 16 |
-override_dh_auto_test: |
|
| 17 |
- ./bundles/$(VERSION)/dynbinary-daemon/dockerd -v |
|
| 18 |
- |
|
| 19 |
-override_dh_strip: |
|
| 20 |
- # Go has lots of problems with stripping, so just don't |
|
| 21 |
- |
|
| 22 |
-override_dh_auto_install: |
|
| 23 |
- mkdir -p debian/docker-engine/usr/bin |
|
| 24 |
- cp -aT "$$(readlink -f bundles/$(VERSION)/dynbinary-daemon/dockerd)" debian/docker-engine/usr/bin/dockerd |
|
| 25 |
- cp -aT /usr/local/bin/docker-proxy debian/docker-engine/usr/bin/docker-proxy |
|
| 26 |
- cp -aT /usr/local/bin/docker-containerd debian/docker-engine/usr/bin/docker-containerd |
|
| 27 |
- cp -aT /usr/local/bin/docker-containerd-shim debian/docker-engine/usr/bin/docker-containerd-shim |
|
| 28 |
- cp -aT /usr/local/bin/docker-containerd-ctr debian/docker-engine/usr/bin/docker-containerd-ctr |
|
| 29 |
- cp -aT /usr/local/bin/docker-runc debian/docker-engine/usr/bin/docker-runc |
|
| 30 |
- cp -aT /usr/local/bin/docker-init debian/docker-engine/usr/bin/docker-init |
|
| 31 |
- mkdir -p debian/docker-engine/usr/lib/docker |
|
| 32 |
- |
|
| 33 |
-override_dh_installinit: |
|
| 34 |
- # use "docker" as our service name, not "docker-engine" |
|
| 35 |
- dh_installinit --name=docker |
|
| 36 |
-ifeq (true, $(SYSTEMD_GT_227)) |
|
| 37 |
- $(warning "Setting TasksMax=infinity") |
|
| 38 |
- sed -i -- 's/#TasksMax=infinity/TasksMax=infinity/' debian/docker-engine/lib/systemd/system/docker.service |
|
| 39 |
-endif |
|
| 40 |
- |
|
| 41 |
-override_dh_installudev: |
|
| 42 |
- # match our existing priority |
|
| 43 |
- dh_installudev --priority=z80 |
|
| 44 |
- |
|
| 45 |
-override_dh_install: |
|
| 46 |
- dh_install |
|
| 47 |
- dh_apparmor --profile-name=docker-engine -pdocker-engine |
|
| 48 |
- |
|
| 49 |
-override_dh_shlibdeps: |
|
| 50 |
- dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info |
|
| 51 |
- |
|
| 52 |
-%: |
|
| 53 |
- dh $@ --with=bash-completion $(shell command -v dh_systemd_enable > /dev/null 2>&1 && echo --with=systemd) |
| 54 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,99 +0,0 @@ |
| 1 |
-# Some bits borrowed from the openstack-selinux package |
|
| 2 |
-Name: docker-engine-selinux |
|
| 3 |
-Version: %{_version}
|
|
| 4 |
-Release: %{_release}%{?dist}
|
|
| 5 |
-Summary: SELinux Policies for the open-source application container engine |
|
| 6 |
-BuildArch: noarch |
|
| 7 |
-Group: Tools/Docker |
|
| 8 |
- |
|
| 9 |
-License: GPLv2 |
|
| 10 |
-Source: %{name}.tar.gz
|
|
| 11 |
- |
|
| 12 |
-URL: https://dockerproject.org |
|
| 13 |
-Vendor: Docker |
|
| 14 |
-Packager: Docker <support@docker.com> |
|
| 15 |
- |
|
| 16 |
-%global selinux_policyver 3.13.1-102 |
|
| 17 |
-%if 0%{?oraclelinux} >= 7
|
|
| 18 |
-%global selinux_policyver 3.13.1-102.0.3.el7_3.15 |
|
| 19 |
-%endif # oraclelinux 7 |
|
| 20 |
-%global selinuxtype targeted |
|
| 21 |
-%global moduletype services |
|
| 22 |
-%global modulenames docker |
|
| 23 |
- |
|
| 24 |
-Requires(post): selinux-policy-base >= %{selinux_policyver}, selinux-policy-targeted >= %{selinux_policyver}, policycoreutils, policycoreutils-python libselinux-utils
|
|
| 25 |
-BuildRequires: selinux-policy selinux-policy-devel |
|
| 26 |
- |
|
| 27 |
-# conflicting packages |
|
| 28 |
-Conflicts: docker-selinux |
|
| 29 |
- |
|
| 30 |
-# Usage: _format var format |
|
| 31 |
-# Expand 'modulenames' into various formats as needed |
|
| 32 |
-# Format must contain '$x' somewhere to do anything useful |
|
| 33 |
-%global _format() export %1=""; for x in %{modulenames}; do %1+=%2; %1+=" "; done;
|
|
| 34 |
- |
|
| 35 |
-# Relabel files |
|
| 36 |
-%global relabel_files() \ |
|
| 37 |
- /sbin/restorecon -R %{_bindir}/docker %{_localstatedir}/run/docker.sock %{_localstatedir}/run/docker.pid %{_sysconfdir}/docker %{_localstatedir}/log/docker %{_localstatedir}/log/lxc %{_localstatedir}/lock/lxc %{_usr}/lib/systemd/system/docker.service /root/.docker &> /dev/null || : \
|
|
| 38 |
- |
|
| 39 |
-%description |
|
| 40 |
-SELinux policy modules for use with Docker |
|
| 41 |
- |
|
| 42 |
-%prep |
|
| 43 |
-%if 0%{?centos} <= 6
|
|
| 44 |
-%setup -n %{name}
|
|
| 45 |
-%else |
|
| 46 |
-%autosetup -n %{name}
|
|
| 47 |
-%endif |
|
| 48 |
- |
|
| 49 |
-%build |
|
| 50 |
-make SHARE="%{_datadir}" TARGETS="%{modulenames}"
|
|
| 51 |
- |
|
| 52 |
-%install |
|
| 53 |
- |
|
| 54 |
-# Install SELinux interfaces |
|
| 55 |
-%_format INTERFACES $x.if |
|
| 56 |
-install -d %{buildroot}%{_datadir}/selinux/devel/include/%{moduletype}
|
|
| 57 |
-install -p -m 644 $INTERFACES %{buildroot}%{_datadir}/selinux/devel/include/%{moduletype}
|
|
| 58 |
- |
|
| 59 |
-# Install policy modules |
|
| 60 |
-%_format MODULES $x.pp.bz2 |
|
| 61 |
-install -d %{buildroot}%{_datadir}/selinux/packages
|
|
| 62 |
-install -m 0644 $MODULES %{buildroot}%{_datadir}/selinux/packages
|
|
| 63 |
- |
|
| 64 |
-%post |
|
| 65 |
-# |
|
| 66 |
-# Install all modules in a single transaction |
|
| 67 |
-# |
|
| 68 |
-if [ $1 -eq 1 ]; then |
|
| 69 |
- %{_sbindir}/setsebool -P -N virt_use_nfs=1 virt_sandbox_use_all_caps=1
|
|
| 70 |
-fi |
|
| 71 |
-%_format MODULES %{_datadir}/selinux/packages/$x.pp.bz2
|
|
| 72 |
-%{_sbindir}/semodule -n -s %{selinuxtype} -i $MODULES
|
|
| 73 |
-if %{_sbindir}/selinuxenabled ; then
|
|
| 74 |
- %{_sbindir}/load_policy
|
|
| 75 |
- %relabel_files |
|
| 76 |
- if [ $1 -eq 1 ]; then |
|
| 77 |
- restorecon -R %{_sharedstatedir}/docker
|
|
| 78 |
- fi |
|
| 79 |
-fi |
|
| 80 |
- |
|
| 81 |
-%postun |
|
| 82 |
-if [ $1 -eq 0 ]; then |
|
| 83 |
- %{_sbindir}/semodule -n -r %{modulenames} &> /dev/null || :
|
|
| 84 |
- if %{_sbindir}/selinuxenabled ; then
|
|
| 85 |
- %{_sbindir}/load_policy
|
|
| 86 |
- %relabel_files |
|
| 87 |
- fi |
|
| 88 |
-fi |
|
| 89 |
- |
|
| 90 |
-%files |
|
| 91 |
-%doc LICENSE |
|
| 92 |
-%defattr(-,root,root,0755) |
|
| 93 |
-%attr(0644,root,root) %{_datadir}/selinux/packages/*.pp.bz2
|
|
| 94 |
-%attr(0644,root,root) %{_datadir}/selinux/devel/include/%{moduletype}/*.if
|
|
| 95 |
- |
|
| 96 |
-%changelog |
|
| 97 |
-* Tue Dec 1 2015 Jessica Frazelle <acidburn@docker.com> 1.9.1-1 |
|
| 98 |
-- add licence to rpm |
|
| 99 |
-- add selinux-policy and docker-engine-selinux rpm |
| 100 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,249 +0,0 @@ |
| 1 |
-Name: docker-engine |
|
| 2 |
-Version: %{_version}
|
|
| 3 |
-Release: %{_release}%{?dist}
|
|
| 4 |
-Summary: The open-source application container engine |
|
| 5 |
-Group: Tools/Docker |
|
| 6 |
- |
|
| 7 |
-License: ASL 2.0 |
|
| 8 |
-Source: %{name}.tar.gz
|
|
| 9 |
- |
|
| 10 |
-URL: https://dockerproject.org |
|
| 11 |
-Vendor: Docker |
|
| 12 |
-Packager: Docker <support@docker.com> |
|
| 13 |
- |
|
| 14 |
-# is_systemd conditional |
|
| 15 |
-%if 0%{?fedora} >= 21 || 0%{?centos} >= 7 || 0%{?rhel} >= 7 || 0%{?suse_version} >= 1210
|
|
| 16 |
-%global is_systemd 1 |
|
| 17 |
-%endif |
|
| 18 |
- |
|
| 19 |
-# required packages for build |
|
| 20 |
-# most are already in the container (see contrib/builder/rpm/ARCH/generate.sh) |
|
| 21 |
-# only require systemd on those systems |
|
| 22 |
-%if 0%{?is_systemd}
|
|
| 23 |
-%if 0%{?suse_version} >= 1210
|
|
| 24 |
-BuildRequires: systemd-rpm-macros |
|
| 25 |
-%{?systemd_requires}
|
|
| 26 |
-%else |
|
| 27 |
-%if 0%{?fedora} >= 25
|
|
| 28 |
-# Systemd 230 and up no longer have libsystemd-journal (see https://bugzilla.redhat.com/show_bug.cgi?id=1350301) |
|
| 29 |
-BuildRequires: pkgconfig(systemd) |
|
| 30 |
-Requires: systemd-units |
|
| 31 |
-%else |
|
| 32 |
-BuildRequires: pkgconfig(systemd) |
|
| 33 |
-Requires: systemd-units |
|
| 34 |
-BuildRequires: pkgconfig(libsystemd-journal) |
|
| 35 |
-%endif |
|
| 36 |
-%endif |
|
| 37 |
-%else |
|
| 38 |
-Requires(post): chkconfig |
|
| 39 |
-Requires(preun): chkconfig |
|
| 40 |
-# This is for /sbin/service |
|
| 41 |
-Requires(preun): initscripts |
|
| 42 |
-%endif |
|
| 43 |
- |
|
| 44 |
-# required packages on install |
|
| 45 |
-Requires: /bin/sh |
|
| 46 |
-Requires: iptables |
|
| 47 |
-%if !0%{?suse_version}
|
|
| 48 |
-Requires: libcgroup |
|
| 49 |
-%else |
|
| 50 |
-Requires: libcgroup1 |
|
| 51 |
-%endif |
|
| 52 |
-Requires: tar |
|
| 53 |
-Requires: xz |
|
| 54 |
-%if 0%{?fedora} >= 21 || 0%{?centos} >= 7 || 0%{?rhel} >= 7 || 0%{?oraclelinux} >= 7 || 0%{?amzn} >= 1
|
|
| 55 |
-# Resolves: rhbz#1165615 |
|
| 56 |
-Requires: device-mapper-libs >= 1.02.90-1 |
|
| 57 |
-%endif |
|
| 58 |
-%if 0%{?oraclelinux} >= 6
|
|
| 59 |
-# Require Oracle Unbreakable Enterprise Kernel R4 and newer device-mapper |
|
| 60 |
-Requires: kernel-uek >= 4.1 |
|
| 61 |
-Requires: device-mapper >= 1.02.90-2 |
|
| 62 |
-%endif |
|
| 63 |
- |
|
| 64 |
-# docker-selinux conditional |
|
| 65 |
-%if 0%{?fedora} >= 20 || 0%{?centos} >= 7 || 0%{?rhel} >= 7 || 0%{?oraclelinux} >= 7
|
|
| 66 |
-%global with_selinux 1 |
|
| 67 |
-%endif |
|
| 68 |
- |
|
| 69 |
-# DWZ problem with multiple golang binary, see bug |
|
| 70 |
-# https://bugzilla.redhat.com/show_bug.cgi?id=995136#c12 |
|
| 71 |
-%if 0%{?fedora} >= 20 || 0%{?rhel} >= 7 || 0%{?oraclelinux} >= 7
|
|
| 72 |
-%global _dwz_low_mem_die_limit 0 |
|
| 73 |
-%endif |
|
| 74 |
- |
|
| 75 |
-# start if with_selinux |
|
| 76 |
-%if 0%{?with_selinux}
|
|
| 77 |
- |
|
| 78 |
-%if 0%{?centos} >= 7 || 0%{?rhel} >= 7 || 0%{?fedora} >= 25
|
|
| 79 |
-Requires: container-selinux >= 2.9 |
|
| 80 |
-%endif# centos 7, rhel 7, fedora 25 |
|
| 81 |
- |
|
| 82 |
-%if 0%{?oraclelinux} >= 7
|
|
| 83 |
-%global selinux_policyver 3.13.1-102.0.3.el7_3.15 |
|
| 84 |
-%endif # oraclelinux 7 |
|
| 85 |
-%if 0%{?fedora} == 24
|
|
| 86 |
-%global selinux_policyver 3.13.1-191 |
|
| 87 |
-%endif # fedora 24 -- container-selinux on fedora24 does not properly set dockerd, for now just carry docker-engine-selinux for it |
|
| 88 |
-%if 0%{?oraclelinux} >= 7 || 0%{?fedora} == 24
|
|
| 89 |
-Requires: selinux-policy >= %{selinux_policyver}
|
|
| 90 |
-Requires(pre): %{name}-selinux >= %{version}-%{release}
|
|
| 91 |
-%endif # selinux-policy for oraclelinux-7, fedora-24 |
|
| 92 |
- |
|
| 93 |
-%endif # with_selinux |
|
| 94 |
- |
|
| 95 |
-# conflicting packages |
|
| 96 |
-Conflicts: docker |
|
| 97 |
-Conflicts: docker-io |
|
| 98 |
-Conflicts: docker-engine-cs |
|
| 99 |
- |
|
| 100 |
-%description |
|
| 101 |
-Docker is an open source project to build, ship and run any application as a |
|
| 102 |
-lightweight container. |
|
| 103 |
- |
|
| 104 |
-Docker containers are both hardware-agnostic and platform-agnostic. This means |
|
| 105 |
-they can run anywhere, from your laptop to the largest EC2 compute instance and |
|
| 106 |
-everything in between - and they don't require you to use a particular |
|
| 107 |
-language, framework or packaging system. That makes them great building blocks |
|
| 108 |
-for deploying and scaling web apps, databases, and backend services without |
|
| 109 |
-depending on a particular stack or provider. |
|
| 110 |
- |
|
| 111 |
-%prep |
|
| 112 |
-%if 0%{?centos} <= 6 || 0%{?oraclelinux} <=6
|
|
| 113 |
-%setup -n %{name}
|
|
| 114 |
-%else |
|
| 115 |
-%autosetup -n %{name}
|
|
| 116 |
-%endif |
|
| 117 |
- |
|
| 118 |
-%build |
|
| 119 |
-export DOCKER_GITCOMMIT=%{_gitcommit}
|
|
| 120 |
-./hack/make.sh dynbinary |
|
| 121 |
-# ./man/md2man-all.sh runs outside the build container (if at all), since we don't have go-md2man here |
|
| 122 |
- |
|
| 123 |
-%check |
|
| 124 |
-./bundles/%{_origversion}/dynbinary-daemon/dockerd -v
|
|
| 125 |
- |
|
| 126 |
-%install |
|
| 127 |
-# install binary |
|
| 128 |
-install -d $RPM_BUILD_ROOT/%{_bindir}
|
|
| 129 |
-install -p -m 755 bundles/%{_origversion}/dynbinary-daemon/dockerd-%{_origversion} $RPM_BUILD_ROOT/%{_bindir}/dockerd
|
|
| 130 |
- |
|
| 131 |
-# install proxy |
|
| 132 |
-install -p -m 755 /usr/local/bin/docker-proxy $RPM_BUILD_ROOT/%{_bindir}/docker-proxy
|
|
| 133 |
- |
|
| 134 |
-# install containerd |
|
| 135 |
-install -p -m 755 /usr/local/bin/docker-containerd $RPM_BUILD_ROOT/%{_bindir}/docker-containerd
|
|
| 136 |
-install -p -m 755 /usr/local/bin/docker-containerd-shim $RPM_BUILD_ROOT/%{_bindir}/docker-containerd-shim
|
|
| 137 |
-install -p -m 755 /usr/local/bin/docker-containerd-ctr $RPM_BUILD_ROOT/%{_bindir}/docker-containerd-ctr
|
|
| 138 |
- |
|
| 139 |
-# install runc |
|
| 140 |
-install -p -m 755 /usr/local/bin/docker-runc $RPM_BUILD_ROOT/%{_bindir}/docker-runc
|
|
| 141 |
- |
|
| 142 |
-# install tini |
|
| 143 |
-install -p -m 755 /usr/local/bin/docker-init $RPM_BUILD_ROOT/%{_bindir}/docker-init
|
|
| 144 |
- |
|
| 145 |
-# install udev rules |
|
| 146 |
-install -d $RPM_BUILD_ROOT/%{_sysconfdir}/udev/rules.d
|
|
| 147 |
-install -p -m 644 contrib/udev/80-docker.rules $RPM_BUILD_ROOT/%{_sysconfdir}/udev/rules.d/80-docker.rules
|
|
| 148 |
- |
|
| 149 |
-# add init scripts |
|
| 150 |
-install -d $RPM_BUILD_ROOT/etc/sysconfig |
|
| 151 |
-install -d $RPM_BUILD_ROOT/%{_initddir}
|
|
| 152 |
- |
|
| 153 |
- |
|
| 154 |
-%if 0%{?is_systemd}
|
|
| 155 |
-install -d $RPM_BUILD_ROOT/%{_unitdir}
|
|
| 156 |
-install -p -m 644 contrib/init/systemd/docker.service.rpm $RPM_BUILD_ROOT/%{_unitdir}/docker.service
|
|
| 157 |
-%else |
|
| 158 |
-install -p -m 644 contrib/init/sysvinit-redhat/docker.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/docker |
|
| 159 |
-install -p -m 755 contrib/init/sysvinit-redhat/docker $RPM_BUILD_ROOT/%{_initddir}/docker
|
|
| 160 |
-%endif |
|
| 161 |
-# add bash, zsh, and fish completions |
|
| 162 |
-install -d $RPM_BUILD_ROOT/usr/share/bash-completion/completions |
|
| 163 |
-install -d $RPM_BUILD_ROOT/usr/share/zsh/vendor-completions |
|
| 164 |
-install -d $RPM_BUILD_ROOT/usr/share/fish/vendor_completions.d |
|
| 165 |
-install -p -m 644 contrib/completion/bash/docker $RPM_BUILD_ROOT/usr/share/bash-completion/completions/docker |
|
| 166 |
-install -p -m 644 contrib/completion/zsh/_docker $RPM_BUILD_ROOT/usr/share/zsh/vendor-completions/_docker |
|
| 167 |
-install -p -m 644 contrib/completion/fish/docker.fish $RPM_BUILD_ROOT/usr/share/fish/vendor_completions.d/docker.fish |
|
| 168 |
- |
|
| 169 |
-# install manpages |
|
| 170 |
-install -d %{buildroot}%{_mandir}/man1
|
|
| 171 |
-install -p -m 644 man/man1/*.1 $RPM_BUILD_ROOT/%{_mandir}/man1
|
|
| 172 |
-install -d %{buildroot}%{_mandir}/man5
|
|
| 173 |
-install -p -m 644 man/man5/*.5 $RPM_BUILD_ROOT/%{_mandir}/man5
|
|
| 174 |
-install -d %{buildroot}%{_mandir}/man8
|
|
| 175 |
-install -p -m 644 man/man8/*.8 $RPM_BUILD_ROOT/%{_mandir}/man8
|
|
| 176 |
- |
|
| 177 |
-# add vimfiles |
|
| 178 |
-install -d $RPM_BUILD_ROOT/usr/share/vim/vimfiles/doc |
|
| 179 |
-install -d $RPM_BUILD_ROOT/usr/share/vim/vimfiles/ftdetect |
|
| 180 |
-install -d $RPM_BUILD_ROOT/usr/share/vim/vimfiles/syntax |
|
| 181 |
-install -p -m 644 contrib/syntax/vim/doc/dockerfile.txt $RPM_BUILD_ROOT/usr/share/vim/vimfiles/doc/dockerfile.txt |
|
| 182 |
-install -p -m 644 contrib/syntax/vim/ftdetect/dockerfile.vim $RPM_BUILD_ROOT/usr/share/vim/vimfiles/ftdetect/dockerfile.vim |
|
| 183 |
-install -p -m 644 contrib/syntax/vim/syntax/dockerfile.vim $RPM_BUILD_ROOT/usr/share/vim/vimfiles/syntax/dockerfile.vim |
|
| 184 |
- |
|
| 185 |
-# add nano |
|
| 186 |
-install -d $RPM_BUILD_ROOT/usr/share/nano |
|
| 187 |
-install -p -m 644 contrib/syntax/nano/Dockerfile.nanorc $RPM_BUILD_ROOT/usr/share/nano/Dockerfile.nanorc |
|
| 188 |
- |
|
| 189 |
-# list files owned by the package here |
|
| 190 |
-%files |
|
| 191 |
-%doc AUTHORS CHANGELOG.md CONTRIBUTING.md LICENSE MAINTAINERS NOTICE README.md |
|
| 192 |
-/%{_bindir}/docker
|
|
| 193 |
-/%{_bindir}/dockerd
|
|
| 194 |
-/%{_bindir}/docker-containerd
|
|
| 195 |
-/%{_bindir}/docker-containerd-shim
|
|
| 196 |
-/%{_bindir}/docker-containerd-ctr
|
|
| 197 |
-/%{_bindir}/docker-proxy
|
|
| 198 |
-/%{_bindir}/docker-runc
|
|
| 199 |
-/%{_bindir}/docker-init
|
|
| 200 |
-/%{_sysconfdir}/udev/rules.d/80-docker.rules
|
|
| 201 |
-%if 0%{?is_systemd}
|
|
| 202 |
-/%{_unitdir}/docker.service
|
|
| 203 |
-%else |
|
| 204 |
-%config(noreplace,missingok) /etc/sysconfig/docker |
|
| 205 |
-/%{_initddir}/docker
|
|
| 206 |
-%endif |
|
| 207 |
-/usr/share/bash-completion/completions/docker |
|
| 208 |
-/usr/share/zsh/vendor-completions/_docker |
|
| 209 |
-/usr/share/fish/vendor_completions.d/docker.fish |
|
| 210 |
-%doc |
|
| 211 |
-/%{_mandir}/man1/*
|
|
| 212 |
-/%{_mandir}/man5/*
|
|
| 213 |
-/%{_mandir}/man8/*
|
|
| 214 |
-/usr/share/vim/vimfiles/doc/dockerfile.txt |
|
| 215 |
-/usr/share/vim/vimfiles/ftdetect/dockerfile.vim |
|
| 216 |
-/usr/share/vim/vimfiles/syntax/dockerfile.vim |
|
| 217 |
-/usr/share/nano/Dockerfile.nanorc |
|
| 218 |
- |
|
| 219 |
-%post |
|
| 220 |
-%if 0%{?is_systemd}
|
|
| 221 |
-%systemd_post docker |
|
| 222 |
-%else |
|
| 223 |
-# This adds the proper /etc/rc*.d links for the script |
|
| 224 |
-/sbin/chkconfig --add docker |
|
| 225 |
-%endif |
|
| 226 |
-if ! getent group docker > /dev/null; then |
|
| 227 |
- groupadd --system docker |
|
| 228 |
-fi |
|
| 229 |
- |
|
| 230 |
-%preun |
|
| 231 |
-%if 0%{?is_systemd}
|
|
| 232 |
-%systemd_preun docker |
|
| 233 |
-%else |
|
| 234 |
-if [ $1 -eq 0 ] ; then |
|
| 235 |
- /sbin/service docker stop >/dev/null 2>&1 |
|
| 236 |
- /sbin/chkconfig --del docker |
|
| 237 |
-fi |
|
| 238 |
-%endif |
|
| 239 |
- |
|
| 240 |
-%postun |
|
| 241 |
-%if 0%{?is_systemd}
|
|
| 242 |
-%systemd_postun_with_restart docker |
|
| 243 |
-%else |
|
| 244 |
-if [ "$1" -ge "1" ] ; then |
|
| 245 |
- /sbin/service docker condrestart >/dev/null 2>&1 || : |
|
| 246 |
-fi |
|
| 247 |
-%endif |
|
| 248 |
- |
|
| 249 |
-%changelog |
| 250 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,91 +0,0 @@ |
| 1 |
-#!/usr/bin/env bash |
|
| 2 |
-set -e |
|
| 3 |
- |
|
| 4 |
-# subshell so that we can export PATH and TZ without breaking other things |
|
| 5 |
-( |
|
| 6 |
- export TZ=UTC # make sure our "date" variables are UTC-based |
|
| 7 |
- bundle .integration-daemon-start |
|
| 8 |
- bundle .detect-daemon-osarch |
|
| 9 |
- |
|
| 10 |
- # TODO consider using frozen images for the dockercore/builder-deb tags |
|
| 11 |
- |
|
| 12 |
- tilde='~' # ouch Bash 4.2 vs 4.3, you keel me |
|
| 13 |
- debVersion="${VERSION//-/$tilde}" # using \~ or '~' here works in 4.3, but not 4.2; just ~ causes $HOME to be inserted, hence the $tilde
|
|
| 14 |
- # if we have a "-dev" suffix or have change in Git, let's make this package version more complex so it works better |
|
| 15 |
- if [[ "$VERSION" == *-dev ]] || [ -n "$(git status --porcelain)" ]; then |
|
| 16 |
- gitUnix="$(git log -1 --pretty='%at')" |
|
| 17 |
- gitDate="$(date --date "@$gitUnix" +'%Y%m%d.%H%M%S')" |
|
| 18 |
- gitCommit="$(git log -1 --pretty='%h')" |
|
| 19 |
- gitVersion="git${gitDate}.0.${gitCommit}"
|
|
| 20 |
- # gitVersion is now something like 'git20150128.112847.0.17e840a' |
|
| 21 |
- debVersion="$debVersion~$gitVersion" |
|
| 22 |
- |
|
| 23 |
- # $ dpkg --compare-versions 1.5.0 gt 1.5.0~rc1 && echo true || echo false |
|
| 24 |
- # true |
|
| 25 |
- # $ dpkg --compare-versions 1.5.0~rc1 gt 1.5.0~git20150128.112847.17e840a && echo true || echo false |
|
| 26 |
- # true |
|
| 27 |
- # $ dpkg --compare-versions 1.5.0~git20150128.112847.17e840a gt 1.5.0~dev~git20150128.112847.17e840a && echo true || echo false |
|
| 28 |
- # true |
|
| 29 |
- |
|
| 30 |
- # ie, 1.5.0 > 1.5.0~rc1 > 1.5.0~git20150128.112847.17e840a > 1.5.0~dev~git20150128.112847.17e840a |
|
| 31 |
- fi |
|
| 32 |
- |
|
| 33 |
- debSource="$(awk -F ': ' '$1 == "Source" { print $2; exit }' hack/make/.build-deb/control)"
|
|
| 34 |
- debMaintainer="$(awk -F ': ' '$1 == "Maintainer" { print $2; exit }' hack/make/.build-deb/control)"
|
|
| 35 |
- debDate="$(date --rfc-2822)" |
|
| 36 |
- |
|
| 37 |
- # if go-md2man is available, pre-generate the man pages |
|
| 38 |
- make manpages |
|
| 39 |
- |
|
| 40 |
- builderDir="contrib/builder/deb/${PACKAGE_ARCH}"
|
|
| 41 |
- pkgs=( $(find "${builderDir}/"*/ -type d) )
|
|
| 42 |
- if [ ! -z "$DOCKER_BUILD_PKGS" ]; then |
|
| 43 |
- pkgs=() |
|
| 44 |
- for p in $DOCKER_BUILD_PKGS; do |
|
| 45 |
- pkgs+=( "$builderDir/$p" ) |
|
| 46 |
- done |
|
| 47 |
- fi |
|
| 48 |
- for dir in "${pkgs[@]}"; do
|
|
| 49 |
- [ -d "$dir" ] || { echo >&2 "skipping nonexistent $dir"; continue; }
|
|
| 50 |
- version="$(basename "$dir")" |
|
| 51 |
- suite="${version##*-}"
|
|
| 52 |
- |
|
| 53 |
- image="dockercore/builder-deb:$version" |
|
| 54 |
- if ! docker inspect "$image" &> /dev/null; then |
|
| 55 |
- ( |
|
| 56 |
- # Add the APT_MIRROR args only if the consuming Dockerfile uses it |
|
| 57 |
- # Otherwise this will cause the build to fail |
|
| 58 |
- if [ "$(grep 'ARG APT_MIRROR=' $dir/Dockerfile)" ] && [ "$BUILD_APT_MIRROR" ]; then |
|
| 59 |
- DOCKER_BUILD_ARGS="$DOCKER_BUILD_ARGS $BUILD_APT_MIRROR" |
|
| 60 |
- fi |
|
| 61 |
- set -x && docker build ${DOCKER_BUILD_ARGS} -t "$image" "$dir"
|
|
| 62 |
- ) |
|
| 63 |
- fi |
|
| 64 |
- |
|
| 65 |
- mkdir -p "$DEST/$version" |
|
| 66 |
- cat > "$DEST/$version/Dockerfile.build" <<-EOF |
|
| 67 |
- FROM $image |
|
| 68 |
- WORKDIR /usr/src/docker |
|
| 69 |
- COPY . /usr/src/docker |
|
| 70 |
- ENV DOCKER_GITCOMMIT $GITCOMMIT |
|
| 71 |
- RUN mkdir -p /go/src/github.com/docker && mkdir -p /go/src/github.com/opencontainers \ |
|
| 72 |
- && ln -snf /usr/src/docker /go/src/github.com/docker/docker |
|
| 73 |
- EOF |
|
| 74 |
- |
|
| 75 |
- cat >> "$DEST/$version/Dockerfile.build" <<-EOF |
|
| 76 |
- # Install runc, containerd, proxy and tini |
|
| 77 |
- RUN ./hack/dockerfile/install-binaries.sh runc-dynamic containerd-dynamic proxy-dynamic tini |
|
| 78 |
- EOF |
|
| 79 |
- cat >> "$DEST/$version/Dockerfile.build" <<-EOF |
|
| 80 |
- RUN cp -aL hack/make/.build-deb debian |
|
| 81 |
- RUN { echo '$debSource (${debVersion}-0~${version}) $suite; urgency=low'; echo; echo ' * Version: $VERSION'; echo; echo " -- $debMaintainer $debDate"; } > debian/changelog && cat >&2 debian/changelog
|
|
| 82 |
- RUN dpkg-buildpackage -uc -us -I.git |
|
| 83 |
- EOF |
|
| 84 |
- tempImage="docker-temp/build-deb:$version" |
|
| 85 |
- ( set -x && docker build ${DOCKER_BUILD_ARGS} -t "$tempImage" -f "$DEST/$version/Dockerfile.build" . )
|
|
| 86 |
- docker run --rm "$tempImage" bash -c 'cd .. && tar -c *_*' | tar -xvC "$DEST/$version" |
|
| 87 |
- docker rmi "$tempImage" |
|
| 88 |
- done |
|
| 89 |
- |
|
| 90 |
- bundle .integration-daemon-stop |
|
| 91 |
-) 2>&1 | tee -a "$DEST/test.log" |
| 92 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,148 +0,0 @@ |
| 1 |
-#!/usr/bin/env bash |
|
| 2 |
-set -e |
|
| 3 |
- |
|
| 4 |
-# subshell so that we can export PATH and TZ without breaking other things |
|
| 5 |
-( |
|
| 6 |
- export TZ=UTC # make sure our "date" variables are UTC-based |
|
| 7 |
- |
|
| 8 |
- source "$(dirname "$BASH_SOURCE")/.integration-daemon-start" |
|
| 9 |
- source "$(dirname "$BASH_SOURCE")/.detect-daemon-osarch" |
|
| 10 |
- |
|
| 11 |
- # TODO consider using frozen images for the dockercore/builder-rpm tags |
|
| 12 |
- |
|
| 13 |
- rpmName=docker-engine |
|
| 14 |
- rpmVersion="$VERSION" |
|
| 15 |
- rpmRelease=1 |
|
| 16 |
- |
|
| 17 |
- # rpmRelease versioning is as follows |
|
| 18 |
- # Docker 1.7.0: version=1.7.0, release=1 |
|
| 19 |
- # Docker 1.7.0-rc1: version=1.7.0, release=0.1.rc1 |
|
| 20 |
- # Docker 1.7.0-cs1: version=1.7.0.cs1, release=1 |
|
| 21 |
- # Docker 1.7.0-cs1-rc1: version=1.7.0.cs1, release=0.1.rc1 |
|
| 22 |
- # Docker 1.7.0-dev nightly: version=1.7.0, release=0.0.YYYYMMDD.HHMMSS.gitHASH |
|
| 23 |
- |
|
| 24 |
- # if we have a "-rc*" suffix, set appropriate release |
|
| 25 |
- if [[ "$rpmVersion" =~ .*-rc[0-9]+$ ]] ; then |
|
| 26 |
- rcVersion=${rpmVersion#*-rc}
|
|
| 27 |
- rpmVersion=${rpmVersion%-rc*}
|
|
| 28 |
- rpmRelease="0.${rcVersion}.rc${rcVersion}"
|
|
| 29 |
- fi |
|
| 30 |
- |
|
| 31 |
- DOCKER_GITCOMMIT=$(git rev-parse --short HEAD) |
|
| 32 |
- if [ -n "$(git status --porcelain --untracked-files=no)" ]; then |
|
| 33 |
- DOCKER_GITCOMMIT="$DOCKER_GITCOMMIT-unsupported" |
|
| 34 |
- fi |
|
| 35 |
- |
|
| 36 |
- # if we have a "-dev" suffix or have change in Git, let's make this package version more complex so it works better |
|
| 37 |
- if [[ "$rpmVersion" == *-dev ]] || [ -n "$(git status --porcelain)" ]; then |
|
| 38 |
- gitUnix="$(git log -1 --pretty='%at')" |
|
| 39 |
- gitDate="$(date --date "@$gitUnix" +'%Y%m%d.%H%M%S')" |
|
| 40 |
- gitCommit="$(git log -1 --pretty='%h')" |
|
| 41 |
- gitVersion="${gitDate}.git${gitCommit}"
|
|
| 42 |
- # gitVersion is now something like '20150128.112847.17e840a' |
|
| 43 |
- rpmVersion="${rpmVersion%-dev}"
|
|
| 44 |
- rpmRelease="0.0.$gitVersion" |
|
| 45 |
- fi |
|
| 46 |
- |
|
| 47 |
- # Replace any other dashes with periods |
|
| 48 |
- rpmVersion="${rpmVersion/-/.}"
|
|
| 49 |
- |
|
| 50 |
- rpmPackager="$(awk -F ': ' '$1 == "Packager" { print $2; exit }' hack/make/.build-rpm/${rpmName}.spec)"
|
|
| 51 |
- rpmDate="$(date +'%a %b %d %Y')" |
|
| 52 |
- |
|
| 53 |
- # if go-md2man is available, pre-generate the man pages |
|
| 54 |
- make manpages |
|
| 55 |
- |
|
| 56 |
- # Convert the CHANGELOG.md file into RPM changelog format |
|
| 57 |
- rm -f contrib/builder/rpm/${PACKAGE_ARCH}/changelog
|
|
| 58 |
- VERSION_REGEX="^\W\W (.*) \((.*)\)$" |
|
| 59 |
- ENTRY_REGEX="^[-+*] (.*)$" |
|
| 60 |
- while read -r line || [[ -n "$line" ]]; do |
|
| 61 |
- if [ -z "$line" ]; then continue; fi |
|
| 62 |
- if [[ "$line" =~ $VERSION_REGEX ]]; then |
|
| 63 |
- echo >> contrib/builder/rpm/${PACKAGE_ARCH}/changelog
|
|
| 64 |
- echo "* `date -d ${BASH_REMATCH[2]} '+%a %b %d %Y'` ${rpmPackager} - ${BASH_REMATCH[1]}" >> contrib/builder/rpm/${PACKAGE_ARCH}/changelog
|
|
| 65 |
- fi |
|
| 66 |
- if [[ "$line" =~ $ENTRY_REGEX ]]; then |
|
| 67 |
- echo "- ${BASH_REMATCH[1]//\`}" >> contrib/builder/rpm/${PACKAGE_ARCH}/changelog
|
|
| 68 |
- fi |
|
| 69 |
- done < CHANGELOG.md |
|
| 70 |
- |
|
| 71 |
- builderDir="contrib/builder/rpm/${PACKAGE_ARCH}"
|
|
| 72 |
- pkgs=( $(find "${builderDir}/"*/ -type d) )
|
|
| 73 |
- if [ ! -z "$DOCKER_BUILD_PKGS" ]; then |
|
| 74 |
- pkgs=() |
|
| 75 |
- for p in $DOCKER_BUILD_PKGS; do |
|
| 76 |
- pkgs+=( "$builderDir/$p" ) |
|
| 77 |
- done |
|
| 78 |
- fi |
|
| 79 |
- for dir in "${pkgs[@]}"; do
|
|
| 80 |
- [ -d "$dir" ] || { echo >&2 "skipping nonexistent $dir"; continue; }
|
|
| 81 |
- version="$(basename "$dir")" |
|
| 82 |
- suite="${version##*-}"
|
|
| 83 |
- |
|
| 84 |
- image="dockercore/builder-rpm:$version" |
|
| 85 |
- if ! docker inspect "$image" &> /dev/null; then |
|
| 86 |
- ( set -x && docker build ${DOCKER_BUILD_ARGS} -t "$image" "$dir" )
|
|
| 87 |
- fi |
|
| 88 |
- |
|
| 89 |
- mkdir -p "$DEST/$version" |
|
| 90 |
- cat > "$DEST/$version/Dockerfile.build" <<-EOF |
|
| 91 |
- FROM $image |
|
| 92 |
- COPY . /usr/src/${rpmName}
|
|
| 93 |
- WORKDIR /usr/src/${rpmName}
|
|
| 94 |
- RUN mkdir -p /go/src/github.com/docker && mkdir -p /go/src/github.com/opencontainers |
|
| 95 |
- EOF |
|
| 96 |
- |
|
| 97 |
- cat >> "$DEST/$version/Dockerfile.build" <<-EOF |
|
| 98 |
- # Install runc, containerd, proxy and tini |
|
| 99 |
- RUN TMP_GOPATH="/go" ./hack/dockerfile/install-binaries.sh runc-dynamic containerd-dynamic proxy-dynamic tini |
|
| 100 |
- EOF |
|
| 101 |
- if [[ "$VERSION" == *-dev ]] || [ -n "$(git status --porcelain)" ]; then |
|
| 102 |
- echo 'ENV DOCKER_EXPERIMENTAL 1' >> "$DEST/$version/Dockerfile.build" |
|
| 103 |
- fi |
|
| 104 |
- cat >> "$DEST/$version/Dockerfile.build" <<-EOF |
|
| 105 |
- RUN mkdir -p /root/rpmbuild/SOURCES \ |
|
| 106 |
- && echo '%_topdir /root/rpmbuild' > /root/.rpmmacros |
|
| 107 |
- WORKDIR /root/rpmbuild |
|
| 108 |
- RUN ln -sfv /usr/src/${rpmName}/hack/make/.build-rpm SPECS
|
|
| 109 |
- WORKDIR /root/rpmbuild/SPECS |
|
| 110 |
- RUN tar --exclude .git -r -C /usr/src -f /root/rpmbuild/SOURCES/${rpmName}.tar ${rpmName}
|
|
| 111 |
- RUN tar --exclude .git -r -C /go/src/github.com/docker -f /root/rpmbuild/SOURCES/${rpmName}.tar containerd
|
|
| 112 |
- RUN tar --exclude .git -r -C /go/src/github.com/docker/libnetwork/cmd -f /root/rpmbuild/SOURCES/${rpmName}.tar proxy
|
|
| 113 |
- RUN tar --exclude .git -r -C /go/src/github.com/opencontainers -f /root/rpmbuild/SOURCES/${rpmName}.tar runc
|
|
| 114 |
- RUN tar --exclude .git -r -C /go/ -f /root/rpmbuild/SOURCES/${rpmName}.tar tini
|
|
| 115 |
- RUN gzip /root/rpmbuild/SOURCES/${rpmName}.tar
|
|
| 116 |
- RUN { cat /usr/src/${rpmName}/contrib/builder/rpm/${PACKAGE_ARCH}/changelog; } >> ${rpmName}.spec && tail >&2 ${rpmName}.spec
|
|
| 117 |
- RUN rpmbuild -ba \ |
|
| 118 |
- --define '_gitcommit $DOCKER_GITCOMMIT' \ |
|
| 119 |
- --define '_release $rpmRelease' \ |
|
| 120 |
- --define '_version $rpmVersion' \ |
|
| 121 |
- --define '_origversion $VERSION' \ |
|
| 122 |
- --define '_experimental ${DOCKER_EXPERIMENTAL:-0}' \
|
|
| 123 |
- ${rpmName}.spec
|
|
| 124 |
- EOF |
|
| 125 |
- # selinux policy referencing systemd things won't work on non-systemd versions |
|
| 126 |
- # of centos or rhel, which we don't support anyways |
|
| 127 |
- if [ "${suite%.*}" -gt 6 ] && [[ "$version" != opensuse* ]]; then
|
|
| 128 |
- if [ -d "./contrib/selinux-$version" ]; then |
|
| 129 |
- selinuxDir="selinux-${version}"
|
|
| 130 |
- cat >> "$DEST/$version/Dockerfile.build" <<-EOF |
|
| 131 |
- RUN tar -cz -C /usr/src/${rpmName}/contrib/${selinuxDir} -f /root/rpmbuild/SOURCES/${rpmName}-selinux.tar.gz ${rpmName}-selinux
|
|
| 132 |
- RUN rpmbuild -ba \ |
|
| 133 |
- --define '_gitcommit $DOCKER_GITCOMMIT' \ |
|
| 134 |
- --define '_release $rpmRelease' \ |
|
| 135 |
- --define '_version $rpmVersion' \ |
|
| 136 |
- --define '_origversion $VERSION' \ |
|
| 137 |
- ${rpmName}-selinux.spec
|
|
| 138 |
- EOF |
|
| 139 |
- fi |
|
| 140 |
- fi |
|
| 141 |
- tempImage="docker-temp/build-rpm:$version" |
|
| 142 |
- ( set -x && docker build ${DOCKER_BUILD_ARGS} -t "$tempImage" -f $DEST/$version/Dockerfile.build . )
|
|
| 143 |
- docker run --rm "$tempImage" bash -c 'cd /root/rpmbuild && tar -c *RPMS' | tar -xvC "$DEST/$version" |
|
| 144 |
- docker rmi "$tempImage" |
|
| 145 |
- done |
|
| 146 |
- |
|
| 147 |
- source "$(dirname "$BASH_SOURCE")/.integration-daemon-stop" |
|
| 148 |
-) 2>&1 | tee -a $DEST/test.log |
| 149 | 1 |
deleted file mode 100755 |
| ... | ... |
@@ -1,43 +0,0 @@ |
| 1 |
-#!/usr/bin/env bash |
|
| 2 |
-set -e |
|
| 3 |
- |
|
| 4 |
-# This script cleans the experimental pool for the apt repo. |
|
| 5 |
-# This is useful when there are a lot of old experimental debs and you only want to keep the most recent. |
|
| 6 |
-# |
|
| 7 |
- |
|
| 8 |
-: ${DOCKER_RELEASE_DIR:=$DEST}
|
|
| 9 |
-APTDIR=$DOCKER_RELEASE_DIR/apt/repo/pool/experimental |
|
| 10 |
-: ${DOCKER_ARCHIVE_DIR:=$DEST/archive}
|
|
| 11 |
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
| 12 |
- |
|
| 13 |
-latest_versions=$(dpkg-scanpackages "$APTDIR" /dev/null 2>/dev/null | awk -F ': ' '$1 == "Filename" { print $2 }')
|
|
| 14 |
- |
|
| 15 |
-# get the latest version |
|
| 16 |
-latest_docker_engine_file=$(echo "$latest_versions" | grep docker-engine) |
|
| 17 |
-latest_docker_engine_version=$(basename ${latest_docker_engine_file%~*})
|
|
| 18 |
- |
|
| 19 |
-echo "latest docker-engine version: $latest_docker_engine_version" |
|
| 20 |
- |
|
| 21 |
-# remove all the files that are not that version in experimental |
|
| 22 |
-pool_dir=$(dirname "$latest_docker_engine_file") |
|
| 23 |
-old_pkgs=( $(ls "$pool_dir" | grep -v "^${latest_docker_engine_version}" | grep "${latest_docker_engine_version%%~git*}") )
|
|
| 24 |
- |
|
| 25 |
-echo "${old_pkgs[@]}"
|
|
| 26 |
- |
|
| 27 |
-mkdir -p "$DOCKER_ARCHIVE_DIR" |
|
| 28 |
-for old_pkg in "${old_pkgs[@]}"; do
|
|
| 29 |
- echo "moving ${pool_dir}/${old_pkg} to $DOCKER_ARCHIVE_DIR"
|
|
| 30 |
- mv "${pool_dir}/${old_pkg}" "$DOCKER_ARCHIVE_DIR"
|
|
| 31 |
-done |
|
| 32 |
- |
|
| 33 |
-echo |
|
| 34 |
-echo "$pool_dir now has contents:" |
|
| 35 |
-ls "$pool_dir" |
|
| 36 |
- |
|
| 37 |
-# now regenerate release files for experimental |
|
| 38 |
-export COMPONENT=experimental |
|
| 39 |
-source "${DIR}/update-apt-repo"
|
|
| 40 |
- |
|
| 41 |
-echo "You will now want to: " |
|
| 42 |
-echo " - re-sign the repo with hack/make/sign-repo" |
|
| 43 |
-echo " - re-generate index files with hack/make/generate-index-listing" |
| 44 | 1 |
deleted file mode 100755 |
| ... | ... |
@@ -1,20 +0,0 @@ |
| 1 |
-#!/usr/bin/env bash |
|
| 2 |
-set -e |
|
| 3 |
- |
|
| 4 |
-# This script cleans the experimental pool for the yum repo. |
|
| 5 |
-# This is useful when there are a lot of old experimental rpms and you only want to keep the most recent. |
|
| 6 |
-# |
|
| 7 |
- |
|
| 8 |
-: ${DOCKER_RELEASE_DIR:=$DEST}
|
|
| 9 |
-YUMDIR=$DOCKER_RELEASE_DIR/yum/repo/experimental |
|
| 10 |
- |
|
| 11 |
-suites=( $(find "$YUMDIR" -mindepth 1 -maxdepth 1 -type d) ) |
|
| 12 |
- |
|
| 13 |
-for suite in "${suites[@]}"; do
|
|
| 14 |
- echo "cleanup in: $suite" |
|
| 15 |
- ( set -x; repomanage -k2 --old "$suite" | xargs rm -f ) |
|
| 16 |
-done |
|
| 17 |
- |
|
| 18 |
-echo "You will now want to: " |
|
| 19 |
-echo " - re-sign the repo with hack/make/sign-repo" |
|
| 20 |
-echo " - re-generate index files with hack/make/generate-index-listing" |
| 21 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,15 +0,0 @@ |
| 1 |
-#!/usr/bin/env bash |
|
| 2 |
-set -e |
|
| 3 |
- |
|
| 4 |
-bundle_cover() {
|
|
| 5 |
- coverprofiles=( "$DEST/../"*"/coverprofiles/"* ) |
|
| 6 |
- for p in "${coverprofiles[@]}"; do
|
|
| 7 |
- echo |
|
| 8 |
- ( |
|
| 9 |
- set -x |
|
| 10 |
- go tool cover -func="$p" |
|
| 11 |
- ) |
|
| 12 |
- done |
|
| 13 |
-} |
|
| 14 |
- |
|
| 15 |
-bundle_cover 2>&1 | tee "$DEST/report.log" |
| 16 | 1 |
deleted file mode 100755 |
| ... | ... |
@@ -1,74 +0,0 @@ |
| 1 |
-#!/usr/bin/env bash |
|
| 2 |
-set -e |
|
| 3 |
- |
|
| 4 |
-# This script generates index files for the directory structure |
|
| 5 |
-# of the apt and yum repos |
|
| 6 |
- |
|
| 7 |
-: ${DOCKER_RELEASE_DIR:=$DEST}
|
|
| 8 |
-APTDIR=$DOCKER_RELEASE_DIR/apt |
|
| 9 |
-YUMDIR=$DOCKER_RELEASE_DIR/yum |
|
| 10 |
- |
|
| 11 |
-if [ ! -d $APTDIR ] && [ ! -d $YUMDIR ]; then |
|
| 12 |
- echo >&2 'release-rpm or release-deb must be run before generate-index-listing' |
|
| 13 |
- exit 1 |
|
| 14 |
-fi |
|
| 15 |
- |
|
| 16 |
-create_index() {
|
|
| 17 |
- local directory=$1 |
|
| 18 |
- local original=$2 |
|
| 19 |
- local cleaned=${directory#$original}
|
|
| 20 |
- |
|
| 21 |
- # the index file to create |
|
| 22 |
- local index_file="${directory}/index"
|
|
| 23 |
- |
|
| 24 |
- # cd into dir & touch the index file |
|
| 25 |
- cd $directory |
|
| 26 |
- touch $index_file |
|
| 27 |
- |
|
| 28 |
- # print the html header |
|
| 29 |
- cat <<-EOF > "$index_file" |
|
| 30 |
- <!DOCTYPE html> |
|
| 31 |
- <html> |
|
| 32 |
- <head><title>Index of ${cleaned}/</title></head>
|
|
| 33 |
- <body bgcolor="white"> |
|
| 34 |
- <h1>Index of ${cleaned}/</h1><hr>
|
|
| 35 |
- <pre><a href="../">../</a> |
|
| 36 |
- EOF |
|
| 37 |
- |
|
| 38 |
- # start of content output |
|
| 39 |
- ( |
|
| 40 |
- # change IFS locally within subshell so the for loop saves line correctly to L var |
|
| 41 |
- IFS=$'\n'; |
|
| 42 |
- |
|
| 43 |
- # pretty sweet, will mimic the normal apache output. skipping "index" and hidden files |
|
| 44 |
- for L in $(find -L . -mount -depth -maxdepth 1 -type f ! -name 'index' ! -name '.*' -prune -printf "<a href=\"%f\">%f|@_@%Td-%Tb-%TY %Tk:%TM @%f@\n"|sort|column -t -s '|' | sed 's,\([\ ]\+\)@_@,</a>\1,g'); |
|
| 45 |
- do |
|
| 46 |
- # file |
|
| 47 |
- F=$(sed -e 's,^.*@\([^@]\+\)@.*$,\1,g'<<<"$L"); |
|
| 48 |
- |
|
| 49 |
- # file with file size |
|
| 50 |
- F=$(du -bh $F | cut -f1); |
|
| 51 |
- |
|
| 52 |
- # output with correct format |
|
| 53 |
- sed -e 's,\ @.*$, '"$F"',g'<<<"$L"; |
|
| 54 |
- done; |
|
| 55 |
- ) >> $index_file; |
|
| 56 |
- |
|
| 57 |
- # now output a list of all directories in this dir (maxdepth 1) other than '.' outputting in a sorted manner exactly like apache |
|
| 58 |
- find -L . -mount -depth -maxdepth 1 -type d ! -name '.' -printf "<a href=\"%f\">%-43f@_@%Td-%Tb-%TY %Tk:%TM -\n"|sort -d|sed 's,\([\ ]\+\)@_@,/</a>\1,g' >> $index_file |
|
| 59 |
- |
|
| 60 |
- # print the footer html |
|
| 61 |
- echo "</pre><hr></body></html>" >> $index_file |
|
| 62 |
- |
|
| 63 |
-} |
|
| 64 |
- |
|
| 65 |
-get_dirs() {
|
|
| 66 |
- local directory=$1 |
|
| 67 |
- |
|
| 68 |
- for d in `find ${directory} -type d`; do
|
|
| 69 |
- create_index $d $directory |
|
| 70 |
- done |
|
| 71 |
-} |
|
| 72 |
- |
|
| 73 |
-get_dirs $APTDIR |
|
| 74 |
-get_dirs $YUMDIR |
| 75 | 1 |
old mode 100755 |
| 76 | 2 |
new mode 100644 |
| ... | ... |
@@ -3,6 +3,27 @@ |
| 3 | 3 |
set -e |
| 4 | 4 |
rm -rf "$DEST" |
| 5 | 5 |
|
| 6 |
+install_binary() {
|
|
| 7 |
+ local file="$1" |
|
| 8 |
+ local target="${DOCKER_MAKE_INSTALL_PREFIX:=/usr/local}/bin/"
|
|
| 9 |
+ if [ "$(go env GOOS)" == "linux" ]; then |
|
| 10 |
+ echo "Installing $(basename $file) to ${target}"
|
|
| 11 |
+ mkdir -p "$target" |
|
| 12 |
+ cp -f -L "$file" "$target" |
|
| 13 |
+ else |
|
| 14 |
+ echo "Install is only supported on linux" |
|
| 15 |
+ return 1 |
|
| 16 |
+ fi |
|
| 17 |
+} |
|
| 18 |
+ |
|
| 6 | 19 |
( |
| 7 |
- source "${MAKEDIR}/install-binary-daemon"
|
|
| 20 |
+ DEST="$(dirname $DEST)/binary-daemon" |
|
| 21 |
+ source "${MAKEDIR}/.binary-setup"
|
|
| 22 |
+ install_binary "${DEST}/${DOCKER_DAEMON_BINARY_NAME}"
|
|
| 23 |
+ install_binary "${DEST}/${DOCKER_RUNC_BINARY_NAME}"
|
|
| 24 |
+ install_binary "${DEST}/${DOCKER_CONTAINERD_BINARY_NAME}"
|
|
| 25 |
+ install_binary "${DEST}/${DOCKER_CONTAINERD_CTR_BINARY_NAME}"
|
|
| 26 |
+ install_binary "${DEST}/${DOCKER_CONTAINERD_SHIM_BINARY_NAME}"
|
|
| 27 |
+ install_binary "${DEST}/${DOCKER_PROXY_BINARY_NAME}"
|
|
| 28 |
+ install_binary "${DEST}/${DOCKER_INIT_BINARY_NAME}"
|
|
| 8 | 29 |
) |
| 9 | 30 |
deleted file mode 100644 |
| ... | ... |
@@ -1,29 +0,0 @@ |
| 1 |
-#!/usr/bin/env bash |
|
| 2 |
- |
|
| 3 |
-set -e |
|
| 4 |
-rm -rf "$DEST" |
|
| 5 |
- |
|
| 6 |
-install_binary() {
|
|
| 7 |
- local file="$1" |
|
| 8 |
- local target="${DOCKER_MAKE_INSTALL_PREFIX:=/usr/local}/bin/"
|
|
| 9 |
- if [ "$(go env GOOS)" == "linux" ]; then |
|
| 10 |
- echo "Installing $(basename $file) to ${target}"
|
|
| 11 |
- mkdir -p "$target" |
|
| 12 |
- cp -f -L "$file" "$target" |
|
| 13 |
- else |
|
| 14 |
- echo "Install is only supported on linux" |
|
| 15 |
- return 1 |
|
| 16 |
- fi |
|
| 17 |
-} |
|
| 18 |
- |
|
| 19 |
-( |
|
| 20 |
- DEST="$(dirname $DEST)/binary-daemon" |
|
| 21 |
- source "${MAKEDIR}/.binary-setup"
|
|
| 22 |
- install_binary "${DEST}/${DOCKER_DAEMON_BINARY_NAME}"
|
|
| 23 |
- install_binary "${DEST}/${DOCKER_RUNC_BINARY_NAME}"
|
|
| 24 |
- install_binary "${DEST}/${DOCKER_CONTAINERD_BINARY_NAME}"
|
|
| 25 |
- install_binary "${DEST}/${DOCKER_CONTAINERD_CTR_BINARY_NAME}"
|
|
| 26 |
- install_binary "${DEST}/${DOCKER_CONTAINERD_SHIM_BINARY_NAME}"
|
|
| 27 |
- install_binary "${DEST}/${DOCKER_PROXY_BINARY_NAME}"
|
|
| 28 |
- install_binary "${DEST}/${DOCKER_INIT_BINARY_NAME}"
|
|
| 29 |
-) |
| 30 | 1 |
deleted file mode 100755 |
| ... | ... |
@@ -1,163 +0,0 @@ |
| 1 |
-#!/usr/bin/env bash |
|
| 2 |
-set -e |
|
| 3 |
- |
|
| 4 |
-# This script creates the apt repos for the .deb files generated by hack/make/build-deb |
|
| 5 |
-# |
|
| 6 |
-# The following can then be used as apt sources: |
|
| 7 |
-# deb http://apt.dockerproject.org/repo $distro-$release $version |
|
| 8 |
-# |
|
| 9 |
-# For example: |
|
| 10 |
-# deb http://apt.dockerproject.org/repo ubuntu-trusty main |
|
| 11 |
-# deb http://apt.dockerproject.org/repo ubuntu-trusty testing |
|
| 12 |
-# deb http://apt.dockerproject.org/repo debian-wheezy experimental |
|
| 13 |
-# deb http://apt.dockerproject.org/repo debian-jessie main |
|
| 14 |
-# |
|
| 15 |
-# ... and so on and so forth for the builds created by hack/make/build-deb |
|
| 16 |
- |
|
| 17 |
-: ${DOCKER_RELEASE_DIR:=$DEST}
|
|
| 18 |
-: ${GPG_KEYID:=releasedocker}
|
|
| 19 |
-APTDIR=$DOCKER_RELEASE_DIR/apt/repo |
|
| 20 |
- |
|
| 21 |
-# setup the apt repo (if it does not exist) |
|
| 22 |
-mkdir -p "$APTDIR/conf" "$APTDIR/db" "$APTDIR/dists" |
|
| 23 |
- |
|
| 24 |
-# supported arches/sections |
|
| 25 |
-arches=( amd64 i386 armhf ppc64le s390x ) |
|
| 26 |
- |
|
| 27 |
-# Preserve existing components but don't add any non-existing ones |
|
| 28 |
-for component in main testing experimental ; do |
|
| 29 |
- exists=$(find "$APTDIR/dists" -mindepth 2 -maxdepth 2 -type d -name "$component" -print -quit) |
|
| 30 |
- if [ -n "$exists" ] ; then |
|
| 31 |
- components+=( $component ) |
|
| 32 |
- fi |
|
| 33 |
-done |
|
| 34 |
- |
|
| 35 |
-# set the component for the version being released |
|
| 36 |
-component="main" |
|
| 37 |
- |
|
| 38 |
-if [[ "$VERSION" == *-rc* ]]; then |
|
| 39 |
- component="testing" |
|
| 40 |
-fi |
|
| 41 |
- |
|
| 42 |
-if [[ "$VERSION" == *-dev ]] || [ -n "$(git status --porcelain)" ]; then |
|
| 43 |
- component="experimental" |
|
| 44 |
-fi |
|
| 45 |
- |
|
| 46 |
-# Make sure our component is in the list of components |
|
| 47 |
-if [[ ! "${components[*]}" =~ $component ]] ; then
|
|
| 48 |
- components+=( $component ) |
|
| 49 |
-fi |
|
| 50 |
- |
|
| 51 |
-# create apt-ftparchive file on every run. This is essential to avoid |
|
| 52 |
-# using stale versions of the config file that could cause unnecessary |
|
| 53 |
-# refreshing of bits for EOL-ed releases. |
|
| 54 |
-cat <<-EOF > "$APTDIR/conf/apt-ftparchive.conf" |
|
| 55 |
-Dir {
|
|
| 56 |
- ArchiveDir "${APTDIR}";
|
|
| 57 |
- CacheDir "${APTDIR}/db";
|
|
| 58 |
-}; |
|
| 59 |
- |
|
| 60 |
-Default {
|
|
| 61 |
- Packages::Compress ". gzip bzip2"; |
|
| 62 |
- Sources::Compress ". gzip bzip2"; |
|
| 63 |
- Contents::Compress ". gzip bzip2"; |
|
| 64 |
-}; |
|
| 65 |
- |
|
| 66 |
-TreeDefault {
|
|
| 67 |
- BinCacheDB "packages-\$(SECTION)-\$(ARCH).db"; |
|
| 68 |
- Directory "pool/\$(SECTION)"; |
|
| 69 |
- Packages "\$(DIST)/\$(SECTION)/binary-\$(ARCH)/Packages"; |
|
| 70 |
- SrcDirectory "pool/\$(SECTION)"; |
|
| 71 |
- Sources "\$(DIST)/\$(SECTION)/source/Sources"; |
|
| 72 |
- Contents "\$(DIST)/\$(SECTION)/Contents-\$(ARCH)"; |
|
| 73 |
- FileList "$APTDIR/\$(DIST)/\$(SECTION)/filelist"; |
|
| 74 |
-}; |
|
| 75 |
-EOF |
|
| 76 |
- |
|
| 77 |
-for dir in bundles/$VERSION/build-deb/*/; do |
|
| 78 |
- version="$(basename "$dir")" |
|
| 79 |
- suite="${version//debootstrap-}"
|
|
| 80 |
- |
|
| 81 |
- cat <<-EOF |
|
| 82 |
- Tree "dists/${suite}" {
|
|
| 83 |
- Sections "${components[*]}";
|
|
| 84 |
- Architectures "${arches[*]}";
|
|
| 85 |
- } |
|
| 86 |
- |
|
| 87 |
- EOF |
|
| 88 |
-done >> "$APTDIR/conf/apt-ftparchive.conf" |
|
| 89 |
- |
|
| 90 |
-cat <<-EOF > "$APTDIR/conf/docker-engine-release.conf" |
|
| 91 |
-APT::FTPArchive::Release::Origin "Docker"; |
|
| 92 |
-APT::FTPArchive::Release::Components "${components[*]}";
|
|
| 93 |
-APT::FTPArchive::Release::Label "Docker APT Repository"; |
|
| 94 |
-APT::FTPArchive::Release::Architectures "${arches[*]}";
|
|
| 95 |
-EOF |
|
| 96 |
- |
|
| 97 |
-# release the debs |
|
| 98 |
-for dir in bundles/$VERSION/build-deb/*/; do |
|
| 99 |
- version="$(basename "$dir")" |
|
| 100 |
- codename="${version//debootstrap-}"
|
|
| 101 |
- |
|
| 102 |
- tempdir="$(mktemp -d /tmp/tmp-docker-release-deb.XXXXXXXX)" |
|
| 103 |
- DEBFILE=( "$dir/docker-engine"*.deb ) |
|
| 104 |
- |
|
| 105 |
- # add the deb for each component for the distro version into the |
|
| 106 |
- # pool (if it is not there already) |
|
| 107 |
- mkdir -p "$APTDIR/pool/$component/d/docker-engine/" |
|
| 108 |
- for deb in ${DEBFILE[@]}; do
|
|
| 109 |
- d=$(basename "$deb") |
|
| 110 |
- # We do not want to generate a new deb if it has already been |
|
| 111 |
- # copied into the APTDIR |
|
| 112 |
- if [ ! -f "$APTDIR/pool/$component/d/docker-engine/$d" ]; then |
|
| 113 |
- cp "$deb" "$tempdir/" |
|
| 114 |
- # if we have a $GPG_PASSPHRASE we may as well |
|
| 115 |
- # dpkg-sign before copying the deb into the pool |
|
| 116 |
- if [ ! -z "$GPG_PASSPHRASE" ]; then |
|
| 117 |
- dpkg-sig -g "--no-tty --digest-algo 'sha512' --passphrase '$GPG_PASSPHRASE'" \ |
|
| 118 |
- -k "$GPG_KEYID" --sign builder "$tempdir/$d" |
|
| 119 |
- fi |
|
| 120 |
- mv "$tempdir/$d" "$APTDIR/pool/$component/d/docker-engine/" |
|
| 121 |
- fi |
|
| 122 |
- done |
|
| 123 |
- |
|
| 124 |
- rm -rf "$tempdir" |
|
| 125 |
- |
|
| 126 |
- # build the right directory structure, needed for apt-ftparchive |
|
| 127 |
- for arch in "${arches[@]}"; do
|
|
| 128 |
- for c in "${components[@]}"; do
|
|
| 129 |
- mkdir -p "$APTDIR/dists/$codename/$c/binary-$arch" |
|
| 130 |
- done |
|
| 131 |
- done |
|
| 132 |
- |
|
| 133 |
- # update the filelist for this codename/component |
|
| 134 |
- find "$APTDIR/pool/$component" \ |
|
| 135 |
- -name *~${codename}*.deb -o \
|
|
| 136 |
- -name *~${codename#*-}*.deb > "$APTDIR/dists/$codename/$component/filelist"
|
|
| 137 |
-done |
|
| 138 |
- |
|
| 139 |
-# run the apt-ftparchive commands so we can have pinning |
|
| 140 |
-apt-ftparchive generate "$APTDIR/conf/apt-ftparchive.conf" |
|
| 141 |
- |
|
| 142 |
-for dir in bundles/$VERSION/build-deb/*/; do |
|
| 143 |
- version="$(basename "$dir")" |
|
| 144 |
- codename="${version//debootstrap-}"
|
|
| 145 |
- |
|
| 146 |
- apt-ftparchive \ |
|
| 147 |
- -c "$APTDIR/conf/docker-engine-release.conf" \ |
|
| 148 |
- -o "APT::FTPArchive::Release::Codename=$codename" \ |
|
| 149 |
- -o "APT::FTPArchive::Release::Suite=$codename" \ |
|
| 150 |
- release \ |
|
| 151 |
- "$APTDIR/dists/$codename" > "$APTDIR/dists/$codename/Release" |
|
| 152 |
- |
|
| 153 |
- for arch in "${arches[@]}"; do
|
|
| 154 |
- apt-ftparchive \ |
|
| 155 |
- -c "$APTDIR/conf/docker-engine-release.conf" \ |
|
| 156 |
- -o "APT::FTPArchive::Release::Codename=$codename" \ |
|
| 157 |
- -o "APT::FTPArchive::Release::Suite=$codename" \ |
|
| 158 |
- -o "APT::FTPArchive::Release::Components=$component" \ |
|
| 159 |
- -o "APT::FTPArchive::Release::Architecture=$arch" \ |
|
| 160 |
- release \ |
|
| 161 |
- "$APTDIR/dists/$codename/$component/binary-$arch" > "$APTDIR/dists/$codename/$component/binary-$arch/Release" |
|
| 162 |
- done |
|
| 163 |
-done |
| 164 | 1 |
deleted file mode 100755 |
| ... | ... |
@@ -1,71 +0,0 @@ |
| 1 |
-#!/usr/bin/env bash |
|
| 2 |
-set -e |
|
| 3 |
- |
|
| 4 |
-# This script creates the yum repos for the .rpm files generated by hack/make/build-rpm |
|
| 5 |
-# |
|
| 6 |
-# The following can then be used as a yum repo: |
|
| 7 |
-# http://yum.dockerproject.org/repo/$release/$distro/$distro-version |
|
| 8 |
-# |
|
| 9 |
-# For example: |
|
| 10 |
-# http://yum.dockerproject.org/repo/main/fedora/23 |
|
| 11 |
-# http://yum.dockerproject.org/repo/testing/centos/7 |
|
| 12 |
-# http://yum.dockerproject.org/repo/experimental/fedora/23 |
|
| 13 |
-# http://yum.dockerproject.org/repo/main/centos/7 |
|
| 14 |
-# |
|
| 15 |
-# ... and so on and so forth for the builds created by hack/make/build-rpm |
|
| 16 |
- |
|
| 17 |
-: ${DOCKER_RELEASE_DIR:=$DEST}
|
|
| 18 |
-YUMDIR=$DOCKER_RELEASE_DIR/yum/repo |
|
| 19 |
-: ${GPG_KEYID:=releasedocker}
|
|
| 20 |
- |
|
| 21 |
-# get the release |
|
| 22 |
-release="main" |
|
| 23 |
- |
|
| 24 |
-if [[ "$VERSION" == *-rc* ]]; then |
|
| 25 |
- release="testing" |
|
| 26 |
-fi |
|
| 27 |
- |
|
| 28 |
-if [[ "$VERSION" == *-dev ]] || [ -n "$(git status --porcelain)" ]; then |
|
| 29 |
- release="experimental" |
|
| 30 |
-fi |
|
| 31 |
- |
|
| 32 |
-# Setup the yum repo |
|
| 33 |
-for dir in bundles/$VERSION/build-rpm/*/; do |
|
| 34 |
- version="$(basename "$dir")" |
|
| 35 |
- suite="${version##*-}"
|
|
| 36 |
- distro="${version%-*}"
|
|
| 37 |
- |
|
| 38 |
- REPO=$YUMDIR/$release/$distro |
|
| 39 |
- |
|
| 40 |
- # if the directory does not exist, initialize the yum repo |
|
| 41 |
- if [[ ! -d $REPO/$suite/Packages ]]; then |
|
| 42 |
- mkdir -p "$REPO/$suite/Packages" |
|
| 43 |
- |
|
| 44 |
- createrepo --pretty "$REPO/$suite" |
|
| 45 |
- fi |
|
| 46 |
- |
|
| 47 |
- # path to rpms |
|
| 48 |
- RPMFILE=( "bundles/$VERSION/build-rpm/$version/RPMS/"*"/docker-engine"*.rpm "bundles/$VERSION/build-rpm/$version/SRPMS/docker-engine"*.rpm ) |
|
| 49 |
- |
|
| 50 |
- # if we have a $GPG_PASSPHRASE we may as well |
|
| 51 |
- # sign the rpms before adding to repo |
|
| 52 |
- if [ ! -z $GPG_PASSPHRASE ]; then |
|
| 53 |
- # export our key to rpm import |
|
| 54 |
- gpg --armor --export "$GPG_KEYID" > /tmp/gpg |
|
| 55 |
- rpm --import /tmp/gpg |
|
| 56 |
- |
|
| 57 |
- # sign the rpms |
|
| 58 |
- echo "yes" | setsid rpm \ |
|
| 59 |
- --define "_gpg_name $GPG_KEYID" \ |
|
| 60 |
- --define "_signature gpg" \ |
|
| 61 |
- --define "__gpg_check_password_cmd /bin/true" \ |
|
| 62 |
- --define "__gpg_sign_cmd %{__gpg} gpg --batch --no-armor --digest-algo 'sha512' --passphrase '$GPG_PASSPHRASE' --no-secmem-warning -u '%{_gpg_name}' --sign --detach-sign --output %{__signature_filename} %{__plaintext_filename}" \
|
|
| 63 |
- --resign "${RPMFILE[@]}"
|
|
| 64 |
- fi |
|
| 65 |
- |
|
| 66 |
- # copy the rpms to the packages folder |
|
| 67 |
- cp "${RPMFILE[@]}" "$REPO/$suite/Packages"
|
|
| 68 |
- |
|
| 69 |
- # update the repo |
|
| 70 |
- createrepo --pretty --update "$REPO/$suite" |
|
| 71 |
-done |
| 72 | 1 |
deleted file mode 100755 |
| ... | ... |
@@ -1,65 +0,0 @@ |
| 1 |
-#!/usr/bin/env bash |
|
| 2 |
- |
|
| 3 |
-# This script signs the deliverables from release-deb and release-rpm |
|
| 4 |
-# with a designated GPG key. |
|
| 5 |
- |
|
| 6 |
-: ${DOCKER_RELEASE_DIR:=$DEST}
|
|
| 7 |
-: ${GPG_KEYID:=releasedocker}
|
|
| 8 |
-APTDIR=$DOCKER_RELEASE_DIR/apt/repo |
|
| 9 |
-YUMDIR=$DOCKER_RELEASE_DIR/yum/repo |
|
| 10 |
- |
|
| 11 |
-if [ -z "$GPG_PASSPHRASE" ]; then |
|
| 12 |
- echo >&2 'you need to set GPG_PASSPHRASE in order to sign artifacts' |
|
| 13 |
- exit 1 |
|
| 14 |
-fi |
|
| 15 |
- |
|
| 16 |
-if [ ! -d $APTDIR ] && [ ! -d $YUMDIR ]; then |
|
| 17 |
- echo >&2 'release-rpm or release-deb must be run before sign-repos' |
|
| 18 |
- exit 1 |
|
| 19 |
-fi |
|
| 20 |
- |
|
| 21 |
-sign_packages(){
|
|
| 22 |
- # sign apt repo metadata |
|
| 23 |
- if [ -d $APTDIR ]; then |
|
| 24 |
- # create file with public key |
|
| 25 |
- gpg --armor --export "$GPG_KEYID" > "$DOCKER_RELEASE_DIR/apt/gpg" |
|
| 26 |
- |
|
| 27 |
- # sign the repo metadata |
|
| 28 |
- for F in $(find $APTDIR -name Release); do |
|
| 29 |
- if test "$F" -nt "$F.gpg" ; then |
|
| 30 |
- gpg -u "$GPG_KEYID" --passphrase "$GPG_PASSPHRASE" \ |
|
| 31 |
- --digest-algo "sha512" \ |
|
| 32 |
- --armor --sign --detach-sign \ |
|
| 33 |
- --batch --yes \ |
|
| 34 |
- --output "$F.gpg" "$F" |
|
| 35 |
- fi |
|
| 36 |
- inRelease="$(dirname "$F")/InRelease" |
|
| 37 |
- if test "$F" -nt "$inRelease" ; then |
|
| 38 |
- gpg -u "$GPG_KEYID" --passphrase "$GPG_PASSPHRASE" \ |
|
| 39 |
- --digest-algo "sha512" \ |
|
| 40 |
- --clearsign \ |
|
| 41 |
- --batch --yes \ |
|
| 42 |
- --output "$inRelease" "$F" |
|
| 43 |
- fi |
|
| 44 |
- done |
|
| 45 |
- fi |
|
| 46 |
- |
|
| 47 |
- # sign yum repo metadata |
|
| 48 |
- if [ -d $YUMDIR ]; then |
|
| 49 |
- # create file with public key |
|
| 50 |
- gpg --armor --export "$GPG_KEYID" > "$DOCKER_RELEASE_DIR/yum/gpg" |
|
| 51 |
- |
|
| 52 |
- # sign the repo metadata |
|
| 53 |
- for F in $(find $YUMDIR -name repomd.xml); do |
|
| 54 |
- if test "$F" -nt "$F.asc" ; then |
|
| 55 |
- gpg -u "$GPG_KEYID" --passphrase "$GPG_PASSPHRASE" \ |
|
| 56 |
- --digest-algo "sha512" \ |
|
| 57 |
- --armor --sign --detach-sign \ |
|
| 58 |
- --batch --yes \ |
|
| 59 |
- --output "$F.asc" "$F" |
|
| 60 |
- fi |
|
| 61 |
- done |
|
| 62 |
- fi |
|
| 63 |
-} |
|
| 64 |
- |
|
| 65 |
-sign_packages |
| 66 | 1 |
deleted file mode 100755 |
| ... | ... |
@@ -1,29 +0,0 @@ |
| 1 |
-#!/usr/bin/env bash |
|
| 2 |
-set -e |
|
| 3 |
- |
|
| 4 |
-versions=( 1.3.3 1.4.1 1.5.0 1.6.2 ) |
|
| 5 |
- |
|
| 6 |
-install() {
|
|
| 7 |
- local version=$1 |
|
| 8 |
- local tmpdir=$(mktemp -d /tmp/XXXXXXXXXX) |
|
| 9 |
- local dockerfile="${tmpdir}/Dockerfile"
|
|
| 10 |
- cat <<-EOF > "$dockerfile" |
|
| 11 |
- FROM debian:jessie |
|
| 12 |
- ENV VERSION ${version}
|
|
| 13 |
- RUN apt-get update && apt-get install -y \ |
|
| 14 |
- apt-transport-https \ |
|
| 15 |
- ca-certificates \ |
|
| 16 |
- --no-install-recommends |
|
| 17 |
- RUN echo "deb https://get.docker.com/ubuntu docker main" > /etc/apt/sources.list.d/docker.list |
|
| 18 |
- RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 \ |
|
| 19 |
- --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 |
|
| 20 |
- RUN apt-get update && apt-get install -y \ |
|
| 21 |
- lxc-docker-\${VERSION}
|
|
| 22 |
- EOF |
|
| 23 |
- |
|
| 24 |
- docker build --rm --force-rm --no-cache -t docker-old-repo:${version} -f $dockerfile $tmpdir
|
|
| 25 |
-} |
|
| 26 |
- |
|
| 27 |
-for v in "${versions[@]}"; do
|
|
| 28 |
- install "$v" |
|
| 29 |
-done |
| 30 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,190 +0,0 @@ |
| 1 |
-#!/usr/bin/env bash |
|
| 2 |
- |
|
| 3 |
-PKGVERSION="${VERSION//-/'~'}"
|
|
| 4 |
-# if we have a "-dev" suffix or have change in Git, let's make this package version more complex so it works better |
|
| 5 |
-if [[ "$VERSION" == *-dev ]] || [ -n "$(git status --porcelain)" ]; then |
|
| 6 |
- GIT_UNIX="$(git log -1 --pretty='%at')" |
|
| 7 |
- GIT_DATE="$(date --date "@$GIT_UNIX" +'%Y%m%d.%H%M%S')" |
|
| 8 |
- GIT_COMMIT="$(git log -1 --pretty='%h')" |
|
| 9 |
- GIT_VERSION="git${GIT_DATE}.0.${GIT_COMMIT}"
|
|
| 10 |
- # GIT_VERSION is now something like 'git20150128.112847.0.17e840a' |
|
| 11 |
- PKGVERSION="$PKGVERSION~$GIT_VERSION" |
|
| 12 |
-fi |
|
| 13 |
- |
|
| 14 |
-# $ dpkg --compare-versions 1.5.0 gt 1.5.0~rc1 && echo true || echo false |
|
| 15 |
-# true |
|
| 16 |
-# $ dpkg --compare-versions 1.5.0~rc1 gt 1.5.0~git20150128.112847.17e840a && echo true || echo false |
|
| 17 |
-# true |
|
| 18 |
-# $ dpkg --compare-versions 1.5.0~git20150128.112847.17e840a gt 1.5.0~dev~git20150128.112847.17e840a && echo true || echo false |
|
| 19 |
-# true |
|
| 20 |
- |
|
| 21 |
-# ie, 1.5.0 > 1.5.0~rc1 > 1.5.0~git20150128.112847.17e840a > 1.5.0~dev~git20150128.112847.17e840a |
|
| 22 |
- |
|
| 23 |
-PACKAGE_ARCHITECTURE="$(dpkg-architecture -qDEB_HOST_ARCH)" |
|
| 24 |
-PACKAGE_URL="https://www.docker.com/" |
|
| 25 |
-PACKAGE_MAINTAINER="support@docker.com" |
|
| 26 |
-PACKAGE_DESCRIPTION="Linux container runtime |
|
| 27 |
-Docker complements LXC with a high-level API which operates at the process |
|
| 28 |
-level. It runs unix processes with strong guarantees of isolation and |
|
| 29 |
-repeatability across servers. |
|
| 30 |
-Docker is a great building block for automating distributed systems: |
|
| 31 |
-large-scale web deployments, database clusters, continuous deployment systems, |
|
| 32 |
-private PaaS, service-oriented architectures, etc." |
|
| 33 |
-PACKAGE_LICENSE="Apache-2.0" |
|
| 34 |
- |
|
| 35 |
-# Build docker as an ubuntu package using FPM and REPREPRO (sue me). |
|
| 36 |
-# bundle_binary must be called first. |
|
| 37 |
-bundle_ubuntu() {
|
|
| 38 |
- DIR="$ABS_DEST/build" |
|
| 39 |
- |
|
| 40 |
- # Include our udev rules |
|
| 41 |
- mkdir -p "$DIR/etc/udev/rules.d" |
|
| 42 |
- cp contrib/udev/80-docker.rules "$DIR/etc/udev/rules.d/" |
|
| 43 |
- |
|
| 44 |
- # Include our init scripts |
|
| 45 |
- mkdir -p "$DIR/etc/init" |
|
| 46 |
- cp contrib/init/upstart/docker.conf "$DIR/etc/init/" |
|
| 47 |
- mkdir -p "$DIR/etc/init.d" |
|
| 48 |
- cp contrib/init/sysvinit-debian/docker "$DIR/etc/init.d/" |
|
| 49 |
- mkdir -p "$DIR/etc/default" |
|
| 50 |
- cp contrib/init/sysvinit-debian/docker.default "$DIR/etc/default/docker" |
|
| 51 |
- mkdir -p "$DIR/lib/systemd/system" |
|
| 52 |
- cp contrib/init/systemd/docker.{service,socket} "$DIR/lib/systemd/system/"
|
|
| 53 |
- |
|
| 54 |
- # Include contributed completions |
|
| 55 |
- mkdir -p "$DIR/etc/bash_completion.d" |
|
| 56 |
- cp contrib/completion/bash/docker "$DIR/etc/bash_completion.d/" |
|
| 57 |
- mkdir -p "$DIR/usr/share/zsh/vendor-completions" |
|
| 58 |
- cp contrib/completion/zsh/_docker "$DIR/usr/share/zsh/vendor-completions/" |
|
| 59 |
- mkdir -p "$DIR/etc/fish/completions" |
|
| 60 |
- cp contrib/completion/fish/docker.fish "$DIR/etc/fish/completions/" |
|
| 61 |
- |
|
| 62 |
- # Include man pages |
|
| 63 |
- make manpages |
|
| 64 |
- manRoot="$DIR/usr/share/man" |
|
| 65 |
- mkdir -p "$manRoot" |
|
| 66 |
- for manDir in man/man?; do |
|
| 67 |
- manBase="$(basename "$manDir")" # "man1" |
|
| 68 |
- for manFile in "$manDir"/*; do |
|
| 69 |
- manName="$(basename "$manFile")" # "docker-build.1" |
|
| 70 |
- mkdir -p "$manRoot/$manBase" |
|
| 71 |
- gzip -c "$manFile" > "$manRoot/$manBase/$manName.gz" |
|
| 72 |
- done |
|
| 73 |
- done |
|
| 74 |
- |
|
| 75 |
- # Copy the binary |
|
| 76 |
- # This will fail if the binary bundle hasn't been built |
|
| 77 |
- mkdir -p "$DIR/usr/bin" |
|
| 78 |
- cp "$DEST/../binary/docker-$VERSION" "$DIR/usr/bin/docker" |
|
| 79 |
- |
|
| 80 |
- # Generate postinst/prerm/postrm scripts |
|
| 81 |
- cat > "$DEST/postinst" <<'EOF' |
|
| 82 |
-#!/bin/sh |
|
| 83 |
-set -e |
|
| 84 |
-set -u |
|
| 85 |
- |
|
| 86 |
-if [ "$1" = 'configure' ] && [ -z "$2" ]; then |
|
| 87 |
- if ! getent group docker > /dev/null; then |
|
| 88 |
- groupadd --system docker |
|
| 89 |
- fi |
|
| 90 |
-fi |
|
| 91 |
- |
|
| 92 |
-if ! { [ -x /sbin/initctl ] && /sbin/initctl version 2>/dev/null | grep -q upstart; }; then
|
|
| 93 |
- # we only need to do this if upstart isn't in charge |
|
| 94 |
- update-rc.d docker defaults > /dev/null || true |
|
| 95 |
-fi |
|
| 96 |
-if [ -n "$2" ]; then |
|
| 97 |
- _dh_action=restart |
|
| 98 |
-else |
|
| 99 |
- _dh_action=start |
|
| 100 |
-fi |
|
| 101 |
-service docker $_dh_action 2>/dev/null || true |
|
| 102 |
- |
|
| 103 |
-#DEBHELPER# |
|
| 104 |
-EOF |
|
| 105 |
- cat > "$DEST/prerm" <<'EOF' |
|
| 106 |
-#!/bin/sh |
|
| 107 |
-set -e |
|
| 108 |
-set -u |
|
| 109 |
- |
|
| 110 |
-service docker stop 2>/dev/null || true |
|
| 111 |
- |
|
| 112 |
-#DEBHELPER# |
|
| 113 |
-EOF |
|
| 114 |
- cat > "$DEST/postrm" <<'EOF' |
|
| 115 |
-#!/bin/sh |
|
| 116 |
-set -e |
|
| 117 |
-set -u |
|
| 118 |
- |
|
| 119 |
-if [ "$1" = "purge" ] ; then |
|
| 120 |
- update-rc.d docker remove > /dev/null || true |
|
| 121 |
-fi |
|
| 122 |
- |
|
| 123 |
-# In case this system is running systemd, we make systemd reload the unit files |
|
| 124 |
-# to pick up changes. |
|
| 125 |
-if [ -d /run/systemd/system ] ; then |
|
| 126 |
- systemctl --system daemon-reload > /dev/null || true |
|
| 127 |
-fi |
|
| 128 |
- |
|
| 129 |
-#DEBHELPER# |
|
| 130 |
-EOF |
|
| 131 |
- # TODO swaths of these were borrowed from debhelper's auto-inserted stuff, because we're still using fpm - we need to use debhelper instead, and somehow reconcile Ubuntu that way |
|
| 132 |
- chmod +x "$DEST/postinst" "$DEST/prerm" "$DEST/postrm" |
|
| 133 |
- |
|
| 134 |
- ( |
|
| 135 |
- # switch directories so we create *.deb in the right folder |
|
| 136 |
- cd "$DEST" |
|
| 137 |
- |
|
| 138 |
- # create lxc-docker-VERSION package |
|
| 139 |
- fpm -s dir -C "$DIR" \ |
|
| 140 |
- --name "lxc-docker-$VERSION" --version "$PKGVERSION" \ |
|
| 141 |
- --after-install "$ABS_DEST/postinst" \ |
|
| 142 |
- --before-remove "$ABS_DEST/prerm" \ |
|
| 143 |
- --after-remove "$ABS_DEST/postrm" \ |
|
| 144 |
- --architecture "$PACKAGE_ARCHITECTURE" \ |
|
| 145 |
- --prefix / \ |
|
| 146 |
- --depends iptables \ |
|
| 147 |
- --deb-recommends aufs-tools \ |
|
| 148 |
- --deb-recommends ca-certificates \ |
|
| 149 |
- --deb-recommends git \ |
|
| 150 |
- --deb-recommends xz-utils \ |
|
| 151 |
- --deb-recommends 'cgroupfs-mount | cgroup-lite' \ |
|
| 152 |
- --deb-suggests apparmor \ |
|
| 153 |
- --description "$PACKAGE_DESCRIPTION" \ |
|
| 154 |
- --maintainer "$PACKAGE_MAINTAINER" \ |
|
| 155 |
- --conflicts docker \ |
|
| 156 |
- --conflicts docker.io \ |
|
| 157 |
- --conflicts lxc-docker-virtual-package \ |
|
| 158 |
- --provides lxc-docker \ |
|
| 159 |
- --provides lxc-docker-virtual-package \ |
|
| 160 |
- --replaces lxc-docker \ |
|
| 161 |
- --replaces lxc-docker-virtual-package \ |
|
| 162 |
- --url "$PACKAGE_URL" \ |
|
| 163 |
- --license "$PACKAGE_LICENSE" \ |
|
| 164 |
- --config-files /etc/udev/rules.d/80-docker.rules \ |
|
| 165 |
- --config-files /etc/init/docker.conf \ |
|
| 166 |
- --config-files /etc/init.d/docker \ |
|
| 167 |
- --config-files /etc/default/docker \ |
|
| 168 |
- --deb-compression gz \ |
|
| 169 |
- -t deb . |
|
| 170 |
- # TODO replace "Suggests: cgroup-lite" with "Recommends: cgroupfs-mount | cgroup-lite" once cgroupfs-mount is available |
|
| 171 |
- |
|
| 172 |
- # create empty lxc-docker wrapper package |
|
| 173 |
- fpm -s empty \ |
|
| 174 |
- --name lxc-docker --version "$PKGVERSION" \ |
|
| 175 |
- --architecture "$PACKAGE_ARCHITECTURE" \ |
|
| 176 |
- --depends lxc-docker-$VERSION \ |
|
| 177 |
- --description "$PACKAGE_DESCRIPTION" \ |
|
| 178 |
- --maintainer "$PACKAGE_MAINTAINER" \ |
|
| 179 |
- --url "$PACKAGE_URL" \ |
|
| 180 |
- --license "$PACKAGE_LICENSE" \ |
|
| 181 |
- --deb-compression gz \ |
|
| 182 |
- -t deb |
|
| 183 |
- ) |
|
| 184 |
- |
|
| 185 |
- # clean up after ourselves so we have a clean output directory |
|
| 186 |
- rm "$DEST/postinst" "$DEST/prerm" "$DEST/postrm" |
|
| 187 |
- rm -r "$DIR" |
|
| 188 |
-} |
|
| 189 |
- |
|
| 190 |
-bundle_ubuntu |
| 191 | 1 |
deleted file mode 100755 |
| ... | ... |
@@ -1,70 +0,0 @@ |
| 1 |
-#!/usr/bin/env bash |
|
| 2 |
-set -e |
|
| 3 |
- |
|
| 4 |
-# This script updates the apt repo in $DOCKER_RELEASE_DIR/apt/repo. |
|
| 5 |
-# This script is a "fix all" for any sort of problems that might have occurred with |
|
| 6 |
-# the Release or Package files in the repo. |
|
| 7 |
-# It should only be used in the rare case of extreme emergencies to regenerate |
|
| 8 |
-# Release and Package files for the apt repo. |
|
| 9 |
-# |
|
| 10 |
-# NOTE: Always be sure to re-sign the repo with hack/make/sign-repos after running |
|
| 11 |
-# this script. |
|
| 12 |
- |
|
| 13 |
-: ${DOCKER_RELEASE_DIR:=$DEST}
|
|
| 14 |
-APTDIR=$DOCKER_RELEASE_DIR/apt/repo |
|
| 15 |
- |
|
| 16 |
-# supported arches/sections |
|
| 17 |
-arches=( amd64 i386 ) |
|
| 18 |
- |
|
| 19 |
-# Preserve existing components but don't add any non-existing ones |
|
| 20 |
-for component in main testing experimental ; do |
|
| 21 |
- if ls "$APTDIR/dists/*/$component" >/dev/null 2>&1 ; then |
|
| 22 |
- components+=( $component ) |
|
| 23 |
- fi |
|
| 24 |
-done |
|
| 25 |
- |
|
| 26 |
-dists=( $(find "${APTDIR}/dists" -maxdepth 1 -mindepth 1 -type d) )
|
|
| 27 |
- |
|
| 28 |
-# override component if it is set |
|
| 29 |
-if [ "$COMPONENT" ]; then |
|
| 30 |
- components=( $COMPONENT ) |
|
| 31 |
-fi |
|
| 32 |
- |
|
| 33 |
-# release the debs |
|
| 34 |
-for version in "${dists[@]}"; do
|
|
| 35 |
- for component in "${components[@]}"; do
|
|
| 36 |
- codename="${version//debootstrap-}"
|
|
| 37 |
- |
|
| 38 |
- # update the filelist for this codename/component |
|
| 39 |
- find "$APTDIR/pool/$component" \ |
|
| 40 |
- -name *~${codename#*-}*.deb > "$APTDIR/dists/$codename/$component/filelist"
|
|
| 41 |
- done |
|
| 42 |
-done |
|
| 43 |
- |
|
| 44 |
-# run the apt-ftparchive commands so we can have pinning |
|
| 45 |
-apt-ftparchive generate "$APTDIR/conf/apt-ftparchive.conf" |
|
| 46 |
- |
|
| 47 |
-for dist in "${dists[@]}"; do
|
|
| 48 |
- version=$(basename "$dist") |
|
| 49 |
- for component in "${components[@]}"; do
|
|
| 50 |
- codename="${version//debootstrap-}"
|
|
| 51 |
- |
|
| 52 |
- apt-ftparchive \ |
|
| 53 |
- -o "APT::FTPArchive::Release::Codename=$codename" \ |
|
| 54 |
- -o "APT::FTPArchive::Release::Suite=$codename" \ |
|
| 55 |
- -c "$APTDIR/conf/docker-engine-release.conf" \ |
|
| 56 |
- release \ |
|
| 57 |
- "$APTDIR/dists/$codename" > "$APTDIR/dists/$codename/Release" |
|
| 58 |
- |
|
| 59 |
- for arch in "${arches[@]}"; do
|
|
| 60 |
- apt-ftparchive \ |
|
| 61 |
- -o "APT::FTPArchive::Release::Codename=$codename" \ |
|
| 62 |
- -o "APT::FTPArchive::Release::Suite=$codename" \ |
|
| 63 |
- -o "APT::FTPArchive::Release::Component=$component" \ |
|
| 64 |
- -o "APT::FTPArchive::Release::Architecture=$arch" \ |
|
| 65 |
- -c "$APTDIR/conf/docker-engine-release.conf" \ |
|
| 66 |
- release \ |
|
| 67 |
- "$APTDIR/dists/$codename/$component/binary-$arch" > "$APTDIR/dists/$codename/$component/binary-$arch/Release" |
|
| 68 |
- done |
|
| 69 |
- done |
|
| 70 |
-done |
| 71 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,20 +0,0 @@ |
| 1 |
-#!/usr/bin/env bash |
|
| 2 |
-set -e |
|
| 3 |
- |
|
| 4 |
-# explicit list of os/arch combos that support being a daemon |
|
| 5 |
-declare -A daemonSupporting |
|
| 6 |
-daemonSupporting=( |
|
| 7 |
- [linux/amd64]=1 |
|
| 8 |
- [windows/amd64]=1 |
|
| 9 |
-) |
|
| 10 |
-platform="windows/amd64" |
|
| 11 |
-export DEST="$DEST/$platform" # bundles/VERSION/cross/GOOS/GOARCH/docker-VERSION |
|
| 12 |
-mkdir -p "$DEST" |
|
| 13 |
-ABS_DEST="$(cd "$DEST" && pwd -P)" |
|
| 14 |
-export GOOS=${platform%/*}
|
|
| 15 |
-export GOARCH=${platform##*/}
|
|
| 16 |
-if [ -z "${daemonSupporting[$platform]}" ]; then
|
|
| 17 |
- export LDFLAGS_STATIC_DOCKER="" # we just need a simple client for these platforms |
|
| 18 |
- export BUILDFLAGS=( "${ORIG_BUILDFLAGS[@]/ daemon/}" ) # remove the "daemon" build tag from platforms that aren't supported
|
|
| 19 |
-fi |
|
| 20 |
-source "${MAKEDIR}/binary"
|
| 21 | 1 |
deleted file mode 100755 |
| ... | ... |
@@ -1,313 +0,0 @@ |
| 1 |
-#!/usr/bin/env bash |
|
| 2 |
-set -e |
|
| 3 |
- |
|
| 4 |
-# This script looks for bundles built by make.sh, and releases them on a |
|
| 5 |
-# public S3 bucket. |
|
| 6 |
-# |
|
| 7 |
-# Bundles should be available for the VERSION string passed as argument. |
|
| 8 |
-# |
|
| 9 |
-# The correct way to call this script is inside a container built by the |
|
| 10 |
-# official Dockerfile at the root of the Docker source code. The Dockerfile, |
|
| 11 |
-# make.sh and release.sh should all be from the same source code revision. |
|
| 12 |
- |
|
| 13 |
-set -o pipefail |
|
| 14 |
- |
|
| 15 |
-# Print a usage message and exit. |
|
| 16 |
-usage() {
|
|
| 17 |
- cat >&2 <<'EOF' |
|
| 18 |
-To run, I need: |
|
| 19 |
-- to be in a container generated by the Dockerfile at the top of the Docker |
|
| 20 |
- repository; |
|
| 21 |
-- to be provided with the location of an S3 bucket and path, in |
|
| 22 |
- environment variables AWS_S3_BUCKET and AWS_S3_BUCKET_PATH (default: ''); |
|
| 23 |
-- to be provided with AWS credentials for this S3 bucket, in environment |
|
| 24 |
- variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY; |
|
| 25 |
-- a generous amount of good will and nice manners. |
|
| 26 |
-The canonical way to run me is to run the image produced by the Dockerfile: e.g.:" |
|
| 27 |
- |
|
| 28 |
-docker run -e AWS_S3_BUCKET=test.docker.com \ |
|
| 29 |
- -e AWS_ACCESS_KEY_ID \ |
|
| 30 |
- -e AWS_SECRET_ACCESS_KEY \ |
|
| 31 |
- -e AWS_DEFAULT_REGION \ |
|
| 32 |
- -it --privileged \ |
|
| 33 |
- docker ./hack/release.sh |
|
| 34 |
-EOF |
|
| 35 |
- exit 1 |
|
| 36 |
-} |
|
| 37 |
- |
|
| 38 |
-[ "$AWS_S3_BUCKET" ] || usage |
|
| 39 |
-[ "$AWS_ACCESS_KEY_ID" ] || usage |
|
| 40 |
-[ "$AWS_SECRET_ACCESS_KEY" ] || usage |
|
| 41 |
-[ -d /go/src/github.com/docker/docker ] || usage |
|
| 42 |
-cd /go/src/github.com/docker/docker |
|
| 43 |
-[ -x hack/make.sh ] || usage |
|
| 44 |
- |
|
| 45 |
-export AWS_DEFAULT_REGION |
|
| 46 |
-: ${AWS_DEFAULT_REGION:=us-west-1}
|
|
| 47 |
- |
|
| 48 |
-AWS_CLI=${AWS_CLI:-'aws'}
|
|
| 49 |
- |
|
| 50 |
-RELEASE_BUNDLES=( |
|
| 51 |
- binary |
|
| 52 |
- cross |
|
| 53 |
- tgz |
|
| 54 |
-) |
|
| 55 |
- |
|
| 56 |
-if [ "$1" != '--release-regardless-of-test-failure' ]; then |
|
| 57 |
- RELEASE_BUNDLES=( |
|
| 58 |
- test-unit |
|
| 59 |
- "${RELEASE_BUNDLES[@]}"
|
|
| 60 |
- test-integration |
|
| 61 |
- ) |
|
| 62 |
-fi |
|
| 63 |
- |
|
| 64 |
-VERSION=$(< VERSION) |
|
| 65 |
-BUCKET=$AWS_S3_BUCKET |
|
| 66 |
-BUCKET_PATH=$BUCKET |
|
| 67 |
-[[ -n "$AWS_S3_BUCKET_PATH" ]] && BUCKET_PATH+=/$AWS_S3_BUCKET_PATH |
|
| 68 |
- |
|
| 69 |
-if command -v git &> /dev/null && git rev-parse &> /dev/null; then |
|
| 70 |
- if [ -n "$(git status --porcelain --untracked-files=no)" ]; then |
|
| 71 |
- echo "You cannot run the release script on a repo with uncommitted changes" |
|
| 72 |
- usage |
|
| 73 |
- fi |
|
| 74 |
-fi |
|
| 75 |
- |
|
| 76 |
-# These are the 2 keys we've used to sign the deb's |
|
| 77 |
-# release (get.docker.com) |
|
| 78 |
-# GPG_KEY="36A1D7869245C8950F966E92D8576A8BA88D21E9" |
|
| 79 |
-# test (test.docker.com) |
|
| 80 |
-# GPG_KEY="740B314AE3941731B942C66ADF4FD13717AAD7D6" |
|
| 81 |
- |
|
| 82 |
-setup_s3() {
|
|
| 83 |
- echo "Setting up S3" |
|
| 84 |
- # Try creating the bucket. Ignore errors (it might already exist). |
|
| 85 |
- $AWS_CLI s3 mb "s3://$BUCKET" 2>/dev/null || true |
|
| 86 |
- # Check access to the bucket. |
|
| 87 |
- $AWS_CLI s3 ls "s3://$BUCKET" >/dev/null |
|
| 88 |
- # Make the bucket accessible through website endpoints. |
|
| 89 |
- $AWS_CLI s3 website --index-document index --error-document error "s3://$BUCKET" |
|
| 90 |
-} |
|
| 91 |
- |
|
| 92 |
-# write_to_s3 uploads the contents of standard input to the specified S3 url. |
|
| 93 |
-write_to_s3() {
|
|
| 94 |
- DEST=$1 |
|
| 95 |
- F=`mktemp` |
|
| 96 |
- cat > "$F" |
|
| 97 |
- $AWS_CLI s3 cp --acl public-read --content-type 'text/plain' "$F" "$DEST" |
|
| 98 |
- rm -f "$F" |
|
| 99 |
-} |
|
| 100 |
- |
|
| 101 |
-s3_url() {
|
|
| 102 |
- case "$BUCKET" in |
|
| 103 |
- get.docker.com|test.docker.com|experimental.docker.com) |
|
| 104 |
- echo "https://$BUCKET_PATH" |
|
| 105 |
- ;; |
|
| 106 |
- *) |
|
| 107 |
- BASE_URL="http://${BUCKET}.s3-website-${AWS_DEFAULT_REGION}.amazonaws.com"
|
|
| 108 |
- if [[ -n "$AWS_S3_BUCKET_PATH" ]] ; then |
|
| 109 |
- echo "$BASE_URL/$AWS_S3_BUCKET_PATH" |
|
| 110 |
- else |
|
| 111 |
- echo "$BASE_URL" |
|
| 112 |
- fi |
|
| 113 |
- ;; |
|
| 114 |
- esac |
|
| 115 |
-} |
|
| 116 |
- |
|
| 117 |
-build_all() {
|
|
| 118 |
- echo "Building release" |
|
| 119 |
- if ! ./hack/make.sh "${RELEASE_BUNDLES[@]}"; then
|
|
| 120 |
- echo >&2 |
|
| 121 |
- echo >&2 'The build or tests appear to have failed.' |
|
| 122 |
- echo >&2 |
|
| 123 |
- echo >&2 'You, as the release maintainer, now have a couple options:' |
|
| 124 |
- echo >&2 '- delay release and fix issues' |
|
| 125 |
- echo >&2 '- delay release and fix issues' |
|
| 126 |
- echo >&2 '- did we mention how important this is? issues need fixing :)' |
|
| 127 |
- echo >&2 |
|
| 128 |
- echo >&2 'As a final LAST RESORT, you (because only you, the release maintainer,' |
|
| 129 |
- echo >&2 ' really knows all the hairy problems at hand with the current release' |
|
| 130 |
- echo >&2 ' issues) may bypass this checking by running this script again with the' |
|
| 131 |
- echo >&2 ' single argument of "--release-regardless-of-test-failure", which will skip' |
|
| 132 |
- echo >&2 ' running the test suite, and will only build the binaries and packages. Please' |
|
| 133 |
- echo >&2 ' avoid using this if at all possible.' |
|
| 134 |
- echo >&2 |
|
| 135 |
- echo >&2 'Regardless, we cannot stress enough the scarcity with which this bypass' |
|
| 136 |
- echo >&2 ' should be used. If there are release issues, we should always err on the' |
|
| 137 |
- echo >&2 ' side of caution.' |
|
| 138 |
- echo >&2 |
|
| 139 |
- exit 1 |
|
| 140 |
- fi |
|
| 141 |
-} |
|
| 142 |
- |
|
| 143 |
-upload_release_build() {
|
|
| 144 |
- src="$1" |
|
| 145 |
- dst="$2" |
|
| 146 |
- latest="$3" |
|
| 147 |
- |
|
| 148 |
- echo |
|
| 149 |
- echo "Uploading $src" |
|
| 150 |
- echo " to $dst" |
|
| 151 |
- echo |
|
| 152 |
- $AWS_CLI s3 cp --follow-symlinks --acl public-read "$src" "$dst" |
|
| 153 |
- if [ "$latest" ]; then |
|
| 154 |
- echo |
|
| 155 |
- echo "Copying to $latest" |
|
| 156 |
- echo |
|
| 157 |
- $AWS_CLI s3 cp --acl public-read "$dst" "$latest" |
|
| 158 |
- fi |
|
| 159 |
- |
|
| 160 |
- # get hash files too (see hash_files() in hack/make.sh) |
|
| 161 |
- for hashAlgo in md5 sha256; do |
|
| 162 |
- if [ -e "$src.$hashAlgo" ]; then |
|
| 163 |
- echo |
|
| 164 |
- echo "Uploading $src.$hashAlgo" |
|
| 165 |
- echo " to $dst.$hashAlgo" |
|
| 166 |
- echo |
|
| 167 |
- $AWS_CLI s3 cp --follow-symlinks --acl public-read --content-type='text/plain' "$src.$hashAlgo" "$dst.$hashAlgo" |
|
| 168 |
- if [ "$latest" ]; then |
|
| 169 |
- echo |
|
| 170 |
- echo "Copying to $latest.$hashAlgo" |
|
| 171 |
- echo |
|
| 172 |
- $AWS_CLI s3 cp --acl public-read "$dst.$hashAlgo" "$latest.$hashAlgo" |
|
| 173 |
- fi |
|
| 174 |
- fi |
|
| 175 |
- done |
|
| 176 |
-} |
|
| 177 |
- |
|
| 178 |
-release_build() {
|
|
| 179 |
- echo "Releasing binaries" |
|
| 180 |
- GOOS=$1 |
|
| 181 |
- GOARCH=$2 |
|
| 182 |
- |
|
| 183 |
- binDir=bundles/$VERSION/cross/$GOOS/$GOARCH |
|
| 184 |
- tgzDir=bundles/$VERSION/tgz/$GOOS/$GOARCH |
|
| 185 |
- binary=docker-$VERSION |
|
| 186 |
- zipExt=".tgz" |
|
| 187 |
- binaryExt="" |
|
| 188 |
- tgz=$binary$zipExt |
|
| 189 |
- |
|
| 190 |
- latestBase= |
|
| 191 |
- if [ -z "$NOLATEST" ]; then |
|
| 192 |
- latestBase=docker-latest |
|
| 193 |
- fi |
|
| 194 |
- |
|
| 195 |
- # we need to map our GOOS and GOARCH to uname values |
|
| 196 |
- # see https://en.wikipedia.org/wiki/Uname |
|
| 197 |
- # ie, GOOS=linux -> "uname -s"=Linux |
|
| 198 |
- |
|
| 199 |
- s3Os=$GOOS |
|
| 200 |
- case "$s3Os" in |
|
| 201 |
- darwin) |
|
| 202 |
- s3Os=Darwin |
|
| 203 |
- ;; |
|
| 204 |
- freebsd) |
|
| 205 |
- s3Os=FreeBSD |
|
| 206 |
- ;; |
|
| 207 |
- linux) |
|
| 208 |
- s3Os=Linux |
|
| 209 |
- ;; |
|
| 210 |
- windows) |
|
| 211 |
- # this is windows use the .zip and .exe extensions for the files. |
|
| 212 |
- s3Os=Windows |
|
| 213 |
- zipExt=".zip" |
|
| 214 |
- binaryExt=".exe" |
|
| 215 |
- tgz=$binary$zipExt |
|
| 216 |
- binary+=$binaryExt |
|
| 217 |
- ;; |
|
| 218 |
- *) |
|
| 219 |
- echo >&2 "error: can't convert $s3Os to an appropriate value for 'uname -s'" |
|
| 220 |
- exit 1 |
|
| 221 |
- ;; |
|
| 222 |
- esac |
|
| 223 |
- |
|
| 224 |
- s3Arch=$GOARCH |
|
| 225 |
- case "$s3Arch" in |
|
| 226 |
- amd64) |
|
| 227 |
- s3Arch=x86_64 |
|
| 228 |
- ;; |
|
| 229 |
- 386) |
|
| 230 |
- s3Arch=i386 |
|
| 231 |
- ;; |
|
| 232 |
- arm) |
|
| 233 |
- s3Arch=armel |
|
| 234 |
- # someday, we might potentially support multiple GOARM values, in which case we might get armhf here too |
|
| 235 |
- ;; |
|
| 236 |
- *) |
|
| 237 |
- echo >&2 "error: can't convert $s3Arch to an appropriate value for 'uname -m'" |
|
| 238 |
- exit 1 |
|
| 239 |
- ;; |
|
| 240 |
- esac |
|
| 241 |
- |
|
| 242 |
- s3Dir="s3://$BUCKET_PATH/builds/$s3Os/$s3Arch" |
|
| 243 |
- # latest= |
|
| 244 |
- latestTgz= |
|
| 245 |
- if [ "$latestBase" ]; then |
|
| 246 |
- # commented out since we aren't uploading binaries right now. |
|
| 247 |
- # latest="$s3Dir/$latestBase$binaryExt" |
|
| 248 |
- # we don't include the $binaryExt because we don't want docker.exe.zip |
|
| 249 |
- latestTgz="$s3Dir/$latestBase$zipExt" |
|
| 250 |
- fi |
|
| 251 |
- |
|
| 252 |
- if [ ! -f "$tgzDir/$tgz" ]; then |
|
| 253 |
- echo >&2 "error: can't find $tgzDir/$tgz - was it packaged properly?" |
|
| 254 |
- exit 1 |
|
| 255 |
- fi |
|
| 256 |
- # disable binary uploads for now. Only providing tgz downloads |
|
| 257 |
- # upload_release_build "$binDir/$binary" "$s3Dir/$binary" "$latest" |
|
| 258 |
- upload_release_build "$tgzDir/$tgz" "$s3Dir/$tgz" "$latestTgz" |
|
| 259 |
-} |
|
| 260 |
- |
|
| 261 |
-# Upload binaries and tgz files to S3 |
|
| 262 |
-release_binaries() {
|
|
| 263 |
- [ "$(find bundles/$VERSION -path "bundles/$VERSION/cross/*/*/docker-$VERSION")" != "" ] || {
|
|
| 264 |
- echo >&2 './hack/make.sh must be run before release_binaries' |
|
| 265 |
- exit 1 |
|
| 266 |
- } |
|
| 267 |
- |
|
| 268 |
- for d in bundles/$VERSION/cross/*/*; do |
|
| 269 |
- GOARCH="$(basename "$d")" |
|
| 270 |
- GOOS="$(basename "$(dirname "$d")")" |
|
| 271 |
- release_build "$GOOS" "$GOARCH" |
|
| 272 |
- done |
|
| 273 |
- |
|
| 274 |
- # TODO create redirect from builds/*/i686 to builds/*/i386 |
|
| 275 |
- |
|
| 276 |
- cat <<EOF | write_to_s3 s3://$BUCKET_PATH/builds/index |
|
| 277 |
-# To install, run the following commands as root: |
|
| 278 |
-curl -fsSLO $(s3_url)/builds/Linux/x86_64/docker-$VERSION.tgz && tar --strip-components=1 -xvzf docker-$VERSION.tgz -C /usr/local/bin |
|
| 279 |
- |
|
| 280 |
-# Then start docker in daemon mode: |
|
| 281 |
-/usr/local/bin/dockerd |
|
| 282 |
-EOF |
|
| 283 |
- |
|
| 284 |
- # Add redirect at /builds/info for URL-backwards-compatibility |
|
| 285 |
- rm -rf /tmp/emptyfile && touch /tmp/emptyfile |
|
| 286 |
- $AWS_CLI s3 cp --acl public-read --website-redirect '/builds/' --content-type='text/plain' /tmp/emptyfile "s3://$BUCKET_PATH/builds/info" |
|
| 287 |
- |
|
| 288 |
- if [ -z "$NOLATEST" ]; then |
|
| 289 |
- echo "Advertising $VERSION on $BUCKET_PATH as most recent version" |
|
| 290 |
- echo "$VERSION" | write_to_s3 "s3://$BUCKET_PATH/latest" |
|
| 291 |
- fi |
|
| 292 |
-} |
|
| 293 |
- |
|
| 294 |
-main() {
|
|
| 295 |
- [ "$SKIP_RELEASE_BUILD" = '1' ] || build_all |
|
| 296 |
- setup_s3 |
|
| 297 |
- release_binaries |
|
| 298 |
-} |
|
| 299 |
- |
|
| 300 |
-main |
|
| 301 |
- |
|
| 302 |
-echo |
|
| 303 |
-echo |
|
| 304 |
-echo "Release complete; see $(s3_url)" |
|
| 305 |
-echo "Use the following text to announce the release:" |
|
| 306 |
-echo |
|
| 307 |
-echo "We have just pushed $VERSION to $(s3_url). You can download it with the following:" |
|
| 308 |
-echo |
|
| 309 |
-echo "Linux 64bit tgz: $(s3_url)/builds/Linux/x86_64/docker-$VERSION.tgz" |
|
| 310 |
-echo "Darwin/OSX 64bit client tgz: $(s3_url)/builds/Darwin/x86_64/docker-$VERSION.tgz" |
|
| 311 |
-echo "Windows 64bit zip: $(s3_url)/builds/Windows/x86_64/docker-$VERSION.zip" |
|
| 312 |
-echo "Windows 32bit client zip: $(s3_url)/builds/Windows/i386/docker-$VERSION.zip" |
|
| 313 |
-echo |