Bug 2109340 - Review Request: ugrep - Faster, user-friendly, and compatible grep replacement
Summary: Review Request: ugrep - Faster, user-friendly, and compatible grep replacement
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Neal Gompa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-07-21 02:30 UTC by Carl George 🎩
Modified: 2022-08-22 21:39 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2022-08-22 20:02:58 UTC
Type: ---
Embargoed:
ngompa13: fedora-review+


Attachments (Terms of Use)

Description Carl George 🎩 2022-07-21 02:30:10 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/carlwgeorge/reviews/fedora-rawhide-x86_64/04629555-ugrep/ugrep.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/carlwgeorge/reviews/fedora-rawhide-x86_64/04629555-ugrep/ugrep-3.8.3-1.fc37.src.rpm

Description:
Ultra fast grep with interactive TUI, fuzzy search, boolean queries, hexdumps
and more: search file systems, source code, text, binary files, archives
(cpio/tar/pax/zip), compressed files (gz/Z/bz2/lzma/xz/lz4/zstd), documents
etc.  A faster, user-friendly and compatible grep replacement.

Fedora Account System Username: carlwgeorge

Comment 1 Benson Muite 2022-07-21 09:17:52 UTC
Unofficial Review:

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

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



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

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[x]: If your application is a C or C++ application you must list a
     BuildRequires against gcc, gcc-c++ or clang.
[x]: Header files in -devel subpackage, if present.
[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 3-Clause License", "[generated
     file]", "FSF Unlimited License (with License Retention) FSF All
     Permissive License [generated file]", "GNU General Public License v2.0
     or later [generated file]", "GNU General Public License v3.0 or
     later", "FSF Unlimited License [generated file]", "X11 License
     [generated file]", "FSF All Permissive License", "GNU General Public
     License v2.0 or later". 1169 files have unknown license. Detailed
     output of licensecheck in
     /home/FedoraPackaging/ugrep/2109340-ugrep/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.
[-]: 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.
[?]: Package is not known to require an ExcludeArch tag.
[?]: 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]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 0 bytes in 0 files.
[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).
[?]: 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.
[?]: 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:
[x]: Rpmlint is run on debuginfo package(s).
     Note: There are rpmlint messages (see attachment).
[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 (debuginfo)
-------------------
Cannot parse rpmlint output:



Rpmlint (installed packages)
----------------------------
Cannot parse rpmlint output:


Source checksums
----------------
https://github.com/Genivia/ugrep/archive/v3.8.3/ugrep-3.8.3.tar.gz :
  CHECKSUM(SHA256) this package     : deb7e143ee07019fdaa98a4529596d965185542a19
5855c1bfb6779fb8dd5e55
  CHECKSUM(SHA256) upstream package : deb7e143ee07019fdaa98a4529596d965185542a19
5855c1bfb6779fb8dd5e55


Requires
--------
ugrep (rpmlib, GLIBC filtered):
    libbz2.so.1()(64bit)
    libc.so.6()(64bit)
    libgcc_s.so.1()(64bit)
    libgcc_s.so.1(GCC_3.0)(64bit)
    libgcc_s.so.1(GCC_3.3.1)(64bit)
    libgcc_s.so.1(GCC_3.4)(64bit)
    liblz4.so.1()(64bit)
    liblzma.so.5()(64bit)
    liblzma.so.5(XZ_5.0)(64bit)
    libpcre2-8.so.0()(64bit)
    libstdc++.so.6()(64bit)
    libstdc++.so.6(CXXABI_1.3)(64bit)
    libz.so.1()(64bit)
    libzstd.so.1()(64bit)
    rtld(GNU_HASH)

ugrep-debuginfo (rpmlib, GLIBC filtered):

ugrep-debugsource (rpmlib, GLIBC filtered):



Provides
--------
ugrep:
    bundled(libreflex)
    ugrep
    ugrep(x86-64)

ugrep-debuginfo:
    debuginfo(build-id)
    ugrep-debuginfo
    ugrep-debuginfo(x86-64)

ugrep-debugsource:
    ugrep-debugsource
    ugrep-debugsource(x86-64)



Generated by fedora-review 0.8.0 (e988316) last change: 2022-04-07
Command line :/usr/bin/fedora-review -b 2109340
Buildroot used: fedora-rawhide-x86_64
Active plugins: Shell-api, Generic, C/C++
Disabled plugins: Java, Haskell, Perl, R, SugarActivity, PHP, fonts, Python, Ocaml
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

 rpmlint  ./ugrep-3.8.3-1.fc37.src.rpm 
============================ rpmlint session starts ============================
rpmlint: 2.2.0
configuration:
    /usr/lib/python3.10/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/licenses.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 32, packages: 1

 1 packages and 0 specfiles checked; 0 errors, 0 warnings, 0 badness; has taken 6.2 s 

 rpm -qRp ugrep-3.8.3-1.fc37.x86_64.rpm 
libbz2.so.1()(64bit)
libc.so.6()(64bit)
libc.so.6(GLIBC_2.14)(64bit)
libc.so.6(GLIBC_2.15)(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.28)(64bit)
libc.so.6(GLIBC_2.3.4)(64bit)
libc.so.6(GLIBC_2.33)(64bit)
libc.so.6(GLIBC_2.34)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libc.so.6(GLIBC_2.7)(64bit)
libgcc_s.so.1()(64bit)
libgcc_s.so.1(GCC_3.0)(64bit)
libgcc_s.so.1(GCC_3.3.1)(64bit)
libgcc_s.so.1(GCC_3.4)(64bit)
liblz4.so.1()(64bit)
liblzma.so.5()(64bit)
liblzma.so.5(XZ_5.0)(64bit)
libpcre2-8.so.0()(64bit)
libstdc++.so.6()(64bit)
libstdc++.so.6(CXXABI_1.3)(64bit)
libstdc++.so.6(GLIBCXX_3.4)(64bit)
libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
libstdc++.so.6(GLIBCXX_3.4.15)(64bit)
libstdc++.so.6(GLIBCXX_3.4.17)(64bit)
libstdc++.so.6(GLIBCXX_3.4.19)(64bit)
libstdc++.so.6(GLIBCXX_3.4.20)(64bit)
libstdc++.so.6(GLIBCXX_3.4.21)(64bit)
libstdc++.so.6(GLIBCXX_3.4.22)(64bit)
libstdc++.so.6(GLIBCXX_3.4.26)(64bit)
libstdc++.so.6(GLIBCXX_3.4.29)(64bit)
libstdc++.so.6(GLIBCXX_3.4.30)(64bit)
libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
libz.so.1()(64bit)
libzstd.so.1()(64bit)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsZstd) <= 5.4.18-1
rtld(GNU_HASH)

rpm -qPp ugrep-3.8.3-1.fc37.x86_64.rpm 
bundled(libreflex) = 3.2.8
ugrep = 3.8.3-1.fc37
ugrep(x86-64) = 3.8.3-1.fc37

Comments:
a) Should architecture specific builds be available? For example using Neon, SSE2 and AVX instructions.
b) Can RE Flex https://github.com/Genivia/RE-flex be packaged separately, rather than bundled? It seems to be an improvement over Flex https://packages.fedoraproject.org/pkgs/flex/flex/

Comment 2 Benson Muite 2022-07-21 11:27:56 UTC
reflex seems possible to package:
https://copr.fedorainfracloud.org/coprs/fed500/RE-flex/

Comment 3 Carl George 🎩 2022-07-21 19:19:00 UTC
> a) Should architecture specific builds be available? For example using Neon, SSE2 and AVX instructions.

How would that even work?  My understand is those optimizations are enabled by default, and I see no reason to disable them.

> b) Can RE Flex https://github.com/Genivia/RE-flex be packaged separately, rather than bundled? It seems to be an improvement over Flex https://packages.fedoraproject.org/pkgs/flex/flex/

Reflex can be packaged separately, but according to upstream not as a shared library that ugrep can link against.

https://github.com/Genivia/ugrep/issues/215

I have this link as a comment above the bundled provides in my local spec file, but didn't have it in the spec file at the time of the copr build.  I will include that comment when importing.

> reflex seems possible to package:
> https://copr.fedorainfracloud.org/coprs/fed500/RE-flex/

The packages in that copr do not contain a shared library.  The RE-flex package contains the reflex command and man page.  The RE-flex-devel package contains header files and static libraries (*.a).  The packaging guidelines state that static libraries should not be shipped.

https://docs.fedoraproject.org/en-US/packaging-guidelines/#packaging-static-libraries

Comment 4 Benson Muite 2022-07-22 10:16:05 UTC
a) 
> How would that even work? 

SSE2 is enabled by default, however my understanding is that AVX2 and NEON are not.  Rust packages seem to provide different options
when intrinsics are used, se for example
https://packages.fedoraproject.org/pkgs/rust-simdutf8/rust-simdutf8+aarch64_neon-devel/
https://packages.fedoraproject.org/pkgs/rust-curve25519-dalek/rust-curve25519-dalek+avx2_backend-devel/

b) 
> The packages in that copr do not contain a shared library.  The RE-flex package contains the reflex command and man page. 
> The RE-flex-devel package contains header files and static libraries (*.a).  The packaging guidelines state that static libraries 
> should not be shipped.

Updated the copr package at https://copr.fedorainfracloud.org/coprs/fed500/RE-flex/ to have dynamically linked libraries:

> https://github.com/Genivia/ugrep/issues/215 

Maybe it is better to take a diff, and patch RE-flex to build an updated RE-flex for Fedora?  Not sure why updates to RE-flex are difficult as they built by the same person.  Maybe updates on GitHub can be automated? Can suggest this upstream.

Comment 5 Carl George 🎩 2022-07-23 04:57:26 UTC
> SSE2 is enabled by default, however my understanding is that AVX2 and NEON are not.

From an x86_64 build log:

checking for --disable-sse2... no
checking for --disable-avx... no

From an aarch64 build log:

checking for --disable-sse2... no
checking for --disable-neon... no

They look to be enabled by default to me, since a flag to disable them is available and checked for during compilation.  Since this isn't a noarch package, each architecture-specific build of ugrep will have the features that architecture supports.

> Rust packages seem to provide different options when intrinsics are used, se for example

Those rust packages are not doing anything different with compilation.  They are nearly empty meta-packages that map to crate "features", which is a way to specify optional dependencies.  The aarch64_neon and avx2_backend names are just feature names that other rust software can depend on.

https://doc.rust-lang.org/cargo/reference/features.html
https://github.com/rusticstuff/simdutf8/blob/v0.1.4/Cargo.toml#L35
https://github.com/dalek-cryptography/curve25519-dalek/blob/3.2.1/Cargo.toml#L74

> Updated the copr package at https://copr.fedorainfracloud.org/coprs/fed500/RE-flex/ to have dynamically linked libraries:

That's great, but ugrep still doesn't have a way to link against a shared reflex library.  Thus it is allowed by the package guidelines to leave it bundled:  "All packages whose upstreams have no mechanism to build against system libraries MAY opt to carry bundled libraries, but if they do, they MUST include an indication of what they bundle."

https://docs.fedoraproject.org/en-US/packaging-guidelines/#bundling

Comment 6 Benson Muite 2022-07-23 14:16:35 UTC
> They look to be enabled by default to me, since a flag to disable them is available and checked for during compilation.

Ok on the flags. For some reason had to disable these for the RE/Flex library build on COPR.

> Those rust packages are not doing anything different with compilation.  They are nearly empty meta-packages that map to crate 
> "features", which is a way to specify optional dependencies.  The aarch64_neon and avx2_backend names are just feature names that
> other rust software can depend on.

Thanks for the explanations for the Rust crates.

>  That's great, but ugrep still doesn't have a way to link against a shared reflex library.

Checked if upstream would consider restructuring - https://github.com/Genivia/ugrep/issues/215 It seems tha going fast is the current priority, maybe it will change to going far together.  Changing the makefile to use a dynamically linked library does not seem problematic.  RE/Flex on its own seems useful and is probably better packaged separately or as a sub package.  Bundling is not ideal, but maybe more trouble to unbundle the latest version of RE/flex and then build it separately. Being able to use RE/Flex as a separate package with shared libraries would be nice https://docs.fedoraproject.org/en-US/packaging-guidelines/#_mixed_use_packages but understandable if it is troublesome.

Comment 7 Neal Gompa 2022-08-19 19:56:11 UTC
This looks good to me, so...

PACKAGE APPROVED.

Comment 8 Kevin Fenzi 2022-08-21 02:19:42 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/ugrep

Comment 9 Fedora Update System 2022-08-22 20:01:11 UTC
FEDORA-2022-cbb7e85a7d has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2022-cbb7e85a7d

Comment 10 Fedora Update System 2022-08-22 20:02:58 UTC
FEDORA-2022-cbb7e85a7d has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Fedora Update System 2022-08-22 21:36:36 UTC
FEDORA-2022-016b987532 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-016b987532

Comment 12 Fedora Update System 2022-08-22 21:39:02 UTC
FEDORA-2022-016b987532 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.