https://bugzilla.redhat.com/show_bug.cgi?id=1720949
Robert-André Mauchin <zebob.m(a)gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |zebob.m(a)gmail.com
--- Comment #1 from Robert-André Mauchin <zebob.m(a)gmail.com> ---
- Please add a comment for each patch explaining what they are doing
- There's a %{__mkdir} macro which shouldn't be after the description
- Using env is forbidden, it should be /usr/bin/python3 instead
%if 0%{?with_python3}
# fix-up python references; this effectively changes
# #!/usr/bin/env python
# to:
# #!/usr/bin/env python3
find scripts -type f -name '*.py' -exec \
sed -i -e 's|env python[23]\?$|env python3|g' {} \;
%endif
- Not needed
%{__rm} -rf %{buildroot}
- make %{?_smp_mflags} → %make_build
- Not needed:
%defattr(-, root, root)
- Use install -p to keep timestamps
- Put this after %install not %files, also use the proper way to do it as
described in
https://fedoraproject.org/wiki/Packaging:UsersAndGroups#Dynamic_allocation
Requires(pre): shadow-utils
[…]
%pre
getent group nzbget >/dev/null || groupadd -r nzbget
getent passwd nzbget >/dev/null || \
useradd -r -g nzbget -d %{_datadir}/%{name} -s /sbin/nologin \
-c "nzbget account" nzbget
exit 0
- You need to set the systemd scriptlets:
BuildRequires: systemd-rpm-macros
[…]
%post
%systemd_post nzbget.service
%preun
%systemd_preun nzbget.service
%postun
%systemd_postun_with_restart nzbget.service
See
https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_sc...
--
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