From d9a095811005bd57a7285458cbdba0df46eb802c Mon Sep 17 00:00:00 2001 From: Ankur Sinha Date: Nov 09 2010 18:19:06 +0000 Subject: * Tue Nov 09 2010 Ankur Sinha - 2.11-2 - added patches as per https://bugzilla.redhat.com/show_bug.cgi?id=649545#c9 - https://trac.transmissionbt.com/ticket/3629 - https://trac.transmissionbt.com/ticket/3639 - https://trac.transmissionbt.com/ticket/3666 - https://trac.transmissionbt.com/ticket/3644 --- diff --git a/transmission-3629-3639-3666-3644.patch b/transmission-3629-3639-3666-3644.patch new file mode 100644 index 0000000..5ba5457 --- /dev/null +++ b/transmission-3629-3639-3666-3644.patch @@ -0,0 +1,226 @@ +diff -ur ../transmission-2.11.orig/cli/cli.c ./cli/cli.c +--- ../transmission-2.11.orig/cli/cli.c 2010-10-17 05:44:43.000000000 +0530 ++++ ./cli/cli.c 2010-11-09 20:41:41.803315997 +0530 +@@ -232,13 +232,6 @@ + + printf( "%s %s\n", MY_READABLE_NAME, LONG_VERSION_STRING ); + +- /* the command line overrides defaults */ +- if( parseCommandLine( &settings, argc, (const char**)argv ) ) +- return EXIT_FAILURE; +- +- if( showVersion ) +- return 0; +- + /* user needs to pass in at least one argument */ + if( argc < 2 ) { + tr_getopt_usage( MY_READABLE_NAME, getUsage( ), options ); +@@ -250,6 +243,13 @@ + configDir = getConfigDir( argc, (const char**)argv ); + tr_sessionLoadSettings( &settings, configDir, MY_CONFIG_NAME ); + ++ /* the command line overrides defaults */ ++ if( parseCommandLine( &settings, argc, (const char**)argv ) ) ++ return EXIT_FAILURE; ++ ++ if( showVersion ) ++ return 0; ++ + /* Check the options for validity */ + if( !torrentPath ) { + fprintf( stderr, "No torrent specified!\n" ); +diff -ur ../transmission-2.11.orig/gtk/main.c ./gtk/main.c +--- ../transmission-2.11.orig/gtk/main.c 2010-10-17 05:44:40.000000000 +0530 ++++ ./gtk/main.c 2010-11-09 23:37:42.195065757 +0530 +@@ -1407,41 +1407,40 @@ + } + + static void +-about( GtkWindow * parent ) +-{ +- const char *authors[] = +- { ++about( GtkWindow * parent ) ++{ ++ GtkWidget * d; ++ const char * website_uri = "http://www.transmissionbt.com/"; ++ const char * authors[] = { + "Charles Kerr (Backend; GTK+)", + "Mitchell Livingston (Backend; OS X)", +- "Kevin Glowacz (Web client)", + NULL + }; + +- const char * website_uri = "http://www.transmissionbt.com/"; + + gtk_about_dialog_set_url_hook( onUriClicked, NULL, NULL ); + +- gtk_show_about_dialog( parent, +- "name", g_get_application_name( ), +- "comments", +- _( "A fast and easy BitTorrent client" ), +- "version", LONG_VERSION_STRING, +- "website", website_uri, +- "website-label", website_uri, +- "copyright", +- _( "Copyright (c) The Transmission Project" ), +- "logo-icon-name", MY_CONFIG_NAME, ++ d = g_object_new( GTK_TYPE_ABOUT_DIALOG, ++ "authors", authors, ++ "comments", _( "A fast and easy BitTorrent client" ), ++ "copyright", _( "Copyright (c) The Transmission Project" ), ++ "logo-icon-name", MY_CONFIG_NAME, ++ "name", g_get_application_name( ), ++ /* Translators: translate "translator-credits" as your name ++ to have it appear in the credits in the "About" ++ dialog */ ++ "translator-credits", _( "translator-credits" ), ++ "version", LONG_VERSION_STRING, ++ "website", website_uri, ++ "website-label", website_uri, + #ifdef SHOW_LICENSE +- "license", LICENSE, +- "wrap-license", TRUE, ++ "license", LICENSE, ++ "wrap-license", TRUE, + #endif +- "authors", authors, +- /* Translators: translate "translator-credits" as +- your name +- to have it appear in the credits in the "About" +- dialog */ +- "translator-credits", _( "translator-credits" ), +- NULL ); ++ NULL ); ++ gtk_window_set_transient_for( GTK_WINDOW( d ), parent ); ++ g_signal_connect_swapped( d, "response", G_CALLBACK (gtk_widget_destroy), d ); ++ gtk_widget_show_all( d ); + } + + static void +@@ -1729,9 +1728,8 @@ + { + if( !data->msgwin ) + { +- GtkWidget * win = msgwin_new( data->core ); +- g_signal_connect( win, "destroy", G_CALLBACK( msgwinclosed ), +- NULL ); ++ GtkWidget * win = msgwin_new( data->core, data->wind ); ++ g_signal_connect( win, "destroy", G_CALLBACK( msgwinclosed ), NULL ); + data->msgwin = win; + } + else +diff -ur ../transmission-2.11.orig/gtk/msgwin.c ./gtk/msgwin.c +--- ../transmission-2.11.orig/gtk/msgwin.c 2010-10-17 05:44:40.000000000 +0530 ++++ ./gtk/msgwin.c 2010-11-09 23:13:03.235315858 +0530 +@@ -374,7 +374,7 @@ + **/ + + GtkWidget * +-msgwin_new( TrCore * core ) ++msgwin_new( TrCore * core,GtkWindow * parent ) + { + GtkWidget * win; + GtkWidget * vbox; +@@ -388,6 +388,7 @@ + data->core = core; + + win = gtk_window_new( GTK_WINDOW_TOPLEVEL ); ++ gtk_window_set_transient_for( GTK_WINDOW( win ), parent ); + gtk_window_set_title( GTK_WINDOW( win ), _( "Message Log" ) ); + gtk_window_set_default_size( GTK_WINDOW( win ), 560, 350 ); + gtk_window_set_role( GTK_WINDOW( win ), "message-log" ); +diff -ur ../transmission-2.11.orig/gtk/msgwin.h ./gtk/msgwin.h +--- ../transmission-2.11.orig/gtk/msgwin.h 2010-10-17 05:44:40.000000000 +0530 ++++ ./gtk/msgwin.h 2010-11-09 23:28:16.214079163 +0530 +@@ -13,6 +13,6 @@ + #ifndef TG_MSGWIN_H + #define TG_MSGWIN_H + +-GtkWidget * msgwin_new( TrCore * core ); ++GtkWidget * msgwin_new( TrCore * core, GtkWindow * parent ); + + #endif +diff -ur ../transmission-2.11.orig/gtk/tr-core.c ./gtk/tr-core.c +--- ../transmission-2.11.orig/gtk/tr-core.c 2010-10-17 05:44:40.000000000 +0530 ++++ ./gtk/tr-core.c 2010-11-09 20:45:08.063065550 +0530 +@@ -1420,6 +1420,7 @@ + G_TYPE_INVALID, /* sentinel - end of input args */ + G_TYPE_UINT, cookie, + G_TYPE_INVALID /* senitnel - end of output args */ ); ++ + if( success ) + tr_inf( "%s", _( "Disallowing desktop hibernation" ) ); + else +@@ -1493,11 +1494,12 @@ + static void + maybeInhibitHibernation( TrCore * core ) + { +- /* inhibit if it's enabled *AND* all the torrents are paused */ +- const gboolean inhibit = pref_flag_get( PREF_KEY_INHIBIT_HIBERNATION ) +- && ( tr_core_get_active_torrent_count( core ) == 0 ); +- +- tr_core_set_hibernation_allowed( core, !inhibit ); ++ /* hibernation is allowed if EITHER ++ * (a) the "inhibit" pref is turned off OR ++ * (b) there aren't any active torrents */ ++ const gboolean hibernation_allowed = !pref_flag_get( PREF_KEY_INHIBIT_HIBERNATION ) ++ || !tr_core_get_active_torrent_count( core ); ++ tr_core_set_hibernation_allowed( core, hibernation_allowed ); + } + + /** +diff -ur ../transmission-2.11.orig/libtransmission/announcer.c ./libtransmission/announcer.c +--- ../transmission-2.11.orig/libtransmission/announcer.c 2010-10-17 05:44:39.000000000 +0530 ++++ ./libtransmission/announcer.c 2010-11-09 20:48:13.314315643 +0530 +@@ -77,8 +77,8 @@ + ***/ + + static int +-compareTransfer( uint32_t a_uploaded, uint32_t a_downloaded, +- uint32_t b_uploaded, uint32_t b_downloaded ) ++compareTransfer( uint64_t a_uploaded, uint64_t a_downloaded, ++ uint64_t b_uploaded, uint64_t b_downloaded ) + { + /* higher upload count goes first */ + if( a_uploaded != b_uploaded ) +@@ -172,8 +172,8 @@ + { + tr_host * host; + char * url; +- uint32_t up; +- uint32_t down; ++ uint64_t up; ++ uint64_t down; + }; + + static void +@@ -385,7 +385,7 @@ + { + /* number of up/down/corrupt bytes since the last time we sent an + * "event=stopped" message that was acknowledged by the tracker */ +- uint32_t byteCounts[3]; ++ uint64_t byteCounts[3]; + + tr_ptrArray trackers; /* tr_tracker_item */ + tr_tracker_item * currentTracker; +@@ -734,8 +734,8 @@ + "info_hash=%s" + "&peer_id=%s" + "&port=%d" +- "&uploaded=%" PRIu32 +- "&downloaded=%" PRIu32 ++ "&uploaded=%" PRIu64 ++ "&downloaded=%" PRIu64 + "&left=%" PRIu64 + "&numwant=%d" + "&key=%s" +@@ -756,7 +756,7 @@ + evbuffer_add_printf( buf, "&requirecrypto=1" ); + + if( tier->byteCounts[TR_ANN_CORRUPT] ) +- evbuffer_add_printf( buf, "&corrupt=%" PRIu32, tier->byteCounts[TR_ANN_CORRUPT] ); ++ evbuffer_add_printf( buf, "&corrupt=%" PRIu64, tier->byteCounts[TR_ANN_CORRUPT] ); + + str = eventName; + if( str && *str ) diff --git a/transmission.spec b/transmission.spec index af7c44d..c0a6cfc 100644 --- a/transmission.spec +++ b/transmission.spec @@ -1,6 +1,6 @@ Name: transmission Version: 2.11 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A lightweight GTK+ BitTorrent client Group: Applications/Internet @@ -28,6 +28,7 @@ BuildRequires: GConf2-devel BuildRequires: qt4-devel # this modification applies to the Qt qtr.pro file Patch1: fix-optflags.patch +Patch2: transmission-3629-3639-3666-3644.patch Requires: transmission-cli Requires: transmission-gtk %description @@ -93,6 +94,7 @@ exit 0 %prep %setup -q %patch1 -p1 +%patch2 -p2 %build %configure --disable-static --with-gtk --without-wx --enable-libcanberra --enable-libnotify --enable-daemon @@ -205,6 +207,9 @@ update-desktop-database > /dev/null 2>&1 || : %doc %{_mandir}/man1/transmission-qt.* %changelog +* Tue Nov 09 2010 Ankur Sinha - 2.11-2 +- added patches as per https://bugzilla.redhat.com/show_bug.cgi?id=649545#c9 + * Thu Oct 21 2010 Pavol Šimo - 2.11-1 - updated to latest release version - added new files, updated fix-optflag.patch