From 0f64ae72eae13bff1d1d5d8b50ea6932c172a1ef Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Wed, 31 Aug 2022 17:54:32 +1000 Subject: [PATCH] curl: 7.84.0 -> 7.85.0 https://curl.se/changes.html#7_85_0 --- pkgs/tools/networking/curl/atomic.patch | 30 ------------------- pkgs/tools/networking/curl/default.nix | 9 ++---- .../networking/curl/netrc-regression.patch | 16 ---------- pkgs/tools/networking/curl/sched.patch | 26 ---------------- pkgs/tools/package-management/nix/common.nix | 2 +- pkgs/tools/package-management/nix/default.nix | 3 +- pkgs/top-level/all-packages.nix | 1 - 7 files changed, 5 insertions(+), 82 deletions(-) delete mode 100644 pkgs/tools/networking/curl/atomic.patch delete mode 100644 pkgs/tools/networking/curl/netrc-regression.patch delete mode 100644 pkgs/tools/networking/curl/sched.patch diff --git a/pkgs/tools/networking/curl/atomic.patch b/pkgs/tools/networking/curl/atomic.patch deleted file mode 100644 index 77ee610fc117..000000000000 --- a/pkgs/tools/networking/curl/atomic.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 50efb0822aa0e0ab165158dd0a26e65a2290e6d2 Mon Sep 17 00:00:00 2001 -From: Daniel Stenberg -Date: Tue, 28 Jun 2022 09:00:25 +0200 -Subject: [PATCH] easy_lock: switch to using atomic_int instead of bool - -To work with more compilers without requiring separate libs to -link. Like with gcc-12 for RISC-V on Linux. - -Reported-by: Adam Sampson -Fixes #9055 -Closes #9061 ---- - lib/easy_lock.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/lib/easy_lock.h b/lib/easy_lock.h -index 07c85c5ffdd19..9c11bc50c5f20 100644 ---- a/lib/easy_lock.h -+++ b/lib/easy_lock.h -@@ -40,8 +40,8 @@ - #include - #endif - --#define curl_simple_lock atomic_bool --#define CURL_SIMPLE_LOCK_INIT false -+#define curl_simple_lock atomic_int -+#define CURL_SIMPLE_LOCK_INIT 0 - - static inline void curl_simple_lock_lock(curl_simple_lock *lock) - { diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix index a62b6c8e27bb..07b9e58589a0 100644 --- a/pkgs/tools/networking/curl/default.nix +++ b/pkgs/tools/networking/curl/default.nix @@ -3,7 +3,6 @@ , c-aresSupport ? false, c-ares , gnutlsSupport ? false, gnutls , gsaslSupport ? false, gsasl -, patchNetrcRegression ? false , gssSupport ? with stdenv.hostPlatform; ( !isWindows && # disable gss becuase of: undefined reference to `k5_bcmp' @@ -48,21 +47,19 @@ assert !(opensslSupport && wolfsslSupport); stdenv.mkDerivation (finalAttrs: { pname = "curl"; - version = "7.84.0"; + version = "7.85.0"; src = fetchurl { urls = [ "https://curl.haxx.se/download/curl-${finalAttrs.version}.tar.bz2" "https://github.com/curl/curl/releases/download/curl-${finalAttrs.version}/curl-${finalAttrs.version}.tar.bz2" ]; - sha256 = "sha256-cC+ybnMZCjvXcHGqFG9Qe5gXzE384hjSq4fwDNO8BZ0="; + sha256 = "sha256-IafoNijulhZKwrNv9r+Z1GfHsLYhwffjF9jw2WARU5w="; }; patches = [ ./7.79.1-darwin-no-systemconfiguration.patch - ./sched.patch - ./atomic.patch - ] ++ lib.optional patchNetrcRegression ./netrc-regression.patch; + ]; outputs = [ "bin" "dev" "out" "man" "devdoc" ]; separateDebugInfo = stdenv.isLinux; diff --git a/pkgs/tools/networking/curl/netrc-regression.patch b/pkgs/tools/networking/curl/netrc-regression.patch deleted file mode 100644 index 90ad3e52d1a2..000000000000 --- a/pkgs/tools/networking/curl/netrc-regression.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/lib/url.c b/lib/url.c -index a56e4b0..9f29593 100644 ---- a/lib/url.c -+++ b/lib/url.c -@@ -2971,6 +2971,12 @@ static CURLcode override_login(struct Curl_easy *data, - /* don't update the user name below */ - userp = NULL; - } -+ /* no user was set but a password, set a blank user */ -+ if(userp && !*userp && passwdp && *passwdp) { -+ *userp = strdup(""); -+ if(!*userp) -+ return CURLE_OUT_OF_MEMORY; -+ } - } - #endif diff --git a/pkgs/tools/networking/curl/sched.patch b/pkgs/tools/networking/curl/sched.patch deleted file mode 100644 index 33f08fa42f24..000000000000 --- a/pkgs/tools/networking/curl/sched.patch +++ /dev/null @@ -1,26 +0,0 @@ -From e2e7f54b7bea521fa8373095d0f43261a720cda0 Mon Sep 17 00:00:00 2001 -From: Daniel Stenberg -Date: Mon, 27 Jun 2022 08:46:21 +0200 -Subject: [PATCH] easy_lock.h: include sched.h if available to fix build - -Patched-by: Harry Sintonen - -Closes #9054 ---- - lib/easy_lock.h | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/lib/easy_lock.h b/lib/easy_lock.h -index 819f50ce815b8..1f54289ceb2d3 100644 ---- a/lib/easy_lock.h -+++ b/lib/easy_lock.h -@@ -36,6 +36,9 @@ - - #elif defined (HAVE_ATOMIC) - #include -+#if defined(HAVE_SCHED_YIELD) -+#include -+#endif - - #define curl_simple_lock atomic_bool - #define CURL_SIMPLE_LOCK_INIT false diff --git a/pkgs/tools/package-management/nix/common.nix b/pkgs/tools/package-management/nix/common.nix index c2e9febea64d..b45cae436585 100644 --- a/pkgs/tools/package-management/nix/common.nix +++ b/pkgs/tools/package-management/nix/common.nix @@ -1,7 +1,6 @@ { lib, fetchFromGitHub , version , suffix ? "" -, curl , sha256 ? null , src ? fetchFromGitHub { owner = "NixOS"; repo = "nix"; rev = version; inherit sha256; } , patches ? [ ] @@ -25,6 +24,7 @@ in , bzip2 , callPackage , coreutils +, curl , editline , flex , gnutar diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index b3b2bc7c9b7a..46f92a468815 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -1,7 +1,6 @@ { lib , aws-sdk-cpp , boehmgc -, curl , callPackage , fetchFromGitHub , fetchurl @@ -32,7 +31,7 @@ let common = args: callPackage - (import ./common.nix ({ inherit lib fetchFromGitHub curl; } // args)) + (import ./common.nix ({ inherit lib fetchFromGitHub; } // args)) { inherit Security storeDir stateDir confDir; boehmgc = boehmgc-nix; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bd3030ddc084..54833f032524 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -35606,7 +35606,6 @@ with pkgs; storeDir = config.nix.storeDir or "/nix/store"; stateDir = config.nix.stateDir or "/nix/var"; inherit (darwin.apple_sdk.frameworks) Security; - curl = curl.override { patchNetrcRegression = true; }; }); nix = nixVersions.stable;