[Reproducible-builds] Bug#783574: mopidy: [PATCH] Please make the build reproducible.

Jérémy Bobbio lunar at debian.org
Tue Apr 28 12:36:40 UTC 2015


Hi Juan,

A few comments on your patch submission so you can get better at it. :)

Juan Picca:
> Source: mopidy
> Version: 1.0.2

This is a Debian bug report, so you need to use the full version of the
Debian package—including the package revision number. For mopidy, that
would mean 1.0.2-1.

> Severity: normal

There is no consensus that the fact that a package can't be built
reproducibly should be considered as a bug. So for the moment, this
should be “wishlist”: we want to improve the package, we are not fixing
defects.

> Description: Make documentation build reproducible.
>  Use the last changelog date in generated documentation
> Author: Juan Picca <jumapico at gmail.com>
> Last-Update: 2015-04-28
> ---
> This patch header follows DEP-3: http://dep.debian.net/deps/dep3/

Anyone familiar with Debian patches will notice. Writing this line
mostly adds noise.

> --- a/docs/Makefile
> +++ b/docs/Makefile
> @@ -1,8 +1,10 @@
>  # Makefile for Sphinx documentation
>  #
> +LAST_CHANGE=$(shell dpkg-parsechangelog -S Date -l../debian/changelog)
> +BUILD_DATE=$(shell LC_ALL=C date -u "+%B %d, %Y" -d "$(LAST_CHANGE)")
>  
>  # You can set these variables from the command line.
> -SPHINXOPTS    =
> +SPHINXOPTS    = -D today="$(BUILD_DATE)"
>  SPHINXBUILD   = sphinx-build
>  PAPER         =
>  BUILDDIR      = _build

The patch that you sent is a patch to be put in `debian/patches` as it
touches upstream files. But the changes you are making to upstream files
are very specific to the Debian package. If I take the patched version
and remove the `debian/` directory, I'm going to get errors.

Ideally, we want other distributions to be able to make their package
reproducible. So when we need to change the upstream build system, we
should aim at making it in a way that is agnostic to the distribution.

In this specific case, you could do this by changing the upstream
Makefile to add extra options to SPHINXOPTS only when the BUILD_DATE
variable exists in the environment. Then BUILD_DATE can be set and
exported in `debian/rules`.

Hope that helps,
-- 
Lunar                                .''`. 
lunar at debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20150428/55cabc26/attachment.sig>


More information about the Reproducible-builds mailing list