On 2020-05-04 21:41, Paul Eggert wrote:
On 5/4/20 8:16 PM, Philip Paeps wrote:
It looks like we install the files rather than links. Or I've botched something on the test machine I looked at (which is not unlikely).
If you're installing files then that should get fixed. In tzdb on my Fedora 31 platform (ext4 filesystem with 4 KiB blocks), 'make install' creates a zoneinfo directory that 'du' reports consumes 1800 KiB, as opposed to the 1776 KiB consumed for the same directory with 'make BACKWARD="" install'. The 24 KiB difference comes mostly from the five extra directories implied by 'backward' (Brazil, Canada, Chile, Mexico, US) each of which consume 4 KiB; the rest comes from the larger tzdata.zi file (108 vs 112 KiB allocated, due to the extra -L lines).
A number of distros seem to end up installing file copies or symbolic rather than hard links under /usr/share/zoneinfo. I created a simple shell script to check GMT link count and if not > 1, `find` all symlinks, relink symbolic as hard links, `find` all files, `sort` by size, `cmp` those of the same size, and hard `link` them if identical, with before and after summary unique and total inode, link, and file counts and sizes. For systems installing right with copies, it drops the size from three copies
4.5MB to two copies ~3.4MB; for systems installing right with symlinks, it only reduces the size of each copy by the size of the symlink paths, about 25KB/copy, but avoids the indirection access.
[I became wary of tz performance, when one process on an AIX system took about 1s per naive `getenv` TZ save, `putenv` TZ set, `tzset` to load data and switch tz in a thread, and it was doing a couple of switches per transaction, depending on front end user locales. Going via the DB interface instead provided caching to speed up lookups, and minor local caching avoided lookups as much as possible.]
Or they can trivially patch the build system not to install backward zones.
Well, there used to be a build option for that in the base system, but somebody just took it out...
Easy enough to put back if someone yells about it.
Might make sense to put it back in (if only for compatibility with older FreeBSD systems where TZ='W-SU' gave you UTC :-).
It would be nice to get some tzdata- alternative packages with -minimal, -tiny, -big, -full, etc. variants depending on build options, perhaps more meaningful names; similar to dict, scowl, words list packages on some distros. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. [Data in IEC units and prefixes, physical quantities in SI.]