The following should be a valid /etc/timezone file: :America/New_York But when upgrading, the following happens: * You have an invalid TIMEZONE setting in /etc/timezone * Your /etc/localtime has been reset to Factory; enjoy! ... and the already working timezone is blown away. Having a colon in the timezone is valid and the correct specification for using a file, according to the tzset(3) man page. Not having the colon is the exception, which means it will first try to parse it as a tz specification, and then default back to using it as a file. It seems that this would be a quick fix, adding 's/^://' to the sed line in get_TIMEZONE() in the ebuild file.
That description from tzset(3) pertains only to the TZ environment variable, not /etc/timezone. The manual page doesn't mention the latter, and glibc does not use it for anything. /etc/timezone is only used by the timezone-data ebuild; it is not used anywhere else. I do not believe there is any documentation that mentions putting a colon in /etc/timezone.
I believe that the very reason /etc/timezone is present in Gentoo is because it was originally copied from a Unix system, where it IS documented. It would be good to keep it compatible, and allow the tz spec format to be used, like admins of those systems are used to. It is *also* used by the gentoo package net-dns/ypserv, which expects it to be in the format: tzspec ypdomainname e.g. :America/New_York mynis.domain Fixing it so it works either way, without clobbering it for those who have it set in a valid Unix compatible format (or who use yp/nis) would not harm anything, only help. The following change to the ebuild file will extract the filename from either TZ format, Gentoo Special or NIS format, and cause it to not harm those machines where it is in TZ or NIS format, like it does today. 77c77 < tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}") --- > tz=$(sed -e 's/^://;s/[[:space:]#].*//;/^$/d' "${src}")
(In reply to art-gentoo from comment #2) > I believe that the very reason /etc/timezone is present in Gentoo is because > it was originally copied from a Unix system, where it IS documented. [citation needed] > It is *also* used by the gentoo package net-dns/ypserv, which expects it to > be in the format: > tzspec ypdomainname > e.g. > :America/New_York mynis.domain That would indicate that we have two packages using compatible config files. That has been the case for many years. net-nds/ypserv is currently unmaintained, and I suspect very few people actually use it. Updating summary and status.
(In reply to Mike Gilbert from comment #3) > That would indicate that we have two packages using compatible config files. > That has been the case for many years. That should say *incompatible* config files.
(In reply to art-gentoo from comment #2) is is in Gentoo because it's how Debian configures things. NIS services were never thought about because no one uses these things anymore. the very thin documentation i can find on the expected format by ypserv is that it is not just a ":<zone>" but "<MET> <nis.domain>". do you have any links to docs for the format for this file ? if you're setting it to a TZ-compatible format, then we're not going to support that i don't think ... also, i don't see either ypserv or ypbind referring to this file in their source (even though ypserv does say "copy this file to /etc/timezone").
art-gentoo: ping ...