Skip to content

Commit

Permalink
nss: 3.27.2 -> 3.28.1
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed Jan 24, 2017
1 parent 25d86bd commit 2bf0f84
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 280 deletions.
64 changes: 32 additions & 32 deletions pkgs/development/libraries/nss/85_security_load.patch
@@ -1,45 +1,45 @@
diff -ru -x '*~' nss-3.27.1-orig/nss/cmd/shlibsign/shlibsign.c nss-3.27.1/nss/cmd/shlibsign/shlibsign.c
--- nss-3.27.1-orig/nss/cmd/shlibsign/shlibsign.c 2016-10-03 16:55:58.000000000 +0200
+++ nss-3.27.1/nss/cmd/shlibsign/shlibsign.c 2016-11-15 16:28:07.308117900 +0100
@@ -871,6 +871,8 @@
libname = PR_GetLibraryName(NULL, "softokn3");
assert(libname != NULL);
diff -ru -x '*~' -x '*.orig' -x '*.rej' nss/cmd/shlibsign/shlibsign.c nss/cmd/shlibsign/shlibsign.c
--- nss/cmd/shlibsign/shlibsign.c 2017-01-04 15:24:24.000000000 +0100
+++ nss/cmd/shlibsign/shlibsign.c 2017-01-24 14:43:31.030420852 +0100
@@ -875,6 +875,8 @@
goto cleanup;
}
lib = PR_LoadLibrary(libname);
+ if (!lib)
+ lib = PR_LoadLibrary(NIX_NSS_LIBDIR"libsoftokn3.so");
assert(lib != NULL);
PR_FreeLibraryName(libname);

diff -ru -x '*~' nss-3.27.1-orig/nss/coreconf/config.mk nss-3.27.1/nss/coreconf/config.mk
--- nss-3.27.1-orig/nss/coreconf/config.mk 2016-10-03 16:55:58.000000000 +0200
+++ nss-3.27.1/nss/coreconf/config.mk 2016-11-15 16:28:07.308117900 +0100
@@ -217,3 +217,6 @@
ifdef NSS_NO_PKCS11_BYPASS
DEFINES += -DNO_PKCS11_BYPASS
endif
if (!lib) {
PR_fprintf(PR_STDERR, "loading softokn3 failed");
diff -ru -x '*~' -x '*.orig' -x '*.rej' nss/coreconf/config.mk nss/coreconf/config.mk
--- nss/coreconf/config.mk 2017-01-04 15:24:24.000000000 +0100
+++ nss/coreconf/config.mk 2017-01-24 14:43:47.989432372 +0100
@@ -208,3 +208,6 @@
# exported symbols, which causes problem when NSS is built as part of Mozilla.
# So we add a NSS_SSL_ENABLE_ZLIB variable to allow Mozilla to turn this off.
NSS_SSL_ENABLE_ZLIB = 1
+
+# Nix specific stuff.
+DEFINES += -DNIX_NSS_LIBDIR=\"$(out)/lib/\"
diff -ru -x '*~' nss-3.27.1-orig/nss/lib/pk11wrap/pk11load.c nss-3.27.1/nss/lib/pk11wrap/pk11load.c
--- nss-3.27.1-orig/nss/lib/pk11wrap/pk11load.c 2016-10-03 16:55:58.000000000 +0200
+++ nss-3.27.1/nss/lib/pk11wrap/pk11load.c 2016-11-15 16:28:07.308117900 +0100
@@ -429,6 +429,13 @@
* unload the library if anything goes wrong from here on out...
*/
library = PR_LoadLibrary(mod->dllName);
+ if ((library == NULL) &&
+ !rindex(mod->dllName, PR_GetDirectorySeparator())) {
diff -ru -x '*~' -x '*.orig' -x '*.rej' nss/lib/pk11wrap/pk11load.c nss/lib/pk11wrap/pk11load.c
--- nss/lib/pk11wrap/pk11load.c 2017-01-04 15:24:24.000000000 +0100
+++ nss/lib/pk11wrap/pk11load.c 2017-01-24 14:45:06.883485652 +0100
@@ -440,6 +440,13 @@
* unload the library if anything goes wrong from here on out...
*/
library = PR_LoadLibrary(mod->dllName);
+ if ((library == NULL) &&
+ !rindex(mod->dllName, PR_GetDirectorySeparator())) {
+ library = PORT_LoadLibraryFromOrigin(my_shlib_name,
+ (PRFuncPtr) &softoken_LoadDSO,
+ mod->dllName);
+ }
+ (PRFuncPtr) &softoken_LoadDSO,
+ mod->dllName);
+ }
+
mod->library = (void *)library;
mod->library = (void *)library;

if (library == NULL) {
diff -ru -x '*~' nss-3.27.1-orig/nss/lib/util/secload.c nss-3.27.1/nss/lib/util/secload.c
--- nss-3.27.1-orig/nss/lib/util/secload.c 2016-10-03 16:55:58.000000000 +0200
+++ nss-3.27.1/nss/lib/util/secload.c 2016-11-15 16:29:50.482259746 +0100
if (library == NULL) {
diff -ru -x '*~' -x '*.orig' -x '*.rej' nss/lib/util/secload.c nss/lib/util/secload.c
--- nss/lib/util/secload.c 2017-01-04 15:24:24.000000000 +0100
+++ nss/lib/util/secload.c 2017-01-24 14:43:31.030420852 +0100
@@ -70,9 +70,14 @@

/* Remove the trailing filename from referencePath and add the new one */
Expand Down
16 changes: 11 additions & 5 deletions pkgs/development/libraries/nss/default.nix
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, nspr, perl, zlib, sqlite }:
{ stdenv, fetchurl, fetchpatch, nspr, perl, zlib, sqlite }:

let

Expand All @@ -9,11 +9,11 @@ let

in stdenv.mkDerivation rec {
name = "nss-${version}";
version = "3.27.2";
version = "3.28.1";

src = fetchurl {
url = "mirror://mozilla/security/nss/releases/NSS_3_27_2_RTM/src/${name}.tar.gz";
sha256 = "dc8ac8524469d0230274fd13a53fdcd74efe4aa67205dde1a4a92be87dc28524";
url = "mirror://mozilla/security/nss/releases/NSS_3_28_1_RTM/src/${name}.tar.gz";
sha256 = "58cc0c05c0ed9523e6d820bea74f513538f48c87aac931876e3d3775de1a82ad";
};

buildInputs = [ nspr perl zlib sqlite ];
Expand All @@ -23,11 +23,17 @@ in stdenv.mkDerivation rec {
'';

patches =
[ ./nss-3.21-gentoo-fixups.patch
[ # FIXME: what is this patch for? Do we still need it?

This comment has been minimized.

Copy link
@aszlig

aszlig Jan 25, 2017

Member

@edolstra: The patch seems to be only to get pkgconfig files, introduced in 06c543b.

(fetchpatch {
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-libs/nss/files/nss-3.28-gentoo-fixups.patch";
sha256 = "0z58axd1n7vq4kdp5mrb3dsg6di39a1g40s3shl6n2dzs14c1y2q";

This comment has been minimized.

Copy link
@aszlig

aszlig Jan 25, 2017

Member

The sha256 provided here is not valid anymore.

This comment has been minimized.

Copy link
@aszlig

aszlig Jan 25, 2017

Member

Hm, never mind, this might have been a transient error from my Hydra. However, the URL provided here is not stable.

This comment has been minimized.

Copy link
@aszlig

aszlig Jan 25, 2017

Member

@edolstra: Stable URL and comment provided in ca7923f.

This comment has been minimized.

Copy link
@vcunat

vcunat Jan 25, 2017

Member

The original fetch was bad, but it was fixed fast in f8e39ec, as discussed below.

})
# Based on http://patch-tracker.debian.org/patch/series/dl/nss/2:3.15.4-1/85_security_load.patch
./85_security_load.patch
];

patchFlags = "-p0";

postPatch = ''
# Fix up the patch from Gentoo.
sed -i \
Expand Down
243 changes: 0 additions & 243 deletions pkgs/development/libraries/nss/nss-3.21-gentoo-fixups.patch

This file was deleted.

4 comments on commit 2bf0f84

@jpierre03
Copy link
Contributor

@jpierre03 jpierre03 commented on 2bf0f84 Jan 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@edolstra

make flags: SHELL=/nix/store/cg0gxn11n6sadfrw3p7l8rh053gn3f0z-bash-4.4-p5/bin/bash
no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/nix/store/mafk2xkm2aw0pnbmxx70zkh1m2ch7fm6-gcc-wrapper-5.4.0/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... g++ is GNU compiler
no
  0  193M    0   998    0     0    674      0 83:27:50  0:00:01 83:27:49   993g++ has setenv
GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: finding other utilities
checking for m4... m4
checking for doxygen... no
configure: WARNING: Doxygen not found - documentation will not be built
checking for dot... no
configure: WARNING: dot not found - will use simple charts in documentation
checking for special C compiler options needed for large files... no
100  5310  100  5310    0     0   3511      0  0:00:01  0:00:01 --:--:--  7185
output path ‘/nix/store/71i6sbxr1mffg7lv8jv3zz2w1gaq33ci-nss-3.28-gentoo-fixups.patch’ has sha256 hash ‘0glxvjb4gnhqf8rzsynwpz72dc9ghffxg3pdm5cyx2al23ywhxph’ when ‘0z58axd1n7vq4kdp5mrb3dsg6di39a1g40s3shl6n2dzs14c1y2q’ was expected
cannot build derivation ‘/nix/store/p30k4cfsdp793p37qkdxpcxhf485b6l6-nss-3.28.1.drv’: 1 dependencies couldn't be built

@vcunat
Copy link
Member

@vcunat vcunat commented on 2bf0f84 Jan 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved in f8e39ec.

@jpierre03
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@vcunat
Copy link
Member

@vcunat vcunat commented on 2bf0f84 Jan 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise :-)

Please sign in to comment.