[Pkg-chromium-commit] [pkg-chromium] 01/01: release 63.0.3239.40-1

Michael Gilbert mgilbert at moszumanska.debian.org
Sun Dec 3 14:33:04 UTC 2017


This is an automated email from the git hooks/post-receive script.

mgilbert pushed a commit to branch experimental
in repository pkg-chromium.

commit db1cfb715b0fb78514e75256d610893c3e3fc960
Author: Michael Gilbert <mgilbert at debian.org>
Date:   Sun Dec 3 14:35:09 2017 +0000

    release 63.0.3239.40-1
---
 debian/changelog                    |  10 +
 debian/chromium-sandbox.install     |   1 +
 debian/chromium.links               |   1 -
 debian/clean                        |   1 +
 debian/control                      |   3 +-
 debian/copyright                    |  24 +-
 debian/patches/disable/signin.patch |  45 +++
 debian/patches/series               |   1 +
 debian/patches/system/icu.patch     |  20 ++
 debian/rules                        |  10 +-
 debian/scripts/icons                |   9 +
 debian/scripts/mk-origtargz         | 683 ------------------------------------
 debian/scripts/mk-origtargz.patch   |  14 +
 debian/scripts/unbundle             |  17 +-
 14 files changed, 126 insertions(+), 713 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 6d2d93f..ceef1c2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+chromium-browser (63.0.3239.40-1) experimental; urgency=medium
+
+  * New upstream beta release.
+  * Disable chromium signin feature.
+  * Fix error in icon installation script.
+  * Update to the latest standards version.
+  * Indicate that the package can be built without root.
+
+ -- Michael Gilbert <mgilbert at debian.org>  Sun, 12 Nov 2017 05:36:26 +0000
+
 chromium-browser (63.0.3239.30-1) experimental; urgency=medium
 
   * New upstream beta release.
diff --git a/debian/chromium-sandbox.install b/debian/chromium-sandbox.install
new file mode 100644
index 0000000..b05c408
--- /dev/null
+++ b/debian/chromium-sandbox.install
@@ -0,0 +1 @@
+out/Release/chrome-sandbox usr/lib/chromium
diff --git a/debian/chromium.links b/debian/chromium.links
index 4b06380..67f79a9 100644
--- a/debian/chromium.links
+++ b/debian/chromium.links
@@ -1,2 +1 @@
-usr/share/icons/hicolor/32x32/apps/chromium.xpm usr/share/pixmaps/chromium.xpm
 usr/share/icons/hicolor/48x48/apps/chromium.png usr/share/pixmaps/chromium.png
diff --git a/debian/clean b/debian/clean
index c41c88c..2f9633f 100644
--- a/debian/clean
+++ b/debian/clean
@@ -1,4 +1,5 @@
 debian/files
+debian/scripts/mk-origtargz
 
 Makefile
 third_party/flot/*.js
diff --git a/debian/control b/debian/control
index 2d6fa34..323ff79 100644
--- a/debian/control
+++ b/debian/control
@@ -7,6 +7,7 @@ Uploaders:
 Vcs-Git: git://anonscm.debian.org/pkg-chromium/pkg-chromium.git
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-chromium/pkg-chromium.git
 Homepage: http://www.chromium.org/Home
+Rules-Requires-Root: no
 Build-Depends:
  debhelper (>= 10),
  python3,
@@ -84,7 +85,7 @@ Build-Depends:
  libgcrypt20-dev,
  fonts-ipafont-gothic,
  fonts-ipafont-mincho,
-Standards-Version: 4.1.0
+Standards-Version: 4.1.1
 
 Package: chromium
 Architecture: i386 amd64 arm64 armhf
diff --git a/debian/copyright b/debian/copyright
index 96feea7..186e5b8 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -5,15 +5,18 @@ Files-Excluded:
  .clang-format
  *.mk
  *.so
- *.bak
  *.elf
  *.swf
  *config.sub
  *config.guess
  *jquery*.min.js
+ buildtools
  tools/emacs
  tools/perf/page_sets/tough_scheduling_cases/*.min.js
  native_client/NOTICE
+ third_party/icu
+ third_party/libxslt
+ third_party/eu-strip
  third_party/android*
  third_party/bidichecker
  third_party/flot/*.js
@@ -23,22 +26,10 @@ Files-Excluded:
  third_party/webgl/src/sdk
  third_party/webgl/src/other
  third_party/expat/files
- third_party/libxml/src
  third_party/*rjsmin/bench
  third_party/snappy/src/testdata
- third_party/skia/third_party/yasm
  third_party/WebKit/PerformanceTests
  third_party/mesa/src/src/gallium/state_trackers/d3d1x/w32api
- third_party/libxslt/compile
- third_party/libxslt/COPYING
- third_party/libxslt/depcomp
- third_party/libxslt/install-sh
- third_party/libxslt/missing
- third_party/libxslt/libexslt
- third_party/libxslt/libxslt
- third_party/libxslt/mac
- third_party/libxslt/win32
- third_party/libxslt/linux
  third_party/catapult/tracing/test_data
  third_party/google_input_tools/src/chrome/os/inputview/_locales/*.js
  base/test/data
@@ -46,14 +37,17 @@ Files-Excluded:
  third_party/binutils
  v8/benchmarks/regexp.js
  v8/third_party/binutils
+ third_party/libxml/mac
+ third_party/libxml/linux
+ third_party/libxml/win32
  third_party/node
  third_party/mocha/mocha.js
  third_party/chaijs/chai.js
+ third_party/devtools-node-modules
  third_party/catapult/third_party/flot
  third_party/catapult/third_party/chai
  third_party/catapult/third_party/mocha
  third_party/webgl/src/conformance-suites
- third_party/WebKit/Source/devtools/devtools-node-modules
  third_party/catapult/third_party/vinn/third_party/v8
  third_party/catapult/tracing/tracing/extras/chrome/cc/layer_tree_host_impl_test_data.js
  third_party/accessibility-audit/axs_testing.js
@@ -73,7 +67,7 @@ Files-Excluded:
  third_party/libphonenumber/dist/javascript/i18n/phonenumbers/metadata.js
  third_party/libphonenumber/dist/javascript/i18n/phonenumbers/metadatalite.js
  tools/perf/page_sets/webrtc_cases/adapter.js
- third_party/pdfium/third_party/lcms
+ third_party/pdfium/third_party/eu-strip
 
 # dirs that should be removed, but the jessie package still needs them
 # third_party/harfbuzz-ng/src
diff --git a/debian/patches/disable/signin.patch b/debian/patches/disable/signin.patch
new file mode 100644
index 0000000..cfbf8f9
--- /dev/null
+++ b/debian/patches/disable/signin.patch
@@ -0,0 +1,45 @@
+description: disable browser sign-in
+origin: https://raw.githubusercontent.com/Eloston/ungoogled-chromium/master/resources/patches/ungoogled-chromium/disable-signin.patch
+
+--- a/components/signin/core/browser/signin_manager_base.cc
++++ b/components/signin/core/browser/signin_manager_base.cc
+@@ -159,7 +159,7 @@ void SigninManagerBase::Initialize(PrefS
+ bool SigninManagerBase::IsInitialized() const { return initialized_; }
+ 
+ bool SigninManagerBase::IsSigninAllowed() const {
+-  return client_->GetPrefs()->GetBoolean(prefs::kSigninAllowed);
++  return false;
+ }
+ 
+ AccountInfo SigninManagerBase::GetAuthenticatedAccountInfo() const {
+--- a/chrome/browser/ui/chrome_pages.cc
++++ b/chrome/browser/ui/chrome_pages.cc
+@@ -74,12 +74,6 @@ void OpenBookmarkManagerForNode(Browser*
+   ShowSingletonTabOverwritingNTP(browser, params);
+ }
+ 
+-void NavigateToSingletonTab(Browser* browser, const GURL& url) {
+-  NavigateParams params(GetSingletonTabNavigateParams(browser, url));
+-  params.path_behavior = NavigateParams::IGNORE_AND_NAVIGATE;
+-  ShowSingletonTabOverwritingNTP(browser, params);
+-}
+-
+ // Shows either the help app or the appropriate help page for |source|. If
+ // |browser| is NULL and the help page is used (vs the app), the help page is
+ // shown in the last active browser. If there is no such browser, a new browser
+@@ -361,6 +355,7 @@ void ShowSearchEngineSettings(Browser* b
+ #if !defined(OS_ANDROID)
+ void ShowBrowserSignin(Browser* browser,
+                        signin_metrics::AccessPoint access_point) {
++#if 0
+   Profile* original_profile = browser->profile()->GetOriginalProfile();
+   SigninManagerBase* manager =
+       SigninManagerFactory::GetForProfile(original_profile);
+@@ -400,6 +395,7 @@ void ShowBrowserSignin(Browser* browser,
+             false));
+     DCHECK_GT(browser->tab_strip_model()->count(), 0);
+   }
++#endif 
+ }
+ 
+ void ShowBrowserSigninOrSettings(Browser* browser,
diff --git a/debian/patches/series b/debian/patches/series
index 2270112..3de42f7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,6 +6,7 @@ gn/narrowing.patch
 gn/buildflags.patch
 
 disable/promo.patch
+disable/signin.patch
 disable/fuzzers.patch
 disable/google-api-warning.patch
 disable/third-party-cookies.patch
diff --git a/debian/patches/system/icu.patch b/debian/patches/system/icu.patch
index 5a255e7..f90d29c 100644
--- a/debian/patches/system/icu.patch
+++ b/debian/patches/system/icu.patch
@@ -30,3 +30,23 @@ author: Michael Gilbert <mgilbert at debian.org>
  }
  
  String StringForText(const void* text,
+--- a/net/BUILD.gn
++++ b/net/BUILD.gn
+@@ -11,7 +11,6 @@ import("//build/config/ui.gni")
+ import("//net/features.gni")
+ import("//testing/libfuzzer/fuzzer_test.gni")
+ import("//testing/test.gni")
+-import("//third_party/icu/config.gni")
+ import("//third_party/protobuf/proto_library.gni")
+ import("//tools/grit/grit_rule.gni")
+ import("//url/features.gni")
+--- a/v8/gni/isolate.gni
++++ b/v8/gni/isolate.gni
+@@ -3,7 +3,6 @@
+ # found in the LICENSE file.
+ 
+ import("//build/config/sanitizers/sanitizers.gni")
+-import("//third_party/icu/config.gni")
+ import("v8.gni")
+ 
+ declare_args() {
diff --git a/debian/rules b/debian/rules
index d7c8096..145a7a5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -124,13 +124,7 @@ override_dh_auto_install-arch:
 	sed 's|@BUILD_DIST@|$(shell cat /etc/debian_version)|' \
 	    < debian/scripts/chromium > debian/chromium/usr/bin/chromium
 	# move icons into /usr/share
-	for file in $(shell find chrome/app/theme -name product_logo_[0-9]*.png -a ! -name *mono*); do \
-	    ext=$$(echo $$file | cut -d\. -f2); \
-	    siz=$$(echo $$file | cut -d_ -f3 | sed s/\.$$ext//); \
-	    dst=debian/chromium/usr/share/icons/hicolor/$$siz\x$$siz/apps; \
-	    mkdir -p $$dst; \
-	    cp $$file $$dst/chromium.$$ext; \
-	    done
+	./debian/scripts/icons
 
 override_dh_fixperms:
 	dh_fixperms --exclude chrome-sandbox
@@ -161,6 +155,8 @@ removed=$(debian).files-removed
 
 get-orig-source:
 	wget -nv --show-progress -c $(url)/$(tarball) -O ../$(tarball)
+	cp /usr/bin/mk-origtargz debian/scripts
+	patch -p1 < debian/scripts/mk-origtargz.patch
 	/usr/bin/time --portability ./debian/scripts/mk-origtargz ../$(tarball) > ../$(removed)
 	test ! -e $(extract) || rm -rf $(extract)
 	/usr/bin/time --portability tar xaf ../$(tarball)
diff --git a/debian/scripts/icons b/debian/scripts/icons
new file mode 100755
index 0000000..fe2dd69
--- /dev/null
+++ b/debian/scripts/icons
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+for file in $(find chrome/app/theme -name product_logo_[0-9]*.png -a ! -name *mono*); do
+     size=$(basename $file | cut -d_ -f3 | sed s/\.png//)
+     dest=debian/chromium/usr/share/icons/hicolor/$size\x$size/apps
+     mkdir -p $dest
+     cp $file $dest/chromium.png
+     echo copied: $file to $dest/chromium.png
+     done
diff --git a/debian/scripts/mk-origtargz b/debian/scripts/mk-origtargz
deleted file mode 100755
index 54c3385..0000000
--- a/debian/scripts/mk-origtargz
+++ /dev/null
@@ -1,683 +0,0 @@
-#!/usr/bin/perl
-#
-# mk-origtargz: Rename upstream tarball, optionally changing the compression
-# and removing unwanted files.
-# Copyright (C) 2014 Joachim Breitner <nomeata at debian.org>
-# Copyright (C) 2015 James McCoy <jamessan at debian.org>
-#
-# It contains code formerly found in uscan.
-# Copyright (C) 2002-2006, Julian Gilbey
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <https://www.gnu.org/licenses/>.
-
-
-=head1 NAME
-
-mk-origtargz - rename upstream tarball, optionally changing the compression and removing unwanted files
-
-=head1 SYNOPSIS
-
-=over
-
-=item B<mk-origtargz> [I<options>] F<foo-1.0.tar.gz>
-
-=item B<mk-origtargz> B<--help>
-
-=back
-
-=head1 DESCRIPTION
-
-B<mk-origtargz> renames the given file to match what is expected by
-B<dpkg-buildpackage>, based on the source package name and version in
-F<debian/changelog>. It can convert B<zip> to B<tar>, optionally change the
-compression scheme and remove files according to B<Files-Excluded> and
-B<Files-Excluded->I<component> in F<debian/copyright>. The resulting file is
-placed in F<debian/../..>. (In F<debian/copyright>, the B<Files-Excluded> and
-B<Files-Excluded->I<component> stanzas are a part of the first paragraph and
-there is a blank line before the following paragraphs which contain B<Files>
-and other stanzas.  See B<uscan>(1) "COPYRIGHT FILE EXAMPLE".)
-
-The archive type for B<zip> is detected by "B<file --dereference --brief
---mime-type>" command.  So any B<zip> type archives such as B<jar> are treated
-in the same way.  The B<xpi> archive is detected by its extension and is
-handled properly using the B<xpi-unpack> command.
-
-If the package name is given via the B<--package> option, no information is
-read from F<debian/>, and the result file is placed in the current directory.
-
-B<mk-origtargz> is commonly called via B<uscan>, which first obtains the
-upstream tarball.
-
-=head1 OPTIONS
-
-=head2 Metadata options
-
-The following options extend or replace information taken from F<debian/>.
-
-=over
-
-=item B<--package> I<package>
-
-Use I<package> as the name of the Debian source package, and do not require or
-use a F<debian/> directory. This option can only be used together with
-B<--version>.
-
-The default is to use the package name of the first entry in F<debian/changelog>.
-
-=item B<-v>, B<--version> I<version>
-
-Use I<version> as the version of the package. This needs to be the upstream
-version portion of a full Debian version, i.e. no Debian revision, no epoch.
-
-The default is to use the upstream portion of the version of the first entry in
-F<debian/changelog>.
-
-=item B<--exclude-file> I<glob>
-
-Remove files matching the given I<glob> from the tarball, as if it was listed in
-B<Files-Excluded>.
-
-=item B<--copyright-file> I<filename>
-
-Remove files matching the patterns found in I<filename>, which should have the
-format of a Debian F<copyright> file 
-(B<Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/>
-to be precise). Errors parsing that file are silently ignored, exactly as is
-the case with F<debian/copyright>.
-
-Unmatched patterns will emit a warning so the user can verify whether it is
-correct.  If there are multiple patterns which match a file, only the last one
-will count as being matched.
-
-Both the B<--exclude-file> and B<--copyright-file> options amend the list of
-patterns found in F<debian/copyright>. If you do not want to read that file,
-you will have to use B<--package>.
-
-=back
-
-=head2 Action options
-
-These options specify what exactly B<mk-origtargz> should do. The options
-B<--copy>, B<--rename> and B<--symlink> are mutually exclusive.
-
-=over
-
-=item B<--symlink>
-
-Make the resulting file a symlink to the given original file. (This is the
-default behaviour.)
-
-If the file has to be modified (because it is a B<zip>, or B<xpi> file, because
-of B<--repack> or B<Files-Excluded>), this option behaves like B<--copy>.
-
-=item B<--copy>
-
-Make the resulting file a copy of the original file (unless it has to be
-modified, of course).
-
-=item B<--rename>
-
-Rename the original file.
-
-If the file has to be modified (because it is a B<zip>, or B<xpi> file, because
-of B<--repack> or B<Files-Excluded>), this implies that the original file is
-deleted afterwards.
-
-=item B<--repack>
-
-If the given file is not compressed using the desired format (see
-B<--compression>), recompress it.
-
-=item B<-S>, B<--repack-suffix> I<suffix>
-
-If the file has to be modified, because of B<Files-Excluded>, append I<suffix>
-to the upstream version.
-
-=item B<-c>, B<--component> I<componentname>
-
-Use <componentname> as the component name for the secondary upstream tarball.
-Set I<componentname> as the component name.  This is used only for the 
-secondary upstream tarball of the Debian source package.  
-Then I<packagename_version.orig-componentname.tar.gz> is created.
-
-=item B<--compression> [ B<gzip> | B<bzip2> | B<lzma> | B<xz> ]
-
-If B<--repack> is used, or if the given file is a B<zip> or B<xpi> file, ensure
-that the resulting file is compressed using the given scheme. The default is
-B<gzip>.
-
-=item B<-C>, B<--directory> I<directory>
-
-Put the resulting file in the given directory.
-
-=item B<--unzipopt> I<options>
-
-Add the extra options to use with the B<unzip> command such as B<-a>, B<-aa>,
-and B<-b>.
-
-=back
-
-=cut
-
-#=head1 CONFIGURATION VARIABLES
-#
-#The two configuration files F</etc/devscripts.conf> and
-#F<~/.devscripts> are sourced by a shell in that order to set
-#configuration variables. Command line options can be used to override
-#configuration file settings. Environment variable settings are ignored
-#for this purpose. The currently recognised variables are:
-
-=head1 SEE ALSO
-
-B<uscan>(1), B<uupdate>(1)
-
-=head1 AUTHOR
-
-B<mk-origtargz> and this manpage have been written by Joachim Breitner
-<I<nomeata at debian.org>>.
-
-=cut
-
-
-use strict;
-use warnings;
-use File::Temp qw/tempdir/;
-use Getopt::Long qw(:config bundling permute no_getopt_compat);
-use Pod::Usage;
-
-use Dpkg::Changelog::Debian;
-use Dpkg::IPC;
-use Dpkg::Version;
-use File::Spec;
-
-use Devscripts::Compression qw/compression_is_supported compression_guess_from_file compression_get_property/;
-use Cwd 'abs_path';
-use File::Copy;
-use Dpkg::Control::Hash;
-
-sub decompress_archive($$);
-sub compress_archive($$$);
-
-
-my $package = undef;
-my $version = undef;
-my $component = undef;
-my $orig="orig";
-my $excludestanza="Files-Excluded";
-my @exclude_globs = ();
-my @copyright_files = ();
-
-my $destdir = undef;
-my $unzipopt = undef;
-my $compression = "gzip";
-my $mode = undef; # can be symlink, rename or copy. Can internally be repacked if the file was repacked.
-my $repack = 0;
-my $suffix = '';
-
-my $upstream = undef;
-
-# option parsing
-
-sub die_opts ($) {
-    pod2usage({-exitval => 3, -verbose => 1, -msg => shift @_});
-}
-
-sub setmode {
-    my $newmode = shift @_;
-    if (defined $mode and $mode ne $newmode) {
-	die_opts (sprintf "--%s and --%s are mutually exclusive", $mode, $newmode);
-    }
-    $mode = $newmode;
-}
-
-GetOptions(
-    "package=s" => \$package,
-    "version|v=s" => \$version,
-    "component|c=s" => \$component,
-    "exclude-file=s" => \@exclude_globs,
-    "copyright-file=s" => \@copyright_files,
-    "compression=s" => \$compression,
-    "symlink" => \&setmode,
-    "rename" => \&setmode,
-    "copy" => \&setmode,
-    "repack" => \$repack,
-    'repack-suffix|S=s' => \$suffix,
-    "directory|C=s" => \$destdir,
-    "unzipopt=s" => \$unzipopt,
-    "help|h" => sub { pod2usage({-exitval => 0, -verbose => 1}); },
-) or pod2usage({-exitval => 3, -verbose=>1});
-
-$mode ||= "symlink";
-
-# sanity checks
-unless (compression_is_supported($compression)) {
-    die_opts (sprintf "Unknown compression scheme %s", $compression);
-}
-
-if (defined $package and not defined $version) {
-    die_opts "If you use --package, you also have to specify --version."
-}
-
-if (defined $component) {
-    $orig="orig-$component";
-    $excludestanza="Files-Excluded-$component";
-}
-
-if (@ARGV != 1) {
-    die_opts "Please specify original tarball."
-}
-$upstream = $ARGV[0];
-
-# get information from debian/
-
-unless (defined $package) {
-    # get package name
-    my $c = Dpkg::Changelog::Debian->new(range => { count => 1 });
-    $c->load('debian/changelog');
-    if (my $msg = $c->get_parse_errors()) {
-	die "could not parse debian/changelog:\n$msg";
-    }
-    my ($entry) = @{$c};
-    $package = $entry->get_source();
-
-    # get version number
-    unless (defined $version) {
-	my $debversion = Dpkg::Version->new($entry->get_version());
-	# In the following line, use $debversion->is_native() as soon as
-	# we need to depend on dpkg-dev >= 1.17.0 anyways
-	if ($debversion->{no_revision}) {
-	    print "Package with native version number $debversion; mk-origtargz makes no sense for native packages.\n";
-	    exit 0;
-	}
-	$version = $debversion->version();
-    }
-
-    unshift @copyright_files, "debian/copyright" if -r "debian/copyright";
-
-    # set destination directory
-    unless (defined $destdir) {
-	$destdir = "..";
-    }
-} else {
-    unless (defined $destdir) {
-	$destdir = ".";
-    }
-}
-
-for my $copyright_file (@copyright_files) {
-    # get files-excluded
-    my $data = Dpkg::Control::Hash->new();
-    my $okformat = qr'https?://www.debian.org/doc/packaging-manuals/copyright-format/[.\d]+';
-    eval {
-	$data->load($copyright_file);
-	1;
-    } or do {
-	undef $data;
-    };
-    if (not -e $copyright_file) {
-	die "File $copyright_file not found.";
-    } elsif (   $data
-	     && defined $data->{format}
-	     && $data->{format} =~ m@^$okformat/?$@)
-    {
-	if ($data->{$excludestanza}) {
-	    push(@exclude_globs, grep { $_ } split(/\s+/, $data->{$excludestanza}));
-	}
-    } else {
-	open my $file, '<', $copyright_file or die "Unable to read $copyright_file: $!\n";
-	while (my $line = <$file>) {
-	    if ($line =~ m/\b${excludestanza}.*:/i) {
-		warn "WARNING: The file $copyright_file mentions $excludestanza, but its ".
-		     "format is not recognized. Specify Format: ".
-		     "https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ ".
-		     "in order to remove files from the tarball with mk-origtargz.\n";
-		last;
-	    }
-	}
-	close $file;
-    }
-}
-
-
-# Gather information about the upstream file.
-
-# This makes more sense in Dpkg:Compression
-my $tar_regex = qr/\.(tar\.gz   |tgz
-		     |tar\.bz2  |tbz2?
-		     |tar\.lzma |tlz(?:ma?)?
-		     |tar\.xz   |txz
-		     |tar\.Z
-		     )$/x;
-
-unless (-e $upstream) {
-    die "Could not read $upstream: $!"
-}
-
-my $mime = compression_guess_from_file($upstream);
-
-my $is_zipfile = (defined $mime and $mime eq 'zip');
-my $is_tarfile = $upstream =~ $tar_regex;
-my $is_xpifile = $upstream =~ /\.xpi$/i;
-
-unless ($is_zipfile or $is_tarfile) {
-    # TODO: Should we ignore the name and only look at what file knows?
-    die "Parameter $upstream does not look like a tar archive or a zip file."
-}
-
-if ($is_tarfile and not $repack) {
-    # If we are not explicitly repacking, but need to generate a file
-    # (usually due to Files-Excluded), then we want to use the original
-    # compression scheme.
-    $compression = compression_guess_from_file ($upstream);
-
-    if (not defined $compression) {
-	die "Unknown or no compression used in $upstream."
-    }
-}
-
-
-# Now we know what the final filename will be
-my $destfilebase = sprintf "%s_%s.%s.tar", $package, $version, $orig;
-my $destfiletar = sprintf "%s/%s", $destdir, $destfilebase;
-my $destext = compression_get_property($compression, "file_ext");
-my $destfile = sprintf "%s.%s", $destfiletar, $destext;
-
-
-# $upstream_tar is $upstream, unless the latter was a zip file.
-my $upstream_tar = $upstream;
-
-# Remember this for the final report
-my $zipfile_deleted = 0;
-
-# If the file is a zipfile, we need to create a tarfile from it.
-if ($is_zipfile) {
-    if ($is_xpifile) {
-	system('command -v xpi-unpack >/dev/null 2>&1') >> 8 == 0
-	    or die("xpi-unpack binary not found. You need to install the package mozilla-devscripts to be able to repack .xpi upstream archives.\n");
-    } else {
-	system('command -v unzip >/dev/null 2>&1') >> 8 == 0
-	    or die("unzip binary not found. You need to install the package unzip to be able to repack .zip upstream archives.\n");
-    }
-
-    my $tempdir = tempdir ("uscanXXXX", TMPDIR => 1, CLEANUP => 1);
-    # Parent of the target directory should be under our control
-    $tempdir .= '/repack';
-    my @cmd;
-    if ($is_xpifile) {
-	@cmd = ('xpi-unpack', $upstream_tar, $tempdir);
-	system(@cmd) >> 8 == 0
-	    or die("Repacking from xpi failed (could not xpi-unpack)\n");
-    } else {
-	mkdir $tempdir or die("Unable to mkdir($tempdir): $!\n");
-	@cmd = ('unzip', '-q');
-	push @cmd, split ' ', $unzipopt if defined $unzipopt;
-	push @cmd, ('-d', $tempdir, $upstream_tar);
-	system(@cmd) >> 8 == 0
-	    or die("Repacking from zip or jar failed (could not unzip)\n");
-    }
-
-    # Figure out the top-level contents of the tarball.
-    # If we'd pass "." to tar we'd get the same contents, but the filenames would
-    # start with ./, which is confusing later.
-    # This should also be more reliable than, say, changing directories and globbing.
-    opendir(TMPDIR, $tempdir) || die("Can't open $tempdir $!\n");
-    my @files = grep {$_ ne "." && $_ ne ".."} readdir(TMPDIR);
-    close TMPDIR;
-
-    # tar it all up
-    spawn(exec => ['tar',
-		   '--owner=root', '--group=root', '--mode=a+rX',
-		   '--create', '--file', "$destfiletar",
-		   '--directory', $tempdir,
-		   @files],
-	wait_child => 1);
-    unless (-e "$destfiletar") {
-	die("Repacking from zip or jar to tar.$destext failed (could not create tarball)\n");
-    }
-    compress_archive($destfiletar, $destfile, $compression);
-
-    # rename means the user did not want this file to exist afterwards
-    if ($mode eq "rename") {
-	unlink $upstream_tar;
-	$zipfile_deleted++;
-    }
-
-    $mode = "repack";
-    $upstream_tar = $destfile;
-}
-
-# From now on, $upstream_tar is guaranteed to be a compressed tarball. It is always
-# a full (possibly relative) path, and distinct from $destfile.
-
-# Find out if we have to repack
-my $do_repack = 0;
-if ($repack) {
-    my $comp = compression_guess_from_file($upstream_tar);
-    unless ($comp) {
-	die("Cannot determine compression method of $upstream_tar");
-    }
-    $do_repack = $comp ne $compression;
-}
-
-# Removing files
-my $deletecount = 0;
-my @to_delete;
-
-if (@exclude_globs) {
-    my @files;
-    my $files;
-    spawn(exec => ['tar', '-t', '-a', '-f', $upstream_tar],
-	  to_string => \$files,
-	  wait_child => 1);
-    @files = split /^/, $files;
-    chomp @files;
-
-    my %delete;
-    # find out what to delete
-    my @exclude_info = map { { glob => $_, used => 0, regex => glob_to_regex($_) } } @exclude_globs;
-    for my $filename (@files) {
-	my $last_match;
-	for my $info (@exclude_info) {
-	    if ($filename =~ m@^(?:[^/]*/)?        # Possible leading directory, ignore it
-				(?:$info->{regex}) # User pattern
-				(?:/.*)?$          # Possible trailing / for a directory
-			      @x) {
-		$delete{$filename} = 1 if !$last_match;
-		$last_match = $info;
-	    }
-	}
-	if (defined $last_match) {
-	    $last_match->{used} = 1;
-	}
-    }
-
-    for my $info (@exclude_info) {
-	if (!$info->{used}) {
-	    warn "No files matched excluded pattern as the last matching glob: $info->{glob}\n";
-	}
-    }
-
-    # ensure files are mentioned before the directory they live in
-    # (otherwise tar complains)
-    @to_delete = sort {$b cmp $a} keys %delete;
-
-    $deletecount = scalar(@to_delete);
-}
-
-if ($deletecount) {
-    for my $file (@to_delete) {
-        print "$file\n";
-    }
-    exit 0;
-}
-
-if ($deletecount) {
-    $destfilebase = sprintf "%s_%s%s.%s.tar", $package, $version, $suffix, $orig;
-    $destfiletar = sprintf "%s/%s", $destdir, $destfilebase;
-    $destfile = sprintf "%s.%s", $destfiletar, $destext;
-
-    # Zip -> tar process already created $destfile, so need to rename it
-    if ($is_zipfile) {
-	move $upstream_tar, $destfile;
-	$upstream_tar = $destfile;
-    }
-}
-
-# Actually do the unpack, remove, pack cycle
-if ($do_repack || $deletecount) {
-    decompress_archive($upstream_tar, $destfiletar);
-    unlink $upstream_tar if $mode eq "rename";
-    # We have to use piping because --delete is broken otherwise, as documented
-    # at https://www.gnu.org/software/tar/manual/html_node/delete.html
-    if (@to_delete) {
-	spawn(exec => ['tar', '--delete', @to_delete ],
-	      from_file => $destfiletar,
-	      to_file => $destfiletar . ".tmp",
-	      wait_child => 1) if scalar(@to_delete) > 0;
-	move ($destfiletar . ".tmp", $destfiletar);
-    }
-    compress_archive($destfiletar, $destfile, $compression);
-
-    # Symlink no longer makes sense
-    $mode = "repack";
-    $upstream_tar = $destfile;
-}
-
-# Final step: symlink, copy or rename.
-
-my $same_name = abs_path($destfile) eq abs_path($upstream);
-unless ($same_name) {
-    if ($mode ne "repack") { die "Assertion failed" unless $upstream_tar eq $upstream; }
-
-    if ($mode eq "symlink") {
-	my $rel = File::Spec->abs2rel( $upstream_tar, $destdir );
-	symlink $rel, $destfile;
-    } elsif ($mode eq "copy") {
-	copy $upstream_tar, $destfile;
-    } elsif ($mode eq "rename") {
-	move $upstream_tar, $destfile;
-    }
-}
-
-# Final check: Is the tarball usable
-
-# We are lazy and rely on Dpkg::IPC to report an error message (spawn does not report back the error code).
-# We don't expect this to occur often anyways.
-my $ret = spawn(exec => ['tar', '--list', '--auto-compress', '--file', $destfile ],
-      wait_child => 1,
-      to_file => '/dev/null');
-
-# Tell the use what we did
-
-my $upstream_nice = File::Spec->canonpath($upstream);
-my $destfile_nice = File::Spec->canonpath($destfile);
-
-if ($same_name) {
-    print "Leaving $destfile_nice where it is";
-} else {
-    if ($is_zipfile or $do_repack or $deletecount) {
-	print "Successfully repacked $upstream_nice as $destfile_nice";
-    } elsif ($mode eq "symlink") {
-	print "Successfully symlinked $upstream_nice to $destfile_nice";
-    } elsif ($mode eq "copy") {
-	print "Successfully copied $upstream_nice to $destfile_nice";
-    } elsif ($mode eq "rename") {
-	print "Successfully renamed $upstream_nice to $destfile_nice";
-    } else {
-	die "Unknown mode $mode."
-    }
-}
-
-if ($deletecount) {
-    print ", deleting ${deletecount} files from it";
-}
-if ($zipfile_deleted) {
-    print ", and removed the original file"
-}
-print ".\n";
-
-exit 0;
-
-sub decompress_archive($$) {
-    my ($from_file, $to_file) = @_;
-    my $comp = compression_guess_from_file($from_file);
-    unless ($comp) {
-	die("Cannot determine compression method of $from_file");
-    }
-
-    my $cmd = compression_get_property($comp, 'decomp_prog');
-    spawn(exec => $cmd,
-	  from_file => $from_file,
-	  to_file => $to_file,
-	  wait_child => 1);
-}
-
-sub compress_archive($$$) {
-    my ($from_file, $to_file, $comp) = @_;
-
-    my $cmd = compression_get_property($comp, 'comp_prog');
-    push(@{$cmd}, '-'.compression_get_property($comp, 'default_level'));
-    spawn(exec => $cmd,
-	  from_file => $from_file,
-	  to_file => $to_file,
-	  wait_child => 1);
-    unlink $from_file;
-}
-
-# Adapted from Text::Glob::glob_to_regex_string
-sub glob_to_regex {
-    my ($glob) = @_;
-
-    if ($glob =~ m@/$@) {
-	warn "WARNING: Files-Excluded pattern ($glob) should not have a trailing /\n";
-	chop($glob);
-    }
-    if ($glob =~ m/(?<!\\)(?:\\{2})*\\(?![\\*?])/) {
-	die "Invalid Files-Excluded pattern ($glob), \\ can only escape \\, *, or ? characters\n";
-    }
-
-    my ($regex, $escaping);
-    for my $c ($glob =~ m/(.)/gs) {
-	if ($c eq '.' || $c eq '(' || $c eq ')' || $c eq '|' ||
-	    $c eq '+' || $c eq '^' || $c eq '$' || $c eq '@' || $c eq '%' ||
-	    $c eq '{' || $c eq '}' || $c eq '[' || $c eq ']' ||
-	    # Escape '#' since we're using /x in the pattern match
-	    $c eq '#') {
-	    $regex .= "\\$c";
-	}
-	elsif ($c eq '*') {
-	    $regex .= $escaping ? "\\*" : ".*";
-	}
-	elsif ($c eq '?') {
-	    $regex .= $escaping ? "\\?" : ".";
-	}
-	elsif ($c eq "\\") {
-	    if ($escaping) {
-		$regex .= "\\\\";
-		$escaping = 0;
-	    }
-	    else {
-		$escaping = 1;
-	    }
-	    next;
-	}
-	else {
-	    $regex .= $c;
-	    $escaping = 0;
-	}
-	$escaping = 0;
-    }
-
-    return $regex;
-}
diff --git a/debian/scripts/mk-origtargz.patch b/debian/scripts/mk-origtargz.patch
new file mode 100644
index 0000000..26f59de
--- /dev/null
+++ b/debian/scripts/mk-origtargz.patch
@@ -0,0 +1,14 @@
+--- a/debian/scripts/mk-origtargz	2017-10-27 12:52:18.000000000 +0000
++++ b/debian/scripts/mk-origtargz	2017-11-26 23:39:05.818091051 +0000
+@@ -550,6 +550,11 @@
+ }
+ 
+ if ($deletecount) {
++    for my $file (@to_delete) {
++        print "$file\n";
++    }
++    exit 0;
++
+     $destfilebase = sprintf "%s_%s%s.%s.tar", $package, $version, $suffix, $orig;
+     $destfiletar = sprintf "%s/%s", $destdir, $destfilebase;
+     $destfile = sprintf "%s.%s", $destfiletar, $destext;
diff --git a/debian/scripts/unbundle b/debian/scripts/unbundle
index e1a340b..20665d3 100755
--- a/debian/scripts/unbundle
+++ b/debian/scripts/unbundle
@@ -27,12 +27,17 @@ keepers = ('openh264')
 
 for lib,rule in replace_gn_files.REPLACEMENTS.items():
     if lib not in keepers:
-        # remove conflicting embedded third party source files
-        strip(os.path.dirname(rule))
-        strip(os.path.join('third_party',lib))
-        # remove the gn file that builds the embedded library
-        if os.path.lexists(rule):
-            os.remove(rule)
+        libdir = os.path.join('third_party',lib)
+        if os.path.exists(libdir):
+            # remove conflicting embedded third party source files
+            strip(libdir)
+            strip(os.path.dirname(rule))
+            # remove the gn file that builds the embedded library
+            if os.path.lexists(rule):
+                os.remove(rule)
+        else:
+            # otherwise, create the missing directory
+            os.mkdir(libdir)
         # create a symlink to the unbundle gn file
         symlink = "ln -s "
         path = os.path.split(rule)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-chromium/pkg-chromium.git



More information about the Pkg-chromium-commit mailing list