[SCM] qtwebengine packaging branch, experimental, updated. debian/5.7.1+dfsg-6.1-23-g2e20b01

Simon Quigley tsimonq2-guest at moszumanska.debian.org
Wed Jun 28 06:36:11 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/qt/qtwebengine.git;a=commitdiff;h=2e20b01

The following commit has been merged in the experimental branch:
commit 2e20b01ec7b690ab28a612b1af936529384b174f
Author: Simon Quigley <tsimonq2 at ubuntu.com>
Date:   Wed Jun 28 01:35:55 2017 -0500

    Add patch disabling last_commit_position as our tarballs are not Git repositories.
---
 debian/changelog                                  |   4 +
 debian/patches/disable-last_commit_position.patch | 165 ++++++++++++++++++++++
 debian/patches/series                             |   1 +
 3 files changed, 170 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 212c454..41c7120 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,10 @@ qtwebengine-opensource-src (5.9.0+dfsg-1) UNRELEASED; urgency=medium
   * New package qtwebengine5-private-dev for private headers used by
     QtWebView
 
+  [ Simon Quigley ]
+  * Add patch disabling last_commit_position as our tarballs are not Git
+    repositories.
+
  -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Fri, 16 Jun 2017 16:54:53 +0100
 
 qtwebengine-opensource-src (5.7.1+dfsg-6.1) unstable; urgency=medium
diff --git a/debian/patches/disable-last_commit_position.patch b/debian/patches/disable-last_commit_position.patch
new file mode 100644
index 0000000..8af3735
--- /dev/null
+++ b/debian/patches/disable-last_commit_position.patch
@@ -0,0 +1,165 @@
+Description: Disable last_commit_position
+ In Debian, we work off of tarballs that aren't Git repositories. We can't
+ expect a Git directory to exist in the tarball, so just remove this useless
+ file.
+Author: Simon Quigley <tsimonq2 at ubuntu.com>
+Forwarded: not-needed
+Last-Update: 2017-06-25
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/src/3rdparty/chromium/tools/gn/last_commit_position.py
++++ /dev/null
+@@ -1,100 +0,0 @@
+-# Copyright 2014 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.
+-
+-"""Writes the most recent "Cr-Commit-Position" value on the master branch
+-to a C header file.
+-
+-Usage: last_commit_position.py <dir> <outfile> <headerguard>
+-
+-  <dir>
+-    Some directory inside the repo to check. This will be used as the current
+-    directory when running git. It's best to pass the repo toplevel directory.
+-
+-  <outfile>
+-    C header file to write.
+-
+-  <headerguard>
+-    String to use as the header guard for the written file.
+-"""
+-
+-import os
+-import re
+-import subprocess
+-import sys
+-
+-def RunGitCommand(directory, command):
+-  """
+-  Launches git subcommand.
+-
+-  Errors are swallowed.
+-
+-  Returns:
+-    A process object or None.
+-  """
+-  command = ['git'] + command
+-  # Force shell usage under cygwin. This is a workaround for
+-  # mysterious loss of cwd while invoking cygwin's git.
+-  # We can't just pass shell=True to Popen, as under win32 this will
+-  # cause CMD to be used, while we explicitly want a cygwin shell.
+-  if sys.platform == 'cygwin':
+-    command = ['sh', '-c', ' '.join(command)]
+-  try:
+-    proc = subprocess.Popen(command,
+-                            stdout=subprocess.PIPE,
+-                            stderr=subprocess.PIPE,
+-                            cwd=directory,
+-                            shell=(sys.platform=='win32'))
+-    return proc
+-  except OSError:
+-    return None
+-
+-
+-def FetchCommitPosition(directory):
+-  regex = re.compile(r'\s*Cr-Commit-Position: refs/heads/master@\{#(\d+)\}\s*')
+-
+-  # Search this far backward in the git log. The commit position should be
+-  # close to the top. We allow some slop for long commit messages, and maybe
+-  # there were some local commits after the last "official" one. Having this
+-  # max prevents us from searching all history in the case of an error.
+-  max_lines = 2048
+-
+-  proc = RunGitCommand(directory, ['log'])
+-  for i in range(max_lines):
+-    line = proc.stdout.readline()
+-    if not line:
+-      return None
+-
+-    match = regex.match(line)
+-    if match:
+-      return match.group(1)
+-
+-  return None
+-
+-
+-def WriteHeader(header_file, header_guard, value):
+-  with open(header_file, 'w') as f:
+-    f.write('''/* Generated by last_commit_position.py. */
+-
+-#ifndef %(guard)s
+-#define %(guard)s
+-
+-#define LAST_COMMIT_POSITION "%(value)s"
+-
+-#endif
+-''' % {'guard': header_guard, 'value': value})
+-
+-
+-if len(sys.argv) != 4:
+-  print "Wrong number of arguments"
+-  sys.exit(1)
+-
+-git_directory = sys.argv[1]
+-output_file = sys.argv[2]
+-header_guard = sys.argv[3]
+-
+-value = FetchCommitPosition(git_directory)
+-if not value:
+-  value = 'UNKNOWN'
+-
+-WriteHeader(output_file, header_guard, value)
+--- a/src/3rdparty/chromium/tools/gn/BUILD.gn
++++ b/src/3rdparty/chromium/tools/gn/BUILD.gn
+@@ -237,26 +237,6 @@ static_library("gn_lib") {
+   ]
+ }
+ 
+-action("last_commit_position") {
+-  script = "last_commit_position.py"
+-
+-  # This dependency forces a re-run when the code is synced.
+-  inputs = [
+-    "//build/util/LASTCHANGE",
+-  ]
+-
+-  outfile = "$target_gen_dir/last_commit_position.h"
+-  outputs = [
+-    outfile,
+-  ]
+-
+-  args = [
+-    rebase_path("//", root_build_dir),
+-    rebase_path(outfile, root_build_dir),
+-    "TOOLS_GN_LAST_COMMIT_POSITION_H_",
+-  ]
+-}
+-
+ # Note for Windows debugging: GN is super-multithreaded and uses a lot of STL.
+ # Iterator debugging on Windows does locking for every access, which ends up
+ # slowing down debug runtime from 0:36 to 9:40. If you want to run debug builds
+@@ -269,7 +249,6 @@ executable("gn") {
+ 
+   deps = [
+     ":gn_lib",
+-    ":last_commit_position",
+     "//base",
+     "//build/config/sanitizers:deps",
+     "//build/win:default_exe_manifest",
+--- a/src/3rdparty/chromium/tools/gn/gn_main.cc
++++ b/src/3rdparty/chromium/tools/gn/gn_main.cc
+@@ -12,13 +12,7 @@
+ #include "tools/gn/standard_out.h"
+ #include "tools/gn/switches.h"
+ 
+-// Only the GN-generated build makes this header for now.
+-// TODO(brettw) consider adding this if we need it in GYP.
+-#if defined(GN_BUILD)
+-#include "tools/gn/last_commit_position.h"
+-#else
+ #define LAST_COMMIT_POSITION "UNKNOWN"
+-#endif
+ 
+ namespace {
+ 
diff --git a/debian/patches/series b/debian/patches/series
index c305320..e8cf724 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+disable-last_commit_position.patch
 add_mips_support.patch
 linux-pri.patch
 system-re2.patch

-- 
qtwebengine packaging



More information about the pkg-kde-commits mailing list