Bug 2222844 - Review Request: qoi - The “Quite OK Image Format” for fast, lossless image compression
Summary: Review Request: qoi - The “Quite OK Image Format” for fast, lossless image co...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Artur Frenszek-Iwicki
QA Contact: Fedora Extras Quality Assurance
URL: https://github.com/phoboslab/qoi
Whiteboard:
: 2222846 (view as bug list)
Depends On:
Blocks: 2209858
TreeView+ depends on / blocked
 
Reported: 2023-07-14 05:44 UTC by Ryan
Modified: 2023-11-06 09:47 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-11-06 09:47:39 UTC
Type: ---
Embargoed:
fedora: fedora-review+


Attachments (Terms of Use)
The .spec file difference from Copr build 6171803 to 6172039 (1.30 KB, patch)
2023-07-14 08:59 UTC, Fedora Review Service
no flags Details | Diff
The .spec file difference from Copr build 6172039 to 6358052 (2.37 KB, patch)
2023-08-31 04:40 UTC, Fedora Review Service
no flags Details | Diff
The .spec file difference from Copr build 6358052 to 6512602 (1.12 KB, patch)
2023-10-10 06:15 UTC, Fedora Review Service
no flags Details | Diff
The .spec file difference from Copr build 6512602 to 6528072 (1.04 KB, patch)
2023-10-15 15:34 UTC, Fedora Review Service
no flags Details | Diff

Description Ryan 2023-07-14 05:44:11 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/errornointernet/qoi/fedora-rawhide-x86_64/06171789-qoi/qoi.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/errornointernet/qoi/fedora-rawhide-x86_64/06171789-qoi/qoi-20230615git36190eb-1.fc39.src.rpm

Upstream: https://github.com/phoboslab/qoi
Description: Binaries (qoibench and qoiconv) for fast, lossless image compression using the "Quite OK Image Format".
Fedora Account System Username: errornointernet

Sorry for any mistakes made.
This is one of my first packages, and I am in need of a sponsor.

Comment 1 Fedora Review Service 2023-07-14 05:50:19 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/6171803
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2222844-qoi/fedora-rawhide-x86_64/06171803-qoi/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 Ryan 2023-07-14 08:53:24 UTC
*** Bug 2222846 has been marked as a duplicate of this bug. ***

Comment 4 Fedora Review Service 2023-07-14 08:59:04 UTC
Created attachment 1975737 [details]
The .spec file difference from Copr build 6171803 to 6172039

Comment 5 Fedora Review Service 2023-07-14 08:59:06 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/6172039
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2222844-qoi/fedora-rawhide-x86_64/06172039-qoi/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 Artur Frenszek-Iwicki 2023-07-15 10:29:02 UTC
> %install
> mkdir -p %{buildroot}/%{_includedir}
> cp qoi.h %{buildroot}/%{_includedir}
1. You should aim to preserve file timestamps. You can use "cp -a" or "cp --preserve=timestamps".
   https://docs.fedoraproject.org/en-US/packaging-guidelines/#_timestamps
2. Using "cp" is fine, but I think that most .spec files use "install" instead.
   "install -d" can also be used to create directories.

> %files devel
> %license LICENSE
> %doc README.md
The -devel package has a hard "Requires:" on the base package,
so these files can be omitted.
https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/#subpackage-licensing

Also, looking at the copr build made by the review service:
> gcc -std=c99 -O3 -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64   -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer  qoiconv.c -o qoiconv
This does not include Fedora's LDFLAGS. You'll need to either modify the Makefile to include those in the gcc invocation, or call the compiler manually.

Comment 7 Ryan 2023-07-16 08:40:14 UTC
Thanks for your reply :)

> This does not include Fedora's LDFLAGS. You'll need to either modify the Makefile to include those in the gcc invocation, or call the compiler manually.
I have now added a patch (Makefile-ldflags.patch) for the Makefile to include LDFLAGS.

Changes:
- Used `install -d` and `install -p` instead of `cp`
- Added `Requires: %{name}%{?isa} = %{version}-%{release}` to the -devel package
- Added LDFLAGS patch

New .spec URL: https://download.copr.fedorainfracloud.org/results/errornointernet/qoi/fedora-rawhide-x86_64/06176114-qoi/qoi.spec
New .srpm URL: https://download.copr.fedorainfracloud.org/results/errornointernet/qoi/fedora-rawhide-x86_64/06176114-qoi/qoi-20230615git36190eb-3.fc39.src.rpm
Makefile-ldflags.patch: https://github.com/ErrorNoInternet/rpm-specs/raw/main/qoi/Makefile-ldflags.patch

Comment 8 Artur Frenszek-Iwicki 2023-08-24 13:35:35 UTC
Overall the package looks good, just two suggestions from my side:

Usually with library packages, the main package contains the dynamic libraries, and -devel the header files.
Any extra tools can either go into the main package, or into a -tools subpackage.
Since qoi is (currently?) a header-only library, I think it could be a good idea to move the tools
into a -tools subpackage, and omit building the main package. This would enable you to make the devel
package noarch and save users from having to install unneeded dependencies.

In Makefile-ldflags.patch, you put LDFLAGS next to CFLAGS.
It's usually best to place these at the end of the compiler invocation.

Sorry for the long wait.

Comment 10 Fedora Review Service 2023-08-31 04:40:33 UTC
Created attachment 1986237 [details]
The .spec file difference from Copr build 6172039 to 6358052

Comment 11 Fedora Review Service 2023-08-31 04:40:36 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/6358052
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2222844-qoi/fedora-rawhide-x86_64/06358052-qoi/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 12 Artur Frenszek-Iwicki 2023-10-09 22:11:41 UTC
Hi Ryan, sorry for making you wait so long for a reply.

> %global commit 41e8f84bf68f7bb658430a37b5647c172d86e38e
> %global snapdate 20230828
> 
> Version: %{snapdate}git%(c='%{commit}'; echo "${c:0:7}")
This will produce a package with version "20230828git...".
The recommended way is to use caret-versioning instead: "0^%{snapdate}..."
https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_upstream_has_never_chosen_a_version

> %files
> 
> %files tools
> ...
> 
> %files devel
> ...
A setup like this will result in the build process producing an empty "qoi" package that contains no files.
Remove the "%files" line - this will make it so the build produces only qoi-devel and qoi-tools.
You can then drop "Requires: %{name}%{?isa} = %{version}-%{release}" from the subpackages.

> %files tools
> %license LICENSE
> ...
> %files devel
> 
> %changelog
Since -devel is independent from -tools, and it is possible to install only one of those packages,
both of them should include a copy of the licence text.
https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/#subpackage-licensing

Comment 14 Fedora Review Service 2023-10-10 06:15:52 UTC
Created attachment 1993183 [details]
The .spec file difference from Copr build 6358052 to 6512602

Comment 15 Fedora Review Service 2023-10-10 06:15:55 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/6512602
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2222844-qoi/fedora-rawhide-x86_64/06512602-qoi/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 Artur Frenszek-Iwicki 2023-10-14 14:54:16 UTC
Looks good overall, just one minor issue:
You must add "Provides: qoi-static = %{version}-%{release}" to the -devel package.
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_packaging_header_only_libraries

Please update the changelog as well and then we'll be golden.
Alternatively, consider switching to %autochangelog.
https://docs.fedoraproject.org/en-US/packaging-guidelines/#changelogs

Comment 18 Fedora Review Service 2023-10-15 15:34:25 UTC
Created attachment 1994089 [details]
The .spec file difference from Copr build 6512602 to 6528072

Comment 19 Fedora Review Service 2023-10-15 15:34:27 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/6528072
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2222844-qoi/fedora-rawhide-x86_64/06528072-qoi/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 20 Artur Frenszek-Iwicki 2023-11-01 11:58:46 UTC
Hi Ryan, can you resubmit the COPR build, or post the spec & srpm somewhere else? Looks like the latest files got garbage-collected.

Comment 22 Fedora Review Service 2023-11-03 07:33:54 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/6593848
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2222844-qoi/fedora-rawhide-x86_64/06593848-qoi/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 23 Artur Frenszek-Iwicki 2023-11-04 13:59:21 UTC
Package is APPROVED. One thing you should change is to include the git commit hash in the version information, like this:
> %global commit_short %(c="%{commit}"; echo "${c:0:7}")
> Version: 0^%{snapdate}.%{commit_short}
Or alternatively:
> %global commit_short %(c="%{commit}"; echo "${c:0:7}")
> Version: 0^%{snapdate}git%{commit_short}
https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_snapshots


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

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


===== 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]: 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]: License field in the package spec file matches the actual license.
[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.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 11643 bytes in 1 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]: 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 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).
[-]: 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.
[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.
     Note: link successful scratch build in koji:
     https://koji.fedoraproject.org/koji/taskinfo?taskID=108569243
[-]: %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 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.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: qoi-tools-0^20230911-2.fc40.x86_64.rpm
          qoi-devel-0^20230911-2.fc40.noarch.rpm
          qoi-debugsource-0^20230911-2.fc40.x86_64.rpm
          qoi-0^20230911-2.fc40.src.rpm
============== 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
rpmlintrc: [PosixPath('/tmp/tmp1c2803c3')]
checks: 31, packages: 4

qoi-tools.x86_64: W: no-manual-page-for-binary qoibench
qoi-tools.x86_64: W: no-manual-page-for-binary qoiconv
qoi-devel.noarch: W: no-documentation
============= 4 packages and 0 specfiles checked; 0 errors, 3 warnings, 0 badness; has taken 0.6 s ============




Rpmlint (debuginfo)
-------------------
Checking: qoi-tools-debuginfo-0^20230911-2.fc40.x86_64.rpm
============== 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
rpmlintrc: [PosixPath('/tmp/tmplujfjcp2')]
checks: 31, packages: 1

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





Rpmlint (installed packages)
----------------------------
============================ 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

qoi-tools.x86_64: W: no-manual-page-for-binary qoibench
qoi-tools.x86_64: W: no-manual-page-for-binary qoiconv
qoi-devel.noarch: W: no-documentation
 4 packages and 0 specfiles checked; 0 errors, 3 warnings, 0 badness; has taken 1.0 s 



Source checksums
----------------
https://github.com/phoboslab/qoi/archive/8d35d93cdca85d2868246c2a8a80a1e2c16ba2a8/qoi-8d35d93cdca85d2868246c2a8a80a1e2c16ba2a8.tar.gz :
  CHECKSUM(SHA256) this package     : 00f10a37021d1f75c78a94a95cf45500177b6f78e9a9b27cef49237798bd4db4
  CHECKSUM(SHA256) upstream package : 00f10a37021d1f75c78a94a95cf45500177b6f78e9a9b27cef49237798bd4db4


Requires
--------
qoi-tools (rpmlib, GLIBC filtered):
    libc.so.6()(64bit)
    libpng16.so.16()(64bit)
    libpng16.so.16(PNG16_0)(64bit)
    rtld(GNU_HASH)

qoi-devel (rpmlib, GLIBC filtered):

qoi-debugsource (rpmlib, GLIBC filtered):



Provides
--------
qoi-tools:
    qoi-tools
    qoi-tools(x86-64)

qoi-devel:
    qoi-devel
    qoi-static

qoi-debugsource:
    qoi-debugsource
    qoi-debugsource(x86-64)



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

Comment 24 Fedora Review Service 2023-11-05 03:12:13 UTC
Hello @errornointernet,
since this is your first Fedora package, you need to get sponsored by a package
sponsor before it can be accepted.

A sponsor is an experienced package maintainer who will guide you through
the processes that you will follow and the tools that you will use as a future
maintainer. A sponsor will also be there to answer your questions related to
packaging.

You can find all active sponsors here:
https://docs.pagure.org/fedora-sponsors/

I created a sponsorship request for you:
https://pagure.io/packager-sponsors/issue/600
Please take a look and make sure the information is correct.

Thank you, and best of luck on your packaging journey.

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

Comment 25 Fedora Admin user for bugzilla script actions 2023-11-06 05:01:45 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/qoi


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