Your message dated Mon, 24 Aug 2015 04:37:01 +0000
with message-id <[email protected]>
and subject line Bug#763632: fixed in chromium-browser 44.0.2403.157-1
has caused the Debian Bug report #763632,
regarding chromium: use system FFmpeg instead of embedded code copy
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
763632: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=763632
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: chromium
Version: 37.0.2062.120-2
Severity: important
Tags: security, patch

Dear Maintainer,

chromium uses an embedded code copy of FFmpeg (third_party/ffmpeg in the source directory) to compile libffmpegsumo.so, which is included in the chromium binary package.

This is not allowed by Debian policy ยง 4.13 [1]:
"Debian packages should not make use of these convenience copies unless the included package is explicitly intended to be used in this way. If the included code is already in the Debian archive in the form of a library, the Debian packaging should ensure that binary packages reference the libraries already in Debian and the convenience copy is not used. If the included code is not already in Debian, it should be packaged separately as a prerequisite if possible."

As system FFmpeg libraries are now available, chromium should use them instead of the embedded FFmpeg copy, because it makes fixing security bugs easier.

Attached patch changes chromium's Debian packaging to use the system libraries, including some patches to make this work:
 * fix_for_system_ffmpeg.patch: Fixes a conceptual bug that made it
   impossible to use the system FFmpeg libraries.
 * ffmpeg_2.4.patch: Adapts chromium to the API differences between the
   embedded copy and FFmpeg 2.4.
 * fix_for_system_ffmpeg_ABI.patch: Fixes the ABI used by chromium to
   match the system FFmpeg ABI.

Please apply this patch as soon as possible, because the freeze is coming closer.

Best regards,
Andreas

1: https://www.debian.org/doc/debian-policy/ch-source.html#s-embeddedfiles
diff --git a/debian/control b/debian/control
index 41c8c1e..bb5a9ec 100644
--- a/debian/control
+++ b/debian/control
@@ -83,6 +83,9 @@ Build-Depends:
  libjs-excanvas,
  libjs-jquery-flot | libjs-flot,
  libgcrypt11-dev | libgcrypt20-dev,
+ libavcodec-ffmpeg-dev,
+ libavformat-ffmpeg-dev,
+ libavutil-ffmpeg-dev,
 Standards-Version: 3.9.5
 
 Package: chromium
diff --git a/debian/patches/ffmpeg_2.4.patch b/debian/patches/ffmpeg_2.4.patch
new file mode 100644
index 0000000..6449b1c
--- /dev/null
+++ b/debian/patches/ffmpeg_2.4.patch
@@ -0,0 +1,45 @@
+Description: Adapt to changes in FFmpeg API
+ * FF_INPUT_BUFFER_PADDING_SIZE was increased to 32.
+ * The first argument of av_dict_get is now const.
+
+Author: Andreas Cadhalpun <[email protected]>
+Last-Update: <2014-09-29>
+
+--- a/media/base/decoder_buffer.h
++++ b/media/base/decoder_buffer.h
+@@ -32,7 +32,7 @@ class MEDIA_EXPORT DecoderBuffer
+     : public base::RefCountedThreadSafe<DecoderBuffer> {
+  public:
+   enum {
+-    kPaddingSize = 16,
++    kPaddingSize = 32,
+ #if defined(ARCH_CPU_ARM_FAMILY)
+     kAlignmentSize = 16
+ #else
+--- a/third_party/ffmpeg/chromium/ffmpegsumo1.sigs
++++ b/third_party/ffmpeg/chromium/ffmpegsumo1.sigs
+@@ -2,6 +2,15 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+ 
++#ifndef FF_CONST_AVUTIL53
++#if LIBAVUTIL_VERSION_MAJOR >= 53
++#define FF_CONST_AVUTIL53 const
++#else
++#define FF_CONST_AVUTIL53
++#endif
++#endif
++
++
+ //------------------------------------------------
+ // Functions from avutil used in chromium code.
+ //------------------------------------------------
+@@ -11,7 +20,7 @@ void *av_malloc(size_t size);
+ void av_free(void *ptr);
+ void av_log_set_level(int level);
+ int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags);
+-AVDictionaryEntry *av_dict_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags);
++AVDictionaryEntry *av_dict_get(FF_CONST_AVUTIL53 AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags);
+ int av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples, enum AVSampleFormat sample_fmt, int align);
+ int av_image_check_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx);
+ int av_image_fill_linesizes(int *linesizes, enum PixelFormat pix_fmt, int width);
diff --git a/debian/patches/fix_for_system_ffmpeg.patch b/debian/patches/fix_for_system_ffmpeg.patch
new file mode 100644
index 0000000..b8630d7
--- /dev/null
+++ b/debian/patches/fix_for_system_ffmpeg.patch
@@ -0,0 +1,241 @@
+Description: Fix a conceptual bug in chromium to allow using system FFmpeg
+ The embedded FFmpeg copy is used to build one shared library, libffmpegsumo.
+ However, this corresponds to three system FFmpeg libraries, libavutil,
+ libavcodec and libavformat.
+ At runtime, chromium first tries to load libffmpegsumo.
+ If this is not successful, it falls back to the system libraries, but this
+ does not work correctly, because it only loads one library, e.g. libavutil.
+ Since then the functions from libavcodec and libavformat are not available,
+ the initialization of the media library fails.
+ This patch adapts chromium to look separately for the functions in the
+ different system libraries. If libffmpegsumo.so exists, all symbols are
+ loaded from there, but if not, the three system libraries are used.
+ Additionally the functions av_frame_unref, av_frame_free, av_frame_alloc and
+ avcodec_fill_audio_frame were in the list of the wrong library, which is
+ also fixed.
+
+Author: Andreas Cadhalpun <[email protected]>
+Last-Update: <2014-09-29>
+
+--- a/media/base/media_posix.cc
++++ b/media/base/media_posix.cc
+@@ -14,7 +14,9 @@
+ #include "third_party/ffmpeg/ffmpeg_stubs.h"
+ 
+ using third_party_ffmpeg::kNumStubModules;
+-using third_party_ffmpeg::kModuleFfmpegsumo;
++using third_party_ffmpeg::kModuleFfmpegsumo1;
++using third_party_ffmpeg::kModuleFfmpegsumo2;
++using third_party_ffmpeg::kModuleFfmpegsumo3;
+ using third_party_ffmpeg::InitializeStubs;
+ using third_party_ffmpeg::StubPathMap;
+ 
+@@ -48,16 +50,19 @@ static const base::FilePath::CharType kSumoLib[] =
+ bool InitializeMediaLibraryInternal(const base::FilePath& module_dir) {
+   StubPathMap paths;
+ 
++  DCHECK_EQ(kNumStubModules, 3);
++
+   // First try to initialize with Chrome's sumo library.
+-  DCHECK_EQ(kNumStubModules, 1);
+-  paths[kModuleFfmpegsumo].push_back(module_dir.Append(kSumoLib).value());
++  paths[kModuleFfmpegsumo1].push_back(module_dir.Append(kSumoLib).value());
++  paths[kModuleFfmpegsumo2].push_back(module_dir.Append(kSumoLib).value());
++  paths[kModuleFfmpegsumo3].push_back(module_dir.Append(kSumoLib).value());
+ 
+   // If that fails, see if any system libraries are available.
+-  paths[kModuleFfmpegsumo].push_back(module_dir.Append(
++  paths[kModuleFfmpegsumo1].push_back(module_dir.Append(
+       FILE_PATH_LITERAL(DSO_NAME("avutil", AVUTIL_VERSION))).value());
+-  paths[kModuleFfmpegsumo].push_back(module_dir.Append(
++  paths[kModuleFfmpegsumo2].push_back(module_dir.Append(
+       FILE_PATH_LITERAL(DSO_NAME("avcodec", AVCODEC_VERSION))).value());
+-  paths[kModuleFfmpegsumo].push_back(module_dir.Append(
++  paths[kModuleFfmpegsumo3].push_back(module_dir.Append(
+       FILE_PATH_LITERAL(DSO_NAME("avformat", AVFORMAT_VERSION))).value());
+ 
+   return InitializeStubs(paths);
+--- a/third_party/ffmpeg/BUILD.gn
++++ b/third_party/ffmpeg/BUILD.gn
+@@ -12,7 +12,7 @@ platform_config_root =
+ generate_stubs_script = "//tools/generate_stubs/generate_stubs.py"
+ 
+ # Used by ffmpeg_generate_stubs and ffmpeg_generate_def
+-sig_files = [ "chromium/ffmpegsumo.sigs" ]
++sig_files = [ "chromium/ffmpegsumo1.sigs", "chromium/ffmpegsumo2.sigs", "chromium/ffmpegsumo3.sigs" ]
+ 
+ # TODO(ajwong): Should be in ffmpeg_generate_stubs if we could grab the
+ # outputs of an action via a function.
+--- a/third_party/ffmpeg/chromium/ffmpegsumo.sigs
++++ /dev/null
+@@ -1,72 +0,0 @@
+-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+-// Use of this source code is governed by a BSD-style license that can be
+-// found in the LICENSE file.
+-
+-//------------------------------------------------
+-// Functions from avcodec used in chromium code.
+-//------------------------------------------------
+-AVCodecContext *avcodec_alloc_context3(const AVCodec *codec);
+-AVCodec *avcodec_find_decoder(enum AVCodecID id);
+-int av_new_packet(AVPacket *pkt, int size);
+-int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, const AVPacket *avpkt);
+-int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, int *got_picture_ptr, const AVPacket *avpkt);
+-int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options);
+-int avcodec_close(AVCodecContext *avctx);
+-const char *avcodec_get_name(enum AVCodecID id);
+-void av_free_packet(AVPacket *pkt);
+-void av_init_packet(AVPacket *pkt);
+-int av_dup_packet(AVPacket *pkt);
+-void avcodec_flush_buffers(AVCodecContext *avctx);
+-void av_register_bitstream_filter(AVBitStreamFilter *bsf);
+-AVBitStreamFilterContext *av_bitstream_filter_init(const char *name);
+-int av_bitstream_filter_filter(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx, const char *args, uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size, int keyframe);
+-void av_bitstream_filter_close(AVBitStreamFilterContext *bsf);
+-int av_lockmgr_register(AVLockMgrOperation cb);
+-void avcodec_get_frame_defaults(AVFrame *pic);
+-void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height);
+-int av_packet_split_side_data(AVPacket *pkt);
+-uint8_t *av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type, int *size);
+-void av_frame_unref(AVFrame *frame);
+-void av_frame_free(AVFrame **frame);
+-void avcodec_free_frame(AVFrame **frame);
+-AVFrame* av_frame_alloc();
+-int av_packet_copy_props(AVPacket *dst, const AVPacket *src);
+-
+-// RDFT functions.
+-RDFTContext *av_rdft_init(int nbits, enum RDFTransformType trans);
+-void av_rdft_calc(RDFTContext *s, FFTSample *data);
+-void av_rdft_end(RDFTContext *s);
+-
+-
+-//------------------------------------------------
+-// Functions from avformat used in chromium code.
+-//------------------------------------------------
+-void avformat_close_input(AVFormatContext **s);
+-int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options);
+-int av_index_search_timestamp(AVStream *st, int64_t wanted_timestamp, int flags);
+-int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputFormat *fmt, AVDictionary **options);
+-int av_read_frame(AVFormatContext *s, AVPacket *pkt);
+-void av_register_all(void);
+-int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp, int flags);
+-AVFormatContext *avformat_alloc_context(void);
+-void avformat_free_context(AVFormatContext *s);
+-AVIOContext *avio_alloc_context(unsigned char *buffer, int buffer_size, int write_flag, void *opaque, AVIOReadWriteOperation read_packet, AVIOReadWriteOperation write_packet, AVIOSeekOperation seek);
+-int avio_close(AVIOContext *s);
+-
+-
+-//------------------------------------------------
+-// Functions from avutil used in chromium code.
+-//------------------------------------------------
+-int av_get_bytes_per_sample(enum AVSampleFormat sample_fmt);
+-int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq);
+-void *av_malloc(size_t size);
+-void av_free(void *ptr);
+-void av_log_set_level(int level);
+-int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags);
+-AVDictionaryEntry *av_dict_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags);
+-int av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples, enum AVSampleFormat sample_fmt, int align);
+-int av_image_check_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx);
+-int av_image_fill_linesizes(int *linesizes, enum PixelFormat pix_fmt, int width);
+-AVBufferRef *av_buffer_create(uint8_t *data, int size, AVFreeOperation free, void *opaque, int flags);
+-int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels, enum AVSampleFormat sample_fmt, const uint8_t *buf, int buf_size, int align);
+-void *av_buffer_get_opaque(const AVBufferRef *buf);
+--- /dev/null
++++ b/third_party/ffmpeg/chromium/ffmpegsumo1.sigs
+@@ -0,0 +1,22 @@
++// Copyright (c) 2011 The Chromium Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++//------------------------------------------------
++// Functions from avutil used in chromium code.
++//------------------------------------------------
++int av_get_bytes_per_sample(enum AVSampleFormat sample_fmt);
++int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq);
++void *av_malloc(size_t size);
++void av_free(void *ptr);
++void av_log_set_level(int level);
++int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags);
++AVDictionaryEntry *av_dict_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags);
++int av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples, enum AVSampleFormat sample_fmt, int align);
++int av_image_check_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx);
++int av_image_fill_linesizes(int *linesizes, enum PixelFormat pix_fmt, int width);
++AVBufferRef *av_buffer_create(uint8_t *data, int size, AVFreeOperation free, void *opaque, int flags);
++void *av_buffer_get_opaque(const AVBufferRef *buf);
++void av_frame_unref(AVFrame *frame);
++void av_frame_free(AVFrame **frame);
++AVFrame* av_frame_alloc();
+--- /dev/null
++++ b/third_party/ffmpeg/chromium/ffmpegsumo2.sigs
+@@ -0,0 +1,37 @@
++// Copyright (c) 2011 The Chromium Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++
++//------------------------------------------------
++// Functions from avcodec used in chromium code.
++//------------------------------------------------
++AVCodecContext *avcodec_alloc_context3(const AVCodec *codec);
++AVCodec *avcodec_find_decoder(enum AVCodecID id);
++int av_new_packet(AVPacket *pkt, int size);
++int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, const AVPacket *avpkt);
++int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, int *got_picture_ptr, const AVPacket *avpkt);
++int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options);
++int avcodec_close(AVCodecContext *avctx);
++const char *avcodec_get_name(enum AVCodecID id);
++void av_free_packet(AVPacket *pkt);
++void av_init_packet(AVPacket *pkt);
++int av_dup_packet(AVPacket *pkt);
++void avcodec_flush_buffers(AVCodecContext *avctx);
++void av_register_bitstream_filter(AVBitStreamFilter *bsf);
++AVBitStreamFilterContext *av_bitstream_filter_init(const char *name);
++int av_bitstream_filter_filter(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx, const char *args, uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size, int keyframe);
++void av_bitstream_filter_close(AVBitStreamFilterContext *bsf);
++int av_lockmgr_register(AVLockMgrOperation cb);
++void avcodec_get_frame_defaults(AVFrame *pic);
++void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height);
++int av_packet_split_side_data(AVPacket *pkt);
++uint8_t *av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type, int *size);
++void avcodec_free_frame(AVFrame **frame);
++int av_packet_copy_props(AVPacket *dst, const AVPacket *src);
++int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels, enum AVSampleFormat sample_fmt, const uint8_t *buf, int buf_size, int align);
++
++// RDFT functions.
++RDFTContext *av_rdft_init(int nbits, enum RDFTransformType trans);
++void av_rdft_calc(RDFTContext *s, FFTSample *data);
++void av_rdft_end(RDFTContext *s);
+--- /dev/null
++++ b/third_party/ffmpeg/chromium/ffmpegsumo3.sigs
+@@ -0,0 +1,19 @@
++// Copyright (c) 2011 The Chromium Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++
++//------------------------------------------------
++// Functions from avformat used in chromium code.
++//------------------------------------------------
++void avformat_close_input(AVFormatContext **s);
++int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options);
++int av_index_search_timestamp(AVStream *st, int64_t wanted_timestamp, int flags);
++int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputFormat *fmt, AVDictionary **options);
++int av_read_frame(AVFormatContext *s, AVPacket *pkt);
++void av_register_all(void);
++int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp, int flags);
++AVFormatContext *avformat_alloc_context(void);
++void avformat_free_context(AVFormatContext *s);
++AVIOContext *avio_alloc_context(unsigned char *buffer, int buffer_size, int write_flag, void *opaque, AVIOReadWriteOperation read_packet, AVIOReadWriteOperation write_packet, AVIOSeekOperation seek);
++int avio_close(AVIOContext *s);
+--- a/third_party/ffmpeg/ffmpeg.gyp
++++ b/third_party/ffmpeg/ffmpeg.gyp
+@@ -81,7 +81,7 @@
+ 
+     # Stub generator script and signatures of all functions used by Chrome.
+     'generate_stubs_script': '../../tools/generate_stubs/generate_stubs.py',
+-    'sig_files': ['chromium/ffmpegsumo.sigs'],
++    'sig_files': ['chromium/ffmpegsumo1.sigs', 'chromium/ffmpegsumo2.sigs', 'chromium/ffmpegsumo3.sigs'],
+     'extra_header': 'chromium/ffmpeg_stub_headers.fragment',
+   },
+   'conditions': [
diff --git a/debian/patches/fix_for_system_ffmpeg_ABI.patch b/debian/patches/fix_for_system_ffmpeg_ABI.patch
new file mode 100644
index 0000000..88f1a18
--- /dev/null
+++ b/debian/patches/fix_for_system_ffmpeg_ABI.patch
@@ -0,0 +1,36 @@
+Description: Don't change the FFmpeg ABI in chromium ...
+ ... because it breaks ABI compatibility with the system FFmpeg.
+
+Author: Andreas Cadhalpun <[email protected]>
+Last-Update: <2014-10-01>
+
+--- a/media/ffmpeg/ffmpeg_common.h
++++ b/media/ffmpeg/ffmpeg_common.h
+@@ -19,13 +19,6 @@
+ 
+ // Include FFmpeg header files.
+ extern "C" {
+-// Disable deprecated features which result in spammy compile warnings.  This
+-// list of defines must mirror those in the 'defines' section of the ffmpeg.gyp
+-// file or the headers below will generate different structures.
+-#define FF_API_PIX_FMT_DESC 0
+-#define FF_API_OLD_DECODE_AUDIO 0
+-#define FF_API_DESTRUCT_PACKET 0
+-#define FF_API_GET_BUFFER 0
+ 
+ // Temporarily disable possible loss of data warning.
+ // TODO(scherkus): fix and upstream the compiler warnings.
+--- a/third_party/ffmpeg/ffmpeg.gyp
++++ b/third_party/ffmpeg/ffmpeg.gyp
+@@ -165,11 +165,6 @@
+             '_POSIX_C_SOURCE=200112',
+             '_XOPEN_SOURCE=600',
+             'PIC',
+-            # Disable deprecated features which generate spammy warnings.
+-            'FF_API_PIX_FMT_DESC=0',
+-            'FF_API_OLD_DECODE_AUDIO=0',
+-            'FF_API_DESTRUCT_PACKET=0',
+-            'FF_API_GET_BUFFER=0',
+           ],
+           'cflags': [
+             '-fPIC',
diff --git a/debian/patches/series b/debian/patches/series
index ac55c7f..d7419d2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -15,3 +15,7 @@ make-support/gyp.patch
 make-support/opus.patch
 make-support/mojo.patch
 clang.patch
+
+fix_for_system_ffmpeg.patch
+ffmpeg_2.4.patch
+fix_for_system_ffmpeg_ABI.patch
diff --git a/debian/rules b/debian/rules
index 121fcf8..524f77d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,11 +11,20 @@ DEBIAN_DIST_NAME	:= $(shell lsb_release -si)
 DEBIAN_DIST_VERSION	:= $(shell cat /etc/debian_version)
 MULTIARCH		:= $(shell dpkg-architecture -qDEB_BUILD_MULTIARCH)
 
-USE_SYSTEM_FFMPEG	:= 0
+USE_SYSTEM_FFMPEG   := 1
 ifeq (1,$(USE_SYSTEM_FFMPEG))
-LIBAVCODEC_BASENAME	:= $(shell basename $$(ls -x /usr/lib/$(MULTIARCH)/libavcodec.so.* | cut -d ' ' -f 1))
-LIBAVFORMAT_BASENAME	:= $(shell basename $$(ls -x /usr/lib/$(MULTIARCH)/libavformat.so.* | cut -d ' ' -f 1))
-LIBAVUTIL_BASENAME	:= $(shell basename $$(ls -x /usr/lib/$(MULTIARCH)/libavutil.so.* | cut -d ' ' -f 1))
+LIBAVCODEC_SONAME   := $(shell basename $(realpath /usr/lib/$(MULTIARCH)/libavcodec.so) | sed 's/\([^.]*\.so\.[^.]*\)\..*/\1/')
+LIBAVCODEC_LINK     := $(shell echo $(LIBAVCODEC_SONAME) | sed 's/.*.so.\([0-9]*\)/libavcodec.so.\1/')
+LIBAVCODEC_PKGNAME  := $(shell echo $(LIBAVCODEC_SONAME) | sed 's/.so.//')
+LIBAVCODEC_DEPENDS  := $(shell cat /var/lib/dpkg/info/$(LIBAVCODEC_PKGNAME):*.shlibs | sed 's/^[^ ]* [^ ]* \(.*\)$$/\1/')
+LIBAVFORMAT_SONAME  := $(shell basename $(realpath /usr/lib/$(MULTIARCH)/libavformat.so) | sed 's/\([^.]*\.so\.[^.]*\)\..*/\1/')
+LIBAVFORMAT_LINK    := $(shell echo $(LIBAVFORMAT_SONAME) | sed 's/.*.so.\([0-9]*\)/libavformat.so.\1/')
+LIBAVFORMAT_PKGNAME := $(shell echo $(LIBAVFORMAT_SONAME) | sed 's/.so.//')
+LIBAVFORMAT_DEPENDS := $(shell cat /var/lib/dpkg/info/$(LIBAVFORMAT_PKGNAME):*.shlibs | sed 's/^[^ ]* [^ ]* \(.*\)$$/\1/')
+LIBAVUTIL_SONAME    := $(shell basename $(realpath /usr/lib/$(MULTIARCH)/libavutil.so) | sed 's/\([^.]*\.so\.[^.]*\)\..*/\1/')
+LIBAVUTIL_LINK      := $(shell echo $(LIBAVUTIL_SONAME) | sed 's/.*.so.\([0-9]*\)/libavutil.so.\1/')
+LIBAVUTIL_PKGNAME   := $(shell echo $(LIBAVUTIL_SONAME) | sed 's/.so.//')
+LIBAVUTIL_DEPENDS   := $(shell cat /var/lib/dpkg/info/$(LIBAVUTIL_PKGNAME):*.shlibs | sed 's/^[^ ]* [^ ]* \(.*\)$$/\1/')
 endif
 
 # DEB_TAR_SRCDIR has to be 'src' as this is what gyp expects :(
@@ -453,6 +462,9 @@ clean::
 	rm -f third_party/yasm/source/patched-yasm/config/config.guess
 	rm -f third_party/yasm/source/patched-yasm/config/config.sub
 	rm -f third_party/flot/*.js
+ifeq (1,$(USE_SYSTEM_FFMPEG))
+	rm -rf third_party/ffmpeg/lib*
+endif
 
 # Install: there's no install rules in scons yet, do it manually
 common-install-prehook-impl::
@@ -516,12 +528,12 @@ ifneq (i386,$(DEB_HOST_ARCH_CPU))
 endif
 ifeq (1,$(USE_SYSTEM_FFMPEG))
 	# Install symlinks to system ffmpeg libs
-	ln -sf "../$(MULTIARCH)/$(LIBAVCODEC_BASENAME)" \
-		"$(CURDIR)/debian/$(DEBIAN_NAME)/$(LIB_DIR)/$(LIBAVCODEC_BASENAME)"
-	ln -sf "../$(MULTIARCH)/$(LIBAVFORMAT_BASENAME)" \
-		"$(CURDIR)/debian/$(DEBIAN_NAME)/$(LIB_DIR)/$(LIBAVFORMAT_BASENAME)"
-	ln -sf "../$(MULTIARCH)/$(LIBAVUTIL_BASENAME)" \
-		"$(CURDIR)/debian/$(DEBIAN_NAME)/$(LIB_DIR)/$(LIBAVUTIL_BASENAME)"
+	ln -sf "../$(MULTIARCH)/$(LIBAVCODEC_SONAME)" \
+		"$(CURDIR)/debian/$(DEBIAN_NAME)/$(LIB_DIR)/$(LIBAVCODEC_LINK)"
+	ln -sf "../$(MULTIARCH)/$(LIBAVFORMAT_SONAME)" \
+		"$(CURDIR)/debian/$(DEBIAN_NAME)/$(LIB_DIR)/$(LIBAVFORMAT_LINK)"
+	ln -sf "../$(MULTIARCH)/$(LIBAVUTIL_SONAME)" \
+		"$(CURDIR)/debian/$(DEBIAN_NAME)/$(LIB_DIR)/$(LIBAVUTIL_LINK)"
 endif
 
 binary-install/$(DEBIAN_NAME)-l10n::
@@ -588,11 +600,7 @@ binary-makedeb-IMPL/$(DEBIAN_NAME)::
 ifeq (1,$(USE_SYSTEM_FFMPEG))
 	# Manually insert ffmpeg libs shlib deps for chromium since the
 	# libs are dlopened.
-	sed "s/^Depends:.*$$/&, $$(sh debian/var_info LIBAVCODEC_DEPENDS)/" \
-		-i "debian/$(DEBIAN_NAME)/DEBIAN/control"
-	sed "s/^Depends:.*$$/&, $$(sh debian/var_info LIBAVFORMAT_DEPENDS)/" \
-		-i "debian/$(DEBIAN_NAME)/DEBIAN/control"
-	sed "s/^Depends:.*$$/&, $$(sh debian/var_info LIBAVUTIL_DEPENDS)/" \
+	sed "s/^Depends:.*$$/&, $(LIBAVCODEC_DEPENDS), $(LIBAVFORMAT_DEPENDS), $(LIBAVUTIL_DEPENDS)/" \
 		-i "debian/$(DEBIAN_NAME)/DEBIAN/control"
 endif
 	dh_md5sums -p$(DEBIAN_NAME)
diff --git a/debian/var_info b/debian/var_info
deleted file mode 100644
index dea7d13..0000000
--- a/debian/var_info
+++ /dev/null
@@ -1,24 +0,0 @@
-# -*- sh -*-
-# This file is used as a way to replace text in certain files. Main reason is
-# to get shlib information for the different ffmpeg libraries used by
-# chromium.
-
-case "$1" in
-    LIBAVCODEC_DEPENDS)
-        LIBAVCODEC_DEPENDS=$(cat /var/lib/dpkg/info/libavcodec*.shlibs | \
-          sed 's/^[^[:space:]]\+\?[[:space:]]\+\?[^[:space:]]\+\?[[:space:]]\+\?\(.*\)$/\1/')
-        printf "$LIBAVCODEC_DEPENDS"
-        ;;
-    LIBAVFORMAT_DEPENDS)
-        LIBAVFORMAT_DEPENDS=$(cat /var/lib/dpkg/info/libavformat*.shlibs | \
-          sed 's/^[^[:space:]]\+\?[[:space:]]\+\?[^[:space:]]\+\?[[:space:]]\+\?\(.*\)$/\1/')
-        printf "$LIBAVFORMAT_DEPENDS"
-        ;;
-    LIBAVUTIL_DEPENDS)
-        LIBAVUTIL_DEPENDS=$(cat /var/lib/dpkg/info/libavutil*.shlibs | \
-          sed 's/^[^[:space:]]\+\?[[:space:]]\+\?[^[:space:]]\+\?[[:space:]]\+\?\(.*\)$/\1/')
-        printf "$LIBAVUTIL_DEPENDS"
-        ;;
-esac
-
-exit 0

--- End Message ---
--- Begin Message ---
Source: chromium-browser
Source-Version: 44.0.2403.157-1

We believe that the bug you reported is fixed in the latest version of
chromium-browser, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Michael Gilbert <[email protected]> (supplier of updated chromium-browser 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sun, 23 Aug 2015 22:43:20 +0000
Source: chromium-browser
Binary: chromium chromium-dbg chromium-l10n chromedriver
Architecture: source all
Version: 44.0.2403.157-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Chromium Maintainers 
<[email protected]>
Changed-By: Michael Gilbert <[email protected]>
Description:
 chromedriver - web browser - WebDriver support
 chromium   - web browser
 chromium-dbg - web browser - debugging symbols
 chromium-l10n - web browser - language packs
Closes: 763632 794472
Changes:
 chromium-browser (44.0.2403.157-1) unstable; urgency=medium
 .
   * New upstream stable release:
     - GPU process race condition fixed (closes: #794472).
   * Use system ffmpeg (closes: #763632):
     - Thanks to Andreas Cadhalpun.
Checksums-Sha1:
 fc13593741b3910cd09c17bf2e65e8a3b3ab98d9 3980 
chromium-browser_44.0.2403.157-1.dsc
 56442869a03fd344a9372dfe973f4612679935b4 295326884 
chromium-browser_44.0.2403.157.orig.tar.xz
 45518a0fa53d1eed449c6408d2097462aa7a03fd 113828 
chromium-browser_44.0.2403.157-1.debian.tar.xz
 920cf71ad566f11af8201b3724fbf737e7b09693 3154212 
chromium-l10n_44.0.2403.157-1_all.deb
Checksums-Sha256:
 4c50752ebc09db72ec7a03d2ad8e23d545dfd07dbe155678f636fbd367e379a7 3980 
chromium-browser_44.0.2403.157-1.dsc
 a881edea0a8002b0774777cda0fadff43c3d54d9ab0eb7f6dd69d6bd2ac55183 295326884 
chromium-browser_44.0.2403.157.orig.tar.xz
 5cb735dc959628b89d95c34a4d99ae07569af5077f3e2b8451d6d0e4f328a457 113828 
chromium-browser_44.0.2403.157-1.debian.tar.xz
 de5e226f95ed9390cb002335fe5d4d1d56dca16ec9ef79bcd005c0a028b6b8e1 3154212 
chromium-l10n_44.0.2403.157-1_all.deb
Files:
 deaadd6b924eb6c7abdee145a3ad33a6 3980 web optional 
chromium-browser_44.0.2403.157-1.dsc
 c049b1c2b53e170fe3b2b65fb9e952c9 295326884 web optional 
chromium-browser_44.0.2403.157.orig.tar.xz
 d7c252f10040615afc25b555a49c1244 113828 web optional 
chromium-browser_44.0.2403.157-1.debian.tar.xz
 aa0d45edd34a3734df847ae52daac78d 3154212 localization optional 
chromium-l10n_44.0.2403.157-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQQcBAEBCgAGBQJV2pJaAAoJELjWss0C1vRzgHsgAI9ivbL8IYOTq1VLpksvwz5V
nnGx8Mr9+WuYJnzAsvifHePf8E4injoqUpk/9rKvuK07Nu1BVvTugmH+anvLJ9/6
DzC7AFKu4cE1OrvJ4zRrapkpTV6+CKyoAdE1Wp6M3kp1MML7p7sVC9WApfzkrGo9
MPpqKMT8mm40W9+BEK0L2FiFXcBxwv0ivxyGiFI/udI/vwa64VCl3cB/zbbESNc7
iV/bonr9vh424R7zGR32z7RLoN3gQ0uNHJxdoaQW0ugMoRg6owhNntKpMTFIYpn8
qU6fZbVADL6OdDOvD4caEPDAheKgHOSL+4ORbDjL+RLzY1tmtKyOtoooFiOk31NE
/gLOcjv2W4sxzqEP/6aPAlcGAqJJFzvgh1BHHinY++mSzFbtu3OJSBwZ0nA1IZbj
tAzZJT2KAOAdWFZwa/Wk1d6yp1tyxgZokjVHNAf3QP/HavuJS3Q3xJCjLHetMYh7
PGKyp0rT5DRSHGaI6GvIdkDPPWgWvK3PIJJEwYySFpFKPqsuvtT05ZBVBefCSbAs
3e9BxcHk3CPX2VFivXTV+KgsLWNkpUf7cDgS5f0O7dSb6PZ4lK32QLMUAZ2OQxdN
t04oIl6ugb9m3c+IXfuN1M3PSLq9rch6gnMmxEcjebuUsvS46bOmdpVvPWwvcHhk
JrWSBcgdbkjOFu5BK2v7SvcbLly/9uUNO/nuY7RH4TafiCvLszi6KpxziIOqjkjr
LvYmc6F76Ty/yBP0k51yZNMllaelxlIWa41wy39PiR4/Y+0Y+AsvMNEGM0lFCyCL
fgaaLtMWgcIk74WOIKOq5BDZDPmLCeYxl7jkLwExeNdY/aTVgO3LoXzYE+ZSwgvr
Dy4mKi5zX9qTzREYXotf1Jx62hJjOravrQx+Bp6N3BwvDkh2ReMXfN6sU1vi2IA8
Xz9eLe1D4ao6nVuPxz14oswDod8IzJfOxM0Hlm96C+KAjezjya5Y32V/0FO4adhm
LU44EnFB+ROdORkjLKaz9iAjhFpxIE8KSunb8wkmLuzgfXmMA2M5T9Q6X26n0vrE
8KPCrmHGcCLKvtp/aW3vxA87WYV63nLUywwA3gZ8hJjKjyU2eKajcoxWwDqu9//s
f2ugxdZ05pg3B6KxnaA3ysrdaELx12T9wn0q9GjtPeDjB7GM5towiSVJta59M6pJ
3ZuiYuI6euhwNVXZyQlgs1e04FCvZcdhaxoQVsBFE4j0j8jd8BitfGAxlKlmM4fn
R+FLuZaS2i+HlJywW/hDb6sy7o+EkwdbbJOWIkw88TInIxPUhs8GFxQoH1ZQc5Mn
ggea0nXlbtvFEivd8FBYKMuVVpEvAAZ1/qoo+tlaX6fIICrYgUwuF36ghOLdKtU=
=n/Me
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to