pgdg-python3-boto: Initial packaging for the PostgreSQL RPM repository to support...
authorDevrim Gunduz <devrim@gunduz.org>
Tue, 20 May 2025 09:37:41 +0000 (12:37 +0300)
committerDevrim Gunduz <devrim@gunduz.org>
Tue, 20 May 2025 09:37:41 +0000 (12:37 +0300)
rpm/redhat/main/common/pgdg-python3-boto/EL-8/Makefile [new file with mode: 0644]
rpm/redhat/main/common/pgdg-python3-boto/EL-8/pgdg-python3-boto3.spec [new symlink]
rpm/redhat/main/common/pgdg-python3-boto/EL-9/Makefile [new file with mode: 0644]
rpm/redhat/main/common/pgdg-python3-boto/EL-9/pgdg-python3-boto3.spec [new symlink]
rpm/redhat/main/common/pgdg-python3-boto/main/Makefile [new file with mode: 0644]
rpm/redhat/main/common/pgdg-python3-boto/main/pgdg-python3-boto3.spec [new file with mode: 0644]

diff --git a/rpm/redhat/main/common/pgdg-python3-boto/EL-8/Makefile b/rpm/redhat/main/common/pgdg-python3-boto/EL-8/Makefile
new file mode 100644 (file)
index 0000000..f3c0421
--- /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-boto3.spec"
+
+# Now, include global Makefile
+include ../../../../global/Makefile.global
diff --git a/rpm/redhat/main/common/pgdg-python3-boto/EL-8/pgdg-python3-boto3.spec b/rpm/redhat/main/common/pgdg-python3-boto/EL-8/pgdg-python3-boto3.spec
new file mode 120000 (symlink)
index 0000000..59b86dc
--- /dev/null
@@ -0,0 +1 @@
+../main/pgdg-python3-boto3.spec
\ No newline at end of file
diff --git a/rpm/redhat/main/common/pgdg-python3-boto/EL-9/Makefile b/rpm/redhat/main/common/pgdg-python3-boto/EL-9/Makefile
new file mode 100644 (file)
index 0000000..c077c32
--- /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-boto3.spec"
+
+# Now, include global Makefile
+include ../../../../global/Makefile.global
diff --git a/rpm/redhat/main/common/pgdg-python3-boto/EL-9/pgdg-python3-boto3.spec b/rpm/redhat/main/common/pgdg-python3-boto/EL-9/pgdg-python3-boto3.spec
new file mode 120000 (symlink)
index 0000000..59b86dc
--- /dev/null
@@ -0,0 +1 @@
+../main/pgdg-python3-boto3.spec
\ No newline at end of file
diff --git a/rpm/redhat/main/common/pgdg-python3-boto/main/Makefile b/rpm/redhat/main/common/pgdg-python3-boto/main/Makefile
new file mode 100644 (file)
index 0000000..17836fe
--- /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-boto3.spec"
+
+# Now, include global Makefile
+include ../../../../global/Makefile.global
diff --git a/rpm/redhat/main/common/pgdg-python3-boto/main/pgdg-python3-boto3.spec b/rpm/redhat/main/common/pgdg-python3-boto/main/pgdg-python3-boto3.spec
new file mode 100644 (file)
index 0000000..6892585
--- /dev/null
@@ -0,0 +1,77 @@
+%global modname boto3
+
+%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:       1.38.19
+Release:       1PGDG%{?dist}
+Summary:       The AWS SDK for Python
+
+License:       Apache-2.0
+URL:           https://github.com/boto/%{modname}
+Source:                %{url}/archive/%{version}/%{modname}-%{version}.tar.gz
+BuildArch:     noarch
+
+BuildRequires: python%{python3_pkgversion}-devel
+
+# Save space by hardlinking duplicate JSON resource files
+BuildRequires: hardlink
+
+%description
+Boto3 is the Amazon Web Services (AWS) Software Development Kit (SDK) for
+Python, which allows Python developers to write software that makes use of
+services like Amazon S3 and Amazon EC2.}
+
+%prep
+%setup -q -n %{modname}-%{version}
+
+%build
+%{__ospython} setup.py build
+
+%install
+%{__ospython} setup.py install --no-compile --root %{buildroot}
+
+
+# This saves, as of this writing, roughly 300kB in duplicate JSON resource
+# files. Note that rpmlint will complain about cross-directory hardlinks, but
+# that these are not a problem because the contents of a directory owned by
+# this package are guaranteed to be on a single filesystem.
+hardlink -c '%{buildroot}%{python3_sitelib}/%{modname}'
+
+%files
+%doc CHANGELOG.rst
+%doc README.rst
+%license LICENSE
+%{python3_sitelib}/%{modname}-%{version}-py%{pybasever}.egg-info/*
+%{python3_sitelib}/%{modname}/*.py*
+%{python3_sitelib}/%{modname}/__pycache__/*.py*
+%{python3_sitelib}/%{modname}/data/*
+%{python3_sitelib}/%{modname}/examples/*
+%{python3_sitelib}/%{modname}/docs/*.py*
+%{python3_sitelib}/%{modname}/docs/__pycache__/*
+%{python3_sitelib}/%{modname}/dynamodb/*.py*
+%{python3_sitelib}/%{modname}/dynamodb/__pycache__/*
+%{python3_sitelib}/%{modname}/ec2/*.py*
+%{python3_sitelib}/%{modname}/ec2/__pycache__/*
+%{python3_sitelib}/%{modname}/resources/*.py*
+%{python3_sitelib}/%{modname}/resources/__pycache__/*
+%{python3_sitelib}/%{modname}/s3/*.py*
+%{python3_sitelib}/%{modname}/s3/__pycache__/*
+
+%changelog
+* Tue May 20 2025 Devrim Gunduz <devrim@gunduz.org> - 1.38.19-1PGDG
+- Initial packaging for the PostgreSQL RPM repository to support Patroni
+  on RHEL 9 and 8.