| Summary: | sys-libs/timezone-data does not accept /etc/timezone in the format expected by net-nds/ypserv | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | art-gentoo |
| Component: | [OLD] Core system | Assignee: | Gentoo's Team for Core System packages <base-system> |
| Status: | RESOLVED NEEDINFO | ||
| Severity: | normal | CC: | floppym |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
|
Description
art-gentoo
2015-08-14 17:45:23 UTC
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 ... |