diff -Nru rasmol-2.7.5.2/debian/changelog rasmol-2.7.5.2/debian/changelog --- rasmol-2.7.5.2/debian/changelog 2012-10-01 14:23:25.000000000 +0000 +++ rasmol-2.7.5.2/debian/changelog 2013-05-27 15:34:44.000000000 +0000 @@ -1,9 +1,26 @@ -rasmol (2.7.5.2-1ubuntu1) quantal; urgency=low +rasmol (2.7.5.2-2) unstable; urgency=low - * Only include instead of individual header files (fixes FTBFS; - closes: #665605). + [ Andreas Tille ] + * renamed debian/upstream-metadata.yaml to debian/upstream + * debian/upstream: Added DOI & PMID - -- Michael Bienia Mon, 01 Oct 2012 16:22:53 +0200 + [ Teemu Ikonen ] + * control: + - Add build-dep to dpkg-dev (>= 1.16.1~) + - Update standards-version to 3.9.4 + * rules: + - Export dpkg-buildflags with all hardening options. + - Run xmkmf only twice per build. + * Patch imakefile: + - Get CFLAGS and LDFLAGS from dpkg-buildflags + - Prune LDLIBS to avoid unnecessary dependencies. + * New patches: + - glibsubheaders: Do not include individual glib headers. + Thanks to Michael Biebl for the patch (closes: #665605). + - format-security: Fix sprintf calls which fail when compiling + with -werror=format-security + + -- Teemu Ikonen Mon, 27 May 2013 17:31:54 +0200 rasmol (2.7.5.2-1) unstable; urgency=low @@ -22,8 +39,9 @@ hyphen-used-as-minus-sign). - writemsg, x11shortcuts, gtk_redraw, uncompress_quote: Included in new upstream version, removed. + * Add a large PNG logo. - -- Teemu Ikonen Thu, 20 Oct 2011 11:25:48 +0200 + -- Teemu Ikonen Fri, 18 Nov 2011 17:31:09 +0100 rasmol (2.7.5-3) unstable; urgency=low diff -Nru rasmol-2.7.5.2/debian/control rasmol-2.7.5.2/debian/control --- rasmol-2.7.5.2/debian/control 2012-10-01 14:23:29.000000000 +0000 +++ rasmol-2.7.5.2/debian/control 2013-05-27 15:34:44.000000000 +0000 @@ -1,16 +1,16 @@ Source: rasmol Section: science Priority: optional -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Debian Science Maintainers +Maintainer: Debian Science Maintainers Uploaders: Teemu Ikonen Vcs-Browser: http://git.debian.org/?p=debian-science/packages/rasmol.git Vcs-Git: http://git.debian.org/git/debian-science/packages/rasmol.git Homepage: http://rasmol.org -Build-Depends: debhelper (>= 8), xutils-dev, libx11-dev, libxext-dev, - libxi-dev, x11proto-core-dev, libvte-dev, libgtk2.0-dev (>= 2.12.0), +Build-Depends: debhelper (>= 8), dpkg-dev (>= 1.16.1~), + xutils-dev, libx11-dev, libxext-dev, libxi-dev, x11proto-core-dev, + libvte-dev, libgtk2.0-dev (>= 2.12.0), libcbf-dev, libcvector2-dev, libcqrlib2-dev, libcneartree-dev -Standards-Version: 3.9.2 +Standards-Version: 3.9.4 Package: rasmol Architecture: any diff -Nru rasmol-2.7.5.2/debian/metapatches/11_glibsubheaders rasmol-2.7.5.2/debian/metapatches/11_glibsubheaders --- rasmol-2.7.5.2/debian/metapatches/11_glibsubheaders 1970-01-01 00:00:00.000000000 +0000 +++ rasmol-2.7.5.2/debian/metapatches/11_glibsubheaders 2013-05-27 15:34:44.000000000 +0000 @@ -0,0 +1,9 @@ +From: Teemu Ikonen +Subject: Do not include individual glib headers. +X-git-branch: p/glibsubheaders + +Starting with glib 2.32 it is now mandatory to include glib.h instead +of individual headers, or the compiler will generate an error. + +Fixes Debian bug #665605. + diff -Nru rasmol-2.7.5.2/debian/metapatches/12_format-security rasmol-2.7.5.2/debian/metapatches/12_format-security --- rasmol-2.7.5.2/debian/metapatches/12_format-security 1970-01-01 00:00:00.000000000 +0000 +++ rasmol-2.7.5.2/debian/metapatches/12_format-security 2013-05-27 15:34:44.000000000 +0000 @@ -0,0 +1,5 @@ +From: Teemu Ikonen +Subject: Make rasmol compile with -Werror=format-security +X-git-branch: p/format-security + +Fix sprintf calls which fail when compiling with -werror=format-security. diff -Nru rasmol-2.7.5.2/debian/patches/01_gtkabout.patch rasmol-2.7.5.2/debian/patches/01_gtkabout.patch --- rasmol-2.7.5.2/debian/patches/01_gtkabout.patch 2011-10-20 09:21:43.000000000 +0000 +++ rasmol-2.7.5.2/debian/patches/01_gtkabout.patch 2013-05-27 15:34:44.000000000 +0000 @@ -5,7 +5,7 @@ Fix icon in GTK About dialog. src/gtkwin.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gtkwin.c b/src/gtkwin.c index f5b70ac..828a94a 100755 diff -Nru rasmol-2.7.5.2/debian/patches/02_imakefile.patch rasmol-2.7.5.2/debian/patches/02_imakefile.patch --- rasmol-2.7.5.2/debian/patches/02_imakefile.patch 2011-10-20 09:21:43.000000000 +0000 +++ rasmol-2.7.5.2/debian/patches/02_imakefile.patch 2013-05-27 15:34:44.000000000 +0000 @@ -2,11 +2,11 @@ Subject: Debian changes to Imakefile. X-git-branch: p/imakefile - src/Imakefile | 28 ++++++++++++++-------------- - 1 files changed, 14 insertions(+), 14 deletions(-) + src/Imakefile | 35 +++++++++++++++++++---------------- + 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/src/Imakefile b/src/Imakefile -index b5a88dd..83dddea 100755 +index b5a88dd..7937273 100755 --- a/src/Imakefile +++ b/src/Imakefile @@ -1,8 +1,8 @@ @@ -23,7 +23,7 @@ ########################################################################### # RasMol 2.7.5 # # # -@@ -124,7 +124,7 @@ DEPTHDEF = -DTHIRTYTWOBIT +@@ -124,14 +124,15 @@ DEPTHDEF = -DTHIRTYTWOBIT LOCALEDEF = #endif @@ -32,7 +32,16 @@ #ifndef GTKWIN #define X11WIN -@@ -197,7 +197,7 @@ CBFLIB_OBJDEP = $(CBFLIB_DIR)/lib/libcbf.a + #endif + + #ifdef GTKWIN +-GTKLIBS = $(shell pkg-config --libs vte gtk+-2.0) ++#GTKLIBS = $(shell pkg-config --libs vte gtk+-2.0) ++GTKLIBS = -lvte -lgtk-x11-2.0 -lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 -lcairo -lX11 + GTKCFLAGS = $(shell pkg-config --cflags vte gtk+-2.0) + GUISRC = gtkwin.c eggfileformatchooser.c + GUIOBJ = gtkwin.o eggfileformatchooser.o +@@ -197,7 +198,7 @@ CBFLIB_OBJDEP = $(CBFLIB_DIR)/lib/libcbf.a ifeq ($(strip $(CBFLIB_DIR)),) CBFLIB_DIR = $(PKGDIR) endif @@ -41,7 +50,7 @@ CBFLIB_LDLIB = -L$(CBFLIB_DIR)/lib -lcbf CBFLIB_OBJDEP = #define NO_CBFLIB_BUILD -@@ -276,7 +276,7 @@ NEARTREE_OBJDEP = +@@ -276,7 +277,7 @@ NEARTREE_OBJDEP = # RasMol's on-line help direcory # e.g. /usr/local/lib/rasmol/rasmol.hlp @@ -50,7 +59,16 @@ #ifndef USE_XFORMSLIB -@@ -332,23 +332,23 @@ LDLIBS = -lm -lXi $(XLIB) $(EXTRA_LIBRARIES) $(XFORMSLIB) $(GTKLIBS) \ +@@ -317,7 +318,7 @@ OBJS = rasmol.o molecule.o abstree.o cmndline.o command.o transfor.o \ + # Additional RS6000 AIX MITSHM Library + # LDLIBS = -lm -lXi -lXextSam $(XLIB) + +-LDLIBS = -lm -lXi $(XLIB) $(EXTRA_LIBRARIES) $(XFORMSLIB) $(GTKLIBS) \ ++LDLIBS = -lm $(XLIB) $(EXTRA_LIBRARIES) $(XFORMSLIB) $(GTKLIBS) \ + $(CBFLIB_LDLIB) \ + $(CQRLIB_LDLIB) \ + $(CVECTOR_LDLIB) \ +@@ -332,26 +333,28 @@ LDLIBS = -lm -lXi $(XLIB) $(EXTRA_LIBRARIES) $(XFORMSLIB) $(GTKLIBS) \ # #ifdef HPArchitecture @@ -80,3 +98,8 @@ #endif #endif ++CCOPTIONS = $(shell dpkg-buildflags --get CFLAGS) ++LOCAL_LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) + + ComplexProgramTarget(rasmol) + MakeDirectories(install,$(RASMOLDIR)) diff -Nru rasmol-2.7.5.2/debian/patches/03_intwidth.patch rasmol-2.7.5.2/debian/patches/03_intwidth.patch --- rasmol-2.7.5.2/debian/patches/03_intwidth.patch 2011-10-20 09:21:43.000000000 +0000 +++ rasmol-2.7.5.2/debian/patches/03_intwidth.patch 2013-05-27 15:34:44.000000000 +0000 @@ -3,7 +3,7 @@ X-git-branch: p/intwidth src/rasmol.h | 18 ++++++++---------- - 1 files changed, 8 insertions(+), 10 deletions(-) + 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/rasmol.h b/src/rasmol.h index 94e3640..b6cde5e 100755 diff -Nru rasmol-2.7.5.2/debian/patches/04_spinbuttons.patch rasmol-2.7.5.2/debian/patches/04_spinbuttons.patch --- rasmol-2.7.5.2/debian/patches/04_spinbuttons.patch 2011-10-20 09:21:43.000000000 +0000 +++ rasmol-2.7.5.2/debian/patches/04_spinbuttons.patch 2013-05-27 15:34:44.000000000 +0000 @@ -9,7 +9,7 @@ src/sizechooser.glade | 29 +++++++++++++++++++---------- - 1 files changed, 19 insertions(+), 10 deletions(-) + 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/src/sizechooser.glade b/src/sizechooser.glade index 77b3d99..da8bdbe 100644 diff -Nru rasmol-2.7.5.2/debian/patches/05_gtkexport.patch rasmol-2.7.5.2/debian/patches/05_gtkexport.patch --- rasmol-2.7.5.2/debian/patches/05_gtkexport.patch 2011-10-20 09:21:43.000000000 +0000 +++ rasmol-2.7.5.2/debian/patches/05_gtkexport.patch 2013-05-27 15:34:44.000000000 +0000 @@ -15,7 +15,7 @@ Also, replace int with uintptr_t when casting pointers to ints. src/gtkwin.c | 425 +++++++++++++++++++++++++++++++--------------------------- - 1 files changed, 226 insertions(+), 199 deletions(-) + 1 file changed, 226 insertions(+), 199 deletions(-) diff --git a/src/gtkwin.c b/src/gtkwin.c index f5b70ac..2a324b3 100755 diff -Nru rasmol-2.7.5.2/debian/patches/06_manfix.patch rasmol-2.7.5.2/debian/patches/06_manfix.patch --- rasmol-2.7.5.2/debian/patches/06_manfix.patch 2011-10-20 09:21:43.000000000 +0000 +++ rasmol-2.7.5.2/debian/patches/06_manfix.patch 2013-05-27 15:34:44.000000000 +0000 @@ -3,7 +3,7 @@ X-git-branch: p/manfix doc/rasmol.1 | 22 +++++++++++----------- - 1 files changed, 11 insertions(+), 11 deletions(-) + 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/rasmol.1 b/doc/rasmol.1 index 85df72c..fec7275 100644 diff -Nru rasmol-2.7.5.2/debian/patches/08_gtk-tiff-lzw.patch rasmol-2.7.5.2/debian/patches/08_gtk-tiff-lzw.patch --- rasmol-2.7.5.2/debian/patches/08_gtk-tiff-lzw.patch 2011-10-20 09:21:43.000000000 +0000 +++ rasmol-2.7.5.2/debian/patches/08_gtk-tiff-lzw.patch 2013-05-27 15:34:44.000000000 +0000 @@ -3,7 +3,7 @@ X-git-branch: p/gtk-tiff-lzw src/gtkwin.c | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) + 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gtkwin.c b/src/gtkwin.c index f5b70ac..14eddee 100755 diff -Nru rasmol-2.7.5.2/debian/patches/09_RESOLUTION.patch rasmol-2.7.5.2/debian/patches/09_RESOLUTION.patch --- rasmol-2.7.5.2/debian/patches/09_RESOLUTION.patch 2011-10-20 09:21:43.000000000 +0000 +++ rasmol-2.7.5.2/debian/patches/09_RESOLUTION.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,213 +0,0 @@ -Resolve patch overlaps. ---- a/src/gtkwin.c -+++ b/src/gtkwin.c -@@ -567,103 +567,119 @@ - - } - --void export_cb(GtkAction *action, gpointer user_data) -+ -+void export_cb(GtkAction * action, gpointer user_data) - { -- static char *fname = NULL; -+ static char *fname = NULL; - -- if(!exportdialog) { -- build_exportdialog(); -- } -- if(fname) { -- gtk_file_chooser_set_filename(GTK_FILE_CHOOSER (exportdialog), fname); -- gtk_file_chooser_unselect_all(GTK_FILE_CHOOSER (exportdialog)); -- } -- if(gtk_toggle_button_get_active( -- GTK_TOGGLE_BUTTON(gtk_builder_get_object(sizebuilder, "size_current")))) -- { -- GtkLabel *header = NULL; -- char header_str[128]; -- -- export_x = XRange; -- export_y = YRange; -- header = GTK_LABEL(gtk_builder_get_object(sizebuilder, "size_header")); -- snprintf(header_str, 127, "Size: %d x %d", export_x, export_y); -- gtk_label_set_text(header, header_str); -- } -- while(TRUE) { -- GtkWidget *question; -- GdkPixbuf *pbuf; -- GError *err = NULL; -- gboolean success = TRUE; -- guint format = 0; -- gchar *formatname = NULL; -- GSList *tmplist = NULL; -- guchar *tmpbuf; -- -- if (gtk_dialog_run (GTK_DIALOG (exportdialog)) != GTK_RESPONSE_ACCEPT) { -- break; -- } -- -- if(fname) { -- g_free (fname); -- } -- fname = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (exportdialog)); -- if(g_file_test(fname, G_FILE_TEST_EXISTS)) { -- gint resp; -- question = gtk_message_dialog_new(GTK_WINDOW(exportdialog), -- GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, -- GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, -- "A file named \"%s\" already exists. Do you want to replace it?", -- fname); -- resp = gtk_dialog_run(GTK_DIALOG(question)); -- gtk_widget_destroy (question); -- if(resp != GTK_RESPONSE_YES) { -- continue; -- } -- } -- -- format = egg_file_format_chooser_get_format ( -- EGG_FILE_FORMAT_CHOOSER(format_chooser), fname); -- if(!format) { -- char *tmp; -- question = gtk_message_dialog_new(GTK_WINDOW(exportdialog), -- GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, -- GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, -- "Could not recognise format of output file \"%s\", please choose another format.", -- ((tmp = rindex(fname, '/')) != NULL) ? (tmp+1) : (fname)); -- gtk_dialog_run(GTK_DIALOG(question)); -- gtk_widget_destroy (question); -- continue; -- } -- formatname = (gchar *) egg_file_format_chooser_get_format_data( -- EGG_FILE_FORMAT_CHOOSER(format_chooser), format); -- -- tmpbuf = g_new(guchar, 4*export_x*export_y); -- render_buffer((Pixel *) tmpbuf, export_x, export_y); -- pbuf = gdk_pixbuf_new_from_data(tmpbuf, -- GDK_COLORSPACE_RGB, -- TRUE, 8, -- export_x, export_y, 4*export_x, -- NULL, NULL); -+ if (!exportdialog) { -+ build_exportdialog(); -+ } -+ if (fname) { -+ gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(exportdialog), fname); -+ gtk_file_chooser_unselect_all(GTK_FILE_CHOOSER(exportdialog)); -+ } -+ if (gtk_toggle_button_get_active -+ (GTK_TOGGLE_BUTTON -+ (gtk_builder_get_object(sizebuilder, "size_current")))) { -+ GtkLabel *header = NULL; -+ char header_str[128]; -+ -+ export_x = XRange; -+ export_y = YRange; -+ header = GTK_LABEL(gtk_builder_get_object(sizebuilder, "size_header")); -+ snprintf(header_str, 127, "Size: %d x %d", export_x, export_y); -+ gtk_label_set_text(header, header_str); -+ } -+ while (TRUE) { -+ GtkWidget *question; -+ GdkPixbuf *pbuf; -+ GError *err = NULL; -+ gboolean success = TRUE; -+ guint format = 0; -+ gchar *formatname = NULL; -+ GSList *tmplist = NULL; -+ Pixel *tmpbuf; -+ -+ if (gtk_dialog_run(GTK_DIALOG(exportdialog)) != GTK_RESPONSE_ACCEPT) { -+ break; -+ } -+ -+ if (fname) { -+ g_free(fname); -+ } -+ fname = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(exportdialog)); -+ if (g_file_test(fname, G_FILE_TEST_EXISTS)) { -+ gint resp; -+ question = gtk_message_dialog_new(GTK_WINDOW(exportdialog), -+ GTK_DIALOG_MODAL | -+ GTK_DIALOG_DESTROY_WITH_PARENT, -+ GTK_MESSAGE_QUESTION, -+ GTK_BUTTONS_YES_NO, -+ "A file named \"%s\" already exists. Do you want to replace it?", -+ fname); -+ resp = gtk_dialog_run(GTK_DIALOG(question)); -+ gtk_widget_destroy(question); -+ if (resp != GTK_RESPONSE_YES) { -+ continue; -+ } -+ } -+ -+ format = -+ egg_file_format_chooser_get_format(EGG_FILE_FORMAT_CHOOSER -+ (format_chooser), fname); -+ if (!format) { -+ char *tmp; -+ question = gtk_message_dialog_new(GTK_WINDOW(exportdialog), -+ GTK_DIALOG_MODAL | -+ GTK_DIALOG_DESTROY_WITH_PARENT, -+ GTK_MESSAGE_WARNING, -+ GTK_BUTTONS_OK, -+ "Could not recognise format of output file \"%s\", please choose another format.", -+ ((tmp = -+ rindex(fname, -+ '/')) != -+ NULL) ? (tmp + 1) : (fname)); -+ gtk_dialog_run(GTK_DIALOG(question)); -+ gtk_widget_destroy(question); -+ continue; -+ } -+ formatname = -+ (gchar *) -+ egg_file_format_chooser_get_format_data(EGG_FILE_FORMAT_CHOOSER -+ (format_chooser), format); -+ -+ tmpbuf = g_new(Pixel, export_x * export_y); -+ render_buffer(tmpbuf, export_x, export_y); -+ pbuf = gdk_pixbuf_new_from_data((guchar *) tmpbuf, -+ GDK_COLORSPACE_RGB, -+ TRUE, 8, -+ export_x, export_y, -+ sizeof(Pixel) * export_x, -+ NULL, NULL); - // Use TIFF compression 5 = LZW - success = gdk_pixbuf_save(pbuf, fname, formatname, &err, - "compression", "5", NULL); -- -- if(!success && (err != NULL) ) { -- question = gtk_message_dialog_new(GTK_WINDOW(exportdialog), -- GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, -- GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, "Error saving image: %s", -- err->message); -- gtk_dialog_run(GTK_DIALOG(question)); -- gtk_widget_destroy (question); -- } -- g_object_unref(pbuf); -- g_free(tmpbuf); -- break; -- } -- gtk_widget_hide (exportdialog); -+ -+ if (!success && (err != NULL)) { -+ question = gtk_message_dialog_new(GTK_WINDOW(exportdialog), -+ GTK_DIALOG_MODAL | -+ GTK_DIALOG_DESTROY_WITH_PARENT, -+ GTK_MESSAGE_WARNING, -+ GTK_BUTTONS_OK, -+ "Error saving image: %s", -+ err->message); -+ gtk_dialog_run(GTK_DIALOG(question)); -+ gtk_widget_destroy(question); -+ } -+ g_object_unref(pbuf); -+ g_free(tmpbuf); -+ break; -+ } -+ gtk_widget_hide(exportdialog); - } - -+ - void pagesetup_cb(GtkAction *action, gpointer user_data) - { - if (print_pagesetup == NULL) { diff -Nru rasmol-2.7.5.2/debian/patches/09_glibsubheaders.patch rasmol-2.7.5.2/debian/patches/09_glibsubheaders.patch --- rasmol-2.7.5.2/debian/patches/09_glibsubheaders.patch 1970-01-01 00:00:00.000000000 +0000 +++ rasmol-2.7.5.2/debian/patches/09_glibsubheaders.patch 2013-05-27 15:34:44.000000000 +0000 @@ -0,0 +1,26 @@ +From: Teemu Ikonen +Subject: Do not include individual glib headers. +X-git-branch: p/glibsubheaders + +Starting with glib 2.32 it is now mandatory to include glib.h instead +of individual headers, or the compiler will generate an error. + +Fixes Debian bug #665605. + + + src/egg-macros.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/egg-macros.h b/src/egg-macros.h +index 9a7caad..5a128ff 100644 +--- a/src/egg-macros.h ++++ b/src/egg-macros.h +@@ -9,7 +9,7 @@ + #ifndef _EGG_MACROS_H_ + #define _EGG_MACROS_H_ + +-#include ++#include + + G_BEGIN_DECLS + diff -Nru rasmol-2.7.5.2/debian/patches/10_format-security.patch rasmol-2.7.5.2/debian/patches/10_format-security.patch --- rasmol-2.7.5.2/debian/patches/10_format-security.patch 1970-01-01 00:00:00.000000000 +0000 +++ rasmol-2.7.5.2/debian/patches/10_format-security.patch 2013-05-27 15:34:44.000000000 +0000 @@ -0,0 +1,49 @@ +From: Teemu Ikonen +Subject: Make rasmol compile with -Werror=format-security +X-git-branch: p/format-security + +Fix sprintf calls which fail when compiling with -werror=format-security. + + src/command.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/command.c b/src/command.c +index 83da7ff..93e38be 100755 +--- a/src/command.c ++++ b/src/command.c +@@ -1286,7 +1286,7 @@ void ShowRecordCommand( void ) { + if (record_on[1]) WriteString("record appearance on\n"); + else WriteString("record apperance off\n"); + if (RecordMaxMS == 1.) { +- sprintf(param,RecordTemplate); ++ sprintf(param, "%s", RecordTemplate); + } else{ + sprintf(param,RecordTemplate,millisec<0?0:millisec); + } +@@ -1381,7 +1381,7 @@ void ShowPlayCommand( void ) { + WriteString(param); + } + if (PlayMaxMS == 1.) { +- sprintf(param,PlayTemplate); ++ sprintf(param, "%s", PlayTemplate); + } else{ + sprintf(param,PlayTemplate,millisec<0?0:millisec); + } +@@ -1469,7 +1469,7 @@ void WriteMovieFrame( void ) { + RecordPause = True; + } else { + if (RecordMaxMS == 1.) { +- sprintf(param,RecordTemplate); ++ sprintf(param, "%s", RecordTemplate); + } else{ + sprintf(param,RecordTemplate,millisec); + } +@@ -1505,7 +1505,7 @@ static int PlayMovieFrame( void ) { + for (play_frame[1] = 0;play_frame[1]<=millisec; play_frame[1]++) + { + if (RecordMaxMS == 1.) { +- sprintf(param,PlayTemplate); ++ sprintf(param, "%s", PlayTemplate); + } else{ + sprintf(param,PlayTemplate,millisec-play_frame[1]); + } diff -Nru rasmol-2.7.5.2/debian/patches/10_only-include-glib.h.patch rasmol-2.7.5.2/debian/patches/10_only-include-glib.h.patch --- rasmol-2.7.5.2/debian/patches/10_only-include-glib.h.patch 2012-10-01 14:22:46.000000000 +0000 +++ rasmol-2.7.5.2/debian/patches/10_only-include-glib.h.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -Index: rasmol-2.7.5.2/src/egg-macros.h -=================================================================== ---- rasmol-2.7.5.2.orig/src/egg-macros.h 2011-05-14 20:23:49.000000000 +0200 -+++ rasmol-2.7.5.2/src/egg-macros.h 2012-10-01 16:22:36.000000000 +0200 -@@ -9,7 +9,7 @@ - #ifndef _EGG_MACROS_H_ - #define _EGG_MACROS_H_ - --#include -+#include - - G_BEGIN_DECLS - diff -Nru rasmol-2.7.5.2/debian/patches/11_RESOLUTION.patch rasmol-2.7.5.2/debian/patches/11_RESOLUTION.patch --- rasmol-2.7.5.2/debian/patches/11_RESOLUTION.patch 1970-01-01 00:00:00.000000000 +0000 +++ rasmol-2.7.5.2/debian/patches/11_RESOLUTION.patch 2013-05-27 15:34:44.000000000 +0000 @@ -0,0 +1,213 @@ +Resolve patch overlaps. +--- a/src/gtkwin.c ++++ b/src/gtkwin.c +@@ -567,103 +567,119 @@ + + } + +-void export_cb(GtkAction *action, gpointer user_data) ++ ++void export_cb(GtkAction * action, gpointer user_data) + { +- static char *fname = NULL; ++ static char *fname = NULL; + +- if(!exportdialog) { +- build_exportdialog(); +- } +- if(fname) { +- gtk_file_chooser_set_filename(GTK_FILE_CHOOSER (exportdialog), fname); +- gtk_file_chooser_unselect_all(GTK_FILE_CHOOSER (exportdialog)); +- } +- if(gtk_toggle_button_get_active( +- GTK_TOGGLE_BUTTON(gtk_builder_get_object(sizebuilder, "size_current")))) +- { +- GtkLabel *header = NULL; +- char header_str[128]; +- +- export_x = XRange; +- export_y = YRange; +- header = GTK_LABEL(gtk_builder_get_object(sizebuilder, "size_header")); +- snprintf(header_str, 127, "Size: %d x %d", export_x, export_y); +- gtk_label_set_text(header, header_str); +- } +- while(TRUE) { +- GtkWidget *question; +- GdkPixbuf *pbuf; +- GError *err = NULL; +- gboolean success = TRUE; +- guint format = 0; +- gchar *formatname = NULL; +- GSList *tmplist = NULL; +- guchar *tmpbuf; +- +- if (gtk_dialog_run (GTK_DIALOG (exportdialog)) != GTK_RESPONSE_ACCEPT) { +- break; +- } +- +- if(fname) { +- g_free (fname); +- } +- fname = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (exportdialog)); +- if(g_file_test(fname, G_FILE_TEST_EXISTS)) { +- gint resp; +- question = gtk_message_dialog_new(GTK_WINDOW(exportdialog), +- GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, +- GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, +- "A file named \"%s\" already exists. Do you want to replace it?", +- fname); +- resp = gtk_dialog_run(GTK_DIALOG(question)); +- gtk_widget_destroy (question); +- if(resp != GTK_RESPONSE_YES) { +- continue; +- } +- } +- +- format = egg_file_format_chooser_get_format ( +- EGG_FILE_FORMAT_CHOOSER(format_chooser), fname); +- if(!format) { +- char *tmp; +- question = gtk_message_dialog_new(GTK_WINDOW(exportdialog), +- GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, +- GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, +- "Could not recognise format of output file \"%s\", please choose another format.", +- ((tmp = rindex(fname, '/')) != NULL) ? (tmp+1) : (fname)); +- gtk_dialog_run(GTK_DIALOG(question)); +- gtk_widget_destroy (question); +- continue; +- } +- formatname = (gchar *) egg_file_format_chooser_get_format_data( +- EGG_FILE_FORMAT_CHOOSER(format_chooser), format); +- +- tmpbuf = g_new(guchar, 4*export_x*export_y); +- render_buffer((Pixel *) tmpbuf, export_x, export_y); +- pbuf = gdk_pixbuf_new_from_data(tmpbuf, +- GDK_COLORSPACE_RGB, +- TRUE, 8, +- export_x, export_y, 4*export_x, +- NULL, NULL); ++ if (!exportdialog) { ++ build_exportdialog(); ++ } ++ if (fname) { ++ gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(exportdialog), fname); ++ gtk_file_chooser_unselect_all(GTK_FILE_CHOOSER(exportdialog)); ++ } ++ if (gtk_toggle_button_get_active ++ (GTK_TOGGLE_BUTTON ++ (gtk_builder_get_object(sizebuilder, "size_current")))) { ++ GtkLabel *header = NULL; ++ char header_str[128]; ++ ++ export_x = XRange; ++ export_y = YRange; ++ header = GTK_LABEL(gtk_builder_get_object(sizebuilder, "size_header")); ++ snprintf(header_str, 127, "Size: %d x %d", export_x, export_y); ++ gtk_label_set_text(header, header_str); ++ } ++ while (TRUE) { ++ GtkWidget *question; ++ GdkPixbuf *pbuf; ++ GError *err = NULL; ++ gboolean success = TRUE; ++ guint format = 0; ++ gchar *formatname = NULL; ++ GSList *tmplist = NULL; ++ Pixel *tmpbuf; ++ ++ if (gtk_dialog_run(GTK_DIALOG(exportdialog)) != GTK_RESPONSE_ACCEPT) { ++ break; ++ } ++ ++ if (fname) { ++ g_free(fname); ++ } ++ fname = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(exportdialog)); ++ if (g_file_test(fname, G_FILE_TEST_EXISTS)) { ++ gint resp; ++ question = gtk_message_dialog_new(GTK_WINDOW(exportdialog), ++ GTK_DIALOG_MODAL | ++ GTK_DIALOG_DESTROY_WITH_PARENT, ++ GTK_MESSAGE_QUESTION, ++ GTK_BUTTONS_YES_NO, ++ "A file named \"%s\" already exists. Do you want to replace it?", ++ fname); ++ resp = gtk_dialog_run(GTK_DIALOG(question)); ++ gtk_widget_destroy(question); ++ if (resp != GTK_RESPONSE_YES) { ++ continue; ++ } ++ } ++ ++ format = ++ egg_file_format_chooser_get_format(EGG_FILE_FORMAT_CHOOSER ++ (format_chooser), fname); ++ if (!format) { ++ char *tmp; ++ question = gtk_message_dialog_new(GTK_WINDOW(exportdialog), ++ GTK_DIALOG_MODAL | ++ GTK_DIALOG_DESTROY_WITH_PARENT, ++ GTK_MESSAGE_WARNING, ++ GTK_BUTTONS_OK, ++ "Could not recognise format of output file \"%s\", please choose another format.", ++ ((tmp = ++ rindex(fname, ++ '/')) != ++ NULL) ? (tmp + 1) : (fname)); ++ gtk_dialog_run(GTK_DIALOG(question)); ++ gtk_widget_destroy(question); ++ continue; ++ } ++ formatname = ++ (gchar *) ++ egg_file_format_chooser_get_format_data(EGG_FILE_FORMAT_CHOOSER ++ (format_chooser), format); ++ ++ tmpbuf = g_new(Pixel, export_x * export_y); ++ render_buffer(tmpbuf, export_x, export_y); ++ pbuf = gdk_pixbuf_new_from_data((guchar *) tmpbuf, ++ GDK_COLORSPACE_RGB, ++ TRUE, 8, ++ export_x, export_y, ++ sizeof(Pixel) * export_x, ++ NULL, NULL); + // Use TIFF compression 5 = LZW + success = gdk_pixbuf_save(pbuf, fname, formatname, &err, + "compression", "5", NULL); +- +- if(!success && (err != NULL) ) { +- question = gtk_message_dialog_new(GTK_WINDOW(exportdialog), +- GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, +- GTK_MESSAGE_WARNING, GTK_BUTTONS_OK, "Error saving image: %s", +- err->message); +- gtk_dialog_run(GTK_DIALOG(question)); +- gtk_widget_destroy (question); +- } +- g_object_unref(pbuf); +- g_free(tmpbuf); +- break; +- } +- gtk_widget_hide (exportdialog); ++ ++ if (!success && (err != NULL)) { ++ question = gtk_message_dialog_new(GTK_WINDOW(exportdialog), ++ GTK_DIALOG_MODAL | ++ GTK_DIALOG_DESTROY_WITH_PARENT, ++ GTK_MESSAGE_WARNING, ++ GTK_BUTTONS_OK, ++ "Error saving image: %s", ++ err->message); ++ gtk_dialog_run(GTK_DIALOG(question)); ++ gtk_widget_destroy(question); ++ } ++ g_object_unref(pbuf); ++ g_free(tmpbuf); ++ break; ++ } ++ gtk_widget_hide(exportdialog); + } + ++ + void pagesetup_cb(GtkAction *action, gpointer user_data) + { + if (print_pagesetup == NULL) { diff -Nru rasmol-2.7.5.2/debian/patches/series rasmol-2.7.5.2/debian/patches/series --- rasmol-2.7.5.2/debian/patches/series 2012-10-01 14:22:16.000000000 +0000 +++ rasmol-2.7.5.2/debian/patches/series 2013-05-27 15:34:44.000000000 +0000 @@ -6,5 +6,6 @@ 06_manfix.patch 07_CONFLICTS_IN_gtk-tiff-lzw.patch 08_gtk-tiff-lzw.patch -09_RESOLUTION.patch -10_only-include-glib.h.patch +09_glibsubheaders.patch +10_format-security.patch +11_RESOLUTION.patch diff -Nru rasmol-2.7.5.2/debian/rasmol.install rasmol-2.7.5.2/debian/rasmol.install --- rasmol-2.7.5.2/debian/rasmol.install 2011-10-20 09:21:43.000000000 +0000 +++ rasmol-2.7.5.2/debian/rasmol.install 2013-05-27 15:34:44.000000000 +0000 @@ -3,6 +3,7 @@ src/rasmol-gtk usr/bin debian/rasmol-gtk.desktop usr/share/applications debian/rasmol.xpm usr/share/pixmaps +debian/rasmol.png usr/share/pixmaps src/rasmol.8 usr/lib/rasmol src/rasmol.16 usr/lib/rasmol src/rasmol.32 usr/lib/rasmol Binary files /tmp/HGMuMOjPgQ/rasmol-2.7.5.2/debian/rasmol.png and /tmp/GgUyR1_yfo/rasmol-2.7.5.2/debian/rasmol.png differ Binary files /tmp/HGMuMOjPgQ/rasmol-2.7.5.2/debian/rasmol_large.png and /tmp/GgUyR1_yfo/rasmol-2.7.5.2/debian/rasmol_large.png differ diff -Nru rasmol-2.7.5.2/debian/rules rasmol-2.7.5.2/debian/rules --- rasmol-2.7.5.2/debian/rules 2011-10-20 09:21:43.000000000 +0000 +++ rasmol-2.7.5.2/debian/rules 2013-05-27 15:34:44.000000000 +0000 @@ -1,16 +1,13 @@ #!/usr/bin/make -f -CFLAGS = -Wall -g - -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 -endif +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk build-gtk: src/rasmol-gtk src/rasmol-gtk: dh_testdir + -rm -f x11-stamp cd $(CURDIR)/src ; xmkmf -DGTKWIN ; cd $(CURDIR) $(MAKE) -C src clean; $(MAKE) -C src @@ -18,23 +15,24 @@ build-x11: src/rasmol.8 src/rasmol.16 src/rasmol.32 -src/rasmol.8: - dh_testdir +x11-stamp: cd $(CURDIR)/src ; xmkmf -DX11WIN ; cd $(CURDIR) + touch $@ + +src/rasmol.8: x11-stamp + dh_testdir $(MAKE) -C src clean; $(MAKE) -C src DEPTHDEF=-DEIGHTBIT=1 rasmol mv src/rasmol src/rasmol.8 -src/rasmol.16: +src/rasmol.16: x11-stamp dh_testdir - cd $(CURDIR)/src ; xmkmf -DX11WIN ; cd $(CURDIR) $(MAKE) -C src clean; $(MAKE) -C src DEPTHDEF=-DSIXTEENBIT=1 rasmol mv src/rasmol src/rasmol.16 -src/rasmol.32: +src/rasmol.32: x11-stamp dh_testdir - cd $(CURDIR)/src ; xmkmf -DX11WIN ; cd $(CURDIR) $(MAKE) -C src clean; $(MAKE) -C src DEPTHDEF=-DTHIRTYTWOBIT=1 rasmol mv src/rasmol src/rasmol.32 @@ -55,6 +53,7 @@ -rm -f src/rasmol-gtk src/rasmol.32 src/rasmol.16 src/rasmol.8 -rm -f src/gtkui.h -rm -f manualA4.pdf refcardA4.pdf + -rm -f x11-stamp dh clean diff -Nru rasmol-2.7.5.2/debian/source/include-binaries rasmol-2.7.5.2/debian/source/include-binaries --- rasmol-2.7.5.2/debian/source/include-binaries 1970-01-01 00:00:00.000000000 +0000 +++ rasmol-2.7.5.2/debian/source/include-binaries 2013-05-27 15:34:44.000000000 +0000 @@ -0,0 +1,2 @@ +debian/rasmol.png +debian/rasmol_large.png diff -Nru rasmol-2.7.5.2/debian/upstream rasmol-2.7.5.2/debian/upstream --- rasmol-2.7.5.2/debian/upstream 1970-01-01 00:00:00.000000000 +0000 +++ rasmol-2.7.5.2/debian/upstream 2013-05-27 15:34:44.000000000 +0000 @@ -0,0 +1,13 @@ +Contact: Herbert J. Bernstein +Name: RasMol +Reference: + author: Roger A. Sayle and E. James Milner-White + title: "RasMol: Biomolecular graphics for all" + journal: Trends in Biochemical Sciences (TIBS) + volume: 20 + number: 9 + pages: 374 + year: 1995 + DOI: 10.1016/S0968-0004(00)89080-5 + PMID: 7482707 + URL: http://www.sciencedirect.com/science/article/pii/S0968000400890805 diff -Nru rasmol-2.7.5.2/debian/upstream-metadata.yaml rasmol-2.7.5.2/debian/upstream-metadata.yaml --- rasmol-2.7.5.2/debian/upstream-metadata.yaml 2011-10-20 09:21:43.000000000 +0000 +++ rasmol-2.7.5.2/debian/upstream-metadata.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -Contact: Herbert J. Bernstein -Name: RasMol -Reference: - author: Roger Sayle and E. James Milner-White - title: RasMol: Biomolecular graphics for all - journal: Trends in Biochemical Sciences (TIBS) - volume: 20 - number: 9 - pages: 374 - year: 1995