diff options
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/38_hppa.patch | 17 | ||||
-rw-r--r-- | debian/patches/38_hurd.patch | 59 | ||||
-rw-r--r-- | debian/patches/80_security_tools.patch | 26 | ||||
-rw-r--r-- | debian/patches/series | 3 |
4 files changed, 105 insertions, 0 deletions
diff --git a/debian/patches/38_hppa.patch b/debian/patches/38_hppa.patch new file mode 100644 index 0000000..99c9970 --- /dev/null +++ b/debian/patches/38_hppa.patch @@ -0,0 +1,17 @@ +Description: fix double definition of BYTE_ORDER on hppa +Author: Helge Deller <deller@gmx.de> +Bug-Debian: https://bugs.debian.org/808990 + +Index: nss/nss/lib/dbm/include/mcom_db.h +=================================================================== +--- nss.orig/nss/lib/dbm/include/mcom_db.h ++++ nss/nss/lib/dbm/include/mcom_db.h +@@ -110,7 +110,7 @@ typedef PRUint32 uint32; + #endif /* !BYTE_ORDER */ + #endif /* __sun */ + +-#if defined(__hpux) || defined(__hppa) ++#if defined(__hpux) + #define BYTE_ORDER BIG_ENDIAN + #define BIG_ENDIAN 4321 + #define LITTLE_ENDIAN 1234 /* LSB first: i386, vax, all NT risc */ diff --git a/debian/patches/38_hurd.patch b/debian/patches/38_hurd.patch new file mode 100644 index 0000000..91b5442 --- /dev/null +++ b/debian/patches/38_hurd.patch @@ -0,0 +1,59 @@ +## 38_hurd.patch by <glandium@debian.org> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix FTBFS on Hurd because of MAXPATHLEN + +Index: nss/nss/cmd/shlibsign/shlibsign.c +=================================================================== +--- nss.orig/nss/cmd/shlibsign/shlibsign.c ++++ nss/nss/cmd/shlibsign/shlibsign.c +@@ -725,7 +725,6 @@ main(int argc, char **argv) + #ifdef USES_LINKS + int ret; + struct stat stat_buf; +- char link_buf[MAXPATHLEN + 1]; + char *link_file = NULL; + #endif + +@@ -1068,10 +1067,22 @@ main(int argc, char **argv) + } + if (S_ISLNK(stat_buf.st_mode)) { + char *dirpath, *dirend; +- ret = readlink(input_file, link_buf, sizeof(link_buf) - 1); +- if (ret < 0) { +- perror(input_file); +- goto cleanup; ++ char *link_buf = NULL; ++ size_t size = 64; ++ while (1) { ++ link_buf = realloc(link_buf, size); ++ if (!link_buf) { ++ perror(input_file); ++ goto cleanup; ++ } ++ ret = readlink(input_file, link_buf, size - 1); ++ if (ret < 0) { ++ perror(input_file); ++ goto cleanup; ++ } ++ if (ret < size - 1) ++ break; ++ size *= 2; + } + link_buf[ret] = 0; + link_file = mkoutput(input_file); +Index: nss/nss/lib/freebl/unix_rand.c +=================================================================== +--- nss.orig/nss/lib/freebl/unix_rand.c ++++ nss/nss/lib/freebl/unix_rand.c +@@ -843,6 +843,10 @@ RNG_FileForRNG(const char *fileName) + #define _POSIX_PTHREAD_SEMANTICS + #include <dirent.h> + ++#ifndef PATH_MAX ++#define PATH_MAX 1024 ++#endif ++ + PRBool + ReadFileOK(char *dir, char *file) + { diff --git a/debian/patches/80_security_tools.patch b/debian/patches/80_security_tools.patch new file mode 100644 index 0000000..50f994f --- /dev/null +++ b/debian/patches/80_security_tools.patch @@ -0,0 +1,26 @@ +## 80_security_tools.patch by Mike Hommey <glandium@debian.org> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Enable building of some NSS tools. +## DP: Disable rpath. + +Index: nss/nss/cmd/platlibs.mk +=================================================================== +--- nss.orig/nss/cmd/platlibs.mk ++++ nss/nss/cmd/platlibs.mk +@@ -8,6 +8,7 @@ ifeq ($(BUILD_SUN_PKG), 1) + # set RPATH-type linker instructions here so they can be used in the shared + # version and in the mixed (static nss libs/shared NSPR libs) version. + ++ifdef ENABLE_RPATH + ifeq ($(OS_ARCH), SunOS) + ifeq ($(USE_64), 1) + EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1/64:/usr/lib/mps/64' +@@ -31,6 +32,7 @@ DBMLIB = $(NULL) + else + DBMLIB = $(DIST)/lib/$(LIB_PREFIX)dbm.$(LIB_SUFFIX) + endif ++endif + + ifeq ($(NSS_BUILD_UTIL_ONLY),1) + SECTOOL_LIB = $(NULL) diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..9afecb0 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,3 @@ +38_hurd.patch +80_security_tools.patch +38_hppa.patch |