[arch-commits] Commit in gyp/trunk (PKGBUILD gyp-fips.patch gyp-python39.patch)

Jan Steffens heftig at archlinux.org
Sun Jan 24 00:23:33 UTC 2021


    Date: Sunday, January 24, 2021 @ 00:23:33
  Author: heftig
Revision: 406677

20190716.fcd686f1-6: drop setuptools dep, add more patches from fedora

Added:
  gyp/trunk/gyp-fips.patch
  gyp/trunk/gyp-python39.patch
Modified:
  gyp/trunk/PKGBUILD

--------------------+
 PKGBUILD           |   17 ++++++++-------
 gyp-fips.patch     |   35 ++++++++++++++++++++++++++++++++
 gyp-python39.patch |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 99 insertions(+), 8 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-01-23 23:54:34 UTC (rev 406676)
+++ PKGBUILD	2021-01-24 00:23:33 UTC (rev 406677)
@@ -1,20 +1,22 @@
-# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens at gmail.com>
+# Maintainer: Jan Alexander Steffens (heftig) <heftig at archlinux.org>
 
 pkgname=gyp
 pkgver=20190716.fcd686f1
-pkgrel=5
+pkgrel=6
 pkgdesc='"Generate Your Projects" Meta-Build system'
 arch=(any)
 url="https://gyp.gsrc.io/"
 license=(custom:BSD)
-depends=(python-setuptools ninja)
-makedepends=(git)
+depends=(python ninja)
+makedepends=(git python-setuptools)
 _commit=fcd686f1880fa52a1ee78d3e98af1b88cb334528  # changes/82/1701782/5
 source=("git+https://chromium.googlesource.com/external/gyp#commit=$_commit"
-        gyp-fix-cmake.patch gyp-python38.patch)
+        gyp-fips.patch gyp-fix-cmake.patch gyp-python38.patch gyp-python39.patch)
 sha256sums=('SKIP'
+            '43022909aa2f320bdc0cc5813734f42bd6ef2ac4372821bf5757f753c7a3c277'
             '8610250f946ee070c5182cc87cd23cdd9f66a47ec57a98049bb2aaae4a1e09e6'
-            '6580f0f02f430f1ba4aa7e8e2d32203dcb3d6f07f1de5287d0fb33ab2ed1cc30')
+            '6580f0f02f430f1ba4aa7e8e2d32203dcb3d6f07f1de5287d0fb33ab2ed1cc30'
+            '06b9092eea1513a70f8c5213ba2dc7f550cf5ddf6ee0bb801ea0cda290e3a6f9')
 
 pkgver() {
   cd $pkgname
@@ -27,8 +29,7 @@
   cd $pkgname
 
   # Python 3 fixes from Fedora
-  patch -Np1 -i ../gyp-fix-cmake.patch
-  patch -Np1 -i ../gyp-python38.patch
+  git apply -3 ../*.patch
 }
 
 build() {

Added: gyp-fips.patch
===================================================================
--- gyp-fips.patch	                        (rev 0)
+++ gyp-fips.patch	2021-01-24 00:23:33 UTC (rev 406677)
@@ -0,0 +1,35 @@
+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'

Added: gyp-python39.patch
===================================================================
--- gyp-python39.patch	                        (rev 0)
+++ gyp-python39.patch	2021-01-24 00:23:33 UTC (rev 406677)
@@ -0,0 +1,55 @@
+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