[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#29654: Manual database index.db embeds timestamps
From: |
Ruud van Asseldonk |
Subject: |
bug#29654: Manual database index.db embeds timestamps |
Date: |
Sun, 10 Dec 2017 23:47:13 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 |
The manual database file index.db embeds mtimes of the files it refers
to, making it not reproducible. This is an issue for building
reproducible profiles (as produced by `guix pack` for example).
The number that are not reproducible can be seen with `accessdb
index.db`, which will output something like
$version$ -> "2.5.0"
acme-client -> "- 1 1 1512941854 498178709 B - - gz secure ACME client"
And when built again on a clean installation:
$version$ -> "2.5.0"
acme-client -> "- 1 1 1512942998 296814690 B - - gz secure ACME client"
I asked the man-db maintainer about this, who replied:
> Those are timestamps, seconds and nanoseconds respectively. You should
> get reproducible output if you make sure the mtimes of manual pages are
> reproducible. (man-db needs to keep track of mtimes so that it knows
> when a database is out of date.) If the manual pages come straight from
> the source package, this should be straightforward; if they're
> generated, you'll need some strategy to ensure that they're generated
> with a reproducible mtime.
Now the strange thing is, when I check the profile directory, both the
man file symlinks, and the files they refer to, have the mtime set to
epoch. I suspected that the mtime would be reset after the manual
database had already been built, but inserting calls to utime after
`(symlink manpage dest-file)` in the `manual-database` procedure, did
not resolve the issue.
The mtime that ends up in index.db does correspond to a recent time, and
for larger databases the timestamps can differ among entries, but so far
I have only seen them differ in the nanoseconds. The seconds timestamp
looks like the timestamp at which the database was generated. So either
the mtime of the input files is not epoch when man-db runs, or man-db is
somehow setting the mtime of every entry to the current time as it adds
them.
I looked at the man-db source and I did not find anything that looked
like it was storing current times as mtimes in the database, although I
did not look very carefully. I suspect that the mtimes of the files to
scan are actually wrong. It should be possible to confirm this by
introducing a delay when creating the man files, and when making the
symlinks, and seeing if the delay shows up in the database.
Help with diagnosing this further, or ideas about what could be going on
and how to resolve it, would be appreciated. I am willing to work on a
fix, but I am not very familiar with Guix yet.
Kind regards,
Ruud van Asseldonk
- bug#29654: Manual database index.db embeds timestamps,
Ruud van Asseldonk <=
- bug#29654: Manual database index.db embeds timestamps, Ludovic Courtès, 2017/12/15
- bug#29654: Manual database index.db embeds timestamps, Ludovic Courtès, 2017/12/15
- bug#29654: Manual database index.db embeds timestamps, Ricardo Wurmus, 2017/12/15
- bug#29654: Manual database index.db embeds timestamps, Ludovic Courtès, 2017/12/17
- bug#29654: Manual database index.db embeds timestamps, Ruud van Asseldonk, 2017/12/17
- bug#29654: Manual database index.db embeds timestamps, Ludovic Courtès, 2017/12/17