[arch-commits] Commit in gyp/repos/extra-any (9 files)
Jan Steffens
heftig at gemini.archlinux.org
Sat Jun 25 21:05:41 UTC 2022
Date: Saturday, June 25, 2022 @ 21:05:40
Author: heftig
Revision: 449426
archrelease: copy trunk to extra-any
Added:
gyp/repos/extra-any/0001-gyp-python38.patch
(from rev 449425, gyp/trunk/0001-gyp-python38.patch)
gyp/repos/extra-any/0002-gyp-fix-cmake.patch
(from rev 449425, gyp/trunk/0002-gyp-fix-cmake.patch)
gyp/repos/extra-any/0003-gyp-fips.patch
(from rev 449425, gyp/trunk/0003-gyp-fips.patch)
gyp/repos/extra-any/PKGBUILD
(from rev 449425, gyp/trunk/PKGBUILD)
Deleted:
gyp/repos/extra-any/PKGBUILD
gyp/repos/extra-any/gyp-fips.patch
gyp/repos/extra-any/gyp-fix-cmake.patch
gyp/repos/extra-any/gyp-python38.patch
gyp/repos/extra-any/gyp-python39.patch
--------------------------+
0001-gyp-python38.patch | 71 +++++++++++++++++++++++++++++++++++
0002-gyp-fix-cmake.patch | 44 ++++++++++++++++++++++
0003-gyp-fips.patch | 46 +++++++++++++++++++++++
PKGBUILD | 89 ++++++++++++++++++++++-----------------------
gyp-fips.patch | 35 -----------------
gyp-fix-cmake.patch | 33 ----------------
gyp-python38.patch | 63 -------------------------------
gyp-python39.patch | 55 ---------------------------
8 files changed, 206 insertions(+), 230 deletions(-)
Copied: gyp/repos/extra-any/0001-gyp-python38.patch (from rev 449425, gyp/trunk/0001-gyp-python38.patch)
===================================================================
--- 0001-gyp-python38.patch (rev 0)
+++ 0001-gyp-python38.patch 2022-06-25 21:05:40 UTC (rev 449426)
@@ -0,0 +1,71 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Tom Hughes <tom at compton.nu>
+Date: Fri, 23 Aug 2019 09:33:14 +0100
+Subject: [PATCH] gyp-python38
+
+Fix python 3.8 warnings
+
+(From Fedora)
+---
+ pylib/gyp/input.py | 2 +-
+ test/lib/TestCmd.py | 6 +++---
+ test/lib/TestGyp.py | 2 +-
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/pylib/gyp/input.py b/pylib/gyp/input.py
+index 4c1289164045..2bea3341adc5 100644
+--- a/pylib/gyp/input.py
++++ b/pylib/gyp/input.py
+@@ -1183,7 +1183,7 @@ def LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key):
+ if variable_name in variables:
+ # If the variable is already set, don't set it.
+ continue
+- if the_dict_key is 'variables' and variable_name in the_dict:
++ if the_dict_key == 'variables' and variable_name in the_dict:
+ # If the variable is set without a % in the_dict, and the_dict is a
+ # variables dict (making |variables| a varaibles sub-dict of a
+ # variables dict), use the_dict's definition.
+diff --git a/test/lib/TestCmd.py b/test/lib/TestCmd.py
+index 1ec50933a4a8..457694c877d4 100644
+--- a/test/lib/TestCmd.py
++++ b/test/lib/TestCmd.py
+@@ -283,7 +283,7 @@ if os.name in ('posix', 'nt'):
+ else:
+ tempfile.template = 'testcmd.'
+
+-re_space = re.compile('\s')
++re_space = re.compile(r'\s')
+
+ _Cleanup = []
+
+@@ -882,7 +882,7 @@ class TestCmd(object):
+ #self.diff_function = difflib.unified_diff
+ self._dirlist = []
+ self._preserve = {'pass_test': 0, 'fail_test': 0, 'no_result': 0}
+- if 'PRESERVE' in os.environ and os.environ['PRESERVE'] is not '':
++ if 'PRESERVE' in os.environ and os.environ['PRESERVE'] != '':
+ self._preserve['pass_test'] = os.environ['PRESERVE']
+ self._preserve['fail_test'] = os.environ['PRESERVE']
+ self._preserve['no_result'] = os.environ['PRESERVE']
+@@ -1103,7 +1103,7 @@ class TestCmd(object):
+ the temporary working directories to be preserved for all
+ conditions.
+ """
+- if conditions is ():
++ if len(conditions) == 0:
+ conditions = ('pass_test', 'fail_test', 'no_result')
+ for cond in conditions:
+ self._preserve[cond] = 1
+diff --git a/test/lib/TestGyp.py b/test/lib/TestGyp.py
+index 2aa78684f517..badfa910100f 100644
+--- a/test/lib/TestGyp.py
++++ b/test/lib/TestGyp.py
+@@ -743,7 +743,7 @@ def FindVisualStudioInstallation():
+ build_tool = None
+ if not build_tool:
+ args1 = ['reg', 'query',
+- 'HKLM\Software\Microsoft\VisualStudio\SxS\VS7',
++ r'HKLM\Software\Microsoft\VisualStudio\SxS\VS7',
+ '/v', '15.0', '/reg:32']
+ build_tool = subprocess.check_output(args1).decode(
+ 'utf-8', 'ignore').strip().split(b'\r\n').pop().split(b' ').pop()
Copied: gyp/repos/extra-any/0002-gyp-fix-cmake.patch (from rev 449425, gyp/trunk/0002-gyp-fix-cmake.patch)
===================================================================
--- 0002-gyp-fix-cmake.patch (rev 0)
+++ 0002-gyp-fix-cmake.patch 2022-06-25 21:05:40 UTC (rev 449426)
@@ -0,0 +1,44 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <heftig at archlinux.org>
+Date: Sat, 25 Jun 2022 20:41:40 +0000
+Subject: [PATCH] gyp-fix-cmake
+
+(From Fedora, with fixed exception type)
+---
+ pylib/gyp/generator/cmake.py | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/pylib/gyp/generator/cmake.py b/pylib/gyp/generator/cmake.py
+index 4a2041cf2687..12461dc1d48b 100644
+--- a/pylib/gyp/generator/cmake.py
++++ b/pylib/gyp/generator/cmake.py
+@@ -40,9 +40,9 @@ import gyp.xcode_emulation
+
+ try:
+ # maketrans moved to str in python3.
+- _maketrans = string.maketrans
+-except NameError:
+ _maketrans = str.maketrans
++except AttributeError:
++ _maketrans = string.maketrans
+
+ generator_default_variables = {
+ 'EXECUTABLE_PREFIX': '',
+@@ -281,7 +281,7 @@ def WriteActions(target_name, actions, extra_sources, extra_deps,
+ dirs = set(dir for dir in (os.path.dirname(o) for o in outputs) if dir)
+
+ if int(action.get('process_outputs_as_sources', False)):
+- extra_sources.extend(zip(cmake_outputs, outputs))
++ extra_sources.extend(list(zip(cmake_outputs, outputs)))
+
+ # add_custom_command
+ output.write('add_custom_command(OUTPUT ')
+@@ -987,7 +987,7 @@ def WriteTarget(namer, qualified_target, target_dicts, build_dir, config_to_use,
+
+ # XCode settings
+ xcode_settings = config.get('xcode_settings', {})
+- for xcode_setting, xcode_value in xcode_settings.viewitems():
++ for xcode_setting, xcode_value in xcode_settings.items():
+ SetTargetProperty(output, cmake_target_name,
+ "XCODE_ATTRIBUTE_%s" % xcode_setting, xcode_value,
+ '' if isinstance(xcode_value, str) else ' ')
Copied: gyp/repos/extra-any/0003-gyp-fips.patch (from rev 449425, gyp/trunk/0003-gyp-fips.patch)
===================================================================
--- 0003-gyp-fips.patch (rev 0)
+++ 0003-gyp-fips.patch 2022-06-25 21:05:40 UTC (rev 449426)
@@ -0,0 +1,46 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <heftig at archlinux.org>
+Date: Sat, 25 Jun 2022 20:45:54 +0000
+Subject: [PATCH] gyp-fips
+
+(From Fedora, ported to gyp master)
+---
+ pylib/gyp/generator/make.py | 2 +-
+ pylib/gyp/generator/ninja.py | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/pylib/gyp/generator/make.py b/pylib/gyp/generator/make.py
+index 997eec08666e..06c763db609a 100644
+--- a/pylib/gyp/generator/make.py
++++ b/pylib/gyp/generator/make.py
+@@ -1774,7 +1774,7 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD
+
+ # Hash the target name to avoid generating overlong filenames.
+ cmdstring = (command if command else self.target).encode('utf-8')
+- cmddigest = hashlib.sha1(cmdstring).hexdigest()
++ cmddigest = hashlib.sha1(cmdstring, usedforsecurity=False).hexdigest()
+ intermediate = "%s.intermediate" % (cmddigest)
+ self.WriteLn('%s: %s' % (' '.join(outputs), intermediate))
+ self.WriteLn('\t%s' % '@:');
+diff --git a/pylib/gyp/generator/ninja.py b/pylib/gyp/generator/ninja.py
+index 3bcfe352925b..c439c8b728ad 100644
+--- a/pylib/gyp/generator/ninja.py
++++ b/pylib/gyp/generator/ninja.py
+@@ -752,7 +752,7 @@ class NinjaWriter(object):
+ if self.flavor == 'win':
+ # WriteNewNinjaRule uses unique_name for creating an rsp file on win.
+ extra_bindings.append(('unique_name',
+- hashlib.md5(six.ensure_binary(outputs[0])).hexdigest()))
++ hashlib.md5(six.ensure_binary(outputs[0]), usedforsecurity=False).hexdigest()))
+
+ self.ninja.build(outputs, rule_name, self.GypPathToNinja(source),
+ implicit=inputs,
+@@ -2389,7 +2389,7 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params,
+ qualified_target_for_hash = gyp.common.QualifiedTarget(build_file, name,
+ toolset)
+ qualified_target_for_hash = qualified_target_for_hash.encode('utf-8')
+- hash_for_rules = hashlib.md5(qualified_target_for_hash).hexdigest()
++ hash_for_rules = hashlib.md5(qualified_target_for_hash, usedforsecurity=False).hexdigest()
+
+ base_path = os.path.dirname(build_file)
+ obj = 'obj'
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2022-06-25 20:59:58 UTC (rev 449425)
+++ PKGBUILD 2022-06-25 21:05:40 UTC (rev 449426)
@@ -1,44 +0,0 @@
-# Maintainer: Jan Alexander Steffens (heftig) <heftig at archlinux.org>
-
-pkgname=gyp
-pkgver=20190716.fcd686f1
-pkgrel=7
-pkgdesc='"Generate Your Projects" Meta-Build system'
-arch=(any)
-url="https://gyp.gsrc.io/"
-license=(custom:BSD)
-depends=(python ninja)
-makedepends=(git python-setuptools)
-_commit=fcd686f1880fa52a1ee78d3e98af1b88cb334528 # changes/82/1701782/5
-source=("git+https://chromium.googlesource.com/external/gyp#commit=$_commit"
- gyp-fips.patch gyp-fix-cmake.patch gyp-python38.patch gyp-python39.patch)
-sha256sums=('SKIP'
- '43022909aa2f320bdc0cc5813734f42bd6ef2ac4372821bf5757f753c7a3c277'
- '8610250f946ee070c5182cc87cd23cdd9f66a47ec57a98049bb2aaae4a1e09e6'
- '6580f0f02f430f1ba4aa7e8e2d32203dcb3d6f07f1de5287d0fb33ab2ed1cc30'
- '06b9092eea1513a70f8c5213ba2dc7f550cf5ddf6ee0bb801ea0cda290e3a6f9')
-
-pkgver() {
- cd $pkgname
-
- # Commit date + short rev
- echo $(TZ=UTC git show -s --pretty=%cd --date=format-local:%Y%m%d HEAD).$(git rev-parse --short HEAD)
-}
-
-prepare() {
- cd $pkgname
-
- # Python 3 fixes from Fedora
- git apply -3 ../*.patch
-}
-
-build() {
- cd $pkgname
- python setup.py build
-}
-
-package() {
- cd $pkgname
- python setup.py install --root="$pkgdir" --optimize=1 --skip-build
- install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 LICENSE
-}
Copied: gyp/repos/extra-any/PKGBUILD (from rev 449425, gyp/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2022-06-25 21:05:40 UTC (rev 449426)
@@ -0,0 +1,45 @@
+# Maintainer: Jan Alexander Steffens (heftig) <heftig at archlinux.org>
+
+pkgname=gyp
+pkgver=20220404.9ecf45e3
+pkgrel=1
+pkgdesc='"Generate Your Projects" Meta-Build system'
+url="https://gyp.gsrc.io/"
+arch=(any)
+license=(custom:BSD)
+depends=(python-six ninja)
+makedepends=(git python-setuptools)
+_commit=9ecf45e37677743503342ee4c6a76eaee80e4a7f # changes/24/3562924/3
+source=("git+https://chromium.googlesource.com/external/gyp#commit=$_commit"
+ 0001-gyp-python38.patch
+ 0002-gyp-fix-cmake.patch
+ 0003-gyp-fips.patch)
+sha256sums=('SKIP'
+ '7fb04acbac92a1d173c2bc3022b7814a711427225a7fd32912dc60f1e1a6746e'
+ '8a9f1a413b943dd469f981ee5fa7b7cc372e3cd9e9f0ecf9640d4f0f6bb29647'
+ 'dda2c6717d52a9dd53ce5b4985115f947dcca2bce3a207bd9c543976c41decf5')
+
+pkgver() {
+ cd gyp
+
+ # Commit date + short rev
+ echo $(TZ=UTC git show -s --pretty=%cd --date=format-local:%Y%m%d HEAD).$(git rev-parse --short HEAD)
+}
+
+prepare() {
+ cd gyp
+
+ # Python 3 fixes from Fedora
+ git apply -3 ../*.patch
+}
+
+build() {
+ cd gyp
+ python setup.py build
+}
+
+package() {
+ cd gyp
+ python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+ install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 LICENSE
+}
Deleted: gyp-fips.patch
===================================================================
--- gyp-fips.patch 2022-06-25 20:59:58 UTC (rev 449425)
+++ gyp-fips.patch 2022-06-25 21:05:40 UTC (rev 449426)
@@ -1,35 +0,0 @@
-diff --git a/pylib/gyp/generator/make.py b/pylib/gyp/generator/make.py
-index 997eec08..06c763db 100644
---- a/pylib/gyp/generator/make.py
-+++ b/pylib/gyp/generator/make.py
-@@ -1774,7 +1774,7 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD
-
- # Hash the target name to avoid generating overlong filenames.
- cmdstring = (command if command else self.target).encode('utf-8')
-- cmddigest = hashlib.sha1(cmdstring).hexdigest()
-+ cmddigest = hashlib.sha1(cmdstring, usedforsecurity=False).hexdigest()
- intermediate = "%s.intermediate" % (cmddigest)
- self.WriteLn('%s: %s' % (' '.join(outputs), intermediate))
- self.WriteLn('\t%s' % '@:');
-diff --git a/pylib/gyp/generator/ninja.py b/pylib/gyp/generator/ninja.py
-index bf04e567..631ef7f2 100644
---- a/pylib/gyp/generator/ninja.py
-+++ b/pylib/gyp/generator/ninja.py
-@@ -751,7 +751,7 @@ class NinjaWriter(object):
- if self.flavor == 'win':
- # WriteNewNinjaRule uses unique_name for creating an rsp file on win.
- extra_bindings.append(('unique_name',
-- hashlib.md5(outputs[0]).hexdigest()))
-+ hashlib.md5(outputs[0], usedforsecurity=False).hexdigest()))
-
- self.ninja.build(outputs, rule_name, self.GypPathToNinja(source),
- implicit=inputs,
-@@ -2388,7 +2388,7 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params,
- qualified_target_for_hash = gyp.common.QualifiedTarget(build_file, name,
- toolset)
- qualified_target_for_hash = qualified_target_for_hash.encode('utf-8')
-- hash_for_rules = hashlib.md5(qualified_target_for_hash).hexdigest()
-+ hash_for_rules = hashlib.md5(qualified_target_for_hash, usedforsecurity=False).hexdigest()
-
- base_path = os.path.dirname(build_file)
- obj = 'obj'
Deleted: gyp-fix-cmake.patch
===================================================================
--- gyp-fix-cmake.patch 2022-06-25 20:59:58 UTC (rev 449425)
+++ gyp-fix-cmake.patch 2022-06-25 21:05:40 UTC (rev 449426)
@@ -1,33 +0,0 @@
---- a/pylib/gyp/generator/cmake.py
-+++ b/pylib/gyp/generator/cmake.py
-@@ -40,9 +40,9 @@
-
- try:
- # maketrans moved to str in python3.
-+ _maketrans = str.maketrans
-+except AttributeError:
- _maketrans = string.maketrans
--except NameError:
-- _maketrans = str.maketrans
-
- generator_default_variables = {
- 'EXECUTABLE_PREFIX': '',
-@@ -281,7 +281,7 @@
- dirs = set(dir for dir in (os.path.dirname(o) for o in outputs) if dir)
-
- if int(action.get('process_outputs_as_sources', False)):
-- extra_sources.extend(zip(cmake_outputs, outputs))
-+ extra_sources.extend(list(zip(cmake_outputs, outputs)))
-
- # add_custom_command
- output.write('add_custom_command(OUTPUT ')
-@@ -987,7 +987,7 @@
-
- # XCode settings
- xcode_settings = config.get('xcode_settings', {})
-- for xcode_setting, xcode_value in xcode_settings.viewitems():
-+ for xcode_setting, xcode_value in xcode_settings.items():
- SetTargetProperty(output, cmake_target_name,
- "XCODE_ATTRIBUTE_%s" % xcode_setting, xcode_value,
- '' if isinstance(xcode_value, str) else ' ')
-
Deleted: gyp-python38.patch
===================================================================
--- gyp-python38.patch 2022-06-25 20:59:58 UTC (rev 449425)
+++ gyp-python38.patch 2022-06-25 21:05:40 UTC (rev 449426)
@@ -1,63 +0,0 @@
-commit 7b0a3fd85beb67c990da3fb1b690444a27a6ee42
-Author: Tom Hughes <tom at compton.nu>
-Date: Fri Aug 23 09:33:14 2019 +0100
-
- Fix python 3.8 warnings
-
-diff --git a/pylib/gyp/input.py b/pylib/gyp/input.py
-index 42c279cf..013231dc 100644
---- a/pylib/gyp/input.py
-+++ b/pylib/gyp/input.py
-@@ -1181,7 +1181,7 @@ def LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key):
- if variable_name in variables:
- # If the variable is already set, don't set it.
- continue
-- if the_dict_key is 'variables' and variable_name in the_dict:
-+ if the_dict_key == 'variables' and variable_name in the_dict:
- # If the variable is set without a % in the_dict, and the_dict is a
- # variables dict (making |variables| a varaibles sub-dict of a
- # variables dict), use the_dict's definition.
-diff --git a/test/lib/TestCmd.py b/test/lib/TestCmd.py
-index 1ec50933..457694c8 100644
---- a/test/lib/TestCmd.py
-+++ b/test/lib/TestCmd.py
-@@ -283,7 +283,7 @@ if os.name in ('posix', 'nt'):
- else:
- tempfile.template = 'testcmd.'
-
--re_space = re.compile('\s')
-+re_space = re.compile(r'\s')
-
- _Cleanup = []
-
-@@ -882,7 +882,7 @@ class TestCmd(object):
- #self.diff_function = difflib.unified_diff
- self._dirlist = []
- self._preserve = {'pass_test': 0, 'fail_test': 0, 'no_result': 0}
-- if 'PRESERVE' in os.environ and os.environ['PRESERVE'] is not '':
-+ if 'PRESERVE' in os.environ and os.environ['PRESERVE'] != '':
- self._preserve['pass_test'] = os.environ['PRESERVE']
- self._preserve['fail_test'] = os.environ['PRESERVE']
- self._preserve['no_result'] = os.environ['PRESERVE']
-@@ -1103,7 +1103,7 @@ class TestCmd(object):
- the temporary working directories to be preserved for all
- conditions.
- """
-- if conditions is ():
-+ if len(conditions) == 0:
- conditions = ('pass_test', 'fail_test', 'no_result')
- for cond in conditions:
- self._preserve[cond] = 1
-diff --git a/test/lib/TestGyp.py b/test/lib/TestGyp.py
-index cba2d3cc..43865ee1 100644
---- a/test/lib/TestGyp.py
-+++ b/test/lib/TestGyp.py
-@@ -742,7 +742,7 @@ def FindVisualStudioInstallation():
- build_tool = None
- if not build_tool:
- args1 = ['reg', 'query',
-- 'HKLM\Software\Microsoft\VisualStudio\SxS\VS7',
-+ r'HKLM\Software\Microsoft\VisualStudio\SxS\VS7',
- '/v', '15.0', '/reg:32']
- build_tool = subprocess.check_output(args1).decode(
- 'utf-8', 'ignore').strip().split(b'\r\n').pop().split(b' ').pop()
Deleted: gyp-python39.patch
===================================================================
--- gyp-python39.patch 2022-06-25 20:59:58 UTC (rev 449425)
+++ gyp-python39.patch 2022-06-25 21:05:40 UTC (rev 449426)
@@ -1,55 +0,0 @@
-diff --git a/pylib/gyp/common.py b/pylib/gyp/common.py
-index b268d229..03c99cab 100644
---- a/pylib/gyp/common.py
-+++ b/pylib/gyp/common.py
-@@ -4,7 +4,6 @@
-
- from __future__ import with_statement
-
--import collections
- import errno
- import filecmp
- import os.path
-@@ -12,6 +11,11 @@ import re
- import tempfile
- import sys
-
-+try:
-+ from collections.abc import MutableSet
-+except ImportError:
-+ from collections import MutableSet
-+
-
- # A minimal memoizing decorator. It'll blow up if the args aren't immutable,
- # among other "problems".
-@@ -494,7 +498,7 @@ def uniquer(seq, idfun=None):
-
-
- # Based on http://code.activestate.com/recipes/576694/.
--class OrderedSet(collections.MutableSet):
-+class OrderedSet(MutableSet):
- def __init__(self, iterable=None):
- self.end = end = []
- end += [None, end, end] # sentinel node for doubly linked list
-diff --git a/pylib/gyp/generator/msvs.py b/pylib/gyp/generator/msvs.py
-index 843e7067..327fe8d2 100644
---- a/pylib/gyp/generator/msvs.py
-+++ b/pylib/gyp/generator/msvs.py
-@@ -4,7 +4,7 @@
-
- from __future__ import print_function
-
--import collections
-+from collections import OrderedDict
- import copy
- import ntpath
- import os
-@@ -195,7 +195,7 @@ def _ConvertSourcesToFilterHierarchy(sources, prefix=None, excluded=None,
- if not prefix: prefix = []
- result = []
- excluded_result = []
-- folders = collections.OrderedDict()
-+ folders = OrderedDict()
- # Gather files into the final result, excluded, or folders.
- for s in sources:
- if len(s) == 1:
More information about the arch-commits
mailing list