From 075f623399e1d5e928e64fb5e36d2d239d90de29 Mon Sep 17 00:00:00 2001 From: Daniel Peebles Date: Mon, 31 Jul 2017 13:52:19 -0400 Subject: [PATCH] Revert "Fix Darwin stdenv to work on 10.13 (backport to 17.03)" --- pkgs/applications/editors/nano/default.nix | 2 -- .../libraries/libunistring/default.nix | 2 +- pkgs/development/tools/misc/gnum4/default.nix | 2 +- pkgs/development/tools/parsing/bison/3.x.nix | 2 -- .../Libsystem/reexported_libraries | 2 +- .../Libsystem/system_kernel_symbols | 2 ++ pkgs/stdenv/darwin/darwin-secure-format.patch | 15 ------------ pkgs/stdenv/darwin/default.nix | 23 ++++++------------- pkgs/tools/compression/gzip/default.nix | 2 -- pkgs/tools/misc/coreutils/default.nix | 3 +-- 10 files changed, 13 insertions(+), 42 deletions(-) delete mode 100644 pkgs/stdenv/darwin/darwin-secure-format.patch diff --git a/pkgs/applications/editors/nano/default.nix b/pkgs/applications/editors/nano/default.nix index fd52e9a6dfef..24f186fc8b5f 100644 --- a/pkgs/applications/editors/nano/default.nix +++ b/pkgs/applications/editors/nano/default.nix @@ -27,8 +27,6 @@ in stdenv.mkDerivation rec { sha256 = "1r37gqx7hppqbgsbclchiis8wzzpb9srm3q3dlvlii2gpkk28kd6"; }; - patches = stdenv.lib.optional stdenv.isDarwin stdenv.secure-format-patch; - nativeBuildInputs = [ texinfo ] ++ optional enableNls gettext; buildInputs = [ ncurses ]; diff --git a/pkgs/development/libraries/libunistring/default.nix b/pkgs/development/libraries/libunistring/default.nix index 20874f6f6a1d..662767b6678f 100644 --- a/pkgs/development/libraries/libunistring/default.nix +++ b/pkgs/development/libraries/libunistring/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "1ra1baz2187kbw9im47g6kqb5mx9plq703mkjxaval8rxv5q3q4w"; }; - patches = stdenv.lib.optionals stdenv.isDarwin [ ./clang.patch stdenv.secure-format-patch ]; + patches = stdenv.lib.optional stdenv.isDarwin [ ./clang.patch ]; outputs = [ "out" "dev" "info" "doc" ]; diff --git a/pkgs/development/tools/misc/gnum4/default.nix b/pkgs/development/tools/misc/gnum4/default.nix index 6ba8a0aa46a8..fbbd6cc4d6f8 100644 --- a/pkgs/development/tools/misc/gnum4/default.nix +++ b/pkgs/development/tools/misc/gnum4/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { configureFlags = "--with-syscmd-shell=${stdenv.shell}"; # Upstream is aware of it; it may be in the next release. - patches = [ ./s_isdir.patch ] ++ stdenv.lib.optional stdenv.isDarwin stdenv.secure-format-patch; + patches = [ ./s_isdir.patch ]; # FIXME needs gcc 4.9 in bootstrap tools hardeningDisable = [ "stackprotector" ]; diff --git a/pkgs/development/tools/parsing/bison/3.x.nix b/pkgs/development/tools/parsing/bison/3.x.nix index 9181691527ee..ebbee4e693dc 100644 --- a/pkgs/development/tools/parsing/bison/3.x.nix +++ b/pkgs/development/tools/parsing/bison/3.x.nix @@ -8,8 +8,6 @@ stdenv.mkDerivation rec { sha256 = "b67fd2daae7a64b5ba862c66c07c1addb9e6b1b05c5f2049392cfd8a2172952e"; }; - patches = stdenv.lib.optional stdenv.isDarwin stdenv.secure-format-patch; - nativeBuildInputs = [ m4 perl ] ++ stdenv.lib.optional stdenv.isSunOS help2man; propagatedBuildInputs = [ m4 ]; diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/reexported_libraries b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/reexported_libraries index 494426eba6dc..00aaba1d4982 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/reexported_libraries +++ b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/reexported_libraries @@ -19,7 +19,7 @@ /usr/lib/system/libsystem_configuration.dylib /usr/lib/system/libsystem_coreservices.dylib -# /usr/lib/system/libsystem_coretls.dylib # Removed in 10.13 +/usr/lib/system/libsystem_coretls.dylib /usr/lib/system/libsystem_dnssd.dylib /usr/lib/system/libsystem_info.dylib diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_kernel_symbols b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_kernel_symbols index ed76787a9008..ff9073157a58 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_kernel_symbols +++ b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_kernel_symbols @@ -376,6 +376,7 @@ _fsync _fsync$NOCANCEL _ftruncate _futimes +_get_dp_control_port _getattrlist _getattrlistat _getattrlistbulk @@ -837,6 +838,7 @@ _sendmsg$NOCANCEL _sendmsg_x _sendto _sendto$NOCANCEL +_set_dp_control_port _setattrlist _setaudit _setaudit_addr diff --git a/pkgs/stdenv/darwin/darwin-secure-format.patch b/pkgs/stdenv/darwin/darwin-secure-format.patch deleted file mode 100644 index b14d8be6ef16..000000000000 --- a/pkgs/stdenv/darwin/darwin-secure-format.patch +++ /dev/null @@ -1,15 +0,0 @@ -With format string strictness, High Sierra also enforces that %n isn't used -in dynamic format strings, but we should just disable its use on darwin in -general. - ---- a/lib/vasnprintf.c 2017-06-22 15:19:15.000000000 -0700 -+++ b/lib/vasnprintf.c 2017-06-22 15:20:20.000000000 -0700 -@@ -4869,7 +4869,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t * - #endif - *fbp = dp->conversion; - #if USE_SNPRINTF --# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) -+# if !defined(__APPLE__) && !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) - fbp[1] = '%'; - fbp[2] = 'n'; - fbp[3] = '\0'; diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index 3d1b6fffa318..e647c81890e1 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -4,15 +4,15 @@ # Allow passing in bootstrap files directly so we can test the stdenv bootstrap process when changing the bootstrap tools , bootstrapFiles ? let fetch = { file, sha256, executable ? true }: import { - url = "http://tarballs.nixos.org/stdenv-darwin/x86_64/10cbca5b30c6cb421ce15139f32ae3a4977292cf/${file}"; + url = "http://tarballs.nixos.org/stdenv-darwin/x86_64/33f59c9d11b8d5014dfd18cc11a425f6393c884a/${file}"; inherit (localSystem) system; inherit sha256 executable; }; in { - sh = fetch { file = "sh"; sha256 = "0s8a9vpzj6vadq4jmf4r8cargwnsf327hdjydxgqsfxb8y1q39w3"; }; - bzip2 = fetch { file = "bzip2"; sha256 = "1jqljpjr8mkiv7g5rl5impqx3all8vn1mxxdwa004pr3h48c1zgg"; }; - mkdir = fetch { file = "mkdir"; sha256 = "17zsjiwnq07i5r85q1hg7f6cnkcgllwy2amz9klaqwjy4vzz4vwh"; }; - cpio = fetch { file = "cpio"; sha256 = "04hrair58dgja6syh442pswiga5an9nl58ls57yknkn2pq51nx9m"; }; - tarball = fetch { file = "bootstrap-tools.cpio.bz2"; sha256 = "103833hrci0vwi1gi978hkp69rncicvpdszn87ffpf1cq0jzpa14"; executable = false; }; + sh = fetch { file = "sh"; sha256 = "1rx4kg6358xdj05z0m139a0zn4f4zfmq4n4vimlmnwyfiyn4x7wk"; }; + bzip2 = fetch { file = "bzip2"; sha256 = "104qnhzk79vkbp2yi0kci6lszgfppvrwk3rgxhry842ly1xz2r7l"; }; + mkdir = fetch { file = "mkdir"; sha256 = "0d91c19xjzmqisncvldv79d7ddzai9l7vcmajhwlwwv74g6da5yl"; }; + cpio = fetch { file = "cpio"; sha256 = "0lw057bmcqls96j0gv1n3mgl66q31mba7i413cbkkaf0rfzz3dxj"; }; + tarball = fetch { file = "bootstrap-tools.cpio.bz2"; sha256 = "13ihbj002pis3fgy1d9c4fi7flca21z9brjsjkklm82h5b4nlwxl"; executable = false; }; } }: @@ -96,13 +96,7 @@ in rec { stdenvSandboxProfile = binShClosure + libSystemProfile; extraSandboxProfile = binShClosure + libSystemProfile; - extraAttrs = { - inherit platform; - parent = last; - - # This is used all over the place so I figured I'd just leave it here for now - secure-format-patch = ./darwin-secure-format.patch; - }; + extraAttrs = { inherit platform; parent = last; }; overrides = self: super: (overrides self super) // { fetchurl = thisStdenv.fetchurlBoot; }; }; @@ -303,9 +297,6 @@ in rec { inherit platform bootstrapTools; libc = pkgs.darwin.Libsystem; shellPackage = pkgs.bash; - - # This is used all over the place so I figured I'd just leave it here for now - secure-format-patch = ./darwin-secure-format.patch; }; allowedRequisites = (with pkgs; [ diff --git a/pkgs/tools/compression/gzip/default.nix b/pkgs/tools/compression/gzip/default.nix index f0b8ab6b4792..5a27d336c291 100644 --- a/pkgs/tools/compression/gzip/default.nix +++ b/pkgs/tools/compression/gzip/default.nix @@ -9,8 +9,6 @@ stdenv.mkDerivation rec { sha256 = "1lxv3p4iyx7833mlihkn5wfwmz4cys5nybwpz3dfawag8kn6f5zz"; }; - patches = stdenv.lib.optional stdenv.isDarwin stdenv.secure-format-patch; - outputs = [ "out" "man" "info" ]; enableParallelBuilding = true; diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix index 0283e0ea2a62..a37f7a167762 100644 --- a/pkgs/tools/misc/coreutils/default.nix +++ b/pkgs/tools/misc/coreutils/default.nix @@ -23,8 +23,7 @@ stdenv.mkDerivation rec { # FIXME needs gcc 4.9 in bootstrap tools hardeningDisable = [ "stackprotector" ]; - patches = optional stdenv.isCygwin ./coreutils-8.23-4.cygwin.patch - ++ optional stdenv.isDarwin stdenv.secure-format-patch; + patches = optional stdenv.isCygwin ./coreutils-8.23-4.cygwin.patch; # The test tends to fail on btrfs and maybe other unusual filesystems. postPatch = optionalString (!stdenv.isDarwin) ''