rpms/dhcp/FC-4 dhcp-3.0.2-bz167273.patch, NONE, 1.1 dhcp.spec, 1.62, 1.63

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon Sep 12 20:45:38 UTC 2005


Author: jvdias

Update of /cvs/dist/rpms/dhcp/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv1041

Modified Files:
	dhcp.spec 
Added Files:
	dhcp-3.0.2-bz167273.patch 
Log Message:
fix bug 167273

dhcp-3.0.2-bz167273.patch:
 linux |   41 +++++++++++++++++++++++++----------------
 1 files changed, 25 insertions(+), 16 deletions(-)

--- NEW FILE dhcp-3.0.2-bz167273.patch ---
--- dhcp-3.0.2/client/scripts/linux.bz167273	2005-09-12 16:38:22.000000000 -0400
+++ dhcp-3.0.2/client/scripts/linux	2005-09-12 16:37:49.000000000 -0400
@@ -313,17 +313,24 @@
 	fi
     fi
     if [ -z "${dhc_dbus}" ] || (( ( dhc_dbus & 16 ) != 16 )); then
-	if [ -n "$new_time_offset" ]; then
-	#   DHCP option "time-offset" is requested by default and should be handled.
-	#   The geographical zone abbreviation cannot be determined from the GMT offset,
-	#   but the $ZONEINFO/Etc/GMT$offset file can be used:
-	    ((z=new_time_offset/3600));
-	    tzfile=/usr/share/zoneinfo/Etc/GMT`printf '%+d' $z`;
-	    if [ -e $tzfile ]; then
-		/bin/mv -f /etc/localtime /etc/localtime.predhclient;
-	        /bin/cp -fp $tzfile /etc/localtime;
-		/bin/touch /etc/localtime;
-            fi;
+	if [ -n "$DHCP_TIME_OFFSET_SETS_TIMEZONE" ] && [[ "$DHCP_TIME_OFFSET_SETS_TIMEZONE" = [yY1]* ]]; then
+	    if [ -n "$new_time_offset" ]; then
+	    #   DHCP option "time-offset" is requested by default and should be handled.
+	    #   The geographical zone abbreviation cannot be determined from the GMT offset,
+	    #   but the $ZONEINFO/Etc/GMT$offset file can be used - note: this disables DST.
+		((z=new_time_offset/3600));
+		((hoursWest=`printf '%+d' $z`))
+		if (( $hoursWest < 0 )); then
+		   # tzdata treats negative 'hours west' as positive 'gmtoff' !
+		   ((hoursWest*=-1));
+		fi
+		tzfile=/usr/share/zoneinfo/Etc/GMT`printf '%+d' $hoursWest`;
+		if [ -e $tzfile ]; then
+		    /bin/mv -f /etc/localtime /etc/localtime.predhclient;
+		    /bin/cp -fp $tzfile /etc/localtime;
+		    /bin/touch /etc/localtime;
+		fi;
+	    fi;
 	fi;
 	if [ "${PEERNTP}" = no ]; then
 	    :
@@ -421,11 +428,13 @@
      change_resolv_conf /etc/resolv.conf.predhclient
      rm -f /etc/resolv.conf.predhclient
   fi
-  if [ -e /etc/localtime.predhclient ]; then
-     /bin/rm -f /etc/localtime
-     /bin/mv -f /etc/localtime.predhclient /etc/localtime;
-     /bin/touch /etc/localtime;
-  fi; 
+  if [ -n "$DHCP_TIME_OFFSET_SETS_TIMEZONE" ] && [[ "$DHCP_TIME_OFFSET_SETS_TIMEZONE" = [yY1]* ]]; then
+      if [ -e /etc/localtime.predhclient ]; then
+	  /bin/rm -f /etc/localtime
+	  /bin/mv -f /etc/localtime.predhclient /etc/localtime;
+	  /bin/touch /etc/localtime;
+      fi;
+  fi;
   if [ -f /etc/ntp.conf.predhclient ]; then
      /bin/rm -f /etc/ntp.conf
      /bin/mv -f /etc/ntp.conf.predhclient /etc/ntp.conf


Index: dhcp.spec
===================================================================
RCS file: /cvs/dist/rpms/dhcp/FC-4/dhcp.spec,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- dhcp.spec	29 Aug 2005 23:01:45 -0000	1.62
+++ dhcp.spec	12 Sep 2005 20:45:36 -0000	1.63
@@ -2,7 +2,7 @@
 Summary: A DHCP (Dynamic Host Configuration Protocol) server and relay agent.
 Name:    dhcp
 Version: 3.0.2
-Release: 20.FC4
+Release: 22.FC4
 Epoch:   10
 License: distributable
 Group: System Environment/Daemons
@@ -59,6 +59,7 @@
 Patch153: dhcp-3.0.2-version.patch
 Patch154: dhcp-3.0.2-no-__u16.patch
 Patch155: dhcp-3.0.2-dhclient-script-up-down-hooks.patch
+Patch156: dhcp-3.0.2-bz167273.patch
 URL: http://isc.org/products/DHCP/
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 Prereq: /sbin/chkconfig
@@ -160,6 +161,7 @@
 %patch153 -p1 -b .version
 %patch154 -p1 -b .no-__u16
 %patch155 -p1 -b .dhclient-script-up-down-hooks
+%patch156 -p1 -b .bz167273
 cp %SOURCE1 .
 cat <<EOF >site.conf
 VARDB=%{_localstatedir}/lib/dhcp
@@ -287,6 +289,11 @@
 %{_mandir}/man3/*
 
 %changelog
+* Mon Sep 12 2005 Jason Vas Dias <jvdias at redhat.com> - 11:3.0.3-6
+- fix bug 167273: time-offset should not set timezone by default
+                  tzdata's Etc/* files are named with reverse sign
+                  for hours west - ie. 'GMT+5' is GMT offset -18000seconds.
+
 * Mon Aug 29 2005 Jason Vas Dias <jvdias at redhat.com> - 10:3.0.2-18
 - fix bug 166926: make dhclient-script handle interface-mtu option
   make dhclient-script support /etc/dhclient{,-$IF}-{up,down}-hooks scripts




More information about the fedora-cvs-commits mailing list