From be69f31f80e424351e12a1ff8521eae164de5a52 Mon Sep 17 00:00:00 2001 From: AlmaLinux RelEng Bot Date: Mon, 30 Mar 2026 10:56:07 -0400 Subject: [PATCH] import CS python-linux-procfs-0.7.4-2.el9 --- .gitignore | 2 +- .python-linux-procfs.metadata | 2 +- ...Add-setup.py-for-older-distributions.patch | 79 +++++++++++++++++++ SPECS/python-linux-procfs.spec | 18 ++++- 4 files changed, 95 insertions(+), 6 deletions(-) create mode 100644 SOURCES/python-linux-procfs-Add-setup.py-for-older-distributions.patch diff --git a/.gitignore b/.gitignore index 85a5413..86a749e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/python-linux-procfs-0.7.3.tar.xz +SOURCES/python-linux-procfs-0.7.4.tar.xz diff --git a/.python-linux-procfs.metadata b/.python-linux-procfs.metadata index 1c78336..0a00f6b 100644 --- a/.python-linux-procfs.metadata +++ b/.python-linux-procfs.metadata @@ -1 +1 @@ -cadcfaacbea308c70b25a4ae83177f7c669a56b7 SOURCES/python-linux-procfs-0.7.3.tar.xz +8f1e7322061bdbd2d0cb4b5aaca528010f12a23a SOURCES/python-linux-procfs-0.7.4.tar.xz diff --git a/SOURCES/python-linux-procfs-Add-setup.py-for-older-distributions.patch b/SOURCES/python-linux-procfs-Add-setup.py-for-older-distributions.patch new file mode 100644 index 0000000..cd6409a --- /dev/null +++ b/SOURCES/python-linux-procfs-Add-setup.py-for-older-distributions.patch @@ -0,0 +1,79 @@ +From db0befabfdecefc8ba3ef8f86d0704a5cf7ace9f Mon Sep 17 00:00:00 2001 +From: John Kacur +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 +Signed-off-by: John Kacur +--- + 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 + diff --git a/SPECS/python-linux-procfs.spec b/SPECS/python-linux-procfs.spec index 71dad54..84d541b 100644 --- a/SPECS/python-linux-procfs.spec +++ b/SPECS/python-linux-procfs.spec @@ -1,6 +1,6 @@ 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 URL: https://git.kernel.org/pub/scm/libs/python/%{name}/%{name}.git @@ -13,6 +13,7 @@ BuildRequires: python3-setuptools Abstractions to extract information from the Linux kernel /proc files. # PATCHES +Patch0: python-linux-procfs-Add-setup.py-for-older-distributions.patch %description %_description @@ -28,11 +29,11 @@ Requires: python3 %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) @@ -43,6 +44,15 @@ rm -rf %{buildroot} %license COPYING %changelog +* Sun Nov 24 2025 John Kacur - 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 - 0.7.4-1 +- Rebase to upstream python-linux-procfs-0.7.4 +Resolves: RHEL-119895 + * Fri Nov 10 2023 John Kacur - 0.7.3-1 - Rebase to upstream python-linux-procfs-0.7.3 - This rebase removes upstream spec files and