Prefer in-tree headers over system headers

See https://bugzilla.redhat.com/show_bug.cgi?id=1422046#c6
This commit is contained in:
Daiki Ueno 2017-09-06 14:38:46 +02:00
parent 31a84b766b
commit 7ad6dae11e
2 changed files with 25 additions and 215 deletions

View File

@ -1,211 +1,13 @@
diff -up ./nss/cmd/certcgi/Makefile.iquote ./nss/cmd/certcgi/Makefile diff -up nss/coreconf/location.mk.iquote nss/coreconf/location.mk
--- ./nss/cmd/certcgi/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800 --- nss/coreconf/location.mk.iquote 2017-07-27 16:09:32.000000000 +0200
+++ ./nss/cmd/certcgi/Makefile 2016-03-05 12:04:06.216474144 -0800 +++ nss/coreconf/location.mk 2017-09-06 13:23:14.633611555 +0200
@@ -36,7 +36,8 @@ include $(CORE_DEPTH)/coreconf/rules.mk @@ -75,4 +75,9 @@ ifndef SQLITE_LIB_NAME
# (6) Execute "component" rules. (OPTIONAL) # SQLITE_LIB_NAME = sqlite3
#######################################################################
-
+INCLUDES += -iquote $(DIST)/../public/nss
+INCLUDES += -iquote $(DIST)/../private/nss
#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
diff -up ./nss/cmd/certutil/Makefile.iquote ./nss/cmd/certutil/Makefile
--- ./nss/cmd/certutil/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800
+++ ./nss/cmd/certutil/Makefile 2016-03-05 12:04:06.216474144 -0800
@@ -37,7 +37,8 @@ include $(CORE_DEPTH)/coreconf/rules.mk
# (6) Execute "component" rules. (OPTIONAL) #
#######################################################################
-
+INCLUDES += -iquote $(DIST)/../public/nss
+INCLUDES += -iquote $(DIST)/../private/nss
#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
diff -up ./nss/cmd/lib/Makefile.iquote ./nss/cmd/lib/Makefile
--- ./nss/cmd/lib/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800
+++ ./nss/cmd/lib/Makefile 2016-03-05 12:04:06.216474144 -0800
@@ -38,7 +38,8 @@ include $(CORE_DEPTH)/coreconf/rules.mk
# (6) Execute "component" rules. (OPTIONAL) #
#######################################################################
-
+INCLUDES += -iquote $(DIST)/../private/nss
+INCLUDES += -iquote $(DIST)/../public/nss
#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
diff -up ./nss/cmd/modutil/Makefile.iquote ./nss/cmd/modutil/Makefile
--- ./nss/cmd/modutil/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800
+++ ./nss/cmd/modutil/Makefile 2016-03-05 12:04:06.216474144 -0800
@@ -37,6 +37,7 @@ include $(CORE_DEPTH)/coreconf/rules.mk
# (6) Execute "component" rules. (OPTIONAL) #
#######################################################################
+INCLUDES += -iquote $(DIST)/../public/nss
#######################################################################
diff -up ./nss/cmd/selfserv/Makefile.iquote ./nss/cmd/selfserv/Makefile
--- ./nss/cmd/selfserv/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800
+++ ./nss/cmd/selfserv/Makefile 2016-03-05 12:04:06.216474144 -0800
@@ -35,7 +35,8 @@ include $(CORE_DEPTH)/coreconf/rules.mk
# (6) Execute "component" rules. (OPTIONAL) #
#######################################################################
-
+INCLUDES += -iquote $(DIST)/../public/nss
+INCLUDES += -iquote $(DIST)/../private/nss
#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
diff -up ./nss/cmd/ssltap/Makefile.iquote ./nss/cmd/ssltap/Makefile
--- ./nss/cmd/ssltap/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800
+++ ./nss/cmd/ssltap/Makefile 2016-03-05 12:04:06.216474144 -0800
@@ -39,7 +39,8 @@ include $(CORE_DEPTH)/coreconf/rules.mk
# (6) Execute "component" rules. (OPTIONAL) #
#######################################################################
-
+INCLUDES += -iquote $(DIST)/../private/nss
+INCLUDES += -iquote $(DIST)/../public/nss
#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
diff -up ./nss/cmd/strsclnt/Makefile.iquote ./nss/cmd/strsclnt/Makefile
--- ./nss/cmd/strsclnt/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800
+++ ./nss/cmd/strsclnt/Makefile 2016-03-05 12:04:06.217474124 -0800
@@ -36,7 +36,8 @@ include $(CORE_DEPTH)/coreconf/rules.mk
# (6) Execute "component" rules. (OPTIONAL) #
#######################################################################
-
+INCLUDES += -iquote $(DIST)/../public/nss
+INCLUDES += -iquote $(DIST)/../private/nss
#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
diff -up ./nss/cmd/tstclnt/Makefile.iquote ./nss/cmd/tstclnt/Makefile
--- ./nss/cmd/tstclnt/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800
+++ ./nss/cmd/tstclnt/Makefile 2016-03-05 12:04:06.217474124 -0800
@@ -37,6 +37,8 @@ include $(CORE_DEPTH)/coreconf/rules.mk
#######################################################################
#include ../platlibs.mk
+INCLUDES += -iquote $(DIST)/../public/nss
+INCLUDES += -iquote $(DIST)/../private/nss
#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
diff -up ./nss/cmd/vfyserv/Makefile.iquote ./nss/cmd/vfyserv/Makefile
--- ./nss/cmd/vfyserv/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800
+++ ./nss/cmd/vfyserv/Makefile 2016-03-05 12:04:06.217474124 -0800
@@ -37,6 +37,8 @@ include $(CORE_DEPTH)/coreconf/rules.mk
#######################################################################
#include ../platlibs.mk
+INCLUDES += -iquote $(DIST)/../public/nss
+INCLUDES += -iquote $(DIST)/../private/nss
#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
diff -up ./nss/coreconf/location.mk.iquote ./nss/coreconf/location.mk
--- ./nss/coreconf/location.mk.iquote 2016-02-26 12:51:11.000000000 -0800
+++ ./nss/coreconf/location.mk 2016-03-05 12:04:06.217474124 -0800
@@ -45,6 +45,10 @@ endif
ifdef NSS_INCLUDE_DIR
INCLUDES += -I$(NSS_INCLUDE_DIR)
+ ifdef IN_TREE_FREEBL_HEADERS_FIRST
+ INCLUDES += -iquote $(DIST)/../public/nss
+ INCLUDES += -iquote $(DIST)/../private/nss
+ endif
endif endif
ifndef NSS_LIB_DIR +# Prefer in-tree headers over system headers
diff -up ./nss/gtests/pk11_gtest/Makefile.iquote ./nss/gtests/pk11_gtest/Makefile +ifdef IN_TREE_FREEBL_HEADERS_FIRST
--- ./nss/gtests/pk11_gtest/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800 + INCLUDES += -iquote $(DIST)/../public/nss -iquote $(DIST)/../private/nss
+++ ./nss/gtests/pk11_gtest/Makefile 2016-03-05 12:04:06.217474124 -0800 +endif
@@ -37,6 +37,7 @@ include $(CORE_DEPTH)/coreconf/rules.mk +
# (6) Execute "component" rules. (OPTIONAL) # MK_LOCATION = included
#######################################################################
+INCLUDES += -iquote $(DIST)/../public/nss
#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
diff -up ./nss/gtests/ssl_gtest/Makefile.iquote ./nss/gtests/ssl_gtest/Makefile
--- ./nss/gtests/ssl_gtest/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800
+++ ./nss/gtests/ssl_gtest/Makefile 2016-03-05 12:05:17.208082475 -0800
@@ -43,6 +43,8 @@ include $(CORE_DEPTH)/coreconf/rules.mk
# (6) Execute "component" rules. (OPTIONAL) #
#######################################################################
+INCLUDES += -iquote $(DIST)/../public/nss
+INCLUDES += -iquote $(DIST)/../public/nss
#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
diff -up ./nss/lib/certhigh/Makefile.iquote ./nss/lib/certhigh/Makefile
--- ./nss/lib/certhigh/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800
+++ ./nss/lib/certhigh/Makefile 2016-03-05 12:04:06.217474124 -0800
@@ -38,7 +38,7 @@ include $(CORE_DEPTH)/coreconf/rules.mk
# (6) Execute "component" rules. (OPTIONAL) #
#######################################################################
-
+INCLUDES += -iquote $(DIST)/../public/nss
#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
diff -up ./nss/lib/cryptohi/Makefile.iquote ./nss/lib/cryptohi/Makefile
--- ./nss/lib/cryptohi/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800
+++ ./nss/lib/cryptohi/Makefile 2016-03-05 12:04:06.217474124 -0800
@@ -38,7 +38,7 @@ include $(CORE_DEPTH)/coreconf/rules.mk
# (6) Execute "component" rules. (OPTIONAL) #
#######################################################################
-
+INCLUDES += -iquote $(DIST)/../public/nss
#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
diff -up ./nss/lib/nss/Makefile.iquote ./nss/lib/nss/Makefile
--- ./nss/lib/nss/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800
+++ ./nss/lib/nss/Makefile 2016-03-05 12:04:06.217474124 -0800
@@ -37,7 +37,8 @@ include $(CORE_DEPTH)/coreconf/rules.mk
# (6) Execute "component" rules. (OPTIONAL) #
#######################################################################
-
+INCLUDES += -iquote $(DIST)/../public/nss
+INCLUDES += -iquote $(DIST)/../private/nss
#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
diff -up ./nss/lib/pk11wrap/Makefile.iquote ./nss/lib/pk11wrap/Makefile
--- ./nss/lib/pk11wrap/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800
+++ ./nss/lib/pk11wrap/Makefile 2016-03-05 12:04:06.217474124 -0800
@@ -38,7 +38,7 @@ include $(CORE_DEPTH)/coreconf/rules.mk
# (6) Execute "component" rules. (OPTIONAL) #
#######################################################################
-
+INCLUDES += -iquote $(DIST)/../public/nss
#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
diff -up ./nss/lib/ssl/Makefile.iquote ./nss/lib/ssl/Makefile
--- ./nss/lib/ssl/Makefile.iquote 2016-02-26 12:51:11.000000000 -0800
+++ ./nss/lib/ssl/Makefile 2016-03-05 12:04:06.217474124 -0800
@@ -49,7 +49,7 @@ include $(CORE_DEPTH)/coreconf/rules.mk
# (6) Execute "component" rules. (OPTIONAL) #
#######################################################################
-
+INCLUDES += -iquote $(DIST)/../public/nss
#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #

View File

@ -21,7 +21,7 @@ Name: nss
Version: 3.32.1 Version: 3.32.1
# for Rawhide, please always use release >= 2 # for Rawhide, please always use release >= 2
# for Fedora release branches, please use release < 2 (1.0, 1.1, ...) # for Fedora release branches, please use release < 2 (1.0, 1.1, ...)
Release: 1.0%{?dist} Release: 1.1%{?dist}
License: MPLv2.0 License: MPLv2.0
URL: http://www.mozilla.org/projects/security/pki/nss/ URL: http://www.mozilla.org/projects/security/pki/nss/
Group: System Environment/Libraries Group: System Environment/Libraries
@ -99,12 +99,17 @@ Patch40: nss-3.14.0.0-disble-ocsp-test.patch
Patch47: utilwrap-include-templates.patch Patch47: utilwrap-include-templates.patch
# TODO remove when we switch to building nss without softoken # TODO remove when we switch to building nss without softoken
Patch49: nss-skip-bltest-and-fipstest.patch Patch49: nss-skip-bltest-and-fipstest.patch
# This patch uses the gcc-iquote dir option documented at # This patch uses the GCC -iquote option documented at
# http://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html#Directory-Options # http://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html#Directory-Options
# to place the in-tree directories at the head of the list of list of directories # to give the in-tree headers a higher priority over the system headers,
# to be searched for for header files. This ensures a build even when system # when they are included through the quote form (#include "file.h").
# headers are older. Such is the case when starting an update with API changes or even private export changes. #
# Once the buildroot aha been bootstrapped the patch may be removed but it doesn't hurt to keep it. # This ensures a build even when system headers are older. Such is the
# case when starting an update with API changes or even private export
# changes.
#
# Once the buildroot aha been bootstrapped the patch may be removed
# but it doesn't hurt to keep it.
Patch50: iquote.patch Patch50: iquote.patch
# Local patch for TLS_ECDHE_{ECDSA|RSA}_WITH_3DES_EDE_CBC_SHA ciphers # Local patch for TLS_ECDHE_{ECDSA|RSA}_WITH_3DES_EDE_CBC_SHA ciphers
Patch58: rhbz1185708-enable-ecc-3des-ciphers-by-default.patch Patch58: rhbz1185708-enable-ecc-3des-ciphers-by-default.patch
@ -795,6 +800,9 @@ fi
%changelog %changelog
* Tue Oct 3 2017 Daiki Ueno <dueno@redhat.com> - 3.32.1-1.1
- Update iquote.patch to really prefer in-tree headers over system headers
* Fri Sep 15 2017 Daiki Ueno <dueno@redhat.com> - 3.32.1-1.0 * Fri Sep 15 2017 Daiki Ueno <dueno@redhat.com> - 3.32.1-1.0
- Update to NSS 3.32.1 - Update to NSS 3.32.1