summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/00list7
-rw-r--r--debian/patches/01_xcam.c_dead_code.dpatch29
-rw-r--r--debian/patches/01_xcam.c_dead_code.patch25
-rw-r--r--debian/patches/02_xcam_man_typo.patch (renamed from debian/patches/02_xcam_man_typo.dpatch)20
-rw-r--r--debian/patches/03_scanadf_options_fix.patch (renamed from debian/patches/03_scanadf_options_fix.dpatch)18
-rw-r--r--debian/patches/04_cap_always_settable.dpatch21
-rw-r--r--debian/patches/04_cap_always_settable.patch17
-rw-r--r--debian/patches/05_xcam_off_by_one.dpatch19
-rw-r--r--debian/patches/05_xcam_off_by_one.patch15
-rw-r--r--debian/patches/06_word_list_fix.patch (renamed from debian/patches/06_word_list_fix.dpatch)20
-rw-r--r--debian/patches/100_xscanimage_c-out-of-bounds.patch18
-rw-r--r--debian/patches/20_scanadf-SIGCHLD.patch19
-rw-r--r--debian/patches/25_manpages-typo.patch62
-rw-r--r--debian/patches/scanadf-sigchld.diff11
-rw-r--r--debian/patches/series9
15 files changed, 199 insertions, 111 deletions
diff --git a/debian/patches/00list b/debian/patches/00list
deleted file mode 100644
index d65c845..0000000
--- a/debian/patches/00list
+++ /dev/null
@@ -1,7 +0,0 @@
-01_xcam.c_dead_code
-02_xcam_man_typo
-03_scanadf_options_fix
-04_cap_always_settable
-05_xcam_off_by_one
-06_word_list_fix
-
diff --git a/debian/patches/01_xcam.c_dead_code.dpatch b/debian/patches/01_xcam.c_dead_code.dpatch
deleted file mode 100644
index 41a33e0..0000000
--- a/debian/patches/01_xcam.c_dead_code.dpatch
+++ /dev/null
@@ -1,29 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 01_xcam.c_dead_code.dpatch by <jblache@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Remove dead code in src/xcam.c::load_defaults()
-
-@DPATCH@
-diff -urNad sane-frontends-1.0.14~/src/xcam.c sane-frontends-1.0.14/src/xcam.c
---- sane-frontends-1.0.14~/src/xcam.c 2005-09-20 19:30:01.000000000 +0200
-+++ sane-frontends-1.0.14/src/xcam.c 2005-09-20 19:30:59.289245755 +0200
-@@ -536,16 +536,14 @@
- load_defaults (int silent)
- {
- char filename[PATH_MAX];
-- int fd;
-
- DBG (DBG_debug, "xcam, load_defaults: enter\n");
- if (make_default_filename (sizeof (filename), filename, dialog->dev_name)
- < 0)
- return;
-- if (fd < 0)
-- return;
-+
- load_settings (filename, silent);
-- sanei_load_values (fd, dialog->dev);
-+
- DBG (DBG_debug, "xcam, load_defaults: exit\n");
- }
-
diff --git a/debian/patches/01_xcam.c_dead_code.patch b/debian/patches/01_xcam.c_dead_code.patch
new file mode 100644
index 0000000..f90bc6b
--- /dev/null
+++ b/debian/patches/01_xcam.c_dead_code.patch
@@ -0,0 +1,25 @@
+Author: <jblache@debian.org>
+Description: Remove dead code in src/xcam.c::load_defaults()
+Index: trunk/src/xcam.c
+===================================================================
+--- trunk.orig/src/xcam.c
++++ trunk/src/xcam.c
+@@ -536,16 +536,14 @@ static void
+ load_defaults (int silent)
+ {
+ char filename[PATH_MAX];
+- int fd;
+
+ DBG (DBG_debug, "xcam, load_defaults: enter\n");
+ if (make_default_filename (sizeof (filename), filename, dialog->dev_name)
+ < 0)
+ return;
+- if (fd < 0)
+- return;
++
+ load_settings (filename, silent);
+- sanei_load_values (fd, dialog->dev);
++
+ DBG (DBG_debug, "xcam, load_defaults: exit\n");
+ }
+
diff --git a/debian/patches/02_xcam_man_typo.dpatch b/debian/patches/02_xcam_man_typo.patch
index cd35ecc..2421dc8 100644
--- a/debian/patches/02_xcam_man_typo.dpatch
+++ b/debian/patches/02_xcam_man_typo.patch
@@ -1,20 +1,16 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 02_xcam_man_typo.dpatch by <jblache@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Fix various typos in xcam.man.
-
-@DPATCH@
-diff -urNad sane-frontends-1.0.14~/doc/xcam.man sane-frontends-1.0.14/doc/xcam.man
---- sane-frontends-1.0.14~/doc/xcam.man 2008-03-01 15:30:54.000000000 +0100
-+++ sane-frontends-1.0.14/doc/xcam.man 2008-03-01 15:32:35.802703418 +0100
+Author: <jblache@debian.org>
+Description: Fix various typos in xcam.man.
+Index: trunk/doc/xcam.man
+===================================================================
+--- trunk.orig/doc/xcam.man
++++ trunk/doc/xcam.man
@@ -1,4 +1,4 @@
-.TH xcam 1 "11 April 2005"
+.TH xcam 1 "19 February 2008"
.IX xcam
.SH NAME
xcam - a graphical camera frontend for SANE
-@@ -12,7 +12,7 @@
+@@ -12,7 +12,7 @@ xcam - a graphical camera frontend for S
.B xcam
provides a graphical user-interface to control an image
acquisition device such as a flatbed scanner or a camera. It allows
@@ -23,7 +19,7 @@ diff -urNad sane-frontends-1.0.14~/doc/xcam.man sane-frontends-1.0.14/doc/xcam.m
.B xcam
acts as a stand-alone program that saves acquired images in a suitable
-@@ -43,12 +43,11 @@
+@@ -43,12 +43,11 @@ will output its version number.
.PP
The
.B --help (-h)
diff --git a/debian/patches/03_scanadf_options_fix.dpatch b/debian/patches/03_scanadf_options_fix.patch
index 4c1b8cb..8c1b0c7 100644
--- a/debian/patches/03_scanadf_options_fix.dpatch
+++ b/debian/patches/03_scanadf_options_fix.patch
@@ -1,14 +1,10 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 03_scanadf_options_fix.dpatch by <jblache@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Get option descriptor 0 before getting the value for option 0.
-
-@DPATCH@
-diff -urNad sane-frontends-1.0.14~/src/scanadf.c sane-frontends-1.0.14/src/scanadf.c
---- sane-frontends-1.0.14~/src/scanadf.c 2005-09-18 13:51:00.000000000 +0200
-+++ sane-frontends-1.0.14/src/scanadf.c 2008-08-05 12:00:14.826083326 +0200
-@@ -550,15 +550,33 @@
+Author: <jblache@debian.org>
+Description: Get option descriptor 0 before getting the value for option 0.
+Index: trunk/src/scanadf.c
+===================================================================
+--- trunk.orig/src/scanadf.c
++++ trunk/src/scanadf.c
+@@ -550,15 +550,33 @@ fetch_options (SANE_Device * device)
const SANE_Option_Descriptor * opt;
SANE_Int num_dev_options;
int i, option_count;
diff --git a/debian/patches/04_cap_always_settable.dpatch b/debian/patches/04_cap_always_settable.dpatch
deleted file mode 100644
index e812c3d..0000000
--- a/debian/patches/04_cap_always_settable.dpatch
+++ /dev/null
@@ -1,21 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 04_cap_always_settable.dpatch by <jblache@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Remove check for SANE_CAP_ALWAYS_SETTABLE; the flag is not part
-## DP: of the standard and has been removed upstream in SANE 1.0.20.
-
-@DPATCH@
-diff -urNad sane-frontends-1.0.14~/src/gtkglue.c sane-frontends-1.0.14/src/gtkglue.c
---- sane-frontends-1.0.14~/src/gtkglue.c 2005-04-16 15:12:07.000000000 +0200
-+++ sane-frontends-1.0.14/src/gtkglue.c 2009-06-26 13:32:04.997585725 +0200
-@@ -1476,8 +1476,7 @@
- || opt->type == SANE_TYPE_GROUP || !dialog->element[i].widget)
- continue;
-
-- if (!(opt->cap & SANE_CAP_ALWAYS_SETTABLE))
-- gtk_widget_set_sensitive (dialog->element[i].widget, sensitive);
-+ gtk_widget_set_sensitive (dialog->element[i].widget, sensitive);
- }
- }
-
diff --git a/debian/patches/04_cap_always_settable.patch b/debian/patches/04_cap_always_settable.patch
new file mode 100644
index 0000000..aef60f1
--- /dev/null
+++ b/debian/patches/04_cap_always_settable.patch
@@ -0,0 +1,17 @@
+Author: <jblache@debian.org>
+Description: Remove check for SANE_CAP_ALWAYS_SETTABLE; the flag is not part
+of the standard and has been removed upstream in SANE 1.0.20.
+Index: trunk/src/gtkglue.c
+===================================================================
+--- trunk.orig/src/gtkglue.c
++++ trunk/src/gtkglue.c
+@@ -1476,8 +1476,7 @@ gsg_set_sensitivity (GSGDialog * dialog,
+ || opt->type == SANE_TYPE_GROUP || !dialog->element[i].widget)
+ continue;
+
+- if (!(opt->cap & SANE_CAP_ALWAYS_SETTABLE))
+- gtk_widget_set_sensitive (dialog->element[i].widget, sensitive);
++ gtk_widget_set_sensitive (dialog->element[i].widget, sensitive);
+ }
+ }
+
diff --git a/debian/patches/05_xcam_off_by_one.dpatch b/debian/patches/05_xcam_off_by_one.dpatch
deleted file mode 100644
index deb56a0..0000000
--- a/debian/patches/05_xcam_off_by_one.dpatch
+++ /dev/null
@@ -1,19 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 05_xcam_off_by_one.dpatch by <jblache@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Fix an off-by-one.
-
-@DPATCH@
-diff -urNad sane-frontends-1.0.14~/src/xcam.c sane-frontends-1.0.14/src/xcam.c
---- sane-frontends-1.0.14~/src/xcam.c 2009-06-26 13:50:19.000000000 +0200
-+++ sane-frontends-1.0.14/src/xcam.c 2009-06-26 13:50:47.774585321 +0200
-@@ -1289,7 +1289,7 @@
-
- /* test for pnm formats */
- strncpy (testfilename, preferences.filename, sizeof (testfilename));
-- testfilename[sizeof (testfilename)] = 0;
-+ testfilename[sizeof (testfilename) - 1] = 0;
- g_strreverse (testfilename);
- if (!((!strncmp (testfilename, "mnp.", 4)) ||
- (!strncmp (testfilename, "mgp.", 4)) ||
diff --git a/debian/patches/05_xcam_off_by_one.patch b/debian/patches/05_xcam_off_by_one.patch
new file mode 100644
index 0000000..0b91cc4
--- /dev/null
+++ b/debian/patches/05_xcam_off_by_one.patch
@@ -0,0 +1,15 @@
+Author: <jblache@debian.org>
+Description: Fix an off-by-one.
+Index: trunk/src/xcam.c
+===================================================================
+--- trunk.orig/src/xcam.c
++++ trunk/src/xcam.c
+@@ -1287,7 +1287,7 @@ save_frame_button (GtkWidget * widget, g
+
+ /* test for pnm formats */
+ strncpy (testfilename, preferences.filename, sizeof (testfilename));
+- testfilename[sizeof (testfilename)] = 0;
++ testfilename[sizeof (testfilename) - 1] = 0;
+ g_strreverse (testfilename);
+ if (!((!strncmp (testfilename, "mnp.", 4)) ||
+ (!strncmp (testfilename, "mgp.", 4)) ||
diff --git a/debian/patches/06_word_list_fix.dpatch b/debian/patches/06_word_list_fix.patch
index 90d223c..683e745 100644
--- a/debian/patches/06_word_list_fix.dpatch
+++ b/debian/patches/06_word_list_fix.patch
@@ -1,14 +1,10 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 06_word_list_fix.dpatch by <jblache@debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Fix word list handling when current value is not part of the list.
-
-@DPATCH@
-diff -urNad sane-frontends-1.0.14~/src/gtkglue.c sane-frontends-1.0.14/src/gtkglue.c
---- sane-frontends-1.0.14~/src/gtkglue.c 2009-11-14 10:46:03.248492255 +0100
-+++ sane-frontends-1.0.14/src/gtkglue.c 2009-11-14 10:46:07.941492660 +0100
-@@ -913,6 +913,7 @@
+Author: <jblache@debian.org>
+Description: Fix word list handling when current value is not part of the list.
+Index: trunk/src/gtkglue.c
+===================================================================
+--- trunk.orig/src/gtkglue.c
++++ trunk/src/gtkglue.c
+@@ -913,6 +913,7 @@ panel_build (GSGDialog * dialog)
char **str_list;
int i, j;
int num_vector_opts = 0, *vector_opts;
@@ -16,7 +12,7 @@ diff -urNad sane-frontends-1.0.14~/src/gtkglue.c sane-frontends-1.0.14/src/gtkgl
main_hbox = gtk_hbox_new (FALSE, 2);
-@@ -1073,13 +1074,23 @@
+@@ -1073,13 +1074,23 @@ panel_build (GSGDialog * dialog)
case SANE_CONSTRAINT_WORD_LIST:
/* use a "list-selection" widget */
num_words = opt->constraint.word_list[0];
diff --git a/debian/patches/100_xscanimage_c-out-of-bounds.patch b/debian/patches/100_xscanimage_c-out-of-bounds.patch
new file mode 100644
index 0000000..2249f5a
--- /dev/null
+++ b/debian/patches/100_xscanimage_c-out-of-bounds.patch
@@ -0,0 +1,18 @@
+Description: Correct out-of-bounds
+Author: Jörg Frings-Fürst <debian@jff-webhosting.net>
+Last-Update: 2014-12-03
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/src/xscanimage.c
+===================================================================
+--- trunk.orig/src/xscanimage.c
++++ trunk/src/xscanimage.c
+@@ -1284,7 +1284,7 @@ scan_dialog (GtkWidget * widget, gpointe
+ { /* We are running in standalone mode */
+ /* test for pnm formats */
+ strncpy (testfilename, preferences.filename, sizeof (testfilename));
+- testfilename[sizeof (testfilename)] = 0;
++ testfilename[sizeof (testfilename) - 1] = 0;
+ g_strreverse (testfilename);
+ if (!((!strncmp (testfilename, "mnp.", 4)) ||
+ (!strncmp (testfilename, "mgp.", 4)) ||
diff --git a/debian/patches/20_scanadf-SIGCHLD.patch b/debian/patches/20_scanadf-SIGCHLD.patch
new file mode 100644
index 0000000..ab91534
--- /dev/null
+++ b/debian/patches/20_scanadf-SIGCHLD.patch
@@ -0,0 +1,19 @@
+Description: Sets SIGCHLD to SIG_DFL before execle().
+Author: Jakub Wilk <jwilk@debian.org>
+Origin: http://www.opengroup.org/onlinepubs/009695399/functions/exec.html
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=596232
+Last-Update: 2014-12-03
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/src/scanadf.c
+===================================================================
+--- trunk.orig/src/scanadf.c
++++ trunk/src/scanadf.c
+@@ -1213,6 +1213,7 @@ scan_it_raw (const char *fname, SANE_Boo
+
+ case 0:
+ /* in child process */
++ signal(SIGCHLD, SIG_DFL);
+ sprintf(cmd, "%s '%s'", script, fname);
+ /* system(cmd); */
+ execle(script, script, fname, NULL, environ);
diff --git a/debian/patches/25_manpages-typo.patch b/debian/patches/25_manpages-typo.patch
new file mode 100644
index 0000000..cb3f8f4
--- /dev/null
+++ b/debian/patches/25_manpages-typo.patch
@@ -0,0 +1,62 @@
+Description: Correct typos in manpages
+Author: Jörg Frings-Fürst <debian@jff-webhosting.net>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=612686
+Last-Update: 2014-12-03
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/doc/scanadf.man
+===================================================================
+--- trunk.orig/doc/scanadf.man
++++ trunk/doc/scanadf.man
+@@ -162,7 +162,7 @@ information about the parameters of the
+
+ .PP
+ If the
+-.B --scipt-wait
++.B --script-wait
+ option is given, scanadf will wait until all scan-scripts have been finished before
+ exiting. That will be useful if scanadf is used in conjunction with tools to modify
+ the scanned images.
+@@ -210,7 +210,7 @@ invoke
+ via a command-line of the form:
+ .PP
+ .RS
+-scanadf --help --device
++scanadf \-\-help \-\-device
+ .I dev
+ .RE
+ .PP
+@@ -256,12 +256,12 @@ work at this time are:
+ .br
+ .B sane-hp
+ - Hewlett Packard scanners. A patch to the sane-hp backend
+-is necessary. The --scantype=ADF option must be specified (earlier
+-versions of the backend used the --scan-from-adf option, instead).
++is necessary. The \-\-scantype=ADF option must be specified (earlier
++versions of the backend used the \-\-scan-from-adf option, instead).
+ .br
+ .B sane-umax
+ - UMAX scanners. Support exists in build 12 and later.
+-The --source="Automatic Document Feeder" option must be specified.
++The \-\-source="Automatic Document Feeder" option must be specified.
+ .br
+ .RE
+
+Index: trunk/doc/xscanimage.man
+===================================================================
+--- trunk.orig/doc/xscanimage.man
++++ trunk/doc/xscanimage.man
+@@ -45,11 +45,11 @@ simply copy it to one of the
+ plug-ins directories. If you want to conserve disk-space, you can
+ create a symlink instead. For example, for gimp-1.0.x the command
+ .PP
+-ln -s @BINDIR@/xscanimage ~/.gimp/plug-ins/
++ln \-s @BINDIR@/xscanimage ~/.gimp/plug-ins/
+ .PP
+ and for gimp-1.2.x the command
+ .PP
+-ln -s @BINDIR@/xscanimage ~/.gimp-1.2/plug-ins/
++ln \-s @BINDIR@/xscanimage ~/.gimp-1.2/plug-ins/
+ .PP
+ adds a symlink for the
+ .B xscanimage
diff --git a/debian/patches/scanadf-sigchld.diff b/debian/patches/scanadf-sigchld.diff
new file mode 100644
index 0000000..fe84f08
--- /dev/null
+++ b/debian/patches/scanadf-sigchld.diff
@@ -0,0 +1,11 @@
+diff --git a/src/scanadf.c b/src/scanadf.c
+--- a/src/scanadf.c
++++ b/src/scanadf.c
+@@ -1195,6 +1195,7 @@
+
+ case 0:
+ /* in child process */
++ signal(SIGCHLD, SIG_DFL);
+ sprintf(cmd, "%s '%s'", script, fname);
+ /* system(cmd); */
+ execle(script, script, fname, NULL, environ);
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..74cfad3
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,9 @@
+25_manpages-typo.patch
+01_xcam.c_dead_code.patch
+02_xcam_man_typo.patch
+03_scanadf_options_fix.patch
+04_cap_always_settable.patch
+05_xcam_off_by_one.patch
+06_word_list_fix.patch
+20_scanadf-SIGCHLD.patch
+100_xscanimage_c-out-of-bounds.patch