Compare commits

..

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

4 changed files with 74 additions and 78 deletions

2
.gitignore vendored
View File

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

View File

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

View File

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