Article View: linux.debian.bugs.dist
Article #6492Bug#1155589: mccode: non-deterministic documentation tarballs (timestamps, users, groups)
From: Vagrant Cascadian
Date: Fri, 27 Nov 2026 23:00
Date: Fri, 27 Nov 2026 23:00
99 lines
6053 bytes
6053 bytes
--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
On 2026-11-27, Vagrant Cascadian wrote:
> The embedded documentation tarballs include timestamps and user and
> group information:
>
> =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 ./usr/mcstas/3.=
5/doc/manuals/mcstas-components-html.tgz
> =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 mcsta=
s-components-html.tgz-content
> =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=9C=E2=94=80=E2=
=94=80 file list
> =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 @@ -1,743 +1,=
743 @@
> =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 --rw-r--r-- =
0 pbuilder1 (1111) pbuilder1 (1111) 186746 2027-12-28 07:48:37.000000 =
Component_manual.html
> =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 --rw-r--r-- =
0 pbuilder1 (1111) pbuilder1 (1111) 89544 2027-12-28 07:48:37.000000 =
Component_manual16.html
> ...
> =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 +-rw-r--r-- =
0 pbuilder2 (2222) pbuilder2 (2222) 186746 2026-11-25 01:56:23.000000 =
Component_manual.html
> =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 =E2=94=82 +-rw-r--r-- =
0 pbuilder2 (2222) pbuilder2 (2222) 89544 2026-11-25 01:56:23.000000 =
Component_manual16.html
...
> Subject: [PATCH 2/6] docs/manuals/mcstas/CMakeLists.txt: Pass arguments t=
o tar
> for reproducible tarballs.
>
> https://reproducible-builds.org/docs/archives/
> ---
> docs/manuals/mcstas/CMakeLists.txt | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/docs/manuals/mcstas/CMakeLists.txt b/docs/manuals/mcstas/CMa=
keLists.txt
> index 8c577123..3e45e39e 100644
> --- a/docs/manuals/mcstas/CMakeLists.txt
> +++ b/docs/manuals/mcstas/CMakeLists.txt
> @@ -141,7 +141,7 @@ if(HTLATEX_EXECUTABLE AND BASH_EXECUTABLE AND PYTHON3=
_EXECUTABLE)
> COMMAND "${HTLATEX_EXECUTABLE}" "${DOC}.tex" "html,3,mathjax,chars=
et=3Dutf-8" " -cvalidate -cunihtf -utf8" ""
> COMMAND "${PYTHON3_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/injec=
t-toc-sidebar.py" "${DOC}"
> COMMAND "${BASH_EXECUTABLE}" "-c" "cat '${CMAKE_CURRENT_SOURCE_DIR=
}/html-style-overrides.css' >> '${DOC}.css'"
> - COMMAND "${BASH_EXECUTABLE}" "-c" "tar czf '${DOC}-html.tgz' ${DOC=
}*.html ${DOC}.css figures 2>/dev/null || tar czf '${DOC}-html.tgz' ${DOC}*=
.html ${DOC}.css"
> + COMMAND "${BASH_EXECUTABLE}" "-c" "tar --sort=3Dname --mtime=3D@0 =
--owner=3D0 --group=3D0 --numeric-owner -czf '${DOC}-html.tgz' ${DOC}*.html=
${DOC}.css figures 2>/dev/null || tar --sort=3Dname --mtime=3D@0 --owner=
=3D0 --group=3D0 --numeric-owner -czf '${DOC}-html.tgz' ${DOC}*.html ${DOC}=
.css"
> WORKING_DIRECTORY "${PROJECT_BINARY_DIR}"
> DEPENDS "${PROJECT_BINARY_DIR}/${DOC}.pdf" "${CMAKE_CURRENT_SOURCE=
_DIR}/html-style-overrides.css" "${CMAKE_CURRENT_SOURCE_DIR}/generate-xbb-f=
iles.sh" "${CMAKE_CURRENT_SOURCE_DIR}/inject-toc-sidebar.py"
> COMMENT "Building HTML version of ${DOC} (tex4ht/MathJax), injecti=
ng TOC sidebar, and packaging as ${DOC}-html.tgz"
I forgot to mention...
the documentation recommends using --mtime=3D@${SOURCE_DATE_EPOCH} here,
but for some reason it was not available at this point during the
build. I also tried using "string(TIMESTAMP source_date_epoch "%s" UTC)"
and then pass "--mtime=3D@${source_date_epoch}" ... there may be some
quirky cmake nuances I am not catching here, or cmake shell invocation,
etc.
If for some reason, setting --mtime=3D@0 causes some problems, exploring a
little further how to extract SOURCE_DATE_EPOCH in the right context
will be needed.
Also, this patch may not be acceptible for upstream, as it uses syntax
for GNU tar. BSD tar takes a slightly different syntax, which might need
a separate fallback in the "tar || tar" chain... (it not obvious to me
why there is already a tar fallback in the upstream code).
live well,
vagrant
--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCawoKqgAKCRDcUY/If5cW
qqleAQDnf/2W+g4Mf3r3Q6hEBATLZHUvVnoe7WEYyRbBWnlyngEAuYLoLKjnC/Zr
qazsGL8jiN1Bj5x1VwS7ZKej1XAjIwU=
=Xhvd
-----END PGP SIGNATURE-----
--=-=-=--
Technical Details
Message-ID:
<O4d57-eyBZ-1@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomodReferences:
<O4csp-eymK-7@gated-at.bofh.it> <O4csp-eymK-7@gated-at.bofh.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomod From: Vagrant Cascadian <vagrant@reproducible-builds.org> Newsgroups: linux.debian.bugs.dist Subject: Bug#1155589: mccode: non-deterministic documentation tarballs (timestamps, users, groups) Date: Sat, 28 Nov 2026 00:00:01 +0100 Message-ID: <O4d57-eyBZ-1@gated-at.bofh.it> References: <O4csp-eymK-7@gated-at.bofh.it> <O4csp-eymK-7@gated-at.bofh.it> X-Original-To: 1155589@bugs.debian.org X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Fri Nov 27 22:59:08 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.451 Reply-To: Vagrant Cascadian <vagrant@reproducible-builds.org>, 1155589@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: debian-pan-maintainers@alioth-lists.debian.net X-Debian-Pr-Message: followup 1155589 X-Debian-Pr-Package: mccode X-Debian-Pr-Keywords: patch X-Debian-Pr-Source: mccode MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2005483 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 99 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Fri, 27 Nov 2026 14:56:42 -0800 X-Original-Message-ID: <87ecc5hoid.fsf@wireframe> X-Original-References: <87h5h2gc5k.fsf@wireframe> <87h5h2gc5k.fsf@wireframe>