pgdg-python3-psutil: Inıtial packaging for the PostgreSQL RPM repository to support...
authorDevrim Gunduz <devrim@gunduz.org>
Tue, 20 May 2025 08:19:55 +0000 (11:19 +0300)
committerDevrim Gunduz <devrim@gunduz.org>
Tue, 20 May 2025 08:19:55 +0000 (11:19 +0300)
rpm/redhat/main/common/pgdg-python3-psutil/EL-8/Makefile [new file with mode: 0644]
rpm/redhat/main/common/pgdg-python3-psutil/EL-8/pgdg-python3-psutil.spec [new symlink]
rpm/redhat/main/common/pgdg-python3-psutil/EL-9/Makefile [new file with mode: 0644]
rpm/redhat/main/common/pgdg-python3-psutil/EL-9/pgdg-python3-psutil.spec [new symlink]
rpm/redhat/main/common/pgdg-python3-psutil/main/Makefile [new file with mode: 0644]
rpm/redhat/main/common/pgdg-python3-psutil/main/pgdg-python3-psutil.spec [new file with mode: 0644]

diff --git a/rpm/redhat/main/common/pgdg-python3-psutil/EL-8/Makefile b/rpm/redhat/main/common/pgdg-python3-psutil/EL-8/Makefile
new file mode 100644 (file)
index 0000000..73a3342
--- /dev/null
@@ -0,0 +1,17 @@
+#################################
+# RPM-specific Makefile                #
+# https://yum.postgresql.org   #
+#                              #
+# Devrim Gunduz                        #
+# devrim@gunduz.org            #
+#################################
+
+# Predefined values
+
+ARCH=`rpm --eval "%{_arch}"`
+DIR=`pwd`
+DIST=.rhel8
+SPECFILE="pgdg-python3-psutil.spec"
+
+# Now, include global Makefile
+include ../../../../global/Makefile.global
diff --git a/rpm/redhat/main/common/pgdg-python3-psutil/EL-8/pgdg-python3-psutil.spec b/rpm/redhat/main/common/pgdg-python3-psutil/EL-8/pgdg-python3-psutil.spec
new file mode 120000 (symlink)
index 0000000..42b3cfc
--- /dev/null
@@ -0,0 +1 @@
+../main/pgdg-python3-psutil.spec
\ No newline at end of file
diff --git a/rpm/redhat/main/common/pgdg-python3-psutil/EL-9/Makefile b/rpm/redhat/main/common/pgdg-python3-psutil/EL-9/Makefile
new file mode 100644 (file)
index 0000000..3029de2
--- /dev/null
@@ -0,0 +1,17 @@
+#################################
+# RPM-specific Makefile                #
+# https://yum.postgresql.org   #
+#                              #
+# Devrim Gunduz                        #
+# devrim@gunduz.org            #
+#################################
+
+# Predefined values
+
+ARCH=`rpm --eval "%{_arch}"`
+DIR=`pwd`
+DIST=.rhel9
+SPECFILE="pgdg-python3-psutil.spec"
+
+# Now, include global Makefile
+include ../../../../global/Makefile.global
diff --git a/rpm/redhat/main/common/pgdg-python3-psutil/EL-9/pgdg-python3-psutil.spec b/rpm/redhat/main/common/pgdg-python3-psutil/EL-9/pgdg-python3-psutil.spec
new file mode 120000 (symlink)
index 0000000..42b3cfc
--- /dev/null
@@ -0,0 +1 @@
+../main/pgdg-python3-psutil.spec
\ No newline at end of file
diff --git a/rpm/redhat/main/common/pgdg-python3-psutil/main/Makefile b/rpm/redhat/main/common/pgdg-python3-psutil/main/Makefile
new file mode 100644 (file)
index 0000000..f0255e3
--- /dev/null
@@ -0,0 +1,17 @@
+#################################
+# RPM-specific Makefile                #
+# https://yum.postgresql.org   #
+#                              #
+# Devrim Gunduz                        #
+# devrim@gunduz.org            #
+#################################
+
+# Predefined values
+
+ARCH=`rpm --eval "%{_arch}"`
+DIR=`pwd`
+DIST=.f99
+SPECFILE="pgdg-python3-psutil.spec"
+
+# Now, include global Makefile
+include ../../../../global/Makefile.global
diff --git a/rpm/redhat/main/common/pgdg-python3-psutil/main/pgdg-python3-psutil.spec b/rpm/redhat/main/common/pgdg-python3-psutil/main/pgdg-python3-psutil.spec
new file mode 100644 (file)
index 0000000..02025a3
--- /dev/null
@@ -0,0 +1,63 @@
+%global modname psutil
+
+%if 0%{?fedora} && 0%{?fedora} <= 42
+%global        __ospython %{_bindir}/python3.13
+%global        python3_pkgversion 3.13
+%endif
+%if 0%{?rhel} && 0%{?rhel} <= 10
+%global        __ospython %{_bindir}/python3.12
+%global        python3_pkgversion 3.12
+%endif
+%if 0%{?suse_version} >= 1500
+%global        __ospython %{_bindir}/python3.11
+%global        python3_pkgversion 311
+%endif
+
+%{expand: %%global pybasever %(echo `%{__ospython} -c "import sys; sys.stdout.write(sys.version[:4])"`)}
+
+Name:          python%{python3_pkgversion}-%{modname}
+Version:       6.1.1
+Release:       2PGDG%{?dist}
+Summary:       A process and system utilities module for Python
+
+License:       BSD-3-Clause
+URL:           https://github.com/giampaolo/%{modname}
+Source:                %{url}/archive/release-%{version}/%{modname}-%{version}.tar.gz
+
+BuildRequires: gcc sed python%{python3_pkgversion}-devel
+
+%description
+psutil is a module providing an interface for retrieving information on all
+running processes and system utilization (CPU, memory, disks, network, users) in
+a portable way by using Python, implementing many functionalities offered by
+command line tools such as: ps, top, df, kill, free, lsof, free, netstat,
+ifconfig, nice, ionice, iostat, iotop, uptime, pidof, tty, who, taskset, pmap.
+
+%prep
+%autosetup -p1 -n %{modname}-release-%{version}
+
+# Remove shebangs
+find psutil -name \*.py | while read file; do
+  sed -i.orig -e '1{/^#!/d}' $file && \
+  touch -r $file.orig $file && \
+  %{__rm} $file.orig
+done
+
+%build
+%{__ospython} setup.py build
+
+%install
+%{__ospython} setup.py install --no-compile --root %{buildroot}
+
+%files
+%doc CREDITS HISTORY.rst README.rst
+%exclude %{python3_sitearch}/%{modname}/tests
+%{python3_sitearch}/%{modname}-%{version}-py%{pybasever}.egg-info/*
+%{python3_sitearch}/%{modname}/*.py*
+%{python3_sitearch}/%{modname}/__pycache__/*.py*
+%{python3_sitearch}/%{modname}/*.so
+
+%changelog
+* Fri Jan 24 2025 Yaakov Selkowitz <yselkowi@redhat.com> - 6.1.1-2PGDG
+- Inıtial packaging for the PostgreSQL RPM repository to support Patroni
+  on RHEL 9 and RHEL 8.