control: tags -1 + patch
control: block -1 by 759886
control: block -1 by 759895

Hi,

attached trivial patch adds support for reproducible builds as per 
https://wiki.debian.org/ReproducibleBuilds#The_basics_for_making_packages_build_reproducible

It's also available via git.debian.org/git/reproducible/cdbs.git in the branch 
pu/reproducible_builds

I've confirmed that it works as it should. 
https://jenkins.debian.net/userContent/rb-pkg/debian-edu-artwork.html is the 
first result of it \o/

As discussed it needs features in debhelper not yet available in sid. I'll 
ping the bug once those are available :-)


cheers,
        Holger
From 967c39aec480a18281c14c3c36cb8a191e3c30de Mon Sep 17 00:00:00 2001
From: Holger Levsen <hol...@layer-acht.org>
Date: Sat, 11 Oct 2014 14:30:46 +0200
Subject: [PATCH] Make debhelper.mk run dh_strip_nondeterminism, dh_fixmtimes
 and dh_genbuildinfo as needed.

dh_strip_nondeterminism is a helper which will normalize files that captures
aspect of the build environment (e.g. timestamps or file order) and make the
build process non-deterministic.

dh_fixmtimes will change the modification time of any file that has been
created later than the time of the latest debian/changelog entry to the time
of the latest debian/changelog entry.

dh_genbuildinfo adds the .buildinfo file to the build products.

These features are not yet in debhelper proper, they are available from
git.debian.org/git/reproducible/debhelper.git

See https://wiki.debian.org/ReproducibleBuilds for more information
on reproducible builds in Debian.
---
 1/rules/debhelper.mk.in | 3 +++
 doc/cdbs-doc.xml        | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/1/rules/debhelper.mk.in b/1/rules/debhelper.mk.in
index 7475a1e..41a9736 100644
--- a/1/rules/debhelper.mk.in
+++ b/1/rules/debhelper.mk.in
@@ -257,6 +257,7 @@ common-binary-fixup-indep:: $(patsubst %,binary-fixup/%,$(DEB_INDEP_PACKAGES))
 # This rule is called after stripping; it compresses, fixes permissions,
 # and sets up shared library information.
 $(patsubst %,binary-fixup/%,$(DEB_ALL_PACKAGES)) :: binary-fixup/%: binary-strip/%
+	dh_strip_nondeterminism
 	dh_compress -p$(cdbs_curpkg) $(call cdbs_add_dashx,$(call cdbs_expand_curvar,DEB_COMPRESS_EXCLUDE)) $(call cdbs_expand_curvar,DEB_DH_COMPRESS_ARGS)
 	dh_fixperms -p$(cdbs_curpkg) $(call cdbs_add_dashx,$(call cdbs_expand_curvar,DEB_FIXPERMS_EXCLUDE)) $(call cdbs_expand_curvar,DEB_DH_FIXPERMS_ARGS)
 # TODO: Use DEB_DH_MAKESHLIBS_ARGS as package-default (not global override)
@@ -286,7 +287,9 @@ $(patsubst %,binary-makedeb-IMPL/%,$(DEB_ALL_PACKAGES)) :: binary-makedeb-IMPL/%
 # TODO: Use DEB_DH_GENCONTROL_ARGS as package-default (not global override)
 	dh_gencontrol -p$(cdbs_curpkg) $(DEB_DH_GENCONTROL_ARGS)
 	dh_md5sums -p$(cdbs_curpkg) $(call cdbs_expand_curvar,DEB_DH_MD5SUMS_ARGS)
+	dh_fixmtimes
 	$(DEB_DH_BUILDDEB_ENV) dh_builddeb -p$(cdbs_curpkg) $(call cdbs_expand_curvar,DEB_DH_BUILDDEB_ARGS)
+	dh_genbuildinfo
 
 ## Deprecated
 common-binary-post-install:: common-binary-post-install-arch common-binary-post-install-indep
diff --git a/doc/cdbs-doc.xml b/doc/cdbs-doc.xml
index f5f45cb..def168a 100644
--- a/doc/cdbs-doc.xml
+++ b/doc/cdbs-doc.xml
@@ -674,7 +674,9 @@ include /usr/share/cdbs/1/rules/debhelper.mk
           <listitem><para>dh_builddeb</para></listitem>
           <listitem><para>dh_clean</para></listitem>
           <listitem><para>dh_compress</para></listitem>
+          <listitem><para>dh_fixmtimes</para></listitem>
           <listitem><para>dh_fixperms</para></listitem>
+          <listitem><para>dh_genbuildinfo</para></listitem>
           <listitem><para>dh_gencontrol</para></listitem>
           <listitem><para>dh_install</para></listitem>
           <listitem><para>dh_installcatalogs</para></listitem>
@@ -703,6 +705,7 @@ include /usr/share/cdbs/1/rules/debhelper.mk
           <listitem><para>dh_prep</para></listitem>
           <listitem><para>dh_shlibdeps</para></listitem>
           <listitem><para>dh_strip</para></listitem>
+          <listitem><para>dh_strip_nondeterminism</para></listitem>
         </itemizedlist>
 
       Of course, these are called in the correct order, not in the one
-- 
1.9.1

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to