From d7f340ad23841d81028e4ac83e7e6a18490397cc Mon Sep 17 00:00:00 2001 From: licihua Date: Wed, 1 Mar 2023 16:02:06 +0800 Subject: [PATCH] fix opendmarc service start failed --- opendmarc.spec | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/opendmarc.spec b/opendmarc.spec index 1fda676..431bfb1 100644 --- a/opendmarc.spec +++ b/opendmarc.spec @@ -4,7 +4,7 @@ Summary: A Domain-based Message Authentication, Reporting & Conformance (DMARC) milter and library Name: opendmarc Version: 1.4.2 -Release: 1 +Release: 2 License: BSD and Sendmail URL: http://www.trusteddomain.org/%{name}.html Source0: https://github.com/trusteddomainproject/OpenDMARC/archive/refs/tags/rel-opendmarc-1-4-2.tar.gz @@ -13,7 +13,7 @@ Patch01: opendmarc-1.4.0-ticket159-179.patch Requires: lib%{name}%{?_isa} = %{version}-%{release} BuildRequires: make -BuildRequires: openssl-devel, libtool, pkgconfig, libbsd, libbsd-devel +BuildRequires: openssl-devel, libtool, pkgconfig, libbsd, libbsd-devel libspf2-devel Requires(pre): shadow-utils BuildRequires: libmilter BuildRequires: libmilter-devel @@ -58,7 +58,7 @@ required for developing applications against libopendmarc. %build autoreconf -v -i -%configure --with-sql-backend --with-spf -with-spf2-include=%{_prefix}/include/spf2 +%configure --with-sql-backend --with-spf -with-spf2-include=%{_prefix}/include/spf2 --with-spf2-lib=%{_libdir}/libspf2.so make DESTDIR=%{buildroot} %{?_smp_mflags} %install @@ -81,9 +81,11 @@ After=network.target nss-lookup.target syslog.target [Service] Type=simple +RuntimeDirectory=opendmarc +RuntimeDirectoryMode=0750 EnvironmentFile=-/etc/sysconfig/%{name} -ExecStart=/usr/sbin/%{name} -f $OPTIONS -ExecReload=/bin/kill -USR1 $MAINPID +ExecStart=/usr/sbin/%{name} -f \$OPTIONS +ExecReload=/bin/kill -USR1 \$MAINPID Restart=on-failure User=%{name} Group=%{name} @@ -110,6 +112,10 @@ sed -i 's|^# UMask 077|UMask 007|' %{buildroot}%{_sysconfdir}/%{name}.conf sed -i 's|^# UserID %{name}|UserID %{name}:mail|' %{buildroot}%{_sysconfdir}/%{name}.conf sed -i 's|/usr/local||' %{buildroot}%{_sysconfdir}/%{name}.conf +install -p -d %{buildroot}%{_sysconfdir}/tmpfiles.d +cat > %{buildroot}%{_sysconfdir}/tmpfiles.d/%{name}.conf < - 1.4.2-2 +- DESC:https://gitee.com/src-openeuler/opendmarc/issues/I6IQJM + * Tue Oct 18 2022 openEuler Application - 1.4.2-1 - DESC:Package init -- Gitee