Merge lp:~jamesodhunt/ubuntu/quantal/debconf/bug-1060249 into lp:ubuntu/raring/debconf

Proposed by James Hunt
Status: Merged
Merged at revision: 67
Proposed branch: lp:~jamesodhunt/ubuntu/quantal/debconf/bug-1060249
Merge into: lp:ubuntu/raring/debconf
Diff against target: 69 lines (+32/-7)
2 files modified
Debconf/FrontEnd/Gnome.pm (+24/-7)
debian/changelog (+8/-0)
To merge this branch: bzr merge lp:~jamesodhunt/ubuntu/quantal/debconf/bug-1060249
Reviewer Review Type Date Requested Status
Ubuntu branches Pending
Review via email: mp+136260@code.launchpad.net

Description of the change

* Debconf/Frontend/Gnome.pm:init(): Only 'use Gtk2;' once it has been
  proven to be safe to avoid rogue Perl module behaviour from crashing
  debconf (#LP: 1060249).

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) wrote :

This has been merged upstream. I'm working on a different problem before preparing a release, and then I think it will be fine to just merge that into raring.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Debconf/FrontEnd/Gnome.pm'
--- Debconf/FrontEnd/Gnome.pm 2011-06-23 06:52:13 +0000
+++ Debconf/FrontEnd/Gnome.pm 2012-11-26 20:29:20 +0000
@@ -14,13 +14,6 @@
14use Debconf::Encoding qw(to_Unicode);14use Debconf::Encoding qw(to_Unicode);
15use base qw{Debconf::FrontEnd};15use base qw{Debconf::FrontEnd};
1616
17# Catch this so as not to confuse the poor users if Gtk or Gnome are not
18# installed.
19eval q{
20 use Gtk2;
21};
22die "Unable to load Gtk -- is libgtk2-perl installed?\n" if $@;
23
24=head1 DESCRIPTION17=head1 DESCRIPTION
2518
26This FrontEnd is a Gnome UI for Debconf.19This FrontEnd is a Gnome UI for Debconf.
@@ -121,11 +114,35 @@
121 }114 }
122 }115 }
123 else {116 else {
117 # Catch scenario where Gtk/Gnome are not installed.
118 use Gtk2;
119
124 @ARGV=@ARGV_for_gnome; # temporary change at first120 @ARGV=@ARGV_for_gnome; # temporary change at first
125 Gtk2->init;121 Gtk2->init;
122
123 # Create a window, but don't show it.
124 #
125 # This has the effect of exercising gtk a bit in an
126 # attempt to force an error either in the gtk bindings
127 # themselves, but hopefully also in
128 # gtk/glib/gsettings/etc. There is no guarantee that
129 # this alone will provoke an error, but it's a
130 # relatively safe and reasonable operation to perform
131 # and further reduces the chance of the parent debconf
132 # process ending up in an unrecoverable state.
133 my $window = Gtk2::Window->new('toplevel');
134
126 exit(0); # success135 exit(0); # success
127 }136 }
128 137
138 # Only load Gtk after the child has successfully proved it can do
139 # the same. This avoids the problem where a module calls into a
140 # native library and causes the perl interpreter to crash. When
141 # we get to here, we know that the child didn't crash, so it
142 # should be safe for us to attempt it.
143 eval q{use Gtk2;};
144 die "Unable to load Gtk -- is libgtk2-perl installed?\n" if $@;
145
129 my @gnome_sucks=@ARGV;146 my @gnome_sucks=@ARGV;
130 @ARGV=@ARGV_for_gnome;147 @ARGV=@ARGV_for_gnome;
131 Gtk2->init;148 Gtk2->init;
132149
=== modified file 'debian/changelog'
--- debian/changelog 2012-08-16 17:37:10 +0000
+++ debian/changelog 2012-11-26 20:29:20 +0000
@@ -1,3 +1,11 @@
1debconf (1.5.46ubuntu2) UNRELEASED; urgency=low
2
3 * Debconf/Frontend/Gnome.pm:init(): Only 'use Gtk2;' once it has been
4 proven to be safe to avoid rogue Perl module behaviour from crashing
5 debconf (#LP: 1060249).
6
7 -- James Hunt <james.hunt@ubuntu.com> Wed, 17 Oct 2012 13:46:47 +0100
8
1debconf (1.5.46ubuntu1) quantal; urgency=low9debconf (1.5.46ubuntu1) quantal; urgency=low
210
3 * Resynchronise with Debian. Remaining changes:11 * Resynchronise with Debian. Remaining changes:

Subscribers

People subscribed via source and target branches

to all changes: