[cpl-plugin-fors] 06/40: Adjust debian files to FORS; fix format errors

Ole Streicher olebole-guest at alioth.debian.org
Wed Sep 18 19:01:46 UTC 2013


This is an automated email from the git hooks/post-receive script.

olebole-guest pushed a commit to branch debian
in repository cpl-plugin-fors.

commit f1b76c3fe251b1b09a1a6d2467781ebea62f4164
Author: Ole Streicher <debian at liska.ath.cx>
Date:   Tue Jan 8 14:23:05 2013 +0100

    Adjust debian files to FORS; fix format errors
---
 debian/changelog                                   |    4 +-
 debian/control                                     |    2 +-
 debian/cpl-plugin-calib.install.template           |    1 -
 debian/cpl-plugin-fors-calib.install               |    1 +
 ...in.install.template => cpl-plugin-fors.install} |    0
 debian/patches/dont_build_sextractor.patch         |   33 +++
 debian/patches/fix_format_security.patch           |  287 ++++++++++++++++++++
 debian/patches/libadd_cpl.patch                    |   32 +++
 debian/patches/series                              |    2 +
 debian/patches/set_plugindir.patch                 |    9 +
 10 files changed, 367 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 78ed990..5111527 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,5 @@
 cpl-plugin-fors (4.9.18-1) unstable; urgency=low
 
-  * New package. Closes: #00000
+  * New package. Closes: #XXXXXXX
 
- -- Ole Streicher <debian at liska.ath.cx>  Thu, 08 Dec 2011 09:38:00 +0200
+ -- Ole Streicher <debian at liska.ath.cx>  Mon, 08 Jan 2013 14:00:00 +0100
diff --git a/debian/control b/debian/control
index b425a0c..c322653 100644
--- a/debian/control
+++ b/debian/control
@@ -13,7 +13,7 @@ Package: cpl-plugin-fors
 Architecture: any
 Depends: ${misc:Depends}, ${shlibs:Depends}
 Suggests: cpl-plugin-fors-calib
-Recommends: esorex|python-cpl
+Recommends: esorex|python-cpl, sextractor
 Multi-Arch: same
 Description: ESO data reduction pipeline FORS
  FORS pipeline recipes for the reduction of data obtained with the FORS1 and
diff --git a/debian/cpl-plugin-calib.install.template b/debian/cpl-plugin-calib.install.template
deleted file mode 100644
index 5de4a5c..0000000
--- a/debian/cpl-plugin-calib.install.template
+++ /dev/null
@@ -1 +0,0 @@
-calib/* usr/share/cpl-plugins/template
diff --git a/debian/cpl-plugin-fors-calib.install b/debian/cpl-plugin-fors-calib.install
new file mode 100644
index 0000000..634ca78
--- /dev/null
+++ b/debian/cpl-plugin-fors-calib.install
@@ -0,0 +1 @@
+calib/* usr/share/cpl-plugins/fors
diff --git a/debian/cpl-plugin.install.template b/debian/cpl-plugin-fors.install
similarity index 100%
rename from debian/cpl-plugin.install.template
rename to debian/cpl-plugin-fors.install
diff --git a/debian/patches/dont_build_sextractor.patch b/debian/patches/dont_build_sextractor.patch
new file mode 100644
index 0000000..cca4fa8
--- /dev/null
+++ b/debian/patches/dont_build_sextractor.patch
@@ -0,0 +1,33 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -24,7 +24,7 @@
+ DISTCLEANFILES = *~
+ 
+ 
+-SUBDIRS = irplib sextractor fors recipes reflex
++SUBDIRS = irplib fors recipes reflex
+ 
+ 
+ HTML_SUBDIRS = 
+--- a/configure.ac
++++ b/configure.ac
+@@ -111,8 +111,6 @@
+ 
+ FORS_SET_SEX_PREFIX
+ 
+-AC_CONFIG_SUBDIRS([sextractor])
+-
+ AC_CONFIG_FILES(Makefile
+                 doxygen/Doxyfile
+                 irplib/Makefile
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -162,7 +162,7 @@
+     # Define the preprocessor symbols for the sextractor executable
+     # and the configuration files.
+ 
+-    eval sext_bindir="${prefix}/bin"
++    eval sext_bindir="/usr/bin"
+ 
+     AC_DEFINE_UNQUOTED(FORS_SEXTRACTOR_PATH, "$sext_bindir",
+                        [Absolute path to the sextractor executable])
diff --git a/debian/patches/fix_format_security.patch b/debian/patches/fix_format_security.patch
new file mode 100644
index 0000000..53701fd
--- /dev/null
+++ b/debian/patches/fix_format_security.patch
@@ -0,0 +1,287 @@
+Author: Ole Streicher <debian at liska.ath.cx>
+Description: Fix format security errors
+--- a/fors/fors_dfs.c
++++ b/fors/fors_dfs.c
+@@ -874,7 +874,7 @@
+     if (frame) {
+         image = cpl_image_load(cpl_frame_get_filename(frame), type, 0, ext);
+         if (image == NULL) {
+-            cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++            cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+             cpl_msg_error(func, "Cannot load image %s",
+                           cpl_frame_get_filename(frame));
+         }
+@@ -929,7 +929,7 @@
+     if (frame) {
+         table = cpl_table_load(cpl_frame_get_filename(frame), ext, 1);
+         if (table == NULL) {
+-            cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++            cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+             cpl_msg_error(func, "Cannot load table %s",
+                           cpl_frame_get_filename(frame));
+         }
+@@ -980,7 +980,7 @@
+     if (frame) {
+         plist = cpl_propertylist_load(cpl_frame_get_filename(frame), ext);
+         if (plist == NULL) {
+-            cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++            cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+             cpl_msg_error(func, "Cannot load header from %s",
+                           cpl_frame_get_filename(frame));
+         }
+@@ -1012,7 +1012,7 @@
+ 
+     if (category == NULL || frameset == NULL || object == NULL || 
+         raw_frame == NULL) {
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         cpl_error_set(cpl_func, CPL_ERROR_NULL_INPUT);
+         return;
+     }
+@@ -1058,7 +1058,7 @@
+     cpl_frame_set_group(frame, CPL_FRAME_GROUP_PRODUCT);
+     cpl_frame_set_level(frame, CPL_FRAME_LEVEL_FINAL);
+     if (cpl_error_get_code()) {
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         cpl_msg_error(cpl_func, "Cannot initialise the product frame");
+         cpl_frame_delete(frame);
+         cpl_free(filename);
+@@ -1083,7 +1083,7 @@
+     if (cpl_dfs_setup_product_header(plist, frame, frameset, parlist,
+                                      recipename, version, "PRO-1.15")) {
+ #endif
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         cpl_msg_error(cpl_func, "Problem with product %s FITS header definition",
+                       category);
+         if (header == NULL)
+@@ -1119,7 +1119,7 @@
+     }
+     
+     if (cpl_error_get_code() != CPL_ERROR_NONE) {
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         cpl_msg_error(cpl_func, "Cannot save product %s to disk", filename);
+         if (header == NULL)
+             cpl_propertylist_delete(plist);
+@@ -1333,7 +1333,7 @@
+ 
+ 
+     if (category == NULL || frameset == NULL || image == NULL) {
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         cpl_error_set(func, CPL_ERROR_NULL_INPUT);
+         return -1;
+     }
+@@ -1353,7 +1353,7 @@
+     cpl_frame_set_group(frame, CPL_FRAME_GROUP_PRODUCT);
+     cpl_frame_set_level(frame, CPL_FRAME_LEVEL_FINAL);
+     if (cpl_error_get_code()) {
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         cpl_msg_error(func, "Cannot initialise the product frame");
+         cpl_frame_delete(frame);
+         cpl_free(filename);
+@@ -1377,7 +1377,7 @@
+     if (cpl_dfs_setup_product_header(plist, frame, frameset, parlist,
+                                      recipename, version, "PRO-1.15")) {
+ #endif
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         cpl_msg_error(func, "Problem with product %s FITS header definition",
+                       category);
+         if (header == NULL)
+@@ -1403,7 +1403,7 @@
+ 
+     if (cpl_image_save(image, filename, CPL_BPP_IEEE_FLOAT, plist,
+                        CPL_IO_DEFAULT)) {
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         cpl_msg_error(func, "Cannot save product %s to disk", filename);
+         if (header == NULL)
+             cpl_propertylist_delete(plist);
+@@ -1469,7 +1469,7 @@
+ 
+     if (category == NULL || frameset == NULL || table == NULL) {
+         cpl_error_set(func, CPL_ERROR_NULL_INPUT);
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         return -1;
+     }
+ 
+@@ -1495,7 +1495,7 @@
+     cpl_frame_set_group(frame, CPL_FRAME_GROUP_PRODUCT);
+     cpl_frame_set_level(frame, CPL_FRAME_LEVEL_FINAL);
+     if (cpl_error_get_code()) {
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         cpl_msg_error(func, "Cannot initialise the product frame");
+         cpl_frame_delete(frame);
+         cpl_free(filename);
+@@ -1519,7 +1519,7 @@
+     if (cpl_dfs_setup_product_header(plist, frame, frameset, parlist,
+                                      recipename, version, "PRO-1.15")) {
+ #endif
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         cpl_msg_error(func, "Problem with product %s FITS header definition",
+                       category);
+         if (header == NULL)
+@@ -1545,7 +1545,7 @@
+     
+     
+     if (cpl_table_save(table, plist, NULL, filename, CPL_IO_DEFAULT)) {
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         cpl_msg_error(func, "Cannot save product %s to disk", filename);
+         if (header == NULL)
+             cpl_propertylist_delete(plist);
+--- a/fors/fors_utils.c
++++ b/fors/fors_utils.c
+@@ -675,7 +675,7 @@
+     case CPL_MSG_ERROR:   cpl_msg_error  (fct, "%s", message); break;
+     default: 
+         cpl_msg_error(fct, "Unknown message level: %d", level);
+-        cpl_msg_error(fct, message);
++        cpl_msg_error(fct, "%s", message);
+         break;
+     }
+     return;
+--- a/fors/moses.c
++++ b/fors/moses.c
+@@ -4900,7 +4900,7 @@
+         *err = sqrt(*err);
+     
+         if (ids == NULL) {
+-            cpl_msg_debug(cpl_error_get_where(), cpl_error_get_message());
++            cpl_msg_debug(cpl_error_get_where(), "%s", cpl_error_get_message());
+             cpl_msg_debug(func, "Fitting IDS");
+             cpl_error_set_where(func);
+             if (rejection) {
+--- a/recipes/fors_calib.c
++++ b/recipes/fors_calib.c
+@@ -2242,7 +2242,7 @@
+     slits = mos_locate_spectra(refmask);
+ 
+     if (!slits) {
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         fors_calib_exit("No slits could be detected!");
+     }
+ 
+@@ -3024,7 +3024,7 @@
+     cpl_table_delete(slits); slits = NULL;
+ 
+     if (cpl_error_get_code()) {
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         fors_calib_exit(NULL);
+     }
+ 
+--- a/recipes/fors_science.c
++++ b/recipes/fors_science.c
+@@ -1695,7 +1695,7 @@
+                     cpl_msg_error(recipe, "The IDS coeff table is "
+                     "incompatible with the input slit position table.");
+                 }
+-                cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++                cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+                 fors_science_exit(NULL);
+             }
+             cpl_msg_warning(recipe, "Alignment of the wavelength solution "
+@@ -2349,7 +2349,7 @@
+     cpl_propertylist_delete(header); header = NULL;
+ 
+     if (cpl_error_get_code()) {
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         fors_science_exit(NULL);
+     }
+     else 
+--- a/recipes/fors_config.c
++++ b/recipes/fors_config.c
+@@ -754,7 +754,7 @@
+     cpl_free(filename); filename = NULL;
+ 
+     if (cpl_error_get_code()) {
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         fors_config_exit(NULL);
+     }
+     else 
+--- a/recipes/fors_detect_spectra.c
++++ b/recipes/fors_detect_spectra.c
+@@ -771,7 +771,7 @@
+     slits = mos_locate_spectra(refmask);
+ 
+     if (!slits) {
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         fors_detect_spectra_exit("No slits could be detected!");
+     }
+ 
+--- a/recipes/fors_extract.c
++++ b/recipes/fors_extract.c
+@@ -1736,7 +1736,7 @@
+     cpl_propertylist_delete(header); header = NULL;
+ 
+     if (cpl_error_get_code()) {
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         fors_extract_exit(NULL);
+     }
+ 
+--- a/recipes/fors_pmos_calib.c
++++ b/recipes/fors_pmos_calib.c
+@@ -1465,7 +1465,7 @@
+             slits = mos_locate_spectra(refmask);
+ 
+             if (!slits) {
+-                cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++                cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+                 fors_pmos_calib_exit("No slits could be detected!");
+             }
+ 
+@@ -2330,7 +2330,7 @@
+     cpl_vector_delete(lines); lines = NULL;
+ 
+     if (cpl_error_get_code()) {
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         fors_pmos_calib_exit(NULL);
+     }
+ 
+--- a/recipes/fors_pmos_extract.c
++++ b/recipes/fors_pmos_extract.c
+@@ -2761,7 +2761,7 @@
+     cpl_free(nobjs_per_slit);
+ 
+     if (cpl_error_get_code()) {
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         fors_pmos_extract_exit(NULL);
+     }
+     else 
+--- a/recipes/fors_pmos_science.c
++++ b/recipes/fors_pmos_science.c
+@@ -3359,7 +3359,7 @@
+     cpl_free(nobjs_per_slit);
+ 
+     if (cpl_error_get_code()) {
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         fors_pmos_science_exit(NULL);
+     }
+     else 
+--- a/recipes/fors_subtract_sky_lss.c
++++ b/recipes/fors_subtract_sky_lss.c
+@@ -445,7 +445,7 @@
+     cpl_propertylist_delete(header); header = NULL;
+ 
+     if (cpl_error_get_code()) {
+-        cpl_msg_error(cpl_error_get_where(), cpl_error_get_message());
++        cpl_msg_error(cpl_error_get_where(), "%s", cpl_error_get_message());
+         fors_subtract_sky_lss_exit(NULL);
+     }
+     else 
diff --git a/debian/patches/libadd_cpl.patch b/debian/patches/libadd_cpl.patch
index a8fe1e7..872331d 100644
--- a/debian/patches/libadd_cpl.patch
+++ b/debian/patches/libadd_cpl.patch
@@ -203,3 +203,35 @@ Description: Add the cpl libraries to the recips.so and the test program
 +fors_pmos_extract_la_LIBADD = $(LIBFORS) $(LIBCPLCORE) $(LIBCPLDFS) $(LIBCPLUI)
  fors_pmos_extract_la_LDFLAGS = -module -avoid-version
  fors_pmos_extract_la_DEPENDENCIES = $(LIBFORS)
+--- a/fors/Makefile.am
++++ b/fors/Makefile.am
+@@ -117,10 +117,10 @@
+ noinst_PROGRAMS = create_stetson \
+                   create_phot
+ 
+-create_stetson_LDADD = $(LIBFORS)
++create_stetson_LDADD = $(LIBFORS) $(LIBCPLUI) $(LIBCPLCORE)
+ create_stetson_DEPENDENCIES = libfors.la
+ 
+-create_phot_LDADD = $(LIBFORS)
++create_phot_LDADD = $(LIBFORS) $(LIBCPLUI) $(LIBCPLCORE)
+ create_phot_DEPENDENCIES = libfors.la
+ 
+ clean-local:
+--- a/fors/tests/Makefile.am
++++ b/fors/tests/Makefile.am
+@@ -39,12 +39,12 @@
+ # Convenience libraries
+ LIBTEST = libtest.la
+ libtest_la_SOURCES =  test.c
+-libtest_la_LIBADD =
++libtest_la_LIBADD =  $(LIBCPLUI) $(LIBCPLCORE)
+ libtest_la_DEPENDENCIES =
+ 
+ LIBSIMULATE = libsimulate.la
+ libsimulate_la_SOURCES =  test_simulate.c
+-libsimulate_la_LIBADD =
++libsimulate_la_LIBADD = $(LIBCPLUI) $(LIBCPLCORE)
+ libsimulate_la_DEPENDENCIES =
+ 
+ 
diff --git a/debian/patches/series b/debian/patches/series
index e2c2220..3982fac 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,5 @@
 libadd_cpl.patch
 set_plugindir.patch
 use-std-paths-for-cpl.patch
+dont_build_sextractor.patch
+fix_format_security.patch
diff --git a/debian/patches/set_plugindir.patch b/debian/patches/set_plugindir.patch
index c765176..f6e6b21 100644
--- a/debian/patches/set_plugindir.patch
+++ b/debian/patches/set_plugindir.patch
@@ -11,3 +11,12 @@ Description: Set the plugin directory so that esorex and python-cpl can find it.
      fi
  
      if test -z "$privatelibdir"; then
+@@ -162,7 +162,7 @@
+     # Define the preprocessor symbols for the sextractor executable
+     # and the configuration files.
+ 
+-    eval sext_bindir="${prefix}/lib/${PACKAGE}-${VERSION}/bin"
++    eval sext_bindir="${prefix}/bin"
+ 
+     AC_DEFINE_UNQUOTED(FORS_SEXTRACTOR_PATH, "$sext_bindir",
+                        [Absolute path to the sextractor executable])

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/cpl-plugin-fors.git



More information about the debian-science-commits mailing list