Compare commits

...

No commits in common. "imports/c9-beta/python-linux-procfs-0.6.3-3.el9" and "c8" have entirely different histories.

4 changed files with 78 additions and 74 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/python-linux-procfs-0.6.3.tar.xz
SOURCES/python-linux-procfs-0.7.3.tar.xz

View File

@ -1 +1 @@
99ff8644d17abacf9b63d81693b6330b429f0d32 SOURCES/python-linux-procfs-0.6.3.tar.xz
cadcfaacbea308c70b25a4ae83177f7c669a56b7 SOURCES/python-linux-procfs-0.7.3.tar.xz

View File

@ -1,33 +0,0 @@
From 7570fc0d6082cb476c32233c2904214dd57737a8 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Fri, 19 Nov 2021 16:03:22 -0500
Subject: [PATCH] python-linux-procfs: Fix traceback with non-utf8 chars in the
/proc/PID/cmdline
Fix traceback if there are non-utf8 characters in the /proc/PID/cmdline
Signed-off-by: John Kacur <jkacur@redhat.com>
---
procfs/procfs.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/procfs/procfs.py b/procfs/procfs.py
index 3b7474cccb01..408b2bcd0a31 100755
--- a/procfs/procfs.py
+++ b/procfs/procfs.py
@@ -357,9 +357,9 @@ class process:
return hasattr(self, attr)
def load_cmdline(self):
- f = open("/proc/%d/cmdline" % self.pid)
- self.cmdline = f.readline().strip().split('\0')[:-1]
- f.close()
+ with open("/proc/%d/cmdline" % self.pid, mode='rb') as f:
+ cmdline = f.readline().decode(encoding='unicode_escape')
+ self.cmdline = cmdline.strip().split('\0')[:-1]
def load_threads(self):
self.threads = pidstats("/proc/%d/task/" % self.pid)
--
2.31.1

View File

@ -1,19 +1,20 @@
Name: python-linux-procfs
Version: 0.6.3
Release: 3%{?dist}
Version: 0.7.3
Release: 1%{?dist}
License: GPLv2
Summary: Linux /proc abstraction classes
Group: System Environment/Libraries
URL: https://git.kernel.org/pub/scm/libs/python/%{name}/%{name}.git
Source: https://www.kernel.org/pub/software/libs/python/%{name}/%{name}-%{version}.tar.xz
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%global _description\
Abstractions to extract information from the Linux kernel /proc files.
# PATCHES
Patch1: python-linux-procfs-Fix-traceback-with-non-utf8-char.patch
%description %_description
@ -44,57 +45,93 @@ rm -rf %{buildroot}
%license COPYING
%changelog
* Mon Nov 22 2021 John Kacur <jkacur@redhat.com> - 0.6.3-3
* Fri Nov 10 2023 John Kacur <jkacur@redhat.com> - 0.7.3-1
- Rebase to upstream python-linux-procfs-0.7.3
- This rebase removes upstream spec files and
- syncs the git tag with version
Resolves: RHEL-9195
* Thu Oct 26 2023 John Kacur <jkacur@redhat.com> - 0.7.2-1
Rebase to python-linux-procfs - 0.7.2
Resolves: RHEL-8987
* Fri Nov 18 2022 John Kacur <jkacur@redhat.com> - 0.7.1-1
- Rebase to upstream version python-linux-procfs-0.7.1
Resolves: rhbz#2121522
* Tue Jan 11 2022 John Kacur <jkacur@redhat.com> - 0.7.0-1
- Rebase to upstream version python-linux-procfs-0.7.0
Resolves: rhbz#2031158
* Thu Dec 09 2021 John Kacur <jkacur@redhat.com> - 0.6.3-4
- various clean-ups including using 'with' context managers in try-except
- Fix to ignore UnicodeDecodeError when it occurs
Resolves: rhbz#2016204
* Tue Nov 23 2021 John Kacur <jkacur@redhat.com> - 0.6.3-3
- Propagate error to user if pid completed
- Handle pid completed in pflags
Resolves: rhbz#1820709
* Fri Nov 19 2021 John Kacur <jkacur@redhat.com> - 0.6.3-2
- Fix traceback with non-utf8 chars
Resolves: rhbz#2022530
Resolves: rhbz#2016204
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 0.6.3-2
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Thu May 27 2021 John Kacur <jkacur@redhat.com> - 0.6.3-1
* Tue Jan 12 2021 John Kacur <jkacur@redhat.com> - 0.6.3-1
- Rebase to latest upstream
Resolves: rhbz#1890564
- Correct URL and Source
- Simplify specfile
Resolves: rhbz#1890557
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.6.1-10
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Wed Jun 24 2020 John Kacur <jkacur@redhat.com> - 0.6.2-2
Resolves: rhbz#1850391
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Jun 22 2020 John Kacur <jkacur@redhat.com> - 0.6.2-1
- Add bitmasklist_test
- Clean-ups including using a more modern python spacing, tabbing, etc
- Fix to parse number of cpus correctly on s390(x)
Resolves: rhbz#1849215
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Apr 03 2019 Clark Williams <williams@redhat.com> - 0.6-7
- OSCI gating framework added
Resolves: rhbz#1682424
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.6.1-7
- Rebuilt for Python 3.9
* Mon Jan 28 2019 John Kacur <jkacur@redhat.com> - 0.6-6
- fix refreshing the cache
- fix removing vanished processes in pidstats
Resolves: rhbz#1669294
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Nov 30 2018 John Kacur <jkacur@redhat.com> - 0.6-5
- pflags - Ignore non-existent pids or process names
Resolves: rhbz#1654312
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.6.1-5
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Wed Nov 28 2018 John Kacur <jkacur@redhat.com> - 0.6-4
- Use argparse to create a help option
Resolves: rhbz#1650159
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.6.1-4
- Rebuilt for Python 3.8
* Tue Oct 16 2018 John Kacur <jkacur@redhat.com> - 0.6-3
- python3 doesn't supply "reduce" by default, so import it
Resolves: rhbz#1639430
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Mon Aug 13 2018 John Kacur <jkacur@redhat.com> - 0.6-2
- Obsoltes python-linux-procfs (just build the python3 version)
Resolves: rhbz#1589042
* Mon Feb 25 2019 Miro Hrončok <mhroncok@redhat.com> - 0.6.1-2
- Subpackage python2-linux-procfs has been removed
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
* Fri Aug 10 2018 John Kacur <jkacur@redhat.com> - 0.6-1
- Sync with upstream source
Resolves: rhbz#1614869
* Tue Feb 5 2019 Jiri Kastner <jkastner@redhat.com> - 0.6.1-1
- update to 0.6.1
* Wed Aug 8 2018 John Kacur <jkacur@redhat.com> - 0.5.1-7
- Add some functions related to affinity from tuna
Resolves: rhbz#1522868
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Jun 26 2018 John Kacur <jkacur@redhat.com> - 0.5.1-6
- Fix upstream URL reference and source
Resolves: rhbz#1589938
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.5.1-5
- Rebuilt for Python 3.7
* Thu May 31 2018 John Kacur <jkacur@redhat.com> - 0.5.1-5
- Build only the python3 subpackage (needs to be done in rhel-8.0 too)
Resolves: rhbz#1567234
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild