Hello community,

here is the log from the commit of package progress for openSUSE:Factory 
checked in at 2018-07-04 23:55:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/progress (Old)
 and      /work/SRC/openSUSE:Factory/.progress.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "progress"

Wed Jul  4 23:55:57 2018 rev:3 rq:620523 version:0.14

Changes:
--------
--- /work/SRC/openSUSE:Factory/progress/progress.changes        2018-02-14 
10:52:56.798823211 +0100
+++ /work/SRC/openSUSE:Factory/.progress.new/progress.changes   2018-07-04 
23:56:12.167821188 +0200
@@ -1,0 +2,16 @@
+Mon Jul  2 00:22:10 UTC 2018 - [email protected]
+
+- Update to version 0.14
+  * add support for 7z, 7za, split and gpg
+  * add support for .progressrc
+  * doc and build fixes
+- cleanup with spec-cleaner
+
+-------------------------------------------------------------------
+Sat Apr 14 13:38:30 UTC 2018 - [email protected]
+
+- using master head from git
+- add progress-fix_ncurses_without_pkgconfig.patch: fix Makefile to
+  build with our ncurses-devel (doesn't have a pkgconfig file)
+
+-------------------------------------------------------------------

Old:
----
  progress-0.13.1.tar.gz

New:
----
  progress-0.14.tar.gz
  progress-fix_ncurses_without_pkgconfig.patch

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

Other differences:
------------------
++++++ progress.spec ++++++
--- /var/tmp/diff_new_pack.DBhuNj/_old  2018-07-04 23:56:13.103820155 +0200
+++ /var/tmp/diff_new_pack.DBhuNj/_new  2018-07-04 23:56:13.107820151 +0200
@@ -17,14 +17,16 @@
 
 
 Name:           progress
-Version:        0.13.1
+Version:        0.14
 Release:        0
 Summary:        Coreutils Viewer
-License:        GPL-3.0+
+License:        GPL-3.0-or-later
 Group:          System/Console
-Url:            https://github.com/Xfennec/progress
+URL:            https://github.com/Xfennec/progress
 Source0:        
https://github.com/Xfennec/progress/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
+Patch1:         progress-fix_ncurses_without_pkgconfig.patch
 BuildRequires:  ncurses-devel
+BuildRequires:  pkgconfig
 Provides:       cv = %{version}
 Obsoletes:      cv < %{version}
 
@@ -37,6 +39,7 @@
 
 %prep
 %setup -q
+%patch1
 
 %build
 make %{?_smp_mflags} CFLAGS="-g -Wall -D_FILE_OFFSET_BITS=64 %{optflags}"
@@ -45,8 +48,9 @@
 %make_install PREFIX=%{_prefix}
 
 %files
-%doc LICENSE README.md
+%license LICENSE
+%doc README.md
 %{_bindir}/%{name}
-%{_mandir}/man1/%{name}.1%{ext_man}
+%{_mandir}/man1/%{name}.1%{?ext_man}
 
 %changelog

++++++ progress-0.13.1.tar.gz -> progress-0.14.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/progress-0.13.1/Makefile new/progress-0.14/Makefile
--- old/progress-0.13.1/Makefile        2016-05-25 17:09:43.000000000 +0200
+++ new/progress-0.14/Makefile  2018-06-27 18:00:00.000000000 +0200
@@ -1,15 +1,17 @@
 OBJ = progress
-override CFLAGS += -g -Wall -D_FILE_OFFSET_BITS=64
+CFLAGS ?= -g
+override CFLAGS += -Wall -D_FILE_OFFSET_BITS=64
 override LDFLAGS += -lm
 UNAME := $(shell uname)
+PKG_CONFIG ?= pkg-config
 ifeq ($(UNAME), Linux)
-    ifeq (, $(shell which pkg-config 2> /dev/null))
+    ifeq (, $(shell which $(PKG_CONFIG) 2> /dev/null))
     $(error "pkg-config command not found")
     endif
-    ifeq (, $(shell pkg-config ncurses --libs 2> /dev/null))
+    ifeq (, $(shell $(PKG_CONFIG) ncurses --libs 2> /dev/null))
     $(error "ncurses package not found")
     endif
-    override LDFLAGS += $(shell pkg-config ncurses --libs)
+    override LDFLAGS += $(shell $(PKG_CONFIG) ncurses --libs)
 endif
 ifeq ($(UNAME), Darwin)
     override LDFLAGS += -lncurses
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/progress-0.13.1/progress.1 
new/progress-0.14/progress.1
--- old/progress-0.13.1/progress.1      2016-05-25 17:09:43.000000000 +0200
+++ new/progress-0.14/progress.1        2018-06-27 18:00:00.000000000 +0200
@@ -13,6 +13,9 @@
 .B \-c
 .I command
 ] [
+.B \-a
+.I command
+] [
 .B \-p
 .I pid
 ]
@@ -35,9 +38,7 @@
 percentage of copied data.
 
 It can now also estimate throughput (using flag
-.B \-w
-).
-
+.BR \-w ).
 
 .SH OPTIONS
 .TP
@@ -52,21 +53,23 @@
 .TP
 .B \-W (\-\-wait\-delay secs)
 wait 'secs' seconds for I/O estimation (implies
-.B \-w
-)
+.BR \-w )
 .TP
 .B \-m (\-\-monitor)
 loop while monitored processes are still running
 .TP
 .B \-M (\-\-monitor\-continuously)
 like monitor but never stop (similar to
-.B watch progress
-)
+.BR "watch progress" )
 .TP
 .B \-c (\-\-command cmd)
 monitor only this command name (ex: firefox). This option can be used multiple
 times on the command line.
 .TP
+.B \-a (\-\-additional-command cmd)
+add this command to the default list. This option can be used multiple
+times on the command line.
+.TP
 .B \-p (\-\-pid id)
 monitor only this numeric process ID (ex: \`pidof firefox\`). This option can
 be used multiple times on the command line.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/progress-0.13.1/progress.c 
new/progress-0.14/progress.c
--- old/progress-0.13.1/progress.c      2016-05-25 17:09:43.000000000 +0200
+++ new/progress-0.14/progress.c        2018-06-27 18:00:00.000000000 +0200
@@ -29,6 +29,7 @@
 #include <time.h>
 #include <signal.h>
 #include <stdarg.h>
+#include <assert.h>
 #include <curses.h>
 
 #include <wordexp.h>
@@ -52,11 +53,17 @@
 #include "sizes.h"
 #include "hlist.h"
 
-char *proc_names[] = {"cp", "mv", "dd", "tar", "cat", "rsync",
+// Given -a will dynamically add values to this list, move it to be a dynamic
+// list and generate it at runtime.
+static int proc_names_cnt;
+static char **proc_names;
+char *default_proc_names[] = {"cp", "mv", "dd", "tar", "cat", "rsync",
     "grep", "fgrep", "egrep", "cut", "sort", "md5sum", "sha1sum",
     "sha224sum", "sha256sum", "sha384sum", "sha512sum", "adb",
-    "gzip", "gunzip", "bzip2", "bunzip2", "xz", "unxz", "lzma", "unlzma",
+    "gzip", "gunzip", "bzip2", "bunzip2", "xz", "unxz", "lzma", "unlzma", 
"7z", "7za",
     "zcat", "bzcat", "lzcat",
+    "split",
+    "gpg",
     NULL
 };
 
@@ -148,9 +155,12 @@
 int pid_count=0;
 int nb_processes = proc_listpids(PROC_ALL_PIDS, 0, NULL, 0);
 char exe[1024];
-pid_t *pids = malloc(nb_processes * sizeof(pid_t));
+pid_t *pids;
 int i;
 
+pids = malloc(nb_processes * sizeof(pid_t));
+assert(pids != NULL);
+
 proc_listpids(PROC_ALL_PIDS, 0, pids, nb_processes);
 for(i = 0; i < nb_processes; ++i) {
     if (pids[i] == 0) {
@@ -253,6 +263,7 @@
     return 0;
 }
 struct proc_fdinfo *procFDInfo = (struct proc_fdinfo *)malloc(bufferSize);
+assert(procFDInfo != NULL);
 proc_pidinfo(pid, PROC_PIDLISTFDS, 0, procFDInfo, bufferSize);
 int numberOfProcFDs = bufferSize / PROC_PIDLISTFD_SIZE;
 int i;
@@ -491,6 +502,7 @@
     {"monitor",              no_argument,       0, 'm'},
     {"monitor-continuously", no_argument,       0, 'M'},
     {"help",                 no_argument,       0, 'h'},
+    {"additional-command",   required_argument, 0, 'a'},
     {"command",              required_argument, 0, 'c'},
     {"pid",                  required_argument, 0, 'p'},
     {"ignore-file",          required_argument, 0, 'i'},
@@ -498,7 +510,7 @@
     {0, 0, 0, 0}
 };
 
-static char *options_string = "vqdwmMhc:p:W:i:o:";
+static char *options_string = "vqdwmMha:c:p:W:i:o:";
 int c,i;
 int option_index = 0;
 char *rp;
@@ -523,24 +535,25 @@
             printf("---------------------\n");
             printf("Shows progress on file manipulations (cp, mv, dd, 
...)\n\n");
             printf("Monitored commands (default):\n");
-            for(i = 0 ; proc_names[i] ; i++)
+            for(i = 0 ; i < proc_names_cnt ; i++)
                 printf("%s ", proc_names[i]);
             printf("\n\n");
             printf("Usage: %s [-qdwmM] [-W secs] [-c command] [-p 
pid]\n",argv[0]);
-            printf("  -q --quiet                 hides all messages\n");
-            printf("  -d --debug                 shows all warning/error 
messages\n");
-            printf("  -w --wait                  estimate I/O throughput and 
ETA (slower display)\n");
-            printf("  -W --wait-delay secs       wait 'secs' seconds for I/O 
estimation (implies -w, default=%.1f)\n", throughput_wait_secs);
-            printf("  -m --monitor               loop while monitored 
processes are still running\n");
-            printf("  -M --monitor-continuously  like monitor but never stop 
(similar to watch %s)\n", argv[0]);
-            printf("  -c --command cmd           monitor only this command 
name (ex: firefox)\n");
-            printf("  -p --pid id                monitor only this process ID 
(ex: `pidof firefox`)\n");
-            printf("  -i --ignore-file file      do not report process if 
using file\n");
-            printf("  -o --open-mode {r|w}       report only files opened for 
read or write\n");
-            printf("  -v --version               show program version and 
exit\n");
-            printf("  -h --help                  display this help and 
exit\n");
+            printf("  -q --quiet                   hides all messages\n");
+            printf("  -d --debug                   shows all warning/error 
messages\n");
+            printf("  -w --wait                    estimate I/O throughput and 
ETA (slower display)\n");
+            printf("  -W --wait-delay secs         wait 'secs' seconds for I/O 
estimation (implies -w, default=%.1f)\n", throughput_wait_secs);
+            printf("  -m --monitor                 loop while monitored 
processes are still running\n");
+            printf("  -M --monitor-continuously    like monitor but never stop 
(similar to watch %s)\n", argv[0]);
+            printf("  -a --additional-command cmd  add additional command to 
default command list\n");
+            printf("  -c --command cmd             monitor only this command 
name (ex: firefox)\n");
+            printf("  -p --pid id                  monitor only this process 
ID (ex: `pidof firefox`)\n");
+            printf("  -i --ignore-file file        do not report process if 
using file\n");
+            printf("  -o --open-mode {r|w}         report only files opened 
for read or write\n");
+            printf("  -v --version                 show program version and 
exit\n");
+            printf("  -h --help                    display this help and 
exit\n");
             printf("\n\n");
-            printf("Multiple options allowed for: -c -p -i. Use PROGRESS_ARGS 
for permanent arguments.\n");
+            printf("Multiple options allowed for: -a -c -p -i. Use 
PROGRESS_ARGS for permanent arguments.\n");
             exit(EXIT_SUCCESS);
             break;
 
@@ -556,21 +569,31 @@
             rp = realpath(optarg, NULL);
             ignore_file_list_cnt++;
             ignore_file_list = realloc(ignore_file_list, ignore_file_list_cnt 
* sizeof(char *));
+            assert(ignore_file_list != NULL);
             if (rp)
                 ignore_file_list[ignore_file_list_cnt - 1] = rp;
             else
                 ignore_file_list[ignore_file_list_cnt - 1] = strdup(optarg); 
// file does not exist yet, it seems
             break;
 
+        case 'a':
+            proc_names_cnt++;
+            proc_names = realloc(proc_names, proc_names_cnt * sizeof(char *));
+            assert(proc_names != NULL);
+            proc_names[proc_names_cnt - 1] = strdup(optarg);
+            break;
+
         case 'c':
             proc_specifiq_name_cnt++;
             proc_specifiq_name = realloc(proc_specifiq_name, 
proc_specifiq_name_cnt * sizeof(char *));
+            assert(proc_specifiq_name != NULL);
             proc_specifiq_name[proc_specifiq_name_cnt - 1] = strdup(optarg);
             break;
 
         case 'p':
             proc_specifiq_pid_cnt++;
             proc_specifiq_pid = realloc(proc_specifiq_pid, 
proc_specifiq_pid_cnt * sizeof(pid_t));
+            assert(proc_specifiq_pid != NULL);
             proc_specifiq_pid[proc_specifiq_pid_cnt - 1] = atof(optarg);
             break;
 
@@ -710,7 +733,7 @@
 }
 
 if (search_all) {
-    for (i = 0 ; proc_names[i] ; i++) {
+    for (i = 0 ; i < proc_names_cnt ; i++) {
         pid_count += find_pids_by_binary_name(proc_names[i],
                                               pidinfo_list + pid_count,
                                               MAX_PIDS - pid_count);
@@ -745,7 +768,7 @@
     }
     if (!proc_specifiq_pid && !proc_specifiq_name_cnt) {
         nfprintf(stderr,"No command currently running: ");
-        for (i = 0 ; proc_names[i] ; i++) {
+        for (i = 0 ; i < proc_names_cnt ; i++) {
             nfprintf(stderr,"%s, ", proc_names[i]);
         }
     }
@@ -876,6 +899,17 @@
 exit(0);
 }
 
+// Setup the default commands as a dynamic list
+void populate_proc_names() {
+    int i;
+    for(i = 0 ; default_proc_names[i] ; i++) {
+        proc_names_cnt++;
+        proc_names = realloc(proc_names, proc_names_cnt * sizeof(char *));
+        assert(proc_names != NULL);
+        proc_names[proc_names_cnt - 1] = default_proc_names[i];
+    }
+}
+
 int main(int argc, char *argv[])
 {
 pid_t nb_pid;
@@ -884,6 +918,8 @@
 char *env_progress_args;
 char *env_progress_args_full;
 
+populate_proc_names();
+
 env_progress_args = getenv("PROGRESS_ARGS");
 
 if (env_progress_args) {
@@ -893,6 +929,7 @@
     // argv[0] + ' ' + env_progress_args + '\0'
     full_len = strlen(argv[0]) + 1 + strlen(env_progress_args) + 1;
     env_progress_args_full = malloc(full_len * sizeof(char));
+    assert(env_progress_args_full != NULL);
     sprintf(env_progress_args_full, "%s %s", argv[0], env_progress_args);
 
     if (wordexp(env_progress_args_full, &env_wordexp, 0)) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/progress-0.13.1/progress.h 
new/progress-0.14/progress.h
--- old/progress-0.13.1/progress.h      2016-05-25 17:09:43.000000000 +0200
+++ new/progress-0.14/progress.h        2018-06-27 18:00:00.000000000 +0200
@@ -25,7 +25,7 @@
 
 #include "hlist.h"
 
-#define PROGRESS_VERSION         "0.13"
+#define PROGRESS_VERSION         "0.14"
 
 #define PROC_PATH       "/proc"
 #define MAX_PIDS        32

++++++ progress-fix_ncurses_without_pkgconfig.patch ++++++
--- Makefile.orig       2018-04-14 15:36:01.945104483 +0200
+++ Makefile    2018-04-14 15:36:52.649267940 +0200
@@ -5,13 +5,7 @@
 UNAME := $(shell uname)
 PKG_CONFIG ?= pkg-config
 ifeq ($(UNAME), Linux)
-    ifeq (, $(shell which $(PKG_CONFIG) 2> /dev/null))
-    $(error "pkg-config command not found")
-    endif
-    ifeq (, $(shell $(PKG_CONFIG) ncurses --libs 2> /dev/null))
-    $(error "ncurses package not found")
-    endif
-    override LDFLAGS += $(shell $(PKG_CONFIG) ncurses --libs)
+    override LDFLAGS += -lncursesw
 endif
 ifeq ($(UNAME), Darwin)
     override LDFLAGS += -lncurses

Reply via email to