Compare commits

...

No commits in common. "c8" and "imports/c10s/python-linux-procfs-0.7.3-6.el10" have entirely different histories.

8 changed files with 191 additions and 78 deletions

13
.gitignore vendored
View File

@ -1 +1,12 @@
SOURCES/python-linux-procfs-0.7.3.tar.xz *.swp
python-linux-procfs-0.4.4.tar.bz2
/python-linux-procfs-0.4.6.tar.bz2
/python-linux-procfs-0.4.5.tar.bz2
/python-linux-procfs-0.4.6.tar.xz
/python-linux-procfs-0.4.10.tar.xz
/python-linux-procfs-0.5.1.tar.xz
/python-linux-procfs-0.6.1.tar.xz
/python-linux-procfs-0.6.3.tar.xz
/python-linux-procfs-0.7.0.tar.xz
/python-linux-procfs-0.7.1.tar.xz
/python-linux-procfs-0.7.3.tar.xz

View File

@ -1 +0,0 @@
cadcfaacbea308c70b25a4ae83177f7c669a56b7 SOURCES/python-linux-procfs-0.7.3.tar.xz

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-10
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View File

@ -1,21 +1,24 @@
%if 0%{?fedora}
%else
%global without_python3 1
%endif
Name: python-linux-procfs Name: python-linux-procfs
Version: 0.7.3 Version: 0.7.3
Release: 1%{?dist} Release: 6%{?dist}
License: GPLv2 License: GPL-2.0-only
Summary: Linux /proc abstraction classes Summary: Linux /proc abstraction classes
Group: System Environment/Libraries Source: https://cdn.kernel.org/pub/software/libs/python/%{name}/%{name}-%{version}.tar.xz
URL: https://git.kernel.org/pub/scm/libs/python/%{name}/%{name}.git URL: https://rt.wiki.kernel.org/index.php/Tuna
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)
# Patches
%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
%description %_description %description %_description
%package -n python3-linux-procfs %package -n python3-linux-procfs
@ -45,93 +48,100 @@ rm -rf %{buildroot}
%license COPYING %license COPYING
%changelog %changelog
* Fri Nov 10 2023 John Kacur <jkacur@redhat.com> - 0.7.3-1 * Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 0.7.3-6
- Rebase to upstream python-linux-procfs-0.7.3 - Bump release for June 2024 mass rebuild
- 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 * Tue Mar 26 2024 John Kacur <jkacur@redhat.com> - 0.7.3-5
Rebase to python-linux-procfs - 0.7.2 - Add gating.yaml
Resolves: RHEL-8987 - Add tests dir
Resolves: RHEL-30433
* Fri Nov 18 2022 John Kacur <jkacur@redhat.com> - 0.7.1-1 * Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.3-4
- Rebase to upstream version python-linux-procfs-0.7.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
Resolves: rhbz#2121522
* Tue Jan 11 2022 John Kacur <jkacur@redhat.com> - 0.7.0-1 * Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.3-3
- Rebase to upstream version python-linux-procfs-0.7.0 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
Resolves: rhbz#2031158
* Thu Dec 09 2021 John Kacur <jkacur@redhat.com> - 0.6.3-4 * Sat Dec 02 2023 John Kacur <jkacur@redhat.com> - 0.7.3-2
- various clean-ups including using 'with' context managers in try-except - Update the SPDX license tag in the specfile
- Fix to ignore UnicodeDecodeError when it occurs
Resolves: rhbz#2016204
* Tue Nov 23 2021 John Kacur <jkacur@redhat.com> - 0.6.3-3 * Sat Dec 02 2023 John Kacur <jkacur@redhat.com> - 0.7.3-1
- Propagate error to user if pid completed - Update to the latest upstream version v0.7.3
- Handle pid completed in pflags - Use an SPDX license tag in the specfile
Resolves: rhbz#1820709
* Fri Nov 19 2021 John Kacur <jkacur@redhat.com> - 0.6.3-2 * Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-3
- Fix traceback with non-utf8 chars - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Resolves: rhbz#2016204
* Tue Jan 12 2021 John Kacur <jkacur@redhat.com> - 0.6.3-1 * Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 0.7.1-2
- Rebase to latest upstream - Rebuilt for Python 3.12
- Correct URL and Source
- Simplify specfile
Resolves: rhbz#1890557
* Wed Jun 24 2020 John Kacur <jkacur@redhat.com> - 0.6.2-2 * Thu Feb 16 2023 John Kacur <jkacur@redhat.com> - 0.7.1-1
Resolves: rhbz#1850391 - Rebase to 0.7.1 upstream
- Add upstream patch to remove use of distutils
* Mon Jun 22 2020 John Kacur <jkacur@redhat.com> - 0.6.2-1 * Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-6
- Add bitmasklist_test - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_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 * Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-5
- OSCI gating framework added - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Resolves: rhbz#1682424
* Mon Jan 28 2019 John Kacur <jkacur@redhat.com> - 0.6-6 * Thu Jul 07 2022 Jiri Kastner <jkastner@fedoraproject.org> - 0.7.0-4
- fix refreshing the cache - Rebuilt for Python 3.11 - episodfe ii
- fix removing vanished processes in pidstats
Resolves: rhbz#1669294
* Fri Nov 30 2018 John Kacur <jkacur@redhat.com> - 0.6-5 * Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.7.0-3
- pflags - Ignore non-existent pids or process names - Rebuilt for Python 3.11
Resolves: rhbz#1654312
* Wed Nov 28 2018 John Kacur <jkacur@redhat.com> - 0.6-4 * Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-2
- Use argparse to create a help option - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Resolves: rhbz#1650159
* Tue Oct 16 2018 John Kacur <jkacur@redhat.com> - 0.6-3 * Tue Jan 11 2022 Federico Pellegrin <fede@evolware.org> - 0.7.0-1
- python3 doesn't supply "reduce" by default, so import it - update to 0.7.0 (various fixes and cleanups)
Resolves: rhbz#1639430
* Mon Aug 13 2018 John Kacur <jkacur@redhat.com> - 0.6-2 * Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.3-3
- Obsoltes python-linux-procfs (just build the python3 version) - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Resolves: rhbz#1589042
* Fri Aug 10 2018 John Kacur <jkacur@redhat.com> - 0.6-1 * Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.6.3-2
- Sync with upstream source - Rebuilt for Python 3.10
Resolves: rhbz#1614869
* Wed Aug 8 2018 John Kacur <jkacur@redhat.com> - 0.5.1-7 * Fri May 28 2021 Jiri Kastner <jkastner@fedoraproject.org> - 0.6.3-1
- Add some functions related to affinity from tuna - update to 0.6.3
Resolves: rhbz#1522868
* Tue Jun 26 2018 John Kacur <jkacur@redhat.com> - 0.5.1-6 * Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-9
- Fix upstream URL reference and source - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Resolves: rhbz#1589938
* Thu May 31 2018 John Kacur <jkacur@redhat.com> - 0.5.1-5 * Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-8
- Build only the python3 subpackage (needs to be done in rhel-8.0 too) - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Resolves: rhbz#1567234
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.6.1-7
- Rebuilt for Python 3.9
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.6.1-5
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.6.1-4
- Rebuilt for Python 3.8
* 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 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
* Tue Feb 5 2019 Jiri Kastner <jkastner@redhat.com> - 0.6.1-1
- update to 0.6.1
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* 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
* 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

View File

@ -0,0 +1,57 @@
From 6862fbced61b192980b804927f98a8dc568630a5 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Thu, 16 Feb 2023 11:03:59 -0500
Subject: [PATCH] python_linux_procfs: setup.py: Remove distutils
distutils is deprecated, so use sysconfig instead
different versions of python produce different results, which is why
we test which SCHEME is available before calculating our answer.
TODO: test whether we need to calculate PYTHONLIB at all. Is it being
used during the setup? We don't appear to be using a --prefix from our
specfiles. This patch ensures that if it is used, we are getting a
correct PYTHONLIB without using distutils, but perhaps we can just drop
this section.
We need to bump the version number as well here, it looks like it was
missed the last time.
Signed-off-by: John Kacur <jkacur@redhat.com>
---
setup.py | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/setup.py b/setup.py
index 0ee543487c31..92e6363abb4b 100755
--- a/setup.py
+++ b/setup.py
@@ -1,17 +1,21 @@
#!/usr/bin/python3
import os
-from os.path import isfile, join
-from distutils.sysconfig import get_python_lib
+from os.path import isfile, relpath
+import sysconfig
from setuptools import setup
if isfile("MANIFEST"):
os.unlink("MANIFEST")
+SCHEME = 'rpm_prefix'
+if not SCHEME in sysconfig.get_scheme_names():
+ SCHEME = 'posix_prefix'
+
# Get PYTHONLIB with no prefix so --prefix installs work.
-PYTHONLIB = join(get_python_lib(standard_lib=1, prefix=''), 'site-packages')
+PYTHONLIB = relpath(sysconfig.get_path('platlib', SCHEME), '/usr')
setup(name="python-linux-procfs",
- version = "0.7.0",
+ version = "0.7.1",
description = "Linux /proc abstraction classes",
author = "Arnaldo Carvalho de Melo",
author_email = "acme@redhat.com",
--
2.39.1

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (python-linux-procfs-0.7.3.tar.xz) = c75b82667ac3d4bf6b225185f9d8af1e9bf25de2f5bdd8f02ef052428c069d5cde14ac4e62969f2b78dee78eaa62f1b3d38ecedb5b10fd2d0950345cd95304de

View File

@ -0,0 +1,18 @@
#!/usr/bin/bash
# make sure we have python-linux-procfs installed
if rpm -q --quiet python3-linux-procfs; then
:
else
sudo dnf install -y python3-linux-procfs
if [[ $? != 0 ]]; then
echo "install of python3-linux-procfs failed!"
exit 1
fi
fi
# see if pflags is installed and executable
pflags --help || exit 2
pflags || exit 3
exit 0

11
tests/tests.yml Normal file
View File

@ -0,0 +1,11 @@
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
tests:
- simple:
dir: scripts
run: ./run_tests.sh
required_packages:
- python3-linux-procfs