From: Devrim Gunduz Date: Mon, 20 Oct 2025 15:01:25 +0000 (+0300) Subject: pgdsat: Initial packaging for the PostgreSQL RPM repository X-Git-Url: http://git.postgresql.org/gitweb/static/%22display.php?a=commitdiff_plain;h=a1ba0bca04de9289ca9a10eee2ef700666538700;p=pgrpms.git pgdsat: Initial packaging for the PostgreSQL RPM repository --- diff --git a/rpm/redhat/main/common/pgdsat/EL-10/Makefile b/rpm/redhat/main/common/pgdsat/EL-10/Makefile new file mode 100644 index 000000000..062d419c4 --- /dev/null +++ b/rpm/redhat/main/common/pgdsat/EL-10/Makefile @@ -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=.rhel10 +SPECFILE="pgdsat.spec" + +# Now, include global Makefile +include ../../../../global/Makefile.global diff --git a/rpm/redhat/main/common/pgdsat/EL-10/pgdsat.spec b/rpm/redhat/main/common/pgdsat/EL-10/pgdsat.spec new file mode 120000 index 000000000..5b6a237ac --- /dev/null +++ b/rpm/redhat/main/common/pgdsat/EL-10/pgdsat.spec @@ -0,0 +1 @@ +../main/pgdsat.spec \ No newline at end of file diff --git a/rpm/redhat/main/common/pgdsat/EL-8/Makefile b/rpm/redhat/main/common/pgdsat/EL-8/Makefile new file mode 100644 index 000000000..2afc3c1d4 --- /dev/null +++ b/rpm/redhat/main/common/pgdsat/EL-8/Makefile @@ -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="pgdsat.spec" + +# Now, include global Makefile +include ../../../../global/Makefile.global diff --git a/rpm/redhat/main/common/pgdsat/EL-8/pgdsat.spec b/rpm/redhat/main/common/pgdsat/EL-8/pgdsat.spec new file mode 120000 index 000000000..5b6a237ac --- /dev/null +++ b/rpm/redhat/main/common/pgdsat/EL-8/pgdsat.spec @@ -0,0 +1 @@ +../main/pgdsat.spec \ No newline at end of file diff --git a/rpm/redhat/main/common/pgdsat/EL-9/Makefile b/rpm/redhat/main/common/pgdsat/EL-9/Makefile new file mode 100644 index 000000000..25fb190d8 --- /dev/null +++ b/rpm/redhat/main/common/pgdsat/EL-9/Makefile @@ -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="pgdsat.spec" + +# Now, include global Makefile +include ../../../../global/Makefile.global diff --git a/rpm/redhat/main/common/pgdsat/EL-9/pgdsat.spec b/rpm/redhat/main/common/pgdsat/EL-9/pgdsat.spec new file mode 120000 index 000000000..5b6a237ac --- /dev/null +++ b/rpm/redhat/main/common/pgdsat/EL-9/pgdsat.spec @@ -0,0 +1 @@ +../main/pgdsat.spec \ No newline at end of file diff --git a/rpm/redhat/main/common/pgdsat/F-41/Makefile b/rpm/redhat/main/common/pgdsat/F-41/Makefile new file mode 100644 index 000000000..c7567f0c6 --- /dev/null +++ b/rpm/redhat/main/common/pgdsat/F-41/Makefile @@ -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=.f41 +SPECFILE="pgdsat.spec" + +# Now, include global Makefile +include ../../../../global/Makefile.global diff --git a/rpm/redhat/main/common/pgdsat/F-41/pgdsat.spec b/rpm/redhat/main/common/pgdsat/F-41/pgdsat.spec new file mode 120000 index 000000000..5b6a237ac --- /dev/null +++ b/rpm/redhat/main/common/pgdsat/F-41/pgdsat.spec @@ -0,0 +1 @@ +../main/pgdsat.spec \ No newline at end of file diff --git a/rpm/redhat/main/common/pgdsat/F-42/Makefile b/rpm/redhat/main/common/pgdsat/F-42/Makefile new file mode 100644 index 000000000..3358a55cb --- /dev/null +++ b/rpm/redhat/main/common/pgdsat/F-42/Makefile @@ -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=.f42 +SPECFILE="pgdsat.spec" + +# Now, include global Makefile +include ../../../../global/Makefile.global diff --git a/rpm/redhat/main/common/pgdsat/F-42/pgdsat.spec b/rpm/redhat/main/common/pgdsat/F-42/pgdsat.spec new file mode 120000 index 000000000..5b6a237ac --- /dev/null +++ b/rpm/redhat/main/common/pgdsat/F-42/pgdsat.spec @@ -0,0 +1 @@ +../main/pgdsat.spec \ No newline at end of file diff --git a/rpm/redhat/main/common/pgdsat/F-43/Makefile b/rpm/redhat/main/common/pgdsat/F-43/Makefile new file mode 100644 index 000000000..d734ada17 --- /dev/null +++ b/rpm/redhat/main/common/pgdsat/F-43/Makefile @@ -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=.f43 +SPECFILE="pgdsat.spec" + +# Now, include global Makefile +include ../../../../global/Makefile.global diff --git a/rpm/redhat/main/common/pgdsat/F-43/pgdsat.spec b/rpm/redhat/main/common/pgdsat/F-43/pgdsat.spec new file mode 120000 index 000000000..5b6a237ac --- /dev/null +++ b/rpm/redhat/main/common/pgdsat/F-43/pgdsat.spec @@ -0,0 +1 @@ +../main/pgdsat.spec \ No newline at end of file diff --git a/rpm/redhat/main/common/pgdsat/SLES-15/Makefile b/rpm/redhat/main/common/pgdsat/SLES-15/Makefile new file mode 100644 index 000000000..985a585ae --- /dev/null +++ b/rpm/redhat/main/common/pgdsat/SLES-15/Makefile @@ -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=".sles15" +SPECFILE="pgdsat.spec" + +# Now, include global Makefile +include ../../../../global/Makefile.global diff --git a/rpm/redhat/main/common/pgdsat/SLES-15/pgdsat.spec b/rpm/redhat/main/common/pgdsat/SLES-15/pgdsat.spec new file mode 120000 index 000000000..5b6a237ac --- /dev/null +++ b/rpm/redhat/main/common/pgdsat/SLES-15/pgdsat.spec @@ -0,0 +1 @@ +../main/pgdsat.spec \ No newline at end of file diff --git a/rpm/redhat/main/common/pgdsat/SLES-16/Makefile b/rpm/redhat/main/common/pgdsat/SLES-16/Makefile new file mode 100644 index 000000000..8bdac4d3b --- /dev/null +++ b/rpm/redhat/main/common/pgdsat/SLES-16/Makefile @@ -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=".sles16" +SPECFILE="pgdsat.spec" + +# Now, include global Makefile +include ../../../../global/Makefile.global diff --git a/rpm/redhat/main/common/pgdsat/SLES-16/pgdsat.spec b/rpm/redhat/main/common/pgdsat/SLES-16/pgdsat.spec new file mode 120000 index 000000000..5b6a237ac --- /dev/null +++ b/rpm/redhat/main/common/pgdsat/SLES-16/pgdsat.spec @@ -0,0 +1 @@ +../main/pgdsat.spec \ No newline at end of file diff --git a/rpm/redhat/main/common/pgdsat/main/Makefile b/rpm/redhat/main/common/pgdsat/main/Makefile new file mode 100644 index 000000000..9eac508e8 --- /dev/null +++ b/rpm/redhat/main/common/pgdsat/main/Makefile @@ -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="pgdsat.spec" + +# Now, include global Makefile +include ../../../../global/Makefile.global diff --git a/rpm/redhat/main/common/pgdsat/main/pgdsat.spec b/rpm/redhat/main/common/pgdsat/main/pgdsat.spec new file mode 100644 index 000000000..55968bd93 --- /dev/null +++ b/rpm/redhat/main/common/pgdsat/main/pgdsat.spec @@ -0,0 +1,49 @@ +Summary: PostgreSQL Database Security Assessment Tool +Name: pgdsat +Version: 1.1 +Release: 1PGDG%{?dist} +License: GPLv3 +URL: https://github.com/HexaCluster/%{name}/ +Source0: https://github.com/HexaCluster/%{name}/archive/refs/tags/v%{version}.tar.gz +BuildRequires: perl(ExtUtils::MakeMaker) make +%if 0%{?fedora} >= 40 || 0%{?rhel} >= 8 +BuildRequires: perl-macros +%endif +BuildArch: noarch + +%description +PGDSAT is a security assessment tool that checks around 70 PostgreSQL security +controls of your PostgreSQL clusters including all recommendations from the +CIS compliance benchmark but not only. + +This tool is a single command that must be run on the PostgreSQL server to +collect all necessaries system and PostgreSQL information to compute a security +assessment report. A report consist in a summary of all tests status and a +second part with all detailed information. + +%prep +%setup -q +%{__perl} Makefile.PL + +%build +%{__perl} Makefile.PL INSTALLDIRS=vendor + +%{__make} %{?_smp_mflags} + +%install +%{__rm} -rf %{buildroot} +%{__make} pure_install PERL_INSTALL_ROOT=%{buildroot} + +find %{buildroot} -type f -name .packlist -exec rm -f {} + +find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \; + +%files +%defattr(-,root,root,-) +%attr(755,root,root) %{_bindir}/%{name} +%{_mandir}/man1/%{name}* +%{perl_vendorlib}/PGDSAT.pm +%{perl_vendorlib}/PGDSAT/*.pm + +%changelog +* Mon Oct 20 2025 - Devrim Gündüz 1.1-1PGDG +- Initial RPM packaging for the PostgreSQL RPM Repository