diff options
author | Ting-Wei Lan <lantw44@gmail.com> | 2016-08-14 22:29:24 +0800 |
---|---|---|
committer | Ting-Wei Lan <lantw44@gmail.com> | 2016-08-14 22:34:13 +0800 |
commit | 62cda19a694899923582a5c6e0be3fef4f214a75 (patch) | |
tree | 8b21acdbbd91b9da7b41da3c96daa79edb609572 /chromium | |
parent | 4fa613a1678d52701e262101521c442a70ebd5d8 (diff) | |
download | copr-rpm-spec-62cda19a694899923582a5c6e0be3fef4f214a75.tar copr-rpm-spec-62cda19a694899923582a5c6e0be3fef4f214a75.tar.gz copr-rpm-spec-62cda19a694899923582a5c6e0be3fef4f214a75.tar.bz2 copr-rpm-spec-62cda19a694899923582a5c6e0be3fef4f214a75.tar.lz copr-rpm-spec-62cda19a694899923582a5c6e0be3fef4f214a75.tar.xz copr-rpm-spec-62cda19a694899923582a5c6e0be3fef4f214a75.tar.zst copr-rpm-spec-62cda19a694899923582a5c6e0be3fef4f214a75.zip |
chromium: Chromium 52.0.2743.82 -> 52.0.2743.116
This commit also adds scripts used to repackage upstream source tarballs.
Diffstat (limited to 'chromium')
-rwxr-xr-x | chromium/chromium/chromium-ffmpeg-clean.sh | 222 | ||||
-rwxr-xr-x | chromium/chromium/chromium-ffmpeg-free-sources.py | 83 | ||||
-rwxr-xr-x | chromium/chromium/chromium-latest.py | 302 | ||||
-rw-r--r-- | chromium/chromium/chromium.spec | 39 |
4 files changed, 640 insertions, 6 deletions
diff --git a/chromium/chromium/chromium-ffmpeg-clean.sh b/chromium/chromium/chromium-ffmpeg-clean.sh new file mode 100755 index 0000000..9be158d --- /dev/null +++ b/chromium/chromium/chromium-ffmpeg-clean.sh @@ -0,0 +1,222 @@ +#!/usr/bin/env bash +# Copyright 2013-2015 Tomas Popela <tpopela@redhat.com> +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# This file is obtained from official Chromium packages distributed by Fedora: +# http://pkgs.fedoraproject.org/cgit/rpms/chromium.git/commit/?id=8a15fdf +# +# This script has been and modified by Ting-Wei Lan <lantw44@gmail.com> for +# using in lantw44/chromium Copr repository. +# +# List of changes: +# * Rename: clean_ffmpeg.sh -> chromium-ffmpeg-clean.sh. +# * The shebang line no longer hardcodes the path to bash. + +# $1 files +# $2 verbose +function copy_files() { + for file in $1 + do + dir_name=`echo $file | sed 's%/[^/]*$%/%'` + if [[ $dir_name == */* ]]; then + tmp_dir_name="tmp_"$dir_name + mkdir -p ../tmp_ffmpeg/$tmp_dir_name + else + tmp_dir_name=$file + fi + + if [ "$2" -eq 1 ]; then + cp $file ../tmp_ffmpeg/$tmp_dir_name + else + cp $file ../tmp_ffmpeg/$tmp_dir_name > /dev/null 2>&1 + fi + done +} + +where=`pwd` + +generated_files=`./chromium-ffmpeg-free-sources.py $1 $2` +# As the build system files does not contain the header files, cheat here +# and generate the header files names from source files. These that does not +# exist will be later skipped while copying. +generated_files_headers="${generated_files//.c/.h}" +generated_files_headers="$generated_files_headers ${generated_files//.c/_internal.h}" +if [ "$2" -ne "1" ]; then + generated_files_headers="$generated_files_headers ${generated_files//.S/.h}" +fi +generated_files_headers="$generated_files_headers ${generated_files//.asm/.h}" + +header_files=" libavcodec/x86/inline_asm.h \ + libavcodec/x86/mathops.h \ + libavcodec/x86/vp56_arith.h \ + libavcodec/avcodec.h \ + libavcodec/blockdsp.h \ + libavcodec/bytestream.h \ + libavcodec/dct.h \ + libavcodec/error_resilience.h \ + libavcodec/fdctdsp.h \ + libavcodec/fft.h \ + libavcodec/fft-internal.h \ + libavcodec/fft_table.h \ + libavcodec/flac.h \ + libavcodec/frame_thread_encoder.h \ + libavcodec/get_bits.h \ + libavcodec/h263dsp.h \ + libavcodec/h264chroma.h \ + libavcodec/idctdsp.h \ + libavcodec/internal.h \ + libavcodec/mathops.h \ + libavcodec/me_cmp.h \ + libavcodec/motion_est.h \ + libavcodec/mpegpicture.h \ + libavcodec/mpegutils.h \ + libavcodec/mpegvideo.h \ + libavcodec/mpegvideodsp.h \ + libavcodec/mpegvideoencdsp.h \ + libavcodec/options_table.h \ + libavcodec/pcm_tablegen.h \ + libavcodec/pixblockdsp.h \ + libavcodec/pixels.h \ + libavcodec/put_bits.h \ + libavcodec/qpeldsp.h \ + libavcodec/ratecontrol.h \ + libavcodec/rectangle.h \ + libavcodec/rl.h \ + libavcodec/rnd_avg.h \ + libavcodec/thread.h \ + libavcodec/version.h \ + libavcodec/vp3data.h \ + libavcodec/vp56.h \ + libavcodec/vp56dsp.h \ + libavcodec/vp8data.h \ + libavformat/audiointerleave.h \ + libavformat/avformat.h \ + libavformat/dv.h \ + libavformat/internal.h \ + libavformat/pcm.h \ + libavformat/rdt.h \ + libavformat/rtp.h \ + libavformat/rtpdec.h \ + libavformat/spdif.h \ + libavformat/srtp.h \ + libavformat/options_table.h \ + libavformat/version.h \ + libavformat/w64.h \ + libavutil/x86/asm.h \ + libavutil/x86/bswap.h \ + libavutil/x86/cpu.h \ + libavutil/x86/emms.h + libavutil/x86/intreadwrite.h \ + libavutil/x86/intmath.h + libavutil/x86/timer.h \ + libavutil/atomic.h \ + libavutil/atomic_gcc.h \ + libavutil/attributes.h \ + libavutil/audio_fifo.h \ + libavutil/avassert.h \ + libavutil/avutil.h \ + libavutil/bswap.h \ + libavutil/common.h \ + libavutil/colorspace.h \ + libavutil/cpu.h \ + libavutil/cpu_internal.h \ + libavutil/dynarray.h \ + libavutil/internal.h \ + libavutil/intfloat.h \ + libavutil/intreadwrite.h \ + libavutil/libm.h \ + libavutil/lls.h \ + libavutil/macros.h \ + libavutil/pixfmt.h \ + libavutil/qsort.h \ + libavutil/replaygain.h \ + libavutil/thread.h \ + libavutil/timer.h \ + libavutil/timestamp.h \ + libavutil/version.h \ + libswresample/swresample.h \ + libswresample/version.h \ + compat/va_copy.h " + +manual_files=" libavcodec/x86/hpeldsp_rnd_template.c \ + libavcodec/x86/rnd_template.c \ + libavcodec/x86/videodsp_init.c \ + libavcodec/x86/vorbisdsp_init.c \ + libavcodec/bit_depth_template.c \ + libavcodec/fft_template.c \ + libavcodec/h264pred_template.c \ + libavcodec/hpel_template.c \ + libavcodec/mdct_template.c \ + libavcodec/pel_template.c \ + libavcodec/utils.c \ + libavcodec/videodsp_template.c \ + libavformat/options.c \ + libavformat/pcm.c \ + libavformat/utils.c \ + libavutil/cpu.c \ + libavutil/x86/cpu.c \ + libavutil/x86/float_dsp_init.c \ + libavutil/x86/x86inc.asm \ + libavutil/x86/x86util.asm " + +other_files=" BUILD.gn \ + Changelog \ + COPYING.GPLv2 \ + COPYING.GPLv3 \ + COPYING.LGPLv2.1 \ + COPYING.LGPLv3 \ + CREDITS \ + CREDITS.chromium \ + ffmpeg.gyp \ + ffmpeg_generated.gypi \ + ffmpeg_generated.gni \ + ffmpeg_options.gni \ + ffmpegsumo.ver \ + INSTALL.md \ + LICENSE.md \ + MAINTAINERS \ + OWNERS \ + README.chromium \ + README.md \ + RELEASE \ + xcode_hack.c " + +cd $1/third_party/ffmpeg + +copy_files "$generated_files" 0 +copy_files "$generated_files_headers" 0 +copy_files "$manual_files" 1 +copy_files "$other_files" 1 +copy_files "$header_files" 1 + +mkdir -p ../tmp_ffmpeg/tmp_chromium/config +cp -r chromium/config ../tmp_ffmpeg/tmp_chromium + +cd ../tmp_ffmpeg +for tmp_directory in $(find . -type d -name 'tmp_*') + do + new_name=`echo $tmp_directory | sed 's/tmp_//'` + mv $tmp_directory $new_name + done + +cd $where + +rm -rf $1/third_party/ffmpeg +mv $1/third_party/tmp_ffmpeg $1/third_party/ffmpeg diff --git a/chromium/chromium/chromium-ffmpeg-free-sources.py b/chromium/chromium/chromium-ffmpeg-free-sources.py new file mode 100755 index 0000000..d633863 --- /dev/null +++ b/chromium/chromium/chromium-ffmpeg-free-sources.py @@ -0,0 +1,83 @@ +#!/usr/bin/env python2 +# Copyright 2015 Tomas Popela <tpopela@redhat.com> +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# This file is obtained from official Chromium packages distributed by Fedora: +# http://pkgs.fedoraproject.org/cgit/rpms/chromium.git/commit/?id=8a15fdf +# +# This script has been and modified by Ting-Wei Lan <lantw44@gmail.com> for +# using in lantw44/chromium Copr repository. +# +# List of changes: +# * Rename: get_free_ffmpeg_source_files.py -> chromium-ffmpeg-free-sources.py. +# * The shebang line no longer hardcodes the path to python2. + +import sys +import re + +def append_sources (input_sources, output_sources): + + # Get the source files. + source_files = re.findall(r"\"(.*?)\"", input_sources) + output_sources += source_files + + +def parse_sources(input_sources, output_sources, arch_not_arm): + + # Get the type of sources in one group and sources itself in the other one. + blocks = re.findall(r"(ffmpeg[^\s]*).*?\[(.*?)]", input_sources, re.DOTALL) + for block in blocks: + if (arch_not_arm): + if not 'ffmpeg_gas_sources' in block[0]: + append_sources (block[1], output_sources) + else: + append_sources (block[1], output_sources) + + +def parse_ffmpeg_gyni_file(gyni_path, arch_not_arm): + + with open(gyni_path, "r") as input_file: + content = input_file.read().replace('\n', '') + + output_sources = [] + # Get all the sections. + sections = re.findall(r"if (.*?})", content, re.DOTALL) + for section in sections: + # Get all the conditions (first group) and sources (second group)for the + # current section. + blocks = re.findall(r"(\(.*?\))\s\{(.*?)\}", section, re.DOTALL) + for block in blocks: + conditions = re.findall(r"\(?\((.*?)\)", block[0]) + for condition in conditions: + limitations = ['is_linux', 'ffmpeg_branding == "Chromium"'] + if all(limitation in condition for limitation in limitations): + if (arch_not_arm): + if ('x64' in condition) or ('x86' in condition): + parse_sources (block[1], output_sources, arch_not_arm) + else: + parse_sources (block[1], output_sources, arch_not_arm) + + print ' '.join(output_sources) + + +if __name__ == "__main__": + + path = "%s/third_party/ffmpeg/ffmpeg_generated.gni" % sys.argv[1] + parse_ffmpeg_gyni_file (path, False if sys.argv[2] == "0" else True) diff --git a/chromium/chromium/chromium-latest.py b/chromium/chromium/chromium-latest.py new file mode 100755 index 0000000..3d1a647 --- /dev/null +++ b/chromium/chromium/chromium-latest.py @@ -0,0 +1,302 @@ +#!/usr/bin/env python2 +# Copyright 2010,2015-2016 Tom Callaway <tcallawa@redhat.com> +# Copyright 2013-2016 Tomas Popela <tpopela@redhat.com> +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# This file is obtained from official Chromium packages distributed by Fedora: +# http://pkgs.fedoraproject.org/cgit/rpms/chromium.git/commit/?id=8a15fdf +# +# This script has been and modified by Ting-Wei Lan <lantw44@gmail.com> for +# using in lantw44/chromium Copr repository. +# +# List of changes: +# * The shebang line no longer hardcodes the path to python2. +# * http:// URLs are replaced by https:// URLs. +# * MD5 hash checking is replaced by SHA512 hash checking. +# * xz -9 command is replaced by xz -0 command to reduce memory requirement. +# * Function nacl_versions and download_chrome_latest_rpm are removed. + +try: + import argparse + optparse = False +except ImportError: + from optparse import OptionParser + optparse = True +import csv +import glob +import hashlib +import locale +import os +import shutil +import StringIO +import sys +import urllib + +chromium_url = "https://commondatastorage.googleapis.com/chromium-browser-official/" + +chromium_root_dir = "." +version_string = "stable" + +name = 'Chromium Latest (lantw44/chromium)' +script_version = 0.8 +my_description = '{0} {1}'.format(name, script_version) + + +def dlProgress(count, blockSize, totalSize): + + if (totalSize <= blockSize): + percent = int(count * 100) + else: + percent = int(count * blockSize * 100 / totalSize) + sys.stdout.write("\r" + "Downloading ... %d%%" % percent) + sys.stdout.flush() + + +def delete_chromium_dir(ch_dir): + + full_dir = "%s/%s" % (latest_dir, ch_dir) + print 'Deleting %s ' % full_dir + if os.path.isdir(full_dir): + shutil.rmtree(full_dir) + print '[DONE]' + else: + print '[NOT FOUND]' + + +def delete_chromium_files(files): + + full_path = "%s/%s" % (latest_dir, files) + print 'Deleting ' + full_path + ' ', + for filename in glob.glob(full_path): + print 'Deleting ' + filename + ' ', + os.remove(filename) + print '[DONE]' + + +def check_omahaproxy(channel="stable"): + + version = 0 + status_url = "https://omahaproxy.appspot.com/all?os=linux&channel=" + channel + + usock = urllib.urlopen(status_url) + status_dump = usock.read() + usock.close() + status_list = StringIO.StringIO(status_dump) + status_reader = list(csv.reader(status_list, delimiter=',')) + linux_channels = [s for s in status_reader if "linux" in s] + linux_channel = [s for s in linux_channels if channel in s] + version = linux_channel[0][2] + + if version == 0: + print 'I could not find the latest %s build. Bailing out.' % channel + sys.exit(1) + else: + print 'Latest Chromium Version on %s at %s is %s' % (channel, status_url, version) + return version + + +def remove_file_if_exists(filename): + + filepath = "%s/%s" % (chromium_root_dir, filename) + if os.path.isfile(filepath): + try: + os.remove(filepath) + except Exception: + pass + + +def download_file_and_compare_hashes(file_to_download): + + hashes_file = '%s.hashes' % file_to_download + + if (args.clean): + remove_file_if_exists(file_to_download) + remove_file_if_exists(hashes_file) + + # Let's make sure we haven't already downloaded it. + tarball_local_file = "%s/%s" % (chromium_root_dir, file_to_download) + if os.path.isfile(tarball_local_file): + print "%s already exists!" % file_to_download + else: + path = '%s%s' % (chromium_url, file_to_download) + print "Downloading %s" % path + # Perhaps look at using python-progressbar at some point? + info=urllib.urlretrieve(path, tarball_local_file, reporthook=dlProgress)[1] + urllib.urlcleanup() + print "" + if (info["Content-Type"] != "application/x-tar"): + print 'Chromium tarballs for %s are not on servers.' % file_to_download + remove_file_if_exists (file_to_download) + sys.exit(1) + + hashes_local_file = "%s/%s" % (chromium_root_dir, hashes_file) + if not os.path.isfile(hashes_local_file): + path = '%s%s' % (chromium_url, hashes_file) + print "Downloading %s" % path + # Perhaps look at using python-progressbar at some point? + info=urllib.urlretrieve(path, hashes_local_file, reporthook=dlProgress)[1] + urllib.urlcleanup() + print "" + + if os.path.isfile(hashes_local_file): + with open(hashes_local_file, "r") as input_file: + while True: + hash_line = input_file.readline().split() + if len(hash_line) == 0: + print "Cannot compare SHA512 hash for %s!" % file_to_download + if hash_line[0] == 'sha512': + sha512sum = hash_line[1] + break + sha512 = hashlib.sha512() + with open(tarball_local_file, "rb") as f: + for block in iter(lambda: f.read(65536), b""): + sha512.update(block) + if (sha512sum == sha512.hexdigest()): + print "SHA512 matches for %s!" % file_to_download + else: + print "SHA512 mismatch for %s!" % file_to_download + sys.exit(1) + else: + print "Cannot compare hashes for %s!" % file_to_download + + +def download_version(version): + + download_file_and_compare_hashes ('chromium-%s.tar.xz' % version) + + if (args.tests): + download_file_and_compare_hashes ('chromium-%s-testdata.tar.xz' % version) + + +# This is where the magic happens +if __name__ == '__main__': + + # Locale magic + locale.setlocale(locale.LC_ALL, '') + + # Create the parser object + if optparse: + parser = OptionParser(description=my_description) + parser_add_argument = parser.add_option + else: + parser = argparse.ArgumentParser(description=my_description) + parser_add_argument = parser.add_argument + + parser.add_argument( + 'work_dir', type=str, nargs='?', + help='Root of the working directory (default: current working directory)') + parser_add_argument( + '--ffmpegarm', action='store_true', + help='Leave arm sources when cleaning ffmpeg') + parser_add_argument( + '--beta', action='store_true', + help='Get the latest beta Chromium source') + parser_add_argument( + '--clean', action='store_true', + help='Re-download all previously downloaded sources') + parser_add_argument( + '--cleansources', action='store_true', + help='Get the latest Chromium release from given channel and clean various directories to from unnecessary or unwanted stuff') + parser_add_argument( + '--dev', action='store_true', + help='Get the latest dev Chromium source') + parser_add_argument( + '--ffmpegclean', action='store_true', + help='Get the latest Chromium release from given channel and cleans ffmpeg sources from proprietary stuff') + parser_add_argument( + '--prep', action='store_true', + help='Prepare everything, but don\'t compress the result') + parser_add_argument( + '--stable', action='store_true', + help='Get the latest stable Chromium source') + parser_add_argument( + '--tests', action='store_true', + help='Get the additional data for running tests') + parser_add_argument( + '--version', + help='Download a specific version of Chromium') + + # Parse the args + if optparse: + args, options = parser.parse_args() + else: + args = parser.parse_args() + + if args.work_dir: + chromium_root_dir = args.work_dir + + if args.stable: + version_string = "stable" + elif args.beta: + version_string = "beta" + elif args.dev: + version_string = "dev" + elif (not (args.stable or args.beta or args.dev)): + if (not args.version): + print 'No version specified, downloading STABLE' + + chromium_version = args.version if args.version else check_omahaproxy(version_string) + + latest = 'chromium-%s.tar.xz' % chromium_version + + download_version(chromium_version) + + # Lets make sure we haven't unpacked it already + latest_dir = "%s/chromium-%s" % (chromium_root_dir, chromium_version) + if (args.clean and os.path.isdir(latest_dir)): + shutil.rmtree(latest_dir) + + if os.path.isdir(latest_dir): + print "%s already exists, perhaps %s has already been unpacked?" % (latest_dir, latest) + else: + print "Unpacking %s into %s, please wait." % (latest, latest_dir) + if (os.system("cd %s && tar -xJf %s" % (chromium_root_dir, latest)) != 0): + print "%s is possibly corrupted, exiting." % (latest) + sys.exit(1) + + if (args.cleansources): + junk_dirs = ['third_party/WebKit/Tools/Scripts/webkitpy/layout_tests', + 'webkit/data/layout_tests', 'third_party/hunspell/dictionaries', + 'chrome/test/data', 'native_client/tests', + 'third_party/WebKit/LayoutTests'] + + # First, the dirs: + for directory in junk_dirs: + delete_chromium_dir(directory) + + # There has got to be a better, more portable way to do this. + os.system("find %s -depth -name reference_build -type d -exec rm -rf {} \;" % latest_dir) + + # I could not find good bindings for xz/lzma support, so we system call here too. + chromium_clean_xz_file = "chromium-" + chromium_version + "-clean.tar.xz" + + remove_file_if_exists(chromium_clean_xz_file) + + if (args.ffmpegclean): + print("Cleaning ffmpeg from proprietary things...") + os.system("./chromium-ffmpeg-clean.sh %s %d" % (latest_dir, 0 if args.ffmpegarm else 1)) + print "Done!" + + if (not args.prep): + print "Compressing cleaned tree, please wait..." + os.chdir(chromium_root_dir) + os.system("tar --exclude=\.svn -cf - chromium-%s | xz -0 -T 0 -f > %s" % (chromium_version, chromium_clean_xz_file)) + + print "Finished!" diff --git a/chromium/chromium/chromium.spec b/chromium/chromium/chromium.spec index ad5b1a4..d71c3f1 100644 --- a/chromium/chromium/chromium.spec +++ b/chromium/chromium/chromium.spec @@ -29,19 +29,37 @@ %endif Name: chromium -Version: 52.0.2743.82 +Version: 52.0.2743.116 Release: 2%{?dist} Summary: An open-source project that aims to build a safer, faster, and more stable browser Group: Applications/Internet License: BSD and LGPLv2+ URL: https://www.chromium.org -Source0: https://commondatastorage.googleapis.com/chromium-browser-official/chromium-%{version}.tar.xz + +# Unfortunately, Fedora Copr forbids uploading sources with patent-encumbered +# ffmpeg code even if they are never compiled and linked to target binraies, +# so we must repackage upstream tarballs to satisfy this requirement. However, +# we cannot simply delete all code of ffmpeg because this will disable support +# for some commonly-used free codecs such as Ogg Theora. Instead, helper +# scripts included in official Fedora packages are copied, modified, and used +# to automate the repackaging work. +# +# If you don't use Fedora services, you can uncomment the following line and +# use the upstream source tarball instead of the repackaged one. +# Source0: https://commondatastorage.googleapis.com/chromium-browser-official/chromium-%{version}.tar.xz +# +# The repackaged source tarball used here is produced by: +# ./chromium-latest.py --stable --ffmpegclean +Source0: chromium-%{version}-clean.tar.xz +Source1: chromium-latest.py +Source2: chromium-ffmpeg-clean.sh +Source3: chromium-ffmpeg-free-sources.py # The following two source files are copied and modified from # https://repos.fedorapeople.org/repos/spot/chromium/ -Source1: chromium-browser.sh -Source2: chromium-browser.desktop +Source10: chromium-browser.sh +Source11: chromium-browser.desktop # Add a patch from Arch Linux to fix libpng problem # https://projects.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/chromium&id=14bce0f @@ -107,6 +125,8 @@ Requires(post): desktop-file-utils Requires(postun): desktop-file-utils Requires: hicolor-icon-theme +Obsoletes: chromium-libs, chromium-libs-media, chromedriver +Provides: chromium-libs, chromium-libs-media, chromedriver %description @@ -221,9 +241,9 @@ mkdir -p %{buildroot}%{chromiumdir}/locales mkdir -p %{buildroot}%{_mandir}/man1 mkdir -p %{buildroot}%{_datadir}/applications sed -e "s|@@CHROMIUMDIR@@|%{chromiumdir}|" -e "s|@@BUILDTARGET@@|`cat /etc/redhat-release`|" \ - %{SOURCE1} > chromium-browser.sh + %{SOURCE10} > chromium-browser.sh install -m 755 chromium-browser.sh %{buildroot}%{_bindir}/chromium-browser -desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE2} +desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE11} install -m 644 out/Release/chrome.1 %{buildroot}%{_mandir}/man1/chromium-browser.1 install -m 755 out/Release/chrome %{buildroot}%{chromiumdir}/chromium-browser install -m 4755 out/Release/chrome_sandbox %{buildroot}%{chromiumdir}/chrome-sandbox @@ -301,6 +321,13 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sat Aug 13 2016 - Ting-Wei Lan <lantw44@gmail.com> - 52.0.2743.116-2 +- Repackage upstream sources to delete patent-encumbered ffmpeg sources +- Allow replacing official packages with this package + +* Wed Aug 10 2016 - Ting-Wei Lan <lantw44@gmail.com> - 52.0.2743.116-1 +- Update to 52.0.2743.116 + * Fri Jul 22 2016 - Ting-Wei Lan <lantw44@gmail.com> - 52.0.2743.82-2 - Fix build issue for cups 2.2 |