Hi Sascha,
On Fri, Jun 17, 2016 at 03:48:09PM +0000, Sascha Steinbiss wrote:
> While working on the "reproducible builds" effort [1], we have noticed
> that git-buildpackage could not be built reproducibly.

Thanks for the patch. Two comments inline below:

> This is fixed by the attached patch. Firstly, it sets deterministic timestamps
> (the last Debian release date) in the manpages. This is currently done
> explicitly in the docs/Makefile as the more generic docbook2man patch [2]
> has not been accepted yet.
> Secondly, the patch excludes some test configuration module variables from the
> Epydoc documentation as they contain the names of build-specific temporary
> directories.
> Once applied, git-buildpackage can be built reproducibly in our current
> experimental framework.
> 
> Best regards
> Sascha
> 
> [1] https://wiki.debian.org/ReproducibleBuilds
> [2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=800797

> diff --git a/docs/Makefile b/docs/Makefile
> index 581e0a1..106245f 100644
> --- a/docs/Makefile
> +++ b/docs/Makefile
> @@ -27,6 +27,7 @@ VERSION_ENT=version.ent
>  GBP_VERSION=../gbp/version.py
>  DEB_VERSION=$(shell sed -ne 's/^gbp_version="\([.a-z0-9~-]\+\)"/\1/p' 
> $(GBP_VERSION))
>  CHANGELOG=../debian/changelog
> +MAN_DATE=$(shell dpkg-parsechangelog -l ../debian/changelog -SDate | TZ=UTC 
> LC_ALL=C date -f- +'%d %B %Y')
>  
>  # Stuff to build docs outside Debian
>  HAVE_SGML2X ?= 1
> @@ -49,12 +50,14 @@ BUILD_MAN_XREF_PAGES=$(patsubst 
> %,buildxref/%,$(SGML_MANPAGES))
>  
>  buildxref/%.1 buildxref/%.5: man.%.sgml manpages/%.sgml
>       docbook2man -o buildxref $<
> +     sed -i -r "s/\"[^\"]+\"/\"$(MAN_DATE)\"/3" $@
>  
>  manpage.refs: $(BUILD_MAN_XREF_PAGES)
>       cp buildxref/$@ $@
>  
>  %.1 %.5: manpage.refs
>       docbook2man -o . man.$*.sgml
> +     sed -i -r "s/\"[^\"]+\"/\"$(MAN_DATE)\"/3" $@

I'd rather see this fixed in docbook2man. I'm happy to apply this
temporarily but want to add a bugref so I can revert that patch once
it's fixed. I couldn't find a bug filed against docbook-utils
though. Where should I look?

>  git-pbuilder.1: ../bin/git-pbuilder
>       pod2man $< $@
> diff --git a/setup.cfg b/setup.cfg
> index d443f2a..2bbb17a 100644
> --- a/setup.cfg
> +++ b/setup.cfg
> @@ -10,7 +10,7 @@ name = git-buildpackage
>  sourcecode = no
>  url = https://honk.sigxcpu.org/piki/projects/git-buildpackage/
>  target = build/apidocs/
> -fail-on = docstring_warning
> +#fail-on = docstring_warning

We can avoid these leaving the broken reference detection intact:

    
https://git.sigxcpu.org/cgit/git-buildpackage/commit/?id=d92b656799ca50abec3883cea773cc0e5529a434

Cheers,
 -- Guido

Reply via email to