From 6fc9c4508702ff502dc2c5999feb4428074433e6 Mon Sep 17 00:00:00 2001 From: Miro Stauder Date: Tue, 10 May 2022 19:17:18 +0000 Subject: [PATCH] fix reproducible builds --- .../images/proxysql/deb-compliant/entrypoint/entrypoint.bash | 4 ++++ .../images/proxysql/rhel-compliant/entrypoint/entrypoint.bash | 4 ++++ .../proxysql/rhel-compliant/rhel6/entrypoint/entrypoint.bash | 4 ++++ .../proxysql/rhel-compliant/rhel7/entrypoint/entrypoint.bash | 4 ++++ .../images/proxysql/suse-compliant/entrypoint/entrypoint.bash | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/docker/images/proxysql/deb-compliant/entrypoint/entrypoint.bash b/docker/images/proxysql/deb-compliant/entrypoint/entrypoint.bash index 97ec9a8cd6..b76897e705 100755 --- a/docker/images/proxysql/deb-compliant/entrypoint/entrypoint.bash +++ b/docker/images/proxysql/deb-compliant/entrypoint/entrypoint.bash @@ -24,7 +24,11 @@ rm -f /opt/proxysql/proxysql.ctl /opt/proxysql/proxysql || true echo "==> Building" git config --global --add safe.directory '/opt/proxysql' cd /opt/proxysql +echo "==> ProxySQL '$(git describe --long --abbrev=7)'" export SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD) +echo "==> Setting SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH}" +find /opt/proxysql -exec touch --date=@${SOURCE_DATE_EPOCH} {} \; + if [[ -z ${PROXYSQL_BUILD_TYPE:-} ]] ; then deps_target="build_deps" build_target="" diff --git a/docker/images/proxysql/rhel-compliant/entrypoint/entrypoint.bash b/docker/images/proxysql/rhel-compliant/entrypoint/entrypoint.bash index a60e31d862..0c5817c0a7 100755 --- a/docker/images/proxysql/rhel-compliant/entrypoint/entrypoint.bash +++ b/docker/images/proxysql/rhel-compliant/entrypoint/entrypoint.bash @@ -24,7 +24,11 @@ rm -fr /root/.pki /root/rpmbuild/{BUILDROOT,RPMS,SRPMS,BUILD,SOURCES,tmp} /opt/p echo "==> Building" git config --global --add safe.directory '/opt/proxysql' cd /opt/proxysql +echo "==> ProxySQL '$(git describe --long --abbrev=7)'" export SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD) +echo "==> Setting SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH}" +find /opt/proxysql -exec touch --date=@${SOURCE_DATE_EPOCH} {} \; + if [[ -z ${PROXYSQL_BUILD_TYPE:-} ]] ; then deps_target="build_deps" build_target="" diff --git a/docker/images/proxysql/rhel-compliant/rhel6/entrypoint/entrypoint.bash b/docker/images/proxysql/rhel-compliant/rhel6/entrypoint/entrypoint.bash index a60e31d862..0c5817c0a7 100755 --- a/docker/images/proxysql/rhel-compliant/rhel6/entrypoint/entrypoint.bash +++ b/docker/images/proxysql/rhel-compliant/rhel6/entrypoint/entrypoint.bash @@ -24,7 +24,11 @@ rm -fr /root/.pki /root/rpmbuild/{BUILDROOT,RPMS,SRPMS,BUILD,SOURCES,tmp} /opt/p echo "==> Building" git config --global --add safe.directory '/opt/proxysql' cd /opt/proxysql +echo "==> ProxySQL '$(git describe --long --abbrev=7)'" export SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD) +echo "==> Setting SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH}" +find /opt/proxysql -exec touch --date=@${SOURCE_DATE_EPOCH} {} \; + if [[ -z ${PROXYSQL_BUILD_TYPE:-} ]] ; then deps_target="build_deps" build_target="" diff --git a/docker/images/proxysql/rhel-compliant/rhel7/entrypoint/entrypoint.bash b/docker/images/proxysql/rhel-compliant/rhel7/entrypoint/entrypoint.bash index 241b04ff48..57d5e2cc64 100755 --- a/docker/images/proxysql/rhel-compliant/rhel7/entrypoint/entrypoint.bash +++ b/docker/images/proxysql/rhel-compliant/rhel7/entrypoint/entrypoint.bash @@ -24,7 +24,11 @@ rm -fr /root/.pki /root/rpmbuild/{BUILDROOT,RPMS,SRPMS,BUILD,SOURCES,tmp} /opt/p echo "==> Building" git config --global --add safe.directory '/opt/proxysql' cd /opt/proxysql +echo "==> ProxySQL '$(git describe --long --abbrev=7)'" export SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD) +echo "==> Setting SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH}" +find /opt/proxysql -exec touch --date=@${SOURCE_DATE_EPOCH} {} \; + if [[ -z ${PROXYSQL_BUILD_TYPE:-} ]] ; then deps_target="build_deps" build_target="" diff --git a/docker/images/proxysql/suse-compliant/entrypoint/entrypoint.bash b/docker/images/proxysql/suse-compliant/entrypoint/entrypoint.bash index 986adb6e28..5f3a516cea 100755 --- a/docker/images/proxysql/suse-compliant/entrypoint/entrypoint.bash +++ b/docker/images/proxysql/suse-compliant/entrypoint/entrypoint.bash @@ -24,7 +24,11 @@ rm -fr /root/.pki /root/rpmbuild/{BUILDROOT,RPMS,SRPMS,BUILD,SOURCES,tmp} /opt/p echo "==> Building" git config --global --add safe.directory '/opt/proxysql' cd /opt/proxysql +echo "==> ProxySQL '$(git describe --long --abbrev=7)'" export SOURCE_DATE_EPOCH=$(git show -s --format=%ct HEAD) +echo "==> Setting SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH}" +find /opt/proxysql -exec touch --date=@${SOURCE_DATE_EPOCH} {} \; + if [[ -z ${PROXYSQL_BUILD_TYPE:-} ]] ; then deps_target="build_deps" build_target=""