https://bugzilla.redhat.com/show_bug.cgi?id=1111691
--- Comment #3 from Christopher Meng i@cicku.me --- More detailed initial review thought(Note you need a sponsor, I can't help, I will address this at the end):
1. The packaging style looks like a decade ago.
%define qore_ver 0.8.11
You should put 0.8.11 in Version tag and use %{version} instead of custom macro, we have some fundamental macros which you should avoid using custom macro replaced
2. I don't think you've read the guideline, for example, %define -> %global:
https://fedoraproject.org/wiki/Packaging:Guidelines#.25global_preferred_over...
3. Remove those non-Fedora conditional bits:
4. # see if we can determine the distribution type %if 0%{!?dist:1} %define rh_dist %(if [ -f /etc/redhat-release ];then cat /etc/redhat-release|sed "s/[^0-9.]*//"|cut -f1 -d.;fi) %if 0%{?rh_dist} %define dist .rhel%{rh_dist} %else
---------
Please learn how to use macro %{?el}/%{?fedora}
4. Drop obsoleted RPM macros which are still heavily used by other distros:
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
%defattr(-,root,root,-)
%clean
%defattr(-,root,root,-)
5. You are polluting dist tag:
http://fedoraproject.org/wiki/Packaging:DistTag
6. Drop BuildRequires: gcc-c++:
https://fedoraproject.org/wiki/Packaging:Guidelines#Exceptions_2
7. Never make BuildRequires: fdupes in any Fedora specs, we don't need it.
8. You should avoid packaging libraries with version as its package name:
libqore5
You'd better change it to libqore or qore-libs
9. I still don't understand those Provides: in libqore, can't RPM handle this?
10. %ifarch x86_64 ppc64 x390x c64=--enable-64bit %endif # need to configure with /usr as prefix as this will be used to derive the module directory ./configure RPM_OPT_FLAGS="$RPM_OPT_FLAGS" --prefix=/usr --disable-debug --disable-static $c64 --libdir=%{_libdir}
a) %configure macro should be used
b) Does qore work on ARM? We will have AArch64(ARM v8) in the future.
11. /usr/bin/ -> %{_bindir}
%{_prefix}/include/ -> %{_includedir}
/usr/share/man/ -> %{_mandir}
I think you don't need to care about RHEL5 nowadays.
12. Why not merge 2 doc packages into 1 -doc?
13. mkdir -p $RPM_BUILD_ROOT/usr/bin mkdir -p $RPM_BUILD_ROOT/%{module_dir}/%{qore_ver} mkdir -p $RPM_BUILD_ROOT/usr/man/man1
I think install script should do that(create in install script or with install -p), since you are the upstream, these could be enhanced.
13. https://fedoraproject.org/wiki/Packaging:Guidelines#Requiring_Base_Package
14. %post -n libqore5 ldconfig %{_libdir}
%postun -n libqore5 ldconfig %{_libdir}
http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Shared_libraries
------------------------------------ Anyway, read and follow this if you want to be sponsored:
https://fedoraproject.org/wiki/Join_the_package_collection_maintainers