Browse code

Upgrade nss and nspr.

Change-Id: Icd194b117a90df437f159619c82fc752c44648e7
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/3006
Reviewed-by: Divya Thaluru <dthaluru@vmware.com>
Tested-by: gerrit-photon <photon-checkins@vmware.com>

xiaolin-vmware authored on 2017/06/21 06:29:21
Showing 3 changed files
... ...
@@ -1,22 +1,22 @@
1
-Summary:	Platform-neutral API
2
-Name:		nspr
3
-Version:	4.14
4
-Release:	2%{?dist}
5
-License:	MPLv2.0
6
-URL:		http://ftp.mozilla.org/pub/mozilla.org
7
-Group:		Applications/System
8
-Vendor:		VMware, Inc.
9
-Distribution: Photon
10
-Source0:	http://ftp.mozilla.org/pub/mozilla.org/%{name}/releases/v%{version}/src/%{name}-%{version}.tar.gz
11
-%define sha1 nspr=4c9ffda940882229104090f8fc8539f6412e1ff7
1
+Summary:        Platform-neutral API
2
+Name:           nspr
3
+Version:        4.15
4
+Release:        1%{?dist}
5
+License:        MPLv2.0
6
+URL:            http://ftp.mozilla.org/pub/mozilla.org
7
+Group:          Applications/System
8
+Vendor:         VMware, Inc.
9
+Distribution:   Photon
10
+Source0:        http://ftp.mozilla.org/pub/nspr/releases/v%{version}/src/%{name}-%{version}.tar.gz
11
+%define sha1    nspr=56030e0177849034ba3027a23ae2a7f8ed41f379
12 12
 
13 13
 %description
14 14
 Netscape Portable Runtime (NSPR) provides a platform-neutral API
15 15
 for system level and libc like functions.
16 16
 
17
-%package    devel
18
-Summary:    Header and development files for nspr
19
-Requires:   %{name} = %{version}-%{release}
17
+%package        devel
18
+Summary:        Header and development files for nspr
19
+Requires:       %{name} = %{version}-%{release}
20 20
 %description    devel
21 21
 It contains the libraries and header files to create applications
22 22
 
... ...
@@ -29,12 +29,12 @@ sed -i 's#$(LIBRARY) ##' config/rules.mk
29 29
 %build
30 30
 cd nspr
31 31
 ./configure \
32
-	--prefix=%{_prefix} \
33
-	--bindir=%{_bindir} \
34
-	--with-mozilla \
35
-	--with-pthreads \
36
-	$([ $(uname -m) = x86_64 ] && echo --enable-64bit) \
37
-	--disable-silent-rules
32
+    --prefix=%{_prefix} \
33
+    --bindir=%{_bindir} \
34
+    --with-mozilla \
35
+    --with-pthreads \
36
+    $([ $(uname -m) = x86_64 ] && echo --enable-64bit) \
37
+    --disable-silent-rules
38 38
 
39 39
 make %{?_smp_mflags}
40 40
 
... ...
@@ -42,9 +42,9 @@ make %{?_smp_mflags}
42 42
 cd nspr
43 43
 make DESTDIR=%{buildroot} install
44 44
 
45
-%post	-p /sbin/ldconfig
45
+%post   -p /sbin/ldconfig
46 46
 
47
-%postun	-p /sbin/ldconfig
47
+%postun -p /sbin/ldconfig
48 48
 
49 49
 %files
50 50
 %defattr(-,root,root)
... ...
@@ -58,6 +58,8 @@ make DESTDIR=%{buildroot} install
58 58
 %{_datarootdir}/aclocal/*
59 59
 
60 60
 %changelog
61
+*   Tue Jun 20 2017 Xiaolin Li <xiaolinl@vmware.com> 4.15-1
62
+-   Upgrade to 4.15.
61 63
 *   Fri May 05 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 4.14-2
62 64
 -   Fix error - binary packed in devel.
63 65
 *   Sat Apr 15 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 4.14-1
64 66
new file mode 100644
... ...
@@ -0,0 +1,246 @@
0
+Submitted By:            DJ Lucas <dj_AT_linuxfromscratch_DOT_org>
1
+Date:                    2016-12-27
2
+Initial Package Version: 3.12.4
3
+Upstream Status:         Not applicable
4
+Origin:                  Self, rediffed for nss-3.28.
5
+Description:             Adds auto-generated nss.pc and nss-config script, and
6
+                         allows building without nspr in the source tree.
7
+
8
+diff -Naurp nss-3.28-orig/nss/Makefile nss-3.28/nss/Makefile
9
+--- nss-3.28-orig/nss/Makefile	2016-12-21 05:56:27.000000000 -0600
10
+@@ -46,7 +46,7 @@ include $(CORE_DEPTH)/coreconf/rules.mk
11
+ # (7) Execute "local" rules. (OPTIONAL).                              #
12
+ #######################################################################
13
+ 
14
+-nss_build_all: build_nspr all latest
15
++nss_build_all: all latest
16
+ 
17
+ nss_clean_all: clobber_nspr clobber
18
+ 
19
+diff -Naurp nss-3.28-orig/nss/config/Makefile nss-3.28/nss/config/Makefile
20
+--- nss-3.28-orig/nss/config/Makefile	1969-12-31 18:00:00.000000000 -0600
21
+@@ -0,0 +1,40 @@
22
++CORE_DEPTH = ..
23
++DEPTH      = ..
24
++
25
++include $(CORE_DEPTH)/coreconf/config.mk
26
++
27
++NSS_MAJOR_VERSION = `grep "NSS_VMAJOR" ../lib/nss/nss.h | awk '{print $$3}'`
28
++NSS_MINOR_VERSION = `grep "NSS_VMINOR" ../lib/nss/nss.h | awk '{print $$3}'`
29
++NSS_PATCH_VERSION = `grep "NSS_VPATCH" ../lib/nss/nss.h | awk '{print $$3}'`
30
++PREFIX = /usr
31
++
32
++all: export libs
33
++
34
++export:
35
++	# Create the nss.pc file
36
++	mkdir -p $(DIST)/lib/pkgconfig
37
++	sed -e "s,@prefix@,$(PREFIX)," \
38
++	    -e "s,@exec_prefix@,\$${prefix}," \
39
++	    -e "s,@libdir@,\$${prefix}/lib," \
40
++	    -e "s,@includedir@,\$${prefix}/include/nss," \
41
++	    -e "s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION),g" \
42
++	    -e "s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION)," \
43
++	    -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
44
++	    nss.pc.in > nss.pc
45
++	chmod 0644 nss.pc
46
++	ln -sf ../../../../nss/config/nss.pc $(DIST)/lib/pkgconfig
47
++
48
++	# Create the nss-config script
49
++	mkdir -p $(DIST)/bin
50
++	sed -e "s,@prefix@,$(PREFIX)," \
51
++	    -e "s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION)," \
52
++	    -e "s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION)," \
53
++	    -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
54
++	    nss-config.in > nss-config
55
++	chmod 0755 nss-config
56
++	ln -sf ../../../nss/config/nss-config $(DIST)/bin
57
++
58
++libs:
59
++
60
++dummy: all export libs
61
++
62
+diff -Naurp nss-3.28-orig/nss/config/nss-config.in nss-3.28/nss/config/nss-config.in
63
+--- nss-3.28-orig/nss/config/nss-config.in	1969-12-31 18:00:00.000000000 -0600
64
+@@ -0,0 +1,153 @@
65
++#!/bin/sh
66
++
67
++prefix=@prefix@
68
++
69
++major_version=@NSS_MAJOR_VERSION@
70
++minor_version=@NSS_MINOR_VERSION@
71
++patch_version=@NSS_PATCH_VERSION@
72
++
73
++usage()
74
++{
75
++	cat <<EOF
76
++Usage: nss-config [OPTIONS] [LIBRARIES]
77
++Options:
78
++	[--prefix[=DIR]]
79
++	[--exec-prefix[=DIR]]
80
++	[--includedir[=DIR]]
81
++	[--libdir[=DIR]]
82
++	[--version]
83
++	[--libs]
84
++	[--cflags]
85
++Dynamic Libraries:
86
++	nss
87
++	nssutil
88
++	smime
89
++	ssl
90
++	softokn
91
++EOF
92
++	exit $1
93
++}
94
++
95
++if test $# -eq 0; then
96
++	usage 1 1>&2
97
++fi
98
++
99
++lib_nss=yes
100
++lib_nssutil=yes
101
++lib_smime=yes
102
++lib_ssl=yes
103
++lib_softokn=yes
104
++
105
++while test $# -gt 0; do
106
++  case "$1" in
107
++  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
108
++  *) optarg= ;;
109
++  esac
110
++
111
++  case $1 in
112
++    --prefix=*)
113
++      prefix=$optarg
114
++      ;;
115
++    --prefix)
116
++      echo_prefix=yes
117
++      ;;
118
++    --exec-prefix=*)
119
++      exec_prefix=$optarg
120
++      ;;
121
++    --exec-prefix)
122
++      echo_exec_prefix=yes
123
++      ;;
124
++    --includedir=*)
125
++      includedir=$optarg
126
++      ;;
127
++    --includedir)
128
++      echo_includedir=yes
129
++      ;;
130
++    --libdir=*)
131
++      libdir=$optarg
132
++      ;;
133
++    --libdir)
134
++      echo_libdir=yes
135
++      ;;
136
++    --version)
137
++      echo ${major_version}.${minor_version}.${patch_version}
138
++      ;;
139
++    --cflags)
140
++      echo_cflags=yes
141
++      ;;
142
++    --libs)
143
++      echo_libs=yes
144
++      ;;
145
++    nss)
146
++      lib_nss=yes
147
++      ;;
148
++    nssutil)
149
++      lib_nssutil=yes
150
++      ;;
151
++    smime)
152
++      lib_smime=yes
153
++      ;;
154
++    ssl)
155
++      lib_ssl=yes
156
++      ;;
157
++    softokn)
158
++      lib_softokn=yes
159
++      ;;
160
++    *)
161
++      usage 1 1>&2
162
++      ;;
163
++  esac
164
++  shift
165
++done
166
++
167
++# Set variables that may be dependent upon other variables
168
++if test -z "$exec_prefix"; then
169
++    exec_prefix=`pkg-config --variable=exec_prefix nss`
170
++fi
171
++if test -z "$includedir"; then
172
++    includedir=`pkg-config --variable=includedir nss`
173
++fi
174
++if test -z "$libdir"; then
175
++    libdir=`pkg-config --variable=libdir nss`
176
++fi
177
++
178
++if test "$echo_prefix" = "yes"; then
179
++    echo $prefix
180
++fi
181
++
182
++if test "$echo_exec_prefix" = "yes"; then
183
++    echo $exec_prefix
184
++fi
185
++
186
++if test "$echo_includedir" = "yes"; then
187
++    echo $includedir
188
++fi
189
++
190
++if test "$echo_libdir" = "yes"; then
191
++    echo $libdir
192
++fi
193
++
194
++if test "$echo_cflags" = "yes"; then
195
++    echo -I$includedir
196
++fi
197
++
198
++if test "$echo_libs" = "yes"; then
199
++      libdirs="-L$libdir"
200
++      if test -n "$lib_nss"; then
201
++	libdirs="$libdirs -lnss${major_version}"
202
++      fi
203
++      if test -n "$lib_nssutil"; then
204
++        libdirs="$libdirs -lnssutil${major_version}"
205
++      fi
206
++      if test -n "$lib_smime"; then
207
++	libdirs="$libdirs -lsmime${major_version}"
208
++      fi
209
++      if test -n "$lib_ssl"; then
210
++	libdirs="$libdirs -lssl${major_version}"
211
++      fi
212
++      if test -n "$lib_softokn"; then
213
++        libdirs="$libdirs -lsoftokn${major_version}"
214
++      fi
215
++      echo $libdirs
216
++fi      
217
++
218
+diff -Naurp nss-3.28-orig/nss/config/nss.pc.in nss-3.28/nss/config/nss.pc.in
219
+--- nss-3.28-orig/nss/config/nss.pc.in	1969-12-31 18:00:00.000000000 -0600
220
+@@ -0,0 +1,12 @@
221
++prefix=@prefix@
222
++exec_prefix=@exec_prefix@
223
++libdir=@libdir@
224
++includedir=@includedir@
225
++
226
++Name: NSS
227
++Description: Network Security Services
228
++Version: @NSS_MAJOR_VERSION@.@NSS_MINOR_VERSION@.@NSS_PATCH_VERSION@
229
++Requires: nspr >= 4.10
230
++Libs: -L@libdir@ -lnss@NSS_MAJOR_VERSION@ -lnssutil@NSS_MAJOR_VERSION@ -lsmime@NSS_MAJOR_VERSION@ -lssl@NSS_MAJOR_VERSION@ -lsoftokn@NSS_MAJOR_VERSION@
231
++Cflags: -I${includedir}
232
++
233
+diff -Naurp nss-3.28-orig/nss/manifest.mn nss-3.28/nss/manifest.mn
234
+--- nss-3.28-orig/nss/manifest.mn	2016-12-21 05:56:27.000000000 -0600
235
+@@ -10,4 +10,4 @@ IMPORTS =	nspr20/v4.8 \
236
+ 
237
+ RELEASE = nss
238
+ 
239
+-DIRS = coreconf lib cmd gtests
240
++DIRS = coreconf lib cmd gtests config
... ...
@@ -1,18 +1,18 @@
1
-Summary:	Security client
2
-Name:		nss
3
-Version:	3.30.1
4
-Release:	1%{?dist}
5
-License:	MPLv2.0
6
-URL:		https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_30_1_RTM/src/%{name}-%{version}.tar.gz
7
-Group:		Applications/System
8
-Vendor:		VMware, Inc.
9
-Distribution:	Photon
10
-Source0:	%{name}-%{version}.tar.gz
11
-%define sha1 nss=3e1207b1293605435106148aa8e7205b37aeae74
12
-Patch:		nss-3.30.1-standalone-1.patch
13
-Requires:	nspr
14
-BuildRequires:	nspr-devel
15
-BuildRequires:	sqlite-devel
1
+Summary:        Security client
2
+Name:           nss
3
+Version:        3.31
4
+Release:        1%{?dist}
5
+License:        MPLv2.0
6
+URL:            http://ftp.mozilla.org/pub/security/nss/releases/NSS_3_31_RTM/src/%{name}-%{version}.tar.gz
7
+Group:          Applications/System
8
+Vendor:         VMware, Inc.
9
+Distribution:   Photon
10
+Source0:        %{name}-%{version}.tar.gz
11
+%define sha1    nss=006a13a5e52867c49ea1e7d986b7c02a3cd8ebfb
12
+Patch:          nss-3.31-standalone-1.patch
13
+Requires:       nspr
14
+BuildRequires:  nspr-devel
15
+BuildRequires:  sqlite-devel
16 16
 Requires:       nss-libs = %{version}-%{release}
17 17
 
18 18
 %description
... ...
@@ -34,8 +34,8 @@ Header files for doing development with Network Security Services.
34 34
 %package libs
35 35
 Summary: Libraries for Network Security Services
36 36
 Group:      System Environment/Libraries
37
-Requires:	sqlite-libs
38
-Requires:	nspr
37
+Requires:   sqlite-libs
38
+Requires:   nspr
39 39
 %description libs
40 40
 This package contains minimal set of shared nss libraries.
41 41
 
... ...
@@ -46,11 +46,11 @@ This package contains minimal set of shared nss libraries.
46 46
 cd nss
47 47
 # -j is not supported by nss
48 48
 make VERBOSE=1 BUILD_OPT=1 \
49
-	NSPR_INCLUDE_DIR=%{_includedir}/nspr \
50
-	USE_SYSTEM_ZLIB=1 \
51
-	ZLIB_LIBS=-lz \
52
-	$([ $(uname -m) = x86_64 ] && echo USE_64=1) \
53
-	$([ -f %{_includedir}/sqlite3.h ] && echo NSS_USE_SYSTEM_SQLITE=1)
49
+    NSPR_INCLUDE_DIR=%{_includedir}/nspr \
50
+    USE_SYSTEM_ZLIB=1 \
51
+    ZLIB_LIBS=-lz \
52
+    $([ $(uname -m) = x86_64 ] && echo USE_64=1) \
53
+    $([ -f %{_includedir}/sqlite3.h ] && echo NSS_USE_SYSTEM_SQLITE=1)
54 54
 %install
55 55
 cd nss
56 56
 cd ../dist
... ...
@@ -70,7 +70,7 @@ cd nss/tests
70 70
 HOST=localhost DOMSUF=localdomain
71 71
 ./all.sh
72 72
 
73
-%post	-p /sbin/ldconfig
73
+%post   -p /sbin/ldconfig
74 74
 
75 75
 %files
76 76
 %defattr(-,root,root)
... ...
@@ -94,6 +94,8 @@ HOST=localhost DOMSUF=localdomain
94 94
 %{_libdir}/libsoftokn3.so
95 95
 
96 96
 %changelog
97
+*   Tue Jun 20 2017 Xiaolin Li <xiaolinl@vmware.com> 3.31-1
98
+-   Upgrade to 3.31.
97 99
 *   Sat Apr 15 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 3.30.1-1
98 100
 -   Update to 3.30.1
99 101
 *   Fri Apr 14 2017 Alexey Makhalov <amakhalov@vmware.com> 3.25-4