Bug 242634 - multimedia/avidemux: update to 2.7.4
Summary: multimedia/avidemux: update to 2.7.4
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-multimedia (Nobody)
URL: https://github.com/freebsd/freebsd-po...
Depends on:
Reported: 2019-12-14 15:00 UTC by VVD
Modified: 2020-02-23 09:05 UTC (History)
4 users (show)

See Also:
tcberner: maintainer-feedback+

v1 (66.89 KB, patch)
2019-12-14 20:23 UTC, Tobias C. Berner
no flags Details | Diff
update to 2.7.4 including qt5 port (86.50 KB, application/x-tar)
2020-02-14 21:57 UTC, Lars Herschke
no flags Details
update to 2.7.4 including qt5 port second try (89.00 KB, application/x-tar)
2020-02-15 13:07 UTC, Lars Herschke
no flags Details
full diff file including change to multimedia/Makefile (85.02 KB, patch)
2020-02-16 11:54 UTC, Lars Herschke
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description VVD 2019-12-14 15:00:53 UTC
Current branch of multimedia/avidemux is 2.7 with version 2.7.4 from 2019-08-15.
There is 2.6.11 in ports from 2016-02-07. Last version in the branch 2.6 was 2.6.21 from 2017-05-01. Both are old, deprecated and unsupported.
Comment 1 Tobias C. Berner freebsd_committer 2019-12-14 19:04:37 UTC
I started working on an update.

mfg Tobias
Comment 2 Tobias C. Berner freebsd_committer 2019-12-14 20:23:30 UTC
Created attachment 209953 [details]

Moin moin 

Attached is the first rough update... let me know what I missed, as I have no clue what avidemux should do or not :D 

mfg Tobias
Comment 3 rkoberman 2019-12-16 06:44:39 UTC
(In reply to Tobias C. Berner from comment #2)
Thanks so much for helping at this. First, if builds cleanly on 12.1, though you likely knew that.

avidemux is a video editor, though it can still demux an avi or even an mp4.  The name is obsolete as it now supports most common codecs and muxers. The most important part of the tool is the extremely easy to use GUI editor, formerly avidemux-qt4, which has been deleted with the removal of qt4. As of avidemux-2.7 it defaults to qt5 and getting that part to work is really the key. The old qt4 port can be recovered from svn as r476029.

It is quite possible that it will just build. I will need to be sure that I have a safety copy of the 2.6 version before I can try it as I still actively use it and would hate to lose it before 2.7 is working. I will try soon, though.
Comment 4 Lars Herschke 2020-02-14 21:57:02 UTC
Created attachment 211658 [details]
update to 2.7.4 including qt5 port

Hello, here is my version of the update including a qt5 port
Comment 5 rkoberman 2020-02-15 05:46:33 UTC
(In reply to Lars Herschke from comment #4)
Thanks so much for working on this. I just tied building it and it failed in the same module, though not the same place, as my own attempt.This was in FreeBSD 12-Stable in amd64. 

Here is the failure:
cd /usr/ports/multimedia/avidemux/work/.build/ADM_core/src && /usr/local/bin/g++9  -DADM_core6_EXPORTS -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -I/usr/ports/multimedia/avidemux/work/.build/config -I/usr/ports/multimedia/avidemux/work/avidemux_2.7.4/avidemux_core/ADM_core/include -I/usr/ports/multimedia/avidemux/work/avidemux_2.7.4/avidemux_core/ADM_coreAudioFilter/include -I/usr/ports/multimedia/avidemux/work/avidemux_2.7.4/avidemux_core/ADM_coreAudioParser/include -I/usr/ports/multimedia/avidemux/work/avidemux_2.7.4/avidemux_core/ADM_coreAudio/include -I/usr/ports/multimedia/avidemux/work/avidemux_2.7.4/avidemux_core/ADM_coreAudioDevice/include -I/usr/ports/multimedia/avidemux/work/avidemux_2.7.4/avidemux_core/ADM_coreAudioEncoder/include -I/usr/ports/multimedia/avidemux/work/avidemux_2.7.4/avidemux_core/ADM_coreDemuxer/include -I/usr/ports/multimedia/avidemux/work/avidemux_2.7.4/avidemux_core/ADM_coreDemuxer/include/unix -I/usr/ports/multimedia/avidemux/work/avidemux_2.7.4/avidemux_core/ADM_coreDemuxerMpeg/include -I/usr/ports/multimedia/avidemux/work/avidemux_2.7.4/avidemux_core/ADM_coreImage/include -I/usr/ports/multimedia/avidemux/work/avidemux_2.7.4/avidemux_core/ADM_coreMuxer/include -I/usr/ports/multimedia/avidemux/work/avidemux_2.7.4/avidemux_core/ADM_coreScript/include -I/usr/ports/multimedia/avidemux/work/avidemux_2.7.4/avidemux_core/ADM_coreUI/include -I/usr/ports/multimedia/avidemux/work/avidemux_2.7.4/avidemux_core/ADM_coreUtils/include -I/usr/ports/multimedia/avidemux/work/avidemux_2.7.4/avidemux_core/ADM_coreVideoEncoder/include -I/usr/ports/multimedia/avidemux/work/avidemux_2.7.4/avidemux_core/ADM_coreVideoFilter/include -I/usr/ports/multimedia/avidemux/work/avidemux_2.7.4/avidemux_core/ADM_coreVideoCodec/include -I/usr/ports/multimedia/avidemux/work/avidemux_2.7.4/avidemux_core/ADM_coreImageLoader/include -I/usr/ports/multimedia/avidemux/work/avidemux_2.7.4/avidemux_core/ADM_coreJobs/include -I/usr/ports/multimedia/avidemux/work/avidemux_2.7.4/avidemux_core/ADM_coreSocket/include -I/usr/ports/multimedia/avidemux/work/avidemux_2.7.4/avidemux_core/ADM_coreAudioCodec/include -I/usr/ports/multimedia/avidemux/work/.build/ffmpeg/source -I/usr/ports/multimedia/avidemux/work/.build/ffmpeg/build  -O2 -pipe  -fno-omit-frame-pointer -DLIBICONV_PLUG -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc9  -I/usr/local/include -DLIBICONV_PLUG -Wl,-rpath=/usr/local/lib/gcc9 -fmessage-length=0 -fvisibility=hidden -fvisibility-inlines-hidden -O2 -pipe  -fno-omit-frame-pointer -DLIBICONV_PLUG -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc9  -I/usr/local/include -DLIBICONV_PLUG -Wl,-rpath=/usr/local/lib/gcc9 -fPIC   -Wattributes -o CMakeFiles/ADM_core6.dir/ADM_crashdump_unix.cpp.o -c /usr/ports/multimedia/avidemux/work/avidemux_2.7.4/avidemux_core/ADM_core/src/ADM_crashdump_unix.cpp
/usr/ports/multimedia/avidemux/work/avidemux_2.7.4/avidemux_core/ADM_core/src/ADM_crashdump_unix.cpp:43:8: error: 'sighandler_t' does not name a type; did you mean 'sigandset'?
   43 | static sighandler_t      oldSignalHandlerSigInt;
      |        ^~~~~~~~~~~~
      |        sigandset
/usr/ports/multimedia/avidemux/work/avidemux_2.7.4/avidemux_core/ADM_core/src/ADM_crashdump_unix.cpp:44:8: error: 'sighandler_t' does not name a type; did you mean 'sigandset'?
   44 | static sighandler_t      oldSignalHandlerSigSev;
      |        ^~~~~~~~~~~~
      |        sigandset
/usr/ports/multimedia/avidemux/work/avidemux_2.7.4/avidemux_core/ADM_core/src/ADM_crashdump_unix.cpp: In function 'void installSigHandler()':
/usr/ports/multimedia/avidemux/work/avidemux_2.7.4/avidemux_core/ADM_core/src/ADM_crashdump_unix.cpp:63:5: error: 'oldSignalHandlerSigSev' was not declared in this scope
   63 |     oldSignalHandlerSigSev=signal(SIGSEGV, sig_segfault_handler); // show stacktrace on default
      |     ^~~~~~~~~~~~~~~~~~~~~~
/usr/ports/multimedia/avidemux/work/avidemux_2.7.4/avidemux_core/ADM_core/src/ADM_crashdump_unix.cpp:64:5: error: 'oldSignalHandlerSigInt' was not declared in this scope
   64 |     oldSignalHandlerSigInt=signal(SIGINT, sig_sigint_handler); // show stacktrace on default
      |     ^~~~~~~~~~~~~~~~~~~~~~
gmake[4]: *** [ADM_core/src/CMakeFiles/ADM_core6.dir/build.make:235: ADM_core/src/CMakeFiles/ADM_core6.dir/ADM_crashdump_unix.cpp.o] Error 1
gmake[4]: Leaving directory '/usr/ports/multimedia/avidemux/work/.build'
gmake[3]: *** [CMakeFiles/Makefile2:1226: ADM_core/src/CMakeFiles/ADM_core6.dir/all] Error 2
Comment 6 Lars Herschke 2020-02-15 13:07:29 UTC
Created attachment 211666 [details]
update to 2.7.4 including qt5 port second try

Sorry, the tar archive is missing two patches that I had created. Attached the complete archive.
Comment 7 rkoberman 2020-02-15 18:06:22 UTC
(In reply to Lars Herschke from comment #6)
Could something still be missing? I'm still getting the same sighandler_t error building ADM_crashdump_unix.cpp. The diff has no patch to avidemux_core/ADM_core/src/ADM_crashdump_unix.cpp.

Again, thanks so much for working on this.
Comment 8 Lars Herschke 2020-02-15 18:18:33 UTC
The two patches (patch-avidemux__core_ADM__core_src_ADM__crashdump__unix.cpp and patch-avidemux__core_ADM__core_src_ADM__folder__linux.cpp) are included as a file in the new tar archive and not in the diff files.
Comment 9 rkoberman 2020-02-16 07:24:33 UTC
I have tested the latest update and it builds cleanly and runs well. The only issue I have seen is a threading error when exiting, but this was present in prior versions, so can be ignored.

Next steps are to generate a set of clean diffs including the two not in the tar file and submit with comments about deleted patch files to be committed. At the same time, someone needs to confirm that all CVEs referencing older versions of the ports are resolved and submit this to port-security.

Lars, you did the work to get the graphics to build. Tobias, you did the main work on the remaining three ports. Do one of you wish to do this or should I? I am willing.

Thanks again to both of you for working on this.
Comment 10 Tobias C. Berner freebsd_committer 2020-02-16 07:34:38 UTC
(In reply to rkoberman from comment #9)
Feel free to do it :)
Comment 11 Lars Herschke 2020-02-16 11:54:35 UTC
Created attachment 211691 [details]
full diff file including change to multimedia/Makefile
Comment 12 Lars Herschke 2020-02-16 12:01:50 UTC
The entries in the VuXML database result from the bundled ffmpeg 2.7.2. in Avidemux 2.6.11. Avidemux 2.7.4 bundles ffmpeg 4.1.4. I have no idea how to report this to the security team or how to update the database. In addition, I have no commit rights for both the ports repository and the VuXML database anyway.
Comment 13 Tobias C. Berner freebsd_committer 2020-02-16 12:03:13 UTC
Moin moin 


PLUGIN_UI+=	QT4 <-- looks wrong

mfg tobias
Comment 14 Tobias C. Berner freebsd_committer 2020-02-16 12:07:39 UTC
LIB_DEPENDS+=	libdca.so:multimedia/libdca
PLIST_SUB+=	DCA="@comment "

This can be written much nicer without using an if/else when setting OPTIONS_SUB=yes (plist handling) and using DCA_LIB_DEPENDS=libdca.so:multimedia/libdca [1]

mfg Tobias

[1] See chapters and in the porters handbook: https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-options.htm
Comment 15 Lars Herschke 2020-02-16 13:55:49 UTC
(In reply to Tobias C. Berner from comment #13)
That may look wrong, but it is correct.
Comment 16 Lars Herschke 2020-02-16 14:21:12 UTC
(In reply to Tobias C. Berner from comment #14)
I just wanted to build the new Avidemux version with GUI and oriented myself as close as possible to the existing port. I think your suggestion is for a complete refactoring, because it affects all options and not just DCA. Also the CMAKE_ARGS would have to be rewritten.
Comment 17 Tobias C. Berner freebsd_committer 2020-02-16 15:00:29 UTC
(In reply to Lars Herschke from comment #15)
Indeed it is, you're right.
Comment 18 Tobias C. Berner freebsd_committer 2020-02-16 15:02:26 UTC
(In reply to Lars Herschke from comment #16)
Sure, it just caught my eye in the patch. The ports are in high need of a refacroring. But we can also do that after this change.

Mfg Tobias
Comment 19 rkoberman 2020-02-17 06:42:51 UTC
We need to:
Get this committed with the latest patches. This is a bit odd as it is to simultaneously update three existing avidemux ports to 2.7.4 and add a new port, avidemux-qt5-2.7.4.

Get the vulnerabilities set to < 2.6.11. (That version actually updated ffmpeg to a new, non-vulnerable version.) Setting them to < 2.7.4 would be fine, too. All vulnerabilities were a result of the version of ffmpeg used. 4.1.4 is now used.

Tim, are you a committer for multimedia? If so, can you do this? Is there anything else I can do?
Comment 20 rkoberman 2020-02-18 02:01:22 UTC
(In reply to rkoberman from comment #19)
Don't ask where "Tim" came from. I meant "Tobias". I know I've seen multimedia commits, so I am assuming that you can do multimedia commits.

Sorry about the name brain fart. Or a senior moment.
Comment 21 Tobias C. Berner freebsd_committer 2020-02-23 08:44:27 UTC
(In reply to rkoberman from comment #20)
No worries. I'll commit it shortly.
Comment 22 commit-hook freebsd_committer 2020-02-23 09:05:01 UTC
A commit references this bug:

Author: tcberner
Date: Sun Feb 23 09:04:47 UTC 2020
New revision: 526907
URL: https://svnweb.freebsd.org/changeset/ports/526907

  multimedia/avidemux: update to 2.7.4 and readd Qt gui port

  - multimedia/avidemux-qt5 repo copied from multimedia/avidemux-qt4
  - The port as a whole is in need of a little modernization

  PR:		242634
  Submitted by:	Lars Herschke <lhersch@dssgmbh.de>,tcberner
  Tested by:	rkoberman@gmail.com
  Reported by:	VVD <vvd@unislabs.com>

Comment 23 Tobias C. Berner freebsd_committer 2020-02-23 09:05:06 UTC