Merge branch 'staging-next'

Security fixes for a few packages are included.
This commit is contained in:
Vladimír Čunát
2018-08-21 15:36:02 +02:00
196 changed files with 9556 additions and 16487 deletions

View File

@@ -1,79 +0,0 @@
diff --git a/tools/gyp/pylib/gyp/xcode_emulation.py b/tools/gyp/pylib/gyp/xcode_emulation.py
index a173ff0..1fc821a 100644
--- a/tools/gyp/pylib/gyp/xcode_emulation.py
+++ b/tools/gyp/pylib/gyp/xcode_emulation.py
@@ -507,9 +507,12 @@ class XcodeSettings(object):
def _XcodePlatformPath(self, configname=None):
sdk_root = self._SdkRoot(configname)
if sdk_root not in XcodeSettings._platform_path_cache:
- platform_path = self._GetSdkVersionInfoItem(sdk_root,
+ try:
+ platform_path = self._GetSdkVersionInfoItem(sdk_root,
'--show-sdk-platform-path')
- XcodeSettings._platform_path_cache[sdk_root] = platform_path
+ XcodeSettings._platform_path_cache[sdk_root] = platform_path
+ except:
+ XcodeSettings._platform_path_cache[sdk_root] = None
return XcodeSettings._platform_path_cache[sdk_root]
def _SdkPath(self, configname=None):
@@ -520,10 +523,13 @@ class XcodeSettings(object):
def _XcodeSdkPath(self, sdk_root):
if sdk_root not in XcodeSettings._sdk_path_cache:
- sdk_path = self._GetSdkVersionInfoItem(sdk_root, '--show-sdk-path')
- XcodeSettings._sdk_path_cache[sdk_root] = sdk_path
- if sdk_root:
- XcodeSettings._sdk_root_cache[sdk_path] = sdk_root
+ try:
+ sdk_path = self._GetSdkVersionInfoItem(sdk_root, '--show-sdk-path')
+ XcodeSettings._sdk_path_cache[sdk_root] = sdk_path
+ if sdk_root:
+ XcodeSettings._sdk_root_cache[sdk_path] = sdk_root
+ except:
+ XcodeSettings._sdk_path_cache[sdk_root] = None
return XcodeSettings._sdk_path_cache[sdk_root]
def _AppendPlatformVersionMinFlags(self, lst):
@@ -653,10 +659,11 @@ class XcodeSettings(object):
framework_root = sdk_root
else:
framework_root = ''
- config = self.spec['configurations'][self.configname]
- framework_dirs = config.get('mac_framework_dirs', [])
- for directory in framework_dirs:
- cflags.append('-F' + directory.replace('$(SDKROOT)', framework_root))
+ if 'SDKROOT' in self._Settings():
+ config = self.spec['configurations'][self.configname]
+ framework_dirs = config.get('mac_framework_dirs', [])
+ for directory in framework_dirs:
+ cflags.append('-F' + directory.replace('$(SDKROOT)', framework_root))
self.configname = None
return cflags
@@ -908,10 +915,11 @@ class XcodeSettings(object):
sdk_root = self._SdkPath()
if not sdk_root:
sdk_root = ''
- config = self.spec['configurations'][self.configname]
- framework_dirs = config.get('mac_framework_dirs', [])
- for directory in framework_dirs:
- ldflags.append('-F' + directory.replace('$(SDKROOT)', sdk_root))
+ if 'SDKROOT' in self._Settings():
+ config = self.spec['configurations'][self.configname]
+ framework_dirs = config.get('mac_framework_dirs', [])
+ for directory in framework_dirs:
+ ldflags.append('-F' + directory.replace('$(SDKROOT)', sdk_root))
platform_root = self._XcodePlatformPath(configname)
if sdk_root and platform_root and self._IsXCTest():
@@ -1683,6 +1691,9 @@ def _NormalizeEnvVarReferences(str):
"""Takes a string containing variable references in the form ${FOO}, $(FOO),
or $FOO, and returns a string with all variable references in the form ${FOO}.
"""
+ if str is None:
+ return ''
+
# $FOO -> ${FOO}
str = re.sub(r'\$([a-zA-Z_][a-zA-Z0-9_]*)', r'${\1}', str)

View File

@@ -1,57 +0,0 @@
diff --git a/tools/gyp/pylib/gyp/xcode_emulation.py b/tools/gyp/pylib/gyp/xcode_emulation.py
index 407ead0..8bf64e7 100644
--- a/tools/gyp/pylib/gyp/xcode_emulation.py
+++ b/tools/gyp/pylib/gyp/xcode_emulation.py
@@ -446,10 +446,16 @@ class XcodeSettings(object):
def _XcodeSdkPath(self, sdk_root):
if sdk_root not in XcodeSettings._sdk_path_cache:
- sdk_path = self._GetSdkVersionInfoItem(sdk_root, 'Path')
- XcodeSettings._sdk_path_cache[sdk_root] = sdk_path
- if sdk_root:
- XcodeSettings._sdk_root_cache[sdk_path] = sdk_root
+ try:
+ sdk_path = self._GetSdkVersionInfoItem(sdk_root, 'Path')
+ XcodeSettings._sdk_path_cache[sdk_root] = sdk_path
+ if sdk_root:
+ XcodeSettings._sdk_root_cache[sdk_path] = sdk_root
+ except:
+ # if this fails it's because xcodebuild failed, which means
+ # the user is probably on a CLT-only system, where there
+ # is no valid SDK root
+ XcodeSettings._sdk_path_cache[sdk_root] = None
return XcodeSettings._sdk_path_cache[sdk_root]
def _AppendPlatformVersionMinFlags(self, lst):
@@ -572,10 +578,11 @@ class XcodeSettings(object):
framework_root = sdk_root
else:
framework_root = ''
- config = self.spec['configurations'][self.configname]
- framework_dirs = config.get('mac_framework_dirs', [])
- for directory in framework_dirs:
- cflags.append('-F' + directory.replace('$(SDKROOT)', framework_root))
+ if 'SDKROOT' in self._Settings():
+ config = self.spec['configurations'][self.configname]
+ framework_dirs = config.get('mac_framework_dirs', [])
+ for directory in framework_dirs:
+ cflags.append('-F' + directory.replace('$(SDKROOT)', framework_root))
self.configname = None
return cflags
@@ -826,10 +833,11 @@ class XcodeSettings(object):
sdk_root = self._SdkPath()
if not sdk_root:
sdk_root = ''
- config = self.spec['configurations'][self.configname]
- framework_dirs = config.get('mac_framework_dirs', [])
- for directory in framework_dirs:
- ldflags.append('-F' + directory.replace('$(SDKROOT)', sdk_root))
+ if 'SDKROOT' in self._Settings():
+ config = self.spec['configurations'][self.configname]
+ framework_dirs = config.get('mac_framework_dirs', [])
+ for directory in framework_dirs:
+ ldflags.append('-F' + directory.replace('$(SDKROOT)', sdk_root))
is_extension = self._IsIosAppExtension() or self._IsIosWatchKitExtension()
if sdk_root and is_extension:

View File

@@ -1,13 +0,0 @@
diff -Naur node-v8.9.4/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py node-v8.9.4-new/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
--- node-v8.9.4/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py 2018-01-03 03:34:44.000000000 +0100
+++ node-v8.9.4-new/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py 2018-03-12 11:15:37.972537585 +0100
@@ -1251,7 +1251,8 @@
if XCODE_VERSION_CACHE:
return XCODE_VERSION_CACHE
try:
- version_list = GetStdout(['xcodebuild', '-version']).splitlines()
+ #version_list = GetStdout(['xcodebuild', '-version']).splitlines()
+ version_list = ['Xcode 9.2', 'Build version 9C40b']
# In some circumstances xcodebuild exits 0 but doesn't return
# the right results; for example, a user on 10.7 or 10.8 with
# a bogus path set via xcode-select

View File

@@ -3,19 +3,18 @@
# Updater dependencies
, writeScript, coreutils, gnugrep, jq, curl, common-updater-scripts, nix
, gnupg
, darwin ? null
, darwin, xcbuild
, procps
}:
with stdenv.lib;
{ enableNpm ? true, version, sha256, patches } @args:
{ enableNpm ? true, version, sha256, patches ? [] } @args:
let
inherit (darwin.apple_sdk.frameworks) CoreServices ApplicationServices;
baseName = if enableNpm then "nodejs" else "nodejs-slim";
sharedLibDeps = { inherit openssl zlib libuv; } // (optionalAttrs (!stdenv.isDarwin) { inherit http-parser; });
@@ -48,9 +47,10 @@ in
};
buildInputs = optionals stdenv.isDarwin [ CoreServices ApplicationServices ]
++ [ python2 which zlib libuv openssl ]
++ optionals stdenv.isLinux [ utillinux http-parser ]
++ optionals stdenv.isDarwin [ pkgconfig darwin.cctools ];
++ [ python2 zlib libuv openssl http-parser ];
nativeBuildInputs = [ which utillinux ]
++ optionals stdenv.isDarwin [ pkgconfig xcbuild ];
configureFlags = sharedConfigureFlags ++ [ "--without-dtrace" ] ++ extraConfigFlags;
@@ -66,16 +66,27 @@ in
inherit patches;
preBuild = optionalString stdenv.isDarwin ''
sed -i -e "s|tr1/type_traits|type_traits|g" \
-e "s|std::tr1|std|" src/util.h
'';
prePatch = ''
postPatch = ''
patchShebangs .
sed -i 's/raise.*No Xcode or CLT version detected.*/version = "7.0.0"/' tools/gyp/pylib/gyp/xcode_emulation.py
# fix tests
for a in test/parallel/test-child-process-env.js \
test/parallel/test-child-process-exec-env.js \
test/parallel/test-child-process-default-options.js \
test/fixtures/syntax/good_syntax_shebang.js \
test/fixtures/syntax/bad_syntax_shebang.js ; do
substituteInPlace $a \
--replace "/usr/bin/env" "${coreutils}/bin/env"
done
'' + optionalString stdenv.isDarwin ''
sed -i -e "s|tr1/type_traits|type_traits|g" \
-e "s|std::tr1|std|" src/util.h
'';
checkInputs = [ procps ];
doCheck = false; # fails 4 out of 1453 tests
postInstall = ''
paxmark m $out/bin/node
PATH=$out/bin:$PATH patchShebangs $out

View File

@@ -7,5 +7,4 @@ in
inherit enableNpm;
version = "10.7.0";
sha256 = "0qp93ddbnvadimj11wnznwhkq8vq1f7q259iq8siy5b7r936kvil";
patches = lib.optionals stdenv.isDarwin [ ./no-xcode-v7.patch ./no-xcodebuild.patch ];
}

View File

@@ -7,5 +7,4 @@ in
inherit enableNpm;
version = "6.14.3";
sha256 = "1jbrfk875aimm65wni059rrydmhp4z0hrxskq3ci6jvykxr8gwg3";
patches = lib.optionals stdenv.isDarwin [ ./no-xcode.patch ./no-xcodebuild.patch ];
}

View File

@@ -7,5 +7,4 @@ in
inherit enableNpm;
version = "8.11.4";
sha256 = "02d6a9sq81mbvap6h1ckwrang6wrxbkg0xxzn06wn2vbv7k7vkpv";
patches = lib.optionals stdenv.isDarwin [ ./no-xcode-v7.patch ./no-xcodebuild.patch ];
}