[Bug 1877006] Review Request: smf-spf - Mail filter for Sender Policy Framework verification

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1877006

Robert-André Mauchin 🐧 <zebob.m@xxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zebob.m@xxxxxxxxx



--- Comment #1 from Robert-André Mauchin 🐧 <zebob.m@xxxxxxxxx> ---
 All these things have been obsolete for years:

# Do a systemd-based build from F-15; otherwise, a sysvinit-based build
%global use_systemd %([ "(" 0%{?fedora} -gt 14 ")" -o "(" 0%{?rhel} -gt 6 ")" ]
&& echo 1 || echo 0)

# This macro only defined by default around Fedora 10 time
%{!?_initddir:%global _initddir %{_initrddir}}

# With systemd, the run directory is /run; otherwise it's /var/run
%if %{use_systemd}
%global rundir /run
%else
%global rundir %{_localstatedir}/run
%endif


F15? F10? Older than my nephew. Don't include them.

 - Source must either be an url or you need to add a comment explaining how the
archive got generated:

Source0:        %{name}-%{version}.tar.gz

 - Not needed:

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)

Group:          System Environment/Daemons

rm -rf %{buildroot}

%clean
rm -rf %{buildroot}


%defattr(-,root,root,-)


 - Use the System scriptlets, see:
https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_systemd

BuildRequires:  systemd-units
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units

[…]

%post
if [ $1 -eq 1 ]; then
        # Initial installation 
%if %{use_systemd}
        /bin/systemctl daemon-reload &>/dev/null || :
%else
        /sbin/chkconfig --add smf-spf || :
%endif
fi

%preun
if [ $1 -eq 0 ]; then
        # Package removal, not upgrade
%if %{use_systemd}
        /bin/systemctl --no-reload disable smf-spf.service &>/dev/null || :
        /bin/systemctl stop smf-spf.service &>/dev/null || :
%else
        %{_initddir}/smf-spf stop &>/dev/null || :
        /sbin/chkconfig --del smf-spf || :
%endif
fi

%postun
%if %{use_systemd}
/bin/systemctl daemon-reload &>/dev/null || :
%endif
if [ $1 -ge 1 ]; then
        # Package upgrade, not uninstall
%if %{use_systemd}
        /bin/systemctl try-restart smf-spf.service &>/dev/null || :
%else
        %{_initddir}/smf-spf condrestart &>/dev/null || :
%endif
fi

→

BuildRequires:  systemd-rpm-macros

[…]

%post
%systemd_post smf-spf.service

%preun
%systemd_preun smf-spf.service

%postun
%systemd_postun_with_restart smf-spf.service


 - COPYING must be installed with %license, not %doc:

%doc ChangeLog readme README.rpm
license COPYING

 - make %{?_smp_mflags} OPTFLAGS="%{optflags}" 

→ 

%set_build_flags

 - Add the comment regarding the patches above each PatchX line

 - Requires(pre):       /usr/bin/getent, /usr/sbin/groupadd, /usr/sbin/useradd,
/usr/sbin/usermod → Requires(pre): shadow-utils

 - One BR per line would be nice:

BuildRequires:  libspf2-devel >= 1.2.5
BuildRequires:  sendmail-milter-devel >= 8.12

%make_build

 - Explicitly BR gcc


-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/package-review@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite Conditions]     [KDE Users]

  Powered by Linux