Hello community,

here is the log from the commit of package aaa_base for openSUSE:Factory 
checked in at 2012-05-26 09:22:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/aaa_base (Old)
 and      /work/SRC/openSUSE:Factory/.aaa_base.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "aaa_base", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/aaa_base/aaa_base.changes        2012-04-23 
16:09:11.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.aaa_base.new/aaa_base.changes   2012-05-26 
09:22:43.000000000 +0200
@@ -1,0 +2,10 @@
+Fri May 25 13:27:49 UTC 2012 - [email protected]
+
+- Drop HWCOCK option flag in favour of the adjtime file
+
+-------------------------------------------------------------------
+Wed May 23 07:58:48 UTC 2012 - [email protected]
+
+- Bump version to 12.2, to prepare for next version of openSUSE.
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ aaa_base.spec ++++++
--- /var/tmp/diff_new_pack.MvcPxf/_old  2012-05-26 09:22:45.000000000 +0200
+++ /var/tmp/diff_new_pack.MvcPxf/_new  2012-05-26 09:22:45.000000000 +0200
@@ -19,7 +19,7 @@
 %bcond_with     aaa_base_malloc_debug
 
 Name:           aaa_base
-Version:        12.1
+Version:        12.2
 Release:        0
 Url:            http://gitorious.org/opensuse/aaa_base
 Provides:       aaa_skel = %{version}-%{release}

++++++ aaa_base.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aaa_base/aaa_base.post new/aaa_base/aaa_base.post
--- old/aaa_base/aaa_base.post  2012-04-19 17:15:03.000000000 +0200
+++ new/aaa_base/aaa_base.post  2012-05-25 15:25:26.000000000 +0200
@@ -28,6 +28,31 @@
 # GMT might already be in sysconfig/clock
 %{rename_sysconfig_variable -f /etc/sysconfig/clock GMT HWCLOCK}
 
+# just do a one-time migration of the time setting from /etc/sysconfig/clock
+# to /etc/adjtime as systemd now use the later as reference
+#
+if test -s /etc/sysconfig/clock
+then
+    . /etc/sysconfig/clock
+    if test ! -e /etc/adjtime
+    then
+       echo -e "0.0 0 0.0\n0\nUTC" > /etc/adjtime
+    fi
+    if test -n "$HWCLOCK"
+    then
+       sed -ri 
'\@^##[[:blank:]]+Type:[[:blank:]]+string\(-u,--utc,--localtime\)@,\@^HWCLOCK=@c\
+#\
+# Be aware that the time reference of the CMOS/HW clock has been\
+# forwarded to /etc/adjtime, the file used by hwclock(8) and\
+# systemd(1) as reference for the CMOS/HW clock.\
+' /etc/sysconfig/clock
+    fi
+    case "$HWCLOCK" in
+    *-l*) sed -ri 's@^UTC$@LOCAL@' /etc/adjtime ;;
+    *)   sed -ri 's@^LOCAL$@UTC@' /etc/adjtime ;;
+    esac
+fi
+
 #
 # Initialize runlevel links
 #
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aaa_base/files/etc/init.d/boot.clock 
new/aaa_base/files/etc/init.d/boot.clock
--- old/aaa_base/files/etc/init.d/boot.clock    2012-04-19 17:15:03.000000000 
+0200
+++ new/aaa_base/files/etc/init.d/boot.clock    2012-05-25 15:25:26.000000000 
+0200
@@ -1,13 +1,13 @@
 #!/bin/bash
 #
 # Copyright (c) 2001-2002 SuSE Linux AG, Nuernberg, Germany.
-# Copyright (c) 2008-2011 SuSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2008-2012 SuSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # /etc/init.d/boot.clock
 #
 ### BEGIN INIT INFO
 # Provides:          boot.clock
-# Required-Start:    boot.rootfsck
+# Required-Start:    boot.rootfsck boot.udev
 # Required-Stop:     boot.rootfsck
 # Should-Start:      $null
 # Should-Stop:       apparmor
@@ -23,24 +23,35 @@
 . /etc/rc.status
 . /etc/sysconfig/clock
 
-: ${HWCLOCK:=-u}
 : ${SYSTOHC:=yes}
+: ${USE_HWCLOCK:=yes}
+: ${BADYEAR:=no}
+
+adjtimex=$(PATH=/sbin:/bin:/usr/sbin:/usr/bin type -p adjtimex)
+    date=$(PATH=/sbin:/bin:/usr/sbin:/usr/bin type -p date)
+    grep=$(PATH=/sbin:/bin:/usr/sbin:/usr/bin type -p grep)
+   uname=$(PATH=/sbin:/bin:/usr/sbin:/usr/bin type -p uname)
+ hwclock=$(PATH=/sbin:/bin:/usr/sbin:/usr/bin type -p hwclock)
 
 #
-# Only compensate for clock drift if RTC is UTC
+# If the system adminstrator has deleted the /etc/adjtime create
+# a template with its defaults
 #
-USE_ADJFILE=no
-case "$HWCLOCK" in
-*-u*) USE_ADJFILE=yes ;;
-esac
-test "$SYSTOHC" != yes && USE_ADJFILE=no
+if test -w /etc -a ! -s /etc/adjtime ; then
+    echo -e '0.0 0 0.0\n0\nUTC' > /etc/adjtime
+fi
+
+#
+# Determine the HW/CMOS clock reference
+#
+HWREFERENCE=--utc
+$grep -q LOCAL /etc/adjtime && HWREFERENCE=""
 
 #
-# Don't use hwclock if not valid
+# Do not use hwclock if not valid on this platform
 #
-USE_HWCLOCK=yes
-case "$(uname -i)" in
-s390*) USE_HWCLOCK=no ;;
+case "$($uname -i)" in
+s390*) USE_HWCLOCK=no 
 esac
 if test -r /proc/xen/capabilities ; then
     read -t1 caps < /proc/xen/capabilities
@@ -48,15 +59,39 @@
 fi
 
 #
+# Handle broken hardware clock
+#
+case "$BADYEAR" in
+yes) BADYEAR="--badyear" ;;
+*)   BADYEAR=""
+esac
+case "$USE_ADJUST" in
+yes) USE_ADJUST=--adjust ;;
+*)   USE_ADJUST=""
+esac
+
+#
+# If rtc device is not overwritten, determine it
+#
+if test -z "$HCTOSYS_DEVICE" ; then
+    if test -h /dev/rtc ; then
+       readlink=$(PATH=/sbin:/bin:/usr/sbin:/usr/bin type -p readlink)
+       HCTOSYS_DEVICE=$(readlink /dev/rtc)
+       HCTOSYS_DEVICE=${HCTOSYS_DEVICE##*/}
+    fi
+    : ${HCTOSYS_DEVICE:=rtc0}
+fi
+
+#
 # Get current status of kernel time variables, if kernel
 # is within "11 minute mode" do not adjust HW clock nor
 # write system time back to HW clock, bug bnc#492921.
 #
 ELEVENMIN_MODE=no
-if test -e /sys/class/rtc/rtc0/since_epoch ; then
+if test -e /sys/class/rtc/${HCTOSYS_DEVICE}/since_epoch -a -x "$adjtimex" -a 
-x "$date" ; then
     typeset -i STA_DIFF=0
-    read -t 1 STA_DIFF < /sys/class/rtc/rtc0/since_epoch
-    let STA_DIFF-=$(TZ=UTC /bin/date +'%s')
+    read -t 1 STA_DIFF < /sys/class/rtc/${HCTOSYS_DEVICE}/since_epoch
+    let STA_DIFF-=$(TZ=UTC $date +'%s')
     if ((STA_DIFF > -900 && STA_DIFF < 900)) ; then
        typeset -i STA_CLOCK=64
        while IFS=: read tag value ; do
@@ -67,7 +102,7 @@
            *return\ value*)
                let 'STA_CLOCK|=64'
            esac
-       done < <(TZ=UTC /sbin/adjtimex $HWCLOCK --print)
+       done < <(TZ=UTC $adjtimex $HWREFERENCE --print)
     fi
     unset tag value
     ((STA_CLOCK & 64)) || ELEVENMIN_MODE=yes
@@ -79,7 +114,7 @@
 #
 rtc_rule()
 {
-    local temprules=/dev/.udev/rules.d
+    local temprules=/run/udev/rules.d
     local uevseqnum=/sys/kernel/uevent_seqnum
     local rule=$temprules/95-rtc-cmos.rules
     local -i start=0 end=0
@@ -88,23 +123,26 @@
        ${1+"$@"}
        return $?
     fi
+    local modprobe=$(PATH=/sbin:/bin:/usr/sbin:/usr/bin type -p modprobe)
 
-    if test -z "$(/sbin/modprobe -l rtc_cmos)" ; then
+    if test -z "$($modprobe -l rtc_cmos)" ; then
        ${1+"$@"}
        return $?
     fi
+    local mkdir=$(PATH=/sbin:/bin:/usr/sbin:/usr/bin type -p mkdir)
 
-    /bin/mkdir -m 0755 -p $temprules
-    echo ACTION==\"add\", KERNEL==\"rtc0\", RUN=\"${1+"$@"} 
--rtc=\$env{DEVNAME}\" > $rule
+    $mkdir -m 0755 -p $temprules
+    echo ACTION==\"add\", KERNEL==\"${HCTOSYS_DEVICE}\", RUN=\"${1+"$@"}\" > 
$rule
 
     test -e $uevseqnum && read -t 1 start < $uevseqnum
 
-    if /sbin/modprobe -q rtc_cmos ; then
+    if $modprobe -q rtc_cmos ; then
+       local udevadm=$(PATH=/sbin:/bin:/usr/sbin:/usr/bin type -p udevadm)
        test -e $uevseqnum && read -t 1 end < $uevseqnum
        if test $start -lt $end ; then
-           /sbin/udevadm settle --quiet --seq-start=$start --seq-end=$end
+           $udevadm settle --quiet --seq-start=$start --seq-end=$end
        else
-           /sbin/udevadm settle --quiet
+           $udevadm settle --quiet
        fi
     else
        rm -f $rule
@@ -112,14 +150,6 @@
     fi
 }
 
-adjfile_thirdline()
-{
-    case "$HWCLOCK" in
-    *-u*) grep -q LOCAL /etc/adjtime && sed -ir 's/LOCAL/UTC/' /etc/adjtime ;;
-    *-l*) grep -q UTC   /etc/adjtime && sed -ir 's/UTC/LOCAL/' /etc/adjtime ;;
-    esac 2> /dev/null
-}
-
 rc_reset
 
 case "$1" in
@@ -138,9 +168,9 @@
 
            unset TZ
 
-           case "$1$HWCLOCK" in
-           start*-l*)
-               date --set "$(date --utc +'%Y-%m-%d %H:%M:%S.%N')"
+           case "$1$HWREFERENCE" in
+           start)
+               $date --set "$($date --utc +'%Y-%m-%d %H:%M:%S.%N')"
                rc_status
                ;;
            esac
@@ -158,65 +188,43 @@
        #       
        echo -n "Set System Time to the current Hardware Clock"
        #
-       # Read out to hardware clock and for UTC calculate adjtime
-       # write back the system time later at reboot/shutdown time.
+       # If not already done in (mk)initrd by warpclock:
+       #   Reset the System Time based on the current timezone.  Please note 
that
+       #   the old --hctosys is only valid for older kernels below 2.6 as for 
recent
+       #   kernels the System Time contains the Hardware Clock time.
        #
-       if test "$USE_ADJFILE" = yes ; then
-           #
-           # For UTC calculate adjtime
-           #
-           if test ! -s /etc/adjtime ; then
-               {
-                       echo "0.0 0 0.0"
-                       echo "0"
-                       echo "UTC"
-               } > /etc/adjtime
-           else
-               test -w /etc/adjtime && adjfile_thirdline
-           fi
-           rtc_rule /sbin/hwclock $HWCLOCK --adjust
-       else
-           # Change any /etc/adjtime left over
-           test -w /etc/adjtime && adjfile_thirdline
-           SYSTZ="--systz"
-            test -e /dev/shm/warpclock && SYSTZ=""
-           rtc_rule /sbin/hwclock $SYSTZ $HWCLOCK --noadjfile
-       fi
+       SYSTZ="--systz"
+       test -e /dev/shm/warpclock && SYSTZ=""
+       rtc_rule $hwclock --rtc=/dev/$HCTOSYS_DEVICE $SYSTZ $USE_ADJUST $BADYEAR
        rc_status -v
        ;;
     stop)
-       if test "$ELEVENMIN_MODE" = yes ; then
+       if test "$ELEVENMIN_MODE" = yes -a "$FORCE_SYSTOHC" = no ; then
            echo "The System Time is in sync with Hardware Clock 
${stat}${done}good${norm}"
            rc_status
            rc_exit
        fi
-       if test "$USE_HWCLOCK" = yes -a "$SYSTOHC" = yes ; then
+       if test "$USE_HWCLOCK" = yes -a \( "$SYSTOHC" = yes -o "$FORCE_SYSTOHC" 
= yes \) ; then
            echo -n "Set Hardware Clock to the current System Time"
            #
            # Write system time back to hardware clock
            #
-           if test "$USE_ADJFILE" = yes ; then
-               /sbin/hwclock --systohc $HWCLOCK
-           else
-               # Change any /etc/adjtime left over
-               test -w /etc/adjtime && adjfile_thirdline
-               /sbin/hwclock --systohc $HWCLOCK --noadjfile
-           fi
+           $hwclock --rtc=/dev/$HCTOSYS_DEVICE --systohc $USE_ADJUST $BADYEAR
            rc_status -v
        fi
        ;;
     timezone)
        echo -n "Set Hardware Clock to the current System Time"
        if test "$USE_HWCLOCK" = yes ; then
-           /sbin/hwclock --systohc $HWCLOCK --noadjfile
-           /sbin/hwclock --hctosys $HWCLOCK --noadjfile
+           $hwclock --rtc=/dev/$HCTOSYS_DEVICE --systohc $USE_ADJUST $BADYEAR
+           $hwclock --rtc=/dev/$HCTOSYS_DEVICE --hctosys $USE_ADJUST $BADYEAR
        else
            rc_status -u
        fi
        ;;
-    status)
+    status|show)
        echo -n "Current Hardware Clock: "
-       /sbin/hwclock --show
+       $hwclock --rtc=/dev/$HCTOSYS_DEVICE --show $USE_ADJUST $BADYEAR
        rc_status -v1
        ;;
     *)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/aaa_base/files/var/adm/fillup-templates/sysconfig.clock 
new/aaa_base/files/var/adm/fillup-templates/sysconfig.clock
--- old/aaa_base/files/var/adm/fillup-templates/sysconfig.clock 2012-04-19 
17:15:03.000000000 +0200
+++ new/aaa_base/files/var/adm/fillup-templates/sysconfig.clock 2012-05-25 
15:25:26.000000000 +0200
@@ -1,16 +1,12 @@
 ## Path:               System/Environment/Clock
 ## Description:                Information about your timezone and time
-## Type:               string(-u,--utc,--localtime)
-## ServiceRestart:     boot.clock
-## Command:            /sbin/refresh_initrd
-#
-# Set to "-u" if your system clock is set to UTC, and to "--localtime"
-# if your clock runs that way.
 #
-HWCLOCK=""
+# Be aware that the time reference of the CMOS/HW clock has been
+# forwarded to /etc/adjtime, the file used by hwclock(8),
+# systemd(1), and the kernel as reference for the CMOS/HW clock.
 
 ## Type:               list(yes,no,)
-## Description: Write back system time to the hardware clock
+## Description:                Write back system time to the hardware clock
 #
 # Is set to "yes" write back the system time to the hardware
 # clock at reboot or shutdown. Usefull if hardware clock is
@@ -27,6 +23,51 @@
 #
 SYSTOHC=""
 
+## Type:               list(no,yes)
+## Description:                Write back system time if if already done by 
kernel
+#
+# Is set to "yes" write back the system time to the hardware
+# clock at reboot or shutdown eveb if this is done by the kernel
+# in the so called ``Eleven Minute Mode''.
+#
+FORCE_SYSTOHC="no"
+
+## Type:               string
+## Type:               list(yes,no)
+## Description:                HW clock is not able to use years outside 
1994-1999.
+#
+# Indicates that the Hardware Clock is incapable of storing years
+# outside the range 1994-1999.
+#
+BADYEAR="no"
+
+## Type:               string
+## Description:                Overrides the default device file name
+#
+# Overrides the default /dev file name, which is /dev/rtc on many
+# platforms but may be /dev/rtc0, /dev/rtc1, and so on.
+#
+HCTOSYS_DEVICE=""
+
+## Type:               list(yes,no,)
+## Description:                Do or do not not run hwclock(8)
+#
+# Set this to yes if it is possible to access the hardware clock,
+# or no if it is not.  On some platforms (s390 or xen) this may
+# overwritten by the service its self.
+#
+USE_HWCLOCK="yes"
+
+## Type:               list(yes,no,)
+## Description:                Correct systematic drift of the HW clock
+#
+# Add or subtract time from the Hardware Clock to account for
+# systematic drift since the last time the clock was set or
+# adjusted. By default off as this can cause trouble.  For
+# systems using localtime for HW clock this will ignored.
+#
+USE_ADJUST="no"
+
 ## Type:               string(Europe/Berlin,Europe/London,Europe/Paris)
 ## ServiceRestart:     boot.clock
 ## Command:            /sbin/refresh_initrd

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to