Compare commits
No commits in common. "c8" and "c9s" have entirely different histories.
15
.gitignore
vendored
15
.gitignore
vendored
@ -1 +1,14 @@
|
||||
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.2.tar.xz
|
||||
/python-linux-procfs-0.7.3.tar.xz
|
||||
/python-linux-procfs-0.7.4.tar.xz
|
||||
|
||||
@ -1 +0,0 @@
|
||||
cadcfaacbea308c70b25a4ae83177f7c669a56b7 SOURCES/python-linux-procfs-0.7.3.tar.xz
|
||||
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-9
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
||||
@ -0,0 +1,79 @@
|
||||
From db0befabfdecefc8ba3ef8f86d0704a5cf7ace9f Mon Sep 17 00:00:00 2001
|
||||
From: John Kacur <jkacur@redhat.com>
|
||||
Date: Wed, 19 Nov 2025 11:12:44 -0500
|
||||
Subject: [PATCH] python-linux-procfs: Add setup.py for older distributions
|
||||
|
||||
Re-add setup.py to support older distributions that don't understand
|
||||
PEP 517/518 pyproject.toml-based builds. Modern distributions will
|
||||
continue to use pyproject.toml via the pyproject RPM macros.
|
||||
|
||||
Includes PYTHONLIB calculation for proper --prefix install support
|
||||
on RPM-based systems.
|
||||
|
||||
Assisted-By: Claude <noreply@anthropic.com>
|
||||
Signed-off-by: John Kacur <jkacur@redhat.com>
|
||||
---
|
||||
setup.py | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 51 insertions(+)
|
||||
create mode 100644 setup.py
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
new file mode 100644
|
||||
index 000000000000..d048571c3b5c
|
||||
--- /dev/null
|
||||
+++ b/setup.py
|
||||
@@ -0,0 +1,51 @@
|
||||
+#!/usr/bin/python
|
||||
+# SPDX-License-Identifier: GPL-2.0-only
|
||||
+#
|
||||
+# setup.py - Legacy setup script for older distributions
|
||||
+#
|
||||
+# This file provides backwards compatibility for distributions that don't
|
||||
+# support modern pyproject.toml-based builds (PEP 517/518).
|
||||
+# For modern builds, use: pip install .
|
||||
+#
|
||||
+# IMPORTANT: Keep this file in sync with pyproject.toml
|
||||
+
|
||||
+import os
|
||||
+from os.path import isfile, relpath
|
||||
+import sysconfig
|
||||
+from setuptools import setup, find_packages
|
||||
+
|
||||
+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 = relpath(sysconfig.get_path('platlib', SCHEME), '/usr')
|
||||
+
|
||||
+setup(
|
||||
+ name="python-linux-procfs",
|
||||
+ version="0.7.4",
|
||||
+ description="Linux /proc abstraction classes",
|
||||
+ author="Arnaldo Carvalho de Melo, John Kacur",
|
||||
+ author_email="acme@redhat.com, jkacur@redhat.com",
|
||||
+ maintainer="John Kacur",
|
||||
+ maintainer_email="jkacur@redhat.com",
|
||||
+ url="https://www.kernel.org/pub/software/libs/python/python-linux-procfs",
|
||||
+ license="GPL-2.0-only",
|
||||
+ long_description="""\
|
||||
+Abstractions to extract information from the Linux kernel /proc files.
|
||||
+""",
|
||||
+ packages=find_packages(include=["procfs*"]),
|
||||
+ scripts=["pflags"],
|
||||
+ install_requires=[],
|
||||
+ classifiers=[
|
||||
+ "Development Status :: 4 - Beta",
|
||||
+ "Intended Audience :: Developers",
|
||||
+ "License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
|
||||
+ "Operating System :: POSIX :: Linux",
|
||||
+ "Programming Language :: Python :: 3",
|
||||
+ "Topic :: System :: Operating System Kernels :: Linux",
|
||||
+ ],
|
||||
+)
|
||||
--
|
||||
2.51.1
|
||||
|
||||
@ -1,20 +1,19 @@
|
||||
Name: python-linux-procfs
|
||||
Version: 0.7.3
|
||||
Release: 1%{?dist}
|
||||
Version: 0.7.4
|
||||
Release: 2%{?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
|
||||
Patch0: python-linux-procfs-Add-setup.py-for-older-distributions.patch
|
||||
|
||||
%description %_description
|
||||
|
||||
@ -22,7 +21,7 @@ Abstractions to extract information from the Linux kernel /proc files.
|
||||
Summary: %summary
|
||||
%{?python_provide:%python_provide python3-linux-procfs}
|
||||
|
||||
Requires: python3-six
|
||||
Requires: python3
|
||||
|
||||
%description -n python3-linux-procfs %_description
|
||||
|
||||
@ -30,11 +29,11 @@ Requires: python3-six
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
%{__python3} setup.py build
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
%py3_install
|
||||
%{__python3} setup.py install --root=%{buildroot}
|
||||
|
||||
%files -n python3-linux-procfs
|
||||
%defattr(0755,root,root,0755)
|
||||
@ -45,93 +44,94 @@ rm -rf %{buildroot}
|
||||
%license COPYING
|
||||
|
||||
%changelog
|
||||
* Sun Nov 24 2025 John Kacur <jkacur@redhat.com> - 0.7.4-2
|
||||
- Update setup.py for older distributions
|
||||
- Use explicit setup.py build commands
|
||||
Resolves: RHEL-119895
|
||||
|
||||
* Wed Nov 19 2025 John Kacur <jkacur@redhat.com> - 0.7.4-1
|
||||
- Rebase to upstream python-linux-procfs-0.7.4
|
||||
Resolves: RHEL-119895
|
||||
|
||||
* 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
|
||||
Resolves: RHEL-7614
|
||||
|
||||
* 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 Oct 27 2023 John Kacur <jkacur@redhat.com> - 0.7.2-1
|
||||
- Rebase to upstream python-linux-procfs-0.7.2
|
||||
Resolves: RHEL-7864
|
||||
|
||||
* 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
|
||||
Resolves: rhbz#2121520
|
||||
|
||||
* 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
|
||||
Resolves: rhbz#2031156
|
||||
|
||||
* Thu Dec 09 2021 John Kacur <jkacur@redhat.com> - 0.6.3-4
|
||||
* Mon Dec 13 2021 John Kacur <jkacur@redhat.com> - 0.6.3-5
|
||||
- various clean-ups including using 'with' context managers in try-except
|
||||
- Fix to ignore UnicodeDecodeError when it occurs
|
||||
Resolves: rhbz#2016204
|
||||
Resolves: rhbz#2031717
|
||||
|
||||
* Tue Nov 23 2021 John Kacur <jkacur@redhat.com> - 0.6.3-3
|
||||
* Tue Nov 23 2021 John Kacur <jkacur@redhat.com> - 0.6.3-4
|
||||
- Propagate error to user if pid completed
|
||||
- Handle pid completed in pflags
|
||||
Resolves: rhbz#1820709
|
||||
Resolves: rhbz#2012288
|
||||
|
||||
* Fri Nov 19 2021 John Kacur <jkacur@redhat.com> - 0.6.3-2
|
||||
* Mon Nov 22 2021 John Kacur <jkacur@redhat.com> - 0.6.3-3
|
||||
- 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
|
||||
- Correct URL and Source
|
||||
- Simplify specfile
|
||||
Resolves: rhbz#1890557
|
||||
Resolves: rhbz#1890564
|
||||
|
||||
* Wed Jun 24 2020 John Kacur <jkacur@redhat.com> - 0.6.2-2
|
||||
Resolves: rhbz#1850391
|
||||
* 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
|
||||
|
||||
* 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 Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Wed Apr 03 2019 Clark Williams <williams@redhat.com> - 0.6-7
|
||||
- OSCI gating framework added
|
||||
Resolves: rhbz#1682424
|
||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* 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
|
||||
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.6.1-7
|
||||
- Rebuilt for Python 3.9
|
||||
|
||||
* Fri Nov 30 2018 John Kacur <jkacur@redhat.com> - 0.6-5
|
||||
- pflags - Ignore non-existent pids or process names
|
||||
Resolves: rhbz#1654312
|
||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Wed Nov 28 2018 John Kacur <jkacur@redhat.com> - 0.6-4
|
||||
- Use argparse to create a help option
|
||||
Resolves: rhbz#1650159
|
||||
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.6.1-5
|
||||
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
||||
|
||||
* 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
|
||||
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.6.1-4
|
||||
- Rebuilt for Python 3.8
|
||||
|
||||
* Mon Aug 13 2018 John Kacur <jkacur@redhat.com> - 0.6-2
|
||||
- Obsoltes python-linux-procfs (just build the python3 version)
|
||||
Resolves: rhbz#1589042
|
||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Fri Aug 10 2018 John Kacur <jkacur@redhat.com> - 0.6-1
|
||||
- Sync with upstream source
|
||||
Resolves: rhbz#1614869
|
||||
* 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
|
||||
|
||||
* Wed Aug 8 2018 John Kacur <jkacur@redhat.com> - 0.5.1-7
|
||||
- Add some functions related to affinity from tuna
|
||||
Resolves: rhbz#1522868
|
||||
* Tue Feb 5 2019 Jiri Kastner <jkastner@redhat.com> - 0.6.1-1
|
||||
- update to 0.6.1
|
||||
|
||||
* Tue Jun 26 2018 John Kacur <jkacur@redhat.com> - 0.5.1-6
|
||||
- Fix upstream URL reference and source
|
||||
Resolves: rhbz#1589938
|
||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* 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
|
||||
* 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
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
1
sources
Normal file
1
sources
Normal file
@ -0,0 +1 @@
|
||||
SHA512 (python-linux-procfs-0.7.4.tar.xz) = 77bd0cc1d33a930bc63afdd7d72d4e69ec7f343922682e028a6547d53da996d6b89883d7bc8639f367fa6d6e61fd924b13ca11a7d7ae88de25dba7789e280aa4
|
||||
18
tests/scripts/run_tests.sh
Normal file
18
tests/scripts/run_tests.sh
Normal 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
11
tests/tests.yml
Normal 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
|
||||
Loading…
Reference in New Issue
Block a user