From ac701f2708a10c7d1c90fdaf82063d186ebc5d31 Mon Sep 17 00:00:00 2001 From: Richard Siddall Date: Fri, 4 Jul 2014 23:49:37 -0400 Subject: [PATCH 1/3] CentOS 6 no longer includes ExtUtils::MakeMaker in the core Perl RPMs, so we have to specify it as a build dependency. --- packaging/rpm/qpsmtpd.spec.in | 1 + 1 file changed, 1 insertion(+) diff --git a/packaging/rpm/qpsmtpd.spec.in b/packaging/rpm/qpsmtpd.spec.in index b5307e1..954a448 100644 --- a/packaging/rpm/qpsmtpd.spec.in +++ b/packaging/rpm/qpsmtpd.spec.in @@ -12,6 +12,7 @@ Group: System Environment/Daemons URL: http://smtpd.develooper.com/ BuildRoot: %{_builddir}/%{name}-%{version}-%{release}-root BuildRequires: perl >= 0:5.00503 +BuildRequires: perl(ExtUtils::MakeMaker) BuildArchitectures: noarch Requires: perl(Mail::Header), perl(Net::DNS) perl(Net::IP) perl(IPC::Shareable) Requires(pre): coreutils, shadow-utils, perl From 038e81a9cc594c21d9c752e843971d56e6b25f27 Mon Sep 17 00:00:00 2001 From: Richard Siddall Date: Sat, 5 Jul 2014 00:09:22 -0400 Subject: [PATCH 2/3] Since the site Perl folders are in very different locations on CentOS 6 compared to CentOS 5, switch to building lists of files instead of hard-coding their locations in the %files section. --- packaging/rpm/qpsmtpd.spec.in | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/packaging/rpm/qpsmtpd.spec.in b/packaging/rpm/qpsmtpd.spec.in index 954a448..1021966 100644 --- a/packaging/rpm/qpsmtpd.spec.in +++ b/packaging/rpm/qpsmtpd.spec.in @@ -126,6 +126,28 @@ if [ "$(cat %{name}-%{version}-%{release}-filelist)X" = "X" ] ; then exit -1 fi +find ${RPM_BUILD_ROOT}%{_prefix} -type f -print | \ + sed "s@^$RPM_BUILD_ROOT@@g" | \ + grep -v packaging | \ + grep -v README.selinux | \ + grep -v /Apache | cat - %{name}-%{version}-%{release}-filelist | sort | uniq -u > %{name}-%{version}-%{release}-async-filelist +if [ "$(cat %{name}-%{version}-%{release}-async-filelist)X" = "X" ] ; then + echo "ERROR: EMPTY FILE LIST" + exit -1 +fi + +find ${RPM_BUILD_ROOT}%{_prefix} -type f -print | \ + sed "s@^$RPM_BUILD_ROOT@@g" | \ + grep -v [Aa]sync | \ + grep -v packaging | \ + grep -v /Danga | \ + grep -v Qpsmtpd/ConfigServer.pm | \ + grep -v Qpsmtpd/PollServer.pm | cat - %{name}-%{version}-%{release}-filelist | sort | uniq -u > %{name}-%{version}-%{release}-apache-filelist +if [ "$(cat %{name}-%{version}-%{release}-apache-filelist)X" = "X" ] ; then + echo "ERROR: EMPTY FILE LIST" + exit -1 +fi + %files -f %{name}-%{version}-%{release}-filelist %defattr(-,root,root) %doc CREDITS Changes LICENSE README README.plugins STATUS @@ -135,22 +157,13 @@ fi %attr(2750,qpsmtpd,clamav) %dir %{_localstatedir}/spool/qpsmtpd %attr(0750,smtpd,smtpd) %dir %{_localstatedir}/log/qpsmtpd -%files apache +%files apache -f %{name}-%{version}-%{release}-apache-filelist %defattr(-,root,root) -%{_prefix}/lib/perl5/site_perl/Apache/Qpsmtpd.pm -%{_mandir}/man3/Apache::Qpsmtpd.3pm.gz %config(noreplace) %{_sysconfdir}/httpd/conf.d/* %doc %{_docdir}/%{name}-apache-%{version}/README.selinux -%files async +%files async -f %{name}-%{version}-%{release}-async-filelist %defattr(-,root,root) -%{_bindir}/qpsmtpd-async -%{_prefix}/lib/perl5/site_perl/Danga/Client.pm -%{_prefix}/lib/perl5/site_perl/Danga/TimeoutSocket.pm -%{_prefix}/lib/perl5/site_perl/Qpsmtpd/ConfigServer.pm -%{_prefix}/lib/perl5/site_perl/Qpsmtpd/Plugin/Async/DNSBLBase.pm -%{_prefix}/lib/perl5/site_perl/Qpsmtpd/PollServer.pm -%{_mandir}/man1/qpsmtpd-async.1.gz %{_datadir}/%{name}/plugins/async/* %files xinetd From 79ae549e945e658e33d3580db87167806d7c755a Mon Sep 17 00:00:00 2001 From: Richard Siddall Date: Sat, 5 Jul 2014 09:11:19 -0400 Subject: [PATCH 3/3] Moves Qpsmtpd::ConfigServer man page to async RPM. --- packaging/rpm/qpsmtpd.spec.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/rpm/qpsmtpd.spec.in b/packaging/rpm/qpsmtpd.spec.in index 1021966..c8d974e 100644 --- a/packaging/rpm/qpsmtpd.spec.in +++ b/packaging/rpm/qpsmtpd.spec.in @@ -119,7 +119,7 @@ find ${RPM_BUILD_ROOT}%{_prefix} -type f -print | \ grep -v in\\.qpsmtpd | \ grep -v /Apache | \ grep -v /Danga | \ - grep -v Qpsmtpd/ConfigServer.pm | \ + grep -v ConfigServer | \ grep -v Qpsmtpd/PollServer.pm > %{name}-%{version}-%{release}-filelist if [ "$(cat %{name}-%{version}-%{release}-filelist)X" = "X" ] ; then echo "ERROR: EMPTY FILE LIST" @@ -141,7 +141,7 @@ find ${RPM_BUILD_ROOT}%{_prefix} -type f -print | \ grep -v [Aa]sync | \ grep -v packaging | \ grep -v /Danga | \ - grep -v Qpsmtpd/ConfigServer.pm | \ + grep -v ConfigServer | \ grep -v Qpsmtpd/PollServer.pm | cat - %{name}-%{version}-%{release}-filelist | sort | uniq -u > %{name}-%{version}-%{release}-apache-filelist if [ "$(cat %{name}-%{version}-%{release}-apache-filelist)X" = "X" ] ; then echo "ERROR: EMPTY FILE LIST"