Hello community,

here is the log from the commit of package psmisc for openSUSE:Factory checked 
in at 2018-12-10 12:21:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/psmisc (Old)
 and      /work/SRC/openSUSE:Factory/.psmisc.new.19453 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "psmisc"

Mon Dec 10 12:21:53 2018 rev:72 rq:653088 version:23.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/psmisc/psmisc.changes    2018-11-19 
23:28:41.299419038 +0100
+++ /work/SRC/openSUSE:Factory/.psmisc.new.19453/psmisc.changes 2018-12-10 
12:21:53.934912449 +0100
@@ -1,0 +2,7 @@
+Fri Nov 30 13:21:44 UTC 2018 - Dr. Werner Fink <wer...@suse.de>
+
+- Modify patch 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch
+  * Always initialize head of simple linked list (bsc#1098697)
+  * stat(2) on binary does not see subvol dev
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ 0001-Use-mountinfo-to-be-able-to-use-the-mount-identity.patch ++++++
--- /var/tmp/diff_new_pack.Sh7V2M/_old  2018-12-10 12:21:54.474911911 +0100
+++ /var/tmp/diff_new_pack.Sh7V2M/_new  2018-12-10 12:21:54.474911911 +0100
@@ -1,4 +1,4 @@
-From 2588a03273329961e5eefe6fed695b8f80a352e3 Mon Sep 17 00:00:00 2001
+From 8d0edbbb8d09bc7998bf926b318270b6f7989195 Mon Sep 17 00:00:00 2001
 From: Werner Fink <wer...@suse.de>
 Date: Mon, 22 Oct 2018 12:02:50 +0200
 Subject: [PATCH] Use mountinfo to be able to use the mount identity
@@ -12,15 +12,16 @@
 get the real mount ID for each file
 
 Support also BtrFS with its various subvolumes
+On BtrFS stat(2) on binary does not see subvol dev
 
 Signed-off-by: Werner Fink <wer...@suse.de>
 ---
  configure.ac                       |  18 +-
- src/fuser.c                        | 644 ++++++++++++++++++++++++++++---------
+ src/fuser.c                        | 647 ++++++++++++++++++++++++++++---------
  src/fuser.h                        |  27 +-
  testsuite/Makefile.am              |   3 +-
  testsuite/killall.test/killall.exp |   4 +
- 5 files changed, 543 insertions(+), 153 deletions(-)
+ 5 files changed, 546 insertions(+), 153 deletions(-)
 
 diff --git configure.ac configure.ac
 index 176a2fc..d8d3366 100644
@@ -66,7 +67,7 @@
  dnl Checks for typedefs, structures, and compiler characteristics.
  AC_C_CONST
 diff --git src/fuser.c src/fuser.c
-index c44cee8..7ee9b49 100644
+index c44cee8..48d52d0 100644
 --- src/fuser.c
 +++ src/fuser.c
 @@ -32,6 +32,10 @@
@@ -248,9 +249,9 @@
        dev_tmp->name = this_name;
        dev_tmp->device = device;
 +      dev_tmp->mnt_id = this_name->mnt_id;
++      dev_tmp->vol = NULL;
 +      if (dev_tmp->device != subvol)
 +              add_subvol(&dev_tmp->vol, subvol, this_name->mnt_id);
-+      else    dev_tmp->vol = NULL;
        dev_tmp->next = dev_head;
        *dev_list = dev_tmp;
  }
@@ -713,7 +714,7 @@
  {
        list_t *ptr, *tmp;
  
-@@ -2018,72 +2202,244 @@ static void clear_mntinfo(void)
+@@ -2018,72 +2202,247 @@ static void clear_mntinfo(void)
        }
  }
  
@@ -757,8 +758,11 @@
 +              struct stat st;
 +              mntinf = add_mntinfo(mpoint, type, mid, parid, makedev(maj, 
min));
 +              if (mntinf && strncmp(devname, "/dev/", 5) == 0 && 
stat(devname, &st) == 0) {
-+                      if (st.st_rdev != 0 && mntinf->dev != st.st_rdev)
++                      if (st.st_rdev != 0 && mntinf->dev != st.st_rdev) {
 +                              mntinf->vol = st.st_rdev;
++                              stat(mpoint, &st);
++                              mntinf->dev = st.st_dev;        /* stat(2) on 
binary does not see subvol dev */
++                      }
                }
 -              append(mnt, mntinfo);
 -              mnt->mpoint = ((char *)mnt) + alignof(mntinfo_t);
@@ -1002,7 +1006,7 @@
  /*
   * Determine device of links below /proc/
   */
-@@ -2091,8 +2447,7 @@ static int mntstat(const char *path, struct stat *buf)
+@@ -2091,8 +2450,7 @@ static int mntstat(const char *path, struct stat *buf)
  {
        char name[PATH_MAX + 1];
        const char *use;
@@ -1012,7 +1016,7 @@
  
        if ((use = realpath(path, name)) == NULL || *use != '/')
        {
-@@ -2104,27 +2459,26 @@ static int mntstat(const char *path, struct stat *buf)
+@@ -2104,27 +2462,26 @@ static int mntstat(const char *path, struct stat *buf)
                errno = 0;
                return stat(path, buf);
        }

++++++ 0002-Use-new-statx-2-system-call-to-avoid-hangs-on-NFS.patch ++++++
--- /var/tmp/diff_new_pack.Sh7V2M/_old  2018-12-10 12:21:54.482911903 +0100
+++ /var/tmp/diff_new_pack.Sh7V2M/_new  2018-12-10 12:21:54.482911903 +0100
@@ -90,7 +90,7 @@
  # Enable hardened compile and link flags
  AC_ARG_ENABLE([harden_flags],
 diff --git src/fuser.c src/fuser.c
-index 7ee9b49..3f512de 100644
+index 48d52d0..f824581 100644
 --- src/fuser.c
 +++ src/fuser.c
 @@ -63,7 +63,7 @@
@@ -235,7 +235,38 @@
                        continue;
                }
                /* Scan the devices */
-@@ -2296,7 +2291,7 @@ out:
+@@ -2225,10 +2220,10 @@ init_mntinfo(void)
+               &mid, &parid, &maj, &min, &mpoint[0], &type[0], &devname[0]) == 
7) {
+               struct stat st;
+               mntinf = add_mntinfo(mpoint, type, mid, parid, makedev(maj, 
min));
+-              if (mntinf && strncmp(devname, "/dev/", 5) == 0 && 
stat(devname, &st) == 0) {
++              if (mntinf && strncmp(devname, "/dev/", 5) == 0 && 
statn(devname, 0, &st) == 0) {
+                       if (st.st_rdev != 0 && mntinf->dev != st.st_rdev) {
+                               mntinf->vol = st.st_rdev;
+-                              stat(mpoint, &st);
++                              statn(mpoint, 0, &st);
+                               mntinf->dev = st.st_dev;        /* stat(2) on 
binary does not see subvol dev */
+                       }
+               }
+@@ -2240,7 +2235,7 @@ init_mntinfo(void)
+       parid = -1;
+       while (fscanf (mnt, "%s %s %s %*[^\n]", &devname[0], &mpoint[0], 
&type[0]) == 3) {
+               struct stat st;
+-              if (stat(mpoint, &st) != 0) {
++              if (statn(mpoint, 0, &st) != 0) {
+                       if (errno != EACCES) {
+                               fprintf(stderr, _("Cannot stat %s: %s\n"),
+                                       mnt->mpoint, strerror(errno));
+@@ -2249,7 +2244,7 @@ init_mntinfo(void)
+                       st.st_dev = (dev_t)-1;
+               }
+               mntinf = add_mntinfo(mpoint, type, mid++, parid, st.st_dev);
+-              if (mntinf && strncmp(devname, "/dev/", 5) == 0 && 
stat(devname, &st) == 0) {
++              if (mntinf && strncmp(devname, "/dev/", 5) == 0 && 
statn(devname, 0, &st) == 0) {
+                       if (st.st_rdev != 0 && mntinf->dev != st.st_rdev)
+                               mntinf->vol = st.st_rdev;
+               }
+@@ -2299,7 +2294,7 @@ out:
                struct stat lst;
  
                snprintf(pathname, 256, "/proc/%d/fd/%s", pid, fd);
@@ -244,7 +275,25 @@
                        if (lst.st_mode & S_IWUSR)
                                info->flags |= O_WRONLY;
                        ret++;
-@@ -2439,49 +2434,6 @@ out:
+@@ -2372,7 +2367,7 @@ find_mountpoint(const char *path, mntinfo_t **mountinfo)
+ 
+                       /* could be a chroot or a container */
+ 
+-                      if (stat(path, &st) != 0) {
++                      if (statn(path, 0, &st) != 0) {
+                               if (errno != EACCES) {
+                                       fprintf(stderr, _("Cannot stat %s: 
%s\n"),
+                                               path, strerror(errno));
+@@ -2404,7 +2399,7 @@ find_mountpoint(const char *path, mntinfo_t **mountinfo)
+ 
+                                       /* could be a chroot or a container */
+ 
+-                                      if (stat(use, &st) != 0) {
++                                      if (statn(use, 0, &st) != 0) {
+                                               if (errno != EACCES) {
+                                                       fprintf(stderr, 
_("Cannot stat %s: %s\n"),
+                                                               use, 
strerror(errno));
+@@ -2442,49 +2437,6 @@ out:
        return ret;
  }
  
@@ -296,10 +345,10 @@
   * it avoids lstat(2) system calls.
 diff --git src/statx.c src/statx.c
 new file mode 100644
-index 0000000..2554da7
+index 0000000..a598c89
 --- /dev/null
 +++ src/statx.c
-@@ -0,0 +1,147 @@
+@@ -0,0 +1,149 @@
 +/*
 + * statx.c - Map modern statx(2) system call to older stat(2), lstat(2),
 + *         and fstat(2) replacements named {,l,f}statn()
@@ -333,10 +382,12 @@
 +# include <linux/fcntl.h>     /* Definition of AT_* and AT_STATX_* constants 
! */
 +#endif
 +#include <fcntl.h>            /* Definition of AT_* constants */
++#include <sys/stat.h>
 +#ifndef HAVE_STATX
-+# include <linux/stat.h>      /* Provides 'struct statx' and STATX_* ! */
++# ifndef STATX_TYPE
++#  include <linux/stat.h>     /* Provides 'struct statx' and STATX_* ! */
++# endif
 +#endif
-+#include <sys/stat.h>
 +#include <sys/sysmacros.h>
 +#include <sys/syscall.h>
 +#include <sys/types.h>
@@ -449,10 +500,10 @@
 +}
 diff --git src/statx.h src/statx.h
 new file mode 100644
-index 0000000..bc9eda7
+index 0000000..fdd0137
 --- /dev/null
 +++ src/statx.h
-@@ -0,0 +1,66 @@
+@@ -0,0 +1,68 @@
 +/*
 + * statx.h - Map modern statx(2) system call to older stat(2), lstat(2),
 + *           and fstat(2) replacements named {,l,f}statn()
@@ -482,7 +533,9 @@
 +# ifndef HAVE_STATX
 +#  define _ASM_GENERIC_FCNTL_H        /* Avoid collisions between asm/fcntl.h 
and bits/fcntl.h ! */
 +#  include <linux/fcntl.h>    /* Definition of AT_* and AT_STATX_* constants 
! */
-+#  include <linux/stat.h>     /* Provides 'struct statx' and STATX_* ! */
++#  ifndef STATX_TYPE
++#   include <linux/stat.h>    /* Provides 'struct statx' and STATX_* ! */
++#  endif
 +# endif
 +extern int statn(const char*, unsigned int, struct stat*);
 +extern int fstatn(int, unsigned int, struct stat*);
@@ -948,6 +1001,3 @@
 -#endif
 -
 -#endif
--- 
-2.16.4
-


Reply via email to