[procps] - moved to new upstream - removed merged or unneeded patches - procps-3.2.7-sysctl-writeonly.patch

Jan Görig jgorig at fedoraproject.org
Mon Jan 31 13:38:36 UTC 2011


commit e723a220cda1d2c7629d127b444259c40ad70701
Author: Jan Görig <jgorig at redhat.com>
Date:   Mon Jan 31 14:37:08 2011 +0100

    - moved to new upstream
    - removed merged or unneeded patches
      - procps-3.2.7-sysctl-writeonly.patch
      - procps-3.2.7-longcmd.patch
      - procps-3.2.7-ps-stime.patch
      - procps-3.2.7-top-clrscr.patch
      - procps-3.2.7-ps-cgroup.patch
      - procps-3.2.8-ps-cgroup-suppress-root-group.patch
      - procps-3.2.8-vmstat-getopt.patch
      - procps-3.2.8-make.patch
      - procps-3.2.8-constructor-order.patch
    - disabled procps-3.2.7-sysctl-ignore.patch

 .gitignore                                       |    1 +
 procps-3.2.7-FAQ.patch                           |    4 +-
 procps-3.2.7-longcmd.patch                       |   22 ----
 procps-3.2.7-ps-cgroup.patch                     |   67 ------------
 procps-3.2.7-ps-stime.patch                      |   71 ------------
 procps-3.2.7-sysctl-writeonly.patch              |   56 ----------
 procps-3.2.7-top-clrscr.patch                    |   19 ----
 procps-3.2.7-vmstat-timestamp.patch              |    2 +-
 procps-3.2.8-constructor-order.patch             |   38 -------
 procps-3.2.8-make.patch                          |   13 ---
 procps-3.2.8-ps-cgroup-suppress-root-group.patch |   36 ------
 procps-3.2.8-setlocale.patch                     |   21 +++--
 procps-3.2.8-vmstat-getopt.patch                 |  126 ----------------------
 procps-3.2.8git-cgroup-rewritten.patch           |  113 +++++++++++++++++++
 procps-3.2.8git-makefile.patch                   |   13 +++
 procps.spec                                      |   55 +++++-----
 sources                                          |    2 +-
 17 files changed, 170 insertions(+), 489 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index d83111a..5c97a20 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 procps-3.2.8.tar.gz
+/procps-3.2.8-20110131git.tar.gz
diff --git a/procps-3.2.7-FAQ.patch b/procps-3.2.7-FAQ.patch
index 562273e..190f19b 100644
--- a/procps-3.2.7-FAQ.patch
+++ b/procps-3.2.7-FAQ.patch
@@ -14,7 +14,7 @@ diff -up procps-3.2.7/proc/version.h.p3 procps-3.2.7/proc/version.h
 --- procps-3.2.7/proc/version.h.p3	2002-12-15 01:08:32.000000000 +0100
 +++ procps-3.2.7/proc/version.h	2008-09-01 11:11:50.000000000 +0200
 @@ -16,6 +16,7 @@ EXTERN_C_BEGIN
- 
+ void init_Linux_version(void);    /* Get Linux version */
  extern void display_version(void);	/* display suite version */
  extern const char procps_version[];		/* global buf for suite version */
 +extern const char procps_number_version[];	/* global buf for suite number version */
@@ -30,7 +30,7 @@ diff -up procps-3.2.7/proc/library.map.p3 procps-3.2.7/proc/library.map
    tty_to_dev; dev_to_tty; open_psdb_message; open_psdb; lookup_wchan;
 -  display_version; procps_version; linux_version_code;
 +  display_version; procps_version; procps_number_version; linux_version_code;
-   Hertz; smp_num_cpus; have_privs;
+   Hertz; smp_num_cpus; have_privs; getbtime;
    sprint_uptime; uptime; user_from_uid; print_uptime; loadavg;
    pretty_print_signals; print_given_signals; unix_print_signals; signal_name_to_number; signal_number_to_name;
 diff -up procps-3.2.7/proc/version.c.p3 procps-3.2.7/proc/version.c
diff --git a/procps-3.2.7-vmstat-timestamp.patch b/procps-3.2.7-vmstat-timestamp.patch
index d7ca068..1492a09 100644
--- a/procps-3.2.7-vmstat-timestamp.patch
+++ b/procps-3.2.7-vmstat-timestamp.patch
@@ -107,7 +107,7 @@
  }
 @@ -641,6 +668,9 @@
        case 's':
-         statMode |= VMSUMSTAT; 	
+         statMode |= VMSUMSTAT;
  	break;
 +      case 't':
 +        showtimestamp=TRUE;
diff --git a/procps-3.2.8-setlocale.patch b/procps-3.2.8-setlocale.patch
index c197fd3..d841bee 100644
--- a/procps-3.2.8-setlocale.patch
+++ b/procps-3.2.8-setlocale.patch
@@ -1,7 +1,8 @@
-diff -Nur procps-3.2.8-orig/proc/sysinfo.c procps-3.2.8/proc/sysinfo.c
---- procps-3.2.8-orig/proc/sysinfo.c	2008-03-24 05:33:43.000000000 +0100
-+++ procps-3.2.8/proc/sysinfo.c	2009-12-18 22:50:52.000000000 +0100
-@@ -74,17 +74,19 @@
+diff --git a/proc/sysinfo.c b/proc/sysinfo.c
+index 34f70ec..3056f2e 100644
+--- a/proc/sysinfo.c
++++ b/proc/sysinfo.c
+@@ -74,17 +74,19 @@ static char buf[2048];
  /***********************************************************************/
  int uptime(double *restrict uptime_secs, double *restrict idle_secs) {
      double up=0, idle=0;
@@ -23,19 +24,25 @@ diff -Nur procps-3.2.8-orig/proc/sysinfo.c procps-3.2.8/proc/sysinfo.c
      SET_IF_DESIRED(uptime_secs, up);
      SET_IF_DESIRED(idle_secs, idle);
      return up;	/* assume never be zero seconds in practice */
-@@ -128,9 +130,9 @@
+@@ -157,7 +159,7 @@ static void old_Hertz_hack(void){
    double up_1, up_2, seconds;
    unsigned long long jiffies;
    unsigned h;
 -  char *restrict savelocale;
 +  char *savelocale;
+   long hz;
+ 
+ #ifdef _SC_CLK_TCK
+@@ -167,7 +169,7 @@ static void old_Hertz_hack(void){
+   }
+ #endif
  
 -  savelocale = setlocale(LC_NUMERIC, NULL);
 +  savelocale = strdup(setlocale(LC_NUMERIC, NULL));
    setlocale(LC_NUMERIC, "C");
    do{
      FILE_TO_BUF(UPTIME_FILE,uptime_fd);  sscanf(buf, "%lf", &up_1);
-@@ -141,6 +143,7 @@
+@@ -178,6 +180,7 @@ static void old_Hertz_hack(void){
      /* uptime(&up_2, NULL); */
    } while((long long)( (up_2-up_1)*1000.0/up_1 )); /* want under 0.1% error */
    setlocale(LC_NUMERIC, savelocale);
@@ -43,7 +50,7 @@ diff -Nur procps-3.2.8-orig/proc/sysinfo.c procps-3.2.8/proc/sysinfo.c
    jiffies = user_j + nice_j + sys_j + other_j;
    seconds = (up_1 + up_2) / 2;
    h = (unsigned)( (double)jiffies/seconds/smp_num_cpus );
-@@ -303,16 +306,18 @@
+@@ -341,16 +344,18 @@ void eight_cpu_numbers(double *restrict uret, double *restrict nret, double *res
  /***********************************************************************/
  void loadavg(double *restrict av1, double *restrict av5, double *restrict av15) {
      double avg_1=0, avg_5=0, avg_15=0;
diff --git a/procps-3.2.8git-cgroup-rewritten.patch b/procps-3.2.8git-cgroup-rewritten.patch
new file mode 100644
index 0000000..8b9e7b1
--- /dev/null
+++ b/procps-3.2.8git-cgroup-rewritten.patch
@@ -0,0 +1,113 @@
+[PATCH] Rewritten cgroup support and suppressed root cgroup
+Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=593267
+Signed-off-by: Jan Görig <jgorig at redhat.com>
+---
+ proc/readproc.c |   15 ++++++---------
+ ps/output.c     |   52 ++++++++++++++++++++++++++++++++++------------------
+ 2 files changed, 40 insertions(+), 27 deletions(-)
+
+diff --git a/proc/readproc.c b/proc/readproc.c
+index f199c26..890e77a 100644
+--- a/proc/readproc.c
++++ b/proc/readproc.c
+@@ -493,9 +493,12 @@ static char** file2strvec(const char* directory, const char* what) {
+     }
+     endbuf = rbuf + tot;			/* count space for pointers */
+     align = (sizeof(char*)-1) - ((tot + sizeof(char*)-1) & (sizeof(char*)-1));
+-    for (c = 0, p = rbuf; p < endbuf; p++)
+-    	if (!*p)
++    for (c = 0, p = rbuf; p < endbuf; p++) {
++	if (!*p || *p == '\n')
+ 	    c += sizeof(char*);
++	if (*p == '\n')
++	    *p = 0;
++    }
+     c += sizeof(char*);				/* one extra for NULL term */
+ 
+     rbuf = xrealloc(rbuf, tot + c + align);	/* make room for ptrs AT END */
+@@ -635,14 +638,8 @@ static proc_t* simple_readproc(PROCTAB *restrict const PT, proc_t *restrict cons
+     else
+         p->environ = NULL;
+ 
+-    if(linux_version_code>=LINUX_VERSION(2,6,24) && (flags & PROC_FILLCGROUP)) {
++    if(linux_version_code>=LINUX_VERSION(2,6,24) && (flags & PROC_FILLCGROUP))
+ 	p->cgroup = file2strvec(path, "cgroup"); 	/* read /proc/#/cgroup */
+-    	if(p->cgroup && *p->cgroup) {
+-		int i = strlen(*p->cgroup);
+-		if( (*p->cgroup)[i-1]=='\n' )
+-			(*p->cgroup)[i-1] = ' '; //little hack to remove trailing \n
+-	}
+-    }
+     else
+ 	p->cgroup = NULL;
+     
+diff --git a/ps/output.c b/ps/output.c
+index 338cf1a..6a79e45 100644
+--- a/ps/output.c
++++ b/ps/output.c
+@@ -359,23 +359,39 @@ static int pr_args(char *restrict const outbuf, const proc_t *restrict const pp)
+ }
+ 
+ static int pr_cgroup(char *restrict const outbuf,const proc_t *restrict const pp) {
+- if(pp->cgroup && *pp->cgroup) {
+-   char *endp = outbuf;
+-   int rightward=max_rightward;
+-   if(forest_prefix){
+-       int fh = forest_helper(outbuf);
+-       endp += fh;
+-       rightward -= fh;
+-   }
+-   if(rightward>1){
+-     *endp++ = ' ';
+-     rightward--;
+-     endp += escape_str(endp, *pp->cgroup, OUTBUF_SIZE, &rightward);
+-   }
+-   return max_rightward-rightward;
+- }
+- else
+-   return pr_nop(outbuf,pp);
++  char *endp = outbuf;
++  int rightward = max_rightward;
++  
++  if(pp->cgroup) {
++    char **pcgroup = pp->cgroup;
++    
++    while(*pcgroup != NULL) {
++      //Skip root cgroups
++      if(!**pcgroup || (*pcgroup)[strlen(*pcgroup)-1] == '/') {
++        pcgroup++;
++        continue;
++      }
++      
++      //Skip initial cgroup number
++      char *ccgroup = strchr(*pcgroup, ':');
++      if(ccgroup == NULL)
++        ccgroup = *pcgroup;
++      else
++        ccgroup++;
++      
++      if(endp != outbuf)
++        endp += escape_str(endp, ";", OUTBUF_SIZE, &rightward);
++      
++      endp += escape_str(endp, ccgroup, OUTBUF_SIZE, &rightward);
++      
++      pcgroup++;
++    }
++  }
++  
++  if(endp == outbuf)
++    return pr_nop(outbuf,pp);
++  
++  return (int)(endp-outbuf);
+ }
+ 
+ /* "ucomm" is the same thing: short unless -f */
+@@ -1312,7 +1328,7 @@ static const format_struct format_array[] = {
+ {"bsdtime",   "TIME",    pr_bsdtime,  sr_nop,     6,   0,    LNX, ET|RIGHT},
+ {"c",         "C",       pr_c,        sr_pcpu,    2,   0,    SUN, ET|RIGHT},
+ {"caught",    "CAUGHT",  pr_sigcatch, sr_nop,     9,   0,    BSD, TO|SIGNAL}, /*sigcatch*/
+-{"cgroup",    "CGROUP",  pr_cgroup,     sr_nop,     27, CGRP,  LNX, PO|UNLIMITED},
++{"cgroup",    "CGROUP",  pr_cgroup,   sr_nop,    27,CGRP,    LNX, PO|UNLIMITED},
+ {"class",     "CLS",     pr_class,    sr_sched,   3,   0,    XXX, TO|LEFT},
+ {"cls",       "CLS",     pr_class,    sr_sched,   3,   0,    HPU, TO|RIGHT}, /*says HPUX or RT*/
+ {"cmaj_flt",  "-",       pr_nop,      sr_cmaj_flt, 1,  0,    LNX, AN|RIGHT},
diff --git a/procps-3.2.8git-makefile.patch b/procps-3.2.8git-makefile.patch
new file mode 100644
index 0000000..35dfa53
--- /dev/null
+++ b/procps-3.2.8git-makefile.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile b/Makefile
+index 9de3296..09fb3ed 100644
+--- a/Makefile
++++ b/Makefile
+@@ -18,7 +18,7 @@
+ 
+ VERSION      := 3
+ SUBVERSION   := 2
+-MINORVERSION := 7
++MINORVERSION := 8
+ TARVERSION   := $(VERSION).$(SUBVERSION).$(MINORVERSION)
+ 
+ ############ vars
diff --git a/procps.spec b/procps.spec
index d3ce42e..7a04c23 100644
--- a/procps.spec
+++ b/procps.spec
@@ -1,11 +1,13 @@
+%define gitver 20110131git
+
 Summary: System and process monitoring utilities
 Name: procps
 Version: 3.2.8
-Release: 15%{?dist}
+Release: 16.%{gitver}%{?dist}
 License: GPLv2+ and LGPLv2+
 Group: Applications/System
-URL: http://procps.sourceforge.net
-Source: http://procps.sourceforge.net/procps-%{version}.tar.gz
+URL: http://gitorious.org/procps
+Source: procps-%{version}-%{gitver}.tar.gz
 Source1: FAQ
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -18,8 +20,6 @@ Patch3: procps-3.2.7-FAQ.patch
 Patch6: procps-3.2.7-noproc.patch
 Patch7: procps-3.2.7-pseudo.patch
 Patch8: procps-3.2.7-0x9b.patch
-# 157725 - sysctl -A returns an error
-Patch9: procps-3.2.7-sysctl-writeonly.patch
 # 161449 - "top" ignores user and system toprc
 Patch10: procps-3.2.7-top-rc.patch
 # 161303 - 'top' failed when remove cpus
@@ -31,8 +31,6 @@ Patch14: procps-3.2.7-top-env-vmsize.patch
 Patch15: procps-3.2.7-top-env-cpuloop.patch
 # 185299 - cpu steal time support
 Patch16: procps-3.2.7-vmstat-cpusteal.patch
-# 134516 - ps ignores /proc/#/cmdline if contents 2047 bytes
-Patch17: procps-3.2.7-longcmd.patch
 # 189349 - 32bit vmstat on 64bit kernel
 Patch18: procps-3.2.7-vmstat-pgpg.patch
 # 212637 - sysctl using deprecated syscall
@@ -44,8 +42,6 @@ Patch22: procps-3.2.7-top-sorthigh.path
 Patch23: procps-3.2.7-w-best.patch
 # 183029 - watch ignores unicode characters
 Patch24: procps-3.2.7-watch-unicode.patch
-# 222251 - STIME can jitter by one second
-Patch26: procps-3.2.7-ps-stime.patch
 #244152 - ps truncates eip and esp to 32-bit values on 64-bit systems
 Patch28: procps-3.2.7-ps-eip64.patch
 #244960 - ps manpage formatted incorrectly
@@ -56,8 +52,6 @@ Patch31: procps-3.2.7-top-cpu0.patch
 Patch32: procps-3.2.7-top-cpuint.patch
 #296471 - update top man page
 Patch33: procps-3.2.7-top-manpage.patch
-#440694 - strange text after selecting few field
-Patch34: procps-3.2.7-top-clrscr.patch
 #435453 - errors with man -t formatting of ps man page
 Patch35: procps-3.2.7-ps-man-fmt.patch
 #472783 - 'vmstat -p <partition name>', 
@@ -71,8 +65,6 @@ Patch38: procps-3.2.7-slabtop-once.patch
 Patch39: procps-3.2.7-vmstat-timestamp.patch
 #manual page updated to document the -t functionality
 Patch40: procps-3.2.7-vmstat-timestamp-manpage.patch
-#added cgroup display to ps
-Patch41: procps-3.2.7-ps-cgroup.patch
 # 'requested writes' display in partition statistics
 Patch42: procps-3.2.7-vmstat-partstats-reqwrites.patch
 # '-l' option of 'free' documented
@@ -85,14 +77,10 @@ Patch45: procps-enable-core.patch
 Patch46: procps-3.2.8-setlocale.patch
 # debian bug #505571 pmap -x should show more information
 Patch47: procps-pmap-smaps.patch
-#578798 - vmstat -SM doesn't work but vmstat -S M does 
-#Patch48: procps-3.2.7-vmstat-sm.patch
-Patch48: procps-3.2.8-vmstat-getopt.patch
-Patch49: procps-3.2.8-ps-cgroup-suppress-root-group.patch
-#631340 - fixed build with make 3.82
-Patch50: procps-3.2.8-make.patch
-#632236: don't depend on constructor execution order
-Patch51: procps-3.2.8-constructor-order.patch
+
+Patch50: procps-3.2.8git-makefile.patch
+#593267 - patch for procps cgroup display: supress root group
+Patch51: procps-3.2.8git-cgroup-rewritten.patch
 
 BuildRequires: ncurses-devel
 
@@ -126,7 +114,7 @@ Requires: %{name} = %{version}-%{release}
 System and process monitoring utilities development headers
 
 %prep
-%setup -q
+%setup -q -n procps-%{version}-%{gitver}
 
 %patch1 -p1
 %patch2 -p1
@@ -134,40 +122,33 @@ System and process monitoring utilities development headers
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
-%patch9 -p1
 %patch10 -p1
 %patch11 -p1
 %patch14 -p1
 %patch15 -p1
 %patch16 -p1
-%patch17 -p1
 %patch18 -p1
-%patch21 -p1
+#%patch21 -p1
 %patch22 -p1
 %patch23 -p1
 %patch24 -p1
-%patch26 -p1
 %patch28 -p1
 %patch29 -p1
 %patch31 -p1
 %patch32 -p1
 %patch33 -p1
-%patch34 -p1
 %patch35 -p1
 %patch36 -p1
 %patch37 -p1
 %patch38 -p1
 %patch39 -p1
 %patch40 -p1
-%patch41 -p1
 %patch42 -p1
 %patch43 -p1
 %patch44 -p1
 %patch45 -p1
 %patch46 -p1
 %patch47 -p1
-%patch48 -p1
-%patch49 -p1
 %patch50 -p1
 %patch51 -p1
 
@@ -218,6 +199,20 @@ rm -rf %{buildroot}
 /%{_lib}/libproc.so
 
 %changelog
+* Mon Jan 31 2011 Jan Görig <jgorig at redhat.com> 3.2.8-16.20110113git
+- moved to new upstream
+- removed merged or unneeded patches
+  - procps-3.2.7-sysctl-writeonly.patch
+  - procps-3.2.7-longcmd.patch
+  - procps-3.2.7-ps-stime.patch
+  - procps-3.2.7-top-clrscr.patch
+  - procps-3.2.7-ps-cgroup.patch
+  - procps-3.2.8-ps-cgroup-suppress-root-group.patch
+  - procps-3.2.8-vmstat-getopt.patch
+  - procps-3.2.8-make.patch
+  - procps-3.2.8-constructor-order.patch
+- disabled procps-3.2.7-sysctl-ignore.patch
+
 * Tue Jan 11 2011 Jan Görig <jgorig at redhat.com> 3.2.8-15
 - fixed procps-3.2.8-threads.patch (SIGABRT) (#670289)
 
diff --git a/sources b/sources
index ef79eeb..c930784 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-9532714b6846013ca9898984ba4cd7e0  procps-3.2.8.tar.gz
+2a876022a4fabfcd20fb578e25a3e9a0  procps-3.2.8-20110131git.tar.gz


More information about the scm-commits mailing list