Merge lp:~clint-fewbar/ubuntu/lucid/mongodb/sru-557024 into lp:ubuntu/lucid/mongodb

Proposed by Clint Byrum
Status: Merged
Merge reported by: Evan Broder
Merged at revision: not available
Proposed branch: lp:~clint-fewbar/ubuntu/lucid/mongodb/sru-557024
Merge into: lp:ubuntu/lucid/mongodb
Diff against target: 131 lines (+58/-8)
5 files modified
SConstruct (+4/-4)
buildscripts/hacks_ubuntu.py (+4/-1)
debian/changelog (+13/-0)
debian/rules (+5/-3)
debian/xulwrapper (+32/-0)
To merge this branch: bzr merge lp:~clint-fewbar/ubuntu/lucid/mongodb/sru-557024
Reviewer Review Type Date Requested Status
Stefano Rivera Needs Fixing
Ubuntu Sponsors Pending
Review via email: mp+39908@code.launchpad.net

Description of the change

SRU to lucid that implements the same fix as was done in Maverick.

Tested build and running on clean schroot.

To post a comment you must log in.
11. By Clint Byrum

changing dist to lucid-proposed

Revision history for this message
Stefano Rivera (stefanor) wrote :

> debian/patches/debian-changes-1:1.4.4-2

Was that intentional?

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

No, that got pulled in and I didn't notice it, removed and re-pushed.

12. By Clint Byrum

removing debian-changes-1:1.4.4-2

Revision history for this message
Stefano Rivera (stefanor) wrote :

Now for a proper review:
1. Can we remove those lintian overrides?
2. Should we really be installing /usr/bin/xulwrapper?

review: Needs Fixing
Revision history for this message
Stefano Rivera (stefanor) wrote :

err regarding 1, I see that doesn't make it into the deb any more, that's OK then.

13. By Clint Byrum

filtering xulwrapper from the symlinks for /usr/bin

Revision history for this message
Stefano Rivera (stefanor) :
review: Approve
Revision history for this message
Stefano Rivera (stefanor) wrote :

Err I probably shouldn't have let that through with the added patch system. We don't like those in SRUs without good cause.

review: Needs Fixing
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Without the patches, the rpath will remain in the binaries, which was something made a priority in the dev fix.

Its not clear what I should do to fix this merge. Should the patches be made in the debian dir diff directly then, or not at all?

14. By Clint Byrum

use dh_link for symlinks

15. By Clint Byrum

removing patch system -- patch applied inline

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Ok, much smaller patch now with inline changes and no quilt.

16. By Clint Byrum

moving to proposed pocket

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

This failed PPA build with this error:

dpkg-deb: building package `mongodb' in `../mongodb_1.2.2-1ubuntu1.1~ppa1_i386.deb'.
tar: ./usr/bin/mongo: file changed as we read it

I'm not really sure how this would happen. Any ideas anybody?

https://launchpad.net/~clint-fewbar/+archive/fixes/+build/2037554

It succeeds when building in a lucid schroot though.

Revision history for this message
Stefano Rivera (stefanor) wrote :

Yeah builds fine in my pbuilder and fails in PPAs, not sure what the problem is. You got anywhere with debugging it?

Looks like there's an unnecessary, whitespace-only hunk in debian/rules. Also whenever using \; in makefiles please use set -e (debian policy 4.6)

Revision history for this message
Evan Broder (broder) wrote :

I added a bunch of debugging code to the build rig and uploaded this: https://launchpad.net/~broder/+archive/ubuntu-tests/+build/2066048

I'm still not entirely sure what's going on, but something happens to the /usr/bin/mongo symlink. By the time you get to the bare, top-level dh_link invocation (i.e. just before dh_strip), the /usr/bin/mongo symlink is gone (because dh_link is touching all the symlinks and it doesn't touch that one)

Revision history for this message
Evan Broder (broder) wrote :

Curiouser and curiouser.

More debugging info in https://launchpad.net/~broder/+archive/ubuntu-tests/+build/2066065

One thing I noticed this time is that every time you run dh_link in the for loop, it touches each symlink you've created so far (touching them up to fix relative/absolute issues, etc.)

But it never touches /usr/bin/mongo after initially creating it, which makes me thing that something's going wrong more or less immediately when it's creating the symlink.

Also interesting is that the file size of /usr/bin/mongo is 25 bytes, which is the same as the length of "../lib/mongodb/xulwrapper", which makes me figure that /usr/bin/mongo's type is just getting marked wrong some how.

17. By Clint Byrum

SConstruct: patching install to place executables in /usr/lib/mongodb

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'SConstruct'
2--- SConstruct 2010-02-17 08:50:07 +0000
3+++ SConstruct 2010-11-27 09:30:12 +0000
4@@ -552,8 +552,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@@ -1296,9 +1296,9 @@
16 e.Alias( name , name + ".exe" )
17 name += ".exe"
18
19- inst = e.Install( installDir + "/bin" , name )
20+ inst = e.Install( installDir + "/lib/mongodb" , name )
21
22- fullInstallName = installDir + "/bin/" + name
23+ fullInstallName = installDir + "/lib/mongodb/" + name
24
25 allBinaries += [ name ]
26 if solaris or linux:
27
28=== modified file 'buildscripts/hacks_ubuntu.py'
29--- buildscripts/hacks_ubuntu.py 2010-04-23 00:43:22 +0000
30+++ buildscripts/hacks_ubuntu.py 2010-11-27 09:30:12 +0000
31@@ -36,7 +36,6 @@
32 return False
33
34 env.Prepend( LIBPATH=[ libroot ] )
35- env.Prepend( RPATH=[ libroot ] )
36
37 env.Prepend( CPPPATH=[ incroot + "stable/" ,
38 incroot + "unstable/" ,
39@@ -46,4 +45,8 @@
40 env.Append( CPPDEFINES=[ "XULRUNNER" , "OLDJS" ] )
41 if best.find( "1.9.0" ) >= 0:
42 env.Append( CPPDEFINES=[ "XULRUNNER190" ] )
43+
44+ # Needed to run tests
45+ env.AppendENVPath('LD_LIBRARY_PATH', libroot)
46+
47 return True
48
49=== modified file 'debian/changelog'
50--- debian/changelog 2010-04-23 00:43:22 +0000
51+++ debian/changelog 2010-11-27 09:30:12 +0000
52@@ -1,3 +1,16 @@
53+mongodb (1:1.2.2-1ubuntu1.1) lucid-proposed; urgency=low
54+
55+ [ Clint Byrum ]
56+ * debian/rules: install xulwrapper and symlinks to it (LP: #557024)
57+ - add quilt commands to patch out rpath
58+ * SConstruct, buildscripts/hacks_ubuntu.py: backported patch
59+ from maverick release 1:1.4.4-2ubuntu2 -- removes rpath
60+
61+ [ Evan Broder ]
62+ * SConstruct: patching install to place executables in /usr/lib/mongodb
63+
64+ -- Clint Byrum <clint@ubuntu.com> Sat, 27 Nov 2010 01:25:28 -0800
65+
66 mongodb (1:1.2.2-1ubuntu1) lucid; urgency=low
67
68 [ Richard M Kreuter ]
69
70=== modified file 'debian/rules'
71--- debian/rules 2010-02-17 08:50:07 +0000
72+++ debian/rules 2010-11-27 09:30:12 +0000
73@@ -62,6 +62,7 @@
74 rm -f buildscripts/*.pyc
75 rm -f *.pyc
76 rm -f buildinfo.cpp
77+
78 dh_clean debian/files
79
80 install: build
81@@ -72,9 +73,10 @@
82
83 scons --prefix=$(CURDIR)/debian/mongodb/usr install
84
85- mkdir -p $(CURDIR)/debian/mongodb/usr/share/lintian/overrides/
86- install -m 644 $(CURDIR)/debian/lintian-overrides \
87- $(CURDIR)/debian/mongodb/usr/share/lintian/overrides/mongodb
88+ install -m 755 $(CURDIR)/debian/xulwrapper $(CURDIR)/debian/mongodb/usr/lib/mongodb
89+ for i in `ls $(CURDIR)/debian/mongodb/usr/lib/mongodb | grep -v xulwrapper` ; do \
90+ dh_link usr/lib/mongodb/xulwrapper usr/bin/`basename $$i` ; \
91+ done
92
93 mkdir -p $(CURDIR)/debian/mongodb/etc
94 install -m 644 $(CURDIR)/debian/mongodb.conf \
95
96=== added file 'debian/xulwrapper'
97--- debian/xulwrapper 1970-01-01 00:00:00 +0000
98+++ debian/xulwrapper 2010-11-27 09:30:12 +0000
99@@ -0,0 +1,32 @@
100+#!/bin/sh
101+# xulwrapper - a tiny wrapper for starting mongodb
102+#
103+# Copyright (c) 2010, Canonical Ltd.
104+# Author: Clint Byrum <clint@ubuntu.com>
105+#
106+# This program is free software; you can redistribute it and/or modify
107+# it under the terms of the GNU General Public License as published by
108+# the Free Software Foundation; either version 2 of the License, or
109+# (at your option) any later version.
110+#
111+# This program is distributed in the hope that it will be useful,
112+# but WITHOUT ANY WARRANTY; without even the implied warranty of
113+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
114+# GNU General Public License for more details.
115+#
116+# You should have received a copy of the GNU General Public License
117+# along with this program; see the file COPYING. If not, write to
118+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
119+# Boston, MA 02111-1307, USA.
120+#
121+# This wrapper is necessary as xulrunner does not follow normal library sematics
122+# Please see https://bugs.launchpad.net/ubuntu/+source/xulrunner-1.9.2/+bug/286906
123+# for more information.
124+#
125+export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}/usr/lib/xulrunner-`xulrunner-1.9.2 --gre-version`
126+bname=`basename $0`
127+if [ "$bname" = "xulwrapper" ] ; then
128+ echo xulwrapper must not be used to wrap itself. Paradox avoided.
129+ exit 1
130+fi
131+exec "/usr/lib/mongodb/$bname" "$@"

Subscribers

People subscribed via source and target branches

to all changes: