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

Robert-André Mauchin <zebo...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zebo...@gmail.com



--- Comment #1 from Robert-André Mauchin <zebo...@gmail.com> ---
Hello,

 - BuildRoot: should not be used in Fedora. See
https://fedoraproject.org/wiki/Packaging:Guidelines#Tags_and_Sections

 - The whole systemd handling is wrong, we have macros for this that you should
use. See
https://fedoraproject.org/wiki/Packaging:Scriptlets?rd=Packaging:ScriptletSnippets#Systemd

   First, instead of:

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

  Use:

%{?systemd_requires}
BuildRequires: systemd

 For all the daemons like this:

%post arbiter
if [ $1 -eq 1 ] ; then 
  /bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi

%preun arbiter 
if [ $1 -eq 0 ] ; then
  /bin/systemctl --no-reload disable %{name}-arbiter.service > /dev/null 2>&1
|| :
  /bin/systemctl stop %{name}-arbiter.service > /dev/null 2>&1 || :
fi

%postun arbiter
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
  /bin/systemctl try-restart %{name}-arbiter.service >/dev/null 2>&1 || :
fi

  Use instead:

%post arbiter
%systemd_post %{name}-arbiter.service

%preun arbiter
%systemd_preun %{name}-arbiter.service

%postun arbiter
%systemd_postun_with_restart %{name}-arbiter.service


 - The license is wrongly installed. It must be in the %license tag' not in
%doc, like this:

%files common
%{python_sitelib}/%{name}
%{python_sitelib}/alignak*.egg-info
%license LICENSE
%doc AUTHORS CONTRIBUTING.rst Changelog README.rst

 - Could you add a descriptive comment for the user that you are creating? With
the -c switch. See
https://fedoraproject.org/wiki/Packaging:UsersAndGroups#Dynamic_allocation

 - You could use %{py2_dist macros to handle your Python dependencies. See
https://fedoraproject.org/wiki/Packaging:Python#Requires_and_BuildRequires_with_standardized_names

-- 
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@lists.fedoraproject.org
To unsubscribe send an email to package-review-le...@lists.fedoraproject.org

Reply via email to