nss: drop now-unused patches and conditions
This commit is contained in:
parent
37b323d6fd
commit
bb53634671
@ -1,76 +0,0 @@
|
||||
diff --git nss/cmd/shlibsign/shlibsign.c nss/cmd/shlibsign/shlibsign.c
|
||||
index ad8f3b84e..74676d039 100644
|
||||
--- nss/cmd/shlibsign/shlibsign.c
|
||||
+++ nss/cmd/shlibsign/shlibsign.c
|
||||
@@ -875,6 +875,8 @@ main(int argc, char **argv)
|
||||
goto cleanup;
|
||||
}
|
||||
lib = PR_LoadLibrary(libname);
|
||||
+ if (!lib)
|
||||
+ lib = PR_LoadLibrary(NIX_NSS_LIBDIR"libsoftokn3.so");
|
||||
assert(lib != NULL);
|
||||
if (!lib) {
|
||||
PR_fprintf(PR_STDERR, "loading softokn3 failed");
|
||||
diff --git nss/lib/pk11wrap/pk11load.c nss/lib/pk11wrap/pk11load.c
|
||||
index 119c8c512..720d39ccc 100644
|
||||
--- nss/lib/pk11wrap/pk11load.c
|
||||
+++ nss/lib/pk11wrap/pk11load.c
|
||||
@@ -486,6 +486,15 @@ secmod_LoadPKCS11Module(SECMODModule *mod, SECMODModule **oldModule)
|
||||
#else
|
||||
library = PR_LoadLibrary(mod->dllName);
|
||||
#endif // defined(_WIN32)
|
||||
+#ifndef NSS_STATIC_SOFTOKEN
|
||||
+ if ((library == NULL) &&
|
||||
+ !rindex(mod->dllName, PR_GetDirectorySeparator())) {
|
||||
+ library = PORT_LoadLibraryFromOrigin(my_shlib_name,
|
||||
+ (PRFuncPtr) &softoken_LoadDSO,
|
||||
+ mod->dllName);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
mod->library = (void *)library;
|
||||
|
||||
if (library == NULL) {
|
||||
diff --git nss/lib/util/secload.c nss/lib/util/secload.c
|
||||
index 12efd2f75..8b74478f6 100644
|
||||
--- nss/lib/util/secload.c
|
||||
+++ nss/lib/util/secload.c
|
||||
@@ -70,9 +70,14 @@ loader_LoadLibInReferenceDir(const char* referencePath, const char* name)
|
||||
|
||||
/* Remove the trailing filename from referencePath and add the new one */
|
||||
c = strrchr(referencePath, PR_GetDirectorySeparator());
|
||||
+ if (!c) { /* referencePath doesn't contain a / means that dladdr gave us argv[0]
|
||||
+ * and program was called from $PATH. Hack to get libs from NIX_NSS_LIBDIR */
|
||||
+ referencePath = NIX_NSS_LIBDIR;
|
||||
+ c = (char*) &referencePath[sizeof(NIX_NSS_LIBDIR) - 1]; /* last / */
|
||||
+ }
|
||||
if (c) {
|
||||
size_t referencePathSize = 1 + c - referencePath;
|
||||
- fullName = (char*)PORT_Alloc(strlen(name) + referencePathSize + 1);
|
||||
+ fullName = (char*) PORT_Alloc(strlen(name) + referencePathSize + 5);
|
||||
if (fullName) {
|
||||
memcpy(fullName, referencePath, referencePathSize);
|
||||
strcpy(fullName + referencePathSize, name);
|
||||
@@ -82,6 +87,11 @@ loader_LoadLibInReferenceDir(const char* referencePath, const char* name)
|
||||
#endif
|
||||
libSpec.type = PR_LibSpec_Pathname;
|
||||
libSpec.value.pathname = fullName;
|
||||
+ if ((referencePathSize >= 4) &&
|
||||
+ (strncmp(fullName + referencePathSize - 4, "bin", 3) == 0)) {
|
||||
+ memcpy(fullName + referencePathSize -4, "lib", 3);
|
||||
+ }
|
||||
+ strcpy(fullName + referencePathSize, name);
|
||||
dlh = PR_LoadLibraryWithFlags(libSpec, PR_LD_NOW | PR_LD_LOCAL
|
||||
#ifdef PR_LD_ALT_SEARCH_PATH
|
||||
/* allow library's dependencies to be found in the same directory
|
||||
@@ -89,6 +99,10 @@ loader_LoadLibInReferenceDir(const char* referencePath, const char* name)
|
||||
| PR_LD_ALT_SEARCH_PATH
|
||||
#endif
|
||||
);
|
||||
+ if (! dlh) {
|
||||
+ strcpy(fullName + referencePathSize, name);
|
||||
+ dlh = PR_LoadLibraryWithFlags(libSpec, PR_LD_NOW | PR_LD_LOCAL);
|
||||
+ }
|
||||
PORT_Free(fullName);
|
||||
}
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1771273
|
||||
https://hg.mozilla.org/projects/nss/raw-rev/21e7aaa1f7d94bca15d997e5b4c2329b32fad21a
|
||||
|
||||
# HG changeset patch
|
||||
# User Sergei Trofimovich <slyich@gmail.com>
|
||||
# Date 1653552519 0
|
||||
# Node ID 21e7aaa1f7d94bca15d997e5b4c2329b32fad21a
|
||||
# Parent ad1046e9eee5f5dc17dac7c9343e2f7f0da44b4e
|
||||
Bug 1771273 - cpputil/databuffer.h: add missing <cstdint> include r=nss-reviewers,mt
|
||||
|
||||
Without the change build fails on this week's gcc-13 snapshot as:
|
||||
|
||||
../../cpputil/databuffer.h:20:20: error: 'uint8_t' does not name a type
|
||||
20 | DataBuffer(const uint8_t* d, size_t l) : data_(nullptr), len_(0) {
|
||||
| ^~~~~~~
|
||||
../../cpputil/databuffer.h:14:1: note: 'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
|
||||
13 | #include <iostream>
|
||||
+++ |+#include <cstdint>
|
||||
14 |
|
||||
|
||||
Differential Revision: https://phabricator.services.mozilla.com/D147404
|
||||
|
||||
diff --git a/cpputil/databuffer.h b/cpputil/databuffer.h
|
||||
--- nss/cpputil/databuffer.h
|
||||
+++ nss/cpputil/databuffer.h
|
||||
@@ -6,16 +6,17 @@
|
||||
|
||||
#ifndef databuffer_h__
|
||||
#define databuffer_h__
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
+#include <cstdint>
|
||||
|
||||
namespace nss_test {
|
||||
|
||||
class DataBuffer {
|
||||
public:
|
||||
DataBuffer() : data_(nullptr), len_(0) {}
|
||||
DataBuffer(const uint8_t* d, size_t l) : data_(nullptr), len_(0) {
|
||||
Assign(d, l);
|
||||
|
@ -41,18 +41,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
patches = [
|
||||
# Based on http://patch-tracker.debian.org/patch/series/dl/nss/2:3.15.4-1/85_security_load.patch
|
||||
(if (lib.versionOlder version "3.84") then
|
||||
./85_security_load_3.77+.patch
|
||||
else
|
||||
./85_security_load_3.85+.patch
|
||||
)
|
||||
./85_security_load_3.85+.patch
|
||||
./fix-cross-compilation.patch
|
||||
] ++ lib.optionals (lib.versionOlder version "3.89") [
|
||||
# Backport gcc-13 build fix:
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1771273
|
||||
# https://hg.mozilla.org/projects/nss/raw-rev/21e7aaa1f7d94bca15d997e5b4c2329b32fad21a
|
||||
./gcc-13-esr.patch
|
||||
] ++ lib.optionals (lib.versionAtLeast version "3.90") [
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1836925
|
||||
# https://phabricator.services.mozilla.com/D180068
|
||||
./remove-c25519-support.patch
|
||||
@ -189,9 +179,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
passthru.updateScript = ./update.sh;
|
||||
|
||||
passthru.tests = lib.optionalAttrs (lib.versionOlder version "3.69") {
|
||||
inherit (nixosTests) firefox-esr-91;
|
||||
} // lib.optionalAttrs (lib.versionAtLeast version "3.69") {
|
||||
passthru.tests = {
|
||||
inherit (nixosTests) firefox firefox-esr-102;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user