Hello community,

here is the log from the commit of package psmisc for openSUSE:Factory checked 
in at 2017-09-21 12:31:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/psmisc (Old)
 and      /work/SRC/openSUSE:Factory/.psmisc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "psmisc"

Thu Sep 21 12:31:59 2017 rev:65 rq:526990 version:23.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/psmisc/psmisc.changes    2017-07-30 
11:20:41.358031801 +0200
+++ /work/SRC/openSUSE:Factory/.psmisc.new/psmisc.changes       2017-09-21 
12:32:19.112598558 +0200
@@ -1,0 +2,6 @@
+Mon Sep 18 10:17:52 UTC 2017 - [email protected]
+
+- Add patch psmisc-23.0-killall-signals.patch to fix boo#1058990
+  by prior scanning for signal names in the arguments of killall 
+
+-------------------------------------------------------------------

New:
----
  psmisc-23.0-killall-signals.patch

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

Other differences:
------------------
++++++ psmisc.spec ++++++
--- /var/tmp/diff_new_pack.dJSgtr/_old  2017-09-21 12:32:22.964056553 +0200
+++ /var/tmp/diff_new_pack.dJSgtr/_new  2017-09-21 12:32:22.968055990 +0200
@@ -40,8 +40,10 @@
 # PATCH-ADD-SUSE boo#908068, boo#1046237, boo#1046237
 # https://gitlab.com/bitstreamout/psmisc/tree/mountinfo
 Patch3:         0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
-# PATCH-FIX_UPSTREAM boo#1046237 -- Debug output in killall from psmisc package
+# PATCH-FIX-UPSTREAM boo#1046237 -- Debug output in killall from psmisc package
 Patch4:         %{name}-%{version}-killall.patch
+# PATCH-FIX-SUSE boo#1058990 -- killall requires -s or --signal to specify 
signal on the command line
+Patch5:         %{name}-%{version}-killall-signals.patch
 
 %define have_peekfd %ix86 x86_64 ppc ppc64 ppc64le %arm mipsel m68k
 
@@ -61,6 +63,7 @@
 %patch2 -p0 -b .pstree
 %patch3 -p0 -b .mntinf
 %patch4 -p0 -b .ka
+%patch5 -p0 -b .ks
 %patch0 -p0 -b .p0
 
 %build

++++++ psmisc-23.0-killall-signals.patch ++++++
--- src/killall.c       2017-07-06 16:23:15.693736411 +0200
+++ src/killall.c       2017-09-18 12:00:46.506409019 +0200
@@ -796,6 +796,18 @@ have_proc_self_stat (void)
   return stat(filename, &isproc) == 0;
 }
 
+typedef struct
+{
+  int number;
+  const char *sig;
+}
+SIGNAME;
+
+static SIGNAME signals[] = {
+#include "signames.h"
+  {0, NULL}
+};
+
 int
 main (int argc, char **argv)
 {
@@ -807,7 +819,7 @@ main (int argc, char **argv)
   char yt[16];
   char ot[16];
 
-  //int optsig = 0;
+  int optsig;
 
   struct option options[] = {
     {"exact", 0, NULL, 'e'},
@@ -828,6 +840,7 @@ main (int argc, char **argv)
     {"context", 1, NULL, 'Z'},
 #endif /*WITH_SELINUX*/
     {"version", 0, NULL, 'V'},
+    {"dummy", 0, NULL, 'd'},
     {0,0,0,0 }};
 
   opt_ns_pid = getpid();
@@ -852,14 +865,46 @@ main (int argc, char **argv)
     name = *argv;
   sig_num = SIGTERM;
 
+  optsig = argc;
+  while (--optsig) {
+    char *sig;
+    size_t len;
+    if (*(argv[optsig]) != '-')
+      continue;
+    sig = argv[optsig]+1;
+    len = strlen(sig);
+    if (*sig >= '0' && *sig <= '9') {
+      sig_num = atoi (sig);
+      memset(sig, 0, strlen(sig));
+      *sig = 'd';
+    } else if (len >= 3 && *sig >= 'A' && *sig <= 'Z') {
+      SIGNAME *walk;
+      char *opt = sig;
+      if (!strncmp("SIG", sig, 3))
+       sig += 3;
+      for (walk = signals; walk->sig; walk++) {
+       if (!strcmp (walk->sig, sig))
+         break;
+      }
+      if (walk->sig) {
+       sig_num = walk->number;
+       memset(opt, 0, strlen(opt));
+       *opt = 'd';
+       break;
+      }
+    }
+  }
 
   opterr = 0;
+  unsetenv("POSIXLY_CORRECT");
 #ifdef WITH_SELINUX
-  while ( (optc = 
getopt_long_only(argc,argv,"egy:o:ilqrs:u:vwZ:VIn:",options,NULL)) != -1) {
+  while ( (optc = 
getopt_long_only(argc,argv,"degy:o:ilqrs:u:vwZ:VIn:",options,NULL)) != -1) {
 #else
-  while ( (optc = 
getopt_long_only(argc,argv,"egy:o:ilqrs:u:vwVIn:",options,NULL)) != -1) {
+  while ( (optc = 
getopt_long_only(argc,argv,"degy:o:ilqrs:u:vwVIn:",options,NULL)) != -1) {
 #endif
     switch (optc) {
+    case 'd':
+      break;
     case 'e':
       exact = 1;
       break;

Reply via email to