Automates deployment of containerized applications
CentOS Sources
2018-03-07 10eb089c0492b5211e155a6ad68889f3e1a7e707
SPECS/docker.spec
@@ -24,14 +24,14 @@
# docker
%global git_docker https://github.com/projectatomic/docker
%global commit_docker 3e8e77dcb88db0530c839b249bea7d75f9cd01d7
%global commit_docker 774336db27bb8931c1705e47781b3842d290c968
%global shortcommit_docker %(c=%{commit_docker}; echo ${c:0:7})
# docker_branch used in %%check
%global docker_branch %{name}-%{version}
# d-s-s
%global git_dss https://github.com/projectatomic/container-storage-setup
%global commit_dss 8276a1e9abf9607e82018c96001858d04420208e
%global commit_dss e0997c32103235a3eff8fe6917e6f2d0507c119e
%global shortcommit_dss %(c=%{commit_dss}; echo ${c:0:7})
%global dss_libdir %{_exec_prefix}/lib/%{name}-storage-setup
@@ -57,18 +57,28 @@
# docker-runc
%global git_runc https://github.com/projectatomic/runc
%global commit_runc c5d311627d39439c5b1cc35c67a51c9c6ccda648
%global commit_runc e9c345b3f906d5dc5e8100b05ce37073a811c74a
%global shortcommit_runc %(c=%{commit_runc}; echo ${c:0:7})
# docker-containerd
%global git_containerd https://github.com/projectatomic/containerd
%global commit_containerd fa8fb3d455e1baf716f3131581f0ed8b07c573a6
%global commit_containerd 296f1f80d6c6a83cc625163f863e53d3287328ee
%global shortcommit_containerd %(c=%{commit_containerd}; echo ${c:0:7})
# docker-init
%global git_tini https://github.com/krallin/tini
%global commit_tini 5b117de7f824f3d3825737cf09581645abbe35d4
%global shortcommit_tini %(c=%{commit_tini}; echo ${c:0:7})
# docker-proxy
%global git_libnetwork https://github.com/docker/libnetwork
%global commit_libnetwork 14db3c494c259b8caa159a244a8e9708e3f4b595
%global shortcommit_libnetwork %(c=%{commit_libnetwork}; echo ${c:0:7})
Name: %{repo}
Epoch: 2
Version: 1.12.6
Release: 71.git%{shortcommit_docker}%{?dist}
Version: 1.13.1
Release: 53.git%{shortcommit_docker}%{?dist}
Summary: Automates deployment of containerized applications
License: ASL 2.0
URL: https://%{import_path}
@@ -96,6 +106,10 @@
Source26: %{name}-cleanup.timer
Source27: daemon.json
Source29: 99-docker.conf
Source30: %{git_tini}/archive/%{commit_tini}/tini-%{shortcommit_tini}.tar.gz
Source31: %{git_libnetwork}/archive/%{commit_libnetwork}/libnetwork-%{shortcommit_libnetwork}.tar.gz
Source32: seccomp.json
BuildRequires: cmake
BuildRequires: sed
BuildRequires: git
BuildRequires: glibc-static
@@ -163,7 +177,7 @@
Summary: Common files for docker and docker-latest
Requires: device-mapper-libs >= 7:1.02.97
Requires: oci-umount >= 2:2.0.0-1
Requires: oci-register-machine >= 1:0-3.14
Requires: oci-register-machine >= 1:0-5.13
Requires: oci-systemd-hook >= 1:0.1.4-9
Requires: %{name}-rhel-push-plugin = %{epoch}:%{version}-%{release}
Requires: subscription-manager-plugin-container
@@ -176,7 +190,7 @@
Requires: xfsprogs
# rhbz#1282898 - obsolete docker-storage-setup
Obsoletes: %{name}-storage-setup <= 0.0.4-2
Requires: skopeo-containers >= 0.1.24-3
Requires: skopeo-containers >= 1:0.1.26-2
Requires: gnupg
Requires: tar
@@ -286,12 +300,26 @@
# untar docker-containerd
tar zxf %{SOURCE20}
# untar docker-init
tar zxf %{SOURCE30}
# untar libnetwork
tar zxf %{SOURCE31}
%build
# compile docker-proxy first - otherwise deps in gopath conflict with the others below and this fails. Remove libnetwork libs then.
pushd libnetwork-%{commit_libnetwork}
mkdir -p src/github.com/%{repo}/libnetwork
ln -s $(pwd)/* src/github.com/%{repo}/libnetwork
export GOPATH=$(pwd)
go build -ldflags="-linkmode=external" -o %{repo}-proxy github.com/%{repo}/libnetwork/cmd/proxy
popd
mkdir _build
%global version_tag %{name}-%{version}-%{release}.%{_arch}
%{__sed} -r -i 's/^([\t ]*PkgVersion:[\t ]*)"<unknown>",$/\1"%{version_tag}",/' daemon/info.go
%{__sed} -r -i 's/^([\t ]*PkgVersion:[\t ]*)"<unknown>",$/\1"%{version_tag}",/' api/client/system/version.go
#%%{__sed} -r -i 's/^([\t ]*PkgVersion:[\t ]*)"<unknown>",$/\1"%{version_tag}",/' daemon/info.go
#%%{__sed} -r -i 's/^([\t ]*PkgVersion:[\t ]*)"<unknown>",$/\1"%{version_tag}",/' api/client/system/version.go
pushd _build
  mkdir -p src/%{provider}.%{provider_tld}/{%{name},projectatomic}
@@ -351,6 +379,12 @@
make
popd
# build docker-init
pushd tini-%{commit_tini}
cmake -DMINIMAL=ON .
make tini-static
popd
%install
# install binary
install -d %{buildroot}%{_bindir}
@@ -370,10 +404,17 @@
    continue
    fi
    rm $x/dynbinary-daemon/*.{md5,sha256}
    install -p -m 755 $x/dynbinary-daemon/%{repo}-proxy-* %{buildroot}%{_libexecdir}/%{repo}/%{repo}-proxy-current
    install -p -m 755 $x/dynbinary-daemon/%{repo}d-* %{buildroot}%{_bindir}/%{repo}d-current
    break
done
# install daemon.json and seccomp.json
install -dp %{buildroot}%{_sysconfdir}/%{name}
install -p -m 644 %{SOURCE32} %{buildroot}%{_sysconfdir}/%{name}
#install docker-proxy
install -d %{buildroot}%{_libexecdir}/%{repo}
install -p -m 755 libnetwork-%{commit_libnetwork}/%{repo}-proxy %{buildroot}%{_libexecdir}/%{repo}/%{repo}-proxy-current
install -dp %{buildroot}%{_sysconfdir}/%{name}
install -p -m 644 %{SOURCE27} %{buildroot}%{_sysconfdir}/%{name}
@@ -502,6 +543,10 @@
install -d -p %{buildroot}%{_usr}/lib/sysctl.d
install -p -m 644 %{SOURCE29} %{buildroot}%{_usr}/lib/sysctl.d
#install tini
install -d %{buildroot}%{_libexecdir}/%{repo}
install -p -m 755 tini-%{commit_tini}/tini-static %{buildroot}%{_libexecdir}/%{repo}/%{repo}-init-current
%check
[ ! -w /run/%{name}.sock ] || {
    mkdir test_dir
@@ -556,6 +601,24 @@
%postun rhel-push-plugin
%systemd_postun_with_restart rhel-push-plugin.service
%posttrans
# Install a default docker-storage-setup based on kernel version.
if [ ! -e %{_sysconfdir}/sysconfig/%{name}-storage-setup ]; then
    # Import /etc/os-release
    . %{_sysconfdir}/os-release || :
    case "$VERSION_ID" in
        7.0 | 7.1 | 7.2 | 7.3 | 7.4)
           echo "STORAGE_DRIVER=devicemapper" >> %{_sysconfdir}/sysconfig/%{name}-storage-setup || :
           echo "CONTAINER_THINPOOL=docker-pool" >> %{_sysconfdir}/sysconfig/%{name}-storage-setup || :
        ;;
    *)
        # 7.5 onwards, switch to overlay2 by default.
        echo "STORAGE_DRIVER=overlay2" >> %{_sysconfdir}/sysconfig/%{name}-storage-setup || :
    ;;
    esac
fi
#define license tag if not already defined
%{!?_licensedir:%global license %doc}
@@ -564,8 +627,11 @@
%doc AUTHORS CHANGELOG.md CONTRIBUTING.md MAINTAINERS NOTICE README*.md
%config(noreplace) %attr(644, root, root) %{_sysconfdir}/sysconfig/%{name}-storage
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}-network
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}-storage-setup
# Use ghost to not package default file installed by "make install-docker".
# Instead we will install a default based on kernel version in %posttrans.
%ghost %{_sysconfdir}/sysconfig/%{name}-storage-setup
%config(noreplace) %{_sysconfdir}/%{name}/daemon.json
%config(noreplace) %{_sysconfdir}/%{name}/seccomp.json
%dir %{_sysconfdir}/%{name}
%{_bindir}/%{name}d-current
%{_bindir}/%{name}-storage-setup
@@ -591,10 +657,10 @@
%{_datadir}/vim/vimfiles/syntax/%{name}file.vim
%dir %{_datadir}/zsh/site-functions
%{_datadir}/zsh/site-functions/_%{name}
# 1.12 specific
%dir %{_libexecdir}/%{repo}
%{_libexecdir}/%{repo}/%{repo}-runc-current
%{_libexecdir}/%{repo}/%{repo}-proxy-current
%{_libexecdir}/%{repo}/%{repo}-init-current
%{_unitdir}/%{name}-cleanup.service
%{_unitdir}/%{name}-cleanup.timer
#%%{_unitdir}/%%{repo}-containerd.service
@@ -650,6 +716,71 @@
%{_bindir}/%{name}-v1.10-migrator-*
%changelog
* Tue Feb 20 2018 Lokesh Mandvekar <lsm5@redhat.com> - 2:1.13.1-53.git774336d
- Resolves: #1540540
- built docker @projectatomic/docker-1.13.1-rhel commit 774336d
- built docker-novolume-plugin commit 385ec70
- built rhel-push-plugin commit af9107b
- built docker-lvm-plugin commit 8647404
- built docker-runc @projectatomic/docker-1.13.1-rhel commit e9c345b
- built docker-containerd @projectatomic/docker-1.13.1-rhel commit 296f1f8
- built docker-init commit 5b117de
- built libnetwork commit 14db3c4
* Mon Feb 12 2018 Lokesh Mandvekar <lsm5@redhat.com> - 2:1.13.1-52.gitce62987
- Resolves: #1534827, #1543575
- built docker @projectatomic/docker-1.13.1-rhel commit ce62987
- built docker-novolume-plugin commit 385ec70
- built rhel-push-plugin commit af9107b
- built docker-lvm-plugin commit 8647404
- built docker-runc @projectatomic/docker-1.13.1-rhel commit e9c345b
- built docker-containerd @projectatomic/docker-1.13.1-rhel commit 296f1f8
- built docker-init commit 0effd37
- built libnetwork commit 1ba8194
* Mon Feb 05 2018 Lokesh Mandvekar <lsm5@redhat.com> - 2:1.13.1-48.gitec9911e
- Resolves: #1536726 - bump skopeo-containers dependency
* Mon Feb 05 2018 Lokesh Mandvekar <lsm5@redhat.com> - 2:1.13.1-47.gitec9911e
- oci-register-machine >= 1:0-5.13 (RE: #1542112)
* Mon Feb 05 2018 Lokesh Mandvekar <lsm5@redhat.com> - 2:1.13.1-46.gitec9911e
- Resolves: #1542112 - depend on oci-register-machine (disabled in config file)
- revert removal of oci-register-machine done in 2:1.13.1-1
* Thu Feb 01 2018 Lokesh Mandvekar <lsm5@redhat.com> - 2:1.13.1-45.gitec9911e
- c-s-s >= 0.7.0-1
* Thu Feb 01 2018 Lokesh Mandvekar <lsm5@redhat.com> - 2:1.13.1-44.gitec9911e
- built docker @projectatomic/docker-1.13.1-rhel commit ec9911e
- built docker-novolume-plugin commit 385ec70
- built rhel-push-plugin commit af9107b
- built docker-lvm-plugin commit 8647404
- built docker-runc @projectatomic/docker-1.13.1-rhel commit 518736e
- built docker-containerd @projectatomic/docker-1.13.1-rhel commit 296f1f8
- built docker-init commit 0effd37
- built libnetwork commit 20dd462
* Tue Jan 30 2018 Lokesh Mandvekar <lsm5@redhat.com> - 2:1.13.1-43.gitec9911e
- built docker @projectatomic/docker-1.13.1-rhel commit ec9911e
- built docker-novolume-plugin commit 385ec70
- built rhel-push-plugin commit af9107b
- built docker-lvm-plugin commit 8647404
- built docker-runc @projectatomic/docker-1.13.1-rhel commit 518736e
- built docker-containerd @projectatomic/docker-1.13.1-rhel commit 296f1f8
- built docker-init commit 0effd37
- built libnetwork commit 20dd462
* Wed Jan 24 2018 Lokesh Mandvekar <lsm5@redhat.com> - 2:1.13.1-1.gitddee18e
- built docker @projectatomic/docker-1.13.1-rhel commit ddee18e
- built docker-novolume-plugin commit 385ec70
- built rhel-push-plugin commit af9107b
- built docker-lvm-plugin commit 8647404
- built docker-runc @projectatomic/docker-1.13.1-rhel commit 518736e
- built docker-containerd @projectatomic/docker-1.13.1-rhel commit 296f1f8
- built docker-init commit 0effd37
- built libnetwork commit 5ab4ab8
* Wed Dec 13 2017 Frantisek Kluknavsky <fkluknav@redhat.com> - 2:1.12.6-71.git3e8e77d
- rebased to 3e8e77dcb88db0530c839b249bea7d75f9cd01d7
- https://bugzilla.redhat.com/show_bug.cgi?id=1518519