https://bugzilla.redhat.com/show_bug.cgi?id=2571927

Nikita Sizikov <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]



--- Comment #1 from Nikita Sizikov <[email protected]> ---
Unofficial review: I'm not a packager yet (sponsorship request:
https://forge.fedoraproject.org/packaging/sponsors/issues/805), so this
can't count as the formal review. I hope the notes are useful anyway.

I ran fedora-review 0.12.0 in mock (fedora-rawhide-x86_64), then went
through the spec and the wav-0.14.6 sources by hand. The packaging looks
good to me. There's one real finding about %check, one question about
branches, and a few small suggestions.

1. %check runs, but no tests are executed
=========================================

build.log shows:
    + /usr/bin/ctest --test-dir redhat-linux-build ...
    No tests were found!!!

Upstream's CMakeLists.txt builds dr_libs_test and the dr_wav_compilation
library, but it never calls add_test()/enable_testing(), and master
doesn't either. So %check only proves that dr_wav.h compiles with
-Wall -Wextra -Wpedantic. The ogg/flac/sndfile/mpg123 BuildRequires
only serve to link a test program that never runs. That also loses
most of the benefit of keeping the base package arched, which the
header-only guidelines ask for so that tests run on all arches.

dr_libs_test compares dr_wav's decoding and seeking against libsndfile,
so it can be run on generated files. I did a full mock rebuild of your
spec with the following added, and it passed (12 files, decoding and
seeking):

    %if %{with ctest}
    ...
    BuildRequires:  sox
    %endif

    %check -a
    mkdir vec
    gen() { sox -n -r 44100 -c 2 "$@" synth 1 sine 440; }
    gen -b 16 vec/s16.wav
    gen -b 8 -e unsigned-integer vec/u8.wav
    gen -b 24 vec/s24.wav
    gen -b 32 vec/s32.wav
    gen -b 32 -e floating-point vec/f32.wav
    gen -b 64 -e floating-point vec/f64.wav
    gen -e u-law vec/ulaw.wav
    gen -e a-law vec/alaw.wav
    gen -e ima-adpcm vec/ima.wav
    gen -e ms-adpcm vec/msadpcm.wav
    gen -b 16 vec/s16.w64
    gen -b 16 vec/s16.aiff
    %{_vpath_builddir}/dr_libs_test vec/*

As a negative control, I fed it a file of random bytes. It reported
"WAV correctness test failed" and exited 1, so it really checks
something. Since master's CMakeLists.txt has no add_test() either,
dr_flac, dr_mp3 and dr_libs are presumably in the same situation.

2. Question: which branches are you planning?
=============================================

On f43/f44/f45, dr_libs-devel has an exact dependency (from mdapi):
    f45: dr_wav-devel = 0:0.14.6^20261030.35b5c39-3.fc45
    f44: dr_wav-devel = 0:0.14.6^20261030.35b5c39-3.fc44
    f43: dr_wav-devel = 0:0.14.6^20261030.35b5c39-2.fc43
A 1:0.14.6 dr_wav-devel on those branches would break that dependency
unless dr_libs is updated together with it. Rawhide is fine because the
metapackage is gone there. I assume dr_libs will drop its dr_wav-devel
subpackage in rawhide together with this import.

Suggestions (non-blocking)
==========================

- Version sanity check: your dr_libs spec greps each header for its
  version in %check -p. The same would be cheap here. dr_wav.h has
  "v0.14.6" on line 3 and DRWAV_VERSION_MAJOR/MINOR/REVISION.
- %description is just the summary ("WAV audio loader and writer.").
  It might be worth a sentence more, e.g. that it's a single-file
  header-only library that reads WAV, RIFX, W64, RF64 and AIFF, and
  writes WAV, W64 and RF64.

Verified / OK
=============

- Epoch is needed: rpmdev-vercmp gives
      0:0.14.6-1.fc46 < 0:0.14.6^20261030.35b5c39-2.fc46
      1:0.14.6-1.fc46 > 0:0.14.6^20261030.35b5c39-2.fc46
  (rawhide currently has ...-3.fc46). The -static Provide carries the
  epoch: dr_wav-static = 1:0.14.6-1.fc46.
- Header-only guidelines: the header is in -devel, it Provides
  dr_wav-static, the base package is arched and -devel is noarch, and
  debug_package is %{nil}.
- License "Unlicense OR MIT-0" matches LICENSE and the notice at the end
  of dr_wav.h. external/fs/ has the same license and is used only by
  tests/dr_libs_test.c, as the spec comment says.
- Functional test: in the mock root I built tests/dr_libs_test.c against
  the *installed* /usr/include/dr_wav.h, which is identical to the
  tarball's. I ran it on 13 ffmpeg-generated files: PCM u8/s16/s24/s32,
  float32/64, u-law, a-law, IMA and MS ADPCM, W64, RF64 and AIFF.
  Decoding and seeking matched libsndfile for all of them.
- Source0 matches upstream (SHA256 8497d581...586fc5), and wav-0.14.6 is
  the latest wav-* tag.
- Timestamps are preserved (install --preserve-timestamps).
- rpmlint: 0 errors, 0 warnings (built and installed).


-- 
You are receiving this mail because:
You are always notified about changes to this product and component
You are on the CC list for the bug.
https://bugzilla.redhat.com/show_bug.cgi?id=2571927

Report this comment as SPAM: 
https://bugzilla.redhat.com/enter_bug.cgi?product=Bugzilla&format=report-spam&short_desc=Report%20of%20Bug%202571927%23c1

-- 
_______________________________________________
package-review mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://forge.fedoraproject.org/infra/tickets/issues/new

Reply via email to