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



--- Comment #9 from Attila Lakatos <alaka...@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
_______________________________________________
package-review mailing list -- package-review@lists.fedoraproject.org
To unsubscribe send an email to package-review-le...@lists.fedoraproject.org
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@lists.fedoraproject.org

Reply via email to