206
|
1 |
# HG changeset patch
|
|
2 |
# User Mike Hommey
|
|
3 |
# Parent 202570dfd2a5defb5ae390030ee81b46cb60c3fd
|
|
4 |
Bug 618195 - Build services-crypto (or just nsSyncJPAKE) unconditionally as part of tier_platform
|
|
5 |
(mozilla + firefox part)
|
|
6 |
|
|
7 |
diff --git a/browser/build.mk b/browser/build.mk
|
|
8 |
--- a/browser/build.mk
|
|
9 |
+++ b/browser/build.mk
|
|
10 |
@@ -45,17 +45,17 @@ ifdef MOZ_EXTENSIONS
|
|
11 |
tier_app_dirs += extensions
|
|
12 |
endif
|
|
13 |
|
|
14 |
tier_app_dirs += $(MOZ_BRANDING_DIRECTORY)
|
|
15 |
|
|
16 |
tier_app_dirs += toolkit/components/console/hudservice
|
|
17 |
|
|
18 |
ifdef MOZ_SERVICES_SYNC
|
|
19 |
-tier_app_dirs += services/sync
|
|
20 |
+tier_app_dirs += services
|
|
21 |
endif
|
|
22 |
|
|
23 |
tier_app_dirs += browser
|
|
24 |
# Never add other tier_app_dirs after browser. They won't get packaged
|
|
25 |
# properly on mac.
|
|
26 |
|
|
27 |
installer:
|
|
28 |
@$(MAKE) -C browser/installer installer
|
|
29 |
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
|
|
30 |
--- a/browser/installer/package-manifest.in
|
|
31 |
+++ b/browser/installer/package-manifest.in
|
|
32 |
@@ -225,16 +225,17 @@
|
|
33 |
@BINPATH@/components/proxyObject.xpt
|
|
34 |
@BINPATH@/components/rdf.xpt
|
|
35 |
@BINPATH@/components/satchel.xpt
|
|
36 |
@BINPATH@/components/saxparser.xpt
|
|
37 |
@BINPATH@/components/sessionstore.xpt
|
|
38 |
#ifdef MOZ_SERVICES_SYNC
|
|
39 |
@BINPATH@/components/services-crypto.xpt
|
|
40 |
#endif
|
|
41 |
+@BINPATH@/components/services-crypto-component.xpt
|
|
42 |
@BINPATH@/components/shellservice.xpt
|
|
43 |
@BINPATH@/components/shistory.xpt
|
|
44 |
@BINPATH@/components/spellchecker.xpt
|
|
45 |
@BINPATH@/components/storage.xpt
|
|
46 |
@BINPATH@/components/toolkitprofile.xpt
|
|
47 |
#ifdef MOZ_ENABLE_XREMOTE
|
|
48 |
@BINPATH@/components/toolkitremote.xpt
|
|
49 |
#endif
|
|
50 |
diff --git a/services/crypto/Makefile.in b/services/crypto/Makefile.in
|
|
51 |
--- a/services/crypto/Makefile.in
|
|
52 |
+++ b/services/crypto/Makefile.in
|
|
53 |
@@ -43,37 +43,18 @@ VPATH = @srcdir@
|
|
54 |
|
|
55 |
include $(DEPTH)/config/autoconf.mk
|
|
56 |
|
|
57 |
MODULE = services-crypto
|
|
58 |
XPIDL_MODULE = services-crypto
|
|
59 |
|
|
60 |
XPIDLSRCS = \
|
|
61 |
IWeaveCrypto.idl \
|
|
62 |
- nsISyncJPAKE.idl \
|
|
63 |
- $(NULL)
|
|
64 |
-
|
|
65 |
-LIBRARY_NAME = services-crypto
|
|
66 |
-EXPORT_LIBRARY = 1
|
|
67 |
-IS_COMPONENT = 1
|
|
68 |
-MODULE_NAME = nsServicesCryptoModule
|
|
69 |
-LIBXUL_LIBRARY = 1
|
|
70 |
-FORCE_USE_PIC = 1
|
|
71 |
-MOZILLA_INTERNAL_API = 1
|
|
72 |
-
|
|
73 |
-CPPSRCS = \
|
|
74 |
- nsSyncJPAKE.cpp \
|
|
75 |
$(NULL)
|
|
76 |
|
|
77 |
libs::
|
|
78 |
$(PYTHON) $(topsrcdir)/config/nsinstall.py $(srcdir)/modules/* $(FINAL_TARGET)/modules/services-crypto
|
|
79 |
|
|
80 |
ifdef ENABLE_TESTS
|
|
81 |
DIRS += tests
|
|
82 |
endif
|
|
83 |
|
|
84 |
include $(topsrcdir)/config/rules.mk
|
|
85 |
-
|
|
86 |
-EXTRA_DSO_LDOPTS += \
|
|
87 |
- $(MOZ_COMPONENT_LIBS) \
|
|
88 |
- $(NSPR_LIBS) \
|
|
89 |
- $(NSS_LIBS) \
|
|
90 |
- $(NULL)
|
|
91 |
diff --git a/services/crypto/component/Makefile.in b/services/crypto/component/Makefile.in
|
|
92 |
new file mode 100644
|
|
93 |
--- /dev/null
|
|
94 |
+++ b/services/crypto/component/Makefile.in
|
|
95 |
@@ -0,0 +1,75 @@
|
|
96 |
+#
|
|
97 |
+# ***** BEGIN LICENSE BLOCK *****
|
|
98 |
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
99 |
+#
|
|
100 |
+# The contents of this file are subject to the Mozilla Public License Version
|
|
101 |
+# 1.1 (the "License"); you may not use this file except in compliance with
|
|
102 |
+# the License. You may obtain a copy of the License at
|
|
103 |
+# http://www.mozilla.org/MPL/
|
|
104 |
+#
|
|
105 |
+# Software distributed under the License is distributed on an "AS IS" basis,
|
|
106 |
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
107 |
+# for the specific language governing rights and limitations under the
|
|
108 |
+# License.
|
|
109 |
+#
|
|
110 |
+# The Original Code is mozilla.org code.
|
|
111 |
+#
|
|
112 |
+# The Initial Developer of the Original Code is
|
|
113 |
+# the Mozilla Foundation.
|
|
114 |
+# Portions created by the Initial Developer are Copyright (C) 2010
|
|
115 |
+# the Initial Developer. All Rights Reserved.
|
|
116 |
+#
|
|
117 |
+# Contributor(s):
|
|
118 |
+# Philipp von Weitershausen <philipp@weitershausen.de>
|
|
119 |
+#
|
|
120 |
+# Alternatively, the contents of this file may be used under the terms of
|
|
121 |
+# either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
122 |
+# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
123 |
+# in which case the provisions of the GPL or the LGPL are applicable instead
|
|
124 |
+# of those above. If you wish to allow use of your version of this file only
|
|
125 |
+# under the terms of either the GPL or the LGPL, and not to allow others to
|
|
126 |
+# use your version of this file under the terms of the MPL, indicate your
|
|
127 |
+# decision by deleting the provisions above and replace them with the notice
|
|
128 |
+# and other provisions required by the GPL or the LGPL. If you do not delete
|
|
129 |
+# the provisions above, a recipient may use your version of this file under
|
|
130 |
+# the terms of any one of the MPL, the GPL or the LGPL.
|
|
131 |
+#
|
|
132 |
+# ***** END LICENSE BLOCK *****
|
|
133 |
+
|
|
134 |
+DEPTH = ../../..
|
|
135 |
+topsrcdir = @top_srcdir@
|
|
136 |
+srcdir = @srcdir@
|
|
137 |
+VPATH = @srcdir@
|
|
138 |
+
|
|
139 |
+include $(DEPTH)/config/autoconf.mk
|
|
140 |
+
|
|
141 |
+MODULE = services-crypto
|
|
142 |
+XPIDL_MODULE = services-crypto-component
|
|
143 |
+
|
|
144 |
+XPIDLSRCS = \
|
|
145 |
+ nsISyncJPAKE.idl \
|
|
146 |
+ $(NULL)
|
|
147 |
+
|
|
148 |
+LIBRARY_NAME = services-crypto
|
|
149 |
+EXPORT_LIBRARY = 1
|
|
150 |
+IS_COMPONENT = 1
|
|
151 |
+MODULE_NAME = nsServicesCryptoModule
|
|
152 |
+LIBXUL_LIBRARY = 1
|
|
153 |
+FORCE_USE_PIC = 1
|
|
154 |
+MOZILLA_INTERNAL_API = 1
|
|
155 |
+
|
|
156 |
+CPPSRCS = \
|
|
157 |
+ nsSyncJPAKE.cpp \
|
|
158 |
+ $(NULL)
|
|
159 |
+
|
|
160 |
+ifdef ENABLE_TESTS
|
|
161 |
+DIRS += tests
|
|
162 |
+endif
|
|
163 |
+
|
|
164 |
+include $(topsrcdir)/config/rules.mk
|
|
165 |
+
|
|
166 |
+EXTRA_DSO_LDOPTS += \
|
|
167 |
+ $(MOZ_COMPONENT_LIBS) \
|
|
168 |
+ $(NSPR_LIBS) \
|
|
169 |
+ $(NSS_LIBS) \
|
|
170 |
+ $(NULL)
|
|
171 |
diff --git a/services/crypto/nsISyncJPAKE.idl b/services/crypto/component/nsISyncJPAKE.idl
|
|
172 |
rename from services/crypto/nsISyncJPAKE.idl
|
|
173 |
rename to services/crypto/component/nsISyncJPAKE.idl
|
|
174 |
diff --git a/services/crypto/nsSyncJPAKE.cpp b/services/crypto/component/nsSyncJPAKE.cpp
|
|
175 |
rename from services/crypto/nsSyncJPAKE.cpp
|
|
176 |
rename to services/crypto/component/nsSyncJPAKE.cpp
|
|
177 |
diff --git a/services/crypto/nsSyncJPAKE.h b/services/crypto/component/nsSyncJPAKE.h
|
|
178 |
rename from services/crypto/nsSyncJPAKE.h
|
|
179 |
rename to services/crypto/component/nsSyncJPAKE.h
|
|
180 |
diff --git a/services/crypto/component/tests/Makefile.in b/services/crypto/component/tests/Makefile.in
|
|
181 |
new file mode 100644
|
|
182 |
--- /dev/null
|
|
183 |
+++ b/services/crypto/component/tests/Makefile.in
|
|
184 |
@@ -0,0 +1,50 @@
|
|
185 |
+#
|
|
186 |
+# ***** BEGIN LICENSE BLOCK *****
|
|
187 |
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
188 |
+#
|
|
189 |
+# The contents of this file are subject to the Mozilla Public License Version
|
|
190 |
+# 1.1 (the "License"); you may not use this file except in compliance with
|
|
191 |
+# the License. You may obtain a copy of the License at
|
|
192 |
+# http://www.mozilla.org/MPL/
|
|
193 |
+#
|
|
194 |
+# Software distributed under the License is distributed on an "AS IS" basis,
|
|
195 |
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
196 |
+# for the specific language governing rights and limitations under the
|
|
197 |
+# License.
|
|
198 |
+#
|
|
199 |
+# The Original Code is mozilla.org code.
|
|
200 |
+#
|
|
201 |
+# The Initial Developer of the Original Code is
|
|
202 |
+# the Mozilla Foundation.
|
|
203 |
+# Portions created by the Initial Developer are Copyright (C) 2010
|
|
204 |
+# the Initial Developer. All Rights Reserved.
|
|
205 |
+#
|
|
206 |
+# Contributor(s):
|
|
207 |
+# Philipp von Weitershausen <philipp@weitershausen.de>
|
|
208 |
+#
|
|
209 |
+# Alternatively, the contents of this file may be used under the terms of
|
|
210 |
+# either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
211 |
+# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
212 |
+# in which case the provisions of the GPL or the LGPL are applicable instead
|
|
213 |
+# of those above. If you wish to allow use of your version of this file only
|
|
214 |
+# under the terms of either the GPL or the LGPL, and not to allow others to
|
|
215 |
+# use your version of this file under the terms of the MPL, indicate your
|
|
216 |
+# decision by deleting the provisions above and replace them with the notice
|
|
217 |
+# and other provisions required by the GPL or the LGPL. If you do not delete
|
|
218 |
+# the provisions above, a recipient may use your version of this file under
|
|
219 |
+# the terms of any one of the MPL, the GPL or the LGPL.
|
|
220 |
+#
|
|
221 |
+# ***** END LICENSE BLOCK *****
|
|
222 |
+
|
|
223 |
+DEPTH = ../../../..
|
|
224 |
+topsrcdir = @top_srcdir@
|
|
225 |
+srcdir = @srcdir@
|
|
226 |
+VPATH = @srcdir@
|
|
227 |
+relativesrcdir = services/crypto/components/tests
|
|
228 |
+
|
|
229 |
+include $(DEPTH)/config/autoconf.mk
|
|
230 |
+
|
|
231 |
+MODULE = test_services_crypto
|
|
232 |
+XPCSHELL_TESTS = unit
|
|
233 |
+
|
|
234 |
+include $(topsrcdir)/config/rules.mk
|
|
235 |
diff --git a/services/crypto/tests/unit/test_jpake.js b/services/crypto/component/tests/unit/test_jpake.js
|
|
236 |
rename from services/crypto/tests/unit/test_jpake.js
|
|
237 |
rename to services/crypto/component/tests/unit/test_jpake.js
|
|
238 |
--- a/services/crypto/tests/unit/test_jpake.js
|
|
239 |
+++ b/services/crypto/component/tests/unit/test_jpake.js
|
|
240 |
@@ -1,8 +1,11 @@
|
|
241 |
+const Cc = Components.classes;
|
|
242 |
+const Ci = Components.interfaces;
|
|
243 |
+
|
|
244 |
// Ensure PSM is initialized.
|
|
245 |
Cc["@mozilla.org/psm;1"].getService(Ci.nsISupports);
|
|
246 |
|
|
247 |
function do_check_throws(func) {
|
|
248 |
let have_error = false;
|
|
249 |
try {
|
|
250 |
func();
|
|
251 |
} catch(ex) {
|
|
252 |
diff --git a/toolkit/library/libxul-config.mk b/toolkit/library/libxul-config.mk
|
|
253 |
--- a/toolkit/library/libxul-config.mk
|
|
254 |
+++ b/toolkit/library/libxul-config.mk
|
|
255 |
@@ -345,19 +345,17 @@ DEFINES += -DMOZ_SPELLCHECK
|
|
256 |
COMPONENT_LIBS += spellchecker
|
|
257 |
endif
|
|
258 |
|
|
259 |
ifdef MOZ_ZIPWRITER
|
|
260 |
DEFINES += -DMOZ_ZIPWRITER
|
|
261 |
COMPONENT_LIBS += zipwriter
|
|
262 |
endif
|
|
263 |
|
|
264 |
-ifdef MOZ_SERVICES_SYNC
|
|
265 |
COMPONENT_LIBS += services-crypto
|
|
266 |
-endif
|
|
267 |
|
|
268 |
ifdef MOZ_DEBUG
|
|
269 |
ifdef ENABLE_TESTS
|
|
270 |
COMPONENT_LIBS += gkdebug
|
|
271 |
endif
|
|
272 |
endif
|
|
273 |
|
|
274 |
ifdef MOZ_APP_COMPONENT_LIBS
|
|
275 |
diff --git a/toolkit/library/nsStaticXULComponents.cpp b/toolkit/library/nsStaticXULComponents.cpp
|
|
276 |
--- a/toolkit/library/nsStaticXULComponents.cpp
|
|
277 |
+++ b/toolkit/library/nsStaticXULComponents.cpp
|
|
278 |
@@ -228,21 +228,17 @@
|
|
279 |
#endif
|
|
280 |
|
|
281 |
#if defined(BUILD_CTYPES)
|
|
282 |
#define JSCTYPES_MODULE MODULE(jsctypes)
|
|
283 |
#else
|
|
284 |
#define JSCTYPES_MODULE
|
|
285 |
#endif
|
|
286 |
|
|
287 |
-#ifdef MOZ_SERVICES_SYNC
|
|
288 |
#define SERVICES_CRYPTO_MODULE MODULE(nsServicesCryptoModule)
|
|
289 |
-#else
|
|
290 |
-#define SERVICES_CRYPTO_MODULE
|
|
291 |
-#endif
|
|
292 |
|
|
293 |
#if defined(MOZ_APP_COMPONENT_INCLUDE)
|
|
294 |
#include MOZ_APP_COMPONENT_INCLUDE
|
|
295 |
#else
|
|
296 |
#define APP_COMPONENT_MODULES
|
|
297 |
#endif
|
|
298 |
|
|
299 |
#define XUL_MODULES \
|
|
300 |
diff --git a/toolkit/toolkit-tiers.mk b/toolkit/toolkit-tiers.mk
|
|
301 |
--- a/toolkit/toolkit-tiers.mk
|
|
302 |
+++ b/toolkit/toolkit-tiers.mk
|
|
303 |
@@ -230,19 +230,17 @@ tier_platform_dirs += security/manager
|
|
304 |
else
|
|
305 |
tier_platform_dirs += security/manager/boot/public security/manager/ssl/public
|
|
306 |
endif
|
|
307 |
|
|
308 |
ifdef MOZ_PREF_EXTENSIONS
|
|
309 |
tier_platform_dirs += extensions/pref
|
|
310 |
endif
|
|
311 |
|
|
312 |
-ifdef MOZ_SERVICES_SYNC
|
|
313 |
-tier_platform_dirs += services/crypto
|
|
314 |
-endif
|
|
315 |
+tier_platform_dirs += services/crypto/component
|
|
316 |
|
|
317 |
# JavaXPCOM JNI code is compiled into libXUL
|
|
318 |
ifdef MOZ_JAVAXPCOM
|
|
319 |
tier_platform_dirs += extensions/java/xpcom/src
|
|
320 |
endif
|
|
321 |
|
|
322 |
ifndef BUILD_STATIC_LIBS
|
|
323 |
ifneq (,$(MOZ_ENABLE_GTK2))
|