[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#930335: marked as done (unblock: therion/5.4.3ds1-6)



Your message dated Sat, 15 Jun 2019 11:26:18 +0000
with message-id <E1hc6p8-0004LN-Jz@respighi.debian.org>
and subject line unblock therion
has caused the Debian Bug report #930335,
regarding unblock: therion/5.4.3ds1-6
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
930335: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930335
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package therion.

This fixes a "Severity: important" bug in a "Priority: optional"
package, which is a regression from the version in stretch:

https://bugs.debian.org/930289

The diff is small so I've already uploaded to unstable as suggested by
the freeze policy.  The package has successfully built for all release
architectures, and the autopkgtest is passing.

Debdiff against 5.4.3ds-5 (currently in testing) attached.

unblock therion/5.4.3ds1-6

Cheers,
    Olly
diff -Nru therion-5.4.3ds1/debian/changelog therion-5.4.3ds1/debian/changelog
--- therion-5.4.3ds1/debian/changelog	2019-03-06 10:41:20.000000000 +1300
+++ therion-5.4.3ds1/debian/changelog	2019-06-10 12:33:11.000000000 +1200
@@ -1,3 +1,11 @@
+therion (5.4.3ds1-6) unstable; urgency=medium
+
+  * debian/patches/fix-epsg-esri-cs.patch: Fix coordinate system handling when
+    more than one coordinate system is specified using an EPSG or ESRI code.
+    (Closes: #930289)
+
+ -- Olly Betts <olly@survex.com>  Mon, 10 Jun 2019 12:33:11 +1200
+
 therion (5.4.3ds1-5) unstable; urgency=medium
 
   * debian/patches/fix-svg-export-segfault.patch: Fix segmentation fault when
diff -Nru therion-5.4.3ds1/debian/patches/fix-epsg-esri-cs.patch therion-5.4.3ds1/debian/patches/fix-epsg-esri-cs.patch
--- therion-5.4.3ds1/debian/patches/fix-epsg-esri-cs.patch	1970-01-01 12:00:00.000000000 +1200
+++ therion-5.4.3ds1/debian/patches/fix-epsg-esri-cs.patch	2019-06-10 12:33:11.000000000 +1200
@@ -0,0 +1,292 @@
+Subject: [PATCH] New EPSG CS handling bugfix.
+ Therion 5.4.3 uses the wrong coordinate system if more than one
+ coordinate system is specified using an EPSG or ESRI code (the function
+ in question returns a pointer to a static variable which gets
+ overwritten if called again).
+Origin: upstream
+Author: Stacho Mudrak <stacho.mudrak@gmail.com>
+Bug-Debian: https://bugs.debian.org/930289
+Last-Update: 2019-06-10
+
+---
+ thconfig.cxx     |  8 ++++----
+ thcs.cxx         |  4 ++++
+ thcs.h           |  2 ++
+ thdataobject.cxx | 21 ++++++++++-----------
+ thexpmap.cxx     |  4 ++--
+ thexpmodel.cxx   | 12 ++++++------
+ thexptable.cxx   |  2 +-
+ thexpuni.cxx     | 12 ++++++------
+ 8 files changed, 35 insertions(+), 30 deletions(-)
+
+diff --git a/thconfig.cxx b/thconfig.cxx
+index 8af4192..d359829 100644
+--- a/thconfig.cxx
++++ b/thconfig.cxx
+@@ -843,7 +843,7 @@ double thconfig::get_outcs_convergence()
+ {
+   double x, y, z;
+   if (this->get_outcs_center(x, y, z)) {
+-    return thcsconverg(thcs_get_data(this->outcs)->params, x, y);
++    return thcsconverg(thcs_get_params(this->outcs), x, y);
+   } else {
+     return 0.0;
+   }
+@@ -853,8 +853,8 @@ double thconfig::get_cs_convergence(int cs)
+ {
+   double x, y, z, lx, ly, lz;
+   if (this->get_outcs_center(x, y, z)) {
+-    thcs2cs(thcs_get_data(this->outcs)->params, thcs_get_data(cs)->params, x, y, z, lx, ly, lz);
+-    return thcsconverg(thcs_get_data(cs)->params, lx, ly);
++    thcs2cs(thcs_get_params(this->outcs), thcs_get_params(cs), x, y, z, lx, ly, lz);
++    return thcsconverg(thcs_get_params(cs), lx, ly);
+   } else {
+     return 0.0;
+   }
+@@ -868,7 +868,7 @@ bool thconfig::get_outcs_mag_decl(double year, double & decl)
+     return false;
+   if ((year < double(thgeomag_minyear)) || (year > double(thgeomag_minyear + thgeomag_step * (thgeomag_maxmindex + 1))))
+     return false;
+-  thcs2cs(thcs_get_data(this->outcs)->params, "+proj=latlong +datum=WGS84", x, y, z, lon, lat, alt);
++  thcs2cs(thcs_get_params(this->outcs), "+proj=latlong +datum=WGS84", x, y, z, lon, lat, alt);
+   decl = thgeomag(lat, lon, alt, year);
+   return true;
+ }
+diff --git a/thcs.cxx b/thcs.cxx
+index 67b7514..6d565bb 100644
+--- a/thcs.cxx
++++ b/thcs.cxx
+@@ -108,6 +108,10 @@ const char * thcs_get_name(int cs)
+   return csstr;
+ }
+ 
++std::string thcs_get_params(int cs) {
++	return std::string(thcs_get_data(cs)->params);
++}
++
+ const thcsdata * thcs_get_data(int cs) {
+ 	static thcsdata rv;
+ 	static char params[200];
+diff --git a/thcs.h b/thcs.h
+index 7906b53..cda4abc 100644
+--- a/thcs.h
++++ b/thcs.h
+@@ -36,6 +36,8 @@ const char * thcs_get_name(int cs);
+ 
+ const thcsdata * thcs_get_data(int cs);
+ 
++std::string thcs_get_params(int cs);
++
+ void thcs_add_cs(char * id, char * proj4id, size_t nargs, char ** args);
+ 
+ #endif
+diff --git a/thdataobject.cxx b/thdataobject.cxx
+index c136adb..b6a038f 100644
+--- a/thdataobject.cxx
++++ b/thdataobject.cxx
+@@ -423,11 +423,10 @@ void thdataobject::convert_cs(char * src_x, char * src_y, double & dst_x, double
+   };
+ 
+   // 1. Conversion to numbers.
+-  const thcsdata * csdata = thcs_get_data(this->cs);
+   int sv;
+   double tx(0.0), ty(0.0), tz(0.0), dst_z(0.0);
+   bool initcs(false);
+-  if ((this->cs != TTCS_LOCAL) && csdata->dms) {
++  if ((this->cs != TTCS_LOCAL) && thcs_get_data(this->cs)->dms) {
+     thparse_double_dms(sv, tx, src_x);
+     tx /= 180.0 / THPI;
+   } else {
+@@ -436,7 +435,7 @@ void thdataobject::convert_cs(char * src_x, char * src_y, double & dst_x, double
+   if (sv != TT_SV_NUMBER)
+     ththrow(("invalid X coordinate -- %s", src_x));
+ 
+-  if ((this->cs != TTCS_LOCAL) && csdata->dms) {
++  if ((this->cs != TTCS_LOCAL) && thcs_get_data(this->cs)->dms) {
+     thparse_double_dms(sv, ty, src_y);
+     ty /= 180.0 / THPI;
+   } else {
+@@ -445,30 +444,30 @@ void thdataobject::convert_cs(char * src_x, char * src_y, double & dst_x, double
+   if (sv != TT_SV_NUMBER)
+     ththrow(("invalid Y coordinate -- %s", src_y));
+ 
+-  if ((this->cs != TTCS_LOCAL) && csdata->swap) {
++  if ((this->cs != TTCS_LOCAL) && thcs_get_data(this->cs)->swap) {
+     tz = tx;
+     tx = ty;
+     ty = tz;
+     tz = 0.0;
+   }
+ 
+-  if ((this->cs != TTCS_LOCAL) && csdata->dms) {
++  if ((this->cs != TTCS_LOCAL) && thcs_get_data(this->cs)->dms) {
+     if ((tx < - THPI) || (tx > THPI))
+-      ththrow(("longitude out of range -- %s", csdata->swap ? src_y : src_x));
++      ththrow(("longitude out of range -- %s", thcs_get_data(this->cs)->swap ? src_y : src_x));
+ 
+     if ((ty < (- THPI / 2)) || (ty > (THPI / 2)))
+-      ththrow(("latitude out of range -- %s", csdata->swap ? src_x : src_y));
++      ththrow(("latitude out of range -- %s", thcs_get_data(this->cs)->swap ? src_x : src_y));
+   }
+ 
+   if (!thcfg.outcs_def.is_valid()) {
+-    if ((this->cs != TTCS_LOCAL) && (!csdata->output)) {
++    if ((this->cs != TTCS_LOCAL) && (!thcs_get_data(this->cs)->output)) {
+       // TODO: get NS
+       double dumx, dumy, dumz;
+       int south = 0;
+-      thcs2cs(csdata->params, thcs_get_data(TTCS_LAT_LONG)->params, tx, ty, tz, dumx, dumy, dumz);
++      thcs2cs(thcs_get_params(this->cs), thcs_get_params(TTCS_LAT_LONG), tx, ty, tz, dumx, dumy, dumz);
+       if (dumy < 0.0)
+         south = 1;
+-      thcfg.outcs = TTCS_UTM1N + 2 * (thcs2zone(csdata->params, tx, ty, tz) - 1) + south;
++      thcfg.outcs = TTCS_UTM1N + 2 * (thcs2zone(thcs_get_params(this->cs), tx, ty, tz) - 1) + south;
+     } else {
+       thcfg.outcs = this->cs;
+     }
+@@ -484,7 +483,7 @@ void thdataobject::convert_cs(char * src_x, char * src_y, double & dst_x, double
+     dst_y = ty;
+     dst_z = tz;
+   } else {
+-    thcs2cs(csdata->params, thcs_get_data(thcfg.outcs)->params, tx, ty, tz, dst_x, dst_y, dst_z);
++    thcs2cs(thcs_get_params(this->cs), thcs_get_params(thcfg.outcs), tx, ty, tz, dst_x, dst_y, dst_z);
+   }
+ 
+   if (thcfg.outcs != TTCS_LOCAL) {
+diff --git a/thexpmap.cxx b/thexpmap.cxx
+index 10e8727..e8644b5 100644
+--- a/thexpmap.cxx
++++ b/thexpmap.cxx
+@@ -1831,7 +1831,7 @@ else
+   // LAYOUT.calibration_local[0].x = ccx * crot + ccy * srot + origin_shx;
+   //LAYOUT.calibration_local[0].y = - ccx * srot + ccy * crot + origin_shy;
+   // if (prj->type == TT_2DPROJ_PLAN) {
+-  //   thcs2cs(thcs_get_data(thcfg.outcs)->params, thcs_get_data(TTCS_LONG_LAT)->params, 
++  //   thcs2cs(thcs_get_params(thcfg.outcs), thcs_get_params(TTCS_LONG_LAT),
+   //                 lim.min.x + prj->rshift_x, lim.min.y + prj->rshift_y, lim.min.z + prj->rshift_z, ccx, ccy, ccz);
+   // } else {
+   //   ccx = 0.0;
+@@ -1846,7 +1846,7 @@ else
+   LAYOUT.calibration_local[n].x = ccx * crot + ccy * srot + origin_shx; \
+ 	LAYOUT.calibration_local[n].y = - ccx * srot + ccy * crot + origin_shy; \
+   if ((prj->type == TT_2DPROJ_PLAN) && (thcfg.outcs != TTCS_LOCAL)) { \
+-    thcs2cs(thcs_get_data(thcfg.outcs)->params, thcs_get_data(TTCS_LONG_LAT)->params, \
++    thcs2cs(thcs_get_params(thcfg.outcs), thcs_get_params(TTCS_LONG_LAT), \
+                   (xxx) + prj->rshift_x, (yyy) + prj->rshift_y, lim.min.z + prj->rshift_z, ccx, ccy, ccz); \
+   } else { \
+     ccx = 0.0; \
+diff --git a/thexpmodel.cxx b/thexpmodel.cxx
+index 3be24ba..91955b5 100644
+--- a/thexpmodel.cxx
++++ b/thexpmodel.cxx
+@@ -228,7 +228,7 @@ void thexpmodel::export_3d_file(class thdatabase * dbp)
+   #endif
+   fnmb.strcpy(title);  // VG 290316: Set the filename as a cave name instead of "cave". The top-level survey name will be even better
+   if ((thcfg.outcs >= 0) || (thcfg.outcs < TTCS_UNKNOWN))  // Export the coordinate system data if one is set
+-    pimg = img_open_write_cs(fnm, fnmb.get_buffer(), thcs_get_data(thcfg.outcs)->params, 1);
++    pimg = img_open_write_cs(fnm, fnmb.get_buffer(), thcs_get_params(thcfg.outcs).c_str(), 1);
+   else
+     pimg = img_open_write(fnm, fnmb.get_buffer(), 1);
+      
+@@ -1923,7 +1923,7 @@ void thexpmodel::export_kml_file(class thdatabase * dbp)
+     for(i = 0; i < nstat; i++) {
+       station = &(db->db1d.station_vec[i]);
+       if ((station->flags & TT_STATIONFLAG_ENTRANCE) != 0) {
+-        thcs2cs(thcs_get_data(thcfg.outcs)->params, thcs_get_data(TTCS_LONG_LAT)->params, 
++        thcs2cs(thcs_get_params(thcfg.outcs), thcs_get_params(TTCS_LONG_LAT),
+           station->x, station->y, station->z, x, y, z);
+         fprintf(out, "<Placemark>\n");
+         fprintf(out, "<styleUrl>#ThEntranceIcon</styleUrl>");
+@@ -1955,14 +1955,14 @@ void thexpmodel::export_kml_file(class thdatabase * dbp)
+           if (numst > 0)
+             fprintf(out,"</coordinates></LineString>\n");
+           fprintf(out,"<LineString><coordinates>\n");
+-          thcs2cs(thcs_get_data(thcfg.outcs)->params, thcs_get_data(TTCS_LONG_LAT)->params, 
++          thcs2cs(thcs_get_params(thcfg.outcs), thcs_get_params(TTCS_LONG_LAT),
+             dbp->db1d.station_vec[cur_st].x, dbp->db1d.station_vec[cur_st].y, dbp->db1d.station_vec[cur_st].z,
+             x, y, z);
+           fprintf(out, "\t%.14f,%.14f,%.14f ", x / THPI * 180.0, y / THPI * 180.0, z);
+           numst = 1;
+         }
+         last_st = dbp->db1d.station_vec[((*tlegs)->reverse ? (*tlegs)->leg->from.id : (*tlegs)->leg->to.id) - 1].uid - 1;
+-        thcs2cs(thcs_get_data(thcfg.outcs)->params, thcs_get_data(TTCS_LONG_LAT)->params, 
++        thcs2cs(thcs_get_params(thcfg.outcs), thcs_get_params(TTCS_LONG_LAT),
+           dbp->db1d.station_vec[last_st].x, dbp->db1d.station_vec[last_st].y, dbp->db1d.station_vec[last_st].z,
+           x, y, z);
+         fprintf(out, "\t%.14f,%.14f,%.14f ", x / THPI * 180.0, y / THPI * 180.0, z);
+@@ -2036,14 +2036,14 @@ void thexpmodel::export_kml_survey_file(FILE * out, thsurvey * surv)
+               if (numst > 0)
+                 fprintf(out, "\n</coordinates></LineString>\n");
+               fprintf(out, "<LineString><coordinates>\n");
+-              thcs2cs(thcs_get_data(thcfg.outcs)->params, thcs_get_data(TTCS_LONG_LAT)->params, 
++              thcs2cs(thcs_get_params(thcfg.outcs), thcs_get_params(TTCS_LONG_LAT),
+                 db->db1d.station_vec[cur_st].x, db->db1d.station_vec[cur_st].y, db->db1d.station_vec[cur_st].z,
+                 x, y, z);
+               fprintf(out, "\t%.14f,%.14f,%.14f ", x / THPI * 180.0, y / THPI * 180.0, z);
+               numst = 1;
+             }
+             last_st = db->db1d.station_vec[legs->to.id - 1].uid - 1;
+-            thcs2cs(thcs_get_data(thcfg.outcs)->params, thcs_get_data(TTCS_LONG_LAT)->params, 
++            thcs2cs(thcs_get_params(thcfg.outcs), thcs_get_params(TTCS_LONG_LAT),
+               db->db1d.station_vec[last_st].x, db->db1d.station_vec[last_st].y, db->db1d.station_vec[last_st].z,
+               x, y, z);
+             fprintf(out, "\t%.14f,%.14f,%.14f ", x / THPI * 180.0, y / THPI * 180.0, z);
+diff --git a/thexptable.cxx b/thexptable.cxx
+index d03bc64..05e2efd 100644
+--- a/thexptable.cxx
++++ b/thexptable.cxx
+@@ -444,7 +444,7 @@ void thexptable::add_coordinates(double x, double y, double z, const char * xlab
+       ty = y;
+       tz = z;
+     } else {
+-      thcs2cs(thcs_get_data(thcfg.outcs)->params, thcs_get_data(this->cs)->params, 
++      thcs2cs(thcs_get_params(thcfg.outcs), thcs_get_params(this->cs),
+         x, y, z, tx, ty, tz);
+       if (thcs_get_data(this->cs)->dms) {
+         tx = tx / THPI * 180.0;
+diff --git a/thexpuni.cxx b/thexpuni.cxx
+index b2ccf96..40baf62 100644
+--- a/thexpuni.cxx
++++ b/thexpuni.cxx
+@@ -509,7 +509,7 @@ void thexpmap::export_kml(class thdb2dxm * maps, class thdb2dprj * prj)
+     for(i = 0; i < nstat; i++) {
+       station = &(db->db1d.station_vec[i]);
+       if ((station->flags & TT_STATIONFLAG_ENTRANCE) != 0) {
+-        thcs2cs(thcs_get_data(thcfg.outcs)->params, thcs_get_data(TTCS_LONG_LAT)->params, 
++        thcs2cs(thcs_get_params(thcfg.outcs), thcs_get_params(TTCS_LONG_LAT),
+           station->x, station->y, station->z, x, y, z);
+         fprintf(out, "<Placemark>\n");
+         fprintf(out, "<styleUrl>#ThEntranceIcon</styleUrl>");
+@@ -577,7 +577,7 @@ void thexpmap::export_kml(class thdb2dxm * maps, class thdb2dprj * prj)
+                   fprintf(out,"<innerBoundaryIs>\n");
+                 fprintf(out,"<LinearRing>\n<coordinates>\n");
+                 for(ip = it->m_point_list.begin(); ip != it->m_point_list.end(); ip++) {
+-                  thcs2cs(thcs_get_data(thcfg.outcs)->params, thcs_get_data(TTCS_LONG_LAT)->params, 
++                  thcs2cs(thcs_get_params(thcfg.outcs), thcs_get_params(TTCS_LONG_LAT),
+                     ip->m_x, ip->m_y, scrap->z, x, y, z);
+                   fprintf(out, "\t%.14f,%.14f,%.14f ", x / THPI * 180.0, y / THPI * 180.0, 0.0);
+                 }
+@@ -669,19 +669,19 @@ void thexpmap::export_bbox(class thdb2dxm * maps, class thdb2dprj * prj)
+             scrap = (thscrap*) cmi->object;
+             if (!thisnan(scrap->lxmin)) {
+ 	    
+-              thcs2cs(thcs_get_data(thcfg.outcs)->params, thcs_get_data(TTCS_LONG_LAT)->params, 
++              thcs2cs(thcs_get_params(thcfg.outcs), thcs_get_params(TTCS_LONG_LAT),
+                 scrap->lxmin + prj->rshift_x, scrap->lymin + prj->rshift_y, scrap->z + prj->rshift_z, cx, cy, cz);
+               lim.Add(cx / THPI * 180.0, cy / THPI * 180.0, cz);
+ 
+-              thcs2cs(thcs_get_data(thcfg.outcs)->params, thcs_get_data(TTCS_LONG_LAT)->params,  
++              thcs2cs(thcs_get_params(thcfg.outcs), thcs_get_params(TTCS_LONG_LAT),
+                 scrap->lxmin + prj->rshift_x, scrap->lymax + prj->rshift_y, scrap->z + prj->rshift_z, cx, cy, cz);
+               lim.Add(cx / THPI * 180.0, cy / THPI * 180.0, cz);
+ 
+-              thcs2cs(thcs_get_data(thcfg.outcs)->params, thcs_get_data(TTCS_LONG_LAT)->params, 
++              thcs2cs(thcs_get_params(thcfg.outcs), thcs_get_params(TTCS_LONG_LAT),
+                 scrap->lxmax + prj->rshift_x, scrap->lymin + prj->rshift_y, scrap->z + prj->rshift_z, cx, cy, cz);
+               lim.Add(cx / THPI * 180.0, cy / THPI * 180.0, cz);
+ 
+-              thcs2cs(thcs_get_data(thcfg.outcs)->params, thcs_get_data(TTCS_LONG_LAT)->params, 
++              thcs2cs(thcs_get_params(thcfg.outcs), thcs_get_params(TTCS_LONG_LAT),
+                 scrap->lxmax + prj->rshift_x, scrap->lymax + prj->rshift_y, scrap->z + prj->rshift_z, cx, cy, cz);
+               lim.Add(cx / THPI * 180.0, cy / THPI * 180.0, cz);
+ 	      
diff -Nru therion-5.4.3ds1/debian/patches/fix-svg-export-segfault.patch therion-5.4.3ds1/debian/patches/fix-svg-export-segfault.patch
--- therion-5.4.3ds1/debian/patches/fix-svg-export-segfault.patch	2019-03-06 10:41:20.000000000 +1300
+++ therion-5.4.3ds1/debian/patches/fix-svg-export-segfault.patch	2019-06-10 12:33:11.000000000 +1200
@@ -10,11 +10,9 @@
  thepsparse.cxx | 8 +++++---
  1 file changed, 5 insertions(+), 3 deletions(-)
 
-diff --git a/thepsparse.cxx b/thepsparse.cxx
-index cf574cf..087886b 100644
 --- a/thepsparse.cxx
 +++ b/thepsparse.cxx
-@@ -386,9 +386,11 @@ void MP_data::print_svg (ofstream & F, string unique_prefix) {
+@@ -386,9 +386,11 @@
              }
              // nemoze ist do predch. cyklu, lebo zmazanie smernika
              // urobi chaos
diff -Nru therion-5.4.3ds1/debian/patches/series therion-5.4.3ds1/debian/patches/series
--- therion-5.4.3ds1/debian/patches/series	2019-03-06 10:41:20.000000000 +1300
+++ therion-5.4.3ds1/debian/patches/series	2019-06-10 12:33:11.000000000 +1200
@@ -2,3 +2,4 @@
 80debianise-makefiles.patch
 90debianise-loch-makefile.patch
 fix-svg-export-segfault.patch
+fix-epsg-esri-cs.patch

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message ---
Unblocked therion.

--- End Message ---

Reply to: