[med-svn] [Git][med-team/orthanc][master] 5 commits: Fix compatibility with big-endian architectures

Sebastien Jodogne (@jodogne-guest) gitlab at salsa.debian.org
Wed Aug 16 09:58:18 BST 2023



Sebastien Jodogne pushed to branch master at Debian Med / orthanc


Commits:
2c6c0316 by jodogne-guest at 2023-08-16T09:29:42+02:00
Fix compatibility with big-endian architectures

- - - - -
43a9024c by jodogne-guest at 2023-08-16T09:30:36+02:00
fix

- - - - -
9d8a504d by jodogne-guest at 2023-08-16T09:48:17+02:00
Revert "fix"

This reverts commit 43a9024ce7e7e6e5e51083520650d2b29957255f.

- - - - -
6207bd6e by jodogne-guest at 2023-08-16T10:20:51+02:00
updated configuration files

- - - - -
6f7521aa by jodogne-guest at 2023-08-16T10:56:34+02:00
Upload to unstable

- - - - -


10 changed files:

- debian/changelog
- debian/configuration/orthanc.json
- debian/control
- debian/copyright
- debian/docs/Orthanc.8
- debian/docs/OrthancRecoverCompressedFile.8
- debian/docs/orthanc_upgrade.8
- + debian/patches/fix-big-endian
- debian/patches/series
- − debian/patches/skip-Color16Pattern.patch


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+orthanc (1.12.1+dfsg-3) unstable; urgency=medium
+
+  * Fix compatibility with big-endian architectures. (Closes: #1041813)
+
+ -- Sebastien Jodogne <s.jodogne at gmail.com>  Wed, 16 Aug 2023 09:07:21 +0200
+
 orthanc (1.12.1+dfsg-2) unstable; urgency=high
 
   * Team upload.


=====================================
debian/configuration/orthanc.json
=====================================
@@ -1,6 +1,11 @@
 {
   /**
    * General configuration of Orthanc
+   *
+   * As a general recommendation, you should always favour absolute 
+   * paths when you need to provide a path to a file or a directory.  
+   * This is not done in this configuration file since we don't know 
+   * where Orthanc is going to be installed.
    **/
 
   // The logical name of this instance of Orthanc. This one is
@@ -41,6 +46,16 @@
   // of patients)
   "MaximumPatientCount" : 0,
 
+  // Action to take when the maximum storage is reached.
+  // By default, the patients are recycled ("Recycle" mode).
+  // In "Reject" mode, the sender will receive a 0xA700 DIMSE status code
+  // if the instance was sent through C-Store, a 507 HTTP status code
+  // if using the REST API and a 0xA700 Failure reason when using
+  // DicomWeb Stow-RS 
+  // Allowed values: "Recycle", "Reject"
+  // (new in Orthanc 1.11.2)
+  "MaximumStorageMode" : "Recycle",
+
   // Maximum size of the storage cache in MB.  The storage cache
   // is stored in RAM and contains a copy of recently accessed
   // files (written or read).  A value of "0" indicates the cache
@@ -52,6 +67,15 @@
   "LuaScripts" : [
   ],
 
+  // The period (in seconds) between 2 calls of the "OnHeartBeat"
+  // lua callback.  O means the heart beat is disabled.
+  // TODO: text below for Orthanc book:
+  // Note: that the period is actually not the delay between
+  // the end of an execution and the triggering of the next one.
+  // Since there is only one lua context, if other lua code is being
+  // executed, the heart beat might be delayed even more.
+  "LuaHeartBeatPeriod" : 0,
+
   // List of paths to the plugins that are to be loaded into this
   // instance of Orthanc (e.g. "./libPluginTest.so" for Linux, or
   // "./PluginTest.dll" for Windows). These paths can refer to
@@ -68,6 +92,13 @@
   // this value to "1".
   "ConcurrentJobs" : 2,
 
+  // Defines the number of threads that are used to execute each type of
+  // jobs (for the jobs that can be parallelized).
+  // A value of "0" indicates to use all the available CPU logical cores.
+  // (new in Orthanc 1.11.3)
+  "JobsEngineThreadsCount" : {
+    "ResourceModification": 1     // for /anonymize, /modify
+  },
 
   /**
    * Configuration of the HTTP server
@@ -397,8 +428,8 @@
     //  "AllowStore" : true,
     //  "AllowStorageCommitment" : false,  // new in 1.6.0
     //  "AllowTranscoding" : true,         // new in 1.7.0
-    //  "UseDicomTls" : false              // new in 1.9.0
-    //  "LocalAet" : "HELLO"               // new in 1.9.0
+    //  "UseDicomTls" : false,             // new in 1.9.0
+    //  "LocalAet" : "HELLO",              // new in 1.9.0
     //  "Timeout" : 60                     // new in 1.9.1
     //}
   },
@@ -572,6 +603,10 @@
   // Mongoose.
   "KeepAlive" : true,
 
+  // Defines the Keep-Alive timeout in seconds.
+  // (new in Orthanc 1.11.3)
+  "KeepAliveTimeout" : 1,
+
   // Enable or disable Nagle's algorithm. Only taken into
   // consideration if Orthanc is compiled to use CivetWeb. Experiments
   // show that best performance can be obtained by setting both
@@ -726,6 +761,11 @@
   // with Orthanc 1.5.8, this URI is disabled by default for security.
   "ExecuteLuaEnabled" : false,
 
+  // Whether the REST API can write to the filesystem (e.g. in 
+  // /instances/../export route). Starting with Orthanc 1.12.0, 
+  // this URI is disabled by default for security.
+  "RestApiWriteToFileSystemEnabled": false,
+
   // Set the timeout while serving HTTP requests by the embedded Web
   // server, in seconds. This corresponds to option
   // "request_timeout_ms" of Mongoose/Civetweb. It will set the socket
@@ -807,9 +847,9 @@
 
   // If "DeidentifyLogs" is true, this sets the DICOM standard to
   // follow for the deidentification/anonymization of the query
-  // contents. Possible values are "2008", "2017c" and "2021b" (new
-  // in Orthanc 1.8.2)
-  "DeidentifyLogsDicomVersion" : "2021b",
+  // contents. Possible values are "2008", "2017c", "2021b" (new
+  // in Orthanc 1.8.2), and "2023b" (new in Orthanc 1.12.1)
+  "DeidentifyLogsDicomVersion" : "2023b",
 
   // Maximum length of the PDU (Protocol Data Unit) in the DICOM
   // network protocol, expressed in bytes. This value affects both
@@ -853,5 +893,50 @@
   // (default behaviour).  A value > 1 is meaningful only if the storage
   // is a distributed network storage (e.g object storage plugin).
   // (new experimental feature in Orthanc 1.10.0)
-  "ZipLoaderThreads": 0
+  "ZipLoaderThreads": 0,
+
+  // Extra Main Dicom tags that are stored in DB together with all default
+  // Main Dicom tags that are already stored.
+  // see https://book.orthanc-server.com/faq/main-dicom-tags.html 
+  // (new in Orthanc 1.11.0)
+  // Sequences tags are not supported.
+  /**
+  "ExtraMainDicomTags" : {
+    "Instance" : [
+      "Rows",
+      "Columns",
+      "ImageType",
+      "SOPClassUID",
+      "ContentDate",
+      "ContentTime",
+      "FrameOfReferenceUID",
+      "PixelSpacing",
+      "SpecificCharacterSet",
+      "BitsAllocated"
+    ],
+    "Series" : [],
+    "Study": [],
+    "Patient": []
+  },
+  */
+
+  // Enables/disables warnings in the logs.
+  // "true" enables a warning.  All warnings are enabled by default
+  // see https://book.orthanc-server.com/faq/main-dicom-tags.html#warnings
+  // (new in Orthanc 1.11.0)
+  "Warnings" : {
+    // A "RequestedTags" has been read from storage which is slower than
+    // reading it from DB.
+    // You might want to store this tag in ExtraMainDicomTags to build
+    // the response faster.
+    "W001_TagsBeingReadFromStorage": true,
+    
+    // Retrieving a list of Main dicom tags from a resource that has been
+    // saved with another "ExtraMainDicomTags" configuration which means that
+    // your response might be incomplete/inconsistent.
+    // You should call patients|studies|series|instances/../reconstruct to rebuild
+    // the DB.  You may also check for the "Housekeeper" plugin
+    "W002_InconsistentDicomTagsInDb": true
+  }
+
 }


=====================================
debian/control
=====================================
@@ -9,7 +9,7 @@ Build-Depends: cmake,
                doxygen,
                libboost-all-dev,
                libcharls-dev,
-               libcivetweb-dev,
+               libcivetweb-dev (>= 1.14),
                libcurl4-openssl-dev | libcurl4-dev,
                libdcmtk-dev,
                libgtest-dev,
@@ -115,7 +115,7 @@ Architecture: any
 Section: libdevel
 Depends: liborthancframework1 (= ${binary:Version}),
          libboost-all-dev,
-         libcivetweb-dev,
+         libcivetweb-dev (>= 1.14),
          libdcmtk-dev,
          libjsoncpp-dev,
          liblua5.3-dev,


=====================================
debian/copyright
=====================================
@@ -14,23 +14,23 @@ Files-Excluded:
         OrthancFramework/Resources/ThirdParty/VisualStudio/*
 
 Files: *
-Copyright: 2012-2016 Sebastien Jodogne <s.jodogne at gmail.com>, University Hospital of Liege (Belgium), and 2017-2022 Osimis S.A. (Belgium), and 2021-2022 UCLouvain (Belgium)
+Copyright: 2012-2016 Sebastien Jodogne <s.jodogne at gmail.com>, University Hospital of Liege (Belgium), and 2017-2023 Osimis S.A. (Belgium), and 2021-2023 UCLouvain (Belgium)
 License: GPL-3+
 
 Files: OrthancFramework/*
-Copyright: 2012-2016 Sebastien Jodogne <s.jodogne at gmail.com>, University Hospital of Liege (Belgium), and 2017-2022 Osimis S.A. (Belgium), and 2021-2022 UCLouvain (Belgium)
+Copyright: 2012-2016 Sebastien Jodogne <s.jodogne at gmail.com>, University Hospital of Liege (Belgium), and 2017-2023 Osimis S.A. (Belgium), and 2021-2023 UCLouvain (Belgium)
 License: LGPL-3+
 
 Files: OrthancFramework/Sources/SQLite/*
-Copyright: 2012-2016 Sebastien Jodogne <s.jodogne at gmail.com>, University Hospital of Liege (Belgium), and 2017-2022 Osimis S.A. (Belgium), and 2021-2022 UCLouvain (Belgium), and 2012 The Chromium Authors
+Copyright: 2012-2016 Sebastien Jodogne <s.jodogne at gmail.com>, University Hospital of Liege (Belgium), and 2017-2023 Osimis S.A. (Belgium), and 2021-2023 UCLouvain (Belgium), and 2012 The Chromium Authors
 License: BSD-3-clause
 
 Files: OrthancFramework/Sources/DicomParsing/Internals/DicomImageDecoder.cpp OrthancFramework/Sources/DicomParsing/ParsedDicomFile.cpp
-Copyright: 2012-2016 Sebastien Jodogne <s.jodogne at gmail.com>, University Hospital of Liege (Belgium), and 2017-2022 Osimis S.A. (Belgium), and 2021-2022 UCLouvain (Belgium), 2006-2011 Mathieu Malaterre, and 1993-2005 CREATIS
+Copyright: 2012-2016 Sebastien Jodogne <s.jodogne at gmail.com>, University Hospital of Liege (Belgium), and 2017-2023 Osimis S.A. (Belgium), and 2021-2023 UCLouvain (Belgium), 2006-2011 Mathieu Malaterre, and 1993-2005 CREATIS
 License: LGPL-3+
 
 Files: OrthancFramework/Sources/DicomParsing/DicomDirWriter.cpp OrthancFramework/Sources/DicomNetworking/Internals/CommandDispatcher.cpp OrthancFramework/Sources/DicomNetworking/Internals/FindScp.cpp OrthancFramework/Sources/DicomNetworking/Internals/MoveScp.cpp OrthancFramework/Sources/DicomNetworking/Internals/StoreScp.cpp OrthancFramework/Sources/DicomNetworking/Internals/GetScp.cpp
-Copyright: 2012-2016 Sebastien Jodogne <s.jodogne at gmail.com>, University Hospital of Liege (Belgium), and 2017-2022 Osimis S.A. (Belgium), and 2021-2022 UCLouvain (Belgium), and 1994-2011 OFFIS e.V.
+Copyright: 2012-2016 Sebastien Jodogne <s.jodogne at gmail.com>, University Hospital of Liege (Belgium), and 2017-2023 Osimis S.A. (Belgium), and 2021-2023 UCLouvain (Belgium), and 1994-2011 OFFIS e.V.
 License: LGPL-3+
 
 


=====================================
debian/docs/Orthanc.8
=====================================
@@ -1,5 +1,5 @@
-.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.49.1.
-.TH ORTHANC "8" "March 2022" "Orthanc 1.10.1" "System Administration Utilities"
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.49.3.
+.TH ORTHANC "8" "August 2023" "Orthanc 1.12.1" "System Administration Utilities"
 .SH NAME
 Orthanc \- Lightweight, RESTful DICOM server for healthcare and medical research
 .SH SYNOPSIS
@@ -118,9 +118,9 @@ Written by Sebastien Jodogne <s.jodogne at orthanc\-labs.com>
 .SH COPYRIGHT
 Copyright \(co 2012\-2016 Sebastien Jodogne, Medical Physics Department, University Hospital of Liege (Belgium)
 .br
-Copyright \(co 2017\-2022 Osimis S.A. (Belgium)
+Copyright \(co 2017\-2023 Osimis S.A. (Belgium)
 .br
-Copyright \(co 2021\-2022 Sebastien Jodogne, ICTEAM UCLouvain (Belgium)
+Copyright \(co 2021\-2023 Sebastien Jodogne, ICTEAM UCLouvain (Belgium)
 Licensing GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
 .br
 This is free software: you are free to change and redistribute it.


=====================================
debian/docs/OrthancRecoverCompressedFile.8
=====================================
@@ -1,4 +1,4 @@
-.TH ORTHANC "8" "March 2022" "Orthanc 1.10.1" "System Administration tools and Deamons"
+.TH ORTHANC "8" "August 2023" "Orthanc 1.12.1" "System Administration tools and Deamons"
 .SH NAME
 Orthanc \- Lightweight, RESTful DICOM server for healthcare and medical research
 .SH SYNOPSIS
@@ -21,9 +21,9 @@ Written by Sebastien Jodogne <s.jodogne at gmail.com>
 .SH COPYRIGHT
 Copyright \(co 2012\-2016 Sebastien Jodogne, Medical Physics Department, University Hospital of Liege (Belgium)
 .br
-Copyright \(co 2017\-2022 Osimis S.A. (Belgium)
+Copyright \(co 2017\-2023 Osimis S.A. (Belgium)
 .br
-Copyright \(co 2021\-2022 UCLouvain (Belgium)
+Copyright \(co 2021\-2023 UCLouvain (Belgium)
 Licensing GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
 .br
 This is free software: you are free to change and redistribute it.


=====================================
debian/docs/orthanc_upgrade.8
=====================================
@@ -1,4 +1,4 @@
-.TH ORTHANC "8" "March 2022" "Orthanc 1.10.1" "System Administration tools and Deamons"
+.TH ORTHANC "8" "August 2023" "Orthanc 1.12.1" "System Administration tools and Deamons"
 .SH NAME
 Orthanc \- Lightweight, RESTful DICOM server for healthcare and medical research
 .SH SYNOPSIS


=====================================
debian/patches/fix-big-endian
=====================================
@@ -0,0 +1,65 @@
+Description: Fix unit test PngWriter.Color16Pattern on big-endian architectures
+Author: Sebastien Jodogne <s.jodogne at orthanc-labs.com>
+Forwarded: yes
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: Orthanc-1.12.1/OrthancFramework/UnitTestsSources/ImageTests.cpp
+===================================================================
+--- Orthanc-1.12.1.orig/OrthancFramework/UnitTestsSources/ImageTests.cpp
++++ Orthanc-1.12.1/OrthancFramework/UnitTestsSources/ImageTests.cpp
+@@ -33,10 +33,11 @@
+ #include "../Sources/Images/ImageProcessing.h"
+ #include "../Sources/Images/JpegReader.h"
+ #include "../Sources/Images/JpegWriter.h"
+-#include "../Sources/Images/PngReader.h"
+-#include "../Sources/Images/PngWriter.h"
+ #include "../Sources/Images/PamReader.h"
+ #include "../Sources/Images/PamWriter.h"
++#include "../Sources/Images/PngReader.h"
++#include "../Sources/Images/PngWriter.h"
++#include "../Sources/OrthancException.h"
+ #include "../Sources/Toolbox.h"
+ 
+ #if ORTHANC_SANDBOXED != 1
+@@ -96,14 +97,33 @@ TEST(PngWriter, Color16Pattern)
+     uint8_t *p = &image[0] + y * pitch;
+     for (unsigned int x = 0; x < width; x++, p += 8)
+     {
+-      p[0] = (y % 8 == 0) ? 255 : 0;
+-      p[1] = (y % 8 == 1) ? 255 : 0;
+-      p[2] = (y % 8 == 2) ? 255 : 0;
+-      p[3] = (y % 8 == 3) ? 255 : 0;
+-      p[4] = (y % 8 == 4) ? 255 : 0;
+-      p[5] = (y % 8 == 5) ? 255 : 0;
+-      p[6] = (y % 8 == 6) ? 255 : 0;
+-      p[7] = (y % 8 == 7) ? 255 : 0;
++      switch (Orthanc::Toolbox::DetectEndianness())
++      {
++        case Orthanc::Endianness_Little:
++          p[0] = (y % 8 == 0) ? 255 : 0;
++          p[1] = (y % 8 == 1) ? 255 : 0;
++          p[2] = (y % 8 == 2) ? 255 : 0;
++          p[3] = (y % 8 == 3) ? 255 : 0;
++          p[4] = (y % 8 == 4) ? 255 : 0;
++          p[5] = (y % 8 == 5) ? 255 : 0;
++          p[6] = (y % 8 == 6) ? 255 : 0;
++          p[7] = (y % 8 == 7) ? 255 : 0;
++          break;
++
++        case Orthanc::Endianness_Big:
++          p[0] = (y % 8 == 1) ? 255 : 0;
++          p[1] = (y % 8 == 0) ? 255 : 0;
++          p[2] = (y % 8 == 3) ? 255 : 0;
++          p[3] = (y % 8 == 2) ? 255 : 0;
++          p[4] = (y % 8 == 5) ? 255 : 0;
++          p[5] = (y % 8 == 4) ? 255 : 0;
++          p[6] = (y % 8 == 7) ? 255 : 0;
++          p[7] = (y % 8 == 6) ? 255 : 0;
++          break;
++
++        default:
++          throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented);
++      }
+     }
+   }
+ 


=====================================
debian/patches/series
=====================================
@@ -1,2 +1,2 @@
 dcmtk-3.6.7
-skip-Color16Pattern.patch
+fix-big-endian


=====================================
debian/patches/skip-Color16Pattern.patch deleted
=====================================
@@ -1,21 +0,0 @@
-Description: skip Color16Pattern
- This test is failing on s390x.
- .
- FIXME: a proper patch may be doable and I started analysing the issue in more
- details, but this skip is to rapidly migrate orthanc with security patches to
- testing.  I will open a proper bug entry after upload.
-Author: Étienne Mollier <emollier at debian.org>
-Last-Update: 2023-07-23
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- orthanc.orig/OrthancFramework/UnitTestsSources/ImageTests.cpp
-+++ orthanc/OrthancFramework/UnitTestsSources/ImageTests.cpp
-@@ -83,7 +83,7 @@
-   ASSERT_EQ("604e785f53c99cae6ea4584870b2c41d", md5);
- }
- 
--TEST(PngWriter, Color16Pattern)
-+TEST(PngWriter, DISABLED_Color16Pattern)
- {
-   Orthanc::PngWriter w;
-   unsigned int width = 17;



View it on GitLab: https://salsa.debian.org/med-team/orthanc/-/compare/569facf557aaa461e7778f0bb377547ba9c5f3c8...6f7521aa614bd539598959ba97a148fe6512997b

-- 
View it on GitLab: https://salsa.debian.org/med-team/orthanc/-/compare/569facf557aaa461e7778f0bb377547ba9c5f3c8...6f7521aa614bd539598959ba97a148fe6512997b
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20230816/4902ea5d/attachment-0001.htm>


More information about the debian-med-commit mailing list