Bug#788505: python-pypump: [PATCH] please make the build reproducible

2016-10-14 Thread W. Martin Borgert
Thanks to SOURCE_DATE_EPOCH support in sphinx and dh_sphinxdoc,
there is nothing left to do for me :~)



Bug#788505: [Python-modules-team] Bug#788505: python-pypump: [PATCH] please make the build reproducible

2015-06-12 Thread Jérémy Bobbio
(Cc'ing the reproducible builds mailing list instead of specific team
members.)

W. Martin Borgert:
 while I'm all in favour of reproducible builds, I'm not happy
 with messing up hundreds of packages debian/rules files. Why not
 change the defaults of sphinx or dh or whatever and just rebuild
 packages?

It would need to be Sphinx. If you look at the patch for pypump you have
replied to:

 - make -C docs html
 + make -C docs html SPHINXOPTS=$(SPHINXOPTS)

As you can see, the current `debian/rules` already contains specific
code to build the documentation.

But if we can find solutions that would fix all these packages at once,
that would be really awesome! :)

 Who needs or wants a last change date in the HTML anyway?

Some people argue that you need it to determine how “fresh” the
documentation is. In the case of documentation generated by Debian
package, I think the package version string is a much more reliable
information.

The problem is that Sphinx is not only used to build Debian packages. So
changing the default to the use the latter sounds tricky.

 We worked years to get the d/r files clean and short and now we
 add cruft to it again? Which is repeated redundantly in hundreds of
 files? Maybe dh_sphinxdoc could just do the right thing?

`dh_sphinxdoc` should indeed be changed to do the right thing.

But looking at the stream of patches written by Juan for this issue, I
haven't seen any for packages using `dh_sphinxdoc`, and even if patches
look alike, they are hardly identical.

The only “cruft” I really see is:

 +LAST_CHANGE=$(shell dpkg-parsechangelog -S Date)
 +BUILD_DATE=$(shell LC_ALL=C date -u +%B %d, %Y -d $(LAST_CHANGE))

The problem is that every tool on Earth uses a different date format.
They have been discussions on adding variables to
`/usr/share/dpkg/pkg-info.mk`

But that basically would mean replacing the two lines by:

include /usr/share/dpkg/pkg-info.mk

And then using something like (if we can agree to export the date in
multiple format):

SPHINXOPTS := -D today=\$(SOURCE_DATE_ENGLISH_SHORT)\

It doesn't feel like a huge win to me.

(Remember that packages can be built without using `dpkg-buildpackage`,
so the Makefile has to be self-contained.)

-- 
Lunar.''`. 
lu...@debian.org: :Ⓐ  :  # apt-get install anarchism
`. `'` 
  `-   


signature.asc
Description: Digital signature


Bug#788505: [Python-modules-team] Bug#788505: python-pypump: [PATCH] please make the build reproducible

2015-06-12 Thread W. Martin Borgert
Dear Juan, (and H01ger, Lunar and team cc'ed),

while I'm all in favour of reproducible builds, I'm not happy
with messing up hundreds of packages debian/rules files. Why not
change the defaults of sphinx or dh or whatever and just rebuild
packages?

Who needs or wants a last change date in the HTML anyway?

We worked years to get the d/r files clean and short and now we
add cruft to it again? Which is repeated redundantly in hundreds of
files? Maybe dh_sphinxdoc could just do the right thing?

Cheers


On 2015-06-11 22:51, Juan Picca wrote:
  [1]: https://wiki.debian.org/ReproducibleBuilds

 diff -urNp python-pypump-0.6.old/debian/rules python-pypump-0.6/debian/rules
 --- python-pypump-0.6.old/debian/rules2015-05-13 14:48:10.0 
 -0300
 +++ python-pypump-0.6/debian/rules2015-06-11 22:30:19.454056240 -0300
 @@ -2,6 +2,10 @@
  PYTHONS:=$(shell pyversions -vr)
  PYTHON3S:=$(shell py3versions -vr)
  
 +LAST_CHANGE = $(shell dpkg-parsechangelog -S Date)
 +BUILD_DATE  = $(shell LC_ALL=C date -u +%B %d, %Y -d $(LAST_CHANGE))
 +SPHINXOPTS := -D today=\$(BUILD_DATE)\
 +
  %:
   dh $@ --buildsystem=python_distutils --with python2,python3,sphinxdoc
  
 @@ -12,7 +16,7 @@ override_dh_clean:
  
  override_dh_auto_build:
   dh_auto_build
 - make -C docs html
 + make -C docs html SPHINXOPTS=$(SPHINXOPTS)
  
   # # This version pypump-shell needs the path $HOME/.config/
   # # to exist for it to build correctly, so I'm adding it


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#788505: python-pypump: [PATCH] please make the build reproducible

2015-06-11 Thread Juan Picca
Package: python-pypump
Version: 0.6-1
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: timestamps

Hi!

While working on the reproducible builds effort [1], we have noticed
that python-pypump could not be built reproducibly.

The attached patch removes extra timestamps from the build system.
Once applied, python-pypump can be built reproducibly in our current
experimental framework.

 [1]: https://wiki.debian.org/ReproducibleBuilds
diff -urNp python-pypump-0.6.old/debian/rules python-pypump-0.6/debian/rules
--- python-pypump-0.6.old/debian/rules	2015-05-13 14:48:10.0 -0300
+++ python-pypump-0.6/debian/rules	2015-06-11 22:30:19.454056240 -0300
@@ -2,6 +2,10 @@
 PYTHONS:=$(shell pyversions -vr)
 PYTHON3S:=$(shell py3versions -vr)
 
+LAST_CHANGE = $(shell dpkg-parsechangelog -S Date)
+BUILD_DATE  = $(shell LC_ALL=C date -u +%B %d, %Y -d $(LAST_CHANGE))
+SPHINXOPTS := -D today=\$(BUILD_DATE)\
+
 %:
 	dh $@ --buildsystem=python_distutils --with python2,python3,sphinxdoc
 
@@ -12,7 +16,7 @@ override_dh_clean:
 
 override_dh_auto_build:
 	dh_auto_build
-	make -C docs html
+	make -C docs html SPHINXOPTS=$(SPHINXOPTS)
 
 	# # This version pypump-shell needs the path $HOME/.config/
 	# # to exist for it to build correctly, so I'm adding it