Gentoo Archives: gentoo-commits

From: "Lars Wendler (polynomial-c)" <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-libs/nss/files: nss-3.17.1-gentoo-fixups.patch
Date: Thu, 25 Sep 2014 06:00:21
Message-Id: 20140925060012.516FB6332@oystercatcher.gentoo.org
1 polynomial-c 14/09/25 06:00:12
2
3 Added: nss-3.17.1-gentoo-fixups.patch
4 Log:
5 Security bump (bug #523652). RSA signature forgery attack (CVE-2014-1568)
6
7 (Portage version: 2.2.13/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)
8
9 Revision Changes Path
10 1.1 dev-libs/nss/files/nss-3.17.1-gentoo-fixups.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/nss/files/nss-3.17.1-gentoo-fixups.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/nss/files/nss-3.17.1-gentoo-fixups.patch?rev=1.1&content-type=text/plain
14
15 Index: nss-3.17.1-gentoo-fixups.patch
16 ===================================================================
17 --- nss-3.17.1/nss/config/Makefile
18 +++ nss-3.17.1/nss/config/Makefile
19 @@ -0,0 +1,40 @@
20 +CORE_DEPTH = ..
21 +DEPTH = ..
22 +
23 +include $(CORE_DEPTH)/coreconf/config.mk
24 +
25 +NSS_MAJOR_VERSION = `grep "NSS_VMAJOR" ../lib/nss/nss.h | awk '{print $$3}'`
26 +NSS_MINOR_VERSION = `grep "NSS_VMINOR" ../lib/nss/nss.h | awk '{print $$3}'`
27 +NSS_PATCH_VERSION = `grep "NSS_VPATCH" ../lib/nss/nss.h | awk '{print $$3}'`
28 +PREFIX = /usr
29 +
30 +all: export libs
31 +
32 +export:
33 + # Create the nss.pc file
34 + mkdir -p $(DIST)/lib/pkgconfig
35 + sed -e "s,@prefix@,$(PREFIX)," \
36 + -e "s,@exec_prefix@,\$${prefix}," \
37 + -e "s,@libdir@,\$${prefix}/lib64," \
38 + -e "s,@includedir@,\$${prefix}/include/nss," \
39 + -e "s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION),g" \
40 + -e "s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION)," \
41 + -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
42 + nss.pc.in > nss.pc
43 + chmod 0644 nss.pc
44 + ln -sf ../../../../config/nss.pc $(DIST)/lib/pkgconfig
45 +
46 + # Create the nss-config script
47 + mkdir -p $(DIST)/bin
48 + sed -e "s,@prefix@,$(PREFIX)," \
49 + -e "s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION)," \
50 + -e "s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION)," \
51 + -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
52 + nss-config.in > nss-config
53 + chmod 0755 nss-config
54 + ln -sf ../../../config/nss-config $(DIST)/bin
55 +
56 +libs:
57 +
58 +dummy: all export libs
59 +
60 --- nss-3.17.1/nss/config/nss-config.in
61 +++ nss-3.17.1/nss/config/nss-config.in
62 @@ -0,0 +1,145 @@
63 +#!/bin/sh
64 +
65 +prefix=@prefix@
66 +
67 +major_version=@NSS_MAJOR_VERSION@
68 +minor_version=@NSS_MINOR_VERSION@
69 +patch_version=@NSS_PATCH_VERSION@
70 +
71 +usage()
72 +{
73 + cat <<EOF
74 +Usage: nss-config [OPTIONS] [LIBRARIES]
75 +Options:
76 + [--prefix[=DIR]]
77 + [--exec-prefix[=DIR]]
78 + [--includedir[=DIR]]
79 + [--libdir[=DIR]]
80 + [--version]
81 + [--libs]
82 + [--cflags]
83 +Dynamic Libraries:
84 + nss
85 + ssl
86 + smime
87 + nssutil
88 +EOF
89 + exit $1
90 +}
91 +
92 +if test $# -eq 0; then
93 + usage 1 1>&2
94 +fi
95 +
96 +lib_ssl=yes
97 +lib_smime=yes
98 +lib_nss=yes
99 +lib_nssutil=yes
100 +
101 +while test $# -gt 0; do
102 + case "$1" in
103 + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
104 + *) optarg= ;;
105 + esac
106 +
107 + case $1 in
108 + --prefix=*)
109 + prefix=$optarg
110 + ;;
111 + --prefix)
112 + echo_prefix=yes
113 + ;;
114 + --exec-prefix=*)
115 + exec_prefix=$optarg
116 + ;;
117 + --exec-prefix)
118 + echo_exec_prefix=yes
119 + ;;
120 + --includedir=*)
121 + includedir=$optarg
122 + ;;
123 + --includedir)
124 + echo_includedir=yes
125 + ;;
126 + --libdir=*)
127 + libdir=$optarg
128 + ;;
129 + --libdir)
130 + echo_libdir=yes
131 + ;;
132 + --version)
133 + echo ${major_version}.${minor_version}.${patch_version}
134 + ;;
135 + --cflags)
136 + echo_cflags=yes
137 + ;;
138 + --libs)
139 + echo_libs=yes
140 + ;;
141 + ssl)
142 + lib_ssl=yes
143 + ;;
144 + smime)
145 + lib_smime=yes
146 + ;;
147 + nss)
148 + lib_nss=yes
149 + ;;
150 + nssutil)
151 + lib_nssutil=yes
152 + ;;
153 + *)
154 + usage 1 1>&2
155 + ;;
156 + esac
157 + shift
158 +done
159 +
160 +# Set variables that may be dependent upon other variables
161 +if test -z "$exec_prefix"; then
162 + exec_prefix=`pkg-config --variable=exec_prefix nss`
163 +fi
164 +if test -z "$includedir"; then
165 + includedir=`pkg-config --variable=includedir nss`
166 +fi
167 +if test -z "$libdir"; then
168 + libdir=`pkg-config --variable=libdir nss`
169 +fi
170 +
171 +if test "$echo_prefix" = "yes"; then
172 + echo $prefix
173 +fi
174 +
175 +if test "$echo_exec_prefix" = "yes"; then
176 + echo $exec_prefix
177 +fi
178 +
179 +if test "$echo_includedir" = "yes"; then
180 + echo $includedir
181 +fi
182 +
183 +if test "$echo_libdir" = "yes"; then
184 + echo $libdir
185 +fi
186 +
187 +if test "$echo_cflags" = "yes"; then
188 + echo -I$includedir
189 +fi
190 +
191 +if test "$echo_libs" = "yes"; then
192 + libdirs=""
193 + if test -n "$lib_ssl"; then
194 + libdirs="$libdirs -lssl${major_version}"
195 + fi
196 + if test -n "$lib_smime"; then
197 + libdirs="$libdirs -lsmime${major_version}"
198 + fi
199 + if test -n "$lib_nss"; then
200 + libdirs="$libdirs -lnss${major_version}"
201 + fi
202 + if test -n "$lib_nssutil"; then
203 + libdirs="$libdirs -lnssutil${major_version}"
204 + fi
205 + echo $libdirs
206 +fi
207 +
208 --- nss-3.17.1/nss/config/nss.pc.in
209 +++ nss-3.17.1/nss/config/nss.pc.in
210 @@ -0,0 +1,12 @@
211 +prefix=@prefix@
212 +exec_prefix=@exec_prefix@
213 +libdir=@libdir@
214 +includedir=@includedir@
215 +
216 +Name: NSS
217 +Description: Network Security Services
218 +Version: @NSS_MAJOR_VERSION@.@NSS_MINOR_VERSION@.@NSS_PATCH_VERSION@
219 +Requires: nspr >= 4.8
220 +Libs: -lssl3 -lsmime3 -lnss3 -lnssutil3
221 +Cflags: -I${includedir}
222 +
223 --- nss-3.17.1/nss/Makefile
224 +++ nss-3.17.1/nss/Makefile
225 @@ -44,7 +44,7 @@
226 # (7) Execute "local" rules. (OPTIONAL). #
227 #######################################################################
228
229 -nss_build_all: build_nspr all
230 +nss_build_all: all
231
232 nss_clean_all: clobber_nspr clobber
233
234 @@ -109,12 +109,6 @@
235 --with-dist-prefix='$(NSPR_PREFIX)' \
236 --with-dist-includedir='$(NSPR_PREFIX)/include'
237
238 -build_nspr: $(NSPR_CONFIG_STATUS)
239 - $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME)
240 -
241 -clobber_nspr: $(NSPR_CONFIG_STATUS)
242 - $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) clobber
243 -
244 build_docs:
245 $(MAKE) -C $(CORE_DEPTH)/doc
246
247 --- nss-3.17.1/nss/manifest.mn
248 +++ nss-3.17.1/nss/manifest.mn
249 @@ -10,7 +10,7 @@
250
251 RELEASE = nss
252
253 -DIRS = coreconf lib cmd
254 +DIRS = coreconf lib cmd config
255
256 ifdef NSS_BUILD_GTESTS
257 DIRS += external_tests