[perl-Net-SSLeay] Trivial tidy up
by Paul Howarth
commit 7c63ac193f0d62b85eb28c60850346026e79d9ae
Author: Paul Howarth <paul(a)city-fan.org>
Date: Thu Jul 14 09:20:59 2011 +0100
Trivial tidy up
perl-Net-SSLeay.spec | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/perl-Net-SSLeay.spec b/perl-Net-SSLeay.spec
index 034dbaa..d2d1d48 100644
--- a/perl-Net-SSLeay.spec
+++ b/perl-Net-SSLeay.spec
@@ -28,7 +28,7 @@ Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
This module offers some high level convenience functions for accessing
web pages on SSL servers (for symmetry, same API is offered for
accessing http servers, too), a sslcat() function for writing your own
-clients, and finally access to the SSL api of SSLeay/OpenSSL package
+clients, and finally access to the SSL API of SSLeay/OpenSSL package
so you can write servers or clients for more complicated applications.
%prep
@@ -60,9 +60,11 @@ make pure_install PERL_INSTALL_ROOT=%{buildroot}
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
find %{buildroot} -type f -name '*.bs' -empty -exec rm -f {} ';'
find %{buildroot} -depth -type d -exec rmdir {} ';' 2>/dev/null
-rm -f %{buildroot}%{perl_vendorarch}/Net/ptrtstrun.pl
chmod -R u+w %{buildroot}
+# Remove script we don't want packaged
+rm -f %{buildroot}%{perl_vendorarch}/Net/ptrtstrun.pl
+
%check
make test
12 years, 11 months
[perl-Net-SSLeay] Stop running the tests in verbose mode
by Paul Howarth
commit 48ad409131cf59f8ea2cc053ab39a91bf55e5815
Author: Paul Howarth <paul(a)city-fan.org>
Date: Thu Jul 14 09:19:34 2011 +0100
Stop running the tests in verbose mode
perl-Net-SSLeay.spec | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/perl-Net-SSLeay.spec b/perl-Net-SSLeay.spec
index 329b7bc..034dbaa 100644
--- a/perl-Net-SSLeay.spec
+++ b/perl-Net-SSLeay.spec
@@ -64,7 +64,7 @@ rm -f %{buildroot}%{perl_vendorarch}/Net/ptrtstrun.pl
chmod -R u+w %{buildroot}
%check
-make test TEST_VERBOSE=1
+make test
%clean
rm -rf %{buildroot}
@@ -82,6 +82,7 @@ rm -rf %{buildroot}
- explicitly BR: pkgconfig
- use a patch rather than a scripted iconv to fix the character encoding
- modernize provides filter
+- stop running the tests in verbose mode
- nobody else likes macros for commands
* Wed Jul 13 2011 Iain Arnell <iarnell(a)gmail.com> - 1.36-5
12 years, 11 months
[perl-Net-SSLeay] Modernize provides filter
by Paul Howarth
commit a3bb1c6facc1ae062f38836fd375396f68b2dba2
Author: Paul Howarth <paul(a)city-fan.org>
Date: Thu Jul 14 09:18:28 2011 +0100
Modernize provides filter
perl-Net-SSLeay.spec | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/perl-Net-SSLeay.spec b/perl-Net-SSLeay.spec
index af5b8d3..329b7bc 100644
--- a/perl-Net-SSLeay.spec
+++ b/perl-Net-SSLeay.spec
@@ -21,11 +21,8 @@ BuildRequires: perl(Test::Pod)
BuildRequires: perl(Test::Warn)
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
-# don't "provide" private Perl libs or the redundant unversioned perl(Net::SSLeay) one
-%global _use_internal_dependency_generator 0
-%global __deploop() while read FILE; do /usr/lib/rpm/rpmdeps -%{1} ${FILE}; done | sort -u
-%global __find_provides /bin/sh -c "grep -v '%{perl_vendorarch}/.*\\.so$' | %{__deploop P} | grep -Fvx 'perl(Net::SSLeay)'"
-%global __find_requires /bin/sh -c "%{__deploop R}"
+# Don't "provide" private Perl libs or the redundant unversioned perl(Net::SSLeay) provide
+%global __provides_exclude ^(perl\\(Net::SSLeay\\)$|SSLeay\\.so)
%description
This module offers some high level convenience functions for accessing
@@ -45,6 +42,10 @@ so you can write servers or clients for more complicated applications.
chmod -c 644 examples/*
perl -pi -e 's|/usr/local/bin/perl|/usr/bin/perl|' examples/*.pl
+# Remove redundant unversioned provide if we don't have rpm 4.9 or later
+%global provfilt /bin/sh -c "%{__perl_provides} | grep -Fvx 'perl(Net::SSLeay)'"
+%define __perl_provides %{provfilt}
+
%build
PERL_MM_USE_DEFAULT=1 perl Makefile.PL \
INSTALLDIRS=vendor \
@@ -80,6 +81,7 @@ rm -rf %{buildroot}
- BR: perl(Test::Kwalitee) if we're not bootstrapping
- explicitly BR: pkgconfig
- use a patch rather than a scripted iconv to fix the character encoding
+- modernize provides filter
- nobody else likes macros for commands
* Wed Jul 13 2011 Iain Arnell <iarnell(a)gmail.com> - 1.36-5
12 years, 11 months
[perl-Net-SSLeay] BR: perl(Test::Kwalitee) if we're not bootstrapping; explicitly BR: pkgconfig
by Paul Howarth
commit 7c6314a3df1c0782515719ab18e21fa70aea380a
Author: Paul Howarth <paul(a)city-fan.org>
Date: Thu Jul 14 09:15:39 2011 +0100
BR: perl(Test::Kwalitee) if we're not bootstrapping; explicitly BR: pkgconfig
perl-Net-SSLeay.spec | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/perl-Net-SSLeay.spec b/perl-Net-SSLeay.spec
index 31cb3a2..af5b8d3 100644
--- a/perl-Net-SSLeay.spec
+++ b/perl-Net-SSLeay.spec
@@ -8,11 +8,18 @@ URL: http://search.cpan.org/dist/Net-SSLeay/
Source0: http://search.cpan.org/CPAN/authors/id/F/FL/FLORA/Net-SSLeay-%{version}.t...
Patch0: Net-SSLeay-1.36-UTF8.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
-Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
-BuildRequires: perl(ExtUtils::MakeMaker), openssl-devel
+BuildRequires: openssl-devel, pkgconfig
+BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(MIME::Base64)
-BuildRequires: perl(Test::Exception), perl(Test::NoWarnings), perl(Test::Pod)
+BuildRequires: perl(Test::Exception)
+# Test::Kwalitee => Module::CPANTS::Analyze => Net::HTTP => IO::Socket::SSL => Net::SSLeay
+%if 0%{!?perl_bootstrap:1}
+BuildRequires: perl(Test::Kwalitee)
+%endif
+BuildRequires: perl(Test::NoWarnings)
+BuildRequires: perl(Test::Pod)
BuildRequires: perl(Test::Warn)
+Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
# don't "provide" private Perl libs or the redundant unversioned perl(Net::SSLeay) one
%global _use_internal_dependency_generator 0
@@ -70,6 +77,8 @@ rm -rf %{buildroot}
%changelog
* Thu Jul 14 2011 Paul Howarth <paul(a)city-fan.org> - 1.36-6
+- BR: perl(Test::Kwalitee) if we're not bootstrapping
+- explicitly BR: pkgconfig
- use a patch rather than a scripted iconv to fix the character encoding
- nobody else likes macros for commands
12 years, 11 months
[perl-Net-SSLeay] Use a patch rather than a scripted iconv to fix the character encoding
by Paul Howarth
commit 74f72ac5d776d90703f1be277d49e7eff49d1462
Author: Paul Howarth <paul(a)city-fan.org>
Date: Thu Jul 14 09:05:48 2011 +0100
Use a patch rather than a scripted iconv to fix the character encoding
Net-SSLeay-1.36-UTF8.patch | 26 ++++++++++++++++++++++++++
perl-Net-SSLeay.spec | 11 +++++++----
2 files changed, 33 insertions(+), 4 deletions(-)
---
diff --git a/Net-SSLeay-1.36-UTF8.patch b/Net-SSLeay-1.36-UTF8.patch
new file mode 100644
index 0000000..2051e4c
--- /dev/null
+++ b/Net-SSLeay-1.36-UTF8.patch
@@ -0,0 +1,26 @@
+--- Net-SSLeay-1.36/Credits
++++ Net-SSLeay-1.36/Credits
+@@ -3,6 +3,6 @@ Clinton Wong <clintdw(a)netcom.com>
+ Jim Bowlin <jbowlin(a)linklint.org> for contributing Net::SSLeay::Handle
+ Eric A Selber <eselber(a)briefcase.com> for Windows fixes and testing
+ Marko Asplund <aspa(a)kronodoc.fi> for many suggestions and fixes
+-S�bastien Aperghis-Tramoni <saper(a)cpan.org> for many fixes and cleanups
++Sébastien Aperghis-Tramoni <saper(a)cpan.org> for many fixes and cleanups
+
+ See Changes file for other contributions.
+--- Net-SSLeay-1.36/lib/Net/SSLeay.pm
++++ Net-SSLeay-1.36/lib/Net/SSLeay.pm
+@@ -1710,11 +1710,11 @@ Commercial support for Net::SSLeay may b
+
+ Maintained by Mike McCauley and Florian Ragwitz since November 2005
+
+-Originally written by Sampo Kellom�ki <sampo(a)symlabs.com>
++Originally written by Sampo Kellomäki <sampo(a)symlabs.com>
+
+ =head1 COPYRIGHT
+
+-Copyright (c) 1996-2003 Sampo Kellom�ki <sampo(a)symlabs.com>
++Copyright (c) 1996-2003 Sampo Kellomäki <sampo(a)symlabs.com>
+
+ Copyright (C) 2005-2006 Florian Ragwitz <rafl(a)debian.org>
+
diff --git a/perl-Net-SSLeay.spec b/perl-Net-SSLeay.spec
index 9504c02..31cb3a2 100644
--- a/perl-Net-SSLeay.spec
+++ b/perl-Net-SSLeay.spec
@@ -6,6 +6,7 @@ Group: Development/Libraries
License: OpenSSL
URL: http://search.cpan.org/dist/Net-SSLeay/
Source0: http://search.cpan.org/CPAN/authors/id/F/FL/FLORA/Net-SSLeay-%{version}.t...
+Patch0: Net-SSLeay-1.36-UTF8.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
BuildRequires: perl(ExtUtils::MakeMaker), openssl-devel
@@ -29,12 +30,13 @@ so you can write servers or clients for more complicated applications.
%prep
%setup -q -n Net-SSLeay-%{version}
+# Re-code docs as UTF-8
+%patch0 -p1
+
+# Fix permissions and shellbangs in examples
+# to avoid bogus doc-file dependencies
chmod -c 644 examples/*
perl -pi -e 's|/usr/local/bin/perl|/usr/bin/perl|' examples/*.pl
-for f in Credits lib/Net/SSLeay.pm; do
- iconv -f iso-8859-1 -t utf-8 ${f} > ${f}.utf8
- mv ${f}.utf8 ${f}
-done
%build
PERL_MM_USE_DEFAULT=1 perl Makefile.PL \
@@ -68,6 +70,7 @@ rm -rf %{buildroot}
%changelog
* Thu Jul 14 2011 Paul Howarth <paul(a)city-fan.org> - 1.36-6
+- use a patch rather than a scripted iconv to fix the character encoding
- nobody else likes macros for commands
* Wed Jul 13 2011 Iain Arnell <iarnell(a)gmail.com> - 1.36-5
12 years, 11 months
[perl-Net-SSLeay] Nobody else likes macros for commands
by Paul Howarth
commit e042be344b992402653e94e03356cd3530caef20
Author: Paul Howarth <paul(a)city-fan.org>
Date: Thu Jul 14 09:02:00 2011 +0100
Nobody else likes macros for commands
perl-Net-SSLeay.spec | 47 +++++++++++++++++++++++++----------------------
1 files changed, 25 insertions(+), 22 deletions(-)
---
diff --git a/perl-Net-SSLeay.spec b/perl-Net-SSLeay.spec
index e8ff2fc..9504c02 100644
--- a/perl-Net-SSLeay.spec
+++ b/perl-Net-SSLeay.spec
@@ -1,13 +1,13 @@
Name: perl-Net-SSLeay
Version: 1.36
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: Perl extension for using OpenSSL
Group: Development/Libraries
License: OpenSSL
URL: http://search.cpan.org/dist/Net-SSLeay/
Source0: http://search.cpan.org/CPAN/authors/id/F/FL/FLORA/Net-SSLeay-%{version}.t...
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
+Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
BuildRequires: perl(ExtUtils::MakeMaker), openssl-devel
BuildRequires: perl(MIME::Base64)
BuildRequires: perl(Test::Exception), perl(Test::NoWarnings), perl(Test::Pod)
@@ -15,8 +15,8 @@ BuildRequires: perl(Test::Warn)
# don't "provide" private Perl libs or the redundant unversioned perl(Net::SSLeay) one
%global _use_internal_dependency_generator 0
-%global __deploop() while read FILE; do /usr/lib/rpm/rpmdeps -%{1} ${FILE}; done | /bin/sort -u
-%global __find_provides /bin/sh -c "%{__grep} -v '%{perl_vendorarch}/.*\\.so$' | %{__deploop P} | %{__grep} -Fvx 'perl(Net::SSLeay)'"
+%global __deploop() while read FILE; do /usr/lib/rpm/rpmdeps -%{1} ${FILE}; done | sort -u
+%global __find_provides /bin/sh -c "grep -v '%{perl_vendorarch}/.*\\.so$' | %{__deploop P} | grep -Fvx 'perl(Net::SSLeay)'"
%global __find_requires /bin/sh -c "%{__deploop R}"
%description
@@ -29,35 +29,35 @@ so you can write servers or clients for more complicated applications.
%prep
%setup -q -n Net-SSLeay-%{version}
-%{__chmod} -c 644 examples/*
-%{__perl} -pi -e 's|/usr/local/bin/perl|%{__perl}|' examples/*.pl
+chmod -c 644 examples/*
+perl -pi -e 's|/usr/local/bin/perl|/usr/bin/perl|' examples/*.pl
for f in Credits lib/Net/SSLeay.pm; do
- /usr/bin/iconv -f iso-8859-1 -t utf-8 ${f} > ${f}.utf8
- %{__mv} ${f}.utf8 ${f}
+ iconv -f iso-8859-1 -t utf-8 ${f} > ${f}.utf8
+ mv ${f}.utf8 ${f}
done
%build
-PERL_MM_USE_DEFAULT=1 %{__perl} Makefile.PL \
+PERL_MM_USE_DEFAULT=1 perl Makefile.PL \
INSTALLDIRS=vendor \
- INC="$(/usr/bin/pkg-config --cflags-only-I openssl)" \
- LIBS="$(/usr/bin/pkg-config --libs openssl)" \
+ INC="$(pkg-config --cflags-only-I openssl)" \
+ LIBS="$(pkg-config --libs openssl)" \
OPTIMIZE="%{optflags}"
-%{__make} %{?_smp_mflags}
+make %{?_smp_mflags}
%install
-%{__rm} -rf %{buildroot}
-%{__make} pure_install PERL_INSTALL_ROOT=%{buildroot}
-/usr/bin/find %{buildroot} -type f -name .packlist -exec %{__rm} -f {} ';'
-/usr/bin/find %{buildroot} -type f -name '*.bs' -empty -exec %{__rm} -f {} ';'
-/usr/bin/find %{buildroot} -depth -type d -exec /bin/rmdir {} ';' 2>/dev/null
-%{__rm} -f %{buildroot}%{perl_vendorarch}/Net/ptrtstrun.pl
-%{__chmod} -R u+w %{buildroot}
+rm -rf %{buildroot}
+make pure_install PERL_INSTALL_ROOT=%{buildroot}
+find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
+find %{buildroot} -type f -name '*.bs' -empty -exec rm -f {} ';'
+find %{buildroot} -depth -type d -exec rmdir {} ';' 2>/dev/null
+rm -f %{buildroot}%{perl_vendorarch}/Net/ptrtstrun.pl
+chmod -R u+w %{buildroot}
%check
-%{__make} test TEST_VERBOSE=1
+make test TEST_VERBOSE=1
%clean
-%{__rm} -rf %{buildroot}
+rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
@@ -67,6 +67,9 @@ PERL_MM_USE_DEFAULT=1 %{__perl} Makefile.PL \
%{_mandir}/man3/Net::SSLeay*.3*
%changelog
+* Thu Jul 14 2011 Paul Howarth <paul(a)city-fan.org> - 1.36-6
+- nobody else likes macros for commands
+
* Wed Jul 13 2011 Iain Arnell <iarnell(a)gmail.com> - 1.36-5
- drop obsolete BRs Array::Compare, Sub::Uplevel, Tree::DAG_Node
12 years, 11 months
[perl-Net-SSLeay] Tidy up recent changelog entries
by Paul Howarth
commit 27ce80bc0f0b2a3feb1826ab391d22fbdd4e1a1f
Author: Paul Howarth <paul(a)city-fan.org>
Date: Thu Jul 14 08:57:10 2011 +0100
Tidy up recent changelog entries
perl-Net-SSLeay.spec | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/perl-Net-SSLeay.spec b/perl-Net-SSLeay.spec
index 35487cc..e8ff2fc 100644
--- a/perl-Net-SSLeay.spec
+++ b/perl-Net-SSLeay.spec
@@ -67,17 +67,17 @@ PERL_MM_USE_DEFAULT=1 %{__perl} Makefile.PL \
%{_mandir}/man3/Net::SSLeay*.3*
%changelog
-* Wed Jul 13 2011 Iain Arnell <iarnell(a)gmail.com> 1.36-5
+* Wed Jul 13 2011 Iain Arnell <iarnell(a)gmail.com> - 1.36-5
- drop obsolete BRs Array::Compare, Sub::Uplevel, Tree::DAG_Node
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 1.36-4
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+- rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Tue Dec 21 2010 Marcela Maslanova <mmaslano(a)redhat.com> - 1.36-3
-- 661697 rebuild for fixing problems with vendorach/lib
+- rebuild to fix problems with vendorarch/lib (#661697)
* Tue May 04 2010 Marcela Maslanova <mmaslano(a)redhat.com> - 1.36-2
-- Mass rebuild with perl-5.12.0
+- mass rebuild with perl-5.12.0
* Sun Jan 31 2010 Paul Howarth <paul(a)city-fan.org> - 1.36-1
- update to 1.36 (see Changes for details)
12 years, 11 months
[perl-YAML-Tiny] drop Test::MinimumVersion BR to avoid circular build deps
by Iain Arnell
commit 211230db2eebf1852fb052b61ac3c8e97e8f13fc
Author: Iain Arnell <iarnell(a)gmail.com>
Date: Thu Jul 14 05:12:31 2011 +0200
drop Test::MinimumVersion BR to avoid circular build deps
perl-YAML-Tiny.spec | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/perl-YAML-Tiny.spec b/perl-YAML-Tiny.spec
index a93a2a1..0a6f7dc 100644
--- a/perl-YAML-Tiny.spec
+++ b/perl-YAML-Tiny.spec
@@ -1,6 +1,6 @@
Name: perl-YAML-Tiny
Version: 1.50
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Read/Write YAML files with as little code as possible
License: GPL+ or Artistic
Group: Development/Libraries
@@ -11,7 +11,6 @@ BuildRequires: perl(Exporter)
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(File::Spec) >= 0.80
BuildRequires: perl(Scalar::Util)
-BuildRequires: perl(Test::MinimumVersion)
BuildRequires: perl(Test::More) >= 0.47
BuildRequires: perl(Test::Pod)
BuildRequires: perl(YAML)
@@ -49,6 +48,9 @@ make test AUTOMATED_TESTING=1
%{_mandir}/man3/*
%changelog
+* Thu Jul 14 2011 Iain Arnell <iarnell(a)gmail.com> 1.50-2
+- drop Test::MinimumVersion BR to avoid circular build deps
+
* Mon Jun 27 2011 Petr Sabata <contyk(a)redhat.com> - 1.50-1
- 1.50 bump
- Cleaning the spec file (I assume pre-EPEL6 compatibility is no longer
12 years, 11 months
[dspam] copy/paste typo
by Nathanael Noblet
commit 11665256e10f4bda8a53724217f84ae1f534ffa1
Author: Nathanael D. Noblet <nathanael(a)gnat.ca>
Date: Wed Jul 13 14:58:52 2011 -0600
copy/paste typo
dspam.spec | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
---
diff --git a/dspam.spec b/dspam.spec
index 3970b09..7f20636 100644
--- a/dspam.spec
+++ b/dspam.spec
@@ -262,7 +262,6 @@ do
done
%{__install} -Dp -m 0644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/
-[...]
%post
if [ $1 -eq 1 ] ; then
# Initial installation
12 years, 11 months
[dspam] Initial systemd unit file
by Nathanael Noblet
commit 0e480f7f6823905354bc4b4a56f2152d39718f8f
Author: Nathanael D. Noblet <nathanael(a)gnat.ca>
Date: Wed Jul 13 14:48:56 2011 -0600
Initial systemd unit file
dspam-systemd | 11 +++++++++++
dspam.spec | 39 +++++++++++++++++++++++----------------
2 files changed, 34 insertions(+), 16 deletions(-)
---
diff --git a/dspam-systemd b/dspam-systemd
new file mode 100644
index 0000000..66d14ea
--- /dev/null
+++ b/dspam-systemd
@@ -0,0 +1,11 @@
+[Unit]
+Description=A highly accurate statistical spam filter minimal resources
+
+[Service]
+Type=Forking
+EnvironmentFile=-/etc/sysconfig/dspam
+User=${DSPAM_USER}
+ExecStart=${DSPAM_BIN} --daemon 2>/dev/null
+
+[Install]
+WantedBy=multi-user.target
\ No newline at end of file
diff --git a/dspam.spec b/dspam.spec
index 327195e..3970b09 100644
--- a/dspam.spec
+++ b/dspam.spec
@@ -11,7 +11,7 @@
Summary: A library and Mail Delivery Agent for Bayesian SPAM filtering
Name: dspam
Version: 3.9.0
-Release: 21%{?dist}
+Release: 22%{?dist}
License: GPLv2
Group: System Environment/Daemons
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
@@ -22,6 +22,7 @@ Source4: dspam-web.conf
Source5: dspam-front
Source6: dspam-sysconfig
Source7: dspam-tmpfiles
+Source8: dspam-systemd
Source99: dspam-filter-requires.sh
Patch0: dspam-3.9.0-file-name.patch
Patch1: dspam-3.9.0-docs.patch
@@ -36,11 +37,10 @@ BuildRequires: mysql-devel
BuildRequires: postgresql-devel
BuildRequires: sqlite-devel
BuildRequires: openldap-devel
+BuildRequires: systemd-units
Requires: dspam-libs = %{version}-%{release}
-Requires(post): chkconfig
-Requires(preun): chkconfig
-Requires(preun): initscripts
+Requires(post): systemd-sysv
%description
The DSPAM agent masquerades as the email server's local delivery agent
@@ -127,7 +127,6 @@ Summary: Web-based interface for DSPAM
Group: System Environment/Daemons
Requires: dspam = %{version}-%{release}
Requires: webserver
-Requires(post): initscripts
%description web
Web-based interface for DSPAM's powerful Anti-Spam engine.
@@ -218,8 +217,8 @@ find $RPM_BUILD_ROOT -name *.a -exec rm {} \;
echo "Scanned and tagged as SPAM with DSPAM %{version} by Your ISP.com"> $RPM_BUILD_ROOT%{dspam_homedir}/txt/msgtag.spam
echo "Scanned and tagged as non-SPAM with DSPAM %{version} by Your ISP.com"> $RPM_BUILD_ROOT%{dspam_homedir}/txt/msgtag.nonspam
-# install init.d script
-%{__install} -Dp -m0755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/dspam
+# install systemd script
+%{__install} -Dp -m0644 %{SOURCE8} $RPM_BUILD_ROOT%{_unitdir}/dspam.service
# install cron script
%{__install} -Dp -m0755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/dspam
@@ -263,21 +262,26 @@ do
done
%{__install} -Dp -m 0644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/
+[...]
%post
-/sbin/chkconfig --add %{name}
-if [ $1 -gt 1 ]; then
-/sbin/chkconfig %{name} resetpriorities
+if [ $1 -eq 1 ] ; then
+ # Initial installation
+ /bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%preun
-if [ $1 -eq 0 ]; then
- /sbin/service %{name} stop &>/dev/null || :
- /sbin/chkconfig --del %{name}
+if [ $1 -eq 0 ] ; then
+ # Package removal, not upgrade
+ /bin/systemctl --no-reload disable dspam.service > /dev/null 2>&1 || :
+ /bin/systemctl stop dspam.service > /dev/null 2>&1 || :
fi
%postun
-if [ $1 -ge 1 ]; then
- /sbin/service %{name} condrestart &>/dev/null || :
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ $1 -ge 1 ] ; then
+ /sbin/chkconfig --del httpd >/dev/null 2>&1 || :
+ # Package upgrade, not uninstall
+ /bin/systemctl try-restart dspam.service >/dev/null 2>&1 || :
fi
%pre libs
@@ -309,7 +313,7 @@ exit 0
%config(noreplace) %{_sysconfdir}/logrotate.d/dspam
%attr(0640,root,%{mail_group}) %config(noreplace) %{dspam_confdir}/dspam.conf
%attr(0644,root,%{mail_group}) %config(noreplace) %{dspam_confdir}/dspam.conf.default
-%{_initrddir}/dspam
+%{_unitdir}/dspam.service
%{_mandir}/man1/*
%attr(%{dspam_mode},%{dspam_user},%{mail_group}) %{_bindir}/dspam
%{_bindir}/dspam_2sql
@@ -376,6 +380,9 @@ exit 0
%config(noreplace) %{_sysconfdir}/httpd/conf.d/dspam-web.conf
%changelog
+* Wed Jul 13 2011 Nathanael Noblet <nathanael(a)gnat.ca> - 3.9.0-22
+- Systemd unit file
+
* Wed Jul 13 2011 Nathanael Noblet <nathanael(a)gnat.ca> - 3.9.0-21
- Start daemon as dspam user
12 years, 11 months