[med-svn] [Git][med-team/odil][master] 3 commits: Add patch for building with boost >= 1.87. Closes: #1110619
Julien Lamy (@lamy-guest)
gitlab at salsa.debian.org
Tue Aug 19 09:38:59 BST 2025
Julien Lamy pushed to branch master at Debian Med / odil
Commits:
52e84861 by Julien Lamy at 2025-08-19T09:51:04+02:00
Add patch for building with boost >= 1.87. Closes: #1110619
- - - - -
05871c0f by Julien Lamy at 2025-08-19T10:31:34+02:00
Improve autopkgtests
- - - - -
99b49b8c by Julien Lamy at 2025-08-19T10:38:25+02:00
Update standard version
- - - - -
7 changed files:
- debian/control
- + debian/patches/fix-boost-asio-1.87.patch
- debian/patches/series
- debian/rules
- + debian/tests/cli_dump.sh
- + debian/tests/control
- + debian/tests/lib_dump.sh
Changes:
=====================================
debian/control
=====================================
@@ -2,7 +2,6 @@ Source: odil
Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
Uploaders: Julien Lamy <lamy at unistra.fr>
Section: science
-Testsuite: autopkgtest-pkg-python
Priority: optional
Build-Depends: dpkg-dev (>= 1.22.5), debhelper-compat (= 13),
d-shlibs (>= 0.106),
@@ -29,7 +28,7 @@ Build-Depends: dpkg-dev (>= 1.22.5), debhelper-compat (= 13),
python3-all-dev
Build-Depends-Indep: doxygen,
graphviz
-Standards-Version: 4.6.2
+Standards-Version: 4.7.2
Vcs-Browser: https://salsa.debian.org/med-team/odil
Vcs-Git: https://salsa.debian.org/med-team/odil.git
Homepage: https://github.com/lamyj/odil
=====================================
debian/patches/fix-boost-asio-1.87.patch
=====================================
@@ -0,0 +1,115 @@
+Description: Fix for boost asio >= 1.87
+Author: Julien Lamy <lamy at unistra.fr>
+--- a/src/odil/Association.cpp
++++ b/src/odil/Association.cpp
+@@ -207,11 +207,18 @@ Association
+ {
+ boost::asio::ip::tcp::resolver resolver(
+ this->_state_machine.get_transport().get_service());
++#if BOOST_VERSION >= 108700
++ auto const endpoint_range = resolver.resolve(this->_peer_host, "");
++#else
+ boost::asio::ip::tcp::resolver::query const query(this->_peer_host, "");
+ auto const endpoint_it = resolver.resolve(query);
+-
++#endif
+ dul::EventData data;
++#if BOOST_VERSION >= 108700
++ data.peer_endpoint = *endpoint_range.begin();
++#else
+ data.peer_endpoint = *endpoint_it;
++#endif
+ data.peer_endpoint.port(this->_peer_port);
+
+ auto const request =
+diff --git a/src/odil/dul/StateMachine.cpp b/src/odil/dul/StateMachine.cpp
+index 73e24e9..a22ea2b 100644
+--- a/src/odil/dul/StateMachine.cpp
++++ b/src/odil/dul/StateMachine.cpp
+@@ -313,7 +313,11 @@ StateMachine
+ throw Exception("TCP timer error: "+error.message());
+ }
+ */
++#if BOOST_VERSION >= 108700
++ this->_transport.get_service().restart();
++#else
+ this->_transport.get_service().reset();
++#endif
+ }
+
+ AssociationAcceptor const &
+diff --git a/src/odil/dul/Transport.cpp b/src/odil/dul/Transport.cpp
+index dc70504..d988330 100644
+--- a/src/odil/dul/Transport.cpp
++++ b/src/odil/dul/Transport.cpp
+@@ -270,7 +270,11 @@ Transport
+ {
+ throw Exception("No operations ran");
+ }
++#if BOOST_VERSION >= 108700
++ this->_service.restart();
++#else
+ this->_service.reset();
++#endif
+ }
+
+ if(source == Source::OPERATION)
+@@ -290,7 +294,11 @@ Transport
+ {
+ throw Exception("No operations polled");
+ }
++#if BOOST_VERSION >= 108700
++ this->_service.restart();
++#else
+ this->_service.reset();
++#endif
+ }
+
+ if(source != Source::TIMER)
+diff --git a/src/odil/dul/Transport.h b/src/odil/dul/Transport.h
+index 93a6bab..6a0ef23 100644
+--- a/src/odil/dul/Transport.h
++++ b/src/odil/dul/Transport.h
+@@ -15,6 +15,17 @@
+ #include <boost/asio.hpp>
+ #include <boost/date_time.hpp>
+
++// NOTE: the io_service type alias has been removed in boost 1.87.0
++#if BOOST_VERSION >= 108700
++namespace boost
++{
++namespace asio
++{
++using io_service = io_context;
++}
++}
++#endif
++
+ #include "odil/odil.h"
+
+ namespace odil
+--- a/tests/code/dul/Transport.cpp
++++ b/tests/code/dul/Transport.cpp
+@@ -18,12 +18,22 @@ BOOST_AUTO_TEST_CASE(Connect)
+ odil::dul::Transport transport;
+
+ boost::asio::ip::tcp::resolver resolver(transport.get_service());
++#if BOOST_VERSION >= 108700
++ auto const endpoint_range = resolver.resolve(
++ odil::dul::Transport::Socket::protocol_type::v4(),
++ "www.example.com", "80");
++#else
+ boost::asio::ip::tcp::resolver::query const query(
+ odil::dul::Transport::Socket::protocol_type::v4(),
+ "www.example.com", "80");
+ auto const endpoint_it = resolver.resolve(query);
++#endif
+
++#if BOOST_VERSION >= 108700
++ transport.connect(*endpoint_range.begin());
++#else
+ transport.connect(*endpoint_it);
++#endif
+ BOOST_REQUIRE(transport.is_open());
+
+ transport.write("HEAD / HTTP/1.1\r\nHost: www.example.com\r\n\r\n");
=====================================
debian/patches/series
=====================================
@@ -3,3 +3,4 @@ remove_boost_exception.patch
fix-interpreter-path.patch
remove-network-unit-tests.patch
fix-g++-13.patch
+fix-boost-asio-1.87.patch
=====================================
debian/rules
=====================================
@@ -2,9 +2,6 @@
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
-# needed for the tests
-export DCMDICTPATH=$(shell ls /usr/share/libdcmtk*/dicom.dic | head -n 1)
-
# Find all Python versions
PYTHON3=$(shell py3versions -vd)
ALLPY=$(shell py3versions -vs)
=====================================
debian/tests/cli_dump.sh
=====================================
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+set -e
+
+dump2dcm /dev/stdin "$AUTOPKGTEST_TMP"/dataset.dcm <<EOF
+(0002,0000) UL 188 # 4, 1 FileMetaInformationGroupLength
+(0002,0001) OB 00\01 # 2, 1 FileMetaInformationVersion
+(0002,0002) UI =RawDataStorage # 26, 1 MediaStorageSOPClassUID
+(0002,0003) UI [2.25.950903449422502667095875590734673] # 44, 1 MediaStorageSOPInstanceUID
+(0002,0010) UI =LittleEndianExplicit # 20, 1 TransferSyntaxUID
+(0002,0012) UI [1.2.276.0.7230010.3.0.3.6.5] # 28, 1 ImplementationClassUID
+(0002,0013) SH [OFFIS_DCMTK_365] # 16, 1 ImplementationVersionName
+(0008,0016) UI =RawDataStorage # 26, 1 SOPClassUID
+(0008,0018) UI [2.25.950903449422502667095875590734673] # 44, 1 SOPInstanceUID
+(0010,0010) PN [Doe^John] # 8, 1 PatientName
+(0010,0020) LO [DJ001] # 6, 1 PatientID
+EOF
+
+odil print "$AUTOPKGTEST_TMP"/dataset.dcm
=====================================
debian/tests/control
=====================================
@@ -0,0 +1,5 @@
+Test-Command: lib_dump.sh
+Depends: dcmtk, python3-all, python3-odil
+
+# Test-Command: sh ./cli_dump.sh
+# Depends: dcmtk, odil
=====================================
debian/tests/lib_dump.sh
=====================================
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+set -e
+
+dump2dcm /dev/stdin "$AUTOPKGTEST_TMP"/dataset.dcm <<EOF
+(0002,0000) UL 188 # 4, 1 FileMetaInformationGroupLength
+(0002,0001) OB 00\01 # 2, 1 FileMetaInformationVersion
+(0002,0002) UI =RawDataStorage # 26, 1 MediaStorageSOPClassUID
+(0002,0003) UI [2.25.950903449422502667095875590734673] # 44, 1 MediaStorageSOPInstanceUID
+(0002,0010) UI =LittleEndianExplicit # 20, 1 TransferSyntaxUID
+(0002,0012) UI [1.2.276.0.7230010.3.0.3.6.5] # 28, 1 ImplementationClassUID
+(0002,0013) SH [OFFIS_DCMTK_365] # 16, 1 ImplementationVersionName
+(0008,0016) UI =RawDataStorage # 26, 1 SOPClassUID
+(0008,0018) UI [2.25.950903449422502667095875590734673] # 44, 1 SOPInstanceUID
+(0010,0010) PN [Doe^John] # 8, 1 PatientName
+(0010,0020) LO [DJ001] # 6, 1 PatientID
+EOF
+
+for py in $(py3versions -vs) ; do
+ python${py} -c \
+ 'import sys; import odil; \
+ header, data_set=odil.Reader.read_file(sys.argv[1]); \
+ print("\n".join([": ".join((str(k), str(list(v)))) for k, v in data_set.items()]))' \
+ "$AUTOPKGTEST_TMP"/dataset.dcm
+done
View it on GitLab: https://salsa.debian.org/med-team/odil/-/compare/9d11767196b46b09598785561a668d9da5db294a...99b49b8c4cfedbdddebf83a62cd06b114b8c9955
--
View it on GitLab: https://salsa.debian.org/med-team/odil/-/compare/9d11767196b46b09598785561a668d9da5db294a...99b49b8c4cfedbdddebf83a62cd06b114b8c9955
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/20250819/8eca736b/attachment-0001.htm>
More information about the debian-med-commit
mailing list