Bug 2291289

Summary: Review Request: ocaml-linenoise - Self-contained OCaml bindings to linenoise, easy high level readline functionality in OCaml
Product: [Fedora] Fedora Reporter: U2FsdGVkX1
Component: Package ReviewAssignee: Jerry James <loganjerry>
Status: CLOSED COMPLETED QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: loganjerry, package-review, rjones
Target Milestone: ---Flags: loganjerry: fedora-review+
Target Release: ---   
Hardware: All   
OS: Linux   
URL: https://github.com/ocaml-community/%{name}
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-05-27 13:49:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
The .spec file difference from Copr build 7639757 to 8088127 none

Description U2FsdGVkX1 2024-06-11 09:05:55 UTC
Spec URL: https://github.com/fedora-sail/ocaml-linenoise/blob/master/ocaml-linenoise.spec
SRPM URL: https://github.com/fedora-sail/ocaml-linenoise
Description: Self-contained OCaml bindings to linenoise, easy high level readline functionality in OCaml
Fedora Account System Username: U2FsdGVkX1

Comment 1 Fedora Review Service 2024-06-11 09:05:58 UTC
Cannot find any valid SRPM URL for this ticket. Common causes are:

- You didn't specify `SRPM URL: ...` in the ticket description
  or any of your comments
- The URL schema isn't HTTP or HTTPS
- The SRPM package linked in your URL doesn't match the package name specified
  in the ticket summary


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

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 3 Fedora Review Service 2024-06-21 04:42:46 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/7639757
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2291289-ocaml-linenoise/fedora-rawhide-x86_64/07639757-ocaml-linenoise/fedora-review/review.txt

Found issues:

- No gcc, gcc-c++ or clang found in BuildRequires
  Read more: https://docs.fedoraproject.org/en-US/packaging-guidelines/C_and_C++/
- Not a valid SPDX expression 'BSD'. It seems that you are using the old Fedora license abbreviations. Try `license-fedora2spdx' for converting it to SPDX.
  Read more: https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_1

Please know that there can be false-positives.

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

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 4 Jerry James 2024-06-29 14:08:46 UTC
I will take this review.  If you are willing to exchange reviews, I could use a review of bug 2294766.

Comment 5 Jerry James 2024-06-29 14:28:13 UTC
Package Review
==============

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

Issues:
=======
- The License field must be a valid SPDX expression.
  Note: Not a valid SPDX expression 'BSD'. It seems that you are using the
  old Fedora license abbreviations. Try `license-fedora2spdx' for
  converting it to SPDX.
  See: https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_1

  The SPDX license name is given in linenoise.opam.

- This package bundles the linenoise library, which is available in Fedora.
  Can it be unbundled?  See
  https://docs.fedoraproject.org/en-US/packaging-guidelines/#bundling

- The ocaml-odoc BuildRequires is not used.  Either remove it (which is my
  recommendation), or build and package the documentation.

- The minimum version numbers for the ocaml and ocaml-dune BuildRequires do
  not match those given in linenoise.opam.  Is there some reason for the
  discrepancy?

- The Summary is too long; see the summary-too-long rpmlint warning below.
  Something like "OCaml bindings to linenoise" is probably sufficient.

- Please wrap the text in %description at about 72 characters.  See the
  description-line-too-long rpmlint warning below.

- OCaml packages are not built for 32-bit x86 any more.  All current OCaml
  spec files contain these two lines:

# OCaml packages not built on i686 since OCaml 5 / Fedora 39.
ExcludeArch:    %{ix86}

- Please ask upstream to include a license file in future release tarballs.

- Version 1.5.1 has been released.  Please update.

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

C/C++:
[x]: Package does not contain kernel modules.
[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]: Header files in -devel subpackage, if present.
[x]: Package does not contain any libtool archives (.la)
[x]: Package contains no static executables.
[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]: 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.
[!]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "*No copyright* BSD 3-Clause License",
     "BSD 2-Clause License". 13 files have unknown license. Detailed output
     of licensecheck in /home/jamesjer/2291289-ocaml-
     linenoise/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[x]: %build honors applicable compiler flags or justifies otherwise.
[!]: 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]: 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]: 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]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 2309 bytes in 2 files.
[x]: Packages must not store files under /srv, /opt or /usr/local

Ocaml:
[x]: This should never happen

===== 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]: Package functions as described.
[!]: 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.
[x]: %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]: Fully versioned dependency in subpackages if applicable.
[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:
[!]: Spec file according to URL is the same as in SRPM.
     Note: Spec file as given by url is not the same as in SRPM (see
     attached diff).
     See: (this test has no URL)
[x]: Rpmlint is run on debuginfo package(s).
     Note: No rpmlint messages.
[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.


Rpmlint
-------
Checking: ocaml-linenoise-1.5-1.fc41.x86_64.rpm
          ocaml-linenoise-devel-1.5-1.fc41.x86_64.rpm
          ocaml-linenoise-debuginfo-1.5-1.fc41.x86_64.rpm
          ocaml-linenoise-debugsource-1.5-1.fc41.x86_64.rpm
          ocaml-linenoise-1.5-1.fc41.src.rpm
================================================ rpmlint session starts ================================================
rpmlint: 2.5.0
configuration:
    /usr/lib/python3.12/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/tmpn27uh947')]
checks: 32, packages: 5

ocaml-linenoise.src: E: summary-too-long Self-contained OCaml bindings to linenoise, easy high level readline functionality in OCaml
ocaml-linenoise.x86_64: E: summary-too-long Self-contained OCaml bindings to linenoise, easy high level readline functionality in OCaml
ocaml-linenoise-devel.x86_64: E: static-library-without-debuginfo /usr/lib64/ocaml/linenoise/liblinenoise_stubs.a
ocaml-linenoise-devel.x86_64: E: static-library-without-debuginfo /usr/lib64/ocaml/linenoise/linenoise.a
ocaml-linenoise.src: E: spelling-error ('readline', 'Summary(en_US) readline -> breadline, deadline, headline')
ocaml-linenoise.src: E: spelling-error ('readline', '%description -l en_US readline -> breadline, deadline, headline')
ocaml-linenoise.x86_64: E: spelling-error ('readline', 'Summary(en_US) readline -> breadline, deadline, headline')
ocaml-linenoise.x86_64: E: spelling-error ('readline', '%description -l en_US readline -> breadline, deadline, headline')
ocaml-linenoise-devel.x86_64: W: no-documentation
ocaml-linenoise.src: E: description-line-too-long Self-contained OCaml bindings to linenoise, easy high level readline functionality in OCaml
ocaml-linenoise.x86_64: E: description-line-too-long Self-contained OCaml bindings to linenoise, easy high level readline functionality in OCaml
========= 5 packages and 0 specfiles checked; 10 errors, 1 warnings, 27 filtered, 10 badness; has taken 0.5 s ==========




Rpmlint (debuginfo)
-------------------
Checking: ocaml-linenoise-debuginfo-1.5-1.fc41.x86_64.rpm
================================================ rpmlint session starts ================================================
rpmlint: 2.5.0
configuration:
    /usr/lib/python3.12/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/tmpfdp6yn2h')]
checks: 32, packages: 1

========== 1 packages and 0 specfiles checked; 0 errors, 0 warnings, 12 filtered, 0 badness; has taken 0.1 s ===========





Rpmlint (installed packages)
----------------------------
============================ rpmlint session starts ============================
rpmlint: 2.5.0
configuration:
    /usr/lib/python3.13/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: 32, packages: 4

ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/linenoise/linenoise.cmxs camlStdlib__Sys__Pmakeblock_419	(/usr/lib64/ocaml/linenoise/linenoise.cmxs)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/linenoise/linenoise.cmxs caml_named_value	(/usr/lib64/ocaml/linenoise/linenoise.cmxs)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/linenoise/linenoise.cmxs camlStdlib__Callback.register_8	(/usr/lib64/ocaml/linenoise/linenoise.cmxs)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/linenoise/linenoise.cmxs caml_stat_free	(/usr/lib64/ocaml/linenoise/linenoise.cmxs)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/linenoise/linenoise.cmxs camlStdlib__Callback.register_exception_16	(/usr/lib64/ocaml/linenoise/linenoise.cmxs)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/linenoise/linenoise.cmxs caml_c_call	(/usr/lib64/ocaml/linenoise/linenoise.cmxs)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/linenoise/linenoise.cmxs caml_callback2	(/usr/lib64/ocaml/linenoise/linenoise.cmxs)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/linenoise/linenoise.cmxs caml_call_realloc_stack	(/usr/lib64/ocaml/linenoise/linenoise.cmxs)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/linenoise/linenoise.cmxs caml_leave_blocking_section	(/usr/lib64/ocaml/linenoise/linenoise.cmxs)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/linenoise/linenoise.cmxs caml_alloc	(/usr/lib64/ocaml/linenoise/linenoise.cmxs)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/linenoise/linenoise.cmxs caml_alloc1	(/usr/lib64/ocaml/linenoise/linenoise.cmxs)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/linenoise/linenoise.cmxs caml_enter_blocking_section	(/usr/lib64/ocaml/linenoise/linenoise.cmxs)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/linenoise/linenoise.cmxs caml_raise_constant	(/usr/lib64/ocaml/linenoise/linenoise.cmxs)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/linenoise/linenoise.cmxs caml_initialize	(/usr/lib64/ocaml/linenoise/linenoise.cmxs)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/linenoise/linenoise.cmxs caml_call_gc	(/usr/lib64/ocaml/linenoise/linenoise.cmxs)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/linenoise/linenoise.cmxs caml_modify	(/usr/lib64/ocaml/linenoise/linenoise.cmxs)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/linenoise/linenoise.cmxs caml_bad_caml_state	(/usr/lib64/ocaml/linenoise/linenoise.cmxs)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/linenoise/linenoise.cmxs caml_copy_string	(/usr/lib64/ocaml/linenoise/linenoise.cmxs)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/linenoise/linenoise.cmxs caml_stat_strdup	(/usr/lib64/ocaml/linenoise/linenoise.cmxs)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/linenoise/linenoise.cmxs caml_callback	(/usr/lib64/ocaml/linenoise/linenoise.cmxs)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/linenoise/linenoise.cmxs caml_state	(/usr/lib64/ocaml/linenoise/linenoise.cmxs)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so caml_named_value	(/usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so caml_stat_free	(/usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so caml_callback2	(/usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so caml_leave_blocking_section	(/usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so caml_alloc	(/usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so caml_enter_blocking_section	(/usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so caml_raise_constant	(/usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so caml_modify	(/usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so caml_bad_caml_state	(/usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so caml_copy_string	(/usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so caml_stat_strdup	(/usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so caml_callback	(/usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so caml_state	(/usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so)
ocaml-linenoise.x86_64: E: summary-too-long Self-contained OCaml bindings to linenoise, easy high level readline functionality in OCaml
ocaml-linenoise-devel.x86_64: E: static-library-without-debuginfo /usr/lib64/ocaml/linenoise/liblinenoise_stubs.a
ocaml-linenoise-devel.x86_64: E: static-library-without-debuginfo /usr/lib64/ocaml/linenoise/linenoise.a
ocaml-linenoise.x86_64: E: spelling-error ('readline', 'Summary(en_US) readline -> breadline, deadline, headline')
ocaml-linenoise.x86_64: E: spelling-error ('readline', '%description -l en_US readline -> breadline, deadline, headline')
ocaml-linenoise-devel.x86_64: W: no-documentation
ocaml-linenoise.x86_64: E: description-line-too-long Self-contained OCaml bindings to linenoise, easy high level readline functionality in OCaml
 4 packages and 0 specfiles checked; 6 errors, 35 warnings, 25 filtered, 6 badness; has taken 0.7 s 



Unversioned so-files
--------------------
ocaml-linenoise: /usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so

Source checksums
----------------
https://github.com/ocaml-community/ocaml-linenoise/archive/v1.5/linenoise-v1.5.tar.gz :
  CHECKSUM(SHA256) this package     : fb414e04def9ff529821c61513c225298769999dd9d70477a3c2740e2b9cc334
  CHECKSUM(SHA256) upstream package : fb414e04def9ff529821c61513c225298769999dd9d70477a3c2740e2b9cc334


Requires
--------
ocaml-linenoise (rpmlib, GLIBC filtered):
    libc.so.6()(64bit)
    ocaml(CamlinternalFormatBasics)
    ocaml(Stdlib)
    ocaml(Stdlib__Callback)
    ocaml(Stdlib__Sys)
    rtld(GNU_HASH)

ocaml-linenoise-devel (rpmlib, GLIBC filtered):
    ocaml(CamlinternalFormatBasics)
    ocaml(Stdlib)
    ocaml(Stdlib__Callback)
    ocaml(Stdlib__Sys)
    ocaml-linenoise(x86-64)
    ocamlx(Stdlib__Callback)
    ocamlx(Stdlib__Sys)

ocaml-linenoise-debuginfo (rpmlib, GLIBC filtered):

ocaml-linenoise-debugsource (rpmlib, GLIBC filtered):



Provides
--------
ocaml-linenoise:
    ocaml(LNoise)
    ocaml-linenoise
    ocaml-linenoise(x86-64)

ocaml-linenoise-devel:
    ocaml(LNoise)
    ocaml-linenoise-devel
    ocaml-linenoise-devel(x86-64)
    ocamlx(LNoise)

ocaml-linenoise-debuginfo:
    debuginfo(build-id)
    ocaml-linenoise-debuginfo
    ocaml-linenoise-debuginfo(x86-64)

ocaml-linenoise-debugsource:
    ocaml-linenoise-debugsource
    ocaml-linenoise-debugsource(x86-64)



Diff spec file in url and in SRPM
---------------------------------
--- /home/jamesjer/2291289-ocaml-linenoise/srpm/ocaml-linenoise.spec	2024-06-29 07:59:20.652282539 -0600
+++ /home/jamesjer/2291289-ocaml-linenoise/srpm-unpacked/ocaml-linenoise.spec	2024-05-01 18:00:00.000000000 -0600
@@ -1,2 +1,12 @@
+## START: Set by rpmautospec
+## (rpmautospec version 0.6.3)
+## RPMAUTOSPEC: autorelease, autochangelog
+%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
+    release_number = 1;
+    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
+    print(release_number + base_release_number - 1);
+}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
+## END: Set by rpmautospec
+
 Name:           ocaml-linenoise
 Version:        1.5
@@ -41,3 +51,6 @@
 
 %changelog
-%autochangelog
+## START: Generated by rpmautospec
+* Thu May 02 2024 U2FsdGVkX1 <U2FsdGVkX1> - 1.5-1
+- first commit
+## END: Generated by rpmautospec


Generated by fedora-review 0.10.0 (e79b66b) last change: 2023-07-24
Command line :/usr/bin/fedora-review -b 2291289 -m fedora-rawhide-x86_64
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Ocaml, Shell-api, C/C++
Disabled plugins: Perl, Java, Python, SugarActivity, Haskell, PHP, Ruby, fonts, R
Disabled flags: EXARCH, EPEL6, EPEL7, DISTTAG, BATCH

Comment 6 U2FsdGVkX1 2024-07-09 09:00:23 UTC
(In reply to Jerry James from comment #4)
> I will take this review.  If you are willing to exchange reviews, I could
> use a review of bug 2294766.

Thank you very much for your review! I have pushed the new version
It seems that it does not provide unbundling, I indicated that it is bundled

Comment 8 Jerry James 2024-07-11 22:24:39 UTC
The 'c' in 'BSD-3-clause' needs to be capitalized.  License names must match those in the allowed list exactly (https://docs.fedoraproject.org/en-US/legal/allowed-licenses/), including punctuation and capitalization.

The Summary is still too long.  If you don't like my suggested wording in comment 5, feel free to shorten it yourself.

With regards to the bundled linenoise library, we are supposed to "make every effort" to avoid it: https://docs.fedoraproject.org/en-US/packaging-guidelines/#bundling.  In this case, some effort is needed, but I think it can be done.

Step 1: patch upstream to use the system linenoise library.  That would look something like this:

--- ocaml-linenoise-1.5.1/src/dune.orig	2024-03-20 13:12:17.000000000 -0600
+++ ocaml-linenoise-1.5.1/src/dune	2024-07-11 15:09:38.626734392 -0600
@@ -5,4 +5,5 @@
   (modules LNoise)
   (wrapped false)
   (flags :standard -warn-error -3)
-  (c_names linenoise_src linenoise_stubs))
+  (c_library_flags -llinenoise)
+  (c_names linenoise_stubs))
--- ocaml-linenoise-1.5.1/src/linenoise_stubs.c.orig	2024-03-20 13:12:17.000000000 -0600
+++ ocaml-linenoise-1.5.1/src/linenoise_stubs.c	2024-07-11 16:07:07.321358220 -0600
@@ -8,7 +8,7 @@
 #include <errno.h>
 #include <assert.h>
 
-#include "linenoise_src.h"
+#include <linenoise.h>
 
 // Ripped from ctypes
 #define Val_none Val_int(0)

If that is in a file named unbundle-linenoise.patch, then the spec file would be altered in the following ways.
- Add:

# Unbundle linenoise
Patch:          unbundle-linenoise.patch

- Remove Provides: bundled(linenoise)
- Add BuildRequires: linenoise-devel
- Do something like this in %prep:

# Ensure the bundled linenoise sources are not used in the build
rm src/linenoise_src.*

Unfortunately, that doesn't work, because upstream has modified the bundled linenoise library.  They added a variable named linenoiseWasInterrupted.  But we can deal with that, I think.

Step 2: open a pull request at https://github.com/antirez/linenoise adding the linenoiseWasInterrupted variable.  For example:

diff --git a/linenoise.c b/linenoise.c
index 574ab1f..d8195f1 100644
--- a/linenoise.c
+++ b/linenoise.c
@@ -159,6 +159,7 @@ enum KEY_ACTION{
 };
 
 static void linenoiseAtExit(void);
+int linenoiseWasInterrupted = 0;
 int linenoiseHistoryAdd(const char *line);
 #define REFRESH_CLEAN (1<<0)    // Clean the old prompt from the screen
 #define REFRESH_WRITE (1<<1)    // Rewrite the prompt on the screen.
@@ -964,6 +965,7 @@ char *linenoiseEditFeed(struct linenoiseState *l) {
         return strdup(l->buf);
     case CTRL_C:     /* ctrl-c */
         errno = EAGAIN;
+        linenoiseWasInterrupted = 1;
         return NULL;
     case BACKSPACE:   /* backspace */
     case 8:     /* ctrl-h */
diff --git a/linenoise.h b/linenoise.h
index 3f0270e..1ec7e47 100644
--- a/linenoise.h
+++ b/linenoise.h
@@ -45,6 +45,7 @@ extern "C" {
 
 #include <stddef.h> /* For size_t. */
 
+extern int linenoiseWasInterrupted; /* nonzero if last keystroke was ctrl-c */
 extern char *linenoiseEditMore;
 
 /* The linenoiseState structure represents the state during line editing.

Since upstream doesn't seem to accept pull requests very often, that will probably need to be followed by step 3.

Step 3: open a pull request at https://src.fedoraproject.org/rpms/linenoise asking the Fedora package maintainer to add the linenoiseWasInterrupted patch, and point to this review request as the justification.  You might want to also ask that the library be updated to current git HEAD.

If any of those steps get bogged down, we can consider bundling, but I think we should give this a try first.

Comment 10 U2FsdGVkX1 2024-09-28 12:46:02 UTC
(In reply to Jerry James from comment #8)
> The 'c' in 'BSD-3-clause' needs to be capitalized.  License names must match
> those in the allowed list exactly
> (https://docs.fedoraproject.org/en-US/legal/allowed-licenses/), including
> punctuation and capitalization.
> 
> The Summary is still too long.  If you don't like my suggested wording in
> comment 5, feel free to shorten it yourself.
> 
> With regards to the bundled linenoise library, we are supposed to "make
> every effort" to avoid it:
> https://docs.fedoraproject.org/en-US/packaging-guidelines/#bundling.  In
> this case, some effort is needed, but I think it can be done.
> 
> Step 1: patch upstream to use the system linenoise library.  That would look
> something like this:
> 
> --- ocaml-linenoise-1.5.1/src/dune.orig	2024-03-20 13:12:17.000000000 -0600
> +++ ocaml-linenoise-1.5.1/src/dune	2024-07-11 15:09:38.626734392 -0600
> @@ -5,4 +5,5 @@
>    (modules LNoise)
>    (wrapped false)
>    (flags :standard -warn-error -3)
> -  (c_names linenoise_src linenoise_stubs))
> +  (c_library_flags -llinenoise)
> +  (c_names linenoise_stubs))
> --- ocaml-linenoise-1.5.1/src/linenoise_stubs.c.orig	2024-03-20
> 13:12:17.000000000 -0600
> +++ ocaml-linenoise-1.5.1/src/linenoise_stubs.c	2024-07-11
> 16:07:07.321358220 -0600
> @@ -8,7 +8,7 @@
>  #include <errno.h>
>  #include <assert.h>
>  
> -#include "linenoise_src.h"
> +#include <linenoise.h>
>  
>  // Ripped from ctypes
>  #define Val_none Val_int(0)
> 
> If that is in a file named unbundle-linenoise.patch, then the spec file
> would be altered in the following ways.
> - Add:
> 
> # Unbundle linenoise
> Patch:          unbundle-linenoise.patch
> 
> - Remove Provides: bundled(linenoise)
> - Add BuildRequires: linenoise-devel
> - Do something like this in %prep:
> 
> # Ensure the bundled linenoise sources are not used in the build
> rm src/linenoise_src.*
> 
> Unfortunately, that doesn't work, because upstream has modified the bundled
> linenoise library.  They added a variable named linenoiseWasInterrupted. 
> But we can deal with that, I think.
> 
> Step 2: open a pull request at https://github.com/antirez/linenoise adding
> the linenoiseWasInterrupted variable.  For example:
> 
> diff --git a/linenoise.c b/linenoise.c
> index 574ab1f..d8195f1 100644
> --- a/linenoise.c
> +++ b/linenoise.c
> @@ -159,6 +159,7 @@ enum KEY_ACTION{
>  };
>  
>  static void linenoiseAtExit(void);
> +int linenoiseWasInterrupted = 0;
>  int linenoiseHistoryAdd(const char *line);
>  #define REFRESH_CLEAN (1<<0)    // Clean the old prompt from the screen
>  #define REFRESH_WRITE (1<<1)    // Rewrite the prompt on the screen.
> @@ -964,6 +965,7 @@ char *linenoiseEditFeed(struct linenoiseState *l) {
>          return strdup(l->buf);
>      case CTRL_C:     /* ctrl-c */
>          errno = EAGAIN;
> +        linenoiseWasInterrupted = 1;
>          return NULL;
>      case BACKSPACE:   /* backspace */
>      case 8:     /* ctrl-h */
> diff --git a/linenoise.h b/linenoise.h
> index 3f0270e..1ec7e47 100644
> --- a/linenoise.h
> +++ b/linenoise.h
> @@ -45,6 +45,7 @@ extern "C" {
>  
>  #include <stddef.h> /* For size_t. */
>  
> +extern int linenoiseWasInterrupted; /* nonzero if last keystroke was ctrl-c
> */
>  extern char *linenoiseEditMore;
>  
>  /* The linenoiseState structure represents the state during line editing.
> 
> Since upstream doesn't seem to accept pull requests very often, that will
> probably need to be followed by step 3.
> 
> Step 3: open a pull request at https://src.fedoraproject.org/rpms/linenoise
> asking the Fedora package maintainer to add the linenoiseWasInterrupted
> patch, and point to this review request as the justification.  You might
> want to also ask that the library be updated to current git HEAD.
> 
> If any of those steps get bogged down, we can consider bundling, but I think
> we should give this a try first.

Sorry, long time no see
I have opened a pull request, but it has not responded https://github.com/antirez/linenoise/pull/227
So I put the patch on fedora, it has been merged! https://src.fedoraproject.org/rpms/linenoise/pull-request/2
Then I have fixed the above problem, please review it if possible :)

Comment 11 Fedora Review Service 2024-09-28 12:46:46 UTC
Created attachment 2049295 [details]
The .spec file difference from Copr build 7639757 to 8088127

Comment 12 Fedora Review Service 2024-09-28 12:46:48 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/8088127
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2291289-ocaml-linenoise/fedora-rawhide-x86_64/08088127-ocaml-linenoise/fedora-review/review.txt

Found issues:

- No gcc, gcc-c++ or clang found in BuildRequires
  Read more: https://docs.fedoraproject.org/en-US/packaging-guidelines/C_and_C++/

Please know that there can be false-positives.

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

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 13 Jerry James 2024-10-21 21:32:27 UTC
Sorry for the silence.  Unfortunately, I still see these lines in the rpmlint output:

ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/linenoise/linenoise.cmxs linenoiseWasInterrupted	(/usr/lib64/ocaml/linenoise/linenoise.cmxs)
ocaml-linenoise.x86_64: W: undefined-non-weak-symbol /usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so linenoiseWasInterrupted	(/usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so)

and indeed:

$ readelf -Wa /usr/lib64/liblinenoise.so.0.0.0 | grep -F Interrupted
$

This is due to linenoise-symbol-visibility.patch.  I think you will need to add LINENOISE_EXPORTED to the linenoiseWasInterrupted declaration for it to be exported.

Comment 14 U2FsdGVkX1 2024-10-22 02:57:18 UTC
(In reply to Jerry James from comment #13)
> Sorry for the silence.  Unfortunately, I still see these lines in the
> rpmlint output:
> 
> ocaml-linenoise.x86_64: W: undefined-non-weak-symbol
> /usr/lib64/ocaml/linenoise/linenoise.cmxs linenoiseWasInterrupted
> (/usr/lib64/ocaml/linenoise/linenoise.cmxs)
> ocaml-linenoise.x86_64: W: undefined-non-weak-symbol
> /usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so linenoiseWasInterrupted
> (/usr/lib64/ocaml/stublibs/dlllinenoise_stubs.so)
> 
> and indeed:
> 
> $ readelf -Wa /usr/lib64/liblinenoise.so.0.0.0 | grep -F Interrupted
> $
> 
> This is due to linenoise-symbol-visibility.patch.  I think you will need to
> add LINENOISE_EXPORTED to the linenoiseWasInterrupted declaration for it to
> be exported.

https://src.fedoraproject.org/rpms/linenoise/pull-request/3
I have submitted a new Pull Request to fix this problem.
Sorry, I am a new packager and did not find this stupid error.

Comment 15 Jerry James 2024-11-08 15:50:56 UTC
No problem at all.  I see that your pull request has been merged, but the maintainer has not built a new version of the package, so ocaml-linenoise still has the undefined symbol problem.  Can you see if the linenoise maintainer will do a Rawhide build of the fixed version?

Comment 16 U2FsdGVkX1 2025-02-03 11:52:39 UTC
(In reply to Jerry James from comment #15)
> No problem at all.  I see that your pull request has been merged, but the
> maintainer has not built a new version of the package, so ocaml-linenoise
> still has the undefined symbol problem.  Can you see if the linenoise
> maintainer will do a Rawhide build of the fixed version?

the maintainer of linenoise has already built the new version. Could you please take a look and approve it if everything looks good? Thank You!

Comment 17 Jerry James 2025-02-11 23:40:41 UTC
Sorry for the delay.  This looks good now.  This package is APPROVED.

Comment 18 Fedora Admin user for bugzilla script actions 2025-02-27 14:53:55 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/ocaml-linenoise