Name: pgbouncer Version: 1.23.1 Release: 1%{?dist} Summary: Lightweight connection pooler for PostgreSQL License: MIT and BSD URL: https://www.pgbouncer.org Source0: %{url}/downloads/files/%{version}/%{name}-%{version}.tar.gz Source3: %{name}.logrotate Source4: %{name}.service Source6: %{name}.pam Patch0: %{name}-ini.patch BuildRequires: c-ares-devel >= 1.11 BuildRequires: make BuildRequires: gcc BuildRequires: openssl-devel BuildRequires: pam-devel BuildRequires: pkgconfig(libevent) # For Fedora and EL9+ systemd-rpm-macros would be enough: BuildRequires: systemd-devel Requires: systemd Requires: logrotate Requires: python3-psycopg2 Requires: c-ares >= 1.11 Requires(pre): shadow-utils %description pgbouncer is a lightweight connection pooler for PostgreSQL and uses libevent for low-level socket handling. %prep %autosetup -p0 sed -i -e 's|/usr/bin/env python.*|%__python3|g' etc/mkauth.py %build # Building with systemd flag tries to enable notify support: %configure \ --enable-debug \ --with-cares \ --with-pam \ --with-systemd %make_build V=1 %install %make_install # Configuration install -p -d %{buildroot}%{_sysconfdir}/%{name}/ install -p -m 640 etc/%{name}.ini %{buildroot}%{_sysconfdir}/%{name} install -p -m 600 etc/userlist.txt %{buildroot}%{_sysconfdir}/%{name} install -p -m 700 etc/mkauth.py %{buildroot}%{_sysconfdir}/%{name}/ # Install pam configuration file mkdir -p %{buildroot}%{_sysconfdir}/pam.d install -p -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/pam.d/%{name} # Temporary folder mkdir -p %{buildroot}%{_rundir}/%{name} # Log folder mkdir -p %{buildroot}%{_localstatedir}/log/%{name} # systemd unit install -d %{buildroot}%{_unitdir} install -m 644 %{SOURCE4} %{buildroot}%{_unitdir}/%{name}.service # tmpfiles.d configuration mkdir -p %{buildroot}%{_tmpfilesdir} cat > %{buildroot}%{_tmpfilesdir}/%{name}.conf </dev/null || groupadd -r %{name} &>/dev/null || : getent passwd %{name} >/dev/null || useradd -r -s /sbin/nologin \ -d / -M -c "PgBouncer Server" -g %{name} %{name} &>/dev/null || : exit 0 %post %systemd_post %{name}.service %preun %systemd_preun %{name}.service %postun %systemd_postun_with_restart %{name}.service %files %license COPYRIGHT %doc NEWS.md README.md doc/*.md %{_bindir}/%{name} %dir %{_sysconfdir}/%{name} %{_sysconfdir}/%{name}/mkauth.py* %config(noreplace) %attr(600,%{name},%{name}) %{_sysconfdir}/%{name}/%{name}.ini %config(noreplace) %attr(600,%{name},%{name}) %{_sysconfdir}/%{name}/userlist.txt %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %config(noreplace) %{_sysconfdir}/pam.d/%{name} %{_mandir}/man1/%{name}.* %{_mandir}/man5/%{name}.* %attr(700,%{name},%{name}) %{_localstatedir}/log/%{name} %attr(755,%{name},%{name}) %dir %{_rundir}/%{name} %ghost %{_rundir}/%{name}/%{name}.pid %{_tmpfilesdir}/%{name}.conf %{_unitdir}/%{name}.service %changelog * Mon Aug 05 2024 Simone Caronni - 1.23.1-1 - Update to 1.23.1. * Tue Mar 05 2024 Simone Caronni - 1.22.1-1 - Update to 1.22.1. * Fri Feb 09 2024 Simone Caronni - 1.22.0-1 - Update to 1.22.0. * Wed Oct 18 2023 Devrim Gündüz - 1.21.0-1 - Update to 1.21.0, per changes described at: https://www.pgbouncer.org/changelog.html#pgbouncer-121x * Thu Aug 10 2023 Devrim Gündüz - 1.20.1-1 - Update to 1.20.1, per changes described at: https://www.pgbouncer.org/changelog.html#pgbouncer-120x * Mon Aug 07 2023 Simone Caronni - 1.20.0-1 - Update to 1.20.0. * Tue Jun 06 2023 Simone Caronni - 1.19.1-1 - Update to 1.19.1. * Wed May 24 2023 Simone Caronni - 1.19.0-2 - Adjust python interpreter for mkauth.py. * Wed May 24 2023 Simone Caronni - 1.19.0-1 - Update to 1.19.0. - Clean up SPEC file. * Mon Jan 03 2022 Simone Caronni - 1.16.1-2 - Update SPEC file. * Tue Dec 21 2021 Devrim Gunduz - 1.16.1-1 - Initial packaging for EPEL 9