Merge pull request #120582 from dotlambda/ffmpeg_2-drop

ffmpeg_2: mark as insecure

authored by Robert Schütz and committed by GitHub bda9e192 46ecc3e1

+17 -288
-95
pkgs/applications/video/kino/default.nix
··· 1 - # is this configure option of interest? 2 - #--enable-udev-rules-dir=PATH 3 - # Where to install udev rules (/etc/udev/rules.d) 4 - 5 - #TODO shared version? 6 - 7 - 8 - # This is my config output.. Much TODO ? 9 - #source path /tmp/nix-31998-1/kino-1.2.0/ffmpeg 10 - #C compiler gcc 11 - #make make 12 - #.align is power-of-two no 13 - #ARCH x86_64 (generic) 14 - #build suffix -kino 15 - #big-endian no 16 - #MMX enabled yes 17 - #CMOV enabled no 18 - #CMOV is fast no 19 - #gprof enabled no 20 - #debug symbols yes 21 - #strip symbols yes 22 - #optimize yes 23 - #static yes 24 - #shared no 25 - #postprocessing support no 26 - #software scaler enabled yes 27 - #video hooking no 28 - #network support no 29 - #threading support no 30 - #SDL support no 31 - #Sun medialib support no 32 - #AVISynth enabled no 33 - #liba52 support no 34 - #liba52 dlopened no 35 - #libdts support no 36 - #libfaac enabled no 37 - #libfaad enabled no 38 - #faadbin enabled no 39 - #libgsm enabled no 40 - #libmp3lame enabled no 41 - #libnut enabled no 42 - #libogg enabled no 43 - #libtheora enabled no 44 - #libvorbis enabled no 45 - #x264 enabled no 46 - #XviD enabled no 47 - #zlib enabled no 48 - #AMR-NB float support no 49 - #AMR-NB fixed support no 50 - #AMR-WB float support no 51 - #AMR-WB IF2 support no 52 - 53 - { lib, stdenv, fetchurl, gtk2, libglade, libxml2, libraw1394, libsamplerate, libdv 54 - , pkg-config, perlPackages, libavc1394, libiec61883, libXv, gettext 55 - , libX11, glib, cairo, intltool, ffmpeg, libv4l 56 - }: 57 - 58 - stdenv.mkDerivation { 59 - name = "kino-1.3.4"; 60 - 61 - src = fetchurl { 62 - url = "mirror://sourceforge/kino/kino-1.3.4.tar.gz"; 63 - sha256 = "020s05k0ma83rq2kfs8x474pqicaqp9spar81qc816ddfrnh8k8i"; 64 - }; 65 - 66 - buildInputs = [ gtk2 libglade libxml2 libraw1394 libsamplerate libdv 67 - pkg-config libavc1394 libiec61883 intltool libXv gettext libX11 glib cairo ffmpeg libv4l ] # TODOoptional packages 68 - ++ (with perlPackages; [ perl XMLParser ]); 69 - 70 - configureFlags = [ "--enable-local-ffmpeg=no" ]; 71 - 72 - hardeningDisable = [ "format" ]; 73 - 74 - NIX_LDFLAGS = "-lavcodec -lavutil"; 75 - 76 - patches = [ ./kino-1.3.4-v4l1.patch ./kino-1.3.4-libav-0.7.patch ./kino-1.3.4-libav-0.8.patch ]; #./kino-1.3.4-libavcodec-pkg-config.patch ]; 77 - 78 - postInstall = " 79 - rpath=`patchelf --print-rpath \$out/bin/kino`; 80 - for i in $buildInputs; do 81 - echo adding \$i/lib 82 - rpath=\$rpath\${rpath:+:}\$i/lib 83 - done 84 - for i in \$out/bin/*; do 85 - patchelf --set-rpath \"\$rpath\" \"\$i\" 86 - done 87 - "; 88 - 89 - meta = { 90 - description = "Non-linear DV editor for GNU/Linux"; 91 - homepage = "http://www.kinodv.org/"; 92 - license = lib.licenses.gpl2; 93 - platforms = lib.platforms.linux; 94 - }; 95 - }
-60
pkgs/applications/video/kino/kino-1.3.4-libav-0.7.patch
··· 1 - --- kino-1.3.4.orig/src/frame.cc 2011-07-17 14:54:59.089481638 +0200 2 - +++ kino-1.3.4/src/frame.cc 2011-07-17 15:09:23.199481714 +0200 3 - @@ -1063,7 +1063,12 @@ 4 - AVPicture dest; 5 - int got_picture; 6 - 7 - - avcodec_decode_video( libavcodec, frame, &got_picture, data, GetFrameSize() ); 8 - + AVPacket pkt; 9 - + av_init_packet(&pkt); 10 - + pkt.data = data; 11 - + pkt.size = GetFrameSize(); 12 - + 13 - + avcodec_decode_video2( libavcodec, frame, &got_picture, &pkt ); 14 - if ( got_picture ) 15 - { 16 - avpicture_fill( &dest, static_cast<uint8_t*>( rgb ), PIX_FMT_RGB24, GetWidth(), GetHeight() ); 17 - @@ -1123,7 +1128,12 @@ 18 - AVPicture output; 19 - int got_picture; 20 - 21 - - avcodec_decode_video( libavcodec, frame, &got_picture, data, GetFrameSize() ); 22 - + AVPacket pkt; 23 - + av_init_packet(&pkt); 24 - + pkt.data = data; 25 - + pkt.size = GetFrameSize(); 26 - + 27 - + avcodec_decode_video2( libavcodec, frame, &got_picture, &pkt ); 28 - if ( got_picture ) 29 - { 30 - avpicture_fill( &output, static_cast<uint8_t*>( yuv ), PIX_FMT_YUV422, GetWidth(), GetHeight() ); 31 - @@ -1156,7 +1166,12 @@ 32 - AVFrame *frame = avcodec_alloc_frame(); 33 - int got_picture; 34 - 35 - - avcodec_decode_video( libavcodec, frame, &got_picture, data, GetFrameSize() ); 36 - + AVPacket pkt; 37 - + av_init_packet(&pkt); 38 - + pkt.data = data; 39 - + pkt.size = GetFrameSize(); 40 - + 41 - + avcodec_decode_video2( libavcodec, frame, &got_picture, &pkt ); 42 - 43 - int width = GetWidth(), height = GetHeight(); 44 - 45 - @@ -1319,12 +1334,12 @@ 46 - #if defined(HAVE_LIBAVCODEC) 47 - if ( avformatEncoder == NULL ) 48 - { 49 - - avformatEncoder = av_alloc_format_context(); 50 - + avformatEncoder = avformat_alloc_context(); 51 - if ( avformatEncoder ) 52 - { 53 - - avformatEncoder->oformat = guess_format( "dv", NULL, NULL ); 54 - + avformatEncoder->oformat = av_guess_format( "dv", NULL, NULL ); 55 - AVStream* vst = av_new_stream( avformatEncoder, 0 ); 56 - - vst->codec->codec_type = CODEC_TYPE_VIDEO; 57 - + vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; 58 - vst->codec->codec_id = CODEC_ID_DVVIDEO; 59 - vst->codec->bit_rate = 25000000; 60 - vst->start_time = 0;
-57
pkgs/applications/video/kino/kino-1.3.4-libav-0.8.patch
··· 1 - --- kino-1.3.4.orig/src/frame.cc 2012-05-14 19:55:42.153772418 -0700 2 - +++ kino-1.3.4/src/frame.cc 2012-05-14 20:28:34.448838653 -0700 3 - @@ -101,8 +101,9 @@ 4 - #if defined(HAVE_LIBAVCODEC) 5 - pthread_mutex_lock( &avcodec_mutex ); 6 - av_register_all(); 7 - - libavcodec = avcodec_alloc_context(); 8 - - avcodec_open( libavcodec, avcodec_find_decoder( CODEC_ID_DVVIDEO ) ); 9 - + libavcodec = avcodec_alloc_context3(NULL); 10 - + avcodec_open2( libavcodec, 11 - + avcodec_find_decoder( CODEC_ID_DVVIDEO ), NULL ); 12 - pthread_mutex_unlock( &avcodec_mutex ); 13 - data = ( unsigned char* ) av_mallocz( 144000 ); 14 - #if defined(HAVE_SWSCALE) 15 - @@ -1338,7 +1339,7 @@ 16 - if ( avformatEncoder ) 17 - { 18 - avformatEncoder->oformat = av_guess_format( "dv", NULL, NULL ); 19 - - AVStream* vst = av_new_stream( avformatEncoder, 0 ); 20 - + AVStream* vst = avformat_new_stream( avformatEncoder, NULL ); 21 - vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; 22 - vst->codec->codec_id = CODEC_ID_DVVIDEO; 23 - vst->codec->bit_rate = 25000000; 24 - @@ -1364,12 +1365,10 @@ 25 - vst->sample_aspect_ratio = avcodecEncoder->sample_aspect_ratio; 26 - #endif 27 - avcodecEncoder->thread_count = 2; 28 - - avcodec_thread_init( avcodecEncoder, avcodecEncoder->thread_count ); 29 - avcodecEncoder->time_base= isPAL ? ( AVRational ){ 1, 25 } : ( AVRational ){ 1001, 30000 }; 30 - avcodecEncoder->pix_fmt = isPAL ? PIX_FMT_YUV420P : PIX_FMT_YUV411P; 31 - avcodecEncoder->flags |= CODEC_FLAG_INTERLACED_DCT; 32 - - av_set_parameters( avformatEncoder, NULL ); 33 - - avcodec_open( avcodecEncoder, avcodec_find_encoder( CODEC_ID_DVVIDEO ) ); 34 - + avcodec_open2( avcodecEncoder, avcodec_find_encoder( CODEC_ID_DVVIDEO ), NULL ); 35 - av_new_packet( &avpacketEncoder, 144000 ); 36 - tempImage = ( uint8_t* ) av_malloc( 37 - avpicture_get_size( avcodecEncoder->pix_fmt, avcodecEncoder->width, avcodecEncoder->height ) ); 38 - @@ -1475,16 +1474,16 @@ 39 - 40 - // Encode 41 - bytesInFrame = avcodec_encode_video( avcodecEncoder, avpacketEncoder.data, size, output ); 42 - - url_open_buf( &avformatEncoder->pb, data, bytesInFrame, URL_WRONLY ); 43 - + avformatEncoder->pb = avio_alloc_context(data, bytesInFrame, 0, NULL, NULL, NULL, NULL); 44 - avpacketEncoder.size = bytesInFrame; 45 - if ( !isEncoderHeaderWritten ) 46 - { 47 - - av_write_header( avformatEncoder ); 48 - + avformat_write_header( avformatEncoder, NULL ); 49 - isEncoderHeaderWritten = true; 50 - } 51 - av_write_frame( avformatEncoder, &avpacketEncoder ); 52 - #if LIBAVFORMAT_VERSION_INT >= ((52<<16)+(0<<8)+0) 53 - - url_close_buf( avformatEncoder->pb ); 54 - + avio_close( avformatEncoder->pb ); 55 - #else 56 - url_close_buf( &avformatEncoder->pb ); 57 - #endif
-11
pkgs/applications/video/kino/kino-1.3.4-libavcodec-pkg-config.patch
··· 1 - --- a/kino-1.3.4/configure.in 2009-09-08 02:35:23.000000000 -0400 2 - +++ b/kino-1.3.4/configure.in 2014-01-27 14:53:01.366063037 -0500 3 - @@ -221,7 +221,7 @@ 4 - if (test "x$avcodec_include" != x) || (test "x$avcodec_lib" != x) ; then 5 - local_legacy_ffmpeg_test 6 - else 7 - - PKG_CHECK_MODULES(AVCODEC, libavformat, 8 - + PKG_CHECK_MODULES(AVCODEC, [libavcodec libavformat libavutil], 9 - [ 10 - AC_DEFINE(HAVE_LIBAVCODEC, 1, [Enable FFMPEG libavcodec]) 11 - AC_SUBST(AVCODEC_LIBS)
-21
pkgs/applications/video/kino/kino-1.3.4-v4l1.patch
··· 1 - no-1.3.3.orig/ffmpeg/libavdevice/v4l.c 2011-05-17 02:20:37.161004916 +0400 2 - +++ kino-1.3.3.orig/ffmpeg/libavdevice/v4l.c 2011-05-17 02:21:57.302377529 +0400 3 - @@ -26,7 +26,7 @@ 4 - #include <sys/mman.h> 5 - #include <sys/time.h> 6 - #define _LINUX_TIME_H 1 7 - -#include <linux/videodev.h> 8 - +#include <libv4l1-videodev.h> 9 - #include <time.h> 10 - 11 - typedef struct { 12 - --- kino-1.3.3.orig/src/v4l.h 2011-05-17 02:20:38.896969666 +0400 13 - +++ kino-1.3.3.orig/src/v4l.h 2011-05-17 02:21:39.922730395 +0400 14 - @@ -40,7 +40,7 @@ 15 - 16 - #define _DEVICE_H_ 17 - #define _LINUX_TIME_H 18 - -#include <linux/videodev.h> 19 - +#include <libv4l1-videodev.h> 20 - 21 - #include "displayer.h"
+3
pkgs/development/libraries/ffmpeg/2.8.nix
··· 4 4 version = "${branch}.17"; 5 5 branch = "2.8"; 6 6 sha256 = "05bnhvs2f82aq95z1wd3wr42sljdfq4kiyzqwhpji983mndx14vl"; 7 + knownVulnerabilities = [ 8 + "CVE-2021-30123" 9 + ]; 7 10 } // args)
+2 -2
pkgs/development/libraries/ffmpeg/generic.nix
··· 17 17 # Darwin frameworks 18 18 , Cocoa, darwinFrameworks ? [ Cocoa ] 19 19 # Inherit generics 20 - , branch, sha256, version, patches ? [], ... 20 + , branch, sha256, version, patches ? [], knownVulnerabilities ? [], ... 21 21 }: 22 22 23 23 /* Maintainer notes: ··· 224 224 license = licenses.gpl3; 225 225 platforms = platforms.all; 226 226 maintainers = with maintainers; [ codyopel ]; 227 - inherit branch; 227 + inherit branch knownVulnerabilities; 228 228 }; 229 229 }
+2 -2
pkgs/games/ultrastardx/default.nix
··· 14 14 , SDL2_gfx 15 15 , SDL2_mixer 16 16 , SDL2_net, SDL2_ttf 17 - , ffmpeg 17 + , ffmpeg_3 18 18 , sqlite 19 19 , zlib 20 20 , libX11 ··· 26 26 sharedLibs = [ 27 27 pcre portaudio freetype 28 28 SDL2 SDL2_image SDL2_gfx SDL2_mixer SDL2_net SDL2_ttf 29 - sqlite lua zlib libX11 libGLU libGL ffmpeg 29 + sqlite lua zlib libX11 libGLU libGL ffmpeg_3 30 30 ]; 31 31 32 32 in stdenv.mkDerivation rec {
+6 -1
pkgs/tools/audio/acoustid-fingerprinter/default.nix
··· 17 17 18 18 patches = [ 19 19 (fetchpatch { 20 + name = "fix-build-with-libav-10.patch"; 21 + url = "https://bitbucket.org/acoustid/acoustid-fingerprinter/commits/2c778334a9fc2f0ccf9b1d7635c116bce6509748/raw"; 22 + sha256 = "1smyp3x5n6jwxpgw60xsijq2fn6g1gl759h1lm5agaxhcyyqn0i0"; 23 + }) 24 + (fetchpatch { 25 + name = "fix-build-failure-on-gcc-6.patch"; 20 26 url = "https://bitbucket.org/acoustid/acoustid-fingerprinter/commits/632e87969c3a5562a5d4842b03613267ba6236b2/raw"; 21 27 sha256 = "15hm9knrpqn3yqrwyjz4zh2aypwbcycd0c5svrsy1fb2h2rh05jk"; 22 28 }) 23 - ./ffmpeg.patch 24 29 ]; 25 30 26 31 meta = with lib; {
-26
pkgs/tools/audio/acoustid-fingerprinter/ffmpeg.patch
··· 1 - diff --git a/decoder.h b/decoder.h 2 - index 028f58f..4428ac1 100644 3 - --- a/decoder.h 4 - +++ b/decoder.h 5 - @@ -39,6 +39,8 @@ extern "C" { 6 - #define AV_SAMPLE_FMT_S16 SAMPLE_FMT_S16 7 - #endif 8 - 9 - +#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 10 - + 11 - class Decoder 12 - { 13 - public: 14 - diff --git a/ffmpeg/audioconvert.h b/ffmpeg/audioconvert.h 15 - index 2b28e2e..a699986 100644 16 - --- a/ffmpeg/audioconvert.h 17 - +++ b/ffmpeg/audioconvert.h 18 - @@ -79,7 +79,7 @@ int avcodec_channel_layout_num_channels(int64_t channel_layout); 19 - * @param fmt_name Format name, or NULL if unknown 20 - * @return Channel layout mask 21 - */ 22 - -uint64_t avcodec_guess_channel_layout(int nb_channels, enum CodecID codec_id, const char *fmt_name); 23 - +uint64_t avcodec_guess_channel_layout(int nb_channels, enum AVCodecID codec_id, const char *fmt_name); 24 - 25 - struct AVAudioConvert; 26 - typedef struct AVAudioConvert AVAudioConvert;
+1
pkgs/top-level/aliases.nix
··· 352 352 kinetic-cpp-client = throw "kinetic-cpp-client has been removed from nixpkgs, as it's abandoned."; # 2020-04-28 353 353 kicad-with-packages3d = kicad; # added 2019-11-25 354 354 kindlegen = throw "kindlegen has been removed from nixpkgs, as it's abandoned and no longer available for download."; # 2021-03-09 355 + kino = throw "kino has been removed because it was broken and abandoned"; # added 2021-04-25 355 356 krename-qt5 = krename; # added 2017-02-18 356 357 kerberos = libkrb5; # moved from top-level 2021-03-14 357 358 keymon = throw "keymon has been removed from nixpkgs, as it's abandoned and archived."; # 2019-12-10
+3 -13
pkgs/top-level/all-packages.nix
··· 693 693 694 694 acousticbrainz-client = callPackage ../tools/audio/acousticbrainz-client { }; 695 695 696 - acoustidFingerprinter = callPackage ../tools/audio/acoustid-fingerprinter { 697 - ffmpeg = ffmpeg_2; 698 - }; 696 + acoustidFingerprinter = callPackage ../tools/audio/acoustid-fingerprinter { }; 699 697 700 698 alsaequal = callPackage ../tools/audio/alsaequal { }; 701 699 ··· 22504 22502 cmus = callPackage ../applications/audio/cmus { 22505 22503 inherit (darwin.apple_sdk.frameworks) AudioUnit CoreAudio; 22506 22504 libjack = libjack2; 22507 - ffmpeg = ffmpeg_2; 22508 22505 }; 22509 22506 22510 22507 cmusfm = callPackage ../applications/audio/cmusfm { }; ··· 24219 24216 kid3 = libsForQt5.callPackage ../applications/audio/kid3 { }; 24220 24217 24221 24218 kile = libsForQt5.callPackage ../applications/editors/kile { }; 24222 - 24223 - kino = callPackage ../applications/video/kino { 24224 - inherit (gnome2) libglade; 24225 - ffmpeg = ffmpeg_2; 24226 - }; 24227 24219 24228 24220 kitsas = libsForQt5.callPackage ../applications/office/kitsas { }; 24229 24221 ··· 27596 27588 27597 27589 airstrike = callPackage ../games/airstrike { }; 27598 27590 27599 - alephone = callPackage ../games/alephone { ffmpeg = ffmpeg_2; }; 27591 + alephone = callPackage ../games/alephone { }; 27600 27592 alephone-durandal = callPackage ../games/alephone/durandal { }; 27601 27593 alephone-eternal = callPackage ../games/alephone/eternal { }; 27602 27594 alephone-evil = callPackage ../games/alephone/evil { }; ··· 28462 28454 28463 28455 ultrastar-manager = libsForQt5.callPackage ../tools/misc/ultrastar-manager { }; 28464 28456 28465 - ultrastardx = callPackage ../games/ultrastardx { 28466 - ffmpeg = ffmpeg_2; 28467 - }; 28457 + ultrastardx = callPackage ../games/ultrastardx { }; 28468 28458 28469 28459 unciv = callPackage ../games/unciv { }; 28470 28460