--- mediatomb-0.10.0.dfsg1.orig/debian/extras/manpage.xml
+++ mediatomb-0.10.0.dfsg1/debian/extras/manpage.xml
@@ -0,0 +1,283 @@
+
+
+
+
+ User commands
+ MediaTomb
+ 0.10.0
+ 2007-05-27
+ contact@mediatomb.cc
+
+ Sergey Bostandzhyan
+ Leonhard Wimmer
+
+
+ 2005
+ Gena Batsyan
+ Sergey Bostandzhyan
+
+
+ 2006-2007
+ Gena Batsyan
+ Sergey Bostandzhyan
+ Leonhard Wimmer
+
+
+ This manual page is part of MediaTomb.
+ Permission is granted to copy, distribute and/or modify this document under
+ the terms of the GNU General Public License version 2 as published by the Free Software Foundation.
+
+
+
+ MEDIATOMB
+ 1
+
+
+ mediatomb
+ UPnP MediaServer
+
+
+
+ mediatomb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DESCRIPTION
+
+ This manual page describes the command line parameters for
+ MediaTomb. For a detailed documentation please see the README file which
+ is distributed with MediaTomb or visit http://mediatomb.cc/.
+
+
+ OPTIONS
+
+
+
+
+
+ ,
+
+
+
+ The server will bind to the given IP address, currently we can not bind to
+ multiple interfaces so binding to 0.0.0.0 will not be possible.
+
+
+
+
+
+ ,
+
+
+
+ The server will bind to the given network interface, currently we can only bind
+ to one interface at a time.
+
+
+
+
+
+ ,
+
+
+
+ Specify the server port that will be used for the web user interface, for
+ serving media and for UPnP requests, minimum allowed value is 49152. If this
+ option is omitted a default port will be chosen, however, in this case it is
+ possible that the port will change upon server restart.
+
+
+
+
+
+ ,
+
+
+
+ By default MediaTomb will search for a file named "config.xml" in the ~/.mediatomb directory. This option allows you to specify a config file by the
+ name and location of your choice. The file name must be absolute.
+
+
+
+
+
+ ,
+
+
+
+ Run the server in background, MediaTomb will shutdown on SIGTERM, SIGINT and
+ restart on SIGHUP.
+
+
+
+
+
+ ,
+
+
+
+ Specify an alternative home directory. By default MediaTomb will try to
+ retrieve the users home directory from the environment, then it will look for a
+ .mediatomb directory in users home. If .mediatomb was found we will try to find
+ the default configuration file (config.xml), if not found we will create both,
+ the .mediatomb directory and the default config file.
+
+ This option is useful in two cases: when the home directory can not be
+ retrieved from the environment (in this case you could also use -c to point
+ MediaTomb to your configuration file or when you want to create a new
+ configuration in a non standard location (for example, when setting up daemon
+ mode). In the latter case you can combine this parameter with the parameter
+ described in Section 5.6, "Config Directory"
+
+
+
+
+
+ ,
+
+
+
+ The default configuration directory is combined out of the users home and the
+ default that equals to .mediatomb, this option allows you to override the
+ default directory naming. This is useful when you want to setup the server in a
+ nonstandard location, but want that the default configuration to be written by
+ the server.
+
+
+
+
+
+
+ ,
+
+
+
+ Specify a file that will hold the server process ID, the filename must be
+ absolute.
+
+
+
+
+
+ ,
+
+
+
+ Run MediaTomb under the specified user name, this is especially useful in
+ combination with the daemon mode.
+
+
+
+
+
+ ,
+
+
+
+ Run MediaTomb under the specified group, this is especially useful in
+ combination with the daemon mode.
+
+
+
+
+
+ ,
+
+
+
+ Add the specified directory or file name to the database without UI
+ interaction. The path must be absolute, if path is a directory then it will be
+ added recursively. If path is a file, then only the given file will be
+ imported.
+
+
+
+
+
+ ,
+
+
+
+ Do not output log messages to stdout, but redirect everything to a specified
+ file.
+
+
+
+
+
+ ,
+
+
+
+ Print a summary about the available command line options.
+
+
+
+
+
+
--- mediatomb-0.10.0.dfsg1.orig/debian/patches/series
+++ mediatomb-0.10.0.dfsg1/debian/patches/series
@@ -0,0 +1,2 @@
+rsa_md5_replacement.patch
+inotify_fix.patch
--- mediatomb-0.10.0.dfsg1.orig/debian/patches/rsa_md5_replacement.patch
+++ mediatomb-0.10.0.dfsg1/debian/patches/rsa_md5_replacement.patch
@@ -0,0 +1,333 @@
+Patch to replace RSA MD5 code with MD5 code found in dpkg.
+The RSA MD5 code is removed from the upstream source and patched in
+during build.
+===================================================================
+diff -urN upstream/mediatomb-0.10.0/tombupnp/upnp/src/inc/upnp_md5.h mediatomb-0.10.0/tombupnp/upnp/src/inc/upnp_md5.h
+--- upstream/mediatomb-0.10.0/tombupnp/upnp/src/inc/upnp_md5.h 1969-12-31 19:00:00.000000000 -0500
++++ mediatomb-0.10.0/tombupnp/upnp/src/inc/upnp_md5.h 2007-12-28 13:49:59.000000000 -0500
+@@ -0,0 +1,47 @@
++/*
++ * This is the header file for the MD5 message-digest algorithm.
++ * The algorithm is due to Ron Rivest. This code was
++ * written by Colin Plumb in 1993, no copyright is claimed.
++ * This code is in the public domain; do with it what you wish.
++ *
++ * Equivalent code is available from RSA Data Security, Inc.
++ * This code has been tested against that, and is equivalent,
++ * except that you don't need to include two pages of legalese
++ * with every copy.
++ *
++ * To compute the message digest of a chunk of bytes, declare an
++ * MD5Context structure, pass it to MD5Init, call MD5Update as
++ * needed on buffers full of bytes, and then call MD5Final, which
++ * will fill a supplied 16-byte array with the digest.
++ *
++ * Changed so as no longer to depend on Colin Plumb's `usual.h'
++ * header definitions; now uses stuff from dpkg's config.h
++ * - Ian Jackson .
++ * Still in the public domain.
++ */
++
++#ifndef MD5_H
++#define MD5_H
++
++#define md5byte unsigned char
++
++#if SIZEOF_UNSIGNED_LONG==4
++# define UWORD32 unsigned long
++#elif SIZEOF_UNSIGNED_INT==4
++# define UWORD32 unsigned int
++#else
++# error I do not know what to use for a UWORD32.
++#endif
++
++struct MD5Context {
++ UWORD32 buf[4];
++ UWORD32 bytes[2];
++ UWORD32 in[16];
++};
++
++void MD5Init(struct MD5Context *context);
++void MD5Update(struct MD5Context *context, md5byte const *buf, unsigned len);
++void MD5Final(unsigned char digest[16], struct MD5Context *context);
++void MD5Transform(UWORD32 buf[4], UWORD32 const in[16]);
++
++#endif /* !MD5_H */
+diff -urN upstream/mediatomb-0.10.0/tombupnp/upnp/src/uuid/sysdep.c mediatomb-0.10.0/tombupnp/upnp/src/uuid/sysdep.c
+--- upstream/mediatomb-0.10.0/tombupnp/upnp/src/uuid/sysdep.c 2007-07-12 15:13:36.000000000 -0400
++++ mediatomb-0.10.0/tombupnp/upnp/src/uuid/sysdep.c 2007-12-28 13:49:10.000000000 -0500
+@@ -85,7 +85,7 @@
+ void
+ get_random_info( char seed[16] )
+ {
+- MD5_CTX c;
++ struct MD5Context c;
+ typedef struct {
+ MEMORYSTATUS m;
+ SYSTEM_INFO s;
+@@ -147,7 +147,7 @@
+ void
+ get_random_info( char seed[16] )
+ {
+- MD5_CTX c;
++ struct MD5Context c;
+ typedef struct {
+ // struct sysinfo s;
+ struct timeval t;
+diff -urN upstream/mediatomb-0.10.0/tombupnp/upnp/src/uuid/upnp_md5.c mediatomb-0.10.0/tombupnp/upnp/src/uuid/upnp_md5.c
+--- upstream/mediatomb-0.10.0/tombupnp/upnp/src/uuid/upnp_md5.c 1969-12-31 19:00:00.000000000 -0500
++++ mediatomb-0.10.0/tombupnp/upnp/src/uuid/upnp_md5.c 2007-12-28 13:52:16.000000000 -0500
+@@ -0,0 +1,241 @@
++/*
++ * This code implements the MD5 message-digest algorithm.
++ * The algorithm is due to Ron Rivest. This code was
++ * written by Colin Plumb in 1993, no copyright is claimed.
++ * This code is in the public domain; do with it what you wish.
++ *
++ * Equivalent code is available from RSA Data Security, Inc.
++ * This code has been tested against that, and is equivalent,
++ * except that you don't need to include two pages of legalese
++ * with every copy.
++ *
++ * To compute the message digest of a chunk of bytes, declare an
++ * MD5Context structure, pass it to MD5Init, call MD5Update as
++ * needed on buffers full of bytes, and then call MD5Final, which
++ * will fill a supplied 16-byte array with the digest.
++ *
++ * Changed so as no longer to depend on Colin Plumb's `usual.h' header
++ * definitions; now uses stuff from dpkg's config.h.
++ * - Ian Jackson .
++ * Still in the public domain.
++ */
++#include "config.h"
++
++#include /* for memcpy() */
++#include /* for stupid systems */
++#include /* for ntohl() */
++
++#include "upnp_md5.h"
++
++#ifdef WORDS_BIGENDIAN
++void
++byteSwap(UWORD32 *buf, unsigned words)
++{
++ md5byte *p = (md5byte *)buf;
++
++ do {
++ *buf++ = (UWORD32)((unsigned)p[3] << 8 | p[2]) << 16 |
++ ((unsigned)p[1] << 8 | p[0]);
++ p += 4;
++ } while (--words);
++}
++#else
++#define byteSwap(buf,words)
++#endif
++
++/*
++ * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious
++ * initialization constants.
++ */
++void
++MD5Init(struct MD5Context *ctx)
++{
++ ctx->buf[0] = 0x67452301;
++ ctx->buf[1] = 0xefcdab89;
++ ctx->buf[2] = 0x98badcfe;
++ ctx->buf[3] = 0x10325476;
++
++ ctx->bytes[0] = 0;
++ ctx->bytes[1] = 0;
++}
++
++/*
++ * Update context to reflect the concatenation of another buffer full
++ * of bytes.
++ */
++void
++MD5Update(struct MD5Context *ctx, md5byte const *buf, unsigned len)
++{
++ UWORD32 t;
++
++ /* Update byte count */
++
++ t = ctx->bytes[0];
++ if ((ctx->bytes[0] = t + len) < t)
++ ctx->bytes[1]++; /* Carry from low to high */
++
++ t = 64 - (t & 0x3f); /* Space available in ctx->in (at least 1) */
++ if (t > len) {
++ memcpy((md5byte *)ctx->in + 64 - t, buf, len);
++ return;
++ }
++ /* First chunk is an odd size */
++ memcpy((md5byte *)ctx->in + 64 - t, buf, t);
++ byteSwap(ctx->in, 16);
++ MD5Transform(ctx->buf, ctx->in);
++ buf += t;
++ len -= t;
++
++ /* Process data in 64-byte chunks */
++ while (len >= 64) {
++ memcpy(ctx->in, buf, 64);
++ byteSwap(ctx->in, 16);
++ MD5Transform(ctx->buf, ctx->in);
++ buf += 64;
++ len -= 64;
++ }
++
++ /* Handle any remaining bytes of data. */
++ memcpy(ctx->in, buf, len);
++}
++
++/*
++ * Final wrapup - pad to 64-byte boundary with the bit pattern
++ * 1 0* (64-bit count of bits processed, MSB-first)
++ */
++void
++MD5Final(md5byte digest[16], struct MD5Context *ctx)
++{
++ int count = ctx->bytes[0] & 0x3f; /* Number of bytes in ctx->in */
++ md5byte *p = (md5byte *)ctx->in + count;
++
++ /* Set the first char of padding to 0x80. There is always room. */
++ *p++ = 0x80;
++
++ /* Bytes of padding needed to make 56 bytes (-8..55) */
++ count = 56 - 1 - count;
++
++ if (count < 0) { /* Padding forces an extra block */
++ memset(p, 0, count + 8);
++ byteSwap(ctx->in, 16);
++ MD5Transform(ctx->buf, ctx->in);
++ p = (md5byte *)ctx->in;
++ count = 56;
++ }
++ memset(p, 0, count);
++ byteSwap(ctx->in, 14);
++
++ /* Append length in bits and transform */
++ ctx->in[14] = ctx->bytes[0] << 3;
++ ctx->in[15] = ctx->bytes[1] << 3 | ctx->bytes[0] >> 29;
++ MD5Transform(ctx->buf, ctx->in);
++
++ byteSwap(ctx->buf, 4);
++ memcpy(digest, ctx->buf, 16);
++ memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
++}
++
++#ifndef ASM_MD5
++
++/* The four core functions - F1 is optimized somewhat */
++
++/* #define F1(x, y, z) (x & y | ~x & z) */
++#define F1(x, y, z) (z ^ (x & (y ^ z)))
++#define F2(x, y, z) F1(z, x, y)
++#define F3(x, y, z) (x ^ y ^ z)
++#define F4(x, y, z) (y ^ (x | ~z))
++
++/* This is the central step in the MD5 algorithm. */
++#define MD5STEP(f,w,x,y,z,in,s) \
++ (w += f(x,y,z) + in, w = (w<>(32-s)) + x)
++
++/*
++ * The core of the MD5 algorithm, this alters an existing MD5 hash to
++ * reflect the addition of 16 longwords of new data. MD5Update blocks
++ * the data and converts bytes into longwords for this routine.
++ */
++void
++MD5Transform(UWORD32 buf[4], UWORD32 const in[16])
++{
++ register UWORD32 a, b, c, d;
++
++ a = buf[0];
++ b = buf[1];
++ c = buf[2];
++ d = buf[3];
++
++ MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7);
++ MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12);
++ MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17);
++ MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22);
++ MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7);
++ MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12);
++ MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17);
++ MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22);
++ MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8, 7);
++ MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7af, 12);
++ MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17);
++ MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22);
++ MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7);
++ MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12);
++ MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17);
++ MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22);
++
++ MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5);
++ MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9);
++ MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14);
++ MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20);
++ MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105d, 5);
++ MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9);
++ MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14);
++ MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20);
++ MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6, 5);
++ MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9);
++ MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87, 14);
++ MD5STEP(F2, b, c, d, a, in[8] + 0x455a14ed, 20);
++ MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5);
++ MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9);
++ MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14);
++ MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20);
++
++ MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942, 4);
++ MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681, 11);
++ MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16);
++ MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23);
++ MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44, 4);
++ MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9, 11);
++ MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60, 16);
++ MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23);
++ MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4);
++ MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127fa, 11);
++ MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085, 16);
++ MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05, 23);
++ MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039, 4);
++ MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11);
++ MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16);
++ MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665, 23);
++
++ MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244, 6);
++ MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97, 10);
++ MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15);
++ MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039, 21);
++ MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6);
++ MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92, 10);
++ MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15);
++ MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1, 21);
++ MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4f, 6);
++ MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10);
++ MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314, 15);
++ MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21);
++ MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82, 6);
++ MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10);
++ MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15);
++ MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21);
++
++ buf[0] += a;
++ buf[1] += b;
++ buf[2] += c;
++ buf[3] += d;
++}
++
++#endif
+diff -urN upstream/mediatomb-0.10.0/tombupnp/upnp/src/uuid/upnp_uuid.c mediatomb-0.10.0/tombupnp/upnp/src/uuid/upnp_uuid.c
+--- upstream/mediatomb-0.10.0/tombupnp/upnp/src/uuid/upnp_uuid.c 2007-07-12 15:13:36.000000000 -0400
++++ mediatomb-0.10.0/tombupnp/upnp/src/uuid/upnp_uuid.c 2007-12-28 13:49:12.000000000 -0500
+@@ -296,7 +296,7 @@
+ int namelen /* the length of the name */
+ )
+ {
+- MD5_CTX c;
++ struct MD5Context c;
+ unsigned char hash[16];
+ uuid_upnp net_nsid; /* context UUID in network byte order */
+
--- mediatomb-0.10.0.dfsg1.orig/debian/patches/inotify_fix.patch
+++ mediatomb-0.10.0.dfsg1/debian/patches/inotify_fix.patch
@@ -0,0 +1,583 @@
+Patch that allows for inotify support to be checked at runtime.
+===================================================================
+--- mediatomb-0.10.0/src/config_manager.cc.bak 2008-02-19 13:44:03.000000000 -0500
++++ mediatomb-0.10.0/src/config_manager.cc 2008-02-19 13:53:04.000000000 -0500
+@@ -44,6 +44,10 @@
+ #include "string_converter.h"
+ #include "metadata_handler.h"
+
++#ifdef HAVE_INOTIFY
++ #include "mt_inotify.h"
++#endif
++
+ #if defined(HAVE_LANGINFO_H) && defined(HAVE_LOCALE_H)
+ #include
+ #include
+@@ -839,19 +843,61 @@
+ _("from"), _("to")));
+ SET_DICT_OPTION(CFG_IMPORT_MAPPINGS_MIMETYPE_TO_UPNP_CLASS_LIST);
+
++ temp = getOption(_("/import/autoscan/attribute::use-inotify"), _("auto"));
++ if ((temp != "auto") && !validateYesNo(temp))
++ throw _Exception(_("Error in config file: incorrect parameter for "
++ "\"
+ #include
+ #include
++#include
+
+ #include "mt_inotify.h"
+
+@@ -73,10 +74,29 @@
+ close(inotify_fd);
+ }
+
++bool Inotify::supported()
++{
++ int test_fd = inotify_init();
++ if (test_fd < 0)
++ return false;
++ else
++ {
++ close(test_fd);
++ return true;
++ }
++}
+
+ int Inotify::addWatch(String path, int events)
+ {
+- return inotify_add_watch(inotify_fd, path.c_str(), events);
++ int wd = inotify_add_watch(inotify_fd, path.c_str(), events);
++ if (wd < 0 && errno != ENOENT)
++ {
++ if (errno == ENOSPC)
++ throw _Exception(_("The user limit on the total number of inotify watches was reached or the kernel failed to allocate a needed resource."));
++ else
++ throw _Exception(mt_strerror(errno));
++ }
++ return wd;
+ }
+
+ void Inotify::removeWatch(int wd)
+--- mediatomb-0.10.0/src/content_manager.cc.bak 2008-02-19 13:56:13.000000000 -0500
++++ mediatomb-0.10.0/src/content_manager.cc 2008-02-19 14:15:55.000000000 -0500
+@@ -87,6 +87,7 @@
+
+ ContentManager::ContentManager() : TimerSubscriberSingleton()
+ {
++ int i;
+ cond = Ref(new Cond(mutex));
+ ignore_unknown_extensions = 0;
+
+@@ -143,24 +144,31 @@
+ autoscan_timed = storage->getAutoscanList(TimedScanMode);
+
+ #ifdef HAVE_INOTIFY
+- Ref config_inotify_list =
+- cm->getAutoscanListOption(CFG_IMPORT_AUTOSCAN_INOTIFY_LIST);
+-
+- for (int i = 0; i < config_inotify_list->size(); i++)
++ if (cm->getBoolOption(CFG_IMPORT_AUTOSCAN_USE_INOTIFY))
+ {
+- Ref dir = config_inotify_list->get(i);
+- if (dir != nil)
++ Ref config_inotify_list =
++ cm->getAutoscanListOption(CFG_IMPORT_AUTOSCAN_INOTIFY_LIST);
++
++ for (i = 0; i < config_inotify_list->size(); i++)
+ {
+- String path = dir->getLocation();
+- if (check_path(path, true))
++ Ref dir = config_inotify_list->get(i);
++ if (dir != nil)
+ {
+- dir->setObjectID(ensurePathExistence(path));
++ String path = dir->getLocation();
++ if (check_path(path, true))
++ {
++ dir->setObjectID(ensurePathExistence(path));
++ }
+ }
+ }
+- }
+
+- storage->updateAutoscanPersistentList(InotifyScanMode, config_inotify_list);
+- autoscan_inotify = storage->getAutoscanList(InotifyScanMode);
++ storage->updateAutoscanPersistentList(InotifyScanMode,
++ config_inotify_list);
++ autoscan_inotify = storage->getAutoscanList(InotifyScanMode);
++ }
++ else
++ // make an empty list so we do not have to do extra checks on shutdown
++ autoscan_inotify = Ref(new AutoscanList());
+ #endif
+ /* init filemagic */
+ #ifdef HAVE_MAGIC
+@@ -233,15 +241,17 @@
+ autoscan_timed->notifyAll(AS_TIMER_SUBSCRIBER_SINGLETON(this));
+
+ #ifdef HAVE_INOTIFY
+- inotify = Ref(new AutoscanInotify());
+- /// \todo change this for 0.9.1 (we need a new autoscan architecture)
+- for (int i = 0; i < autoscan_inotify->size(); i++)
++ if (ConfigManager::getInstance()->getBoolOption(CFG_IMPORT_AUTOSCAN_USE_INOTIFY))
+ {
+- Ref dir = autoscan_inotify->get(i);
+- if (dir != nil)
+- inotify->monitor(dir);
++ inotify = Ref(new AutoscanInotify());
++ /// \todo change this (we need a new autoscan architecture)
++ for (int i = 0; i < autoscan_inotify->size(); i++)
++ {
++ Ref dir = autoscan_inotify->get(i);
++ if (dir != nil)
++ inotify->monitor(dir);
++ }
+ }
+-
+ #endif
+ }
+
+@@ -1442,11 +1452,14 @@
+ Timer::getInstance()->removeTimerSubscriber(AS_TIMER_SUBSCRIBER_SINGLETON(this), rm_list->get(i)->getScanID(), true);
+ }
+ #ifdef HAVE_INOTIFY
+- rm_list = autoscan_inotify->removeIfSubdir(path);
+- for (i = 0; i < rm_list->size(); i++)
++ if (ConfigManager::getInstance()->getBoolOption(CFG_IMPORT_AUTOSCAN_USE_INOTIFY))
+ {
+- Ref dir = rm_list->get(i);
+- inotify->unmonitor(dir);
++ rm_list = autoscan_inotify->removeIfSubdir(path);
++ for (i = 0; i < rm_list->size(); i++)
++ {
++ Ref dir = rm_list->get(i);
++ inotify->unmonitor(dir);
++ }
+ }
+ #endif
+
+@@ -1580,16 +1593,19 @@
+
+ }
+ #ifdef HAVE_INOTIFY
+- else if (scanMode == InotifyScanMode)
++ if (ConfigManager::getInstance()->getBoolOption(CFG_IMPORT_AUTOSCAN_USE_INOTIFY))
+ {
+- Ref storage = Storage::getInstance();
+- Ref adir = autoscan_inotify->get(scanID);
+- if (adir == nil)
+- throw _Exception(_("can not remove autoscan directory - was not an autoscan"));
+- autoscan_inotify->remove(scanID);
+- storage->removeAutoscanDirectory(adir->getStorageID());
+- SessionManager::getInstance()->containerChangedUI(adir->getObjectID());
+- inotify->unmonitor(adir);
++ if (scanMode == InotifyScanMode)
++ {
++ Ref storage = Storage::getInstance();
++ Ref adir = autoscan_inotify->get(scanID);
++ if (adir == nil)
++ throw _Exception(_("can not remove autoscan directory - was not an autoscan"));
++ autoscan_inotify->remove(scanID);
++ storage->removeAutoscanDirectory(adir->getStorageID());
++ SessionManager::getInstance()->containerChangedUI(adir->getObjectID());
++ inotify->unmonitor(adir);
++ }
+ }
+ #endif
+
+@@ -1610,12 +1626,15 @@
+ Timer::getInstance()->removeTimerSubscriber(AS_TIMER_SUBSCRIBER_SINGLETON(this), scanID, true);
+ }
+ #ifdef HAVE_INOTIFY
+- else if (adir->getScanMode() == InotifyScanMode)
++ if (ConfigManager::getInstance()->getBoolOption(CFG_IMPORT_AUTOSCAN_USE_INOTIFY))
+ {
+- autoscan_inotify->remove(adir->getLocation());
+- storage->removeAutoscanDirectoryByObjectID(objectID);
+- SessionManager::getInstance()->containerChangedUI(objectID);
+- inotify->unmonitor(adir);
++ if (adir->getScanMode() == InotifyScanMode)
++ {
++ autoscan_inotify->remove(adir->getLocation());
++ storage->removeAutoscanDirectoryByObjectID(objectID);
++ SessionManager::getInstance()->containerChangedUI(objectID);
++ inotify->unmonitor(adir);
++ }
+ }
+ #endif
+ }
+@@ -1625,8 +1644,11 @@
+ /// \todo change this when more scanmodes become avaiable
+ Ref adir = autoscan_timed->get(location);
+ #ifdef HAVE_INOTIFY
+- if (adir == nil)
+- adir = autoscan_inotify->get(location);
++ if (ConfigManager::getInstance()->getBoolOption(CFG_IMPORT_AUTOSCAN_USE_INOTIFY))
++ {
++ if (adir == nil)
++ adir = autoscan_inotify->get(location);
++ }
+ #endif
+ if (adir == nil)
+ throw _Exception(_("can not remove autoscan directory - was not an autoscan"));
+@@ -1667,8 +1689,11 @@
+ // We will have to change this for other scan modes
+ original = autoscan_timed->getByObjectID(dir->getObjectID());
+ #ifdef HAVE_INOTIFY
+- if (original == nil)
+- original = autoscan_inotify->getByObjectID(dir->getObjectID());
++ if (ConfigManager::getInstance()->getBoolOption(CFG_IMPORT_AUTOSCAN_USE_INOTIFY))
++ {
++ if (original == nil)
++ original = autoscan_inotify->getByObjectID(dir->getObjectID());
++ }
+ #endif
+
+ if (original != nil)
+@@ -1698,10 +1723,13 @@
+ timerNotify(scanID);
+ }
+ #ifdef HAVE_INOTIFY
+- else if (dir->getScanMode() == InotifyScanMode)
++ if (ConfigManager::getInstance()->getBoolOption(CFG_IMPORT_AUTOSCAN_USE_INOTIFY))
+ {
+- autoscan_inotify->add(dir);
+- inotify->monitor(dir);
++ if (dir->getScanMode() == InotifyScanMode)
++ {
++ autoscan_inotify->add(dir);
++ inotify->monitor(dir);
++ }
+ }
+ #endif
+ SessionManager::getInstance()->containerChangedUI(dir->getObjectID());
+@@ -1711,9 +1739,12 @@
+ if (original->getScanMode() == TimedScanMode)
+ Timer::getInstance()->removeTimerSubscriber(AS_TIMER_SUBSCRIBER_SINGLETON(this), original->getScanID(), true);
+ #ifdef HAVE_INOTIFY
+- else if (original->getScanMode() == InotifyScanMode)
++ if (ConfigManager::getInstance()->getBoolOption(CFG_IMPORT_AUTOSCAN_USE_INOTIFY))
+ {
+- inotify->unmonitor(original);
++ if (original->getScanMode() == InotifyScanMode)
++ {
++ inotify->unmonitor(original);
++ }
+ }
+ #endif
+
+@@ -1743,9 +1774,12 @@
+ autoscan_timed->remove(copy->getScanID());
+ }
+ #ifdef HAVE_INOTIFY
+- else if (copy->getScanMode() == InotifyScanMode)
++ if (ConfigManager::getInstance()->getBoolOption(CFG_IMPORT_AUTOSCAN_USE_INOTIFY))
+ {
+- autoscan_inotify->remove(copy->getScanID());
++ if (copy->getScanMode() == InotifyScanMode)
++ {
++ autoscan_inotify->remove(copy->getScanID());
++ }
+ }
+ #endif
+
+@@ -1757,10 +1791,13 @@
+ timerNotify(scanID);
+ }
+ #ifdef HAVE_INOTIFY
+- else if (dir->getScanMode() == InotifyScanMode)
++ if (ConfigManager::getInstance()->getBoolOption(CFG_IMPORT_AUTOSCAN_USE_INOTIFY))
+ {
+- autoscan_inotify->add(copy);
+- inotify->monitor(copy);
++ if (dir->getScanMode() == InotifyScanMode)
++ {
++ autoscan_inotify->add(copy);
++ inotify->monitor(copy);
++ }
+ }
+ #endif
+
+--- mediatomb-0.10.0/src/mt_inotify.h.bak 2008-02-19 14:19:26.000000000 -0500
++++ mediatomb-0.10.0/src/mt_inotify.h 2008-02-19 14:20:14.000000000 -0500
+@@ -67,6 +67,9 @@
+ /// \brief Unblock the next_event function.
+ void stop();
+
++ /// \brief Checks if inotify is supported on the system.
++ static bool supported();
++
+ private:
+ int inotify_fd;
+ int stop_fds_pipe[2];
+--- mediatomb-0.10.0/src/config_manager.h.bak 2008-02-19 14:20:52.000000000 -0500
++++ mediatomb-0.10.0/src/config_manager.h 2008-02-19 14:21:35.000000000 -0500
+@@ -103,6 +103,7 @@
+ #endif
+ CFG_IMPORT_AUTOSCAN_TIMED_LIST,
+ #ifdef HAVE_INOTIFY
++ CFG_IMPORT_AUTOSCAN_USE_INOTIFY,
+ CFG_IMPORT_AUTOSCAN_INOTIFY_LIST,
+ #endif
+ CFG_IMPORT_MAPPINGS_IGNORE_UNKNOWN_EXTENSIONS,
+--- mediatomb-0.10.0/src/tools.cc.bak 2008-02-19 19:03:59.000000000 -0500
++++ mediatomb-0.10.0/src/tools.cc 2008-02-19 19:04:53.000000000 -0500
+@@ -380,6 +380,29 @@
+ return buf->toString();
+ }
+
++String mt_strerror(int mt_errno)
++{
++#ifdef DONT_USE_YET_HAVE_STRERROR_R
++ char *buffer = (char *)MALLOC(512);
++ char *err_str;
++ #ifdef STRERROR_R_CHAR_P
++ err_str = strerror_r(errno, buffer, 512);
++ if (err_str == NULL)
++ err_str = buffer;
++ #else
++ int ret = strerror_r(errno, buffer, 512);
++ if (ret < 0)
++ return _("cannot get error string: error while calling XSI-compliant strerror_r");
++ err_str = buffer;
++ #endif
++ String errStr(err_str);
++ FREE(buffer);
++ return errStr;
++#else
++ return String(strerror(errno));
++#endif
++}
++
+ String read_text_file(String path)
+ {
+ FILE *f = fopen(path.c_str(), "r");
+--- mediatomb-0.10.0/src/tools.h.bak 2008-02-19 19:19:52.000000000 -0500
++++ mediatomb-0.10.0/src/tools.h 2008-02-19 19:20:24.000000000 -0500
+@@ -134,6 +134,11 @@
+ /// \return string containing the CSV list
+ zmm::String mime_types_to_CSV(zmm::Ref > mimeTypes);
+
++/// \brief a wrapper for the reentrant strerror_r() function
++/// \param mt_errno the errno to get the error string from
++/// \return the error string
++zmm::String mt_strerror(int mt_errno);
++
+ /// \brief Reads the entire contents of a text file and returns it as a string.
+ zmm::String read_text_file(zmm::String path);
+
+--- mediatomb-0.10.0/src/web/auth.cc.bak 2008-02-19 14:22:15.000000000 -0500
++++ mediatomb-0.10.0/src/web/auth.cc 2008-02-19 14:23:16.000000000 -0500
+@@ -109,7 +109,10 @@
+
+ config->appendChild(ipp);
+ #ifdef HAVE_INOTIFY
+- config->addAttribute(_("have-inotify"), _("1"));
++ if (cm->getBoolOption(CFG_IMPORT_AUTOSCAN_USE_INOTIFY))
++ config->addAttribute(_("have-inotify"), _("1"));
++ else
++ config->addAttribute(_("have-inotify"), _("0"));
+ #else
+ config->addAttribute(_("have-inotify"), _("0"));
+ #endif
+--- mediatomb-0.10.0/src/web/items.cc.bak 2008-02-19 14:24:18.000000000 -0500
++++ mediatomb-0.10.0/src/web/items.cc 2008-02-19 14:25:21.000000000 -0500
+@@ -110,29 +110,31 @@
+ autoscanMode = 1;
+
+ #ifdef HAVE_INOTIFY
+- int startpoint_id = INVALID_OBJECT_ID;
+- if (autoscanType == 0)
++ if (ConfigManager::getInstance()->getBoolOption(CFG_IMPORT_AUTOSCAN_USE_INOTIFY))
+ {
+- startpoint_id = storage->isAutoscanChild(parentID);
+- }
+- else
+- {
+- startpoint_id = parentID;
+- }
+-
+- if (startpoint_id != INVALID_OBJECT_ID)
+- {
+- Ref adir = storage->getAutoscanDirectory(startpoint_id);
+- if ((adir != nil) && (adir->getScanMode() == InotifyScanMode))
++ int startpoint_id = INVALID_OBJECT_ID;
++ if (autoscanType == 0)
++ {
++ startpoint_id = storage->isAutoscanChild(parentID);
++ }
++ else
+ {
+- protectItems = 1;
+- if (autoscanType == 0 || adir->persistent())
+- protectContainer = 1;
++ startpoint_id = parentID;
++ }
+
+- autoscanMode = 2;
++ if (startpoint_id != INVALID_OBJECT_ID)
++ {
++ Ref adir = storage->getAutoscanDirectory(startpoint_id);
++ if ((adir != nil) && (adir->getScanMode() == InotifyScanMode))
++ {
++ protectItems = 1;
++ if (autoscanType == 0 || adir->persistent())
++ protectContainer = 1;
++
++ autoscanMode = 2;
++ }
+ }
+ }
+-
+ #endif
+
+ items->addAttribute(_("protectContainer"), String::from(protectContainer));
+--- mediatomb-0.10.0/src/web/containers.cc.bak 2008-02-19 14:25:56.000000000 -0500
++++ mediatomb-0.10.0/src/web/containers.cc 2008-02-19 14:26:28.000000000 -0500
+@@ -94,9 +94,12 @@
+ {
+ autoscanMode = 1;
+ #ifdef HAVE_INOTIFY
+- Ref adir = storage->getAutoscanDirectory(cont->getID());
+- if ((adir != nil) && (adir->getScanMode() == InotifyScanMode))
+- autoscanMode = 2;
++ if (ConfigManager::getInstance()->getBoolOption(CFG_IMPORT_AUTOSCAN_USE_INOTIFY))
++ {
++ Ref adir = storage->getAutoscanDirectory(cont->getID());
++ if ((adir != nil) && (adir->getScanMode() == InotifyScanMode))
++ autoscanMode = 2;
++ }
+ #endif
+ }
+ ce->addAttribute(_("autoscanMode"), String::from(autoscanMode));
+===================================================================
+Part of the diff for configure.ac includes components to allow for using the
+MD5 implementation from dpkg (namely, unsigned int, unsigned long, and the
+big endian check.
+===================================================================
+--- mediatomb-0.10.0/configure.ac.bak 2008-02-19 14:31:09.000000000 -0500
++++ mediatomb-0.10.0/configure.ac 2008-02-19 15:09:31.000000000 -0500
+@@ -682,6 +682,8 @@
+ AC_CHECK_SIZEOF(off_t, 4)
+ AC_CHECK_SIZEOF(size_t, 4)
+ AC_CHECK_SIZEOF(time_t, 4)
++AC_CHECK_SIZEOF(unsigned int)
++AC_CHECK_SIZEOF(unsigned long)
+ AC_CHECK_FUNCS(strtoll nl_langinfo setlocale,[],[])
+ AC_CHECK_FUNCS(backtrace backtrace_symbols,[],[])
+ # Checks for typedefs, structures, and compiler characteristics.
+@@ -691,6 +693,7 @@
+ AC_TYPE_PID_T
+ AC_TYPE_SIZE_T
+ AC_STRUCT_TM
++AC_C_BIGENDIAN
+
+ AC_ARG_ENABLE(rpl-malloc,
+ AC_HELP_STRING([--disable-rpl-malloc], [disable redefinition of malloc to rpl_malloc and realloc to rpl_realloc. Use this if you are sure that you are compiling for the GNU C library (default: enabled)]),
+@@ -2283,10 +2286,10 @@
+ ),
+ [
+ AC_MSG_RESULT([yes]);
+- AC_DEFINE([SYS_INOTIFY_H_OK],[1],[sys/inotify.h exists and works correctly])],
++ AC_DEFINE([SYS_INOTIFY_H_OK],[1],[sys/inotify.h exists and works on this system])],
+ [
+ AC_MSG_RESULT([no, using own inotify headers])
+- AC_MSG_CHECKING([whether inotify-nosys.h works])
++ AC_MSG_CHECKING([whether inotify-nosys.h works on this system])
+ AC_RUN_IFELSE(
+ AC_LANG_PROGRAM([[#include "src/inotify-nosys.h"]],
+ [[return (-1 == inotify_init());]]
+@@ -2296,7 +2299,11 @@
+ INOTIFY_OK=yes
+ ],
+ [
+- AC_MSG_RESULT([no, disabling inotify support])
++ if test "x$INOTIFY_EN" != xyes; then
++ AC_MSG_RESULT([no, disabling inotify support])
++ else
++ AC_MSG_RESULT([no])
++ fi
+ INOTIFY_OK=missing
+ ])
+
+@@ -2308,7 +2315,14 @@
+ AC_SUBST(INOTIFY_CXXFLAGS)
+ else
+ if test "x$INOTIFY_EN" = xyes; then
+- AC_MSG_ERROR(unable to configure inotify support)
++ AC_MSG_NOTICE([enabling runtime inotify detection])
++ # if system inotify header exists, go with it, otherwise take our own
++ if test "x$ac_cv_header_sys_inotify_h" = xyes; then
++ AC_DEFINE([SYS_INOTIFY_H_OK],[1],[sys/inotify.h exists])
++ fi
++ AC_DEFINE([HAVE_INOTIFY], [1], [inotify presence])
++ AC_SUBST(INOTIFY_CXXFLAGS)
++ INOTIFY_OK=yes
+ fi
+ fi
+
--- mediatomb-0.10.0.dfsg1.orig/debian/mediatomb-daemon.mediatomb.logrotate
+++ mediatomb-0.10.0.dfsg1/debian/mediatomb-daemon.mediatomb.logrotate
@@ -0,0 +1,8 @@
+"/var/log/mediatomb.log" {
+ monthly
+ rotate 5
+ missingok
+ postrotate
+ pkill -HUP mediatomb
+ endscript
+}
--- mediatomb-0.10.0.dfsg1.orig/debian/changelog
+++ mediatomb-0.10.0.dfsg1/debian/changelog
@@ -0,0 +1,130 @@
+mediatomb (0.10.0.dfsg1-2) unstable; urgency=low
+
+ * Moved Debian packaging from svn to git.
+ + Updated Vcs entries in debian/control.
+ * Fixing inotify build problems. An inotify check will be supported for
+ runtime. Closes: #465177
+ * Removing .pc directory when unpatching.
+ * Allowing options used in running configure to be overriden.
+ * Writing external script to generate orig source tarball and have
+ get-orig-source target in debian/rules call external script.
+ * Update copyright to mention two files that are removed from upstream.
+ * Add TODO about changing from using PNG Behavior fix from WebFX to using IE
+ PNG Fix delivered by TwinHelix.
+ * Adding TODO about ensuring that the WebUI works under any Mozilla based
+ browser.
+ + There's a known problem with the WebUI under Konqueror.
+
+ -- Andres Mejia Tue, 19 Feb 2008 22:27:26 -0500
+
+mediatomb (0.10.0.dfsg1-1) unstable; urgency=low
+
+ [ Andres Mejia ]
+ * Moved myself in Maintainers field and Leonhard to Uploaders field.
+ * Added Sven Mueller to Uploaders field.
+ * Place comment in patch.
+ * Hard code some configure options for mediatomb
+ + Ensures proper dependencies are used in case someone builds packages with
+ 'debian/rules binary'.
+ * Adding 'get-orig-source' in debian/rules.
+ * Installing the README.Debian file to the mediatomb package as well.
+ * Added watch file.
+ * Add nostrip option for DEB_BUILD_OPTIONS.
+ * Fix permissions to comply with Debian policy.
+ * Call configure properly as described in autotools-dev documentation.
+ * Test for the existence of *-stamp stamps before attempting to remove.
+ * Renamed config.status target to configure and call configure-stamp target.
+ * Installing only ASCII upstream README and scripting.txt.
+ * Making mediatomb-daemon and mediatomb package binary independent.
+ + Updated debian/rules to use binary-indep target.
+ * Updated package descriptions.
+ * Specify CXXFLAGS to use.
+ * Add lintian override for use of x-www-browser.
+ * Rewriting init scripts based on /etc/init.d/skeleton.
+ + Update default configuration.
+ + Properly test for home directory and use it with daemon options.
+ * Updated mediatomb-daemon README.Debian.
+ * Renaming acinclude.m4 to acx_pthread.m4 during build time, so as not to
+ confuse it with acinclude.m4 from libtool.
+ * Changing Vcs-Browser to point to
+ http://svn.debian.org/wsvn/collab-maint/ext-maint/mediatomb/?op=log
+ * Creating package that could be suitable to upload directly to Debian
+ archive. (Closes: 440199)
+ + Packaging is a heavily modified form of the packaging found in
+ http://apt.mediatomb.cc/pool/main/m/mediatomb/
+ + Changes made are written below in order of latest changes to oldest
+ changes.
+ * init scripts will be installed using the name "mediatomb".
+ + Added README.Debian showing how to remove the old files and startup
+ links.
+ * Added logrotate script.
+ * Bumped Standards-Version to 3.7.3.
+ * Changed Vcs-* entries to new location in svn.debian.org.
+ * Rewrote copyright file to be machine parsable and to list the copyright and
+ license information for the files derived from other projects.
+ * Taking out "open source (GPL)" words in package description.
+ * manpage docbook source added in debian/extras.
+ * Replaced RSA MD5 code with MD5 code found in dpkg (for license reasons).
+ + Code is removed in orig tarball and patched in during build.
+ * init script will send SIGTERM instead of SIGINT to stop mediatomb.
+ * Took out duplicate Homepage field in control file.
+ * Took out XS- from Vcs-* fields in control file.
+ * Took out deprecated Encoding key in the .desktop file.
+ * Fixing mediatomb-daemon.postrm to delete /var/lib/mediatomb when removing
+ or purging.
+ * Adding dpkg-statoverride command during purging to remove overrides used
+ by mediatomb-daemon package.
+ * Using deluser and delgroup commands to remove mediatomb user and group.
+ * Removed dependency on passwd.
+ * Added --disabled-{login,password} for adduser in preinst.
+ * Changed --shell option to use /usr/sbin/nologin in preinst.
+ * Using dpkg-statoverride instead of chown for postinst.
+ * Adding myself to Uploaders field instead of Maintainer field.
+ * Creating three packages.
+ + mediatomb-common will contain the the binary, the manpage, and everything
+ needed for scripting and the web interface.
+ + mediatomb-daemon will contain the files needed to run mediatomb as a
+ daemon.
+ + mediatomb will contain the desktop file that depends on a web browser to
+ access the web ui.
+ * Adding Homepage field in source stanza which will be supported soon.
+ * Removing konqueror as dependency for mediatomb as it is not yet recommended
+ to use konqueror to access the webui.
+ * Removing misc:Depends tag as it is not needed.
+ * Set myself as a maintainer.
+ * Removing debian/dirs as it is not needed.
+ * Removing prerm script as it did nothing.
+ * Renaming maintainer scripts since they are relevant only to the daemon
+ package.
+ * Replacing build-deps of autotools-dev with automake.
+ * Calling autotools to ensure everything is up to date.
+ * Adding "distclean" target when running debian/rules clean.
+ * Adding dependency to www-browser virtual package.
+ + Including some real packages first as alternatives.
+ * Adding desktop file to open mediatomb configuration page.
+ + Correct IP address and port to open is provided in
+ /var/lib/mediatomb/mediatomb.html.
+ * Adding menu file as well.
+ * Adding dh_installmenu and dh_desktop commands to debian/rules.
+ * Adding mediatomb.install for desktop and xpm file.
+ * Providing symlink for icon used with desktop entry.
+ * Addressing bad-distribution-in-changes-file lintian error.
+ + debian/changelog had unknown/invalid target distribution (etch).
+ * Addressing out-of-date-standards-version lintian warning.
+ + Bumped 'Standards-Version' to 3.7.2.
+ * Addressing debian-rules-ignores-make-clean-error lintian warning.
+ + Replaced "-$(MAKE) clean" with "[ ! -f Makefile ] || $(MAKE) clean" in
+ debian/rules file.
+ * Setting NO_START variable in mediatomb.default to "".
+ * Replacing build dependency of libsmjs-dev to libmozjs-dev.
+ + libsmjs-dev is a transition package.
+ * Adding -m /dev/null in D_ARGS for init script.
+ + Temporary workaround for a bug that has been fixed in SVN.
+ * Added Uploaders field in debian/control to add me as an uploader.
+ * Renamed some build depends to their appropriate virtual packages.
+ + Should make it easier for binNMUs.
+ + libid3-3.8.3-dev changed to libid3-dev.
+ + libmysqlclient15-dev changed to libmysqlclient-dev.
+ + zlib1g-dev changed to libz-dev.
+
+ -- Andres Mejia Sat, 02 Feb 2008 01:42:48 -0500
--- mediatomb-0.10.0.dfsg1.orig/debian/mediatomb-common.install
+++ mediatomb-0.10.0.dfsg1/debian/mediatomb-common.install
@@ -0,0 +1,2 @@
+usr/bin/mediatomb
+usr/share/mediatomb
--- mediatomb-0.10.0.dfsg1.orig/debian/docs
+++ mediatomb-0.10.0.dfsg1/debian/docs
@@ -0,0 +1,2 @@
+README
+doc/scripting.txt
--- mediatomb-0.10.0.dfsg1.orig/debian/control
+++ mediatomb-0.10.0.dfsg1/debian/control
@@ -0,0 +1,58 @@
+Source: mediatomb
+Section: net
+Priority: optional
+Maintainer: Andres Mejia
+Uploaders: Leonhard Wimmer , Sven Mueller
+Build-Depends: debhelper (>= 4.0.0), automake, quilt, libexif-dev, libid3-dev, libmagic-dev, libmysqlclient-dev, libsqlite3-dev, libz-dev, libmozjs-dev
+Standards-Version: 3.7.3
+Homepage: http://mediatomb.cc/
+Vcs-git: git://git.debian.org/git/collab-maint/mediatomb.git
+Vcs-Browser: http://git.debian.org/?p=collab-maint/mediatomb.git
+
+Package: mediatomb-common
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: UPnP MediaServer (base package)
+ MediaTomb is an UPnP MediaServer with a nice web user interface, it allows you
+ to stream your digital media through your home network and listen to/watch it
+ on a variety of UPnP compatible devices.
+ .
+ MediaTomb implements the UPnP MediaServer V 1.0 specification that can be found
+ on http://www.upnp.org/. The current implementation focuses on parts that are
+ required by the specification, however we look into extending the functionality
+ to cover the optional parts of the spec as well.
+ .
+ This package contains the the binary, the manpage, and everything needed for
+ scripting and the web interface.
+
+Package: mediatomb-daemon
+Architecture: all
+Depends: mediatomb-common (>= ${source:Version}), adduser (>= 3.34)
+Description: UPnP MediaServer (daemon package)
+ MediaTomb is an UPnP MediaServer with a nice web user interface, it allows you
+ to stream your digital media through your home network and listen to/watch it
+ on a variety of UPnP compatible devices.
+ .
+ MediaTomb implements the UPnP MediaServer V 1.0 specification that can be found
+ on http://www.upnp.org/. The current implementation focuses on parts that are
+ required by the specification, however we look into extending the functionality
+ to cover the optional parts of the spec as well.
+ .
+ This package contains the files needed to run mediatomb as a daemon.
+
+Package: mediatomb
+Architecture: all
+Depends: mediatomb-daemon (>= ${source:Version}), firefox | www-browser
+Description: UPnP MediaServer (main package)
+ MediaTomb is an UPnP MediaServer with a nice web user interface, it allows you
+ to stream your digital media through your home network and listen to/watch it
+ on a variety of UPnP compatible devices.
+ .
+ MediaTomb implements the UPnP MediaServer V 1.0 specification that can be found
+ on http://www.upnp.org/. The current implementation focuses on parts that are
+ required by the specification, however we look into extending the functionality
+ to cover the optional parts of the spec as well.
+ .
+ This package contains the desktop file needed to access the web ui using a
+ system's default web browser. This package also acts as a virtual package to
+ install all other mediatomb packages.
--- mediatomb-0.10.0.dfsg1.orig/debian/rules
+++ mediatomb-0.10.0.dfsg1/debian/rules
@@ -0,0 +1,159 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# These are from the autotools-dev package documentation.
+# /usr/share/doc/autotools-dev/README.Debian.gz
+# from the section titled "Calling GNU configure properly"
+export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+# FOR AUTOCONF 2.52 AND NEWER ONLY
+ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
+ confflags += --build $(DEB_HOST_GNU_TYPE)
+else
+ confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
+endif
+
+# CFLAGS, CXXFLAGS, and LDFLAGS to use. Allowing them to be overriden.
+DEFAULT_CFLAGS = -Wall -g
+DEFAULT_CXXFLAGS = -Wall -g
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ DEFAULT_CFLAGS += -O0
+ DEFAULT_CXXFLAGS += -O0
+else
+ DEFAULT_CFLAGS += -O2
+ DEFAULT_CXXFLAGS += -O2
+endif
+CFLAGS ?= $(DEFAULT_CFLAGS)
+CXXFLAGS ?= $(DEFAULT_CXXFLAGS)
+LDFLAGS ?= -Wl,-z,defs
+
+# Implement a MEDIATOMB_CONFIG_OPTIONS variable that sets the default configure
+# options and allow it to be overridden.
+# Use DEB_HOST_ARCH_OS from dpkg-architecture to determine OS we're building
+# for.
+export DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
+ifeq (linux,$(DEB_HOST_ARCH_OS))
+ ENABLE_INOTIFY = --enable-inotify
+endif
+MEDIATOMB_CONFIG_OPTIONS ?= $(confflags) \
+ --prefix=/usr \
+ --mandir=\$${prefix}/share/man \
+ --infodir=\$${prefix}/share/info \
+ --enable-sqlite3 \
+ --enable-mysql \
+ --enable-libjs \
+ --enable-libmagic \
+ --enable-libexif \
+ --enable-id3lib \
+ --disable-taglib \
+ --disable-libextractor \
+ $(ENABLE_INOTIFY) \
+ CFLAGS="$(CFLAGS)" \
+ CXXFLAGS="$(CXXFLAGS)" \
+ LDFLAGS="$(LDFLAGS)"
+
+patch: patch-stamp
+patch-stamp:
+ dh_testdir
+ # Renaming acinclude.m4 to acx_pthread.m4, so as not to confuse it with
+ # an ordinary acinclude.m4.
+ mv acinclude.m4 acx_pthread.m4
+ QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2
+ touch patch-stamp
+
+configure: patch configure-stamp
+configure-stamp:
+ dh_testdir
+ aclocal -I .
+ autoheader -f
+ automake -a -c -f
+ autoconf -f
+ ./configure $(MEDIATOMB_CONFIG_OPTIONS)
+ touch configure-stamp
+
+build: configure build-stamp
+build-stamp:
+ dh_testdir
+ $(MAKE)
+ touch build-stamp
+
+clean: clean-patched unpatch
+clean-patched:
+ dh_testdir
+ dh_testroot
+ [ ! -f Makefile ] || $(MAKE) clean distclean
+ dh_clean
+ [ ! -f build-stamp ] || rm build-stamp
+ [ ! -f configure-stamp ] || rm configure-stamp
+
+unpatch:
+ dh_testdir
+ QUILT_PATCHES=debian/patches quilt pop -a -R || test $$? = 2
+ [ ! -f acx_pthread.m4 ] || mv acx_pthread.m4 acinclude.m4
+ [ ! -f patch-stamp ] || rm patch-stamp
+ [ ! -d .pc ] || rm -rf .pc
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
+ install -d $(CURDIR)/debian/tmp/etc/mediatomb
+ install -m 0755 -d $(CURDIR)/debian/tmp/var/lib/mediatomb
+ install -m 0644 debian/config.xml.inst \
+ $(CURDIR)/debian/tmp/etc/mediatomb/config.xml
+
+# Build architecture-independent files here.
+binary-indep: build install
+ dh_testdir
+ dh_testroot
+ dh_install -pmediatomb-daemon --sourcedir=debian/tmp
+ dh_install -pmediatomb
+ mv debian/mediatomb/usr/share/lintian/overrides/mediatomb.override \
+ debian/mediatomb/usr/share/lintian/overrides/mediatomb
+ dh_installchangelogs -i ChangeLog
+ dh_installdocs -i
+ dh_installdocs -pmediatomb debian/README.Debian
+ dh_installinit -i --name=mediatomb
+ dh_installlogrotate -i --name=mediatomb
+ dh_link -pmediatomb usr/share/mediatomb/web/icons/mt-icon120.png \
+ usr/share/pixmaps/mediatomb.png
+ dh_installmenu -i
+ dh_desktop -i
+ dh_compress -i
+ dh_fixperms -i
+ dh_installdeb -i
+ dh_gencontrol -i
+ dh_md5sums -i
+ dh_builddeb -i
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_install -a --sourcedir=debian/tmp
+ dh_installchangelogs -a ChangeLog
+ dh_installdocs -a
+ dh_installman -pmediatomb-common debian/tmp/usr/share/man/man1/mediatomb.1
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+ dh_strip -a
+endif
+ dh_compress -a
+ dh_fixperms -a
+ dh_installdeb -a
+ dh_shlibdeps -a
+ dh_gencontrol -a
+ dh_md5sums -a
+ dh_builddeb -a
+
+get-orig-source:
+# Use external script
+ $(dir $_)mediatomb-get-orig-source --remove-upstream-tarball \
+ --remove-orig-dir
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
--- mediatomb-0.10.0.dfsg1.orig/debian/mediatomb.desktop
+++ mediatomb-0.10.0.dfsg1/debian/mediatomb.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=MediaTomb
+Comment=MediaTomb UPnP MediaServer web user interface.
+Exec=/usr/bin/x-www-browser /var/lib/mediatomb/mediatomb.html
+Icon=mediatomb.png
+Terminal=false
+Type=Application
+Categories=AudioVideo;
--- mediatomb-0.10.0.dfsg1.orig/debian/mediatomb.menu
+++ mediatomb-0.10.0.dfsg1/debian/mediatomb.menu
@@ -0,0 +1,5 @@
+?package(mediatomb):needs="X11" \
+ section="Applications/Sound" \
+ title="MediaTomb" command="/usr/bin/x-www-browser /var/lib/mediatomb/mediatomb.html" \
+ longtitle="MediaTomb UPnP MediaServer web user interface." \
+ icon="/usr/share/pixmaps/mediatomb.xpm"
--- mediatomb-0.10.0.dfsg1.orig/debian/mediatomb-daemon.preinst
+++ mediatomb-0.10.0.dfsg1/debian/mediatomb-daemon.preinst
@@ -0,0 +1,39 @@
+#!/bin/sh -e
+
+DATADIR=/var/lib/mediatomb
+
+# stolen from mysql deb package...
+
+# If we use NIS then errors should be tolerated. It's up to the
+# user to ensure that the mediatomb user is correctly setup.
+# Beware that there are two ypwhich one of them needs the 2>/dev/null!
+if test -n "`which ypwhich 2>/dev/null`" && ypwhich >/dev/null 2>&1; then
+ set +e
+fi
+
+# creating mediatomb group if it isn't already there
+if ! getent group mediatomb >/dev/null; then
+ # Adding system group: mediatomb.
+ addgroup --system mediatomb >/dev/null
+fi
+
+# creating mediatomb user if it isn't already there
+if ! getent passwd mediatomb >/dev/null; then
+ # Adding system user: mediatomb.
+ adduser \
+ --system \
+ --ingroup mediatomb \
+ --home $DATADIR \
+ --gecos "MediaTomb Server" \
+ --shell /usr/sbin/nologin \
+ --disabled-login \
+ --disabled-password \
+ mediatomb >/dev/null
+fi
+
+# end of NIS tolerance zone
+set -e
+
+#DEBHELPER#
+
+exit 0
--- mediatomb-0.10.0.dfsg1.orig/debian/mediatomb-daemon.postrm
+++ mediatomb-0.10.0.dfsg1/debian/mediatomb-daemon.postrm
@@ -0,0 +1,18 @@
+#!/bin/sh -e
+
+if [ "$1" = "remove" ] ; then
+ rm -rf /var/lib/mediatomb
+fi
+
+if [ "$1" = "purge" ] ; then
+ rm -rf /var/log/mediatomb /var/log/mediatomb* \
+ /var/run/mediatomb.pid /var/lib/mediatomb
+ deluser mediatomb || true
+ delgroup mediatomb || true
+ dpkg-statoverride --remove /etc/mediatomb/config.xml
+ dpkg-statoverride --remove /var/lib/mediatomb
+fi
+
+#DEBHELPER#
+
+exit 0
--- mediatomb-0.10.0.dfsg1.orig/debian/mediatomb.override
+++ mediatomb-0.10.0.dfsg1/debian/mediatomb.override
@@ -0,0 +1,4 @@
+# This is purposely done so that mediatomb's web ui will be accessed through a
+# user's default web browser.
+mediatomb: desktop-command-not-in-package /usr/share/applications/mediatomb.desktop /usr/bin/x-www-browser
+mediatomb: menu-command-not-in-package /usr/share/menu/mediatomb:5 /usr/bin/x-www-browser
--- mediatomb-0.10.0.dfsg1.orig/debian/mediatomb-daemon.README.Debian
+++ mediatomb-0.10.0.dfsg1/debian/mediatomb-daemon.README.Debian
@@ -0,0 +1,20 @@
+Upgrading to mediatomb-0.10.0.dfsg1
+--------------------------------------------------------------------------
+If you are upgrading mediatomb-daemon to the Debian package version
+0.10.0.dfsg1, you will need to remove the old init and default scripts that
+were named "mediatomb-daemon" and remove the system startup links for the old
+script. This upgrade will make no attempt to remove the old files. Here's a
+quick command line example of what should be done.
+
+rm /etc/init.d/mediatomb-daemon
+rm /etc/default/mediatomb-daemon
+update-rc.d mediatomb-daemon remove
+--------------------------------------------------------------------------
+
+RSA MD5 Code Replacement
+--------------------------------------------------------------------------
+Upstream had delivered two files tombupnp/upnp/src/uuid/upnp_md5.c and
+tombupnp/upnp/src/inc/upnp_md5.h that contained code made by RSA Data
+Security, Inc. Their license is not DFSG so the MD5 code was replaced with
+the MD5 code used for dpkg. The RSA code is entirely removed from the orig
+tarball and the dpkg code is patched in during build time.
--- mediatomb-0.10.0.dfsg1.orig/debian/mediatomb.xpm
+++ mediatomb-0.10.0.dfsg1/debian/mediatomb.xpm
@@ -0,0 +1,316 @@
+/* XPM */
+static char *dummy[]={
+"32 32 281 2",
+"Qt c None",
+"#p c #565656",
+".A c #656565",
+"cw c #717171",
+".z c #343434",
+"b3 c #555555",
+"b7 c #494949",
+".2 c #4c4c4c",
+".# c #565656",
+"cr c #595959",
+"bQ c #434343",
+"al c #494949",
+".M c #3f3f3f",
+"a7 c #363636",
+".U c #3a3a3a",
+"cv c #3b3b3b",
+"cq c #323232",
+"b8 c #2a2a2a",
+"bW c #282828",
+"cs c #282828",
+".k c #343434",
+"cf c #2a2a2a",
+"a. c #292929",
+"cu c #2d2d2d",
+"ay c #343434",
+"ct c #333333",
+"b4 c #222222",
+"#d c #212121",
+"#H c #2c2c2c",
+"b0 c #222222",
+".j c #262626",
+"aX c #353535",
+".L c #1d1d1d",
+"cg c #232323",
+"bt c #282828",
+"#e c #2b2b2b",
+"aL c #252525",
+"aP c #1f1f1f",
+"bu c #252525",
+"cb c #1d1d1d",
+"bV c #1f1f1f",
+"#G c #1a1a1a",
+".a c #242424",
+"bN c #1c1c1c",
+".y c #1a1a1a",
+".7 c #1b1b1b",
+"ca c #1e1e1e",
+".T c #1c1c1c",
+"cp c #1a1a1a",
+"ak c #181818",
+".B c #222222",
+"bM c #1c1c1c",
+".1 c #1a1a1a",
+"bl c #181818",
+".i c #1b1b1b",
+"#Y c #1d1d1d",
+".8 c #1f1f1f",
+"ch c #181818",
+".l c #1e1e1e",
+"bZ c #181818",
+".b c #1c1c1c",
+"ce c #161616",
+"bm c #181818",
+"b6 c #181818",
+"ax c #151515",
+"b9 c #171717",
+"be c #141414",
+"b2 c #181818",
+"bR c #171717",
+".h c #191919",
+"#q c #1d1d1d",
+".N c #1d1d1d",
+"co c #141414",
+".3 c #1c1c1c",
+".c c #1a1a1a",
+"aK c #151515",
+"#X c #151515",
+"#o c #151515",
+"cc c #151515",
+"a6 c #161616",
+"ci c #141414",
+".V c #1c1c1c",
+"a# c #1a1a1a",
+".K c #171717",
+"bB c #161616",
+".x c #171717",
+"aO c #131313",
+".g c #171717",
+"aW c #121212",
+"bA c #141414",
+"bf c #181818",
+".d c #181818",
+"b5 c #151515",
+"bX c #161616",
+"bP c #141414",
+".f c #1b1b1b",
+"cn c #141414",
+".e c #1c1c1c",
+"b1 c #161616",
+".m c #1c1c1c",
+"c# c #131313",
+".C c #1d1d1d",
+"cj c #151515",
+"am c #1e1e1e",
+"#c c #161616",
+"cd c #141414",
+".S c #171717",
+"#f c #1f1f1f",
+"a8 c #1c1c1c",
+"cm c #161616",
+"#9 c #161616",
+"#I c #202020",
+"bU c #151515",
+"ck c #161616",
+".6 c #181818",
+".0 c #191919",
+"c. c #181818",
+".w c #1c1c1c",
+"bs c #151515",
+"cl c #161616",
+"bY c #171717",
+"bL c #181818",
+"#F c #191919",
+"bk c #1b1b1b",
+"aj c #1c1c1c",
+"bv c #1d1d1d",
+".J c #1e1e1e",
+"aY c #1f1f1f",
+"az c #202020",
+"aw c #212121",
+"aM c #222222",
+"bT c #232323",
+"aJ c #242424",
+".n c #252525",
+".v c #262626",
+"a5 c #272727",
+".R c #282828",
+".9 c #292929",
+"#b c #2a2a2a",
+"a4 c #2b2b2b",
+".Z c #2c2c2c",
+".D c #2d2d2d",
+".u c #2e2e2e",
+".o c #2f2f2f",
+".Q c #303030",
+".Y c #313131",
+".I c #323232",
+".P c #333333",
+".t c #343434",
+".p c #353535",
+".s c #363636",
+".r c #373737",
+".q c #383838",
+".H c #393939",
+".G c #3a3a3a",
+".E c #3b3b3b",
+".F c #3c3c3c",
+".O c #3d3d3d",
+".X c #3e3e3e",
+".W c #3f3f3f",
+".5 c #404040",
+"aI c #414141",
+"#n c #424242",
+"#m c #434343",
+"bC c #444444",
+"#l c #454545",
+".4 c #464646",
+"#Q c #494949",
+"bS c #4a4a4a",
+"#a c #4b4b4b",
+"#k c #4c4c4c",
+"aV c #4d4d4d",
+"#j c #4e4e4e",
+"#Z c #4f4f4f",
+"#J c #505050",
+"bh c #525252",
+"bb c #535353",
+"#w c #545454",
+"a2 c #555555",
+"aT c #565656",
+"ag c #575757",
+"at c #585858",
+"af c #595959",
+"#. c #5a5a5a",
+"as c #5b5b5b",
+"## c #5e5e5e",
+"a9 c #606060",
+"aZ c #616161",
+"#i c #626262",
+"#g c #636363",
+"aB c #646464",
+"#t c #656565",
+"#h c #666666",
+"#P c #676767",
+"#3 c #686868",
+"ao c #696969",
+"bg c #6d6d6d",
+"b# c #6e6e6e",
+"a0 c #6f6f6f",
+"aR c #707070",
+"aD c #717171",
+"bE c #727272",
+"aq c #737373",
+"bj c #767676",
+"bp c #777777",
+"#4 c #787878",
+"bd c #797979",
+"#R c #7a7a7a",
+"#x c #7b7b7b",
+"a1 c #7c7c7c",
+"aS c #7d7d7d",
+"aE c #7e7e7e",
+"bq c #828282",
+"ah c #848484",
+"aH c #868686",
+"aN c #878787",
+"aU c #888888",
+"aF c #898989",
+"au c #8a8a8a",
+"bF c #909090",
+"#E c #919191",
+"ba c #9a9a9a",
+"#8 c #9b9b9b",
+"ar c #9c9c9c",
+"#W c #9f9f9f",
+"ad c #a1a1a1",
+"b. c #a2a2a2",
+"aQ c #a3a3a3",
+"aC c #a4a4a4",
+"bH c #a6a6a6",
+"bK c #a8a8a8",
+"bo c #acacac",
+"bO c #afafaf",
+"#s c #b1b1b1",
+"#N c #b3b3b3",
+"#u c #b6b6b6",
+"ac c #b7b7b7",
+"#5 c #b8b8b8",
+"aa c #bcbcbc",
+"ap c #bfbfbf",
+"bw c #c2c2c2",
+"#6 c #c7c7c7",
+"aA c #c8c8c8",
+"an c #c9c9c9",
+"#v c #cbcbcb",
+"#O c #cecece",
+"#7 c #cfcfcf",
+"#r c #d0d0d0",
+"#K c #d1d1d1",
+"#0 c #d3d3d3",
+"bz c #d5d5d5",
+"bx c #d6d6d6",
+"by c #dcdcdc",
+"#D c #dedede",
+"ab c #e0e0e0",
+"bD c #e1e1e1",
+"#C c #e2e2e2",
+"bn c #e3e3e3",
+"#B c #e5e5e5",
+"#y c #e6e6e6",
+"bJ c #e7e7e7",
+"#A c #e8e8e8",
+"bI c #e9e9e9",
+"#z c #eaeaea",
+"br c #ededed",
+"bi c #efefef",
+"#S c #f1f1f1",
+"bc c #f2f2f2",
+"#V c #f3f3f3",
+"a3 c #f4f4f4",
+"bG c #f5f5f5",
+"ae c #f6f6f6",
+"#1 c #f7f7f7",
+"#U c #f8f8f8",
+"aG c #f9f9f9",
+"av c #fafafa",
+"ai c #fbfbfb",
+"#T c #fcfcfc",
+"#2 c #fdfdfd",
+"#M c #fefefe",
+"#L c #ffffff",
+"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
+"QtQtQtQtQtQtQtQtQtQt.#.a.b.c.d.e.f.g.h.i.jQtQtQtQtQtQtQtQtQtQtQt",
+"QtQtQtQtQtQtQtQt.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.zQtQtQtQtQtQtQtQt",
+"QtQtQtQtQtQt.A.B.C.D.E.F.E.E.G.H.q.s.p.t.I.D.J.K.LQtQtQtQtQtQtQt",
+"QtQtQtQtQt.M.N.n.E.O.O.O.O.F.E.G.H.q.s.p.P.I.Q.R.S.TQtQtQtQtQtQt",
+"QtQtQtQt.U.V.u.O.O.W.W.X.X.O.O.F.G.H.q.s.t.P.Y.o.Z.0.1QtQtQtQtQt",
+"QtQtQt.2.3.o.X.F.4.F.W.5.W.W.X.O.E.G.H.r.p.P.I.Q.u.Z.6.7QtQtQtQt",
+"QtQtQt.8.9.X.W.F#.###a.F.W.5.W.X.F.E.H.q.s.t.I.Q.o.D#b#c#dQtQtQt",
+"QtQt#e#f.O.W.5.O#g#h#i###j#k.X.X.O.F.G.H#l#m#n.5.W.O.F.Z#o#pQtQt",
+"QtQt#q.P.X.W.5#j#r#s#h#t#u#v#w.E.O.F.E#x#y#z#A#B#C#D#E.t#F#GQtQt",
+"Qt#H#I.F.X.W#J#K#L#M#N#u#M#L#O#P#Q.G#R#S#L#L#T#U#V#W.P#b.n#XQtQt",
+"Qt#Y.D.F.X#Z#0#1#M#L#2#M#1#L#L#O#3#4#5#6#O#M#T#7#8.p.Z#b.9#9a.Qt",
+"Qta#.q.F.Oaa#Labac#M#L#Ladae#L#L#8afag#wah#Mai#R.u.u.Z#b.RajakQt",
+"alam.G.E.Oan#Labaoap#L#Laq#8#L#Laras#.atau#2av#x.o.D.Z#b.RawaxQt",
+"ayaz.H.G.FaA#LabaBaC#L#LaDaE#L#LarasafataF#TaGaHaI.I.Z#b.RaJaKQt",
+"aLaM.q.H.EaA#Lab#gaC#L#LaDaE#L#Lar#.afagaFai#UaN#j#a.W.Q.9.vaOQt",
+"aPaM.r.q.HaA#Lab#iaQ#L#LaRaS#L#L#8afagaTaUaGaeaNaV#k#m.t#b.naWQt",
+"aXaY.p.r.qaA#LabaZaQ#L#La0a1#L#L#8agaTa2aN#1a3aH#l.sa4.Ra5aJa6Qt",
+"a7a8.t.p.s#6#Laba9b.#L#Lb##x#L#LbaaTa2bbaNa3bcbd.D#b.9a5.vazbeQt",
+"Qtbf.I.t.p#6#Lab##ad#L#Lbgbd#L#Lba#wbbbhahbcbibja4.9.Ra5.nbkblQt",
+"Qtbm.9.I.H#O#Mbn#hbo#L#Lbpah#M#2b.bb#Q.qbqbibr#x#b.Ra5.v.nbsbtQt",
+"Qtbubv.Q#E#1aiaibw#S#2#2bxbyaiaG#zao.Qasbzbr#z#r#ka5.v.naMbAQtQt",
+"QtQtbBa4bC#O#1bDbE#NaGbcaubF#SbGaC.p.u.rbHbIbJbK.Q.v.naJbLbMQtQt",
+"QtQtbN.w.u#maaaZ#ka2bOau#Q.Hahb..p.D.D.Z.saCbK.Y.v.naJawbPbQQtQt",
+"QtQtQtbRaJ.D.s.obS#jbS.q.u.u.o.t.Z.Za4#b.9.P.Y.v.naJbTbUbVQtQtQt",
+"QtQtQtbWbX.va4.oaI.s.D.Z.Z.Z.Za4a4#b.9.R.Ra5.v.naJbTbYbZQtQtQtQt",
+"QtQtQtQtb0b1.n.Z.Z#b#b#b#b#b#b.9.9.R.Ra5.v.n.naJbTbLb2b3QtQtQtQt",
+"QtQtQtQtQtb4b5az.R.R.9.9.R.R.R.Ra5a5.v.v.naJbTawbsb6b7QtQtQtQtQt",
+"QtQtQtQtQtQtb8b9c.bTa5a5a5a5.v.v.v.n.naJaJbTbkc#caQtQtQtQtQtQtQt",
+"QtQtQtQtQtQtQtQtcbccbY.JaJ.n.n.naJaJbTaz#FcdcecfQtQtQtQtQtQtQtQt",
+"QtQtQtQtQtQtQtQtQtQtcgchcicjckclbscmcncocpcqQtQtQtQtQtQtQtQtQtQt",
+"QtQtQtQtQtQtQtQtQtQtQtQtQtcrcsctcucvcwQtQtQtQtQtQtQtQtQtQtQtQtQt"};
--- mediatomb-0.10.0.dfsg1.orig/debian/config.xml.inst
+++ mediatomb-0.10.0.dfsg1/debian/config.xml.inst
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+ MediaTomb
+ /var/lib/mediatomb
+ /usr/share/mediatomb/web
+
+ sqlite3.db
+
+
+
+
+ /usr/share/mediatomb/js/common.js
+ /usr/share/mediatomb/js/playlists.js
+
+ /usr/share/mediatomb/js/import.js
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- mediatomb-0.10.0.dfsg1.orig/debian/mediatomb-get-orig-source
+++ mediatomb-0.10.0.dfsg1/debian/mediatomb-get-orig-source
@@ -0,0 +1,75 @@
+#!/bin/sh
+
+# This script is used to download the upstream source for mediatomb and
+# generate it into an orig source tarball for Debian.
+
+# Common variables used to ease maintenance of this script
+MEDIATOMB_TARBALL="mediatomb-0.10.0.tar.gz"
+MEDIATOMB_VERSION="0.10.0"
+MEDIATOMB_TARBALL_CHECKSUM="2436c73de4ac5f3ba1575f7ee93a0430"
+
+USAGE="\n\
+This script is used to generate the orig tarball used in building\n\
+Debian packages for mediatomb-$MEDIATOMB_VERSION.dfsg1.\n\
+Usage: mediatomb-get-orig-source [OPTION]\n\
+\n\
+ -h, --help Display this help message.\n\
+ --remove-upstream-tarball Remove the upstream source tarball.\n\
+ --remove-orig-dir Remove the generated orig directory.\n"
+
+while [ "$#" -gt "0" ]
+do
+ case "$1" in
+ -h|--help)
+ echo "${USAGE}"
+ exit 1
+ ;;
+ --remove-upstream-tarball)
+ REMOVE_UPSTREAM_TARBALL=1
+ shift
+ ;;
+ --remove-orig-dir)
+ REMOVE_ORIG_DIR=1
+ shift
+ ;;
+ esac
+done
+
+# Download the tarball if it's not available in the current directory
+[ -f $MEDIATOMB_TARBALL ] || \
+ wget http://downloads.sourceforge.net/mediatomb/$MEDIATOMB_TARBALL
+
+# Verify the checksum
+COMPUTED_CHECKSUM=`md5sum $MEDIATOMB_TARBALL | cut -d ' ' -f 1`
+if [ $MEDIATOMB_TARBALL_CHECKSUM != $COMPUTED_CHECKSUM ] ; then
+ echo "Checksum verification failed. Checksum was $COMPUTED_CHECKSUM
+Expected checksum $MEDIATOMB_TARBALL_CHECKSUM."
+ exit 1
+else
+ echo "Checksum verified. Checksum is $COMPUTED_CHECKSUM."
+fi
+
+echo -n "Unpacking upstream tarball..."
+tar -xzf $MEDIATOMB_TARBALL
+echo "done."
+
+echo -n "Removing problematic files from upstream tarball..."
+rm mediatomb-$MEDIATOMB_VERSION/tombupnp/upnp/src/inc/upnp_md5.h
+rm mediatomb-$MEDIATOMB_VERSION/tombupnp/upnp/src/uuid/upnp_md5.c
+echo "done."
+
+echo -n "Generating orig source tarball..."
+tar -czf mediatomb_$MEDIATOMB_VERSION.dfsg1.orig.tar.gz \
+ mediatomb-$MEDIATOMB_VERSION
+echo "done."
+
+if [ $REMOVE_ORIG_DIR ]; then
+ echo -n "Removing unpacked upstream source directory..."
+ rm -rf mediatomb-$MEDIATOMB_VERSION
+ echo "done."
+fi
+if [ $REMOVE_UPSTREAM_TARBALL ]; then
+ echo -n "Removing upstream source tarball..."
+ rm $MEDIATOMB_TARBALL
+ echo "done."
+fi
--- mediatomb-0.10.0.dfsg1.orig/debian/watch
+++ mediatomb-0.10.0.dfsg1/debian/watch
@@ -0,0 +1,12 @@
+# format version number, currently 3; this line is compulsory!
+version=3
+
+# mediatomb source download link from sourceforge.net
+opts=uversionmangle=s/\.\?.*// \
+http://downloads.sourceforge.net/mediatomb/mediatomb-(.*)\.tar\.gz(.*) \
+ 0.10.0
+
+# Different check for mediatomb source, provided by uscan man page
+http://sf.net/mediatomb/ \
+ mediatomb-(.*)\.tar\.gz \
+ 0.10.0
--- mediatomb-0.10.0.dfsg1.orig/debian/mediatomb-daemon.postinst
+++ mediatomb-0.10.0.dfsg1/debian/mediatomb-daemon.postinst
@@ -0,0 +1,14 @@
+#!/bin/sh -e
+
+if ! dpkg-statoverride --list /etc/mediatomb/config.xml >/dev/null 2>&1
+then
+ dpkg-statoverride --update --add mediatomb mediatomb 644 /etc/mediatomb/config.xml
+fi
+if ! dpkg-statoverride --list /var/lib/mediatomb >/dev/null 2>&1
+then
+ dpkg-statoverride --update --add mediatomb mediatomb 755 /var/lib/mediatomb
+fi
+
+#DEBHELPER#
+
+exit 0
--- mediatomb-0.10.0.dfsg1.orig/debian/TODO.Debian
+++ mediatomb-0.10.0.dfsg1/debian/TODO.Debian
@@ -0,0 +1,34 @@
+Here's a list of issues brought up by Paul Wise .
+
+This is not a complete list as some of the issues are being resolved.
+--------------------------------------------------------------------------
+
+src/uuid looks like a copy of libuuid, if your package gets uploaded,
+please notify the security team that your package contains an embedded
+copy of libuuid. Please also suggest to upstream that they remove it
+from the source and instead depend on an external libuuid from
+http://sourceforge.net/projects/e2fsprogs for example.
+
+Same for tombupnp, that looks like a modified copy of libupnp, try to
+get that merged into upstream libupnp: http://pupnp.sourceforge.net/
+
+You also embed external JS libraries (each one js file), I'm not sure
+what debian policy about that is, although we now have fckeditor in
+the archive, so maybe package them up so other packages can depend on
+them? Might want to bring this up on the debian-webapps list.
+
+Do you have access to upstream SVN? If so, I suggest moving the
+.desktop file there so other distros may benefit from it too.
+Obviously you'd also need to add a ./configure flag so that
+distributions can choose which web browser to launch. Possibly the
+same for debian/config.xml.inst, but I'm not too sure about that.
+
+--------------------------------------------------------------------------
+
+Other TODOs, some of which are not Debian specific but still worth mentioning.
+--------------------------------------------------------------------------
+Convert from using PNG Behavior fix from WebFX to using IE PNG Fix delivered by
+TwinHelix. (http://www.twinhelix.com/css/iepngfix/)
+
+Ensure that the WebUI works under any Mozilla based browser. There's a known
+problem with the WebUI under Konqueror.
--- mediatomb-0.10.0.dfsg1.orig/debian/mediatomb-daemon.mediatomb.default
+++ mediatomb-0.10.0.dfsg1/debian/mediatomb-daemon.mediatomb.default
@@ -0,0 +1,28 @@
+# Defaults for MediaTomb initscript
+# sourced by /etc/init.d/mediatomb
+# installed at /etc/default/mediatomb by the maintainer scripts
+
+#
+# This is a POSIX shell fragment
+#
+
+# Set whether the daemon should be started. Set this value to anything
+# but 'yes' to enable the daemon
+NO_START="yes"
+
+# Additional options that are passed to the daemon.
+OPTIONS=""
+
+# The network interface for MediaTomb to bind to and for which the multicast
+# routing entry should be added; "" if the route shouldn't be added at all.
+# For example: INTERFACE="eth0"
+INTERFACE=""
+
+# The route command and arguments to be used if INTERFACE is defined.
+# These variables should normally be left unmodified.
+ROUTE_ADD="/sbin/route add -net 239.0.0.0 netmask 255.0.0.0"
+ROUTE_DEL="/sbin/route del -net 239.0.0.0 netmask 255.0.0.0"
+
+# The user and group that MediaTomb should be run as.
+USER="mediatomb"
+GROUP="mediatomb"
--- mediatomb-0.10.0.dfsg1.orig/debian/README.Debian
+++ mediatomb-0.10.0.dfsg1/debian/README.Debian
@@ -0,0 +1,7 @@
+RSA MD5 Code Replacement
+--------------------------------------------------------------------------
+Upstream had delivered two files tombupnp/upnp/src/uuid/upnp_md5.c and
+tombupnp/upnp/src/inc/upnp_md5.h that contained code made by RSA Data
+Security, Inc. Their license is not DFSG so the MD5 code was replaced with
+the MD5 code used for dpkg. The RSA code is entirely removed from the orig
+tarball and the dpkg code is patched in during build time.
--- mediatomb-0.10.0.dfsg1.orig/debian/mediatomb-daemon.install
+++ mediatomb-0.10.0.dfsg1/debian/mediatomb-daemon.install
@@ -0,0 +1,2 @@
+etc/mediatomb/config.xml
+var/lib/mediatomb
--- mediatomb-0.10.0.dfsg1.orig/debian/compat
+++ mediatomb-0.10.0.dfsg1/debian/compat
@@ -0,0 +1 @@
+4
--- mediatomb-0.10.0.dfsg1.orig/debian/mediatomb.install
+++ mediatomb-0.10.0.dfsg1/debian/mediatomb.install
@@ -0,0 +1,3 @@
+debian/mediatomb.xpm usr/share/pixmaps
+debian/mediatomb.desktop usr/share/applications
+debian/mediatomb.override usr/share/lintian/overrides
--- mediatomb-0.10.0.dfsg1.orig/debian/copyright
+++ mediatomb-0.10.0.dfsg1/debian/copyright
@@ -0,0 +1,263 @@
+This package was debianized by Leonhard Wimmer on
+Sun, 1 Apr 2007 15:30:11 +0200
+
+It was later redebianized by Andres Mejia on
+Fri, 28 Dec 2007 16:45:04 -0500
+
+It was downloaded from http://mediatomb.cc/
+
+Two files (tombupnp/upnp/src/uuid/upnp_md5.c tombupnp/upnp/src/inc/upnp_md5.h)
+are removed from the upstream source tarball because of their problematic
+license. They are replaced with the MD5 implementation from dpkg. See the
+README.Debian file for more details.
+
+Files: debian/*
+Copyright: (C) 2007 Leonhard Wimmer
+ (C) 2007 Andres Mejia
+License: GPL-2
+ The Debian packaging information is under the GPL, version 2.
+
+Files: debian/extras/manpage.xml
+Copyright: (C) 2007 Leonhard Wimmer
+License: GPL-2
+ This is the docbook source used to generate the mediatomb manpage. It can be
+ found in
+ http://mediatomb.svn.sourceforge.net/viewvc/*checkout*/mediatomb/trunk/mediatomb/doc/manpage.xml?revision=1397&content-type=text%2Fplain&pathrev=1397
+
+Files: source/uuid/*
+Copyright: (C) 1996, 1997, 1998 Theodore Ts'o.
+License: LGPL-any
+ uuid from E2fsprogs 1.35. Some functions from the UPnP SDK were
+ conflicting with libuuid, so the sources had to be taken in and some
+ renaming needed to be done.
+
+Files: src/md5/md5.c
+Copyright: (C) 1999 Aladdin Enterprises. All rights reserved.
+License: other
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ L. Peter Deutsch
+ ghost@aladdin.com
+
+ Independent implementation of MD5 (RFC 1321).
+
+ This code implements the MD5 Algorithm defined in RFC 1321.
+ It is derived directly from the text of the RFC and not from the
+ reference implementation.
+
+ The original and principal author of md5.c is L. Peter Deutsch
+ . Other authors are noted in the change history
+ that follows (in reverse chronological order):
+
+ 1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
+ 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5).
+ 1999-05-03 lpd Original version.
+
+Files: src/md5/md5.h
+Copyright: (C) 1999 Aladdin Enterprises. All rights reserved.
+License: other
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ L. Peter Deutsch
+ ghost@aladdin.com
+
+ Independent implementation of MD5 (RFC 1321).
+
+ This code implements the MD5 Algorithm defined in RFC 1321.
+ It is derived directly from the text of the RFC and not from the
+ reference implementation.
+
+ The original and principal author of md5.h is L. Peter Deutsch
+ . Other authors are noted in the change history
+ that follows (in reverse chronological order):
+
+ 1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
+ 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5);
+ added conditionalization for C++ compilation from Martin
+ Purschke .
+ 1999-05-03 lpd Original version.
+
+Files: tombupnp/upnp/src/uuid/upnp_md5.c tombupnp/upnp/src/inc/upnp_md5.h
+Copyright: Public Domain
+License: public domain
+ The code used in these files come directly from dpkg.
+
+ This code implements the MD5 message-digest algorithm.
+ The algorithm is due to Ron Rivest. This code was
+ written by Colin Plumb in 1993, no copyright is claimed.
+ This code is in the public domain; do with it what you wish.
+
+ Equivalent code is available from RSA Data Security, Inc.
+ This code has been tested against that, and is equivalent,
+ except that you don't need to include two pages of legalese
+ with every copy.
+
+ To compute the message digest of a chunk of bytes, declare an
+ MD5Context structure, pass it to MD5Init, call MD5Update as
+ needed on buffers full of bytes, and then call MD5Final, which
+ will fill a supplied 16-byte array with the digest.
+
+ Changed so as no longer to depend on Colin Plumb's `usual.h' header
+ definitions; now uses stuff from dpkg's config.h.
+ - Ian Jackson .
+ Still in the public domain.
+
+Files: web/js/md5.js
+Copyright: (C) Paul Johnston 1999 - 2002
+License: BSD-3
+ A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
+ Digest Algorithm, as defined in RFC 1321.
+ Version 2.1 Copyright (C) Paul Johnston 1999 - 2002.
+ Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+ Distributed under the BSD License
+ See http://pajhome.org.uk/crypt/md5 for more info.
+
+ The BSD license used for this file is given at
+ http://pajhome.org.uk/site/legal.html#bsdlicense.
+
+Files: web/js/prototype.js
+Copyright: (C) 2005-2007 Sam Stephenson
+License: other
+ Prototype is freely distributable under the terms of an MIT-style license.
+ For details, see the Prototype web site: http://www.prototypejs.org/
+
+ A copy of the license can be downloaded from
+ http://dev.rubyonrails.org/browser/spinoffs/prototype/trunk/LICENSE?format=raw
+ This is a copy of the license found on the website:
+ Copyright (c) 2005-2007 Sam Stephenson
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
+
+Files: web/js/nanotree.js
+Copyright: (C) 2003 Martin Mouritzen
+ (C) 2006 by Leonhard Wimmer (leo@mediatomb.org)
+License: LGPL-any
+ File header does not specify a year for original author however CVS entry in
+ Sourceforge specifies that file was last modified sometime in April 2003.
+ More changes were made later by Leonhard Wimmer.
+
+ (heavily modified version of) NanoTree http://nanotree.sourceforge.net/.
+ According to http://nanotree.sourceforge.net/ this file is published under
+ the LGPL License
+
+Files: web/js/pngbehavior.htc
+Copyright: (C) 2002-2004 Erik Arvidsson
+ (http://webfx.eae.net/contact.html#erik)
+License: other
+ usage details are located at http://webfx.eae.net/license.html
+
+ From the website:
+ The PNG Behavior does not require any license. You may use it in any way you
+ see fit as long as credit is given where credit is due. In other words,
+ don't claim you create it and don't try to make money directly from it.
+
+Files: tombupnp/*
+Copyright: (C) 2000-2003 Intel Corporation
+ (C) 2006-2007 Sergey 'Jin' Bostandzhyan
+License: BSD-3 | LGPL-2.1
+ tombupnp is based on pupnp (http://pupnp.sf.net) which is based on libupnp
+ (http://upnp.sf.net), originally distributed under the BSD license,
+ Copyright (c) 2000-2003 Intel Corporation. Note that all changes to libupnp
+ /pupnp code that were made by the MediaTomb team are covered by the LGPL
+ license.
+
+Files: acinclude.m4
+Copyright: (C) 2006 Steven G. Johnson
+License: GPL-2+
+ ACX_PTHREAD autoconf script from http://autoconf-archive.cryp.to/
+
+Files: src/inotify-nosys.h
+Copyright: (C) 2005 John McCutchan
+ (C) 2006 Rohan McGovern
+License: GPL-2+
+ This header is found in inotify-tools which can be downloaded from
+ http://inotify-tools.sourceforge.net/.
+
+Files: src/mt_inotify.cc
+Copyright: (C) 2006 Rohan McGovern
+ (C) 2005-2007 Gena Batyan
+ (C) 2005-2007 Sergey 'Jin' Bostandzhyan
+ (C) 2006-2007 Leonhard Wimmer
+License: GPL-2
+ This file was primarily written by the Mediatomb developers. The original
+ version of the next_events function was taken from inotify-tools.
+
+Files: *
+Copyright: (C) 2005-2007 Gena Batyan
+ (C) 2005-2007 Sergey 'Jin' Bostandzhyan
+ (C) 2006-2007 Leonhard Wimmer
+License: GPL-2
+ All other files that have not been mentioned above were developed by the
+ main Mediatomb developers. Some small contributions have been made to
+ Mediatomb and the contributors are noted in the README file.
+
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License version 2
+ as published by the Free Software Foundation.
+
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ version 2 along with MediaTomb; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+
+Below is the locations on any Debian system for the complete text of some of the licenses used in this package.
+
+The complete text of the GNU General Public License can be found in
+`/usr/share/common-licenses/GPL'.
+
+The complete text of the GNU General Public License, version 2 can be found in
+`/usr/share/common-licenses/GPL-2'.
+
+The complete text of the GNU Lesser General Public License can be found in
+`/usr/share/common-licenses/LGPL'.
+
+The complete text of the GNU Lesser General Public License, version 2.1 can be
+found in `/usr/share/common-licenses/LGPL-2.1'.
+
+The complete text of the Berkeley Software Distribution license can be
+found in `/usr/share/common-licenses/BSD'.
--- mediatomb-0.10.0.dfsg1.orig/debian/mediatomb-daemon.mediatomb.init
+++ mediatomb-0.10.0.dfsg1/debian/mediatomb-daemon.mediatomb.init
@@ -0,0 +1,207 @@
+#! /bin/sh
+#
+# MediaTomb initscript
+#
+# Original Author: Tor Krill .
+# Modified by: Leonhard Wimmer
+# Modified again by Andres Mejia to
+# base it off of /etc/init.d/skeleton
+#
+#
+
+### BEGIN INIT INFO
+# Provides: mediatomb
+# Required-Start: $all
+# Required-Stop: $all
+# Should-Start: $all
+# Should-Stop: $all
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: upnp media server
+### END INIT INFO
+
+# Do NOT "set -e"
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
+DESC="upnp media server"
+NAME=mediatomb
+DAEMON=/usr/bin/$NAME
+PIDFILE=/var/run/$NAME.pid
+LOGFILE=/var/log/$NAME.log
+SCRIPTNAME=/etc/init.d/$NAME
+DEFAULT=/etc/default/$NAME
+
+# Exit if the package is not installed
+[ -x "$DAEMON" ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r $DEFAULT ] && . $DEFAULT
+
+# Load the VERBOSE setting and other rcS variables
+[ -f /etc/default/rcS ] && . /etc/default/rcS
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
+. /lib/lsb/init-functions
+
+# Start the daemon if NO_START is disabled in DEFAULT
+if [ "$NO_START" = "yes" ]; then
+ test "$1" = "start" && \
+ {
+ log_warning_msg "$NAME: Not starting $DESC."
+ log_warning_msg "$NAME: Disabled in $DEFAULT."
+ }
+ exit 0
+fi
+
+# Run as root if USER not specified
+if [ ! $USER ]; then
+ USER=root
+fi
+
+# Check for an invalid user or one without a home directory
+eval USERHOME=~$USER
+if [ "${USERHOME#/}" = "${USERHOME}" ]; then
+ log_failure_msg "$NAME: The user '$USER' specified in $DEFAULT is invalid."
+ exit 1
+fi
+
+# Last option will not be needed after release 0.10.0.
+DAEMON_ARGS="-c /etc/mediatomb/config.xml -d -u $USER -g $GROUP -P $PIDFILE -l $LOGFILE $INTERFACE $OPTIONS -m $USERHOME"
+
+#
+# Function that starts the daemon/service.
+#
+do_start() {
+ # Return
+ # 0 if daemon has been started
+ # 1 if daemon was already running
+ # 2 if daemon could not be started
+ touch $PIDFILE
+ chown $USER:$GROUP $PIDFILE
+ touch $LOGFILE
+ chown $USER:$GROUP $LOGFILE
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON \
+ --test > /dev/null \
+ || return 1
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
+ $DAEMON_ARGS \
+ || return 2
+}
+
+#
+# Function that stops the daemon/service.
+#
+do_stop() {
+ # Return
+ # 0 if daemon has been stopped
+ # 1 if daemon was already stopped
+ # 2 if daemon could not be stopped
+ # other if a failure occurred
+ start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
+ RETVAL="$?"
+ [ "$RETVAL" = 2 ] && return 2
+ rm -f $PIDFILE
+ return "$RETVAL"
+}
+
+#
+# Function that sends a SIGHUP to the daemon/service.
+#
+do_reload() {
+ start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
+ return 0
+}
+
+case "$1" in
+ start)
+ if [ -n "$INTERFACE" ]; then
+ # try to add the multicast route
+ if [ "$VERBOSE" != no ]; then
+ {
+ log_action_begin_msg \
+ "$NAME: Trying to add the multicast route"
+ $ROUTE_ADD $INTERFACE \
+ && log_action_end_msg 0
+ } || {
+ true && \
+ log_warning_msg "Failed to add multicast route. skipping."
+ }
+ else
+ $ROUTE_ADD $INTERFACE >/dev/null 2>&1 || true
+ fi
+ fi
+ log_daemon_msg "Starting $DESC" "$NAME"
+ do_start
+ case "$?" in
+ 0) log_end_msg 0 ;;
+ 1) log_warning_msg "$DESC" "'$NAME'" "was already started" ;;
+ 2) log_end_msg 1 ;;
+ esac
+ ;;
+ stop)
+ log_daemon_msg "Stopping $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0)
+ log_end_msg 0
+ if [ -n "$INTERFACE" ]; then
+ # try to add the multicast route
+ if [ "$VERBOSE" != no ]; then
+ {
+ log_action_begin_msg \
+ "$NAME: Trying to delete the multicast route"
+ $ROUTE_DEL $INTERFACE \
+ && log_action_end_msg 0
+ } || {
+ true && \
+ log_warning_msg \
+ "Failed to delete multicast route. skipping."
+ }
+ else
+ $ROUTE_DEL $INTERFACE >/dev/null 2>&1 || true
+ fi
+ fi
+ ;;
+ 1) log_warning_msg "$DESC" "'$NAME'" "was already stopped" ;;
+ 2) log_end_msg 1 ;;
+ esac
+ ;;
+ reload|force-reload)
+ log_daemon_msg "Reloading $DESC" "$NAME"
+ do_reload
+ log_end_msg $?
+ ;;
+ restart)
+ #
+ # If the "reload" option is implemented, move the "force-reload"
+ # option to the "reload" entry above. If not, "force-reload" is
+ # just the same as "restart".
+ #
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1)
+ sleep 1
+ do_start
+ case "$?" in
+ 0) log_end_msg 0 ;;
+ 1) log_end_msg 1 ;; # Old process is still running
+ *) log_end_msg 1 ;; # Failed to start
+ esac
+ ;;
+ *)
+ # Failed to stop
+ log_end_msg 1
+ ;;
+ esac
+ ;;
+ *)
+ #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+ exit 3
+ ;;
+esac
+
+: