Package: flightgear-data-base Version: 1:2024.1.5+dfsg-1 Severity: important Tags: patch
Dear Maintainer, on a computer that had flightgear-data-base 1:2020.3.19+dfsg-1 or older, the upgrade to 1:2024.1.3 or later leaves /usr/share/games/flightgear/Timezone as the symbolic link to ../../zoneinfo that the old package shipped. The new package ships Timezone as a folder (commit 4d18b9ef, "Include Timezone, needed for FlightGear", which also dropped the line from debian/flightgear-data-base.links), and dpkg does not turn a link into a folder when a package is upgraded (dpkg-maintscript-helper(1), "Symlink and directory switches": "When upgrading a package, dpkg will not automatically switch a symlink to a directory or vice-versa"). So, on such a computer: 1. The package's Timezone files are unpacked through the link, over the files of tzdata. After the upgrade, `dpkg --verify tzdata` lists 399 files as changed (for example /usr/share/zoneinfo/Africa/Abidjan, flag ??5??????). 2. Removing flightgear-data-base removes the same paths through the link, so tzdata's files are deleted. In my run `dpkg --verify tzdata` listed 496 entries as missing, /usr/share/zoneinfo/America/Sao_Paulo was gone, /etc/localtime pointed to nothing and the clock fell back to UTC. dpkg printed "warning: while removing flightgear-data-base, directory '/usr/share/games/flightgear/Timezone/America' not empty so not removed". Reproduced in a debian:testing container with the packages from snapshot.debian.org: apt-get install flightgear-data-all=1:2020.3.19+dfsg-1 (Timezone is a link, tzdata verifies clean) apt-get install flightgear-data-all=1:2024.1.5+dfsg-1 (the link is still there; dpkg --verify tzdata: 399 changed) apt-get remove flightgear-data-all flightgear-data-base flightgear-data-ai flightgear-data-models (dpkg --verify tzdata: 496 missing) The patch below adds debian/flightgear-data-base.maintscript with dpkg-maintscript-helper symlink_to_dir, the last version without it being 1:2024.1.5+dfsg-1, so computers that already went through 1:2024.1.3 to .5 with the link in place are put right by their next upgrade too. I built the four binary packages with it (the preinst, postinst and postrm of flightgear-data-base carry the helper's snippets) and ran the same container twice: from 1:2020.3.19+dfsg-1 to 1:2024.1.5+dfsg-2: Timezone is a folder of 550 files, tzdata verifies clean, no Timezone.dpkg-backup is left, and removing the four packages leaves tzdata clean and /usr/share/zoneinfo/America/Sao_Paulo in place; from a computer already on the unpatched 1:2024.1.5+dfsg-1 with the old link: the next upgrade replaces the link by the folder (its 399 overwritten tzdata files need `apt-get install --reinstall tzdata`, which the changelog cannot do). Related bugs: #869271 (2017, "Soft-link to tzdata should be absolute": where the link comes from) and #1146394 (undocumented font licenses); neither covers this, and the package's issues and merge requests on Salsa have nothing on it. I found this with AI assistance and checked it myself. Thanks for the package. diff: --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,16 @@ +flightgear-data (1:2024.1.5+dfsg-2) unstable; urgency=medium + + * Switch /usr/share/games/flightgear/Timezone from the link to ../../zoneinfo + that flightgear-data-base shipped up to 1:2020.3.19+dfsg-1 to the folder + it ships now, with dpkg-maintscript-helper symlink_to_dir + (debian/flightgear-data-base.maintscript). dpkg does not turn a link into + a folder when a package is upgraded, so a computer that had the old + package kept the link: the Timezone files were unpacked over tzdata files + through it, and removing flightgear-data-base deleted the time zone files + of the system. + + -- Daniel Ramos (Capitain Jack) <[email protected]> Tue, 17 Nov 2026 12:00:00 +0000 + flightgear-data (1:2024.1.5+dfsg-1) unstable; urgency=medium * Team upload. --- a/debian/flightgear-data-base.maintscript +++ b/debian/flightgear-data-base.maintscript @@ -0,0 +1 @@ +symlink_to_dir /usr/share/games/flightgear/Timezone ../../zoneinfo 1:2024.1.5+dfsg-1 -- System Information: Debian Release: forky/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 7.3.4-stereo3d18 (SMP w/12 CPU threads; PREEMPT) Kernel taint flags: TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: unable to detect Versions of packages flightgear-data-base depends on: ii fonts-liberation 1:2.1.5-3 ii tzdata 2026f-1 flightgear-data-base recommends no packages. flightgear-data-base suggests no packages. -- no debconf information

