Bug 2567282 - Review Request: dvbcut - Clip and convert DVB transport streams to MPEG2 program streams
Summary: Review Request: dvbcut - Clip and convert DVB transport streams to MPEG2 prog...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: MultimediaSIG
TreeView+ depends on / blocked
 
Reported: 2026-11-05 12:51 UTC by Dominik 'Rathann' Mierzejewski
Modified: 2026-11-22 13:46 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dominik 'Rathann' Mierzejewski 2026-11-05 12:51:10 UTC
Spec URL: https://rathann.fedorapeople.org/review/dvbcut/dvbcut.spec
SRPM URL: https://rathann.fedorapeople.org/review/dvbcut/dvbcut-0.7.5-1.fc46.src.rpm
Description:
DVBcut is a Qt application that allows you to select certain parts of an MPEG
transport stream (as received via Digital Video Broadcasting, DVB) and save
these parts into a single MPEG output file. It follows a "keyhole surgery"
approach where the input video and audio data is mostly kept unchanged, and
only very few frames at the beginning and/or end of the selected range are
re-encoded in order to obtain a valid MPEG file. For MPEG video playback
dvbcut can use Mplayer if available.

Fedora Account System Username: rathann

Comment 1 Nikita Sizikov 2026-11-16 14:55:58 UTC
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, the patches and the 0.7.5 sources by hand. The package
builds, installs and works. Findings below, most important first.

Issues
======

1. License tag: the LGPL part looks inaccurate.
   The spec says "icons/* are under LGPLv2.1+", but README.icons says the
   KDE Crystal (LGPL) icons were all the GUI icons *except*
   start/stop/chapter/bookmark, and those four are exactly the ones in
   icons/ (play, stop, chapter, bookmark).
   The 0.7.5 tarball contains no Crystal icons any more: the only images
   are dvbcut.svg/.ico and icons/{bookmark,chapter,play,stop}.{png,svgz}.
   src/dvbcutbase.ui still names image0..image13, but there is no
   <images> section behind them, and src/dvbcut.cpp:370ff sets those
   action icons at runtime with QIcon::fromTheme() and QStyle fallbacks.
   debian/copyright covers "Files: *" as GPL-2+. So I think
   License: GPL-2.0-or-later alone is correct. Could you double-check?
   (Side note: the Crystal notice says "version 2.1 of the License" with
   no "or later", so it would have been LGPL-2.1-only anyway.)

2. Missing BuildRequires: make.
   %make_build and %make_install need make. In my build it only came in
   through other packages' dependencies. Per the Build-Time Dependencies
   section, you SHOULD NOT assume other packages are present, because
   "anything brought into the buildroot by the build system can change
   over time".

3. Patches: upstream status, and a bug in dvbcut-use_pkgconfig.patch.
   All three patches are marked PATCH-FIX-OPENSUSE, and none of them is
   in upstream master yet: configure.ac still uses AC_CHECK_LIB, and
   dvbcut.desktop.in still has the absolute Icon= path. Per
   PatchUpstreamStatus, each patch SHOULD carry an upstream-status
   comment. Maybe submit them to github.com/bernhardu/dvbcut-deb?
   Before doing that, note that the pkgconfig patch checks the wrong
   module:
       PKG_CHECK_MODULES(swscale, libavutil, ...
   That should be libswscale. As it is, the swscale check passes whenever
   libavutil exists. The build is fine only because libswscale is
   BuildRequired.

4. Stale comment (spec line 10): "use sh dvbcut-snapshot.sh to create
   the archive". Source0 is now the GitHub tag archive, so the comment
   can go.

5. %description still says "For MPEG video playback dvbcut can use
   Mplayer if available", but MPlayer isn't in Fedora (your changelog
   drops the weak dependency for that reason). Consider rewording or
   dropping that sentence.

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

- The Qt translations (/usr/share/dvbcut/dvbcut_{cs,de}.qm) are not
  %lang-tagged. "%find_lang %{name} --with-qt" would handle them.
  %{_datadir}/%{name}/ is currently listed as a whole, so %files would
  need adjusting to avoid listing those .qm files twice.
- The AppData guidelines say a GUI app SHOULD install a .metainfo.xml.
  Upstream doesn't ship one.
- Nits: "BuildRequires: pkgconfig" is redundant next to the pkgconfig()
  BRs. "BuildRequires: hicolor-icon-theme" doesn't seem to be needed at
  build time. The Requires: is right.

Upstream bug spotted (not a packaging blocker)
==============================================

The only compiler warning in the build is
    mpgfile.cpp:864:9: warning: 'free' called on unallocated object
    'buffer' [-Wfree-nonheap-object]
It's genuine. In mpgfile::readfile(std::string, uint8_t **buffer):
    854:  *buffer = (uint8_t*) malloc(sizeof(uint8_t)*lSize);
    855:  if (buffer == NULL) {          // should be *buffer
    ...
    864:    free(buffer);                // should be free(*buffer)
On a short read, the function frees the address of the caller's pointer
variable instead of the malloc'd block. That is undefined behaviour,
typically an abort with "free(): invalid pointer". The malloc failure
check at 855 is also a no-op. The function is called from
tsfile.cpp:385 (bookmark import), and upstream master still has the
same code. It might be worth reporting upstream, or carrying a
two-line patch.

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

- Functional test: I made a 12 s MPEG-TS (MPEG-2 720x576 + AC-3) with
  ffmpeg, then ran the installed package in the mock root:
      QT_QPA_PLATFORM=offscreen dvbcut -batch -cut 50,200 \
          -exp /tmp/out.mpg /tmp/test.ts
  It exited 0. ffprobe shows out.mpg as an MPEG-PS with mpeg2video
  720x576, ac3 and DVD nav packets, 5.92 s long (frames 50-200 at
  25 fps). So export works with Fedora's ffmpeg-free; the mpeg2video
  encoder and decoder are enabled there.
- Source0 matches upstream (SHA256 76c34564...fa8b85). 0.7.5 is the
  latest tag.
- Fedora compiler/linker flags are applied (-O2 -flto=auto ...
  -D_FORTIFY_SOURCE=3, -z relro -z now). There is a single compiler
  warning, and it's a real upstream bug (see below).
- import/ (portability shims: Cygwin's sys/mman.h, plus realpath/
  asprintf replacements) is not compiled; build.log shows no
  references to it.
- desktop-file-install is used. Requires: hicolor-icon-theme is
  correct.
- /usr/share/mime/packages is owned by shared-mime-info, which is what
  makes the MIME XML useful in the first place, so I'd count it as part
  of the natural dependency chain. The fedora-review note is fine to
  ignore.
- Upgrade path from RPM Fusion: 0.7.4-12 < 0.7.5-1, and the name is the
  same, so no Obsoletes are needed.
- %make_install already passes INSTALL='install -p', so timestamps are
  preserved.
- rpmlint: incorrect-fsf-address in COPYING and README.icons is an
  upstream issue. no-%check-section is expected, since there is no test
  suite upstream.

Rpmlint
-------
dvbcut.spec: W: no-%check-section
dvbcut.x86_64: E: incorrect-fsf-address /usr/share/doc/dvbcut/README.icons
dvbcut.x86_64: E: incorrect-fsf-address /usr/share/licenses/dvbcut/COPYING
 2 packages and 0 specfiles checked; 2 errors, 1 warnings, 7 filtered, 2 badness
debuginfo: 0 errors, 0 warnings

I used fedora-review and an AI assistant to go through the checklist, and
I verified every point above myself.

Comment 2 Dominik 'Rathann' Mierzejewski 2026-11-22 13:46:26 UTC
Thanks for the review!

Spec URL: https://rathann.fedorapeople.org/review/dvbcut/dvbcut.spec
SRPM URL: https://rathann.fedorapeople.org/review/dvbcut/dvbcut-0.7.5-2.fc46.src.rpm

* Sun Nov 22 2026 Dominik Mierzejewski <dominik> - 0.7.5-2
- correct license tag
- add explicit BuildRequires on make
- correct libswscale library detection
- drop obsolete comment about dvbcut-snapshot.sh script
- stop mentioning MPlayer in description
- mark translations with lang macro
- drop unnecessary BuildRequires on hicolor-icon-theme
- fix unallocated free() in readfile()


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