Merge lp:~xnox/xulrunner/1.9.1.head-dh_xulrunner into lp:~mozillateam/xulrunner/xulrunner-1.9.1.head

Proposed by Dimitri John Ledkov
Status: Merged
Approved by: Micah Gersten
Approved revision: not available
Merged at revision: not available
Proposed branch: lp:~xnox/xulrunner/1.9.1.head-dh_xulrunner
Merge into: lp:~mozillateam/xulrunner/xulrunner-1.9.1.head
Diff against target: 160 lines (+103/-1)
6 files modified
debian/changelog (+5/-1)
debian/dh/dh_xulrunner.in (+78/-0)
debian/dh/xulrunner.pm (+8/-0)
debian/rules (+9/-0)
debian/xulrunner-1.9.1-dev.install (+2/-0)
debian/xulrunner-1.9.1-dev.manpages (+1/-0)
To merge this branch: bzr merge lp:~xnox/xulrunner/1.9.1.head-dh_xulrunner
Reviewer Review Type Date Requested Status
Micah Gersten (community) Approve
Review via email: mp+16649@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Added dh_xulrunner from Debian.

Revision history for this message
Micah Gersten (micahg) wrote :

dh_xulrunner.in POD docs should show Ubuntu version that added xulrunner-dev since we won't be sync'ing it with debian

debhelper minimum required version should be mentioned in the documentation as well since we backport this package in the dailies all the way to hardy

Revision history for this message
Micah Gersten (micahg) wrote :

Ubuntu version minimum should be 1.9.1.6+nobinonly-0ubuntu2

521. By Dimitri John Ledkov

Updated doc string on usage

522. By Dimitri John Ledkov

Deleted extra whitespace

523. By Dimitri John Ledkov

Bumped version number higher

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

* Added documentation with minimum version of xulrunner-dev to depend on.

* No special debhelper dependency should be mentioned:
  + dh_xulrunner does not use anything fancy from debhelper interface: iterating over
    all packages & adding subsittues to ${misc:Depends}. As far as I can see any
    debhelper >= 5 (Dapper Drake) should do

  + dh sequence add-ons are optional you can use them if your debhelper supports them.

Revision history for this message
Micah Gersten (micahg) wrote :

+1 from me, thanks for the work dmitrij.ledkov

@asac or @fta

I'm waiting for one of you to do this since I'm not sure if I missed anything. Plus, I can't release a version yet :)

Revision history for this message
Micah Gersten (micahg) wrote :

asac reviewed and approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2009-12-16 17:30:46 +0000
3+++ debian/changelog 2010-01-01 00:19:11 +0000
4@@ -1,11 +1,15 @@
5 xulrunner-1.9.1 (1.9.1.7~hg20091216r26670+nobinonly-0ubuntu1) UNRELEASED; urgency=low
6
7+ [ Micah Gersten ]
8 * Drop patch after upstream landing of (bmo: 521780) aka
9 extension upgrade with a moved location breaks extension manager
10 - drop debian/patches/lp441552_bz521780_att407108.patch
11 - update debian/patches/series
12
13- -- Micah Gersten <micahg@ubuntu.com> Wed, 16 Dec 2009 11:29:55 -0600
14+ [ Dmitrijs Ledkovs ]
15+ * Added dh_xulrunner from Debian (LP: #498973)
16+
17+ -- Dmitrijs Ledkovs <dmitrij.ledkov@gmail.com> Tue, 29 Dec 2009 15:45:14 +0000
18
19 xulrunner-1.9.1 (1.9.1.6+nobinonly-0ubuntu1) lucid; urgency=low
20
21
22=== added directory 'debian/dh'
23=== added file 'debian/dh/dh_xulrunner.in'
24--- debian/dh/dh_xulrunner.in 1970-01-01 00:00:00 +0000
25+++ debian/dh/dh_xulrunner.in 2010-01-01 00:19:11 +0000
26@@ -0,0 +1,78 @@
27+#!/usr/bin/perl -w
28+
29+=head1 NAME
30+
31+dh_xulrunner - sets xulrunner dependencies
32+
33+=cut
34+
35+use strict;
36+use Debian::Debhelper::Dh_Lib;
37+
38+=head1 SYNOPSIS
39+
40+B<dh_xulrunner> [S<I<debhelper options>>]
41+
42+=head1 DESCRIPTION
43+
44+dh_xulrunner adds the xulrunner binary package corresponding to the installed
45+xulrunner-dev package to the B<shlibs:Depends> substvar. It only does so for
46+packages containing an executable or a library that it detects as containing
47+the XPCOM glue (please note the detection is really hackish and error prone,
48+though most likely accurate in most cases).
49+
50+On Ubuntu, using dh_xulrunner requires a build dependency on xulrunner-dev
51+(>= 1.9.1.6+nobinonly-0ubuntu2) part of Lucid Lynx 10.10
52+
53+=cut
54+
55+init();
56+
57+foreach my $package (@{$dh{DOPACKAGES}}) {
58+ # The following is mostly stolen from dh_shlibdeps
59+ my $tmp=tmpdir($package);
60+ my $ff;
61+
62+ # Generate a list of ELF binaries in the package, ignoring any
63+ # we were told to exclude.
64+ my $find_options='';
65+ if (defined($dh{EXCLUDE_FIND}) && $dh{EXCLUDE_FIND} ne '') {
66+ $find_options="! \\( $dh{EXCLUDE_FIND} \\)";
67+ }
68+ foreach my $file (split(/\n/,`find $tmp -type f \\( -perm +111 -or -name "*.so*" -or -name "*.cmxs" \\) $find_options -print`)) {
69+ # Prune directories that contain separated debug symbols.
70+ next if $file=~m!^\Q$tmp\E/usr/lib/debug/(lib|lib64|usr|bin|sbin|opt|dev|emul)/!;
71+ # TODO this is slow, optimize. Ie, file can run once on
72+ # multiple files..
73+ $ff=`file "$file"`;
74+ if ($ff=~m/ELF/) {
75+ my @strings = ( "GRE_HOME", "MOZ_GRE_CONF", "USE_LOCAL_GRE", "/etc/gre.d", "%s/libxul.so" );
76+ open FILE, "readelf -p .rodata \"$file\" |";
77+ while (<FILE>) {
78+ for(my $i = 0; $i <= $#strings; $i++) {
79+ if (m{$strings[$i]}) {
80+ splice @strings, $i, 1;
81+ last;
82+ }
83+ }
84+ if ($#strings < 0) {
85+ addsubstvar($package, "shlibs:Depends", "xulrunner-##BASE_VERSION##");
86+ last;
87+ }
88+ }
89+ close FILE;
90+ }
91+ }
92+}
93+
94+=head1 SEE ALSO
95+
96+L<debhelper(7)>
97+
98+This program is a part of xulrunner-dev.
99+
100+=head1 AUTHOR
101+
102+Mike Hommey <glandium@debian.org>
103+
104+=cut
105
106=== added file 'debian/dh/xulrunner.pm'
107--- debian/dh/xulrunner.pm 1970-01-01 00:00:00 +0000
108+++ debian/dh/xulrunner.pm 2010-01-01 00:19:11 +0000
109@@ -0,0 +1,8 @@
110+#!/usr/bin/perl
111+use warnings;
112+use strict;
113+use Debian::Debhelper::Dh_Lib;
114+
115+insert_after("dh_shlibdeps", "dh_xulrunner");
116+
117+1;
118
119=== modified file 'debian/rules'
120--- debian/rules 2009-12-11 13:47:09 +0000
121+++ debian/rules 2010-01-01 00:19:11 +0000
122@@ -254,6 +254,8 @@
123 debian/$(DEB_MOZ_APPLICATION).postinst \
124 debian/$(DEB_MOZ_APPLICATION).prerm \
125 debian/$(DEB_MOZ_APPLICATION).postrm \
126+ debian/dh/dh_xulrunner.1 \
127+ debian/dh/dh_xulrunner \
128 $(NULL)
129
130 # debian/<pkg>.install.<arch> files to be generated from debian/<pkg>.install.<arch>.pp
131@@ -261,6 +263,13 @@
132 $(patsubst %.pp,%,$(foreach file,$(DEB_ALL_PACKAGES),$(wildcard debian/$(file).install.$(DEB_BUILD_ARCH).pp))) \
133 $(NULL)
134
135+# Generating dh_xulrunner
136+debian/dh/dh_xulrunner.1: debian/dh/dh_xulrunner
137+ pod2man -c Debhelper -r $(DEBIAN_XUL_VER) $^ > $@
138+
139+debian/dh/dh_xulrunner: debian/dh/dh_xulrunner.in
140+ sed 's/##BASE_VERSION##/$(DEBIAN_XUL_VER)/' $^ > $@
141+
142 post-patches:: $(subst_files) $(install_files) debian/build-system.tar.gz
143
144 debian/build-system.tar.gz:
145
146=== modified file 'debian/xulrunner-1.9.1-dev.install'
147--- debian/xulrunner-1.9.1-dev.install 2009-09-02 13:46:40 +0000
148+++ debian/xulrunner-1.9.1-dev.install 2010-01-01 00:19:11 +0000
149@@ -19,3 +19,5 @@
150 debian/tmp/usr/lib/pkgconfig/mozilla-plugin.pc /usr/lib/pkgconfig/
151 debian/tmp/usr/lib/pkgconfig/mozilla-js.pc /usr/lib/pkgconfig/
152
153+debian/dh/dh_xulrunner /usr/bin
154+debian/dh/xulrunner.pm /usr/share/perl5/Debian/Debhelper/Sequence
155
156=== added file 'debian/xulrunner-1.9.1-dev.manpages'
157--- debian/xulrunner-1.9.1-dev.manpages 1970-01-01 00:00:00 +0000
158+++ debian/xulrunner-1.9.1-dev.manpages 2010-01-01 00:19:11 +0000
159@@ -0,0 +1,1 @@
160+debian/dh/dh_xulrunner.1

Subscribers

People subscribed via source and target branches