]> git.pld-linux.org Git - packages/gyp.git/blobdiff - gyp-fips.patch
- update to current git gyp; add patches from fc (including python 3 support but...
[packages/gyp.git] / gyp-fips.patch
diff --git a/gyp-fips.patch b/gyp-fips.patch
new file mode 100644 (file)
index 0000000..639d1b5
--- /dev/null
@@ -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'
This page took 0.056825 seconds and 4 git commands to generate.