[Rd] Revisiting and updating reproducible builds for base R in Debian

Dirk Eddelbuettel edd @end|ng |rom deb|@n@org
Wed Aug 5 02:01:03 CEST 2026


Hi Gabe,

On 4 August 2026 at 16:23, Gabriel Becker wrote:
| I could be way off base but I think it might be here from
| src/library/tools/Makefile.in:
| 
| ## This is deliberately conservative: -nt seems to work differently in some
| shells
| ## We first use mkdesc2 (with date) to install the DESCRIPTION, then
| re-install
| all: Makefile DESCRIPTION
| @$(ECHO) "building package '$(pkg)'"
| @$(MKINSTALLDIRS) $(top_builddir)/library/$(pkg)
| @$(MKINSTALLDIRS) $(top_builddir)/library/$(pkg)/misc
| @$(ECHO) $(abs_top_srcdir) \
|  > $(top_builddir)/library/$(pkg)/misc/top.txt
| @$(MAKE) mkR1 mkdesc2  $(WRE_DATA)
| @$(MAKE) mksrc
| @if ! test -f $(top_builddir)/library/$(pkg)/R/$(pkg); then \
|  $(INSTALL_DATA) all.R $(top_builddir)/library/$(pkg)/R/$(pkg); \
| else if test all.R -nt $(top_builddir)/library/$(pkg)/R/$(pkg); then \
|  $(INSTALL_DATA) all.R $(top_builddir)/library/$(pkg)/R/$(pkg); \
|  fi \
| fi
| @$(MAKE) sysdata
| 
| * @$(ECHO) "tools:::.install_package_description('.',
| '"$(top_builddir)/library/${pkg}"')" | \  R_DEFAULT_PACKAGES=NULL $(R_EXE)
| > /dev/null*
| 
| Note this last tools:::.install_packages_description is *not* passing the
| timestamp value as it does in the shared basepkg.mk. So I think mkdesc2 is

That is along the lines I was expecting: another call without the timestamp
so current time gets used. What I didn't grok was how it affected 'tools' but
not 'base'.

But you seem to have solved that: it is a one-off in tools/Makefile.in. That
could do it.

| grabbing the timestamp environment field but then the DESCRIPTION is being
| overwritten by the bolded command at the end which doesn't respect the
| timestamp.

Spot on, and I concur. I need to shimmy the PKG_BUILT_STAMP in there too. And
the '@$(MAKE) mkR1 mkdesc2  $(WRE_DATA)' looks suspicious too. Another
possible regeneration.

But also "bolded" <wink> ?  I read email in tty mode not html so I may have
missed that. The mailman list archive is text but I do see the wrapping '*'.
All good though.

| Caveat: I haven't run anything to confirm this is the issue. Anyway, HTH.

This is good, and much appreciated!  Will play with it, likely tomorrow.

Cheers, Dirk

-- 
dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org



More information about the R-devel mailing list