Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package perl-Proc-ProcessTable for 
openSUSE:Factory checked in at 2021-08-24 10:54:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Proc-ProcessTable (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Proc-ProcessTable.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Proc-ProcessTable"

Tue Aug 24 10:54:47 2021 rev:15 rq:913824 version:0.611

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/perl-Proc-ProcessTable/perl-Proc-ProcessTable.changes
    2019-06-22 11:24:22.617398360 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-Proc-ProcessTable.new.1899/perl-Proc-ProcessTable.changes
  2021-08-24 10:55:43.816252810 +0200
@@ -1,0 +2,13 @@
+Thu Aug 19 03:07:25 UTC 2021 - Tina M??ller <[email protected]>
+
+- updated to 0.611
+   see /usr/share/doc/packages/perl-Proc-ProcessTable/Changes
+
+  0.60 2021-08-14
+    * compiles on musl
+    * Skip LXC hidden dir in /dev when looking for TTYs
+    * Fix test on OpenBSD
+  0.61 2021-08-18
+    * fixed regression: on linux only 1st char of the command names was parsed
+
+-------------------------------------------------------------------

Old:
----
  Proc-ProcessTable-0.59.tar.gz

New:
----
  Proc-ProcessTable-0.611.tar.gz

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

Other differences:
------------------
++++++ perl-Proc-ProcessTable.spec ++++++
--- /var/tmp/diff_new_pack.v4b8iy/_old  2021-08-24 10:55:44.232252259 +0200
+++ /var/tmp/diff_new_pack.v4b8iy/_new  2021-08-24 10:55:44.236252254 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-Proc-ProcessTable
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,18 +16,16 @@
 #
 
 
+%define cpan_name Proc-ProcessTable
 Name:           perl-Proc-ProcessTable
-Version:        0.59
+Version:        0.611
 Release:        0
 #Upstream: Artistic-2.0
-%define cpan_name Proc-ProcessTable
 Summary:        Perl extension to access the unix process table
 License:        (Artistic-1.0 OR GPL-1.0-or-later) AND GPL-2.0-only
-Group:          Development/Libraries/Perl
-Url:            https://metacpan.org/release/%{cpan_name}
+URL:            https://metacpan.org/release/%{cpan_name}
 Source0:        
https://cpan.metacpan.org/authors/id/J/JW/JWB/%{cpan_name}-%{version}.tar.gz
 Source1:        cpanspec.yml
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  perl
 BuildRequires:  perl-macros
 %{perl_requires}
@@ -36,12 +34,12 @@
 Perl interface to the unix process table.
 
 %prep
-%setup -q -n %{cpan_name}-%{version}
-find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
+%autosetup  -n %{cpan_name}-%{version}
+find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path 
"*/script/*" ! -name "configure" -print0 | xargs -0 chmod 644
 
 %build
 perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
-make %{?_smp_mflags}
+%make_build
 
 %check
 make test
@@ -52,7 +50,6 @@
 %perl_gen_filelist
 
 %files -f %{name}.files
-%defattr(-,root,root,755)
 %doc Changes README README.aix README.bsdi README.cygwin README.darwin 
README.dec_osf README.freebsd-kvm README.freebsd-procfs README.hpux 
README.linux README.md README.MSWin32 README.netbsd README.openbsd 
README.solaris README.sunos README.unixware
 
 %changelog

++++++ Proc-ProcessTable-0.59.tar.gz -> Proc-ProcessTable-0.611.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Proc-ProcessTable-0.59/Changes 
new/Proc-ProcessTable-0.611/Changes
--- old/Proc-ProcessTable-0.59/Changes  2019-06-20 21:33:03.000000000 +0200
+++ new/Proc-ProcessTable-0.611/Changes 2021-08-18 00:49:35.000000000 +0200
@@ -341,3 +341,9 @@
   * works again on AIX
   * fixed mswin32 stuff, hope it works now
   * reogranized code and started to use newest version ExtUtils::MakeMaker
+0.60 2021-08-14
+  * compiles on musl
+  * Skip LXC hidden dir in /dev when looking for TTYs
+  * Fix test on OpenBSD
+0.61 2021-08-18
+  * fixed regression: on linux only 1st char of the command names was parsed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Proc-ProcessTable-0.59/META.json 
new/Proc-ProcessTable-0.611/META.json
--- old/Proc-ProcessTable-0.59/META.json        2019-06-20 21:33:30.000000000 
+0200
+++ new/Proc-ProcessTable-0.611/META.json       2021-08-18 08:56:50.000000000 
+0200
@@ -4,7 +4,7 @@
       "Joachim Bargsten <[email protected]>"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter 
version 2.150010",
+   "generated_by" : "ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter 
version 2.150010",
    "license" : [
       "artistic_2"
    ],
@@ -49,6 +49,6 @@
          "url" : "https://github.com/jwbargsten/perl-proc-processtable";
       }
    },
-   "version" : "0.59",
-   "x_serialization_backend" : "JSON::PP version 2.97001"
+   "version" : "0.611",
+   "x_serialization_backend" : "JSON::PP version 4.04"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Proc-ProcessTable-0.59/META.yml 
new/Proc-ProcessTable-0.611/META.yml
--- old/Proc-ProcessTable-0.59/META.yml 2019-06-20 21:33:30.000000000 +0200
+++ new/Proc-ProcessTable-0.611/META.yml        2021-08-18 08:56:49.000000000 
+0200
@@ -8,7 +8,7 @@
 configure_requires:
   ExtUtils::MakeMaker: '0'
 dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 
2.150010'
+generated_by: 'ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 
2.150010'
 license: artistic_2
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -24,5 +24,5 @@
   perl: '5.006'
 resources:
   repository: https://github.com/jwbargsten/perl-proc-processtable
-version: '0.59'
+version: '0.611'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Proc-ProcessTable-0.59/Makefile.PL 
new/Proc-ProcessTable-0.611/Makefile.PL
--- old/Proc-ProcessTable-0.59/Makefile.PL      2019-06-20 21:31:59.000000000 
+0200
+++ new/Proc-ProcessTable-0.611/Makefile.PL     2021-08-18 00:28:13.000000000 
+0200
@@ -17,7 +17,7 @@
     ABSTRACT_FROM    => 'lib/Proc/ProcessTable.pm',
     LICENSE          => 'artistic_2',
     'LDFROM'    => '$(O_FILES)',
-    'LIBS'     => [''],
+    'LIBS'     => ['-lobstack'],
     'OBJECT'    => 'ProcessTable.o OS.o',
     MIN_PERL_VERSION => '5.006',
     CONFIGURE_REQUIRES => {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Proc-ProcessTable-0.59/README.md 
new/Proc-ProcessTable-0.611/README.md
--- old/Proc-ProcessTable-0.59/README.md        2019-06-14 23:08:25.000000000 
+0200
+++ new/Proc-ProcessTable-0.611/README.md       2021-08-18 00:28:13.000000000 
+0200
@@ -1,6 +1,6 @@
 # Proc::ProcessTable
 
-[![Build 
Status](https://travis-ci.org/jwbargsten/perl-proc-processtable.svg?branch=master)](https://travis-ci.org/jwbargsten/perl-proc-processtable)
 [![Coverage 
Status](https://coveralls.io/repos/github/jwbargsten/perl-proc-processtable/badge.svg?branch=master)](https://coveralls.io/github/jwbargsten/perl-proc-processtable?branch=master)
+[![CircleCI](https://circleci.com/gh/jwbargsten/perl-proc-processtable/tree/master.svg?style=svg)](https://circleci.com/gh/jwbargsten/perl-proc-processtable/tree/master)
 
 Please use github or 
[rt.cpan.org](https://rt.cpan.org/Public/Dist/Display.html?Name=Proc-ProcessTable)
 to submit bugs and patches.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Proc-ProcessTable-0.59/lib/Proc/ProcessTable.pm 
new/Proc-ProcessTable-0.611/lib/Proc/ProcessTable.pm
--- old/Proc-ProcessTable-0.59/lib/Proc/ProcessTable.pm 2019-06-20 
21:32:31.000000000 +0200
+++ new/Proc-ProcessTable-0.611/lib/Proc/ProcessTable.pm        2021-08-18 
08:50:44.000000000 +0200
@@ -18,7 +18,7 @@
 @EXPORT = qw(
     
 );
-$VERSION = '0.59';
+$VERSION = '0.611';
 
 sub AUTOLOAD {
     # This AUTOLOAD is used to 'autoload' constants from the constant()
@@ -152,9 +152,10 @@
 {
   my ($self) = @_;
   undef %Proc::ProcessTable::TTYDEVS;
+  return unless -d "/dev";
   find({ wanted => 
        sub{
-     $File::Find::prune = 1 if -d $_ && ! -x $_;
+     $File::Find::prune = 1 if -d $_ && ( ! -x $_ || $_ eq "/dev/.lxc");
      my($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
         $atime,$mtime,$ctime,$blksize,$blocks) = stat($File::Find::name);
      $Proc::ProcessTable::TTYDEVS{$rdev} = $File::Find::name
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Proc-ProcessTable-0.59/os/Linux.c 
new/Proc-ProcessTable-0.611/os/Linux.c
--- old/Proc-ProcessTable-0.59/os/Linux.c       2019-06-14 23:08:25.000000000 
+0200
+++ new/Proc-ProcessTable-0.611/os/Linux.c      2021-08-18 08:56:13.000000000 
+0200
@@ -304,7 +304,7 @@
 static bool get_proc_stat(char *pid, char *format_str, struct procstat* prs,
     struct obstack *mem_pool)
 {
-    char    *stat_text, *stat_cont, *paren;
+    char    *stat_text, *stat_cont, *close_paren, *open_paren;
     int     result;
     off_t   stat_len;
     long    dummy_l;
@@ -312,34 +312,45 @@
 
     bool    read_ok = true;
 
-    if ((stat_text = read_file(pid, "stat", &stat_len, mem_pool)) == NULL)
+    if ((stat_text = read_file(pid, "stat", &stat_len, mem_pool)) == NULL) {
         return false;
+    }
+
+    if (sscanf(stat_text, "%d (", &prs->pid) != 1) {
+      goto done;
+    }
 
     /* replace the first ')' with a '\0', the contents look like this:
      *    pid (program_name) state ...
      * if we don't find ')' then it's incorrectly formated */
-    if ((paren = strrchr(stat_text, ')')) == NULL) {
+    if ((close_paren = strrchr(stat_text, ')')) == NULL) {
         read_ok = false;
         goto done;
     }
+    *close_paren = '\0';
 
-    *paren = '\0';
-
-    /* scan in pid, and the command, in linux the command is a max of 15 chars
-     * plus a terminating NULL byte; prs->comm will be NULL terminated since
-     * that area of memory is all zerored out when prs is allocated */
-    if (sscanf(stat_text, "%d (%15c", &prs->pid, prs->comm) != 2)
-      /* we might get an empty command name, so check for it:
-       * do the open and close parenteses lie next to each other?
-       * proceed if yes, finish otherwise
-       */
-      if((strchr(stat_text,'(') + 1) != paren)
+    if ((open_paren = strchr(stat_text, '(')) == NULL) {
+        read_ok = false;
         goto done;
+    }
+
+
+    int comm_esize = sizeof(prs->comm) - 1;
+    int comm_len = close_paren - open_paren - 1;
+    if(comm_len > comm_esize) {
+      comm_len = comm_esize;
+    }
+    if(comm_len == 0) {
+      goto done;
+    }
+
+    strncpy(prs->comm, open_paren + 1, comm_esize);
+    prs->comm[comm_esize] = '\0';
 
     /* address at which we pickup again, after the ')'
      * NOTE: we don't bother checking bounds since strchr didn't return NULL
-     * thus the NULL terminator will be at least paren+1, which is ok */
-    stat_cont = paren + 1;
+     * thus the NULL terminator will be at least close_paren+1, which is ok */
+    stat_cont = close_paren + 1;
 
     /* scape the remaining values */
     result = sscanf(stat_cont, " %c %d %d %d %d %d %u %lu %lu %lu %lu %llu"
@@ -393,7 +404,8 @@
      * for the cwd symlink, since on linux the links we care about will never
      * be relative links (cwd, exec)
      * Doing this because readlink works on static buffers */
-    link = canonicalize_file_name(link_file);
+    /* canonicalize_file_name is no good for musl, use realpath instead */
+    link = realpath(link_file, NULL);
 
     /* we no longer need need the path to the link file */
     obstack_free(mem_pool, link_file);
@@ -537,6 +549,7 @@
             prs->state = get_string(UWAIT);
             break;
         case 'T':
+        case 'H': /* GNU Hurd HALTED state */
             prs->state = get_string(STOP);
             break;
         case 'x':
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Proc-ProcessTable-0.59/t/process.t 
new/Proc-ProcessTable-0.611/t/process.t
--- old/Proc-ProcessTable-0.59/t/process.t      2019-06-14 23:08:25.000000000 
+0200
+++ new/Proc-ProcessTable-0.611/t/process.t     2021-08-18 00:28:13.000000000 
+0200
@@ -84,5 +84,6 @@
 { 
   # child, fork returned 0
   # child process will be killed soon
-  sleep 10000;
+  # 10000 seconds may not be soon enough
+  sleep 10;
 }

Reply via email to