From 8c2731cc9d98f2463320812dd246a2e496c4b8f1 Mon Sep 17 00:00:00 2001 From: Robin Bowes Date: Tue, 27 Dec 2016 15:46:53 +0000 Subject: [PATCH 1/6] Fix rogue date in spec file Changelog --- packaging/rpm/qpsmtpd.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/rpm/qpsmtpd.spec.in b/packaging/rpm/qpsmtpd.spec.in index 65b0b7b6..2ef1d87b 100644 --- a/packaging/rpm/qpsmtpd.spec.in +++ b/packaging/rpm/qpsmtpd.spec.in @@ -254,7 +254,7 @@ newer version in plugins/logging/file - (Thanks to Josko Plazonic for the reporting these problems and suggesting fixes) -* Tue Nov 30 2005 0.31.1-2 +* Wed Nov 30 2005 0.31.1-2 - Revision 170 of plugins/loggin/file_connection: Return DECLINED from open_log. Open log in write_log if it isn't already open. From 6ad47ddbc094338c0f2e43f85f4c608aca8af9ec Mon Sep 17 00:00:00 2001 From: Robin Bowes Date: Tue, 27 Dec 2016 15:48:17 +0000 Subject: [PATCH 2/6] Update rpm spec file to match changed README file names --- packaging/rpm/qpsmtpd.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/rpm/qpsmtpd.spec.in b/packaging/rpm/qpsmtpd.spec.in index 2ef1d87b..b4205d21 100644 --- a/packaging/rpm/qpsmtpd.spec.in +++ b/packaging/rpm/qpsmtpd.spec.in @@ -131,7 +131,7 @@ fi %files -f %{name}-%{version}-%{release}-filelist %defattr(-,root,root) -%doc CREDITS Changes LICENSE README README.plugins STATUS +%doc CREDITS Changes LICENSE README.md README.plugins.md STATUS %{_initrddir}/qpsmtpd-forkserver %config(noreplace) %{_sysconfdir}/qpsmtpd/* %config(noreplace) %{_sysconfdir}/sysconfig/qpsmtpd-forkserver From 55853c84cd9cb26882956559228f48c6d4b780ea Mon Sep 17 00:00:00 2001 From: Robin Bowes Date: Tue, 27 Dec 2016 17:41:22 +0000 Subject: [PATCH 3/6] Don't exclude files matching pattern 'ConfigServer' --- packaging/rpm/qpsmtpd.spec.in | 2 -- 1 file changed, 2 deletions(-) diff --git a/packaging/rpm/qpsmtpd.spec.in b/packaging/rpm/qpsmtpd.spec.in index b4205d21..bd7dd394 100644 --- a/packaging/rpm/qpsmtpd.spec.in +++ b/packaging/rpm/qpsmtpd.spec.in @@ -110,7 +110,6 @@ find ${RPM_BUILD_ROOT}%{_prefix} -type f -print | \ grep -v in\\.qpsmtpd | \ grep -v /Apache | \ grep -v /Danga | \ - 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" @@ -122,7 +121,6 @@ find ${RPM_BUILD_ROOT}%{_prefix} -type f -print | \ grep -v [Aa]sync | \ grep -v packaging | \ grep -v /Danga | \ - 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" From e2f3a7a7057432a01d352d5fda45edff9f981488 Mon Sep 17 00:00:00 2001 From: Robin Bowes Date: Tue, 27 Dec 2016 17:42:49 +0000 Subject: [PATCH 4/6] Exclude README.selinux from apache file list - it's included explicitly in the %files section --- 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 bd7dd394..49784978 100644 --- a/packaging/rpm/qpsmtpd.spec.in +++ b/packaging/rpm/qpsmtpd.spec.in @@ -120,6 +120,7 @@ find ${RPM_BUILD_ROOT}%{_prefix} -type f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" | \ grep -v [Aa]sync | \ grep -v packaging | \ + grep -v README.selinux | \ grep -v /Danga | \ 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 From 060fab29b301e02a43ff5c051d97113d88e41d49 Mon Sep 17 00:00:00 2001 From: Robin Bowes Date: Tue, 27 Dec 2016 17:47:38 +0000 Subject: [PATCH 5/6] cosmetic fixups to bash code in rpm spec file (mostly indentation) --- packaging/rpm/qpsmtpd.spec.in | 58 ++++++++++++++++------------------- 1 file changed, 27 insertions(+), 31 deletions(-) diff --git a/packaging/rpm/qpsmtpd.spec.in b/packaging/rpm/qpsmtpd.spec.in index 49784978..fceed306 100644 --- a/packaging/rpm/qpsmtpd.spec.in +++ b/packaging/rpm/qpsmtpd.spec.in @@ -65,16 +65,14 @@ rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT eval `perl '-V:installarchlib'` mkdir -p $RPM_BUILD_ROOT/$installarchlib -if grep -q DESTDIR Makefile -then - make DESTDIR=$RPM_BUILD_ROOT - find blib/lib -name '*.pm.*' -exec rm -f {} \; - make DESTDIR=$RPM_BUILD_ROOT install - +if grep -q DESTDIR Makefile ; then + make DESTDIR=$RPM_BUILD_ROOT + find blib/lib -name '*.pm.*' -exec rm -f {} \; + make DESTDIR=$RPM_BUILD_ROOT install else - make PREFIX=$RPM_BUILD_ROOT/usr - find blib/lib -name '*.pm.*' -exec rm -f {} \; - make PREFIX=$RPM_BUILD_ROOT/usr install + make PREFIX=$RPM_BUILD_ROOT/usr + find blib/lib -name '*.pm.*' -exec rm -f {} \; + make PREFIX=$RPM_BUILD_ROOT/usr install fi mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name} rm -f ${RPM_BUILD_ROOT}%{_datadir}/%{name}/plugins/*.* @@ -103,17 +101,17 @@ cp %{SOURCE6} $RPM_BUILD_ROOT%{_docdir}/%{name}-apache-%{version} find ${RPM_BUILD_ROOT}%{_prefix} \( -name perllocal.pod -o -name .packlist \) -exec rm {} \; find ${RPM_BUILD_ROOT}%{_prefix} -type f -print | \ - sed "s@^$RPM_BUILD_ROOT@@g" | \ - grep -v [Aa]sync | \ - grep -v packaging | \ - grep -v README.selinux | \ - grep -v in\\.qpsmtpd | \ - grep -v /Apache | \ - grep -v /Danga | \ - grep -v Qpsmtpd/PollServer.pm > %{name}-%{version}-%{release}-filelist + sed "s@^$RPM_BUILD_ROOT@@g" | \ + grep -v [Aa]sync | \ + grep -v packaging | \ + grep -v README.selinux | \ + grep -v in\\.qpsmtpd | \ + grep -v /Apache | \ + grep -v /Danga | \ + grep -v Qpsmtpd/PollServer.pm > %{name}-%{version}-%{release}-filelist if [ "$(cat %{name}-%{version}-%{release}-filelist)X" = "X" ] ; then - echo "ERROR: EMPTY FILE LIST" - exit -1 + echo "ERROR: EMPTY FILE LIST" + exit -1 fi find ${RPM_BUILD_ROOT}%{_prefix} -type f -print | \ @@ -124,8 +122,8 @@ find ${RPM_BUILD_ROOT}%{_prefix} -type f -print | \ grep -v /Danga | \ 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 + echo "ERROR: EMPTY FILE LIST" + exit -1 fi %files -f %{name}-%{version}-%{release}-filelist @@ -148,16 +146,14 @@ fi %{_sbindir}/in.qpsmtpd %pre -if ! id smtpd >/dev/null 2>&1 -then - # need to create smtpd user. - if perl -e 'exit ! defined(getgrnam("postdrop"))' - then - # if postfix is installed, we will probably use - # queue/postfix, which will need this: - supp="-G postdrop" - fi - useradd -r -M -s /bin/false $supp smtpd +if ! id smtpd >/dev/null 2>&1 ; then + # need to create smtpd user. + if perl -e 'exit ! defined(getgrnam("postdrop"))' ; then + # if postfix is installed, we will probably use + # queue/postfix, which will need this: + supp="-G postdrop" + fi + useradd -r -M -s /bin/false $supp smtpd fi %changelog From 2c46770222a8ea052efda9f6f746f461b95b6ee6 Mon Sep 17 00:00:00 2001 From: Robin Bowes Date: Tue, 27 Dec 2016 18:06:32 +0000 Subject: [PATCH 6/6] Update rpm specfile changelog --- packaging/rpm/qpsmtpd.spec.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packaging/rpm/qpsmtpd.spec.in b/packaging/rpm/qpsmtpd.spec.in index fceed306..60045a2b 100644 --- a/packaging/rpm/qpsmtpd.spec.in +++ b/packaging/rpm/qpsmtpd.spec.in @@ -157,6 +157,9 @@ if ! id smtpd >/dev/null 2>&1 ; then fi %changelog +* Tue Dec 27 2016 0.96-1 +- Fixed up spec file to build cleanly with 0.96 + * Fri Oct 14 2011 0.84-1 - Removed rpm/files/qpsmtpd-plugin-file_connection as there's a newer version in plugins/logging/file