diff --git a/SOURCES/fix-parse_affinity-for-CPU-numbers-greater-than-31.patch b/SOURCES/fix-parse_affinity-for-CPU-numbers-greater-than-31.patch index 634cb1e2..35990838 100644 --- a/SOURCES/fix-parse_affinity-for-CPU-numbers-greater-than-31.patch +++ b/SOURCES/fix-parse_affinity-for-CPU-numbers-greater-than-31.patch @@ -21,13 +21,13 @@ index 18645c0ba45e..0e7c24f45cda 100755 --- a/procfs/utilist.py +++ b/procfs/utilist.py @@ -37,18 +37,14 @@ def hexbitmask(l, nr_entries): - return hexbitmask - + return hexbitmask + def bitmasklist(line, nr_entries): - fields = line.strip().split(",") + hexmask = line.strip().replace(",", "") - bitmasklist = [] - entry = 0 + bitmasklist = [] + entry = 0 - for i in range(len(fields) - 1, -1, -1): - mask = int(fields[i], 16) - while mask != 0: @@ -42,8 +42,9 @@ index 18645c0ba45e..0e7c24f45cda 100755 + if int(i) & 1: + bitmasklist.append(entry) + entry +=1 - if entry == nr_entries: - break - return bitmasklist --- + if entry == nr_entries: + break + return bitmasklist +-- 2.4.11 + diff --git a/SOURCES/pidstats-fix-documentation-indentation.patch b/SOURCES/pidstats-fix-documentation-indentation.patch index b9a4dec4..0d5ba0a4 100644 --- a/SOURCES/pidstats-fix-documentation-indentation.patch +++ b/SOURCES/pidstats-fix-documentation-indentation.patch @@ -14,9 +14,9 @@ index 3d683c1ec5c6..0706fbc3debd 100755 --- a/procfs/procfs.py +++ b/procfs/procfs.py @@ -412,20 +412,20 @@ class pidstats: - return key in self.processes - - def reload(self): + return key in self.processes + + def reload(self): - """ - This operation will trow away the current dictionary contents, if any, and - read all the pid files from /proc/, instantiating a 'process' instance for @@ -25,25 +25,26 @@ index 3d683c1ec5c6..0706fbc3debd 100755 + This operation will throw away the current dictionary contents, if any, and + read all the pid files from /proc/, instantiating a 'process' instance for + each of them. - + - This is a high overhead operation, and should be avoided if the perf python - binding can be used to detect when new threads appear and existing ones - terminate. + This is a high overhead operation, and should be avoided if the perf python + binding can be used to detect when new threads appear and existing ones + terminate. - + - In RHEL it is found in the python-perf rpm package. + In RHEL it is found in the python-perf rpm package. - + - More information about the perf facilities can be found in the 'perf_event_open' - man page. - """ + More information about the perf facilities can be found in the 'perf_event_open' + man page. + """ - del self.processes - self.processes = {} - pids = os.listdir(self.basedir) --- + del self.processes + self.processes = {} + pids = os.listdir(self.basedir) +-- 2.4.3 + diff --git a/SPECS/python-linux-procfs.spec b/SPECS/python-linux-procfs.spec index 8ce9744c..cc813412 100644 --- a/SPECS/python-linux-procfs.spec +++ b/SPECS/python-linux-procfs.spec @@ -3,16 +3,20 @@ Name: python-linux-procfs Version: 0.4.9 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 Summary: Linux /proc abstraction classes Group: System Environment/Libraries -Source: http://userweb.kernel.org/~acme/python-linux-procfs/%{name}-%{version}.tar.bz2 +URL: https://git.kernel.org/pub/scm/libs/python/python-linux-procfs/python-linux-procfs.git +# If upstream does not provide tarballs, to generate +# git clone git://git.kernel.org/pub/scm/libs/python/python-linux-procfs/python-linux-procfs.git +# cd python-linux-procfs +# git archive --format=tar --prefix=python-linux-procfs-%%{version}/ v%%{version} | bzip2 -c > python-linux-procfs-%%{version}.tar.bz2 +Source: https://git.kernel.org/pub/scm/libs/python/python-linux-procfs/python-linux-procfs.git/snapshot/%{name}-%{version}.tar.bz2 Patch1: pidstats-fix-documentation-indentation.patch Patch2: fix-parse_affinity-for-CPU-numbers-greater-than-31.patch -URL: http://userweb.kernel.org/~acme/python-linux-procfs BuildArch: noarch BuildRequires: python-devel BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) @@ -48,6 +52,10 @@ rm -rf %{buildroot} %doc COPYING %changelog +* Thu May 31 2018 John Kacur - 0.4.9-4 +- Fix upstream URL reference and source +Resolves: rhbz#1583961 + * Wed Aug 24 2016 John Kacur - 0.4.9-3 - fix parse_affinity for CPU numbers greater than 31 Resolves: rhbz#1365902