Your message dated Sat, 07 Dec 2013 22:00:07 +0000
with message-id <[email protected]>
and subject line Bug#728822: fixed in orthanc 0.7.2-1
has caused the Debian Bug report #728822,
regarding FTBFS on big-endian architectures, patches attached
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 [email protected]
immediately.)


-- 
728822: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=728822
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: orthanc
Version: 0.6.1-1
Severity: serious
Tags: patch
User: [email protected]
Usertags: origin-ubuntu trusty ubuntu-patch



In Ubuntu, the attached patch was applied to achieve the following:

  * detect-endian.patch: Patch to correctly detect endianness of the
    current host architecture, inspired by upstream's incomplete fix.
  * fix-endian-png.patch: Patch from upstream to fix PngWriter and
    the associated tests on above detected big-endian architectures.

The second patch in the series is a straight backport from upstream
of their PngWriter and testsuite fix, and should be self-evident as
such.

The first patch was heavily inspired by upstream's fix[1] for endian
detection, except that it does it correctly for all arches, instead
of bizarrely assuming that only __powerpc__ is big-endian.  Please
forward this one to them as a more complete fix.

If upstream is concerned that <endian.h> might not exist on Win32 (I
have no way of checking this, so don't know), the extra include could
be dropped, as <ctype.h> includes <endian.h> on Linux anyway.  I just
prefer to be explicit in my includes when using features, as implicit
includes tend to bite you when linux or glibc upstream decide to move
things around. :)

... Adam Conrad

-- System Information:
Debian Release: wheezy/sid
  APT prefers trusty-updates
  APT policy: (500, 'trusty-updates'), (500, 'trusty-security'), (500, 'trusty')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.12.0-1-generic (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru orthanc-0.6.1/debian/changelog orthanc-0.6.1/debian/changelog
diff -Nru orthanc-0.6.1/debian/patches/detect-endian.patch orthanc-0.6.1/debian/patches/detect-endian.patch
--- orthanc-0.6.1/debian/patches/detect-endian.patch	1969-12-31 17:00:00.000000000 -0700
+++ orthanc-0.6.1/debian/patches/detect-endian.patch	2013-11-05 14:47:35.000000000 -0700
@@ -0,0 +1,29 @@
+Description: Detect correct endianness of the host machine
+Author: Adam Conrad <[email protected]>
+Forwarded: no
+
+--- orthanc-0.6.1.orig/UnitTests/main.cpp
++++ orthanc-0.6.1/UnitTests/main.cpp
+@@ -3,6 +3,7 @@
+ #include "gtest/gtest.h"
+ 
+ #include <ctype.h>
++#include <endian.h>
+ 
+ #include "../Core/Compression/ZlibCompressor.h"
+ #include "../Core/DicomFormat/DicomTag.h"
+@@ -479,6 +480,14 @@ TEST(Toolbox, WriteFile)
+   ASSERT_THROW(Toolbox::ReadFile(u, path.c_str()), OrthancException);
+ }
+ 
++TEST(Toolbox, Endianness)
++{
++#if __BYTE_ORDER == __BIG_ENDIAN
++  ASSERT_EQ(Endianness_Big, Toolbox::DetectEndianness());
++#else // __LITTLE_ENDIAN
++  ASSERT_EQ(Endianness_Little, Toolbox::DetectEndianness());
++#endif
++}
+ 
+ int main(int argc, char **argv)
+ {
diff -Nru orthanc-0.6.1/debian/patches/fix-endian-png.patch orthanc-0.6.1/debian/patches/fix-endian-png.patch
--- orthanc-0.6.1/debian/patches/fix-endian-png.patch	1969-12-31 17:00:00.000000000 -0700
+++ orthanc-0.6.1/debian/patches/fix-endian-png.patch	2013-11-05 14:46:54.000000000 -0700
@@ -0,0 +1,75 @@
+Description: Fix PngWriter and associated test on big-endian arches
+Author: Adam Conrad <[email protected]>
+Origin: https://code.google.com/p/orthanc/source/detail?r=51892be15618cc934f099bf90c1180215d5778eb
+
+--- orthanc-0.6.1.orig/UnitTests/Png.cpp
++++ orthanc-0.6.1/UnitTests/Png.cpp
+@@ -3,6 +3,7 @@
+ #include <stdint.h>
+ #include "../Core/FileFormats/PngReader.h"
+ #include "../Core/FileFormats/PngWriter.h"
++#include "../Core/Toolbox.h"
+ 
+ TEST(PngWriter, ColorPattern)
+ {
+@@ -24,6 +25,11 @@ TEST(PngWriter, ColorPattern)
+   }
+ 
+   w.WriteToFile("ColorPattern.png", width, height, pitch, Orthanc::PixelFormat_RGB24, &image[0]);
++
++  std::string f, md5;
++  Orthanc::Toolbox::ReadFile(f, "ColorPattern.png");
++  Orthanc::Toolbox::ComputeMD5(md5, f);
++  ASSERT_EQ("604e785f53c99cae6ea4584870b2c41d", md5);
+ }
+ 
+ TEST(PngWriter, Gray8Pattern)
+@@ -44,6 +50,11 @@ TEST(PngWriter, Gray8Pattern)
+   }
+ 
+   w.WriteToFile("Gray8Pattern.png", width, height, pitch, Orthanc::PixelFormat_Grayscale8, &image[0]);
++
++  std::string f, md5;
++  Orthanc::Toolbox::ReadFile(f, "Gray8Pattern.png");
++  Orthanc::Toolbox::ComputeMD5(md5, f);
++  ASSERT_EQ("5a9b98bea3d0a6d983980cc38bfbcdb3", md5);
+ }
+ 
+ TEST(PngWriter, Gray16Pattern)
+@@ -66,6 +77,11 @@ TEST(PngWriter, Gray16Pattern)
+   }
+ 
+   w.WriteToFile("Gray16Pattern.png", width, height, pitch, Orthanc::PixelFormat_Grayscale16, &image[0]);
++
++  std::string f, md5;
++  Orthanc::Toolbox::ReadFile(f, "Gray16Pattern.png");
++  Orthanc::Toolbox::ComputeMD5(md5, f);
++  ASSERT_EQ("0785866a08bf0a02d2eeff87f658571c", md5);
+ }
+ 
+ TEST(PngWriter, EndToEnd)
+--- orthanc-0.6.1.orig/Core/FileFormats/PngWriter.cpp
++++ orthanc-0.6.1/Core/FileFormats/PngWriter.cpp
+@@ -174,15 +174,18 @@ namespace Orthanc
+       {
+       case PixelFormat_Grayscale16:
+       case PixelFormat_SignedGrayscale16:
+-        png_set_rows(pimpl_->png_, pimpl_->info_, &pimpl_->rows_[0]);
+-
++      {
++        int transforms = 0;
+         if (Toolbox::DetectEndianness() == Endianness_Little)
+         {
+-          // Must swap the endianness!!
+-          png_write_png(pimpl_->png_, pimpl_->info_, PNG_TRANSFORM_SWAP_ENDIAN, NULL);
++          transforms = PNG_TRANSFORM_SWAP_ENDIAN;
+         }
+ 
++        png_set_rows(pimpl_->png_, pimpl_->info_, &pimpl_->rows_[0]);
++        png_write_png(pimpl_->png_, pimpl_->info_, transforms, NULL);
++
+         break;
++      }
+ 
+       default:
+         png_write_image(pimpl_->png_, &pimpl_->rows_[0]);
diff -Nru orthanc-0.6.1/debian/patches/series orthanc-0.6.1/debian/patches/series
--- orthanc-0.6.1/debian/patches/series	2013-09-16 07:39:57.000000000 -0600
+++ orthanc-0.6.1/debian/patches/series	2013-11-05 14:36:43.000000000 -0700
@@ -0,0 +1,2 @@
+detect-endian.patch
+fix-endian-png.patch

--- End Message ---
--- Begin Message ---
Source: orthanc
Source-Version: 0.7.2-1

We believe that the bug you reported is fixed in the latest version of
orthanc, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Sebastien Jodogne <[email protected]> (supplier of updated orthanc package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Tue, 03 Dec 2013 11:30:41 +0100
Source: orthanc
Binary: orthanc liborthancclient0.7 liborthancclient-dev liborthancclient-doc
Architecture: source amd64 all
Version: 0.7.2-1
Distribution: unstable
Urgency: low
Maintainer: Debian Med Packaging Team 
<[email protected]>
Changed-By: Sebastien Jodogne <[email protected]>
Description: 
 liborthancclient-dev - Orthanc Client development files
 liborthancclient-doc - Orthanc Client documentation
 liborthancclient0.7 - Orthanc Client runtime library
 orthanc    - RESTful DICOM server for healthcare and medical research
Closes: 728822
Changes: 
 orthanc (0.7.2-1) unstable; urgency=low
 .
   [ Sebastien Jodogne ]
   * New upstream version: 0.7.2
   * Support big-endian architectures. Closes: #728822
 .
   [ Andreas Tille ]
   * debian/control:
      - Build-Depends: unzip
      - Standards-Version: 3.9.5
Checksums-Sha1: 
 a5cccbfe1573418e36971b94e446f43bfb496f2b 1805 orthanc_0.7.2-1.dsc
 51451b8e857298e1f829efda28d4131f2c8e7d54 544985 orthanc_0.7.2.orig.tar.gz
 b0e65acc1b86226d2e4483edb615f7b031a6c244 120822 orthanc_0.7.2-1.debian.tar.gz
 234c4ea2ee16b1331284acd6f97e589aa30440f6 464478 orthanc_0.7.2-1_amd64.deb
 a36dd71ffdec76185ed3ace0fc9f0e0beae8862b 106624 
liborthancclient0.7_0.7.2-1_amd64.deb
 f006a56333cef6fc33c9bca4e4f0d3b67e5b1fc1 16430 
liborthancclient-dev_0.7.2-1_amd64.deb
 9f78ccac42f381245a16b505554c76398517ccd8 71046 
liborthancclient-doc_0.7.2-1_all.deb
Checksums-Sha256: 
 af0408ffc30f4efc15276070c2290655f6eaf0de794558f0017ef161bd201235 1805 
orthanc_0.7.2-1.dsc
 d51f1e9940214c0d5607b7e863547e30f426b54bc7f49fae796d75594e90d614 544985 
orthanc_0.7.2.orig.tar.gz
 b23d867bbc9b4c4cee0f67781471ff13cc8937d510c2dcf9afd362278295e8ee 120822 
orthanc_0.7.2-1.debian.tar.gz
 a711e0f135373d5f6ebe3f596f0673d60572838d69f61a7e22453d973db278da 464478 
orthanc_0.7.2-1_amd64.deb
 9522e1ed80c3065a3742fb061d347e65810eaaf653d28e8f644172b2e383703c 106624 
liborthancclient0.7_0.7.2-1_amd64.deb
 8238d3ade526d42e3e884b93013927bbed305bb95f1e9d9853eed9b14ca39de8 16430 
liborthancclient-dev_0.7.2-1_amd64.deb
 b02da74cd51a80e8a17f2dcf9ffd427099ce4677fea4a319b64eb28db28f4393 71046 
liborthancclient-doc_0.7.2-1_all.deb
Files: 
 f22cf2327f8edbd7f854c5fbe641b94a 1805 science optional orthanc_0.7.2-1.dsc
 8132498923fa8a59456fbef409e6eaed 544985 science optional 
orthanc_0.7.2.orig.tar.gz
 cc15241ecc28faa0fc9f3d1885ac0e44 120822 science optional 
orthanc_0.7.2-1.debian.tar.gz
 776c9364e00e6c1a419caa2af5109379 464478 science optional 
orthanc_0.7.2-1_amd64.deb
 8dfbc1866442b3a4b598659d7315fae6 106624 libs optional 
liborthancclient0.7_0.7.2-1_amd64.deb
 369cbc8b742dad37b4f964dbd93af222 16430 libdevel optional 
liborthancclient-dev_0.7.2-1_amd64.deb
 30df2261bc34e2ae33876a43d6081058 71046 doc optional 
liborthancclient-doc_0.7.2-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)

iEYEARECAAYFAlKd+g4ACgkQYDBbMcCf01qEaQCePDwvBcY77+aG3IW52eQkjYtV
SksAn1khsCCfUNeBk56BORLAB/xOWvgK
=DIkZ
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to