Bug 1993600 - Review Request: c2hs - C->Haskell FFI tool that gives some cross-language type safety
Summary: Review Request: c2hs - C->Haskell FFI tool that gives some cross-language typ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-14 12:46 UTC by Jens Petersen
Modified: 2023-08-12 04:24 UTC (History)
3 users (show)

Fixed In Version: c2hs-0.28.8-1.fc39
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-08-12 04:22:13 UTC
Type: ---
Embargoed:
spotrh: fedora-review+


Attachments (Terms of Use)

Description Jens Petersen 2021-08-14 12:46:49 UTC
Spec URL: https://petersen.fedorapeople.org/reviews/c2hs/c2hs.spec
SRPM URL: https://petersen.fedorapeople.org/reviews/c2hs/c2hs-0.28.8-1.fc35.src.rpm

Description:
C->Haskell assists in the development of Haskell bindings to C libraries.
It extracts interface information from C header files and generates Haskell
code with foreign imports and marshaling. Unlike writing foreign imports by
hand (or using hsc2hs), this ensures that C functions are imported with the
correct Haskell types.


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

Comment 1 Package Review 2022-08-15 00:45:19 UTC
This is an automatic check from review-stats script.

This review request ticket hasn't been updated for some time. We're sorry
it is taking so long. If you're still interested in packaging this software
into Fedora repositories, please respond to this comment clearing the
NEEDINFO flag.

You may want to update the specfile and the src.rpm to the latest version
available and to propose a review swap on Fedora devel mailing list to increase
chances to have your package reviewed. If this is your first package and you
need a sponsor, you may want to post some informal reviews. Read more at
https://fedoraproject.org/wiki/How_to_get_sponsored_into_the_packager_group.

Without any reply, this request will shortly be considered abandoned
and will be closed.
Thank you for your patience.

Comment 2 Soumil 2022-11-18 01:21:38 UTC
Package Review
==============

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


Issues:
=======
- If your application is a C or C++ application you must list a
  BuildRequires against gcc, gcc-c++ or clang.
  Note: No gcc, gcc-c++ or clang found in BuildRequires
  See: https://docs.fedoraproject.org/en-US/packaging-guidelines/C_and_C++/


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

C/C++:
[ ]: Package does not contain kernel modules.
[ ]: Package contains no static executables.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

Generic:
[ ]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[ ]: 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 3-Clause License", "GNU General
     Public License v2.0 or later [obsolete FSF postal address (Mass
     Ave)]", "*No copyright* GNU General Public License v2.0 or later
     [obsolete FSF postal address (Mass Ave)]", "GNU General Public
     License, Version 2", "GNU General Public License v2.0 or later", "GNU
     Library General Public License v2 or later", "*No copyright* Public
     domain", "GNU Lesser General Public License v2.1 or later". 209 files
     have unknown license. Detailed output of licensecheck in
     /home/soumil/1993600-c2hs/licensecheck.txt
[ ]: %build honors applicable compiler flags or justifies otherwise.
[ ]: Package contains no bundled libraries without FPC exception.
[ ]: Changelog in prescribed format.
[ ]: Sources contain only permissible code or content.
[ ]: Package contains desktop file if it is a GUI application.
[ ]: Development files must be in a -devel package
[ ]: Package uses nothing in %doc for runtime.
[ ]: Package consistently uses macros (instead of hard-coded directory
     names).
[ ]: Package is named according to the Package Naming Guidelines.
[ ]: Package does not generate any conflict.
[ ]: Package obeys FHS, except libexecdir and /usr/target.
[ ]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[ ]: Requires correct, justified where necessary.
[ ]: Spec file is legible and written in American English.
[ ]: Package contains systemd file(s) if in need.
[ ]: Useful -debuginfo package or justification otherwise.
[ ]: Package is not known to require an ExcludeArch tag.
[ ]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 61440 bytes in 4 files.
[ ]: 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.
[ ]: Final provides and requires are sane (see attachments).
[ ]: Package functions as described.
[ ]: Latest version is packaged.
[ ]: 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.
[ ]: Package should compile and build into binary rpms on all supported
     architectures.
[ ]: %check is present and all tests pass.
[ ]: 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
-------
Cannot parse rpmlint output:


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

c2hs.x86_64: W: position-independent-executable-suggested /usr/bin/c2hs
c2hs.x86_64: W: no-manual-page-for-binary c2hs
c2hs.x86_64: E: incorrect-fsf-address /usr/share/licenses/c2hs/COPYING
 1 packages and 0 specfiles checked; 1 errors, 2 warnings, 1 badness; has taken 0.3 s 



Source checksums
----------------
https://hackage.haskell.org/package/c2hs-0.28.8/c2hs-0.28.8.tar.gz :
  CHECKSUM(SHA256) this package     : 390632cffc561c32483af474aac50168a68f0fa382096552e37749923617884c
  CHECKSUM(SHA256) upstream package : 390632cffc561c32483af474aac50168a68f0fa382096552e37749923617884c


Requires
--------
c2hs (rpmlib, GLIBC filtered):
    libc.so.6()(64bit)
    libffi.so.8()(64bit)
    libffi.so.8(LIBFFI_BASE_8.0)(64bit)
    libffi.so.8(LIBFFI_CLOSURE_8.0)(64bit)
    libgmp.so.10()(64bit)
    libm.so.6()(64bit)
    rtld(GNU_HASH)



Provides
--------
c2hs:
    c2hs
    c2hs(x86-64)

Comment 3 Jens Petersen 2022-11-19 06:47:10 UTC
I opened https://github.com/haskell/c2hs/pull/283 to refresh the COPYING file

Comment 4 Tom "spot" Callaway 2023-08-04 13:18:47 UTC
License tag isn't quite right. Core code is GPL-2.0-or-later, but C2HS.hs is BSD-3-Clause, and src/Text/Lexers.hs is LGPL-2.1-or-later.

doc/c2hs.xml is GFDL-1.1-no-invariants-or-later, BUT I don't see it packaged here. 

I think the correct License tag should be:

License: BSD-3-Clause AND GPL-2.0-or-later AND LGPL-2.1-or-later

Please update the license tag before you commit, but this is otherwise approved.

- rpmlint checks return:
c2hs.x86_64: W: position-independent-executable-suggested /usr/bin/c2hs
c2hs.x86_64: W: no-manual-page-for-binary c2hs
c2hs.x86_64: E: incorrect-fsf-address /usr/share/licenses/c2hs/COPYING

Not sure if a Haskell binary can be PIE. Defer to you on that.

- package meets naming guidelines
- package meets packaging guidelines
- license tag needs updating, GPL-2.0 text in %doc
- spec file legible, in am. english
- source matches upstream
- package compiles on devel (x86_64)
- no missing BR
- no unnecessary BR
- no locales
- not relocatable
- owns all directories that it creates
- no duplicate files
- permissions ok
- macro use consistent
- code, not content
- no need for -docs
- nothing in %doc affects runtime
- no need for .desktop file

Comment 5 Fedora Admin user for bugzilla script actions 2023-08-04 14:06:34 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/c2hs

Comment 6 Jens Petersen 2023-08-04 14:40:04 UTC
Thank you, also for checking the licensing

Comment 8 Fedora Update System 2023-08-04 17:00:03 UTC
FEDORA-2023-2eb6d3f0e8 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-2eb6d3f0e8

Comment 9 Fedora Update System 2023-08-04 17:14:07 UTC
FEDORA-2023-4bc4f8de82 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-4bc4f8de82

Comment 11 Fedora Update System 2023-08-05 02:15:00 UTC
FEDORA-2023-2eb6d3f0e8 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-2eb6d3f0e8 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-2eb6d3f0e8

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2023-08-05 02:34:40 UTC
FEDORA-2023-4bc4f8de82 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-4bc4f8de82 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-4bc4f8de82

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2023-08-12 04:22:13 UTC
FEDORA-2023-2eb6d3f0e8 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 14 Fedora Update System 2023-08-12 04:24:06 UTC
FEDORA-2023-4bc4f8de82 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.


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