Hi On Fri, Aug 07, 2015 at 04:54:37PM +0200, Dhole wrote: > On 08/07/2015 03:39 PM, Osamu Aoki wrote: > > I noticed many people are fixing this issue in this way. That may fix > > some itch for small group of highly technically minded people but does > > disservice to many end-users. > > > > We should better as DD than the one proposed. > >> - <version><date></version> > > > > That's very rough approach. > > > > Let's promote to use the last changelog entry date for this kind of > > BUILD_DATE for reproducible build. > > > > I think something like the following to set it: > > > > # short date of this Debian package (debian/changelog) > > BUILD_DATE ?= $(shell { date +'%Y-%m-%d' -d"`dpkg-parsechangelog -SDate`" > > || date +'(No changelog) %Y-%m-%d' ; }) > > > > Patch should be more like > > > >> - <version><date></version> > >> + <version>&builddate;</version> > > > > Then set the date via entity. > > > > Osamu > > > > Hi Osamu, > > I understand your concern about keeping the date on the generated docs. > As per your suggested solution: replacing the timestamp with the date > from latests debian/changelog entry is something we are usually doing in > the reproducible builds team to fix issues like this one. > > In this case, I didn't find a nice way to pass an external variable to > the sgml files. That's why my first approach was to plainly remove the > timestamp (It happens in many packages that the timestamp is not really > needed). But I understand that in debiandoc-sgml-doc the date should be > kept. I've searched through the documentation of debiandoc, but I didn't > find how to pass external values. How do you define an entity > (&builddate in your example) so that it can be filled externally?
It can be done by replacing <date> with &builddate; and add entity file etc. That was what I was talking ... After some thought, this approach is ugly. So I updated the debiandoc-sgml package to 1.2.31-1. If it finds DEBIANDOC_DATE defdined, <date> tag is replaced with this environment variable. We can simply add the following in the debian/rules. DEBIANDOC_DATE ?= $(shell date +'%Y-%m-%d' -d"`dpkg-parsechangelog -SDate`") export DEBIANDOC_DATE > I can provide a patch like that once I learn how to pass external > variables to the docs :) If you look at debian-reference source, it has many autogenerated entity to pass variables to the docs. But I do not think you need this complication for <date> tag. Osamu