Bug 2162872 - Review Request: ghc-constraints - Constraint manipulation
Summary: Review Request: ghc-constraints - Constraint manipulation
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jerry James
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-01-21 16:47 UTC by Jens Petersen
Modified: 2023-09-19 04:32 UTC (History)
2 users (show)

Fixed In Version: ghc-constraints-0.13.4-12.fc39
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-04-02 15:14:18 UTC
Type: ---
Embargoed:
loganjerry: fedora-review+


Attachments (Terms of Use)

Description Jens Petersen 2023-01-21 16:47:21 UTC
Spec URL: https://petersen.fedorapeople.org/reviews/ghc-constraints/ghc-constraints.spec
SRPM URL: https://petersen.fedorapeople.org/reviews/ghc-constraints/ghc-constraints-0.13.4-1.fc38.src.rpm

Description:
GHC 7.4 gave us the ability to talk about 'ConstraintKinds'. They stopped
crashing the compiler in GHC 7.6.

This package provides a vocabulary for working with them.


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

Comment 1 Jakub Kadlčík 2023-01-21 16:50:40 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/5281181
(failed)

Build log:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2162872-ghc-constraints/fedora-rawhide-x86_64/05281181-ghc-constraints/builder-live.log.gz

Please make sure the package builds successfully at least for Fedora Rawhide.

- If the build failed for unrelated reasons (e.g. temporary network
  unavailability), please ignore it.
- If the build failed because of missing BuildRequires, please make sure they
  are listed in the "Depends On" field


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

Comment 2 Jerry James 2023-02-16 16:03:58 UTC
I will take this review.

Comment 3 Jerry James 2023-02-16 16:35:46 UTC
Either firefox or bugzilla won't allow me to paste the full review in here.  Apparently 150642 bytes is too many. :-)  I'm going to remove all of the undefined-non-weak-symbol rpmlint warnings, since I assume those symbols are provided by the Haskell runtime.

Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated

Issues:
=======
I don't know much about Haskell packaging, so the following questions may be naive.

- There is no %check script, but the upstream sources contain a tests
  subdirectory.  Is it possible and advisable to run those tests?

- Are the unused-direct-shlib-dependency rpmlint warnings normal for a Haskell
  package?  If not, this library is overlinked.

- Are the static-library-without-debuginfo rpmlint warnings normal for a Haskell
  package?  If not, the static libraries should not be stripped.

===== MUST items =====

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[x]: Development (unversioned) .so files in -devel subpackage, if present.
     Note: Unversioned so-files in private %_libdir subdirectory (see
     attachment). Verify they are not in ld path.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "BSD 2-Clause License". 13 files have
     unknown license. Detailed output of licensecheck in
     /home/jamesjer/2162872-ghc-constraints/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[x]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Useful -debuginfo package or justification otherwise.
[x]: Package is not known to require an ExcludeArch tag.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 20480 bytes in 2 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[x]: Fully versioned dependency in subpackages if applicable.
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[!]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: ghc-constraints-0.13.4-1.fc39.x86_64.rpm
          ghc-constraints-devel-0.13.4-1.fc39.x86_64.rpm
          ghc-constraints-prof-0.13.4-1.fc39.x86_64.rpm
          ghc-constraints-0.13.4-1.fc39.src.rpm
================================================ rpmlint session starts ================================================
rpmlint: 2.4.0
configuration:
    /usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
rpmlintrc: [PosixPath('/tmp/tmpx8xaxyxm')]
checks: 31, packages: 4

ghc-constraints-devel.x86_64: E: static-library-without-debuginfo /usr/lib64/ghc-8.10.7/constraints-0.13.4/libHSconstraints-0.13.4-GO5pRSziz5hItJOjJSg1OM.a
ghc-constraints-prof.x86_64: E: static-library-without-debuginfo /usr/lib64/ghc-8.10.7/constraints-0.13.4/libHSconstraints-0.13.4-GO5pRSziz5hItJOjJSg1OM_p.a
ghc-constraints.x86_64: W: no-documentation
ghc-constraints-prof.x86_64: W: no-documentation
ghc-constraints-prof.x86_64: W: devel-file-in-non-devel-package /usr/lib64/ghc-8.10.7/constraints-0.13.4/libHSconstraints-0.13.4-GO5pRSziz5hItJOjJSg1OM_p.a
================= 4 packages and 0 specfiles checked; 2 errors, 3 warnings, 2 badness; has taken 0.2 s =================




Rpmlint (installed packages)
----------------------------
============================ rpmlint session starts ============================
rpmlint: 2.4.0
configuration:
    /usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 31, packages: 3

ghc-constraints.x86_64: E: unused-direct-shlib-dependency /usr/lib64/libHSconstraints-0.13.4-GO5pRSziz5hItJOjJSg1OM-ghc8.10.7.so /lib64/libHStype-equality-1-Cz1XtPhQ9oP187QHwC5KWz-ghc8.10.7.so
ghc-constraints.x86_64: E: unused-direct-shlib-dependency /usr/lib64/libHSconstraints-0.13.4-GO5pRSziz5hItJOjJSg1OM-ghc8.10.7.so /lib64/libHStransformers-compat-0.6.6-9ADqfwGTALm8Nq2ZeUpa4p-ghc8.10.7.so
ghc-constraints.x86_64: E: unused-direct-shlib-dependency /usr/lib64/libHSconstraints-0.13.4-GO5pRSziz5hItJOjJSg1OM-ghc8.10.7.so /lib64/libHStext-1.2.4.1-ghc8.10.7.so
ghc-constraints.x86_64: E: unused-direct-shlib-dependency /usr/lib64/libHSconstraints-0.13.4-GO5pRSziz5hItJOjJSg1OM-ghc8.10.7.so /lib64/libHStemplate-haskell-2.16.0.0-ghc8.10.7.so
ghc-constraints.x86_64: E: unused-direct-shlib-dependency /usr/lib64/libHSconstraints-0.13.4-GO5pRSziz5hItJOjJSg1OM-ghc8.10.7.so /lib64/libHSpretty-1.1.3.6-ghc8.10.7.so
ghc-constraints.x86_64: E: unused-direct-shlib-dependency /usr/lib64/libHSconstraints-0.13.4-GO5pRSziz5hItJOjJSg1OM-ghc8.10.7.so /lib64/libHSghc-boot-th-8.10.7-ghc8.10.7.so
ghc-constraints.x86_64: E: unused-direct-shlib-dependency /usr/lib64/libHSconstraints-0.13.4-GO5pRSziz5hItJOjJSg1OM-ghc8.10.7.so /lib64/libHScontainers-0.6.5.1-ghc8.10.7.so
ghc-constraints.x86_64: E: unused-direct-shlib-dependency /usr/lib64/libHSconstraints-0.13.4-GO5pRSziz5hItJOjJSg1OM-ghc8.10.7.so /lib64/libHSbytestring-0.10.12.0-ghc8.10.7.so
ghc-constraints.x86_64: E: unused-direct-shlib-dependency /usr/lib64/libHSconstraints-0.13.4-GO5pRSziz5hItJOjJSg1OM-ghc8.10.7.so /lib64/libHSarray-0.5.4.0-ghc8.10.7.so
ghc-constraints.x86_64: E: unused-direct-shlib-dependency /usr/lib64/libHSconstraints-0.13.4-GO5pRSziz5hItJOjJSg1OM-ghc8.10.7.so /lib64/libgmp.so.10
ghc-constraints.x86_64: E: unused-direct-shlib-dependency /usr/lib64/libHSconstraints-0.13.4-GO5pRSziz5hItJOjJSg1OM-ghc8.10.7.so /lib64/libm.so.6
[Many undefined-non-weak-symbol warnings removed here]
ghc-constraints-devel.x86_64: E: static-library-without-debuginfo /usr/lib64/ghc-8.10.7/constraints-0.13.4/libHSconstraints-0.13.4-GO5pRSziz5hItJOjJSg1OM.a
ghc-constraints-prof.x86_64: E: static-library-without-debuginfo /usr/lib64/ghc-8.10.7/constraints-0.13.4/libHSconstraints-0.13.4-GO5pRSziz5hItJOjJSg1OM_p.a
ghc-constraints.x86_64: W: no-documentation
ghc-constraints-prof.x86_64: W: no-documentation
ghc-constraints-prof.x86_64: W: devel-file-in-non-devel-package /usr/lib64/ghc-8.10.7/constraints-0.13.4/libHSconstraints-0.13.4-GO5pRSziz5hItJOjJSg1OM_p.a
 3 packages and 0 specfiles checked; 744 errors, 3 warnings, 744 badness; has taken 0.3 s 



Unversioned so-files
--------------------
ghc-constraints: /usr/lib64/libHSconstraints-0.13.4-GO5pRSziz5hItJOjJSg1OM-ghc8.10.7.so

Source checksums
----------------
https://hackage.haskell.org/package/constraints-0.13.4/constraints-0.13.4.tar.gz :
  CHECKSUM(SHA256) this package     : 4186946df4b88c5d7cae3a42aa426f30fd5d249835ea1d290e139cebbf464434
  CHECKSUM(SHA256) upstream package : 4186946df4b88c5d7cae3a42aa426f30fd5d249835ea1d290e139cebbf464434


Requires
--------
ghc-constraints (rpmlib, GLIBC filtered):
    libHSarray-0.5.4.0-ghc8.10.7.so()(64bit)
    libHSbase-4.14.3.0-ghc8.10.7.so()(64bit)
    libHSbinary-0.8.8.0-ghc8.10.7.so()(64bit)
    libHSbytestring-0.10.12.0-ghc8.10.7.so()(64bit)
    libHScontainers-0.6.5.1-ghc8.10.7.so()(64bit)
    libHSdeepseq-1.4.4.0-ghc8.10.7.so()(64bit)
    libHSghc-boot-th-8.10.7-ghc8.10.7.so()(64bit)
    libHSghc-prim-0.6.1-ghc8.10.7.so()(64bit)
    libHShashable-1.3.0.0-DKy9JIeMjEpEMnRxDSJKj1-ghc8.10.7.so()(64bit)
    libHSinteger-gmp-1.0.3.0-ghc8.10.7.so()(64bit)
    libHSmtl-2.2.2-ghc8.10.7.so()(64bit)
    libHSpretty-1.1.3.6-ghc8.10.7.so()(64bit)
    libHStemplate-haskell-2.16.0.0-ghc8.10.7.so()(64bit)
    libHStext-1.2.4.1-ghc8.10.7.so()(64bit)
    libHStransformers-0.5.6.2-ghc8.10.7.so()(64bit)
    libHStransformers-compat-0.6.6-9ADqfwGTALm8Nq2ZeUpa4p-ghc8.10.7.so()(64bit)
    libHStype-equality-1-Cz1XtPhQ9oP187QHwC5KWz-ghc8.10.7.so()(64bit)
    libc.so.6()(64bit)
    libgmp.so.10()(64bit)
    libm.so.6()(64bit)
    rtld(GNU_HASH)

ghc-constraints-devel (rpmlib, GLIBC filtered):
    ghc-compiler
    ghc-constraints(x86-64)
    ghc-devel(base-4.14.3.0)
    ghc-devel(binary-0.8.8.0)
    ghc-devel(deepseq-1.4.4.0)
    ghc-devel(ghc-prim-0.6.1)
    ghc-devel(hashable-1.3.0.0-DKy9JIeMjEpEMnRxDSJKj1)
    ghc-devel(mtl-2.2.2)
    ghc-devel(transformers-0.5.6.2)
    ghc-devel(transformers-compat-0.6.6-9ADqfwGTALm8Nq2ZeUpa4p)
    ghc-devel(type-equality-1-Cz1XtPhQ9oP187QHwC5KWz)

ghc-constraints-prof (rpmlib, GLIBC filtered):
    ghc-constraints-devel(x86-64)
    ghc-prof(base-4.14.3.0)
    ghc-prof(binary-0.8.8.0)
    ghc-prof(deepseq-1.4.4.0)
    ghc-prof(ghc-prim-0.6.1)
    ghc-prof(hashable-1.3.0.0-DKy9JIeMjEpEMnRxDSJKj1)
    ghc-prof(mtl-2.2.2)
    ghc-prof(transformers-0.5.6.2)
    ghc-prof(transformers-compat-0.6.6-9ADqfwGTALm8Nq2ZeUpa4p)
    ghc-prof(type-equality-1-Cz1XtPhQ9oP187QHwC5KWz)



Provides
--------
ghc-constraints:
    ghc-constraints
    ghc-constraints(x86-64)
    libHSconstraints-0.13.4-GO5pRSziz5hItJOjJSg1OM-ghc8.10.7.so()(64bit)

ghc-constraints-devel:
    ghc-constraints-devel
    ghc-constraints-devel(x86-64)
    ghc-constraints-static
    ghc-constraints-static(x86-64)
    ghc-devel(constraints-0.13.4-GO5pRSziz5hItJOjJSg1OM)

ghc-constraints-prof:
    ghc-constraints-prof
    ghc-constraints-prof(x86-64)
    ghc-prof(constraints-0.13.4-GO5pRSziz5hItJOjJSg1OM)



Generated by fedora-review 0.9.0 (6761b6c) last change: 2022-08-23
Command line :/usr/bin/fedora-review -b 2162872 -m fedora-rawhide-x86_64
Buildroot used: fedora-rawhide-x86_64
Active plugins: C/C++, Generic, Haskell, Shell-api
Disabled plugins: fonts, PHP, Java, Ruby, R, Python, SugarActivity, Perl, Ocaml
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 4 Jens Petersen 2023-03-22 03:57:43 UTC
Thanks, Jerry, for reviewing
Sorry for missing this - I was also away for a couple of weeks..

(In reply to Jerry James from comment #3)
> I assume those symbols are provided by the Haskell runtime.

I think that is correct

> - There is no %check script, but the upstream sources contain a tests
>   subdirectory.  Is it possible and advisable to run those tests?

The testsuite can be enabled I think.
Somehow the packaging tool thought one of its deps was missing.

> - Are the unused-direct-shlib-dependency rpmlint warnings normal for a
> Haskell package?  If not, this library is overlinked.

Could this be related with the undefined-non-weak-symbol warning?
I don't think it is overlinked.

> - Are the static-library-without-debuginfo rpmlint warnings normal for a
> Haskell package?

I believe it is normal: ghc isn't generating dwarf output.


Anyway let me update and rebuild with the newer ghc-9.2.6 (which is built a bit differently to ghc-8.10.7 in F37).

Comment 6 Jerry James 2023-03-22 16:18:25 UTC
(In reply to Jens Petersen from comment #4)
> Could this be related with the undefined-non-weak-symbol warning?
> I don't think it is overlinked.

Actually, the library is overlinked, in the sense that it is directly linked with libraries that supply no symbols it needs.  You can verify this by running "ldd -u /usr/lib64/ghc-9.2.6/lib/libHSconstraints-0.13.4-InOzZ0BhTs66yu6vYmTru-ghc9.2.6.so".  This suggests it was linked without -Wl,--as-needed.  Then again, this seems to be true of every other Haskell shared library.  Perhaps -Wl,--as-needed is not used when linking Haskell libraries?  Sorry if I am asking stupid questions.  I know very little about the ghc toolchain.

Interestingly, the libraries in /usr/lib64/ghc-9.2.6/lib do not have the GNU_RELRO program header, meaning they were linked without -Wl,-z,relro, but the libraries in the x86_64-linux-ghc-9.2.6 subdirectory do have that header.

Anyway, this package uses the required macros to build and install, so all this must be oddities of the way ghc is used in Fedora.  This package is APPROVED.

Comment 7 Jens Petersen 2023-04-02 12:35:40 UTC
Thank you, Jerry

I filed https://gitlab.haskell.org/ghc/ghc/-/issues/23216
about the overlinking issue you mentioned.
Let's see what upstream thinks about it.

(In reply to Jerry James from comment #6)
> Actually, the library is overlinked, in the sense that it is directly linked
> with libraries that supply no symbols it needs.  You can verify this by
> running "ldd -u
> /usr/lib64/ghc-9.2.6/lib/libHSconstraints-0.13.4-InOzZ0BhTs66yu6vYmTru-ghc9.
> 2.6.so".  This suggests it was linked without -Wl,--as-needed.  Then again,
> this seems to be true of every other Haskell shared library.  Perhaps
> -Wl,--as-needed is not used when linking Haskell libraries?  Sorry if I am
> asking stupid questions.  I know very little about the ghc toolchain.
> 
> Interestingly, the libraries in /usr/lib64/ghc-9.2.6/lib do not have the
> GNU_RELRO program header, meaning they were linked without -Wl,-z,relro, but
> the libraries in the x86_64-linux-ghc-9.2.6 subdirectory do have that header.

Okay, I don't know enough about linking to understand the implications.

Comment 8 Jens Petersen 2023-04-02 12:37:03 UTC
Thank you for the review, Jerry

https://pagure.io/releng/fedora-scm-requests/issue/52434

Comment 9 Fedora Admin user for bugzilla script actions 2023-04-02 12:37:05 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/ghc-constraints

Comment 10 Jens Petersen 2023-04-16 00:52:57 UTC
(In reply to Jerry James from comment #6)
> Interestingly, the libraries in /usr/lib64/ghc-9.2.6/lib do not have the
> GNU_RELRO program header, meaning they were linked without -Wl,-z,relro, but
> the libraries in the x86_64-linux-ghc-9.2.6 subdirectory do have that header.

Coming back to this (since the upstream issue got closed..)

Jerry, do you mean that "-Wl,-z,relro" is causing this problem?
I could try filter that out if it is part of the fedora LDFLAGS.

(The "/usr/lib64/ghc-9.2.6/lib/x86_64-linux-ghc-9.2.6/" libraries
are from ghc itself, where other Haskell libraries live in
"/usr/lib64/ghc-9.2.6/lib/".)

Comment 11 Red Hat Bugzilla 2023-09-19 04:32:40 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


Note You need to log in before you can comment on or make changes to this bug.