[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Pre approval request for chrony (for Wheezy)



Dear release team,

after some mails in the last week with David I worked out some important
patches to fix the both RC-bugs of package chrony and made a new package
of chrony as update of the Wheezy package.

Because chrony version in Unstable is made with new upstream version 1.26,
my chrony package based on the version of Wheezy (1.24-3.1).

Would you allow the changed chrony package for Wheezy? Debdiff is attached.

Fixed RC-bugs:  #689012  #691340


Changelog:

  chrony (1.24-3.1+deb7u1) wheezy; urgency=medium

  * Non-maintainer upload.

  * Fix: Remove obsolete check for supported kernel versions (rtc_linux.c)
      to run also for kernel versions 3.0 and higher. Since kernel 2.2 all
      kernels have RTC support. Backport of upstream patch for version
    1.26. Solves: #642209 for version 1.24. Closes: #691340

  * Fix: Enable full support for kernel versions 3.0 and higher
    (sys_linux.c) and ignore nonexistent patch level of kernel version
    (which come with some kernel versions). Backport of upstream patch for
    version 1.26. Solves: #628919 for version 1.24. Closes: #689012

  -- Joachim Wiedorn <ad_debian@joonet.de>  Fri, 16 Nov 2012 10:01:01 +0100


Attachments:
  * debdiff
  * patchset (debdiff split in tree patches)

---
Have a nice day.

Joachim (Germany)
diff -urN chrony-1.24-old/debian/changelog chrony-1.24/debian/changelog
--- chrony-1.24-old/debian/changelog	2011-11-18 22:14:14.000000000 +0100
+++ chrony-1.24/debian/changelog	2012-11-16 10:11:44.244707530 +0100
@@ -1,3 +1,19 @@
+chrony (1.24-3.1+deb7u1) wheezy; urgency=medium
+
+  * Non-maintainer upload.
+
+  * Fix: Remove obsolete check for supported kernel versions (rtc_linux.c)
+      to run also for kernel versions 3.0 and higher. Since kernel 2.2 all
+      kernels have RTC support. Backport of upstream patch for version 1.26.
+      Solves: #642209 for version 1.24. Closes: #691340
+
+  * Fix: Enable full support for kernel versions 3.0 and higher (sys_linux.c)
+      and ignore nonexistent patch level of kernel version (which come with
+      some kernel versions). Backport of upstream patch for version 1.26.
+      Solves: #628919 for version 1.24. Closes: #689012
+
+ -- Joachim Wiedorn <ad_debian@joonet.de>  Fri, 16 Nov 2012 10:01:01 +0100
+
 chrony (1.24-3.1) unstable; urgency=low
 
   * Non-maintainer upload.
diff -urN chrony-1.24-old/rtc_linux.c chrony-1.24/rtc_linux.c
--- chrony-1.24-old/rtc_linux.c	2010-02-04 13:07:19.000000000 +0100
+++ chrony-1.24/rtc_linux.c	2012-11-16 08:56:27.227441065 +0100
@@ -541,63 +541,8 @@
 int
 RTC_Linux_Initialise(void)
 {
-  int major, minor, patch;
   char *direc;
 
-  /* Check whether we can support the real time clock.
-
-     Linux 1.2.x - haven't checked yet
-
-     Linux 1.3.x - don't know, haven't got a system to look at
-
-     Linux 2.0.x - For x<=31, using any variant of the adjtimex() call
-     sets the kernel into a mode where the RTC was updated every 11
-     minutes.  The only way to escape this is to use settimeofday().
-     Since we need to have sole control over the RTC to be able to
-     measure its drift rate, and there is no 'notify' callback to warn
-     you that the kernel is going to do this, I can't see a way to
-     support this.
-
-     Linux 2.0.x - For x>=32 the adjtimex()/RTC behaviour was
-     modified, so that as long as the STA_UNSYNC flag is set the RTC
-     is left alone.  This is the mode we exploit here, so that the RTC
-     continues to go its own sweet way, unless we make updates to it
-     from this module.
-
-     Linux 2.1.x - don't know, haven't got a system to look at.
-
-     Linux 2.2.x, 2.3.x and 2.4.x are believed to be OK for all
-     patch levels
-
-     */
-
-  SYS_Linux_GetKernelVersion(&major, &minor, &patch);
-
-  /* Obviously this test can get more elaborate when we know about
-     more system types. */
-  if (major != 2) {
-    return 0;
-  } else {
-    switch (minor) {
-      case 0:
-        if (patch <= 31) {
-          return 0;
-        }
-        break;
-      case 1:
-        return 0;
-        break;
-      case 2:
-      case 3:
-      case 4:
-      case 5:
-      case 6:
-      case 7:
-      case 8:
-        break; /* OK for all patch levels */
-    } 
-  }
-
   /* Setup details depending on configuration options */
   setup_config();
 
diff -urN chrony-1.24-old/sys_linux.c chrony-1.24/sys_linux.c
--- chrony-1.24-old/sys_linux.c	2011-11-18 22:14:14.000000000 +0100
+++ chrony-1.24/sys_linux.c	2012-11-16 08:56:27.235460778 +0100
@@ -735,7 +735,12 @@
   if (uname(&uts) < 0) {
     LOG_FATAL(LOGF_SysLinux, "Cannot uname(2) to get kernel version, sorry.");
   }
-  if (sscanf(uts.release, "%d.%d.%d", &major, &minor, &patch) != 3) {
+
+  /* default patch level if not defined */
+  patch = 0;
+
+  /* first check about kernel version */
+  if (sscanf(uts.release, "%d.%d.%d", &major, &minor, &patch) < 2) {
     LOG_FATAL(LOGF_SysLinux, "Cannot read information from uname, sorry");
   }
 
@@ -746,30 +751,8 @@
   version_patchlevel = patch;
   
   switch (major) {
-    case 1:
-      /* Does Linux v1.x even support HZ!=100? */
-      switch (minor) {
-        case 2:
-          if (patch == 13) {
-            freq_scale = (hz==100) ? (128.0 / 100.0) : basic_freq_scale ; /* I _think_! */
-	    have_readonly_adjtime = 1;
-          } else {
-            LOG_FATAL(LOGF_SysLinux, "Kernel version not supported yet, sorry.");
-          }
-          break;
-        case 3:
-          /* I guess the change from the 1.2.x scaling to the 2.0.x
-             scaling must have happened during 1.3 development.  I
-             haven't a clue where though, until someone looks it
-             up. */
-          LOG_FATAL(LOGF_SysLinux, "Kernel version not supported yet, sorry.");
-          break;
-        default:
-          LOG_FATAL(LOGF_SysLinux, "Kernel version not supported yet, sorry.");
-          break;
-      }
-      break;
     case 2:
+      /* for kernel 2.x */
       switch (minor) {
         case 0:
           if (patch < 32) {
@@ -807,20 +790,15 @@
             have_readonly_adjtime = 0;
             break;
           }
-          /* Let's be optimistic that these will be the same until proven
-             otherwise :-) */
-        case 7:
-        case 8:
+        default:
           /* These don't need scaling */
           freq_scale = 1.0;
           have_readonly_adjtime = 2;
           break;
-        default:
-          LOG_FATAL(LOGF_SysLinux, "Kernel version not supported yet, sorry.");
       }
       break;
     case 3:
-      /* These don't need scaling (treat like 2.6.28 and later) */
+      /* for kernel 3.x: These don't need scaling */
       freq_scale = 1.0;
       have_readonly_adjtime = 2;
       break;
@@ -870,16 +848,6 @@
 }
 
 /* ================================================== */
-
-void
-SYS_Linux_GetKernelVersion(int *major, int *minor, int *patchlevel)
-{
-  *major = version_major;
-  *minor = version_minor;
-  *patchlevel = version_patchlevel;
-}
-
-/* ================================================== */
 
 #ifdef FEAT_LINUXCAPS
 void
diff -urN chrony-1.24-old/sys_linux.h chrony-1.24/sys_linux.h
--- chrony-1.24-old/sys_linux.h	2010-02-04 13:07:19.000000000 +0100
+++ chrony-1.24/sys_linux.h	2012-11-16 08:56:27.239470638 +0100
@@ -35,8 +35,6 @@
 
 extern void SYS_Linux_Finalise(void);
 
-extern void SYS_Linux_GetKernelVersion(int *major, int *minor, int *patchlevel);
-
 extern void SYS_Linux_DropRoot(char *user);
 
 extern void SYS_Linux_MemLockAll(int LockAll);

Attachment: patchset-for-chrony-deb7u1.tar.gz
Description: GNU Zip compressed data


Reply to: