Merge lp:~clint-fewbar/ubuntu/maverick/mongodb/add-xulrunner-wrapper into lp:ubuntu/maverick/mongodb
- Maverick (10.10)
- add-xulrunner-wrapper
- Merge into maverick
Status: | Merged |
---|---|
Approved by: | Micah Gersten |
Approved revision: | 14 |
Merged at revision: | 9 |
Proposed branch: | lp:~clint-fewbar/ubuntu/maverick/mongodb/add-xulrunner-wrapper |
Merge into: | lp:ubuntu/maverick/mongodb |
Diff against target: |
244 lines (+92/-34) 11 files modified
SConstruct (+2/-2) buildscripts/hacks_ubuntu.py (+4/-1) debian/changelog (+16/-0) debian/control (+2/-1) debian/copyright (+21/-0) debian/mongodb-clients.install (+8/-8) debian/mongodb-clients.lintian (+0/-9) debian/mongodb-server.install (+2/-3) debian/mongodb-server.lintian (+0/-4) debian/rules (+5/-6) debian/xulwrapper (+32/-0) |
To merge this branch: | bzr merge lp:~clint-fewbar/ubuntu/maverick/mongodb/add-xulrunner-wrapper |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Micah Gersten (community) | Needs Fixing | ||
Ubuntu branches | Pending | ||
Review via email: mp+32504@code.launchpad.net |
Commit message
Description of the change
Adds xulrunner wrapper and ensures dependencies are right for mongodb-clients.
Clint Byrum (clint-fewbar) wrote : | # |
Micah Gersten (micahg) wrote : | # |
I'll look at this over the weekend.
Chris Coulson (chrisccoulson) wrote : | # |
Are the lintian overrides really necessary? (ie, are the binaries really specifying a rpath to /usr/lib64/
Micah Gersten (micahg) wrote : | # |
Yeah, that's a problem too, but the bigger issue is the scons check
locally when building fails when it can't find a top level mozjs lib but
seems to work for Clint.
On 08/17/2010 03:35 PM, Chris Coulson wrote:
> Are the lintian overrides really necessary? (ie, are the binaries really specifying a rpath to /usr/lib64/
Clint Byrum (clint-fewbar) wrote : | # |
The reason for this is sort of covered in
https:/
Basically, xulrunner's upstream does not guarantee ABI compatibility, so we're writing wrappers to find the new versions. I do find this a little counter-productive, as it will still break when ABI compatibility breaks with a wrapper in the same way it would break if we put it in /usr/lib and didn't bump soname.
I guess nobody is willing to fork xulrunner and produce stable releases though, so until that happens, we're stuck with wrappers and lintian overrides.
Micah Gersten (micahg) wrote : | # |
That wasn't the question, the previous merge included some lintian
overrides which should've been dropped since we don't have those paths.
On 08/17/2010 03:45 PM, Clint Byrum wrote:
> The reason for this is sort of covered in
>
> https:/
>
> Basically, xulrunner's upstream does not guarantee ABI compatibility, so we're writing wrappers to find the new versions. I do find this a little counter-productive, as it will still break when ABI compatibility breaks with a wrapper in the same way it would break if we put it in /usr/lib and didn't bump soname.
>
> I guess nobody is willing to fork xulrunner and produce stable releases though, so until that happens, we're stuck with wrappers and lintian overrides.
Chris Coulson (chrisccoulson) wrote : | # |
I just tried building this, and the binaries are specifying a rpath to the correct location (so, it actually throws out a whole bunch of lintian errors, as the overrides are out-of-date).
I think the build system should be fixed to remove these rpath's, as they don't make sense when the directory changes so frequently and you are using LD_LIBRARY_PATH anyway
- 10. By Clint Byrum
-
patched SConstruct + buildscripts/
hacks_ubuntu. py: removing rpath
because wrapper is used
Clint Byrum (clint-fewbar) wrote : | # |
I have removed the usage of rpath from the package entirely, and patched the hacks_ubuntu.py file to set LD_LIBRARY_PATH, allowing the tests and tools to run without incident.
- 11. By Clint Byrum
-
Removing debian/
mongodb- server. lintian -- rpath is no longer used
Clint Byrum (clint-fewbar) wrote : | # |
Ugh and now I just realized the out-of-debian-dir changes came through rather than the patch that I created...
Of course, if you branch this and run
bzr-buildpackage -S
It does generate the patch properly...
Merge reviewers, please advise, would you rather a new merge proposal with the patch be submitted, or handle such a transformation yourselves on upload?
Micah Gersten (micahg) wrote : | # |
In the middle of a test build, but debian/
Micah Gersten (micahg) wrote : | # |
Build failure:
install -m 644 /tmp/buildd/
install: cannot stat `/tmp/buildd/
make: *** [install] Error 1
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
- 12. By Clint Byrum
-
Removing debian/
mongodb- clients. lintian -- rpath is no longer used - 13. By Clint Byrum
-
removing lintian overrides from .install files
Clint Byrum (clint-fewbar) wrote : | # |
Hi Micah, I removed mongodb-
I had this build failure in pbuilder:
...
g++ -o tools/export.o -c -Wnon-virtual-dtor -fPIC -fno-strict-
g++ -o mongoexport -fPIC -pthread -rdynamic stdafx.o buildinfo.o db/common.o db/jsobj.o db/json.o db/lasterror.o db/nonce.o db/queryutil.o shell/mongo.o util/background.o util/mmap.o util/sock.o util/util.o util/message.o util/assert_util.o util/httpclient.o util/md5main.o util/base64.o util/debug_util.o util/thread_pool.o util/md5.o client/connpool.o client/dbclient.o client/model.o client/parallel.o client/
collect2: ld returned 1 exit status
scons: *** [mongoexport] Error 1
scons: building terminated because of errors.
make: *** [install] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
I've uploaded it to a PPA to see if maybe there was just something wrong with my builder setup..
https:/
- 14. By Clint Byrum
-
more robust way to add items to LD_LIBRARY_PATH per micahg and kees
Clint Byrum (clint-fewbar) wrote : | # |
After discussing this with micahg, I just pushed a new version up that uses a more robust method to add to LD_LIBRARY_PATH.
Micah Gersten (micahg) wrote : | # |
This looks, good I just need to check one thing with the security team before I upload. It now builds and will make a source build w/out issue. Thanks for all the hard work!
Preview Diff
1 | === modified file 'SConstruct' |
2 | --- SConstruct 2010-07-09 21:26:05 +0000 |
3 | +++ SConstruct 2010-09-29 21:59:44 +0000 |
4 | @@ -672,8 +672,8 @@ |
5 | if not nojni: |
6 | javaLibs += [ "java" , "jvm" ] |
7 | |
8 | - env.Append( LINKFLAGS="-Xlinker -rpath -Xlinker " + javaHome + "jre/lib/" + javaVersion + "/server" ) |
9 | - env.Append( LINKFLAGS="-Xlinker -rpath -Xlinker " + javaHome + "jre/lib/" + javaVersion ) |
10 | + env.Append( LINKFLAGS="-Xlinker -Xlinker " + javaHome + "jre/lib/" + javaVersion + "/server" ) |
11 | + env.Append( LINKFLAGS="-Xlinker -Xlinker " + javaHome + "jre/lib/" + javaVersion ) |
12 | |
13 | if nix: |
14 | env.Append( CPPFLAGS="-fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch" ) |
15 | |
16 | === modified file 'buildscripts/hacks_ubuntu.py' |
17 | --- buildscripts/hacks_ubuntu.py 2010-06-10 15:25:34 +0000 |
18 | +++ buildscripts/hacks_ubuntu.py 2010-09-29 21:59:44 +0000 |
19 | @@ -36,7 +36,6 @@ |
20 | return False |
21 | |
22 | env.Prepend( LIBPATH=[ libroot ] ) |
23 | - env.Prepend( RPATH=[ libroot ] ) |
24 | |
25 | env.Prepend( CPPPATH=[ incroot + "stable/" , |
26 | incroot + "unstable/" , |
27 | @@ -44,6 +43,10 @@ |
28 | env.Prepend( CPPPATH=[ "/usr/include/nspr/" ] ) |
29 | |
30 | env.Append( CPPDEFINES=[ "XULRUNNER" , "OLDJS" ] ) |
31 | + |
32 | + # Needed to run tests |
33 | + env.AppendENVPath('LD_LIBRARY_PATH', libroot) |
34 | + |
35 | if best.find( "1.9.0" ) >= 0 or best.endswith("1.9"): |
36 | if best.endswith( "1.9.1.9" ): |
37 | pass |
38 | |
39 | === modified file 'debian/changelog' |
40 | --- debian/changelog 2010-07-10 06:40:58 +0000 |
41 | +++ debian/changelog 2010-09-29 21:59:44 +0000 |
42 | @@ -1,3 +1,19 @@ |
43 | +mongodb (1:1.4.4-2ubuntu2) maverick; urgency=low |
44 | + |
45 | + * Providing a wrapper for xulrunner (LP: #557024) |
46 | + - Moves all binaries under /usr/lib/mongodb |
47 | + - adds xulwrapper script to mongodb-clients |
48 | + - Sets up symlinks to xulwrapper in /usr/bin for all binaries in |
49 | + /usr/lib/mongodb |
50 | + - Adding dependency on xulrunner-1.9.2 to mongodb-clients as these |
51 | + binaries require the library as well. |
52 | + - patched SConstruct + buildscripts/hacks_ubuntu.py: removing rpath |
53 | + because wrapper is used |
54 | + - Removing debian/mongodb-server.lintian -- rpath is no longer used |
55 | + - Removing debian/mongodb-clients.lintian -- rpath is no longer used |
56 | + |
57 | + -- Clint Byrum <clint@ubuntu.com> Tue, 21 Sep 2010 22:02:12 -0700 |
58 | + |
59 | mongodb (1:1.4.4-2ubuntu1) maverick; urgency=low |
60 | |
61 | * Merge from debian unstable (LP: #605383). Remaining changes: |
62 | |
63 | === modified file 'debian/control' |
64 | --- debian/control 2010-07-10 06:40:58 +0000 |
65 | +++ debian/control 2010-09-29 21:59:44 +0000 |
66 | @@ -57,7 +57,8 @@ |
67 | |
68 | Package: mongodb-clients |
69 | Architecture: i386 amd64 |
70 | -Depends: ${shlibs:Depends}, ${misc:Depends} |
71 | +Depends: ${shlibs:Depends}, ${misc:Depends}, |
72 | + xulrunner-1.9.2 |
73 | Replaces: mongodb (<= 1:1.4.2-2) |
74 | Description: An object/document-oriented database (client apps) |
75 | MongoDB is a high-performance, open source, schema-free |
76 | |
77 | === modified file 'debian/copyright' |
78 | --- debian/copyright 2010-06-07 08:27:36 +0000 |
79 | +++ debian/copyright 2010-09-29 21:59:44 +0000 |
80 | @@ -228,3 +228,24 @@ |
81 | |
82 | L. Peter Deutsch |
83 | ghost@aladdin.com |
84 | + |
85 | +Files: debian/xulwrapper |
86 | +Copyright: Copyright (c) 2010, Canonical Ltd. |
87 | +License: GPL-2+ |
88 | + This program is free software; you can redistribute it and/or modify |
89 | + it under the terms of the GNU General Public License as published by |
90 | + the Free Software Foundation; either version 2 of the License, or |
91 | + (at your option) any later version. |
92 | + . |
93 | + This program is distributed in the hope that it will be useful, |
94 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
95 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
96 | + GNU General Public License for more details. |
97 | + . |
98 | + You should have received a copy of the GNU General Public License |
99 | + along with this program; see the file COPYING. If not, write to |
100 | + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
101 | + Boston, MA 02111-1307, USA. |
102 | + . |
103 | + On Debian systems the full text of the license is available at |
104 | + /usr/share/common-licenses/GPL-2 |
105 | |
106 | === modified file 'debian/mongodb-clients.install' |
107 | --- debian/mongodb-clients.install 2010-05-11 22:21:13 +0000 |
108 | +++ debian/mongodb-clients.install 2010-09-29 21:59:44 +0000 |
109 | @@ -1,11 +1,11 @@ |
110 | -usr/bin/mongo |
111 | -usr/bin/mongodump |
112 | -usr/bin/mongoexport |
113 | -usr/bin/mongofiles |
114 | -usr/bin/mongoimport |
115 | -usr/bin/mongorestore |
116 | -usr/bin/mongostat |
117 | -usr/share/lintian/overrides/mongodb-clients |
118 | +usr/bin/mongo usr/lib/mongodb |
119 | +usr/bin/mongodump usr/lib/mongodb |
120 | +usr/bin/mongoexport usr/lib/mongodb |
121 | +usr/bin/mongofiles usr/lib/mongodb |
122 | +usr/bin/mongoimport usr/lib/mongodb |
123 | +usr/bin/mongorestore usr/lib/mongodb |
124 | +usr/bin/mongostat usr/lib/mongodb |
125 | +debian/xulwrapper usr/lib/mongodb |
126 | usr/share/man/man1/mongo.1 |
127 | usr/share/man/man1/mongodump.1 |
128 | usr/share/man/man1/mongoexport.1 |
129 | |
130 | === removed file 'debian/mongodb-clients.lintian' |
131 | --- debian/mongodb-clients.lintian 2010-05-11 22:21:13 +0000 |
132 | +++ debian/mongodb-clients.lintian 1970-01-01 00:00:00 +0000 |
133 | @@ -1,9 +0,0 @@ |
134 | -# Agreed with upstream, that redefining rpath is necessary as xulrunner used to |
135 | -# change API without changing so-name |
136 | -mongodb-clients: binary-or-shlib-defines-rpath ./usr/bin/mongo /usr/lib64/xulrunner-1.9.1 |
137 | -mongodb-clients: binary-or-shlib-defines-rpath ./usr/bin/mongodump /usr/lib64/xulrunner-1.9.1 |
138 | -mongodb-clients: binary-or-shlib-defines-rpath ./usr/bin/mongoexport /usr/lib64/xulrunner-1.9.1 |
139 | -mongodb-clients: binary-or-shlib-defines-rpath ./usr/bin/mongofiles /usr/lib64/xulrunner-1.9.1 |
140 | -mongodb-clients: binary-or-shlib-defines-rpath ./usr/bin/mongoimport /usr/lib64/xulrunner-1.9.1 |
141 | -mongodb-clients: binary-or-shlib-defines-rpath ./usr/bin/mongorestore /usr/lib64/xulrunner-1.9.1 |
142 | -mongodb-clients: binary-or-shlib-defines-rpath ./usr/bin/mongostat /usr/lib64/xulrunner-1.9.1 |
143 | |
144 | === modified file 'debian/mongodb-server.install' |
145 | --- debian/mongodb-server.install 2010-05-11 22:21:13 +0000 |
146 | +++ debian/mongodb-server.install 2010-09-29 21:59:44 +0000 |
147 | @@ -1,6 +1,5 @@ |
148 | etc |
149 | -usr/bin/mongod |
150 | -usr/bin/mongos |
151 | -usr/share/lintian/overrides/mongodb-server |
152 | +usr/bin/mongod usr/lib/mongodb |
153 | +usr/bin/mongos usr/lib/mongodb |
154 | usr/share/man/man1/mongod.1 |
155 | usr/share/man/man1/mongos.1 |
156 | |
157 | === removed file 'debian/mongodb-server.lintian' |
158 | --- debian/mongodb-server.lintian 2010-05-11 22:21:13 +0000 |
159 | +++ debian/mongodb-server.lintian 1970-01-01 00:00:00 +0000 |
160 | @@ -1,4 +0,0 @@ |
161 | -# Agreed with upstream, that redefining rpath is necessary as xulrunner used to |
162 | -# change API without changing so-name |
163 | -mongodb-server: binary-or-shlib-defines-rpath ./usr/bin/mongod /usr/lib64/xulrunner-1.9.1 |
164 | -mongodb-server: binary-or-shlib-defines-rpath ./usr/bin/mongos /usr/lib64/xulrunner-1.9.1 |
165 | |
166 | === modified file 'debian/rules' |
167 | --- debian/rules 2010-05-11 22:21:13 +0000 |
168 | +++ debian/rules 2010-09-29 21:59:44 +0000 |
169 | @@ -70,6 +70,7 @@ |
170 | rm -f buildinfo.cpp |
171 | rm -rf debian/tmp-test |
172 | rm -f debian/mongodb.upstart |
173 | + chmod -x debian/xulwrapper |
174 | dh_clean debian/files |
175 | |
176 | install: build |
177 | @@ -80,12 +81,6 @@ |
178 | |
179 | scons --prefix=$(CURDIR)/debian/tmp/usr install |
180 | |
181 | - mkdir -p $(CURDIR)/debian/tmp/usr/share/lintian/overrides/ |
182 | - install -m 644 $(CURDIR)/debian/mongodb-server.lintian \ |
183 | - $(CURDIR)/debian/tmp/usr/share/lintian/overrides/mongodb-server |
184 | - install -m 644 $(CURDIR)/debian/mongodb-clients.lintian \ |
185 | - $(CURDIR)/debian/tmp/usr/share/lintian/overrides/mongodb-clients |
186 | - |
187 | mkdir -p $(CURDIR)/debian/tmp/etc |
188 | install -m 644 $(CURDIR)/debian/mongodb.conf \ |
189 | $(CURDIR)/debian/tmp/etc/mongodb.conf |
190 | @@ -93,6 +88,8 @@ |
191 | mkdir -p $(CURDIR)/debian/tmp/usr/share/man/man1 |
192 | install -m 644 $(CURDIR)/debian/*.1 \ |
193 | $(CURDIR)/debian/tmp/usr/share/man/man1 |
194 | + chmod +x debian/xulwrapper |
195 | + |
196 | |
197 | # Build architecture-independent files here. |
198 | binary-indep: build install |
199 | @@ -115,6 +112,8 @@ |
200 | dh_installinit -pmongodb-server --name=mongodb |
201 | # dh_installinfo |
202 | dh_installman |
203 | + for i in `ls debian/mongodb-server/usr/lib/mongodb` ; do dh_link -p mongodb-server usr/lib/mongodb/xulwrapper usr/bin/$$i ; done |
204 | + for i in `ls debian/mongodb-clients/usr/lib/mongodb` ; do if [ "$$i" != "xulwrapper" ] ; then dh_link -p mongodb-clients usr/lib/mongodb/xulwrapper usr/bin/$$i ; fi ; done |
205 | dh_link |
206 | dh_strip |
207 | dh_compress |
208 | |
209 | === added file 'debian/xulwrapper' |
210 | --- debian/xulwrapper 1970-01-01 00:00:00 +0000 |
211 | +++ debian/xulwrapper 2010-09-29 21:59:44 +0000 |
212 | @@ -0,0 +1,32 @@ |
213 | +#!/bin/sh |
214 | +# xulwrapper - a tiny wrapper for starting mongodb |
215 | +# |
216 | +# Copyright (c) 2010, Canonical Ltd. |
217 | +# Author: Clint Byrum <clint@ubuntu.com> |
218 | +# |
219 | +# This program is free software; you can redistribute it and/or modify |
220 | +# it under the terms of the GNU General Public License as published by |
221 | +# the Free Software Foundation; either version 2 of the License, or |
222 | +# (at your option) any later version. |
223 | +# |
224 | +# This program is distributed in the hope that it will be useful, |
225 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
226 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
227 | +# GNU General Public License for more details. |
228 | +# |
229 | +# You should have received a copy of the GNU General Public License |
230 | +# along with this program; see the file COPYING. If not, write to |
231 | +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
232 | +# Boston, MA 02111-1307, USA. |
233 | +# |
234 | +# This wrapper is necessary as xulrunner does not follow normal library sematics |
235 | +# Please see https://bugs.launchpad.net/ubuntu/+source/xulrunner-1.9.2/+bug/286906 |
236 | +# for more information. |
237 | +# |
238 | +export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}/usr/lib/xulrunner-`xulrunner-1.9.2 --gre-version` |
239 | +bname=`basename $0` |
240 | +if [ "$bname" = "xulwrapper" ] ; then |
241 | + echo xulwrapper must not be used to wrap itself. Paradox avoided. |
242 | + exit 1 |
243 | +fi |
244 | +exec "/usr/lib/mongodb/$bname" "$@" |
FYI, this successfully built in a PPA:
https:/ /launchpad. net/~clint- fewbar/ +archive/ fixes/+ build/1917295