Bug 2249637 - Review Request: libtbox - A glib-like multi-platform c library
Summary: Review Request: libtbox - A glib-like multi-platform c library
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Zephyr Lykos
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2249796
TreeView+ depends on / blocked
 
Reported: 2023-11-14 13:55 UTC by Felix Wang
Modified: 2023-11-17 15:51 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-11-17 15:51:35 UTC
Type: ---
Embargoed:
fedora: fedora-review+


Attachments (Terms of Use)
The .spec file difference from Copr build 6634571 to 6634685 (649 bytes, patch)
2023-11-14 14:42 UTC, Fedora Review Service
no flags Details | Diff
The .spec file difference from Copr build 6634685 to 6646270 (986 bytes, patch)
2023-11-16 03:00 UTC, Fedora Review Service
no flags Details | Diff
The .spec file difference from Copr build 6646270 to 6660542 (1.21 KB, patch)
2023-11-17 10:50 UTC, Fedora Review Service
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Fedora Pagure mochaa-rpms/libtbox 0 None None None 2023-11-17 14:09:06 UTC

Description Felix Wang 2023-11-14 13:55:22 UTC
SPEC URL: https://topazus.fedorapeople.org/rpms/tbox.spec
SRPM URL: https://topazus.fedorapeople.org/rpms/tbox-1.7.5-1.fc40.src.rpm

Description:
A glib-like multi-platform c library

Fedora Account System Username: topazus

build on koji (success): https://koji.fedoraproject.org/koji/taskinfo?taskID=109018791

Reproducible: Always

Comment 1 Fedora Review Service 2023-11-14 14:04:53 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/6634571
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2249637-tbox/fedora-rawhide-x86_64/06634571-tbox/fedora-review/review.txt

Please take a look if any issues were found.

---
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 2023-11-14 14:42:58 UTC
Created attachment 1999342 [details]
The .spec file difference from Copr build 6634571 to 6634685

Comment 4 Fedora Review Service 2023-11-14 14:43:01 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/6634685
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2249637-tbox/fedora-rawhide-x86_64/06634685-tbox/fedora-review/review.txt

Please take a look if any issues were found.

---
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 6 Fedora Review Service 2023-11-16 03:00:47 UTC
Created attachment 1999700 [details]
The .spec file difference from Copr build 6634685 to 6646270

Comment 7 Fedora Review Service 2023-11-16 03:00:49 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/6646270
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2249637-tbox/fedora-rawhide-x86_64/06646270-tbox/fedora-review/review.txt

Please take a look if any issues were found.

---
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 8 Zephyr Lykos 2023-11-17 08:59:04 UTC
This package should be renamed to `libtbox`.

Comment 9 Felix Wang 2023-11-17 09:27:35 UTC
> This package should be renamed to `libtbox`.

I wonder that the reason that the package needs to be renamed to libtbox. Because I do not see something about it in Fedora packaging guidelines.

Ref: https://docs.fedoraproject.org/en-US/packaging-guidelines/Naming/

Comment 10 Zephyr Lykos 2023-11-17 09:45:53 UTC
> I wonder that the reason that the package needs to be renamed to libtbox.

Since tbox uses `libtbox` as its pkgconfig name, I suggest it's more appropriate to use that.
Also, see <https://pagure.io/mochaa-rpms/libtbox>.

Comment 11 Felix Wang 2023-11-17 10:23:59 UTC
> Since tbox uses `libtbox` as its pkgconfig name, I suggest it's more appropriate to use that.
> Also, see <https://pagure.io/mochaa-rpms/libtbox>.

The the pkgconfig file name of tbox can be `tbox.pc`, so we can use tbox name in BR of xmake, like `BuildRequires:  pkgconfig(tbox)`. What do you think?

Comment 12 Zephyr Lykos 2023-11-17 10:25:24 UTC
I recommend sticking to upstream. :)

Comment 13 Felix Wang 2023-11-17 10:36:49 UTC
Applied your patch about DESTDIR issue, add the pkgconfig file, rename to libtbox

SPEC URL: https://topazus.fedorapeople.org/rpms/tbox.spec
SRPM URL: https://topazus.fedorapeople.org/rpms/tbox-1.7.5-1.fc40.src.rpm

Comment 14 Fedora Review Service 2023-11-17 10:50:31 UTC
Created attachment 1999964 [details]
The .spec file difference from Copr build 6646270 to 6660542

Comment 15 Fedora Review Service 2023-11-17 10:50:33 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/6660542
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2249637-tbox/fedora-rawhide-x86_64/06660542-tbox/fedora-review/review.txt

Please take a look if any issues were found.

---
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 16 Zephyr Lykos 2023-11-17 14:05:48 UTC
Some misc. changes.
- Style changes (optional)
- The demo executable is required for %check, but not required in distribution
- Use more neutral wording in Summary and Description
- Add feature flags for xmake
- Add relwithdebinfo build mode to export debuginfo

--- tbox.spec		2023-11-17 21:52:40.250583881 +0800
+++ libtbox.spec	2023-11-17 21:51:11.349633496 +0800
@@ -1,50 +1,45 @@
-%global debug_package %{nil}
-%global sover 1
+Name:       libtbox
+Version:    1.7.5
 
 %global forgeurl https://github.com/tboox/tbox
-Version:        1.7.5
+
 %forgemeta
 
-Name:           libtbox
-Release:        %autorelease
-Summary:        A glib-like multi-platform c library
-
-# The library is mainly under Apache-2.0 license, except:
-# src/tbox/platform/arch/{arm,arm64,mips,x86,x64}/context.{S,asm}: BSL-1.0
-# src/tbox/hash/adler32.c: Zlib
-License:        Apache-2.0 AND BSL-1.0 AND Zlib
-URL:            %{forgeurl}
-Source0:        %{forgesource}
-Patch0:         0001-build-fix-DESTDIR.patch
+Release:    %autorelease
+Summary:    Portable toolbox library with great cross-platform support
 
-BuildRequires:  gcc
-BuildRequires:  make
+# Library and 3rd-party modules licensing:
+# * tbox - Apache-2.0 -- Main tarball;
+# * src/tbox/platform/arch/*/context.{S,asm} - BSL-1.0 -- static dependency;
+# * src/tbox/hash/adler32.c -- Zlib -- static dependency.
+License:    Apache-2.0 AND BSL-1.0 AND Zlib
+URL:        https://tboox.org
+Source:     %{forgesource}
 
-%description
-TBOX is a glib-like cross-platform C library that is simple to use yet powerful
-in nature.
+Patch0:     0001-build-fix-DESTDIR-add-relwithdebinfo.patch
 
-The project focuses on making C development easier and provides many modules
-(.e.g stream, coroutine, regex, container, algorithm ...), so that any developer
-can quickly pick it up and enjoy the productivity boost when developing in C
-language.
+BuildRequires:  pkgconfig(ncurses)
+BuildRequires:  pkgconfig(liblz4)
+
+BuildRequires:  bash
+BuildRequires:  make
+BuildRequires:  gcc
+BuildRequires:  gcc-c++
 
-It supports the following platforms: Windows, Macosx, Linux, Android, iOS, *BSD
-and etc.
+%description
+A feature-packed, embedded friendly toolbox library.
+Think of stdlib for embedded systems or Boost for C.
+Provides stream, coroutine, regex, container, algorithm and more modules.
 
-%package        devel
+%package devel
 Summary:        Development files for %{name}
 Requires:       %{name}%{?_isa} = %{version}-%{release}
 
-%description    devel
-The %{name}-devel package contains libraries and header files for developing
-applications that use %{name}.
+%description devel
+This package contains headers and development files for %{name}.
 
 %prep
 %forgeautosetup -p1
-
-chmod -x README.md LICENSE.md
-
 cat > %{name}.pc << EOF
 prefix=%{_prefix}
 exec_prefix=${prefix}
@@ -58,29 +53,33 @@
 EOF
 
 %build
-%configure --demo=no \
-    --hash=yes \
-    --charset=yes \
-    --force-utf=yes \
-    --kind=shared \
-
+%configure \
+  --kind=shared \
+  --mode=relwithdebinfo \
+  --hash=yes \
+  --charset=yes \
+  --float=yes \
+  --force_utf8=yes
 %make_build
 
 %install
 %make_install
+rm %{buildroot}%{_bindir}/demo
 
-mkdir -p %{buildroot}%{_libdir}/pkgconfig
-install -pDm644 %{name}.pc %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
+install -Dm644 %{name}.pc %{buildroot}%{_libdir}/pkgconfig/
+
+%check
+%make_build run
 
 %files
-%license LICENSE.md
-%doc README.md
-%{_libdir}/libtbox.so.%{sover}*
+%doc README.md README_zh.md CHANGELOG.md
+%license LICENSE.md NOTICE.md
+%{_libdir}/%{name}.so.1*
 
 %files devel
-%{_includedir}/tbox/
-%{_libdir}/libtbox.so
+%{_libdir}/%{name}.so
 %{_libdir}/pkgconfig/%{name}.pc
+%{_includedir}/tbox/
 
 %changelog
 %autochangelog

Comment 17 Zephyr Lykos 2023-11-17 14:33:08 UTC
Looks all good now. Approving.

Comment 18 Zephyr Lykos 2023-11-17 14:36:28 UTC
Correction:

liblz4 and ncurses are not necessary for BuildRequires. I accidentally wrote xmake's dependencies there 😅

Comment 20 Fedora Admin user for bugzilla script actions 2023-11-17 15:00:53 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/libtbox

Comment 21 Zephyr Lykos 2023-11-17 15:22:39 UTC
Package Review
==============

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


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

C/C++:
[-]: Provides: bundled(gnulib) in place as required.
     Note: Sources not installed
[x]: Package does not contain kernel modules.
[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]: ldconfig not called in %post and %postun for Fedora 28 and later.
[x]: Package does not contain any libtool archives (.la)
[x]: Package contains no static executables.
[x]: Rpath absent or only used for internal libs.
[x]: Development (unversioned) .so files in -devel subpackage, if present.

Generic:
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
     Note: Using prebuilt packages
[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. No licenses
     found. Please check the source files for licenses manually.
[x]: License file installed when any subpackage combination is installed.
[x]: If the package is under multiple licenses, the licensing breakdown
     must be documented in the spec.
[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.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 48601 bytes in 3 files.
[x]: Package complies to the Packaging Guidelines
[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]: The License field must be a valid SPDX expression.
[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 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:
[x]: Reviewer should test that the package builds in mock.
[x]: 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.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[-]: 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]: 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]: The placement of pkgconfig(.pc) files are correct.
[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: No rpmlint messages.
[x]: Rpmlint is run on all installed packages.
     Note: No rpmlint messages.
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.


Rpmlint
-------
Checking: libtbox-1.7.5-1.fc40.x86_64.rpm
          libtbox-devel-1.7.5-1.fc40.x86_64.rpm
          libtbox-debuginfo-1.7.5-1.fc40.x86_64.rpm
          libtbox-debugsource-1.7.5-1.fc40.x86_64.rpm
          libtbox-1.7.5-1.fc40.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/tmpe7nlohp4')]
checks: 31, packages: 5

libtbox.x86_64: W: spurious-executable-perm /usr/share/doc/libtbox/README.md
libtbox.x86_64: W: spurious-executable-perm /usr/share/doc/libtbox/README_zh.md
libtbox.x86_64: E: script-without-shebang /usr/share/licenses/libtbox/LICENSE.md
libtbox.x86_64: E: script-without-shebang /usr/share/licenses/libtbox/NOTICE.md
# 4 problems above fixed in git5156029
libtbox.spec: W: patch-not-applied Patch0: 0001-build-fix-DESTDIR-add-relwithdebinfo.patch # false positive
 5 packages and 0 specfiles checked; 2 errors, 3 warnings, 2 badness; has taken 1.2 s 




Rpmlint (debuginfo)
-------------------
Checking: libtbox-debuginfo-1.7.5-1.fc40.x86_64.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/tmptn3v0t_r')]
checks: 31, packages: 1

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





Rpmlint (installed packages)
----------------------------
(none): E: there is no installed rpm "libtbox-debuginfo".
(none): E: there is no installed rpm "libtbox".
(none): E: there is no installed rpm "libtbox-devel".
(none): E: there is no installed rpm "libtbox-debugsource".
There are no files to process nor additional arguments.
Nothing to do, aborting.
============================ rpmlint session starts ============================
rpmlint: 2.4.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
checks: 31, packages: 4

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



Source checksums
----------------
https://github.com/tboox/tbox/archive/v1.7.5/tbox-1.7.5.tar.gz :
  CHECKSUM(SHA256) this package     : 6382cf7d6110cbe6f29e8346d0e4eb078dd2cbf7e62913b96065848e351eb15e
  CHECKSUM(SHA256) upstream package : 6382cf7d6110cbe6f29e8346d0e4eb078dd2cbf7e62913b96065848e351eb15e


Requires
--------
libtbox (rpmlib, GLIBC filtered):
    libc.so.6()(64bit)
    libm.so.6()(64bit)
    rtld(GNU_HASH)

libtbox-devel (rpmlib, GLIBC filtered):
    /usr/bin/pkg-config
    libtbox(x86-64)
    libtbox.so.1()(64bit)

libtbox-debuginfo (rpmlib, GLIBC filtered):

libtbox-debugsource (rpmlib, GLIBC filtered):



Provides
--------
libtbox:
    libtbox
    libtbox(x86-64)
    libtbox.so.1()(64bit)

libtbox-devel:
    libtbox-devel
    libtbox-devel(x86-64)
    pkgconfig(libtbox)

libtbox-debuginfo:
    debuginfo(build-id)
    libtbox-debuginfo
    libtbox-debuginfo(x86-64)
    libtbox.so.1.7.5-1.7.5-1.fc40.x86_64.debug()(64bit)

libtbox-debugsource:
    libtbox-debugsource
    libtbox-debugsource(x86-64)



Generated by fedora-review 0.10.0 (e79b66b) last change: 2023-07-24
Command line :/usr/bin/fedora-review --no-colors --prebuilt --rpm-spec --name libtbox --mock-config /var/lib/copr-rpmbuild/results/configs/child.cfg
Buildroot used: fedora-rawhide-x86_64
Active plugins: Shell-api, C/C++, Generic
Disabled plugins: fonts, Haskell, Perl, Python, SugarActivity, Ocaml, R, PHP, Java
Disabled flags: EXARCH, EPEL6, EPEL7, DISTTAG, BATCH

Comment 22 Fedora Update System 2023-11-17 15:49:41 UTC
FEDORA-2023-6f0187e59f has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2023-6f0187e59f

Comment 23 Fedora Update System 2023-11-17 15:51:35 UTC
FEDORA-2023-6f0187e59f has been pushed to the Fedora 40 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.