diff --git a/crack-attack-1.1.14-format-security.patch b/crack-attack-1.1.14-format-security.patch new file mode 100644 index 0000000..a21cfd9 --- /dev/null +++ b/crack-attack-1.1.14-format-security.patch @@ -0,0 +1,21 @@ +diff -up crack-attack-1.1.14/src/gtk-gui/callbacks.cxx~ crack-attack-1.1.14/src/gtk-gui/callbacks.cxx +--- crack-attack-1.1.14/src/gtk-gui/callbacks.cxx~ 2005-05-13 21:55:24.000000000 +0200 ++++ crack-attack-1.1.14/src/gtk-gui/callbacks.cxx 2014-06-14 10:24:32.738154080 +0200 +@@ -113,7 +113,7 @@ ca_error_dialog (const char *message) + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_CLOSE, +- message); ++ "%s", message); + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); + } +@@ -160,7 +160,7 @@ gboolean networking_output ( + buffer = gtk_text_view_get_buffer(txtOutput); + gtk_text_buffer_get_end_iter(buffer, &iter); + g_io_channel_read_line(source, &out, &length, NULL, NULL); +- g_print(out); ++ g_print("%s", out); + gtk_text_buffer_insert(buffer, &iter, out, length); + g_free(out); + return true; diff --git a/crack-attack-1.1.14-rhbz1065649.patch b/crack-attack-1.1.14-rhbz1065649.patch new file mode 100644 index 0000000..318016a --- /dev/null +++ b/crack-attack-1.1.14-rhbz1065649.patch @@ -0,0 +1,30 @@ +--- crack-attack-1.1.14/src/gtk-gui/gui_main.cxx~ 2005-05-13 21:55:24.000000000 +0200 ++++ crack-attack-1.1.14/src/gtk-gui/gui_main.cxx 2014-06-14 10:24:32.738154080 +0200 +@@ -50,6 +50,18 @@ + int glut_argc; + char **glut_argv; + ++/* ++ * Call this when the window is unexpectedly destroyed to make sure the ++ * hidden gui process doesn't hang around in the background. ++ */ ++static void destroy_window(GtkObject *object, gpointer data) { ++#ifdef DEVELOPMENT ++ g_print("\nOh no! We've been nexpectedly destroyed! :(\n"); ++#endif ++ gtk_main_quit(); ++} ++ ++ + /* + * Documentation + * html tables don't work right in explorer +@@ -76,6 +88,8 @@ + winCrackAttackSplash = create_winCrackAttackSplash (); + gui_data_read(winCrackAttackSplash); + gtk_widget_show (winCrackAttackSplash); ++ g_signal_connect(GTK_OBJECT(winCrackAttackSplash), "destroy", ++ G_CALLBACK(destroy_window), NULL); + gtk_main (); + + return 0; diff --git a/crack-attack.spec b/crack-attack.spec index a7740a5..109eaad 100644 --- a/crack-attack.spec +++ b/crack-attack.spec @@ -1,7 +1,7 @@ Summary: Puzzle action game Name: crack-attack Version: 1.1.14 -Release: 27%{?dist} +Release: 28%{?dist} License: GPLv2+ Group: Amusements/Games URL: http://www.nongnu.org/crack-attack/ @@ -13,6 +13,8 @@ Patch1: crack-attack-1.1.14-sanitize.patch Patch2: crack-attack-1.1.14-audio.patch Patch3: crack-attack-1.1.14-gcc43.patch Patch4: crack-attack-1.1.14-audio-ppc.patch +Patch5: crack-attack-1.1.14-format-security.patch +Patch6: crack-attack-1.1.14-rhbz1065649.patch BuildRequires: libstdc++-devel desktop-file-utils ImageMagick BuildRequires: SDL-devel gtk2-devel pkgconfig SDL_mixer-devel freeglut-devel BuildRequires: mesa-libGLU-devel libXmu-devel @@ -31,6 +33,8 @@ longest!? Playable both online and off. %patch2 -p1 -b .audio %patch3 -p1 -b .gcc43 %patch4 -p1 +%patch5 -p1 +%patch6 -p1 # fixup provided desktop file sed -i -e 's/%{name}\.xpm/%{name}\.png/' \ -e 's/Application;Games/Game;BlocksGame/' data/%{name}.desktop @@ -90,6 +94,11 @@ fi %changelog +* Sat Jun 14 2014 Hans de Goede - 1.1.14-28 +- Fix building with -Werror=format-security (rhbz#1037025) +- Fix crack-attack process sticking around when closing the gui with alt+F4 + (rhbz#1065649) + * Sat Jun 07 2014 Fedora Release Engineering - 1.1.14-27 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild