Hello community,

here is the log from the commit of package docker for openSUSE:Factory checked 
in at 2017-10-25 17:45:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/docker (Old)
 and      /work/SRC/openSUSE:Factory/.docker.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "docker"

Wed Oct 25 17:45:18 2017 rev:62 rq:536271 version:17.07.0_ce

Changes:
--------
--- /work/SRC/openSUSE:Factory/docker/docker.changes    2017-10-20 
14:40:04.748497368 +0200
+++ /work/SRC/openSUSE:Factory/.docker.new/docker.changes       2017-10-25 
17:45:19.361606531 +0200
@@ -1,0 +2,8 @@
+Tue Oct 24 06:50:29 UTC 2017 - [email protected]
+
+- Correctly set `docker version` information, including the version, git
+  commit, and SOURCE_DATE_EPOCH (requires a backport). This should
+  *effectively* make Docker builds reproducible, with minimal cost. boo#1064781
+  + bsc1064781-0001-Allow-to-override-build-date.patch
+
+-------------------------------------------------------------------

New:
----
  bsc1064781-0001-Allow-to-override-build-date.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ docker.spec ++++++
--- /var/tmp/diff_new_pack.aPqhYA/_old  2017-10-25 17:45:20.389558285 +0200
+++ /var/tmp/diff_new_pack.aPqhYA/_new  2017-10-25 17:45:20.393558098 +0200
@@ -22,14 +22,22 @@
 %global docker_migration_warnfile %{docker_store}/docker-update-message.txt
 %global docker_plugin_warnfile    %{docker_store}/docker-plugin-message.txt
 %define docker_graph              %{docker_store}/graph
-%define git_version 78d1802
-%define version_unconverted 17.07.0_ce
 %define __arch_install_post export NO_BRP_STRIP_DEBUG=true
+
+# Used when generating the "build" information for Docker version. The value of
+# git_commit_epoch is unused here (we use SOURCE_DATE_EPOCH, which rpm
+# helpfully injects into our build environment from the changelog). If you want
+# to generate a new git_commit_epoch, use this:
+#  $ date --date="$(git show --format=fuller --date=iso $COMMIT_ID | grep -oP 
'(?<=^CommitDate: ).*')" '+%s'
+%define git_version 87847530f717
+%define git_commit_epoch 1508266293
+
 # When upgrading to a new version requires the service not to be restarted
 # Due to a long migration process update last_migration_version to the new 
version
 # that will first perform the migration, last time this was needed was version
 # 1.10.1
 %global last_migration_version 1.10.1
+
 Name:           docker
 Version:        17.07.0_ce
 Release:        0
@@ -58,6 +66,8 @@
 Patch401:       
bsc1055676-0001-daemon-oci-obey-CL_UNPRIVILEGED-for-user-namespaced-.patch
 # SUSE-BACKPORT: Backport of https://github.com/moby/moby/pull/34573. 
bsc#1045628
 Patch402:       
bsc1045628-0001-devicemapper-remove-container-rootfs-mountPath-after.patch
+# SUSE-BACKPORT: Backport of https://github.com/moby/moby/pull/34176. 
boo#1064781
+Patch403:       bsc1064781-0001-Allow-to-override-build-date.patch
 BuildRequires:  audit
 BuildRequires:  bash-completion
 BuildRequires:  ca-certificates
@@ -179,6 +189,8 @@
 %patch401 -p1 -d components/engine
 # bsc#1045628
 %patch402 -p1 -d components/engine
+# boo#1064781
+%patch403 -p1 -d components/engine
 
 cp %{SOURCE7} .
 cp %{SOURCE9} .
@@ -197,12 +209,19 @@
 (cat <<EOF
 export AUTO_GOPATH=1
 export DOCKER_BUILDTAGS="$BUILDTAGS"
-export DOCKER_GITCOMMIT=%{git_version}
 # Until boo#1038493 is fixed properly we need to do this hack to get the
 # compiled-into-the-binary GOROOT.
 export GOROOT="$(GOROOT= go env GOROOT)"
 # Make sure we always build PIC code. bsc#1048046
 export BUILDFLAGS="-buildmode=pie"
+# Specify all of the versioning information. We use SOURCE_DATE_EPOCH if it's
+# been injected by rpmbuild, otherwise we use the hardcoded git_commit_epoch
+# generated above. boo#1064781
+export VERSION="$(cat ./VERSION 2>/dev/null || echo '%{version}')"
+export DOCKER_GITCOMMIT="%{git_version}"
+export GITCOMMIT="%{git_version}"
+export SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-%{git_commit_epoch}}"
+export BUILDTIME="$(date -u -d "@$SOURCE_DATE_EPOCH" --rfc-3339 ns 2>/dev/null 
| sed -e 's/ /T/')"
 EOF
 ) > docker_build_env
 . ./docker_build_env
@@ -301,10 +320,10 @@
                | grep -v 'github.com/docker/cli/vendor' \
                | grep -v 'github.com/docker/cli/cli/command/idresolver' \
                | grep -v 'github.com/docker/cli/cli/command/image' \
-               | grep -v 'github.com/docker/cli/cli/image'
+               | grep -v 'github.com/docker/cli/cli/image' \
                )
 
-go test -buildmode=pie -ldflags -w -tags daemon -a -test.timeout=10m $PKG_LIST
+go test -buildmode=pie -cover -ldflags -w -tags daemon -a -test.timeout=10m 
$PKG_LIST
 
 %install
 install -d %{buildroot}%{go_contribdir}

++++++ bsc1064781-0001-Allow-to-override-build-date.patch ++++++
>From 760763e9957840f1983a5006f4e66d6920ec496e Mon Sep 17 00:00:00 2001
From: "Bernhard M. Wiedemann" <[email protected]>
Date: Wed, 19 Jul 2017 06:17:19 +0200
Subject: [PATCH] Allow to override build date

in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.

SUSE-Bugfix: https://bugzilla.suse.com/show_bug.cgi?id=1064781
Signed-off-by: Bernhard M. Wiedemann <[email protected]>
Signed-off-by: Aleksa Sarai <[email protected]>
---
 hack/make.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hack/make.sh b/hack/make.sh
index b7d59ba94a00..7d18d649b540 100755
--- a/hack/make.sh
+++ b/hack/make.sh
@@ -68,7 +68,7 @@ DEFAULT_BUNDLES=(
 )

 VERSION=$(< ./VERSION)
-! BUILDTIME=$(date --rfc-3339 ns 2> /dev/null | sed -e 's/ /T/')
+! BUILDTIME=$(date -u -d "@${SOURCE_DATE_EPOCH:-$(date +%s)}" --rfc-3339 ns 2> 
/dev/null | sed -e 's/ /T/')
 if [ "$DOCKER_GITCOMMIT" ]; then
        GITCOMMIT="$DOCKER_GITCOMMIT"
 elif command -v git &> /dev/null && [ -d .git ] && git rev-parse &> /dev/null; 
then
-- 
2.14.2


Reply via email to