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



--- Comment #42 from David Nichols <da...@qore.org> ---
(In reply to Andy Mender from comment #41)
> > %global module_dir %{_libdir}/qore-modules
> > %global user_module_dir %{_datarootdir}/qore-modules/
> 
> Not a requirement, but %{_datadir} resolves to the same directory -
> "/usr/share".

ok done

> > Summary: Multithreaded Programming Language
> > Name: qore
> > Version: 0.9.4.5
> > Release: 1%{?dist}
> > License: LGPLv2+ or GPLv2+ or MIT
> > Group: Development/Languages
> > URL: http://qore.org
> > Source0: 
> > https://github.com/qorelanguage/qore/releases/download/release-%{version}/%{name}-%{version}.tar.bz2
> > Requires: /usr/bin/env
> > BuildRequires: gcc-c++
> > BuildRequires: flex >= 2.5.31
> > BuildRequires: bison
> > BuildRequires: openssl-devel
> > BuildRequires: pcre-devel
> > BuildRequires: zlib-devel
> > BuildRequires: gmp-devel
> > BuildRequires: mpfr-devel
> > BuildRequires: doxygen
> > BuildRequires: pkgconfig
> > BuildRequires: bzip2-devel
> 
> Not a strict requirement, but I would split the initial tags into blocks and
> improve formatting a bit:
> %global         module_dir %{_libdir}/qore-modules
> %global         user_module_dir %{_datarootdir}/qore-modules/
> 
> Name:           qore
> Version:        0.9.4.5
> Release:        1%{?dist}
> Summary:        Multithreaded Programming Language
> 
> License:        LGPLv2+ or GPLv2+ or MIT
> Group:          Development/Languages
> URL:            http://qore.org
> Source0:       
> https://github.com/qorelanguage/qore/releases/download/release-%{version}/
> %{name}-%{version}.tar.bz2
> 
> Requires:       /usr/bin/env
> BuildRequires:  gcc-c++
> BuildRequires:        flex >= 2.5.31
> BuildRequires:        bison
> BuildRequires:        openssl-devel
> BuildRequires:        pcre-devel
> BuildRequires:        zlib-devel
> BuildRequires:        gmp-devel
> BuildRequires:        mpfr-devel
> BuildRequires:        doxygen
> BuildRequires:        pkgconfig
> BuildRequires:        bzip2-devel

done

> > License:        LGPLv2+ or GPLv2+ or MIT
> > Group:          Development/Languages
> 
> - I would add a comment above the License block with this link:
> https://github.com/qorelanguage/qore/blob/develop/README-LICENSE
>   to make it clear that depending on the license choice, different modules
> are enabled or disabled. `licensecheck` complains a great deal,
> unfortunately.
> - The Group: tag is obsolete and should be removed.
> - "/usr/bin/env" is a part of the coreutils package, but since it's a part
> of the base system, this Requires can probably be removed.
> - Check which of the BuildRequires for -devel package can be replaced with
> pkgconfig(foo). Relevant section of the Packaging Guidelines:
> https://docs.fedoraproject.org/en-US/packaging-guidelines/
> PkgConfigBuildRequires/

done - thank you for the info and references - I missed those (among others)

> The main package should probably contain Requires like these to make sure
> all of the subpackages are correctly linked to the main package:
> Requires: %{name}-libqore%{?_isa} = %{version}-%{release}
> Requires: %{name}-stdlib%{?_isa} = %{version}-%{release}
> etc.
> 
> > %package -n libqore
> > Summary: The libraries for the qore runtime and qore clients
> > Group: System Environment/Libraries
> > Provides: qore-module(abi)%{?_isa} = 0.23
> > Provides: qore-module(abi)%{?_isa} = 0.22

done

> - The Group tag is obsolete and should be removed.
> - rpmlint complains about the abi provides: libqore.x86_64: E:
> useless-provides qore-module(abi)(x86-64)
>   I couldn't find anything explicit in the Packaging Guidelines, but perhaps
> you can remove these?
> 
> > Provides: libqore6 = %{version}
> > Obsoletes: libqore6 < %{version}
> 
> I'm wondering about these lines. Neither qore, nor any version of libqore is
> in the repositories so I don't think these are needed.

They were only for existing systems installed with non-official RPMs, but
anyway I removed them

> > %files -n libqore
> > %{_libdir}/libqore.so.6.2.0
> > %{_libdir}/libqore.so.6
> > %doc COPYING.LGPL COPYING.GPL COPYING.MIT README.md README-LICENSE 
> > README-MODULES RELEASE-NOTES AUTHORS ABOUT
> 
> The COPYING.* files are license files and they should be tagged with the
> %license macro.

done

> > %post -n libqore -p /sbin/ldconfig
> 
> > %postun -n libqore -p /sbin/ldconfig
> 
> Running ldconfig is no longer needed and these lines should be removed.

done

> > %package stdlib
> > Summary: Standard library modules
> > Group: System Environment/Libraries
> > Requires: libqore = %{version}-%{release}
> > Requires: qore-module(abi)%{?_isa} = 0.23
> 
> - Group tags are obsolete and should be removed.
> - Use a fully qualified version Requires like so:
>   Requires: %{name}-libqore%{?_isa} = %{version}-%{release}
> - The abi requirement can probably be removed.

done

> > %files stdlib
> > %{user_module_dir}
> > %{module_dir}
> > %doc COPYING.MIT README-LICENSE
> 
> - The %{module_dir} global definition should end with a slash to make the
> package own the directory like it's done in %{user_module_dir}.
> - COPYING.MIT is a license file and should be listed with the %license macro.

done

> > %files doc
> > %doc docs/lang docs/modules/* examples/ COPYING.LGPL COPYING.GPL 
> > COPYING.MIT README-LICENSE
> 
> The COPYING.* files are license files and should be listed with the %license
> macro.

done

> > %dir %{_libdir}/cmake
> > %{_libdir}/cmake/Qore
> > %{_includedir}/*
> 
> - Should this package own the /usr/lib/cmake dir? That doesn't sound right.
> I would use the following instead:
>   %{_libdir}/cmake/Qore/

done

> - %{_includedir}/* is a really bad idea. Maybe it would be better to have
> something like this?
>   %{_includedir/qore/

done

> > %files devel-doc
> > %doc docs/library/html/* COPYING.LGPL COPYING.GPL COPYING.MIT README-LICENSE
> 
> The COPYING.* files are license files and should be listed with the %license
> macro.

done

> > %package misc-tools
> > Summary: Miscellaneous user tools writen in Qore Programming Language
> > License: LGPL-2.0+ or GPL-2.0+ or MIT
> > Group: Development/Tools/Other
> > Requires: qore = %{version}-%{release}
> > BuildArch: noarch
> 
> - The License block contains invalid license definitions. Use the same ones
> as listed for the main package.
> - Group tags are obsolete and should be removed.

done

> - Use a fully qualified version Requires like so:
>   Requires: %{name}-qore%{?_isa} = %{version}-%{release}
>   Although I'm not sure whether here it makes sense if the main qore package
> were to explicitly Requires qore-misc-tools like I suggested earlier.

This leads to the following error; I assume a noarch pkg should not depend on
an arch-specific package:
> BuildError: The following noarch package built differently on different 
> architectures: qore-misc-tools-0.9.4.6-1.fc33.noarch.rpm
> rpmdiff output was:
> removed     REQUIRES qore(armv7hl-32) = 0.9.4.6-1.fc33
> added       REQUIRES qore(x86-32) = 0.9.4.6-1.fc33

> > %files misc-tools
> > %defattr(-,root,root,-)
> 
> Use of %defattr is obsolete and should be removed.

done

> > %build
> > export CXXFLAGS="%{optflags}"
> 
> > %files
> > %{_bindir}/qore
> > %{_bindir}/qdbg
> > %{_bindir}/qdbg-server
> > %{_bindir}/qdbg-remote
> > %{_bindir}/qdbg-vsc-adapter
> > %{_mandir}/man1/qore.1.*
> 
> Do the individual subpackages have their own manpages?

no, they do not

> > %configure --disable-debug --disable-dependency-tracking
> > make %{?_smp_mflags}
> 
> Use %make_build instead of running make and supplying the smp flags.

done

> > %install
> > make install prefix=%{_prefix} DESTDIR=$RPM_BUILD_ROOT
> 
> - See whether it's possible to replace this entire "make instalL" call with
> %make_install.
> - Also, add the "-p" flag to %make_install to preserve timestamps.

yes, it works, thanks; done

thank you for the comprehensive review; I've updated the spec file for the
above and also for the newest public release - Qore 0.9.4.6

new links:
- https://docs.qore.org/srpms/qore.spec
- https://docs.qore.org/srpms/qore-0.9.4.6-1.fc32.src.rpm

Koji build:
https://koji.fedoraproject.org/koji/taskinfo?taskID=48551232


-- 
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