diff --git a/gparted-realpath-fix.patch b/gparted-realpath-fix.patch new file mode 100644 index 0000000..af44446 --- /dev/null +++ b/gparted-realpath-fix.patch @@ -0,0 +1,28 @@ +--- src/GParted_Core.cc 2006-12-05 14:39:31.000000000 -0500 ++++ src/GParted_Core.cc.new 2007-11-22 00:01:43.000000000 -0500 +@@ -487,19 +487,23 @@ + while ( getline( proc_partitions, line ) ) + if ( sscanf( line .c_str(), "%*d %*d %*d %255s", c_str ) == 1 ) + { ++ char *real_path = NULL; ++ + line = "/dev/" ; + line += c_str ; + + //FIXME: it seems realpath is very unsafe to use (manpage)... ++ real_path = realpath( line .c_str(), NULL ) ; + if ( file_test( line, Glib::FILE_TEST_EXISTS ) && +- realpath( line .c_str(), c_str ) && ++ real_path && + line != c_str ) + { + //because we can make no assumption about which path libparted will detect + //we add all combinations. + alternate_paths[ c_str ] = line ; +- alternate_paths[ line ] = c_str ; + } ++ if ( real_path ) ++ free( real_path ) ; + } + + proc_partitions .close() ; diff --git a/gparted-refresh_crash-fix.patch b/gparted-refresh_crash-fix.patch new file mode 100644 index 0000000..6d0bcf8 --- /dev/null +++ b/gparted-refresh_crash-fix.patch @@ -0,0 +1,38 @@ +--- include/Win_GParted.h 2006-11-25 09:56:30.000000000 -0500 ++++ include/Win_GParted.h.new 2007-10-30 00:37:29.000000000 -0400 +@@ -233,6 +233,7 @@ + unsigned short new_count;//new_count keeps track of the new created partitions + FS fs ; + bool OPERATIONSLIST_OPEN ; ++ sigc::connection combo_devices_signal_changed_id ; + + GParted_Core gparted_core ; + std::vector device_info ; +--- src/Win_GParted.cc 2006-12-01 08:14:23.000000000 -0500 ++++ src/Win_GParted.cc.new 2007-10-30 00:35:47.000000000 -0400 +@@ -260,7 +260,8 @@ + combo_devices .pack_start( treeview_devices_columns .device ) ; + combo_devices .pack_start( treeview_devices_columns .size, false ) ; + +- combo_devices .signal_changed() .connect( sigc::mem_fun(*this, &Win_GParted::combo_devices_changed) ); ++ combo_devices_signal_changed_id = ++ combo_devices .signal_changed() .connect( sigc::mem_fun(*this, &Win_GParted::combo_devices_changed) ); + + hbox_toolbar .pack_start( combo_devices, Gtk::PACK_SHRINK ) ; + } +@@ -502,6 +503,7 @@ + + void Win_GParted::refresh_combo_devices() + { ++ combo_devices_signal_changed_id .block() ; + liststore_devices ->clear() ; + + menu = manage( new Gtk::Menu() ) ; +@@ -538,6 +540,7 @@ + menubar_main .items()[ 0 ] .get_submenu() ->items()[ 1 ] .set_submenu( *menu ) ; + } + ++ combo_devices_signal_changed_id .unblock() ; + combo_devices .set_active( current_device ) ; + } + diff --git a/gparted.spec b/gparted.spec index 7f967d6..9014350 100644 --- a/gparted.spec +++ b/gparted.spec @@ -1,12 +1,14 @@ Summary: Gnome Partition Editor Name: gparted Version: 0.3.3 -Release: 3%{?dist} +Release: 4%{?dist} Group: Applications/System License: GPL URL: http://gparted.sourceforge.net Source0: http://dl.sf.net/sourceforge/%{name}/%{name}-%{version}.tar.bz2 -Patch0: gparted-devices.patch +Patch0: gparted-devices.patch +Patch1: gparted-realpath-fix.patch +Patch2: gparted-refresh_crash-fix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gtkmm24-devel parted-devel BuildRequires: e2fsprogs-devel gettext perl(XML::Parser) @@ -22,6 +24,8 @@ will be detected at runtime and don't require a rebuild of GParted %prep %setup -q %patch0 -p0 -b .devs +%patch1 -p0 -b .realpath +%patch2 -p0 -b .refresh %build %configure @@ -35,7 +39,6 @@ desktop-file-install --delete-original \ --vendor fedora \ --dir %{buildroot}%{_datadir}/applications \ --mode 0644 \ - --add-category X-Fedora \ %{buildroot}%{_datadir}/applications/%{name}.desktop #### consolehelper stuff (stolen from extras' synaptic) @@ -79,6 +82,11 @@ rm -rf %{buildroot} %config(noreplace) %{_sysconfdir}/security/console.apps/gparted %changelog +* Sun Dec 16 2007 Deji Akingunola - 0.3.3-4 +- Branch off for EL-5 +- Apply a couple of patches from F-7 branch +- Remove the X-Fedora category form the desktop file + * Mon Jun 11 2007 Deji Akingunola - 0.3.3-3 - Apply patch to only detect real devices, useful for correcting gparted slow startup in situations when floppy drives doesn't exist but are enabled in bios