Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 292652 - net-misc/openntpd-3.9_p1-r2: do not copy /etc/localtime but symlink
Summary: net-misc/openntpd-3.9_p1-r2: do not copy /etc/localtime but symlink
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Thilo Bangert (RETIRED) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-10 09:19 UTC by Martin Mokrejš
Modified: 2009-11-18 17:47 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Mokrejš 2009-11-10 09:19:35 UTC
I just upgraded to this version I am offered with:

Showing differences between /etc/init.d/ntpd and /etc/init.d/._cfg0000_ntpd
--- /etc/init.d/ntpd    2009-10-01 20:59:20.000000000 +0200
+++ /etc/init.d/._cfg0000_ntpd  2009-11-10 02:24:06.000000000 +0100
@@ -1,7 +1,7 @@
 #!/sbin/runscript
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/files/openntpd.rc,v 1.7 2008/10/10 09:40:10 bangert Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/files/openntpd.rc-3.9_p1-r2,v 1.2 2009/10/14 13:39:15 bangert Exp $
 
 depend() {
        need net
@@ -29,6 +29,10 @@
 start() {
        checkconfig || return $?
 
+       #prepare chroot
+       mkdir -p "${NTPD_HOME}/etc"
+       cp /etc/localtime "${NTPD_HOME}/etc"
+
        ebegin "Starting ntpd"
        start-stop-daemon --start --exec /usr/sbin/ntpd --name ntpd -- ${NTPD_OPTS}
        eend $? "Failed to start ntpd"


I have a nuumber to nodes with gentoo and sometimes I screwed my /etc/localtime, especialy on some systems I already migrated in early times to baselayout-2 ...
In any case, please create a softlink instead so that if one changes (=fixes) /etc/localtime that the change is going to be reflected by openntpd. Who is going to discover that it has its own, old copy? Or will you fix gentoo-handbook to raise this issue as well? ;-)
Comment 1 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2009-11-14 18:45:32 UTC
you really cant use a symlink, since openntpd chroots into the dir. it would thus not be able to resolve the symlink as it does not have access to the original file.

i admit that the current solution is not really nice - however, it is much nicer than before (where the timestamps printed by the chroot'ed process would definitively be wrong).

if you can come up with a nicer solution to the problem, i am more than willing to listen to it.
thanks.

kind regards
Thilo
Comment 2 Martin Mokrejš 2009-11-18 17:47:43 UTC
I wonder whether users could be instructed to handle the symlinks via eselect(1) which do them the favor and adjust the file in chroot-ed directories as well. It is boring to do the symlinks manually. ;-)