From 3cf71c9c6f751dc3a7b5351af1380a44a6416844 Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Fri, 11 Oct 2024 10:47:06 +0000 Subject: [PATCH] Update packaging for RH9 --- LICENSE | 2 +- .../patroni-infoblox-integration.spec | 20 ++++++++++--------- setup.py | 2 +- 3 files changed, 13 insertions(+), 11 deletions(-) rename rpm/{EL-7 => }/patroni-infoblox-integration.spec (65%) diff --git a/LICENSE b/LICENSE index e92ab46..78c08fc 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019 Cybertec Schönig & Schönig GmbH +Copyright (c) 2019, 2024 CYBERTEC PostgreSQL International GmbH Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/rpm/EL-7/patroni-infoblox-integration.spec b/rpm/patroni-infoblox-integration.spec similarity index 65% rename from rpm/EL-7/patroni-infoblox-integration.spec rename to rpm/patroni-infoblox-integration.spec index f401d61..a8b0f41 100644 --- a/rpm/EL-7/patroni-infoblox-integration.spec +++ b/rpm/patroni-infoblox-integration.spec @@ -1,23 +1,23 @@ -%define VERSION 1.2 +%define VERSION 1.3 %define ENVNAME patroni-infoblox-integration %define INSTALLPATH /opt/app/patroni-infoblox-integration %define debug_package %{nil} +# remove build-id files that conflict with system python +%define _build_id_links none # Fetch remote sources %undefine _disable_source_fetch Name: patroni-infoblox-integration Version: %{VERSION} -Release: 1.rhel7 +Release: 1%{dist} License: MIT Summary: PostgreSQL high-availability manager -Source: %{name}-%{version}.tar.gz +Source: https://github.com/cybertec-postgresql/patroni-infoblox-integration/archive/refs/tags/%{version}.tar.gz BuildRoot: %{_tmppath}/%{buildprefix}-buildroot Requires: python3 - -#%global __requires_exclude_from ^%{INSTALLPATH}/lib/python3.6/site-packages/(psycopg2/|_cffi_backend.so|_cffi_backend.cpython-36m-x86_64-linux-gnu.so|.libs_cffi_backend/libffi-.*.so.6.0.4) -#%global __provides_exclude_from ^%{INSTALLPATH}/lib/python3.6/ +BuildRequires: python3-virtualenv %global __python %{__python3} @@ -31,11 +31,13 @@ Packaged version of Patroni HA manager. %install mkdir -p $RPM_BUILD_ROOT%{INSTALLPATH} -virtualenv-3 --distribute --system-site-packages $RPM_BUILD_ROOT%{INSTALLPATH} +virtualenv --system-site-packages $RPM_BUILD_ROOT%{INSTALLPATH} $RPM_BUILD_ROOT%{INSTALLPATH}/bin/pip3 install . -virtualenv-3.6 --relocatable $RPM_BUILD_ROOT%{INSTALLPATH} -sed -i "s#$RPM_BUILD_ROOT##" $RPM_BUILD_ROOT%{INSTALLPATH}/bin/activate* +# remove pycache files that reference the build root +find $RPM_BUILD_ROOT -name __pycache__ | xargs -r rm -rf +# fix references to build root in shell scripts +sed -i "s#$RPM_BUILD_ROOT##" $RPM_BUILD_ROOT%{INSTALLPATH}/bin/* %clean rm -rf $RPM_BUILD_ROOT diff --git a/setup.py b/setup.py index ae93ee8..7cd2372 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup setup(name='patroni-infoblox-integration', - version='1.2', + version='1.3', description='Helper tools for maintaining ', author='Ants Aasma', author_email='ants@cybertec.at',