https://bugzilla.redhat.com/show_bug.cgi?id=1801088
--- Comment #9 from Attila Lakatos <alakatos(a)redhat.com> ---
(In reply to Kairui Song from comment #7)
Hi, I found some problems with the spec.
> %build
> mkdir -p ./m4
> autoreconf -i -f -v --no-recursive ./
> %configure \
> --disable-silent-rules \
> --without-bundled-catch \
> --enable-debug-build
>
> make %{?_smp_mflags}
The build system doesn't seem to honor Fedora's CFLAGS from environment.
I removed %{?_smp_mflags}.
> %install
> make install INSTALL='install -p' DESTDIR=%{buildroot}
> execstack -c $RPM_BUILD_ROOT%{_bindir}/*
I never used execstack before, but according to
https://fedoraproject.org/wiki/Packaging_tricks#Executable_stack
it disables executable stack, but shouldn't the code generated by gcc/g++
have that by default?
The compiler I am using generates code that permits stack execution but doesn't
actually need it.
In order to disable it I decided to use execstack as it is recommended
according to the Packaging guideline.
>
> # Cleanup
> find %{buildroot} \( -name '*.o' -o -name '*.a' \) -exec rm -f {}
';'
Clean up is not needed in %install, anything not included by %files is not
packaged.
Yes, you are right. I removed it.
> %files
> %doc README.md CHANGELOG.md
> %license LICENSE
> %{_bindir}/usbguard-notifier
> %{_bindir}/usbguard-notifier-cli
> %{_datadir}/man/man1/usbguard-notifier.1.gz
> %{_datadir}/man/man1/usbguard-notifier-cli.1.gz
> %{_userunitdir}/usbguard-notifier.service
Consider using %{_mandir}
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_manpages
I changed it to %{_mandir} as you suggested.
And systemd unit should go to _unitdir, see:
https://docs.fedoraproject.org/en-US/packaging-guidelines/Systemd/
#_filesystem_locations
I had to create a new upstream release in order to ensure that, so here are the
new links:
Spec URL:
https://alakatos.fedorapeople.org/usbguard-notifier.spec
SRPM URL:
https://alakatos.fedorapeople.org/usbguard-notifier-0.0.4-1.fc31.src.rpm
And some issues found by fedora-review:
Issues:
=======
- Package uses either %{buildroot} or $RPM_BUILD_ROOT
Note: Using both %{buildroot} and $RPM_BUILD_ROOT
See:
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_macros Done.
- systemd_user_post is invoked in %post and systemd_user_preun in
%preun
for Systemd user units service files.
Note: Systemd user unit service file(s) in usbguard-notifier
See:
https://docs.fedoraproject.org/en-US/packaging-
guidelines/Scriptlets/#_user_units
Done.
--
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