[med-svn] r15480 - in trunk/packages/dcmtk/branches/experimental/debian: . patches
Mathieu Malaterre
malat at moszumanska.debian.org
Tue Dec 10 14:18:53 UTC 2013
Author: malat
Date: 2013-12-10 14:18:53 +0000 (Tue, 10 Dec 2013)
New Revision: 15480
Added:
trunk/packages/dcmtk/branches/experimental/debian/patches/setuid.patch
Modified:
trunk/packages/dcmtk/branches/experimental/debian/changelog
trunk/packages/dcmtk/branches/experimental/debian/patches/ofstd_markup_6.patch
trunk/packages/dcmtk/branches/experimental/debian/patches/series
trunk/packages/dcmtk/branches/experimental/debian/patches/warn_unused_result.patch
trunk/packages/dcmtk/branches/experimental/debian/rules
Log:
Toward clean install
Modified: trunk/packages/dcmtk/branches/experimental/debian/changelog
===================================================================
--- trunk/packages/dcmtk/branches/experimental/debian/changelog 2013-12-10 10:59:56 UTC (rev 15479)
+++ trunk/packages/dcmtk/branches/experimental/debian/changelog 2013-12-10 14:18:53 UTC (rev 15480)
@@ -1,3 +1,11 @@
+dcmtk (3.6.1~20131114-3) experimental; urgency=low
+
+ * Another round of compilation fixes. Closes: #731434
+ * Fix installation. Closes: #731752
+ * Another attempt at fixing test. Closes: #730582
+
+ -- Mathieu Malaterre <malat at debian.org> Tue, 10 Dec 2013 15:15:52 +0100
+
dcmtk (3.6.1~20131114-2) experimental; urgency=low
* Fix failing test (ofstd_markup_6). Closes: #730582
Modified: trunk/packages/dcmtk/branches/experimental/debian/patches/ofstd_markup_6.patch
===================================================================
--- trunk/packages/dcmtk/branches/experimental/debian/patches/ofstd_markup_6.patch 2013-12-10 10:59:56 UTC (rev 15479)
+++ trunk/packages/dcmtk/branches/experimental/debian/patches/ofstd_markup_6.patch 2013-12-10 14:18:53 UTC (rev 15480)
@@ -11,14 +11,14 @@
Index: dcmtk-3.6.1~20131114/ofstd/tests/tmarkup.cc
===================================================================
---- dcmtk-3.6.1~20131114.orig/ofstd/tests/tmarkup.cc 2013-11-14 15:08:01.000000000 +0100
-+++ dcmtk-3.6.1~20131114/ofstd/tests/tmarkup.cc 2013-11-27 15:42:18.000000000 +0100
+--- dcmtk-3.6.1~20131114.orig/ofstd/tests/tmarkup.cc 2013-12-10 14:55:22.278290390 +0100
++++ dcmtk-3.6.1~20131114/ofstd/tests/tmarkup.cc 2013-12-10 14:56:31.698289462 +0100
@@ -114,7 +114,7 @@
OFTEST(ofstd_markup_6)
{
OFString resultStr;
- const size_t sourceLen = 37;
-+ const size_t sourceLen = 36;
++ const size_t sourceLen = 34;
// XML: source string contains a NULL byte!
const OFString sourceStr(("This is a test\0, with a NULL byte."), sourceLen);
const OFString markupStr = "This is a test, with a NULL byte.";
Modified: trunk/packages/dcmtk/branches/experimental/debian/patches/series
===================================================================
--- trunk/packages/dcmtk/branches/experimental/debian/patches/series 2013-12-10 10:59:56 UTC (rev 15479)
+++ trunk/packages/dcmtk/branches/experimental/debian/patches/series 2013-12-10 14:18:53 UTC (rev 15480)
@@ -8,3 +8,4 @@
spelling.patch
ofstd_markup_6.patch
warn_unused_result.patch
+setuid.patch
Added: trunk/packages/dcmtk/branches/experimental/debian/patches/setuid.patch
===================================================================
--- trunk/packages/dcmtk/branches/experimental/debian/patches/setuid.patch (rev 0)
+++ trunk/packages/dcmtk/branches/experimental/debian/patches/setuid.patch 2013-12-10 14:18:53 UTC (rev 15480)
@@ -0,0 +1,109 @@
+Description: fix issue with setuid
+Author: Mathieu Malaterre <malat at debian.org>
+Bug-Debian: http://bugs.debian.org/731434
+Forwarded: no
+
+--- dcmtk-3.6.1~20131114.orig/dcmpstat/apps/dcmprscp.cc
++++ dcmtk-3.6.1~20131114/dcmpstat/apps/dcmprscp.cc
+@@ -469,7 +469,11 @@ int main(int argc, char *argv[])
+ * and run by another user. Running as root user may be
+ * potentially disasterous if this program screws up badly.
+ */
+- setuid(getuid());
++ if( setuid(getuid()) )
++ {
++ OFLOG_FATAL(dcmprscpLogger, "cannot setuid");
++ return 1;
++ }
+ #endif
+
+ #ifdef HAVE_FORK
+--- dcmtk-3.6.1~20131114.orig/dcmpstat/apps/dcmpsrcv.cc
++++ dcmtk-3.6.1~20131114/dcmpstat/apps/dcmpsrcv.cc
+@@ -1275,7 +1275,11 @@ int main(int argc, char *argv[])
+ * and run by another user. Running as root user may be
+ * potentially disasterous if this program screws up badly.
+ */
+- setuid(getuid());
++ if( setuid(getuid()) )
++{
++ OFLOG_FATAL(dcmpsrcvLogger, "cannot setuid");
++ return 1;
++}
+ #endif
+
+ #ifdef HAVE_FORK
+--- dcmtk-3.6.1~20131114.orig/dcmqrdb/apps/dcmqrscp.cc
++++ dcmtk-3.6.1~20131114/dcmqrdb/apps/dcmqrscp.cc
+@@ -685,7 +685,11 @@ main(int argc, char *argv[])
+ * and run by another user. Running as root user may be
+ * potentially disasterous if this program screws up badly.
+ */
+- setuid(getuid());
++ if( setuid(getuid()) )
++ {
++ OFLOG_FATAL(dcmqrscpLogger, "cannot setuid" );
++ return 10;
++ }
+ #endif
+
+ #if defined(HAVE_SETUID) && defined(HAVE_GRP_H) && defined(HAVE_PWD_H)
+--- dcmtk-3.6.1~20131114.orig/dcmnet/apps/storescp.cc
++++ dcmtk-3.6.1~20131114/dcmnet/apps/storescp.cc
+@@ -1071,7 +1071,11 @@ int main(int argc, char *argv[])
+ * root, and run by another user. Running as root user may be
+ * potentially disastrous if this program screws up badly.
+ */
+- setuid(getuid());
++ if( setuid(getuid()) )
++ {
++ OFLOG_ERROR(storescpLogger, "cannot setuid" );
++ return 1;
++ }
+ #endif
+
+ #ifdef WITH_OPENSSL
+--- dcmtk-3.6.1~20131114.orig/dcmnet/apps/movescu.cc
++++ dcmtk-3.6.1~20131114/dcmnet/apps/movescu.cc
+@@ -758,7 +758,11 @@ main(int argc, char *argv[])
+ * root, and run by another user. Running as root user may be
+ * potentially disasterous if this program screws up badly.
+ */
+- setuid(getuid());
++ if( setuid(getuid()) )
++ {
++ OFLOG_FATAL(movescuLogger, "cannot setuid " );
++ return 1;
++ }
+ #endif
+
+ /* set up main association */
+--- dcmtk-3.6.1~20131114.orig/dcmnet/libsrc/scp.cc
++++ dcmtk-3.6.1~20131114/dcmnet/libsrc/scp.cc
+@@ -117,7 +117,11 @@ OFCondition DcmSCP::listen()
+ // things go very wrong. Only works if the program is setuid root,
+ // and run by another user. Running as root user may be
+ // potentially disastrous if this program screws up badly.
+- setuid( getuid() );
++ if( setuid( getuid() ) )
++ {
++ DCMNET_ERROR("No privileges for setuid");
++ return NET_EC_InsufficientPortPrivileges;
++ }
+ #endif
+
+ // If we get to this point, the entire initialization process has been completed
+--- dcmtk-3.6.1~20131114.orig/dcmwlm/libsrc/wlmactmg.cc
++++ dcmtk-3.6.1~20131114/dcmwlm/libsrc/wlmactmg.cc
+@@ -246,7 +246,10 @@ OFCondition WlmActivityManager::StartPro
+ // things go very wrong. Only works if the program is setuid root,
+ // and run by another user. Running as root user may be
+ // potentially disasterous if this program screws up badly.
+- setuid( getuid() );
++ if( setuid( getuid() ) )
++ {
++ return( WLM_EC_InitializationOfNetworkConnectionFailed );
++ }
+ #endif
+
+ // If we get to this point, the entire initialization process has been completed
Modified: trunk/packages/dcmtk/branches/experimental/debian/patches/warn_unused_result.patch
===================================================================
--- trunk/packages/dcmtk/branches/experimental/debian/patches/warn_unused_result.patch 2013-12-10 10:59:56 UTC (rev 15479)
+++ trunk/packages/dcmtk/branches/experimental/debian/patches/warn_unused_result.patch 2013-12-10 14:18:53 UTC (rev 15480)
@@ -3,11 +3,14 @@
dcmqrcnf.cc:294:43: warning: ignoring return value of 'char* fgets(char*, int,
FILE*)', declared with attribute warn_unused_result [-Wunused-result]
Author: Mathieu Malaterre <malat at debian.org>
+Bug-Debian: http://bugs.debian.org/731434
Forwarded: no
---- dcmtk-3.6.1~20131114.orig/dcmimage/libsrc/dicoimg.cc
-+++ dcmtk-3.6.1~20131114/dcmimage/libsrc/dicoimg.cc
-@@ -680,8 +680,9 @@ int DiColorImage::writeRawPPM(FILE *stre
+Index: dcmtk-3.6.1~20131114/dcmimage/libsrc/dicoimg.cc
+===================================================================
+--- dcmtk-3.6.1~20131114.orig/dcmimage/libsrc/dicoimg.cc 2013-12-10 14:55:18.658290442 +0100
++++ dcmtk-3.6.1~20131114/dcmimage/libsrc/dicoimg.cc 2013-12-10 14:56:36.194289404 +0100
+@@ -680,8 +680,9 @@
if ((OutputData != NULL) && (OutputData->getData() != NULL))
{
fprintf(stream, "P6\n%u %u\n%lu\n", Columns, Rows, DicomImageClass::maxval(bits));
@@ -19,9 +22,11 @@
}
}
}
---- dcmtk-3.6.1~20131114.orig/dcmsign/libsrc/simaccon.cc
-+++ dcmtk-3.6.1~20131114/dcmsign/libsrc/simaccon.cc
-@@ -61,8 +61,15 @@ OFCondition SiMACConstructor::flushBuffe
+Index: dcmtk-3.6.1~20131114/dcmsign/libsrc/simaccon.cc
+===================================================================
+--- dcmtk-3.6.1~20131114.orig/dcmsign/libsrc/simaccon.cc 2013-12-10 14:55:18.634290445 +0100
++++ dcmtk-3.6.1~20131114/dcmsign/libsrc/simaccon.cc 2013-12-10 14:56:36.194289404 +0100
+@@ -61,8 +61,15 @@
stream.flushBuffer(bufptr, bufLen);
if (bufLen > 0)
{
@@ -39,9 +44,11 @@
}
return result;
}
---- dcmtk-3.6.1~20131114.orig/dcmdata/libsrc/dcvrobow.cc
-+++ dcmtk-3.6.1~20131114/dcmdata/libsrc/dcvrobow.cc
-@@ -214,13 +214,21 @@ void DcmOtherByteOtherWord::printPixel(S
+Index: dcmtk-3.6.1~20131114/dcmdata/libsrc/dcvrobow.cc
+===================================================================
+--- dcmtk-3.6.1~20131114.orig/dcmdata/libsrc/dcvrobow.cc 2013-12-10 14:55:18.686290438 +0100
++++ dcmtk-3.6.1~20131114/dcmdata/libsrc/dcvrobow.cc 2013-12-10 14:56:36.198289404 +0100
+@@ -214,13 +214,21 @@
{
swapIfNecessary(EBO_LittleEndian, gLocalByteOrder, data, getLengthField(), sizeof(Uint16));
setByteOrder(EBO_LittleEndian);
@@ -65,9 +72,11 @@
}
fclose(file);
} else {
---- dcmtk-3.6.1~20131114.orig/dcmimgle/libsrc/diimage.cc
-+++ dcmtk-3.6.1~20131114/dcmimgle/libsrc/diimage.cc
-@@ -809,31 +809,40 @@ int DiImage::writeBMP(FILE *stream,
+Index: dcmtk-3.6.1~20131114/dcmimgle/libsrc/diimage.cc
+===================================================================
+--- dcmtk-3.6.1~20131114.orig/dcmimgle/libsrc/diimage.cc 2013-12-10 14:55:18.694290443 +0100
++++ dcmtk-3.6.1~20131114/dcmimgle/libsrc/diimage.cc 2013-12-10 14:56:36.198289404 +0100
+@@ -809,31 +809,40 @@
swapBytes(OFreinterpret_cast(Uint8 *, palette), 256 * 4 /*byteLength*/, 4 /*valWidth*/);
}
/* write bitmap file header: do not write the struct because of 32-bit alignment */
@@ -128,9 +137,11 @@
}
/* delete pixel data */
delete OFstatic_cast(char *, data); // type cast necessary to avoid compiler warnings using gcc >2.95
---- dcmtk-3.6.1~20131114.orig/dcmimgle/libsrc/dimoimg.cc
-+++ dcmtk-3.6.1~20131114/dcmimgle/libsrc/dimoimg.cc
-@@ -2143,9 +2143,10 @@ int DiMonoImage::writeRawPPM(FILE *strea
+Index: dcmtk-3.6.1~20131114/dcmimgle/libsrc/dimoimg.cc
+===================================================================
+--- dcmtk-3.6.1~20131114.orig/dcmimgle/libsrc/dimoimg.cc 2013-12-10 14:55:18.706290444 +0100
++++ dcmtk-3.6.1~20131114/dcmimgle/libsrc/dimoimg.cc 2013-12-10 14:56:36.198289404 +0100
+@@ -2143,9 +2143,10 @@
fprintf(stream, "P6\n%u %u\n255\n", Columns, Rows);
else
fprintf(stream, "P5\n%u %u\n%lu\n", Columns, Rows, DicomImageClass::maxval(bits));
@@ -143,9 +154,11 @@
}
}
return 0;
---- dcmtk-3.6.1~20131114.orig/dcmqrdb/libsrc/dcmqrcnf.cc
-+++ dcmtk-3.6.1~20131114/dcmqrdb/libsrc/dcmqrcnf.cc
-@@ -291,7 +291,12 @@ int DcmQueryRetrieveConfig::readConfigLi
+Index: dcmtk-3.6.1~20131114/dcmqrdb/libsrc/dcmqrcnf.cc
+===================================================================
+--- dcmtk-3.6.1~20131114.orig/dcmqrdb/libsrc/dcmqrcnf.cc 2013-12-10 14:55:18.674290443 +0100
++++ dcmtk-3.6.1~20131114/dcmqrdb/libsrc/dcmqrcnf.cc 2013-12-10 14:56:36.198289404 +0100
+@@ -291,7 +291,12 @@
char *c;
while (!feof(cnffp)) {
@@ -159,7 +172,7 @@
lineno++;
if (feof(cnffp)) continue;
if (rcline[0] == '#' || rcline[0] == 10 || rcline[0] == 13)
-@@ -413,7 +418,12 @@ int DcmQueryRetrieveConfig::readHostTabl
+@@ -413,7 +418,12 @@
DcmQueryRetrieveConfigHostEntry *helpentry;
while (!feof(cnffp)) {
@@ -173,7 +186,7 @@
(*lineno)++;
if (feof(cnffp)) continue;
if (rcline[0] == '#' || rcline[0] == 10 || rcline[0] == 13)
-@@ -469,7 +479,12 @@ int DcmQueryRetrieveConfig::readVendorTa
+@@ -469,7 +479,12 @@
DcmQueryRetrieveConfigHostEntry *helpentry;
while (!feof(cnffp)) {
@@ -187,7 +200,7 @@
(*lineno)++;
if (feof(cnffp)) continue;
if (rcline[0] == '#' || rcline[0] == 10 || rcline[0] == 13)
-@@ -525,7 +540,12 @@ int DcmQueryRetrieveConfig::readAETable(
+@@ -525,7 +540,12 @@
DcmQueryRetrieveConfigAEEntry *helpentry;
while (!feof(cnffp)) {
@@ -201,9 +214,11 @@
(*lineno)++;
if (feof(cnffp)) continue;
if (rcline[0] == '#' || rcline[0] == 10 || rcline[0] == 13)
---- dcmtk-3.6.1~20131114.orig/dcmqrdb/libsrc/dcmqrdbi.cc
-+++ dcmtk-3.6.1~20131114/dcmqrdb/libsrc/dcmqrdbi.cc
-@@ -3416,7 +3416,8 @@ OFCondition DcmQueryRetrieveIndexDatabas
+Index: dcmtk-3.6.1~20131114/dcmqrdb/libsrc/dcmqrdbi.cc
+===================================================================
+--- dcmtk-3.6.1~20131114.orig/dcmqrdb/libsrc/dcmqrdbi.cc 2013-12-10 14:55:18.666290445 +0100
++++ dcmtk-3.6.1~20131114/dcmqrdb/libsrc/dcmqrdbi.cc 2013-12-10 14:56:36.198289404 +0100
+@@ -3416,7 +3416,8 @@
record.hstat = DVIF_objectIsNotNew;
DB_lseek(handle_->pidx, OFstatic_cast(long, SIZEOF_STUDYDESC + idx * SIZEOF_IDXRECORD), SEEK_SET);
@@ -213,9 +228,11 @@
DB_lseek(handle_->pidx, 0L, SEEK_SET);
DB_unlock();
}
---- dcmtk-3.6.1~20131114.orig/dcmpstat/apps/dcmp2pgm.cc
-+++ dcmtk-3.6.1~20131114/dcmpstat/apps/dcmp2pgm.cc
-@@ -363,9 +363,12 @@ static void dumpPresentationState(DVPres
+Index: dcmtk-3.6.1~20131114/dcmpstat/apps/dcmp2pgm.cc
+===================================================================
+--- dcmtk-3.6.1~20131114.orig/dcmpstat/apps/dcmp2pgm.cc 2013-12-10 14:55:18.646290441 +0100
++++ dcmtk-3.6.1~20131114/dcmpstat/apps/dcmp2pgm.cc 2013-12-10 14:56:36.198289404 +0100
+@@ -363,9 +363,12 @@
if (ofile)
{
fprintf(ofile, "P5\n%d %d 255\n", overlayWidth, overlayHeight);
@@ -230,7 +247,7 @@
} else oss << " -write error-" << OFendl;
} else {
oss << " unable to access overlay data!" << OFendl;
-@@ -546,8 +549,12 @@ int main(int argc, char *argv[])
+@@ -546,8 +549,12 @@
{
OFLOG_DEBUG(dcmp2pgmLogger, "writing PGM file: " << opt_pgmName);
fprintf(outfile, "P5\n%ld %ld 255\n", width, height);
Modified: trunk/packages/dcmtk/branches/experimental/debian/rules
===================================================================
--- trunk/packages/dcmtk/branches/experimental/debian/rules 2013-12-10 10:59:56 UTC (rev 15479)
+++ trunk/packages/dcmtk/branches/experimental/debian/rules 2013-12-10 14:18:53 UTC (rev 15480)
@@ -77,6 +77,12 @@
# wotsit ?
rm ./debian/dcmtk/usr/bin/*_tests
rm ./debian/dcmtk/usr/bin/drttest
+ rm ./debian/dcmtk/usr/bin/mkreport
+ # fixup
+ mv ./debian/dcmtk/usr/bin/preplock debian/dcmtk-www/usr/lib/dcmtk/cgi-bin/
+ mv ./debian/dcmtk/usr/bin/readoviw debian/dcmtk-www/usr/lib/dcmtk/cgi-bin/
+ mv ./debian/dcmtk/usr/bin/readwlst debian/dcmtk-www/usr/lib/dcmtk/cgi-bin/
+ mv ./debian/dcmtk/usr/bin/writwlst debian/dcmtk-www/usr/lib/dcmtk/cgi-bin/
override_dh_strip:
dh_strip --dbg-package=libdcmtk3-dbg
More information about the debian-med-commit
mailing list