]> git.pld-linux.org Git - packages/util-vserver.git/commitdiff
- up to pre2955 (new debian wheezy); simplify util-vserver-pivot-root-ugly-hack auto/th/util-vserver-0_30_216-1_pre2955_1
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Mon, 28 Mar 2011 16:48:06 +0000 (16:48 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    util-vserver-pivot-root-ugly-hack.patch -> 1.4
    util-vserver.spec -> 1.278

util-vserver-pivot-root-ugly-hack.patch
util-vserver.spec

index f623104f8becb7eb0a4f18055d54e3f229208074..1699e70d297c7b43ae260e645de0a0f1202288b9 100644 (file)
@@ -1,59 +1,11 @@
-diff -ur util-vserver-0.30.216-pre2833/lib/issupported.c util-vserver-0.30.216-pre2833-uname/lib/issupported.c
---- util-vserver-0.30.216-pre2833/lib/issupported.c    2009-04-10 22:24:15.000000000 +0200
-+++ util-vserver-0.30.216-pre2833-uname/lib/issupported.c      2009-06-15 17:45:06.335273350 +0200
-@@ -20,17 +20,39 @@
- #  include <config.h>
- #endif
-+#include <string.h>
-+#include <sys/utsname.h>
- #include "vserver.h"
- #include "assert.h"
- bool
- vc_isSupported(vcFeatureSet feature)
- {
-+  int kver = 0, i, j = 24, k = 0;
-+  struct utsname uts;
-   int         ver = vc_get_version();
-   vc_vci_t    conf = vc_get_vci();
-   if (ver==-1) return false;
-   if (conf==(vc_vci_t)-1) conf = 0;
-+  if (uname(&uts)==-1) {
-+    return false;
-+  } else {
-+    for (i=0; i<strlen(uts.release); i++) {
-+      if (uts.release[i] >= '0' && uts.release[i] <= '9') {
-+      k <<= 4;
-+      k |= uts.release[i] - '0';
-+      } else if (uts.release[i] == '.') {
-+      kver |= (k << j);
-+      j -= 8;
-+      k = 0;
-+      } else
-+            break;
-+    }
-+    if (k != 0 && j >= 0)
-+      kver |= (k << j);
-+  }
-+
-   switch (feature) {
-     case vcFEATURE_COMPAT     :  return true;
-     case vcFEATURE_VSHELPER0  :  return ver >= 0x00010000 && ver < 0x00010010;
-@@ -71,7 +71,13 @@
+--- util-vserver-0.30.216-pre2955/lib/issupported.c~   2011-03-18 19:45:34.000000000 +0100
++++ util-vserver-0.30.216-pre2955/lib/issupported.c    2011-03-28 18:44:52.846690580 +0200
+@@ -50,7 +50,7 @@
      case vcFEATURE_VSTAT      :  return ver >= 0x00020103 && ver < 0x00020306;
      case vcFEATURE_PPTAG      :  return conf & VC_VCI_PPTAG;
      case vcFEATURE_SPACES     :  return conf & VC_VCI_SPACES;
 -    case vcFEATURE_PIVOT_ROOT :  return ver >= 0x00020304;
-+    // Now THIS is really ugly hack, only vs2.3 patches for kernels below
-+    // have pivot_root working for vservers, so we assume people use recent
-+    // patches with recent kernels
-+    case vcFEATURE_PIVOT_ROOT :  return (ver >= 0x00020304) &&
-+                                 ((kver >= 0x02062723 && kver < 0x02062800) ||
-+                                  (kver >= 0x02062811 && kver < 0x02062900) ||
-+                                  (kver >= 0x02062901));
++    case vcFEATURE_PIVOT_ROOT :  return (ver >= 0x00020304 && linux_ver >= 0x0002061f);
      case vcFEATURE_PIDSPACE   :  return false;
      case vcFEATURE_MEMCG      :  return ver >= 0x00020306 && conf & VC_VCI_MEMCG;
      case vcFEATURE_DYNAMIC    :  return ver <  0x00020300 || !(conf & VC_VCI_NO_DYNAMIC);
-
index dbb1fd054f0744a4a3dc3cf21cc02bb7a13438c2..047c4ad89056b6891ea4dadb7cb841e73b0e001a 100644 (file)
@@ -18,7 +18,7 @@
 %undefine      with_doc
 %endif
 
-%define                snap    pre2933
+%define                snap    pre2955
 %define                rel     1
 Summary:       Linux virtual server utilities
 Summary(pl.UTF-8):     Narzędzia dla linuksowych serwerów wirtualnych
@@ -28,7 +28,7 @@ Release:      1.%{snap}.%{rel}
 License:       GPL
 Group:         Applications/System
 Source0:       http://people.linux-vserver.org/~dhozac/t/uv-testing/%{name}-%{version}-%{snap}.tar.bz2
-# Source0-md5: 478a699a154c2823ad2606c50b5f55e4
+# Source0-md5: 13c3846810be19d9d5436a1825d23821
 Source1:       vprocunhide.init
 Source2:       vservers.init
 Source3:       vservers-legacy.init
@@ -863,6 +863,7 @@ exit 0
 %{_libdir}/%{name}/distributions/lenny
 %{_libdir}/%{name}/distributions/sid
 %{_libdir}/%{name}/distributions/squeeze
+%{_libdir}/%{name}/distributions/wheezy
 
 %files -n vserver-distro-fedora
 %defattr(644,root,root,755)
This page took 0.079141 seconds and 4 git commands to generate.