debian/0000775000000000000000000000000012257735247007206 5ustar debian/mediatomb.README.Debian0000664000000000000000000000045112257721415013177 0ustar The package "mediatomb" simply installs the desktop file to access the web ui and also acts as a virtual package that will install the main mediatomb packages that contain the program, and the mediatomb init scripts. The main documentation for mediatomb is under /usr/share/doc/mediatomb-common. debian/rules0000775000000000000000000000276512257722425010272 0ustar #!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. # export DH_VERBOSE=1 ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) MEDIATOMB_DEBUG_OPTIONS += --enable-debug-malloc0 \ --enable-tombdebug \ --enable-upnpdebug \ --enable-debug-log endif # 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 ?= --enable-sqlite3 \ --enable-mysql \ --disable-libjs \ --enable-libmagic \ $(ENABLE_INOTIFY) \ --enable-libexif \ --enable-taglib \ --enable-ffmpeg \ --enable-ffmpegthumbnailer \ --enable-external-transcoding \ --enable-curl \ --enable-youtube \ --enable-db-autocreate \ --disable-id3lib \ --disable-libmp4v2 \ --disable-libextractor \ --disable-lastfmlib \ $(MEDIATOMB_DEBUG_OPTIONS) override_dh_auto_configure: dh_auto_configure -- $(MEDIATOMB_CONFIG_OPTIONS) override_dh_installinit: dh_installinit --name=mediatomb override_dh_installlogrotate: dh_installlogrotate --name=mediatomb override_dh_strip: dh_strip --dbg-package=mediatomb-dbg override_dh_clean: rm -f config.log dh_clean get-orig-source: # Use external script $(dir $_)mediatomb-get-orig-source %: dh $@ --with autoreconf debian/watch0000664000000000000000000000042512257721445010233 0ustar version=3 # Here we watch for a release after 0.11.0 opts=uversionmangle=s/\.(tar.*|tgz|zip|gz|bz2)$//i,dversionmangle=s/[-.+~]?(cvs|svn|git|snapshot|pre|hg)(.*)$//i,pasv \ http://sf.net/mediatomb/mediatomb-?_?([\d+\.]+|\d+)\.(tar.*|tgz|zip|gz|bz2|) \ debian \ uupdate debian/mediatomb-daemon.install0000664000000000000000000000004112257721445013766 0ustar debian/config.xml etc/mediatomb/ debian/Readme.source0000664000000000000000000000046312257721445011623 0ustar Source package information for mediatomb ------------------------------------------ * To build mediatomb using DEB_BUILD_OPTIONS="nostrip" it's required to have a libmozjs185 that was built using "--enable-debug". -- Miguel A. Colón Vélez Sun, 25 Mar 2012 00:54:20 -0400 debian/mediatomb-get-orig-source0000775000000000000000000000263612257721445014110 0ustar #!/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.12.1.tar.gz" MEDIATOMB_TARBALL_CHECKSUM="31163c34a7b9d1c9735181737cb31306f29f1f2a0335fb4f53ecccf8f62f11cd" MEDIATOMB_VERSION="0.12.1" USAGE="\n\ This script is used to generate the orig tarball used in building\n\ Debian packages for mediatomb-$MEDIATOMB_VERSION.\n\ Usage: mediatomb-get-orig-source [OPTION]\n\ \n\ -h, --help Display this help message.\n" while [ "$#" -gt "0" ] do case "$1" in -h|--help) echo "${USAGE}" exit 1 ;; esac done make_current_tarball() { # Download the tarball if it's not available in the current directory [ -f $MEDIATOMB_TARBALL ] || \ wget -c http://downloads.sourceforge.net/mediatomb/$MEDIATOMB_TARBALL # Verify the checksum COMPUTED_CHECKSUM=`sha256sum $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 mv $MEDIATOMB_TARBALL mediatomb_$MEDIATOMB_VERSION.orig.tar.gz } make_current_tarball debian/changelog0000664000000000000000000005564112257735242011066 0ustar mediatomb (0.12.1-5ubuntu2) trusty; urgency=medium * I brilliantly forgot to upload the proper changelog I had written. Below: * Merge from Debian unstable. Remaining changes: - debian/control: + Don't build-depend on libmozjs-dev. + Add OR depends on abrowser. - debian/{mediatomb-daemon.mediatomb.upstart,rules}: Introduce upstart support to fix start-on-boot failure. - debian/mediatomb-daemon.postinst: Give executable bit to complete upstart support. - debian/rules: Disable JS support. * Drop all Ubuntu-only patches. -- Logan Rosen Sun, 29 Dec 2013 01:00:23 -0500 mediatomb (0.12.1-5ubuntu1) trusty; urgency=medium * Merge. -- Logan Rosen Sat, 28 Dec 2013 23:22:35 -0500 mediatomb (0.12.1-5) unstable; urgency=low * Team upload. [ Hector Oron ] * Fix build against libmp4v2. (Closes: #677958) * Remove config.log file upon cleanup. [ Sebastian Ramacher ] * debian/patches/0011_libav_9_support.patch: Apply patch from Jona Schuman to port mediatomb to libav 9 API. Thanks to Jona Schuman for the patch (Closes: #677959) * debian/control: - Remove obsolete Dm-Upload-Allow. The archive software ignores it. - Build-Depends: Bump libavformat-dev to >= 6:9. - Vcs-*: Use canonical locations. - Bump Standards-Version to 3.9.4. -- Sebastian Ramacher Thu, 19 Sep 2013 15:16:50 +0200 mediatomb (0.12.1-4) unstable; urgency=low * Bump debhelper and the compatibility level to 9. - Enables hardened build flags. * debian/control: - Remove Andres Mejia from the uploaders list. - Bump Standards-Version to 3.9.3. - mediatomb-daemon depends on lsb-base (>= 3.2-14). - Create the mediatomb-dbg package. * debian/rules: - Simplify the rules file. - Remove deprecated mediatomb configuration options. * debian/patches/*: - Update the copyObject function to avoid segfaults with js 1.8. (Closes: #664967) - Fix the spelling errors mentioned by lintian. - Add Ubuntu's patch to properly parse the bitrate and the number of audio channels. * debian/mediatomb-daemon.mediatomb.init: - Add a Description LSB keyword to the init script. - Implement the status option in the init script. * debian/*: - Update the lintian overrides. - Use set -e in the body of the maintainer scripts. - Remove the references to the versionless symlinks (GPL/LGPL) in the copyright file. - Add a Readme.source file to explain the requirements needed to be able to use DEB_BUILD_OPTIONS=nostrip. - Update my name in various files. -- Miguel A. Colón Vélez Sat, 14 Apr 2012 02:34:34 -0400 mediatomb (0.12.1-3) unstable; urgency=low [ Arnout Engelen ] * Build with recent versions of ffmpeg. (Closes: #509918, #589208) * Force removal of old /etc/init.d/mediatomb scripts. Fixes #577619 [ Miguel Colon ] * Team upload. * Fix a FTBFS when using gcc-4.6. (Closes: #624921) * Fix a FTBFS by porting to spidermonkey 1.8: - Fix a failure to categorize media files with the new js. - Build depend on libmozjs185-dev instead of libmozjs-dev. - Add detection for -lmozjs185 during the configure script. - Use dh-autoreconf instead of patching the results of an old autoreconf. - (Closes: #652534, #631046, #642578, #661149) * Fixed upstream by adding -lz. (Closes: #555594) * Fixed upstream in svn r2034 and already in 0.12.1. (Closes: #572701) * Fix a FTBFS when using gcc-4.7. * Fix a crash triggered by files with length > 999 hours. * Most of the patches originate from the Fedora mediatomb maintainers. Thanks go to them. [ Hector Oron ] * Drop -fpermissive from js_1.8_support.patch, as it makes unapply patches to fail after build has finalized. * Re-introduce mediatomb into Debian (Closes: #663456). * Add Miguel Colon and myself to uploaders. -- Hector Oron Sun, 11 Mar 2012 15:18:01 +0100 mediatomb (0.12.1-2) unstable; urgency=low * Team upload. * Upload to unstable. * new upstream release explicitly adds -lz during build. (Closes: #614956) * move user creation scripts from preinst to postinst to avoid pre-dependency on adduser -- Reinhard Tartler Thu, 24 Feb 2011 21:11:18 +0100 mediatomb (0.12.1-1) experimental; urgency=low * New upstream release. (Closes: #579316) * Update patches that are to be applied, resolve changes from new upstream source. * Refresh all patches. * Disable lastfm scrobbling support for now since lastfmlib is not in Debian. * Update Standards-Version to 3.9.1. * Update copyright file to include full text of various BSD licenses. * Update watch file for new release. * Rotate mediatomb log file weekly for 12 weeks. (Closes: #574685) -- Andres Mejia Sun, 12 Sep 2010 00:42:53 -0400 mediatomb (0.12.1-0ubuntu6) trusty; urgency=low * import 0011_libav_9_support.patch from debian -- Dmitrijs Ledkovs Fri, 22 Nov 2013 13:01:14 +0000 mediatomb (0.12.1-0ubuntu5) quantal; urgency=low * import gcc_4.{6,7}_support.patch from debian -- Julian Taylor Fri, 05 Oct 2012 11:04:25 +0200 mediatomb (0.12.1-0ubuntu4) precise; urgency=low * Rebuild for libmysqlclient transition -- Clint Byrum Wed, 23 Nov 2011 23:55:08 -0800 mediatomb (0.12.1-0ubuntu3) precise; urgency=low * debian/patches/fix-ffmpeg-metadata.patch: properly parse the bitrate and the number of audio channels. (LP: #875098) -- Marc Deslauriers Sun, 16 Oct 2011 18:14:27 -0400 mediatomb (0.12.1-0ubuntu2) oneiric; urgency=low * Introduce Upstart support to fix start-on-boot failure (LP: #212441) * Fix build gcc-4.6 build failure (missing correct header) (LP: #770964) * Added libav 0.7 support (LP: #784431) -- Daniel van Vugt Sun, 15 May 2011 23:09:43 +0800 mediatomb (0.12.1-0ubuntu1) maverick; urgency=low * New upstream release (LP: #553269) + Drop patches applied upstream: - drop debian/patches/service-id_fix.patch - drop debian/patches/ffmpegthumbnailer-2.0.patch - drop debian/patches/autoreconf_-fi.patch + Refresh patch due to upstream changes - update debian/patches/const_char_conversion.patch * Merge from debian unstable. Remaining changes: - debian/control: + Don't depend on libmozjs-dev + Add OR depends on abrowser - debian/rules: Disable js support - fix LP: #569763 - mediatomb allows anyone to browse and export the whole filesystem -- Micah Gersten Wed, 25 Aug 2010 17:07:03 -0500 mediatomb (0.12.0~svn2018-6.1) unstable; urgency=low * Non-maintainer upload. * Disable user interface (Closes: #580120) -- Alexander Reichle-Schmehl Fri, 16 Jul 2010 15:52:21 +0200 mediatomb (0.12.0~svn2018-6ubuntu3) maverick; urgency=low * No change rebuild for libavutil49 → libavutil50 transition -- Iain Lane Sun, 11 Jul 2010 11:42:16 +0100 mediatomb (0.12.0~svn2018-6ubuntu2) lucid; urgency=low * debian/rules: - Disable spidermonkey support (LP: #536643) * debian/control: - Don't build-depend on libmozjs-dev -- Chris Coulson Wed, 14 Apr 2010 17:04:10 +0100 mediatomb (0.12.0~svn2018-6ubuntu1) lucid; urgency=low * Merge from debian unstable, Ubuntu remaining changes: - Add OR depends on abrowser. -- Lionel Le Folgoc Mon, 22 Feb 2010 20:16:31 +0100 mediatomb (0.12.0~svn2018-6) unstable; urgency=low * Allow mediatomb to build against ffmpegthumbnailer 2.0 library. (Closes: #568961) * Bump Standards-Version to 3.8.4. * Switch to source format 3.0 (quilt). * Build-Depend on debhelper (7.0.50~). * Fix init script dependencies. (Closes: #567442, #547794). * Fix mappings for matroska files in config.xml. (Closes: #544039) * Fix mappings for ogg files in config.xml. (Closes: #558696) * Remove unneeded lintian override for libjs-prototype usage. * Confirmed that mediatomb is unaffected by new magic_load() function change. (Closes: #501586) * Add description to const_char_conversion.patch. * Update config.xml example configuration. * Disable libdvdnav feature as it's not complete. * Add documentation in package "mediatomb" that references documentation in package "mediatomb-common". (Closes: #546498) -- Andres Mejia Wed, 10 Feb 2010 18:50:05 -0500 mediatomb (0.12.0~svn2018-5) unstable; urgency=medium [ Mehdi Dogguy ] * Non-maintainer upload. * Fix FTBFS due to invalid string constant to char* conversion in src/tools.cc (added const_char_conversion.patch) (Closes: #560468) * Fix non-uninstallability of mediatomb-daemon, thanks to Raul Sanchez Siles for the hint (Closes: #562372) * Fix security issue in prototype.js (CVE-2008-7720 and CVE-2007-2383) by using the one from the Debian package libjs-prototype (Closes: #555232, #555233, #475279) + set urgency to medium + Make mediatomb-common depend on libjs-prototype + Set a symbolic link to prototype.js using mediatomb-common.links -- Andres Mejia Thu, 04 Feb 2010 08:57:05 -0500 mediatomb (0.12.0~svn2018-4ubuntu2) lucid; urgency=low * rebuild for ffmpeg versioned symbols -- Reinhard Tartler Tue, 19 Jan 2010 21:29:50 +0100 mediatomb (0.12.0~svn2018-4ubuntu1) karmic; urgency=low * Merge from debian unstable, Ubuntu remaining changes: - Add OR depends on abrowser. * Add glibc-2.10_fix.patch patch to prevent FTBFS with glibc-2.10. * debian/config.xml.dist: Allow playing the mkv files that haven't "video/x-matroska" as mimetype (LP: #417533). -- Alessio Treglia Fri, 28 Aug 2009 11:06:18 +0200 mediatomb (0.12.0~svn2018-4) unstable; urgency=low [ Andreas Henriksson ] * debian/mediatomb-daemon.postinst: avoid trying (and failing!) to migrate database and purge rc.d scripts on clean installs, only do it on upgrades. (Also make sure the db file exists before trying to copy it for extra safety.) Thanks goes to all the people who commented on the bug! (Closes: #527566) [ Andres Mejia ] * Fix wrong namespace used for service-id attribute. (Closes: #535255) * Use patch instead of running autotools to generate changes to build system. * Ensure configure and other autotools generated scripts are executable. * Update packaging to take advantage of new features in debhelper 7. * Update override for watch file. * Add ${misc:Depends} for Depends field in binary packages. * Update Build-Depends for debhelper to 7 and quilt to 0.46-7. * Bump Standards-Version to 3.8.2. * Remove Build-Depends of automake since it's no longer needed. * Make some cosmetic changes to debian/control. -- Andres Mejia Wed, 05 Aug 2009 23:50:50 -0400 mediatomb (0.12.0~svn2018-3ubuntu1) karmic; urgency=low * Merge from debian unstable, remaining changes: - Packages that Depend/Recommend/Suggest firefox (meta-package) must alternatively Depend/Recommend/Suggest abrowser. -- Alessio Treglia Sun, 10 May 2009 23:17:08 +0200 mediatomb (0.12.0~svn2018-3) unstable; urgency=low * Fix minor typo in mediatomb-transcode script. * Show what was passed to DEB_BUILD_OPTIONS in debian/rules. * Fix CFLAGS, CXXFLAGS, and LDFLAGS that were getting overridden by dpkg-buildpackage. * Update watch file to watch for new releases after 0.11.0. * Change Maintainer field to Debian multimedia team. Move myself down to Uploaders field. * Update Vcs-* entries for where packaging will be held in new location. * Update comment in postinst script. * Add lintian override for debian-watch-file-specifies-old-upstream-version warning. -- Andres Mejia Fri, 08 May 2009 20:10:24 -0400 mediatomb (0.12.0~svn2018-2ubuntu1) karmic; urgency=low * Merge from debian unstable, Ubuntu remaining changes: - Packages that Depend/Recommend/Suggest firefox (meta-package) must alternatively Depend/Recommend/Suggest abrowser (LP: ##272772). -- Alessio Treglia Tue, 28 Apr 2009 23:08:18 +0200 mediatomb (0.12.0~svn2018-2) unstable; urgency=low * Patch config_manager.cc to generate comment in config.xml. * Also add mappings for matroska in config.xml. * Updated config.xml.dist to reflect what's generated by mediatomb. * Include example config.xml and mediatomb-transcode script in examples. -- Andres Mejia Fri, 24 Apr 2009 20:13:24 -0400 mediatomb (0.12.0~svn2018-1) unstable; urgency=low * New release from svn checkout. * Removed all old patches as they are applied upstream. * Updated mediatomb-get-orig-source script. * Updated options to pass to configure script when building. * Pass debug options when using nostrip DEB_BUILD_OPTIONS. * Update control file for new build dependencies. * Update config.xml file to the new default mediatomb installs. * Add comment in config.xml for location of documentation for configuration files. * Update watch file. * Fix issue where debug mode would not work in the working directory as a user without the proper permissions. * Add function in postinst maintainer script that will copy /var/lib/mediatomb/sqlite3.db to /var/lisb/mediatomb/mediatomb.db. -- Andres Mejia Wed, 22 Apr 2009 21:39:19 -0400 mediatomb (0.11.0-5) unstable; urgency=low * Allow mediatomb to be built against old ffmpeg libraries as well as new ffmpeg libraries. -- Andres Mejia Tue, 07 Apr 2009 18:14:37 -0400 mediatomb (0.11.0-4) unstable; urgency=low * Fix problem where mediatomb won't stop when NO_START was set to yes in /etc/default/mediatomb. (Closes: #488943) * Fix runlevel issue. (Closes: #504119) * Bump Standards-Version to 3.8.1. * Fixed awkward description for mediatomb-common (was lintian warning). * Add override for embedded-javascript-library for now. See bug #475279. * Refreshed patches. * Allow mediatomb to be built against new ffmpeg libraries. (Closes: #521336) * Remove direct check on SourceForge servers for new tarball. Addresses lintian warning. * Update compat to 5. Addresses lintian warning. * Update package description to remove first person summary. Addresses lintian warning. -- Andres Mejia Sun, 05 Apr 2009 16:47:06 -0400 mediatomb (0.11.0-3ubuntu2) jaunty; urgency=low * Added ffmpeg_headers_location.patch to fix ffmpeg headers location, fixes FTBFS (LP: #311180). -- Alessio Treglia Thu, 08 Jan 2009 11:18:48 +0100 mediatomb (0.11.0-3ubuntu1) intrepid; urgency=low * fix LP: #272772: packages that Depend/Recommend/Suggest firefox (meta-package) must alternatively Depend/Recommend/Suggest abrowser - update debian/control -- Fabien Tassin Mon, 22 Sep 2008 03:04:05 +0200 mediatomb (0.11.0-3) unstable; urgency=low * Add check to see if $GROUP is defined and if not, define it as $USER. Closes: #475499 * Fix FTBFS. Closes: #477036 -- Andres Mejia Mon, 21 Apr 2008 20:48:48 -0400 mediatomb (0.11.0-2) unstable; urgency=low * Changing NO_START to "no" in /etc/default/mediatomb for mediatomb-daemon package. -- Andres Mejia Wed, 26 Mar 2008 13:41:02 -0400 mediatomb (0.11.0-1) unstable; urgency=low * New upstream release. * Include message about which inotify headers will be used when enabling inotify runtime support. * Fixed error with use of INTERFACE in init script. Also removed use of -m option. * Including new config.xml options. * Added more build dependencies for new upstream release. * Removed build dependency of libid3-dev, taglib is now preferred. * mediatomb.xpm and manpage.xml is now included in orig tarball. * inotify patch is not needed anymore. * md5 patch has been committed upstream and is no longer needed. Also removed README.Debian. * TwinHelix PNG fix is now used. Removed from TODO. * Adding dependency of iceweasel for mediatomb package. * Updated copyright file. * Updated watch file. * Updated rules file for proper configure options. -- Andres Mejia Sun, 02 Mar 2008 13:09:16 -0500 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 debian/compat0000664000000000000000000000000212257721445010377 0ustar 9 debian/mediatomb-common.examples0000664000000000000000000000002212257721415014157 0ustar debian/examples/* debian/TODO.Debian0000664000000000000000000000312512257721415011050 0ustar 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. -------------------------------------------------------------------------- Ensure that the WebUI works under any Mozilla based browser. There's a known problem with the WebUI under Konqueror. debian/mediatomb-common.manpages0000664000000000000000000000005212257721415014137 0ustar debian/tmp/usr/share/man/man1/mediatomb.1 debian/copyright0000664000000000000000000003346212257721445011144 0ustar 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/ Files: debian/* Copyright: (C) 2007-2008 Leonhard Wimmer (C) 2007-2008 Andres Mejia License: GPL-2 The Debian packaging information is under the GPL, version 2. 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) 1998 - 2009, Paul Johnston & Contributors 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 and is repeated below. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Files: web/js/prototype.js Copyright: (C) 2005-2008 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-2008 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/iepngfix.htc Copyright: (C) 2004-2008 Angus Turnbull http://www.twinhelix.com License: LGPL-2.1+ This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Files: tombupnp/* Copyright: (C) 2000-2003 Intel Corporation (C) 2006-2008 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. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 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-2008 Gena Batyan (C) 2005-2008 Sergey 'Jin' Bostandzhyan (C) 2006-2008 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-2008 Gena Batyan (C) 2005-2008 Sergey 'Jin' Bostandzhyan (C) 2006-2008 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, version 2 can be found in `/usr/share/common-licenses/GPL-2'. The complete text of the GNU Lesser General Public License, version 2.1 can be found in `/usr/share/common-licenses/LGPL-2.1'. debian/source/0000775000000000000000000000000012257723024010474 5ustar debian/source/format0000664000000000000000000000001412257721415011704 0ustar 3.0 (quilt) debian/mediatomb.desktop0000664000000000000000000000033612257721415012534 0ustar [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; debian/mediatomb-daemon.mediatomb.logrotate0000664000000000000000000000015112257721445016262 0ustar "/var/log/mediatomb.log" { weekly rotate 12 missingok postrotate pkill -HUP mediatomb endscript } debian/mediatomb.menu0000664000000000000000000000040512257721415012024 0ustar ?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" debian/mediatomb-daemon.postrm0000664000000000000000000000061412257721445013652 0ustar #!/bin/sh set -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 dpkg-statoverride --remove /etc/mediatomb/config.xml dpkg-statoverride --remove /var/lib/mediatomb deluser mediatomb || true delgroup mediatomb || true fi #DEBHELPER# exit 0 debian/mediatomb-daemon.mediatomb.init0000664000000000000000000001217412257721445015235 0ustar #! /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: $local_fs $network $remote_fs # Required-Stop: $local_fs $network $remote_fs # Should-Start: $all # Should-Stop: $all # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: upnp media server # Description: Debian init script for the 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" ] && [ "$1" != "stop" ]; then 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 # Check if group is not specified and assign a proper group if [ -z $GROUP ]; then GROUP="$USER" fi if [ "$INTERFACE" != "" ] ; then INTERFACE_ARG="-e $INTERFACE" else INTERFACE_ARG="" fi DAEMON_ARGS="-c /etc/mediatomb/config.xml -d -u $USER -g $GROUP -P $PIDFILE -l $LOGFILE $INTERFACE_ARG $OPTIONS" # # 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 ;; status) status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? ;; 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|status|restart|force-reload}" >&2 exit 3 ;; esac : debian/mediatomb-daemon.mediatomb.default0000664000000000000000000000157412257721415015715 0ustar # 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="no" # 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" debian/mediatomb-common.install0000664000000000000000000000004612257721415014015 0ustar usr/bin/mediatomb usr/share/mediatomb debian/mediatomb-daemon.mediatomb.upstart0000664000000000000000000000131712257721415015766 0ustar description "MediaTomb UPnP media server" author "Daniel van Vugt " start on (local-filesystems and net-device-up IFACE!=lo) stop on runlevel [!2345] respawn env CONFIGXML=/etc/mediatomb/config.xml env LOGFILE=/var/log/mediatomb.log env DEFAULT=/etc/default/mediatomb script [ -r $DEFAULT ] && . $DEFAULT [ ! $USER ] && USER=root [ ! $GROUP ] && GROUP=$USER if [ -n "$INTERFACE" ]; then INTERFACE_ARG="-e $INTERFACE" $ROUTE_ADD $INTERFACE fi exec mediatomb \ -c $CONFIGXML \ -u $USER \ -g $GROUP \ -l $LOGFILE \ $INTERFACE_ARG \ $OPTIONS end script post-stop script [ -r $DEFAULT ] && . $DEFAULT if [ -n "$INTERFACE" ]; then $ROUTE_DEL $INTERFACE fi end script debian/mediatomb.install0000664000000000000000000000013212257721445012526 0ustar artwork/mediatomb.xpm usr/share/pixmaps/ debian/mediatomb.desktop usr/share/applications/ debian/mediatomb-daemon.postinst0000775000000000000000000000376612257721445014227 0ustar #!/bin/sh set -e DATADIR=/var/lib/mediatomb # Copies database file from sqlite3.db to mediatomb.db mv_db() { [ ! -e /var/lib/mediatomb/mediatomb.db ] || return 0 [ ! -e /var/lib/mediatomb/sqlite3.db ] || \ cp --preserve /var/lib/mediatomb/sqlite3.db /var/lib/mediatomb/mediatomb.db } case "$1" in configure) # 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 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 # Force removal of previous scripts if upgrading from 0.11.0-3 if [ -n "$2" ] && dpkg --compare-versions "$2" le "0.11.0-3"; then update-rc.d -f mediatomb remove >/dev/null || exit $? fi if [ -n "$2" ] && dpkg --compare-versions "$2" le "0.12.0~svn2018-1"; then mv_db fi esac #DEBHELPER# exit 0 debian/mediatomb-daemon.README.Debian0000664000000000000000000000212512257721415014440 0ustar Upgrading to mediatomb_0.12.0~svn2018-1 -------------------------------------------------------------------------- If you are upgrading mediatomb-daemon to the Debian package version 0.12.0~svn2018-1, the sqlite database file /var/lib/mediatomb/sqlite3.db will be copied to /var/lib/mediatomb/mediatomb.db. This is taken care of by the maintainer scripts. The old sqlite3.db is kept as a backup. -------------------------------------------------------------------------- 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 -------------------------------------------------------------------------- debian/mediatomb.links0000664000000000000000000000011612257721415012177 0ustar /usr/share/mediatomb/web/icons/mt-icon120.png usr/share/pixmaps/mediatomb.png debian/examples/0000775000000000000000000000000012257723024011012 5ustar debian/examples/mediatomb-transcode0000775000000000000000000000635512257721415014674 0ustar #!/bin/sh # This script is used by MediaTomb for transcoding support. # Basic function that will transcode any input file into the target type # 'dvd' ffmpeg supports video_common() { local input="$1" local output="$2" ffmpeg -i "$input" -target dvd -y "$output" } # Basic function that will transcode any input file into the wav format audio_common() { local input="$1" local output="$2" ffmpeg -i "$input" -f wav -y "$output" } # Function to transcode matroska files to dvd compatible format transcode_matroska() { local input="$1" local output="$2" local alang="$3" local slang="$4" # Default to english if languages are not set [ "$alang" ] || alang="eng" [ "$slang" ] || slang="eng" # Use mencoder if available, else fall back to using ffmpeg. # Transcoding using ffmpeg will not include subtitles. if which mencoder >/dev/null 2>&1; then mencoder "$input" -oac lavc -ovc lavc -of mpeg -mc 0 -noskip \ -lavcopts vcodec=mpeg2video:vbitrate=6000:acodec=ac3:abitrate=448 \ -vf harddup -alang "$alang" \ -slang "$slang" -font 'Bitstream Vera Sans' \ -o "$output" else ffmpeg -alang "$alang" -slang "$slang" -i "$input" -target dvd \ -y "$output" fi } # Our "main" function below. USAGE=" This script is used by MediaTomb for transcoding support. It can also serve as a script to transcode various files in a format suitable for streaming directly. Synopsis: mediatomb-transcode [TRANSCODE FUNCTION OPTION] [GENERIC OPTIONS] Generic Options: -h, --help Display this help message. -i, --input Input file that is meant to be transcoded. -o, --output Output file that will be read back by MediaTomb. --audio-lang Specify ISO 639 language code to use for audio. --subtitle-lang Specify ISO 639 language code to use for subtitles. Transcode Function Options (one is required): --video-common Perform generic video transcoding. --audio-common Perform generic audio transcoding. --transcode-matroska Used in transcoding matroska files. " while [ "$#" -gt "0" ] do case "$1" in -i|--input) INPUT="$2" shift; shift; ;; -o|--output) OUTPUT="$2" shift; shift; ;; --video-common) USE_VIDEO_COMMON=1 shift ;; --audio-common) USE_AUDIO_COMMON=1 shift ;; --transcode-matroska) USE_TRANSCODE_MATROSKA=1 shift ;; --audio-lang) ALANG="$2" shift; shift; ;; --subtitle-lang) SLANG="$2" shift; shift; ;; -h|--help|*) echo "${USAGE}" exit 1 ;; esac done # Perform specified function if [ $USE_VIDEO_COMMON ]; then video_common "$INPUT" "$OUTPUT" elif [ $USE_AUDIO_COMMON ]; then audio_common "$INPUT" "$OUTPUT" elif [ $USE_TRANSCODE_MATROSKA ]; then transcode_matroska "$INPUT" "$OUTPUT" "$ALANG" "$SLANG" else # Must specify one transcoding function echo "${USAGE}" exit 1 fi debian/examples/config.xml0000664000000000000000000002012712257721415013005 0ustar MediaTomb /var/lib/mediatomb /usr/share/mediatomb/web mediatomb.db localhost mediatomb mediatomb 128 5 yes no * /usr/share/mediatomb/js/common.js /usr/share/mediatomb/js/playlists.js /usr/share/mediatomb/js/import.js /usr/share/mediatomb/js/import-dvd.js metal audio/L16 no yes no video/mpeg yes yes yes video/mpeg yes yes yes audio/wav no yes no video/mpeg yes yes yes debian/mediatomb-daemon.dirs0000664000000000000000000000002212257721445013260 0ustar var/lib/mediatomb debian/control0000664000000000000000000000764612257722775010630 0ustar Source: mediatomb Section: net Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian multimedia packages maintainers Uploaders: Leonhard Wimmer , Sven Mueller , Miguel A. Colón Vélez , Hector Oron Build-Depends: debhelper (>= 9), dh-autoreconf, libavformat-dev (>= 6:9), libcurl4-gnutls-dev | libcurl3-gnutls-dev, libexif-dev, libexpat-dev, libffmpegthumbnailer-dev, libmagic-dev, libmysqlclient-dev, libsqlite3-dev, libtag1-dev, libz-dev Standards-Version: 3.9.4 Homepage: http://mediatomb.cc/ Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-multimedia/mediatomb.git Vcs-Git: git://anonscm.debian.org/pkg-multimedia/mediatomb.git Package: mediatomb-common Architecture: any Depends: libjs-prototype, ${misc: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 MediaTomb's functionality is extended to cover the optional parts of the spec as well. . This package contains the binary, the manpage, and everything needed for scripting and the web interface. Package: mediatomb-daemon Architecture: all Depends: adduser (>= 3.34), lsb-base (>= 3.2-14), mediatomb-common (>= ${source:Version}), ${misc:Depends} 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 MediaTomb's functionality is extended 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: iceweasel | firefox | abrowser | www-browser, mediatomb-daemon (>= ${source:Version}), ${misc:Depends} 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 MediaTomb's functionality is extended 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. Package: mediatomb-dbg Priority: extra Section: debug Architecture: any Depends: mediatomb-common (= ${binary:Version}), ${misc:Depends} Description: UPnP MediaServer (debug 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 MediaTomb's functionality is extended to cover the optional parts of the spec as well. . This package contains the debugging symbols for mediatomb. debian/docs0000664000000000000000000000007012257721415010046 0ustar README doc/scripting.txt doc/transcoding.txt doc/ui.txt debian/gbp.conf0000664000000000000000000000003612257721445010617 0ustar [DEFAULT] pristine-tar = True debian/patches/0000775000000000000000000000000012257723024010623 5ustar debian/patches/0005_buffer_overrun_999hours.patch0000664000000000000000000000154112257721445017042 0ustar Description: Fixes issue for files with length > 999 hours. Fixes issue where files > 999 hours in length overrun the minutes buffer. Some shorter files may incorrectly be reported as over 999 hours and make the program crash. Origin: other, http://pkgs.fedoraproject.org/gitweb/?p=mediatomb.git;a=commit;h=f648bc71 Bug-Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=651414 Last-Update: 2012-03-03 diff -up ./src/tools.cc.fixbufferoverrun ./src/tools.cc --- ./src/tools.cc.fixbufferoverrun 2010-11-22 00:57:31.387188000 -0500 +++ ./src/tools.cc 2010-11-22 00:57:44.865188000 -0500 @@ -665,6 +665,9 @@ String secondsToHMS(int seconds) h = seconds / 60; // XXX:XX:XX + // This fails if h goes over 999 + if (h > 999) + h = 999; char *str = (char *)malloc(10); sprintf(str, "%02d:%02d:%02d", h, m, s); return String::take(str); debian/patches/0008a_gcc_4.6_support.patch0000664000000000000000000000120112257721445015372 0ustar Description: Fix a FTBFS when using gcc-4.6 Origin: other, http://pkgs.fedoraproject.org/gitweb/?p=mediatomb.git;a=commitdiff;h=ff59631d Bug-Debian: http://bugs.debian.org/624921 Forwarded: http://sourceforge.net/tracker/?func=detail&aid=3173314&group_id=129766&atid=715782 Last-Update: 2012-03-03 diff -up ./src/zmm/object.h.buildfix ./src/zmm/object.h --- ./src/zmm/object.h.buildfix 2011-02-08 21:16:48.504638003 -0500 +++ ./src/zmm/object.h 2011-02-08 21:17:55.876638630 -0500 @@ -32,6 +32,7 @@ #ifndef __ZMM_OBJECT_H__ #define __ZMM_OBJECT_H__ +#include "stddef.h" //for size_t #include // for size_t #include "atomic.h" debian/patches/0010_fix_libmp4v2_build.patch0000664000000000000000000000773412257721445016010 0ustar --- mediatomb-0.12.1.orig/src/metadata/libmp4v2_handler.cc 2010-03-25 10:58:10.000000000 -0400 +++ mediatomb-0.12.1/src/metadata/libmp4v2_handler.cc 2012-06-18 03:05:40.000000000 -0400 @@ -66,24 +66,25 @@ { String value; char* mp4_retval = NULL; - u_int16_t track; - u_int16_t total_tracks; Ref sc = StringConverter::i2i(); + const MP4Tags* tags = MP4TagsAlloc(); + MP4TagsFetch( tags, mp4 ); + switch (field) { case M_TITLE: - MP4GetMetadataName(mp4, &mp4_retval); + mp4_retval = const_cast( tags->name ); break; case M_ARTIST: - MP4GetMetadataArtist(mp4, &mp4_retval); + mp4_retval = const_cast ( tags->artist ); break; case M_ALBUM: - MP4GetMetadataAlbum(mp4, &mp4_retval); + mp4_retval = const_cast ( tags->album ); break; case M_DATE: - MP4GetMetadataYear(mp4, &mp4_retval); + mp4_retval = const_cast ( tags->releaseDate ); if (mp4_retval) { value = mp4_retval; @@ -95,17 +96,16 @@ } break; case M_GENRE: - MP4GetMetadataGenre(mp4, &mp4_retval); + mp4_retval = const_cast ( tags->genre ); break; case M_DESCRIPTION: - MP4GetMetadataComment(mp4, &mp4_retval); + mp4_retval = const_cast ( tags->description ); break; case M_TRACKNUMBER: - MP4GetMetadataTrack(mp4, &track, &total_tracks); - if (track > 0) + if (tags->track->index > 0) { - value = String::from(track); - item->setTrackNumber((int)track); + value = String::from(tags->track->index); + item->setTrackNumber((int)tags->track->index); } else return; @@ -190,21 +190,20 @@ } #if defined(HAVE_MAGIC) - u_int8_t *art_data; - u_int32_t art_data_len; + const MP4Tags* tags = MP4TagsAlloc(); + MP4TagsFetch( tags, mp4 ); + void *art_data = tags->artwork->data; + u_int32_t art_data_len = tags->artwork->size; String art_mimetype; #ifdef HAVE_MP4_GET_METADATA_COVER_ART_COUNT - if (MP4GetMetadataCoverArtCount(mp4) && - MP4GetMetadataCoverArt(mp4, &art_data, &art_data_len)) -#else - MP4GetMetadataCoverArt(mp4, &art_data, &art_data_len); + if (tags->artworkCount && art_data_len > 0) #endif { if (art_data) { try { - art_mimetype = ContentManager::getInstance()->getMimeTypeFromBuffer((void *)art_data, art_data_len); + art_mimetype = ContentManager::getInstance()->getMimeTypeFromBuffer(art_data, art_data_len); if (!string_ok(art_mimetype)) art_mimetype = _(MIMETYPE_DEFAULT); @@ -249,18 +248,21 @@ if (ctype != ID3_ALBUM_ART) throw _Exception(_("LibMP4V2Handler: got unknown content type: ") + ctype); + + const MP4Tags* tags = MP4TagsAlloc(); + MP4TagsFetch( tags, mp4 ); #ifdef HAVE_MP4_GET_METADATA_COVER_ART_COUNT - if (!MP4GetMetadataCoverArtCount(mp4)) + if (tags->artworkCount<1) throw _Exception(_("LibMP4V2Handler: resource has no album art information")); #endif - u_int8_t *art_data; - u_int32_t art_data_len; - if (MP4GetMetadataCoverArt(mp4, &art_data, &art_data_len)) + void *art_data = tags->artwork->data; + u_int32_t art_data_len = tags->artwork->size; + if (art_data_len > 0) { if (art_data) { *data_size = (off_t)art_data_len; - Ref h(new MemIOHandler((void *)art_data, art_data_len)); + Ref h(new MemIOHandler(art_data, art_data_len)); free(art_data); return h; } debian/patches/0003_config_xml_comment.patch0000664000000000000000000000426412257721445016170 0ustar Add comment about documentation for config.xml. Also add mappings for matroska. Also add mappings for ogg in like manner as audio files. ========================================================================== --- a/src/config_manager.cc +++ b/src/config_manager.cc @@ -426,6 +426,13 @@ config->setAttribute(_("xmlns"), _(XML_XMLNS) + CONFIG_XML_VERSION); config->setAttribute(_("xmlns:xsi"), _(XML_XMLNS_XSI)); config->setAttribute(_("xsi:schemaLocation"), _(XML_XMLNS) + CONFIG_XML_VERSION + " " + XML_XMLNS + CONFIG_XML_VERSION + ".xsd"); + + Ref docinfo(new Comment(_("\n\ + Read /usr/share/doc/mediatomb-common/README.gz section 6 for more\n\ + information on creating and using config.xml configration files.\n\ + "), true)); + config->appendChild(RefCast(docinfo, Node)); + Ref server(new Element(_("server"))); Ref ui(new Element(_("ui"))); @@ -614,6 +621,8 @@ _(UPNP_DEFAULT_CLASS_VIDEO_ITEM))); mtupnp->appendElementChild(map_from_to(_("image/*"), _("object.item.imageItem"))); + mtupnp->appendElementChild(map_from_to(_("application/ogg"), + _(UPNP_DEFAULT_CLASS_MUSIC_TRACK))); mappings->appendElementChild(mtupnp); @@ -644,6 +653,10 @@ _(CONTENT_TYPE_DVD))); mtcontent->appendElementChild(treat_as(_("application/x-iso9660-image"), _(CONTENT_TYPE_DVD))); + mtcontent->appendElementChild(treat_as(_("video/x-matroska"), + _(CONTENT_TYPE_MKV))); + mtcontent->appendElementChild(treat_as(_("audio/x-matroska"), + _(CONTENT_TYPE_MKA))); mappings->appendElementChild(mtcontent); import->appendElementChild(mappings); --- a/src/metadata_handler.h +++ b/src/metadata_handler.h @@ -57,6 +57,8 @@ #define CONTENT_TYPE_MPEG "mpeg" #define CONTENT_TYPE_DVD "dvd" #define CONTENT_TYPE_QUICKTIME "quicktime" +#define CONTENT_TYPE_MKV "mkv" +#define CONTENT_TYPE_MKA "mka" #define OGG_THEORA "t" debian/patches/0006c_js_copyObject.patch0000664000000000000000000000312612257721445015260 0ustar Description: Fix segfaults caused by copyObject. Bug-Debian: http://bugs.debian.org/664967 Author: Miguel A. Colón Vélez Last-Update: 2012-03-24 --- mediatomb-0.12.1.orig/src/scripting/js_functions.cc +++ mediatomb-0.12.1/src/scripting/js_functions.cc @@ -83,26 +83,31 @@ js_print(JSContext *cx, uintN argc, jsva JSBool js_copyObject(JSContext *cx, uintN argc, jsval *argv) { - jsval arg; - JSObject *js_cds_obj; - JSObject *js_cds_clone_obj; + JSObject *js_cds_obj = NULL; + JSObject *js_cds_clone_obj = NULL; - Script *self = (Script *)JS_GetPrivate(cx, JS_THIS_OBJECT(cx, argv)); + JSObject *obj = JS_THIS_OBJECT(cx, argv); + + Script *self = (Script *)JS_GetPrivate(cx, obj); try { - arg = argv[0]; - if (!JSVAL_IS_OBJECT(arg)) - return JS_TRUE; - - if (!JS_ValueToObject(cx, arg, &js_cds_obj)) + if (argc != 1) + { + log_debug("Incorrect number of input arguments given, argc = %d\n",argc); return JS_TRUE; - - argv[0] = OBJECT_TO_JSVAL(js_cds_obj); + } + else + { + if(!JS_ConvertArguments(cx, 1, JS_ARGV(cx, argv), "o", &js_cds_obj)) + { + log_debug("Could not parse input arguments\n"); + return JS_TRUE; + } + } Ref cds_obj = self->jsObject2cdsObject(js_cds_obj, nil); js_cds_clone_obj = JS_NewObject(cx, NULL, NULL, NULL); - argv[1] = OBJECT_TO_JSVAL(js_cds_clone_obj); self->cdsObject2jsObject(cds_obj, js_cds_clone_obj); debian/patches/0006a_js_1.8_support.patch0000664000000000000000000003326512257721445015266 0ustar Description: Fix a FTBFS by porting to spidermonkey 1.8 Origin: other, http://pkgs.fedoraproject.org/gitweb/?p=mediatomb.git;a=commitdiff;h=c8f3ab62 Bug-Debian: http://bugs.debian.org/631046 Forwarded: http://sourceforge.net/tracker/?func=detail&aid=3409482&group_id=129766&atid=715782 Last-Update: 2012-03-03 Index: mediatomb-0.12.1/src/scripting/import_script.cc =================================================================== --- mediatomb-0.12.1.orig/src/scripting/import_script.cc 2012-03-11 13:59:37.504024032 +0000 +++ mediatomb-0.12.1/src/scripting/import_script.cc 2012-03-11 13:59:42.456024047 +0000 @@ -53,8 +53,8 @@ try { load(scriptPath); - root = JS_NewScriptObject(cx, script); - JS_AddNamedRoot(cx, &root, "ImportScript"); + root = JS_NewObject(cx, NULL, script, NULL); + JS_AddNamedObjectRoot(cx, &root, "ImportScript"); } catch (Exception ex) { @@ -117,7 +117,7 @@ #endif if (root) - JS_RemoveRoot(cx, &root); + JS_RemoveObjectRoot(cx, &root); #ifdef JS_THREADSAFE JS_EndRequest(cx); Index: mediatomb-0.12.1/src/scripting/js_functions.cc =================================================================== --- mediatomb-0.12.1.orig/src/scripting/js_functions.cc 2012-03-11 13:59:37.520024032 +0000 +++ mediatomb-0.12.1/src/scripting/js_functions.cc 2012-03-11 13:59:42.456024047 +0000 @@ -49,7 +49,7 @@ extern "C" { JSBool -js_print(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +js_print(JSContext *cx, uintN argc, jsval *argv) { uintN i; JSString *str; @@ -60,19 +60,21 @@ if (!str) return JS_TRUE; argv[i] = STRING_TO_JSVAL(str); - log_js("%s\n", JS_GetStringBytes(str)); + char * log_str = JS_EncodeString(cx, str); + log_js("%s\n", log_str); + JS_free(cx, log_str); } return JS_TRUE; } JSBool -js_copyObject(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +js_copyObject(JSContext *cx, uintN argc, jsval *argv) { jsval arg; JSObject *js_cds_obj; JSObject *js_cds_clone_obj; - Script *self = (Script *)JS_GetPrivate(cx, obj); + Script *self = (Script *)JS_GetPrivate(cx, JS_THIS_OBJECT(cx, argv)); try { @@ -91,7 +93,7 @@ self->cdsObject2jsObject(cds_obj, js_cds_clone_obj); - *rval = OBJECT_TO_JSVAL(js_cds_clone_obj); + JS_SET_RVAL(cx, argv, OBJECT_TO_JSVAL(js_cds_clone_obj)); return JS_TRUE; @@ -110,7 +112,7 @@ } JSBool -js_addCdsObject(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +js_addCdsObject(JSContext *cx, uintN argc, jsval *argv) { try { @@ -126,7 +128,7 @@ Ref p2i; Ref i2i; - Script *self = (Script *)JS_GetPrivate(cx, obj); + Script *self = (Script *)JS_GetPrivate(cx, JS_THIS_OBJECT(cx, argv)); if (self == NULL) { @@ -156,20 +158,20 @@ if (!str) path = _("/"); else - path = JS_GetStringBytes(str); + path = JS_EncodeString(cx, str); JSString *cont = JS_ValueToString(cx, argv[2]); if (cont) { - containerclass = JS_GetStringBytes(cont); + containerclass = JS_EncodeString(cx, cont); if (!string_ok(containerclass) || containerclass == "undefined") containerclass = nil; } if (self->whoami() == S_PLAYLIST) - js_orig_obj = self->getObjectProperty(obj, _("playlist")); + js_orig_obj = self->getObjectProperty(JS_THIS_OBJECT(cx, argv), _("playlist")); else if (self->whoami() == S_IMPORT) - js_orig_obj = self->getObjectProperty(obj, _("orig")); + js_orig_obj = self->getObjectProperty(JS_THIS_OBJECT(cx, argv), _("orig")); if (js_orig_obj == NULL) { @@ -285,8 +287,7 @@ JSString *str2 = JS_NewStringCopyN(cx, tmp.c_str(), tmp.length()); if (!str2) return JS_TRUE; - *rval = STRING_TO_JSVAL(str2); - + JS_SET_RVAL(cx, argv, STRING_TO_JSVAL(str2)); return JS_TRUE; } catch (ServerShutdownException se) @@ -302,7 +303,7 @@ return JS_TRUE; } -static JSBool convert_charset_generic(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval, charset_convert_t chr) +static JSBool convert_charset_generic(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, charset_convert_t chr) { try { @@ -321,7 +322,7 @@ { str = JS_ValueToString(cx, argv[0]); if (str) - result = JS_GetStringBytes(str); + result = JS_EncodeString(cx, str); } if (result != nil) @@ -330,7 +331,7 @@ JSString *str2 = JS_NewStringCopyN(cx, result.c_str(), result.length()); if (!str2) return JS_TRUE; - *rval = STRING_TO_JSVAL(str2); + JS_SET_RVAL(cx, argv, STRING_TO_JSVAL(str2)); } } catch (ServerShutdownException se) @@ -347,24 +348,23 @@ } -JSBool js_f2i(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +JSBool js_f2i(JSContext *cx, uintN argc, jsval *argv) { - return convert_charset_generic(cx, obj, argc, argv, rval, F2I); + return convert_charset_generic(cx, JS_THIS_OBJECT(cx, argv), argc, argv, F2I); } -JSBool js_m2i(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +JSBool js_m2i(JSContext *cx, uintN argc, jsval *argv) { - return convert_charset_generic(cx, obj, argc, argv, rval, M2I); -} + return convert_charset_generic(cx, JS_THIS_OBJECT(cx, argv), argc, argv, M2I); } -JSBool js_p2i(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +JSBool js_p2i(JSContext *cx, uintN argc, jsval *argv) { - return convert_charset_generic(cx, obj, argc, argv, rval, P2I); + return convert_charset_generic(cx, JS_THIS_OBJECT(cx, argv), argc, argv, P2I); } -JSBool js_j2i(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +JSBool js_j2i(JSContext *cx, uintN argc, jsval *argv) { - return convert_charset_generic(cx, obj, argc, argv, rval, J2I); + return convert_charset_generic(cx, JS_THIS_OBJECT(cx, argv), argc, argv, J2I); } } // extern "C" Index: mediatomb-0.12.1/src/scripting/js_functions.h =================================================================== --- mediatomb-0.12.1.orig/src/scripting/js_functions.h 2012-03-11 13:59:37.584024033 +0000 +++ mediatomb-0.12.1/src/scripting/js_functions.h 2012-03-11 13:59:42.456024047 +0000 @@ -40,18 +40,18 @@ extern "C" { /// \brief Log output. -JSBool js_print(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval); +JSBool js_print(JSContext *cx, uintN argc, jsval *argv); /// \brief Adds an object to the database. -JSBool js_addCdsObject(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval); +JSBool js_addCdsObject(JSContext *cx, uintN argc, jsval *argv); /// \brief Makes a copy of an CDS object. -JSBool js_copyObject(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval); +JSBool js_copyObject(JSContext *cx, uintN argc, jsval *argv); -JSBool js_f2i(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval); -JSBool js_m2i(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval); -JSBool js_p2i(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval); -JSBool js_j2i(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval); +JSBool js_f2i(JSContext *cx, uintN argc, jsval *argv); +JSBool js_m2i(JSContext *cx, uintN argc, jsval *argv); +JSBool js_p2i(JSContext *cx, uintN argc, jsval *argv); +JSBool js_j2i(JSContext *cx, uintN argc, jsval *argv); } // extern "C" Index: mediatomb-0.12.1/src/scripting/playlist_parser_script.cc =================================================================== --- mediatomb-0.12.1.orig/src/scripting/playlist_parser_script.cc 2012-03-11 13:59:37.540024032 +0000 +++ mediatomb-0.12.1/src/scripting/playlist_parser_script.cc 2012-03-11 13:59:42.456024047 +0000 @@ -46,9 +46,9 @@ extern "C" { static JSBool -js_readln(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +js_readln(JSContext *cx, uintN argc, jsval *argv) { - PlaylistParserScript *self = (PlaylistParserScript *)JS_GetPrivate(cx, obj); + PlaylistParserScript *self = (PlaylistParserScript *)JS_GetPrivate(cx, JS_THIS_OBJECT(cx, argv)); String line; @@ -69,7 +69,7 @@ JSString *jsline = JS_NewStringCopyZ(cx, line.c_str()); - *rval = STRING_TO_JSVAL(jsline); + JS_SET_RVAL(cx, argv, STRING_TO_JSVAL(jsline)); return JS_TRUE; } @@ -93,8 +93,8 @@ String scriptPath = ConfigManager::getInstance()->getOption(CFG_IMPORT_SCRIPTING_PLAYLIST_SCRIPT); load(scriptPath); - root = JS_NewScriptObject(cx, script); - JS_AddNamedRoot(cx, &root, "PlaylistScript"); + root = JS_NewObject(cx, NULL, script, NULL); + JS_AddNamedObjectRoot(cx, &root, "PlaylistScript"); } catch (Exception ex) { @@ -245,7 +245,7 @@ #endif if (root) - JS_RemoveRoot(cx, &root); + JS_RemoveObjectRoot(cx, &root); #ifdef JS_THREADSAFE JS_EndRequest(cx); Index: mediatomb-0.12.1/src/scripting/script.cc =================================================================== --- mediatomb-0.12.1.orig/src/scripting/script.cc 2012-03-11 13:59:37.556024031 +0000 +++ mediatomb-0.12.1/src/scripting/script.cc 2012-03-11 13:59:42.460024047 +0000 @@ -87,7 +87,7 @@ str = JS_ValueToString(cx, val); if (! str) return nil; - return JS_GetStringBytes(str); + return JS_EncodeString(cx, str); } int Script::getBoolProperty(JSObject *obj, String name) @@ -427,14 +427,14 @@ try { common_script = _load(common_scr_path); - common_root = JS_NewScriptObject(cx, common_script); - JS_AddNamedRoot(cx, &common_root, "common-script"); + common_root = JS_NewObject(cx, NULL, common_script, NULL); + JS_AddNamedObjectRoot(cx, &common_root, "common-script"); _execute(common_script); } catch (Exception e) { if (common_root) - JS_RemoveRoot(cx, &common_root); + JS_RemoveObjectRoot(cx, &common_root); log_js("Unable to load %s: %s\n", common_scr_path.c_str(), e.getMessage().c_str()); @@ -460,7 +460,7 @@ JS_BeginRequest(cx); #endif if (common_root) - JS_RemoveRoot(cx, &common_root); + JS_RemoveObjectRoot(cx, &common_root); /* * scripts are unrooted and will be cleaned up by GC @@ -504,11 +504,11 @@ static JSClass global_class = { "global", /* name */ - JSCLASS_HAS_PRIVATE, /* flags */ + JSCLASS_HAS_PRIVATE | JSCLASS_GLOBAL_FLAGS,/* flags */ JS_PropertyStub, /* add property */ JS_PropertyStub, /* del property */ JS_PropertyStub, /* get property */ - JS_PropertyStub, /* set property */ + JS_StrictPropertyStub, /* set property */ JS_EnumerateStandardClasses, /* enumerate */ JS_ResolveStub, /* resolve */ JS_ConvertStub, /* convert */ @@ -517,7 +517,7 @@ }; /* create the global object here */ - glob = JS_NewObject(cx, &global_class, NULL, NULL); + glob = JS_NewCompartmentAndGlobalObject(cx, &global_class, NULL); if (! glob) throw _Exception(_("Scripting: could not initialize glboal class")); @@ -539,12 +539,12 @@ throw _Exception(_("Scripting: JS_DefineFunctions failed")); } -JSScript *Script::_load(zmm::String scriptPath) +JSObject *Script::_load(zmm::String scriptPath) { if (glob == NULL) initGlobalObject(); - JSScript *scr; + JSObject *scr; String scriptText = read_text_file(scriptPath); @@ -571,14 +571,11 @@ void Script::load(zmm::String scriptPath) { - if (script) - JS_DestroyScript(cx, script); - script = _load((scriptPath)); } -void Script::_execute(JSScript *scr) +void Script::_execute(JSObject *scr) { jsval ret_val; @@ -662,7 +659,7 @@ JSObject *js_meta = getObjectProperty(js, _("meta")); if (js_meta) { - JS_AddNamedRoot(cx, &js_meta, "meta"); + JS_AddNamedObjectRoot(cx, &js_meta, "meta"); /// \todo: only metadata enumerated in MT_KEYS is taken for (int i = 0; i < M_MAX; i++) { @@ -687,7 +684,7 @@ } } } - JS_RemoveRoot(cx, &js_meta); + JS_RemoveObjectRoot(cx, &js_meta); } // stuff that has not been exported to js Index: mediatomb-0.12.1/src/scripting/script.h =================================================================== --- mediatomb-0.12.1.orig/src/scripting/script.h 2012-03-11 13:59:37.484024032 +0000 +++ mediatomb-0.12.1/src/scripting/script.h 2012-03-11 13:59:42.460024047 +0000 @@ -66,8 +66,8 @@ JSRuntime *rt; JSContext *cx; JSObject *glob; - JSScript *script; - JSScript *common_script; + JSObject *script; + JSObject *common_script; public: Script(zmm::Ref runtime); @@ -115,8 +115,8 @@ JSObject *common_root; void initGlobalObject(); - JSScript *_load(zmm::String scriptPath); - void _execute(JSScript *scr); + JSObject *_load(zmm::String scriptPath); + void _execute(JSObject *scr); zmm::Ref _p2i; zmm::Ref _j2i; zmm::Ref _f2i; debian/patches/series0000664000000000000000000000066312257722033012044 0ustar 0001_fix_spelling_errors.patch 0002_debug_mode_fix.patch 0003_config_xml_comment.patch 0004_const_char_conversion.patch 0005_buffer_overrun_999hours.patch 0006a_js_1.8_support.patch 0006b_js_parse.patch 0006c_js_copyObject.patch 0007_libmozjs185_support.patch 0008a_gcc_4.6_support.patch 0008b_gcc_4.7_support.patch 0009a_libav_0.7_support.patch 0009b_fix_ffmpeg_metadata.patch 0010_fix_libmp4v2_build.patch 0011_libav_9_support.patch debian/patches/0004_const_char_conversion.patch0000664000000000000000000000256612257721445016715 0ustar Fix (const char *) conversion to (char *). ========================================================================== --- a/src/tools.cc +++ b/src/tools.cc @@ -298,14 +298,14 @@ String hex_decode_string(String encoded) { - char *ptr = encoded.c_str(); + char *ptr = const_cast(encoded.c_str()); int len = encoded.length(); Ref buf(new StringBuffer(len / 2)); for (int i = 0; i < len; i += 2) { - const char *chi = strchr(HEX_CHARS, ptr[i]); - const char *clo = strchr(HEX_CHARS, ptr[i + 1]); + const char *chi = strchr(const_cast(HEX_CHARS), ptr[i]); + const char *clo = strchr(const_cast(HEX_CHARS), ptr[i + 1]); int hi, lo; if (chi) @@ -382,7 +382,7 @@ String url_unescape(String str) { - char *data = str.c_str(); + char *data = const_cast(str.c_str()); int len = str.length(); Ref buf(new StringBuffer(len)); @@ -400,13 +400,13 @@ const char *pos; - pos = strchr(hex, chi); + pos = strchr(const_cast(hex), chi); if (!pos) hi = 0; else hi = pos - hex; - pos = strchr(hex, clo); + pos = strchr(const_cast(hex), clo); if (!pos) lo = 0; else debian/patches/0007_libmozjs185_support.patch0000664000000000000000000000436412257721445016211 0ustar Description: Add detection for libmozjs185.so during the configure script. Use this library instead of the one provided by iceweasel. This enables js support in mediatomb. Bug-Debian: http://bugs.debian.org/631046 Author: Miguel A. Colón Vélez Last-Update: 2012-03-03 --- mediatomb-0.12.1.orig/configure.ac +++ mediatomb-0.12.1/configure.ac @@ -1036,6 +1036,13 @@ if test "x$JS_OK" = xyes; then ], [ unset ac_cv_lib_smjs_JS_NewObject + AC_CHECK_LIB(mozjs185, JS_NewObject, + [ + MOZLIB=mozjs185 + JS_LIBS="-lmozjs185" + ], + [ + unset ac_cv_lib_mozjs185_JS_NewObject AC_CHECK_LIB(mozjs, JS_NewObject, [ MOZLIB=mozjs @@ -1057,6 +1064,13 @@ if test "x$JS_OK" = xyes; then MOZLIB=smjs ], [ + unset ac_cv_lib_mozjs185_JS_NewObject + AC_CHECK_LIB(mozjs185, JS_NewObject, + [ + JS_LIBS="-L$SEARCH_DIR_LIBS -lmozjs185" + MOZLIB=mozjs185 + ], + [ LDFLAGS="-L$SEARCH_DIR_LIBS $LDFLAGS_SAVE -lmozjs" unset ac_cv_lib_mozjs_JS_NewObject AC_CHECK_LIB(mozjs, JS_NewObject, @@ -1071,10 +1085,14 @@ if test "x$JS_OK" = xyes; then ) ] ) + ] + ) ] ) ] ) + ] + ) ] ) ] debian/patches/0002_debug_mode_fix.patch0000664000000000000000000000164512257721445015260 0ustar Fix issue where mediatomb would not start in debug mode as a user that doesn't have permissions in the working directory. ========================================================================== --- a/tombupnp/upnp/src/api/upnpdebug.c +++ b/tombupnp/upnp/src/api/upnpdebug.c @@ -62,10 +62,10 @@ static FILE *InfoFileHnd = NULL; //Name of the error file -static const char *errFileName = "IUpnpErrFile.txt"; +static const char *errFileName = NULL; //Name of the info file -static const char *infoFileName = "IUpnpInfoFile.txt"; +static const char *infoFileName = NULL; @@ -113,6 +113,8 @@ ithread_mutex_init( &GlobalDebugMutex, NULL ); if( DEBUG_TARGET == 1 ) { + errFileName = tempnam(NULL,NULL); + infoFileName = tempnam(NULL,NULL); if( ( ErrFileHnd = fopen( errFileName, "a" ) ) == NULL ) return -1; if( ( InfoFileHnd = fopen( infoFileName, "a" ) ) == NULL ) debian/patches/0006b_js_parse.patch0000664000000000000000000001106412257721445014270 0ustar Description: Mediatomb fails to categorize media files with js 1.8 Origin: other, http://pkgs.fedoraproject.org/gitweb/?p=mediatomb.git;a=commit;h=16f62e7e Bug-Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=714466 Forwarded: http://sourceforge.net/tracker/?func=detail&aid=3409482&group_id=129766&atid=715782 Last-Update: 2012-03-03 diff -rup mediatomb-0.12.1/src/scripting/js_functions.cc ../mediatomb-0.12.1/src/scripting/js_functions.cc --- mediatomb-0.12.1/src/scripting/js_functions.cc 2011-06-29 21:51:13.641025479 -0400 +++ ../mediatomb-0.12.1/src/scripting/js_functions.cc 2011-06-29 21:49:21.071800273 -0400 @@ -51,15 +51,28 @@ extern "C" { JSBool js_print(JSContext *cx, uintN argc, jsval *argv) { - uintN i; + uintN i, j; JSString *str; for (i = 0; i < argc; i++) { - str = JS_ValueToString(cx, argv[i]); + String fmtStr; + for (j = 0; j < argc; j++) + { + if (j == i) + fmtStr = fmtStr + "S"; + else + fmtStr = fmtStr + "*"; + } + if(!JS_ConvertArguments(cx, 1, JS_ARGV(cx, argv), fmtStr.c_str(), &str)) + { + log_debug("Could not parse input arguments\n"); + return JS_TRUE; + } + if (!str) return JS_TRUE; - argv[i] = STRING_TO_JSVAL(str); + char * log_str = JS_EncodeString(cx, str); log_js("%s\n", log_str); JS_free(cx, log_str); @@ -116,24 +129,54 @@ js_addCdsObject(JSContext *cx, uintN arg { try { - jsval arg; - JSString *str; - String path; - String containerclass; + // Inputs from native code + JSObject *js_cds_obj = NULL; + JSString *str = NULL; + JSString *cont = NULL; - JSObject *js_cds_obj; + String path = nil; + String containerclass = nil; + + JSObject *obj = JS_THIS_OBJECT(cx, argv); JSObject *js_orig_obj = NULL; Ref orig_object; Ref p2i; Ref i2i; + switch (argc) + { + case 0: + log_debug("No input arguments given\n"); + return JS_FALSE; + case 1: + if(!JS_ConvertArguments(cx, 1, JS_ARGV(cx, argv), "o", &js_cds_obj)) + { + log_debug("Could not parse input arguments\n"); + return JS_TRUE; + } + break; + case 2: + if(!JS_ConvertArguments(cx, 2, JS_ARGV(cx, argv), "oS", &js_cds_obj, &str)) + { + log_debug("Could not parse input arguments\n"); + return JS_TRUE; + } + break; + default: + if(!JS_ConvertArguments(cx, 3, JS_ARGV(cx, argv), "oSS", &js_cds_obj, &str, &cont)) + { + log_debug("Could not parse input arguments\n"); + return JS_TRUE; + } + break; + } - Script *self = (Script *)JS_GetPrivate(cx, JS_THIS_OBJECT(cx, argv)); + Script *self = (Script *)JS_GetPrivate(cx, obj); if (self == NULL) { log_debug("Could not retrieve class instance from global object\n"); - return JS_FALSE; + return JS_TRUE; } if (self->whoami() == S_PLAYLIST) @@ -144,23 +187,14 @@ js_addCdsObject(JSContext *cx, uintN arg { i2i = StringConverter::i2i(); } - - arg = argv[0]; - if (!JSVAL_IS_OBJECT(arg)) - return JS_TRUE; - if (!JS_ValueToObject(cx, arg, &js_cds_obj)) - return JS_TRUE; - // root it - argv[0] = OBJECT_TO_JSVAL(js_cds_obj); - str = JS_ValueToString(cx, argv[1]); if (!str) path = _("/"); else path = JS_EncodeString(cx, str); - JSString *cont = JS_ValueToString(cx, argv[2]); + if (cont) { containerclass = JS_EncodeString(cx, cont); @@ -169,9 +203,9 @@ js_addCdsObject(JSContext *cx, uintN arg } if (self->whoami() == S_PLAYLIST) - js_orig_obj = self->getObjectProperty(JS_THIS_OBJECT(cx, argv), _("playlist")); + js_orig_obj = self->getObjectProperty(obj, _("playlist")); else if (self->whoami() == S_IMPORT) - js_orig_obj = self->getObjectProperty(JS_THIS_OBJECT(cx, argv), _("orig")); + js_orig_obj = self->getObjectProperty(obj, _("orig")); if (js_orig_obj == NULL) { @@ -179,9 +213,6 @@ js_addCdsObject(JSContext *cx, uintN arg return JS_TRUE; } - // root it - argv[1] = OBJECT_TO_JSVAL(js_orig_obj); - orig_object = self->jsObject2cdsObject(js_orig_obj, self->getProcessedObject()); if (orig_object == nil) return JS_TRUE; debian/patches/0001_fix_spelling_errors.patch0000664000000000000000000000724512257721445016400 0ustar Description: Fix spelling errors. Fix the spelling errors mentioned by lintian. Author: Miguel A. Colón Vélez Last-Update: 2012-03-24 --- mediatomb-0.12.1.orig/src/web_request_handler.h +++ mediatomb-0.12.1/src/web_request_handler.h @@ -147,7 +147,7 @@ public: /// \return the appropriate IOHandler for the request. virtual zmm::Ref open(IN const char *filename, OUT struct File_Info *info, IN enum UpnpOpenFileMode mode); - /// \brief This method must be overriden by the subclasses that actually process the given request. + /// \brief This method must be overridden by the subclasses that actually process the given request. virtual void process() = 0; /// \brief builds full path to a script for the given relative filename --- mediatomb-0.12.1.orig/src/youtube_service.cc +++ mediatomb-0.12.1/src/youtube_service.cc @@ -337,7 +337,7 @@ String YouTubeService::getCheckAttr(Ref< return temp; else throw _Exception(_("Tag <") + xml->getName() + - _("> is missing the requred \"") + attrname + + _("> is missing the required \"") + attrname + _("\" attribute!")); return nil; } @@ -350,7 +350,7 @@ int YouTubeService::getCheckPosIntAttr(R itmp = temp.toInt(); else throw _Exception(_("Tag <") + xml->getName() + - _("> is missing the requred \"") + attrname + + _("> is missing the required \"") + attrname + _("\" attribute!")); if (itmp < 1) --- mediatomb-0.12.1.orig/src/online_service.cc +++ mediatomb-0.12.1/src/online_service.cc @@ -98,7 +98,7 @@ String OnlineService::getCheckAttr(RefgetName() + - _("> is missing the requred \"") + attrname + + _("> is missing the required \"") + attrname + _("\" attribute!")); return nil; } @@ -111,7 +111,7 @@ int OnlineService::getCheckPosIntAttr(Re itmp = temp.toInt(); else throw _Exception(getServiceName() + _(": Tag <") + xml->getName() + - _("> is missing the requred \"") + attrname + + _("> is missing the required \"") + attrname + _("\" attribute!")); if (itmp < 1) --- mediatomb-0.12.1.orig/src/main.cc +++ mediatomb-0.12.1/src/main.cc @@ -197,7 +197,7 @@ int main(int argc, char **argv, char **e break; case 'd': - log_debug("Starting in deamon mode..."); + log_debug("Starting in daemon mode..."); daemon = true; break; --- mediatomb-0.12.1.orig/src/storage/sql_storage.h +++ mediatomb-0.12.1/src/storage/sql_storage.h @@ -242,7 +242,7 @@ private: void addToInsertBuffer(zmm::Ref query); void flushInsertBuffer(bool dontLock = false); - /* insert buffer functions to be overriden by implementing classes */ + /* insert buffer functions to be overridden by implementing classes */ virtual void _addToInsertBuffer(zmm::Ref query) = 0; virtual void _flushInsertBuffer() = 0; --- mediatomb-0.12.1.orig/src/storage/sql_storage.cc +++ mediatomb-0.12.1/src/storage/sql_storage.cc @@ -136,7 +136,7 @@ SQLStorage::SQLStorage() : Storage() void SQLStorage::init() { if (table_quote_begin == '\0' || table_quote_end == '\0') - throw _Exception(_("quote vars need to be overriden!")); + throw _Exception(_("quote vars need to be overridden!")); Ref buf(new StringBuffer()); *buf << SQL_QUERY_FOR_STRINGBUFFER; debian/patches/0009a_libav_0.7_support.patch0000664000000000000000000000367712257721445015754 0ustar === modified file 'src/metadata/ffmpeg_handler.cc' --- old/src/metadata/ffmpeg_handler.cc 2010-08-25 17:07:03 +0000 +++ new/src/metadata/ffmpeg_handler.cc 2011-05-19 04:33:32 +0000 @@ -89,6 +89,33 @@ Ref sc = StringConverter::m2i(); + /* Tabs are 4 characters here */ + typedef struct {const char *avname; metadata_fields_t field;} mapping_t; + static const mapping_t mapping[] = + { + {"title", M_TITLE}, + {"artist", M_ARTIST}, + {"album", M_ALBUM}, + {"date", M_DATE}, + {"genre", M_GENRE}, + {"comment", M_DESCRIPTION}, + {"track", M_TRACKNUMBER}, + {NULL, M_MAX}, + }; + + if (!pFormatCtx->metadata) + return; + for (const mapping_t *m = mapping; m->avname != NULL; m++) + { + AVMetadataTag *tag = NULL; + tag = av_metadata_get(pFormatCtx->metadata, m->avname, NULL, 0); + if (tag && tag->value && tag->value[0]) + { + log_debug("Added metadata %s: %s\n", m->avname, tag->value); + item->setMetadata(MT_KEYS[m->field].upnp, sc->convert(tag->value)); + } + } + /* Old algorithm (doesn't work with libav >= 0.7) if (strlen(pFormatCtx->title) > 0) { log_debug("Added metadata title: %s\n", pFormatCtx->title); @@ -131,6 +158,7 @@ item->setMetadata(MT_KEYS[M_TRACKNUMBER].upnp, sc->convert(String::from(pFormatCtx->track))); } + */ } // ffmpeg library calls @@ -178,7 +206,7 @@ for(i=0; inb_streams; i++) { AVStream *st = pFormatCtx->streams[i]; - if((st != NULL) && (videoset == false) && (st->codec->codec_type == CODEC_TYPE_VIDEO)) + if((st != NULL) && (videoset == false) && (st->codec->codec_type == AVMEDIA_TYPE_VIDEO)) { if (st->codec->codec_tag > 0) { @@ -209,7 +237,7 @@ *y = st->codec->height; } } - if(st->codec->codec_type == CODEC_TYPE_AUDIO) + if(st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { // Increase number of audiochannels audioch++; debian/patches/0009b_fix_ffmpeg_metadata.patch0000664000000000000000000000564212257721445016444 0ustar Description: properly parse the bitrate in bytes/second and the number of audio channels (not audio streams) Author: Marc Deslauriers Forwarded: yes, http://sourceforge.net/support/tracker.php?aid=3424145 Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/mediatomb/+bug/875098 Index: mediatomb-0.12.1/src/metadata/ffmpeg_handler.cc =================================================================== --- mediatomb-0.12.1.orig/src/metadata/ffmpeg_handler.cc 2011-10-16 18:10:28.000000000 -0400 +++ mediatomb-0.12.1/src/metadata/ffmpeg_handler.cc 2011-10-16 18:13:22.488137464 -0400 @@ -195,9 +195,11 @@ // bitrate if (pFormatCtx->bit_rate > 0) { + // ffmpeg's bit_rate is in bits/sec, upnp wants it in bytes/sec + // See http://www.upnp.org/schemas/av/didl-lite-v3.xsd log_debug("Added overall bitrate: %d kb/s\n", - pFormatCtx->bit_rate/1000); - item->getResource(0)->addAttribute(MetadataHandler::getResAttrName(R_BITRATE), String::from(pFormatCtx->bit_rate/1000)); + pFormatCtx->bit_rate/8); + item->getResource(0)->addAttribute(MetadataHandler::getResAttrName(R_BITRATE), String::from(pFormatCtx->bit_rate/8)); } // video resolution, audio sampling rate, nr of audio channels @@ -236,30 +238,27 @@ *x = st->codec->width; *y = st->codec->height; } - } - if(st->codec->codec_type == AVMEDIA_TYPE_AUDIO) + } + if((st != NULL) && (audioset == false) && (st->codec->codec_type == AVMEDIA_TYPE_AUDIO)) { - // Increase number of audiochannels - audioch++; - // Get the sample rate - if ((audioset == false) && (st->codec->sample_rate > 0)) + // find the first stream that has a valid sample rate + if (st->codec->sample_rate > 0) { samplefreq = st->codec->sample_rate; - if (samplefreq > 0) - { - log_debug("Added sample frequency: %d Hz\n", samplefreq); - item->getResource(0)->addAttribute(MetadataHandler::getResAttrName(R_SAMPLEFREQUENCY), String::from(samplefreq)); - audioset = true; - } + log_debug("Added sample frequency: %d Hz\n", samplefreq); + item->getResource(0)->addAttribute(MetadataHandler::getResAttrName(R_SAMPLEFREQUENCY), String::from(samplefreq)); + audioset = true; + + audioch = st->codec->channels; + if (audioch > 0) + { + log_debug("Added number of audio channels: %d\n", audioch); + item->getResource(0)->addAttribute(MetadataHandler::getResAttrName(R_NRAUDIOCHANNELS), String::from(audioch)); + } } } } - if (audioch > 0) - { - log_debug("Added number of audio channels: %d\n", audioch); - item->getResource(0)->addAttribute(MetadataHandler::getResAttrName(R_NRAUDIOCHANNELS), String::from(audioch)); - } } // addFfmpegResourceFields /*double time_to_double(struct timeval time) { debian/patches/0011_libav_9_support.patch0000664000000000000000000000367412257721415015442 0ustar Description: Port to libav 9 API. Author: Jona Schuman Bug-Debian: http://bugs.debian.org/677959 Last-Update: 2013-09-04 --- mediatomb-0.12.1.orig/src/metadata/ffmpeg_handler.cc 2012-06-18 02:50:35.000000000 -0400 +++ mediatomb-0.12.1/src/metadata/ffmpeg_handler.cc 2012-06-18 02:59:02.000000000 -0400 @@ -107,8 +107,8 @@ return; for (const mapping_t *m = mapping; m->avname != NULL; m++) { - AVMetadataTag *tag = NULL; - tag = av_metadata_get(pFormatCtx->metadata, m->avname, NULL, 0); + AVDictionaryEntry *tag = NULL; + tag = av_dict_get(pFormatCtx->metadata, m->avname, NULL, 0); if (tag && tag->value && tag->value[0]) { log_debug("Added metadata %s: %s\n", m->avname, tag->value); @@ -278,7 +278,7 @@ int x = 0; int y = 0; - AVFormatContext *pFormatCtx; + AVFormatContext *pFormatCtx = avformat_alloc_context(); // Suppress all log messages av_log_set_callback(FfmpegNoOutputStub); @@ -286,15 +286,15 @@ // Register all formats and codecs av_register_all(); - // Open video file - if (av_open_input_file(&pFormatCtx, - item->getLocation().c_str(), NULL, 0, NULL) != 0) + // Open video file + if (avformat_open_input(&pFormatCtx, + item->getLocation().c_str(), NULL, NULL) != 0) return; // Couldn't open file // Retrieve stream information - if (av_find_stream_info(pFormatCtx) < 0) + if (avformat_find_stream_info(pFormatCtx,NULL) < 0) { - av_close_input_file(pFormatCtx); + avformat_close_input(&pFormatCtx); return; // Couldn't find stream information } // Add metadata using ffmpeg library calls @@ -303,7 +303,7 @@ addFfmpegResourceFields(item, pFormatCtx, &x, &y); // Close the video file - av_close_input_file(pFormatCtx); + avformat_close_input(&pFormatCtx); } Ref FfmpegHandler::serveContent(Ref item, int resNum, off_t *data_size) debian/patches/0008b_gcc_4.7_support.patch0000664000000000000000000001053612257721445015407 0ustar Description: Fix a FTBFS when using gcc-4.7 Origin: other, http://pkgs.fedoraproject.org/gitweb/?p=mediatomb.git;a=commitdiff;h=b96e8410 Last-Update: 2012-03-03 diff -up ./src/hash/dbo_hash.h.gcc47 ./src/hash/dbo_hash.h --- ./src/hash/dbo_hash.h.gcc47 2012-01-14 11:55:22.520261056 -0500 +++ ./src/hash/dbo_hash.h 2012-01-14 12:01:48.965302982 -0500 @@ -106,7 +106,7 @@ public: inline bool remove(KT key) { struct dbo_hash_slot *slot; - if (! search(key, &slot)) + if (! this->search(key, &slot)) return false; slot->key = deletedKey; slot->value->release(); @@ -136,7 +136,7 @@ public: inline void put(KT key, zmm::Ref value) { struct dbo_hash_slot *slot; - search(key, &slot); + this->search(key, &slot); put(key, (hash_slot_t)slot, value); } void put(KT key, hash_slot_t destSlot, zmm::Ref value) @@ -162,7 +162,7 @@ public: inline zmm::Ref get(KT key) { struct dbo_hash_slot *slot; - bool found = search(key, &slot); + bool found = this->search(key, &slot); if (found) return zmm::Ref(slot->value); else @@ -174,7 +174,7 @@ public: inline zmm::Ref get(KT key, hash_slot_t *destSlot) { struct dbo_hash_slot **slot = (struct dbo_hash_slot **)destSlot; - bool found = search(key, slot); + bool found = this->search(key, slot); if (found) return zmm::Ref((*slot)->value); else diff -up ./src/hash/dbr_hash.h.gcc47 ./src/hash/dbr_hash.h --- ./src/hash/dbr_hash.h.gcc47 2012-01-14 12:04:43.464643618 -0500 +++ ./src/hash/dbr_hash.h 2012-01-14 12:05:24.111120552 -0500 @@ -124,7 +124,7 @@ public: inline bool remove(KT key) { struct dbr_hash_slot *slot; - if (! search(key, &slot)) + if (! this->search(key, &slot)) return false; slot->key = deletedKey; int array_slot = slot->array_slot; @@ -134,7 +134,7 @@ public: return true; } data_array[array_slot] = data_array[--this->count]; - if (! search(data_array[array_slot], &slot)) + if (! this->search(data_array[array_slot], &slot)) { log_debug("DBR-Hash-Error: (%d; array_slot=%d; count=%d)\n", data_array[array_slot], array_slot, this->count); throw zmm::Exception(_("DBR-Hash-Error: key in data_array not found in hashtable")); @@ -146,7 +146,7 @@ public: inline void put(KT key) { struct dbr_hash_slot *slot; - if (! search(key, &slot)) + if (! this->search(key, &slot)) { #ifdef TOMBDEBUG if (this->count >= realCapacity) @@ -194,7 +194,7 @@ public: inline bool exists(KT key) { struct dbr_hash_slot *slot; - return search(key, &slot); + return this->search(key, &slot); } /* diff -up ./src/hash/dso_hash.h.gcc47 ./src/hash/dso_hash.h --- ./src/hash/dso_hash.h.gcc47 2012-01-14 12:13:50.755582375 -0500 +++ ./src/hash/dso_hash.h 2012-01-14 12:14:42.511463035 -0500 @@ -100,7 +100,7 @@ public: inline bool remove(zmm::String key) { struct dso_hash_slot *slot; - if (! search(key, &slot)) + if (! this->search(key, &slot)) return false; slot->key->release(); slot->value->release(); @@ -112,7 +112,7 @@ public: inline void put(zmm::String key, zmm::Ref value) { struct dso_hash_slot *slot; - search(key, &slot); + this->search(key, &slot); put(key, (hash_slot_t)slot, value); } void put(zmm::String key, hash_slot_t destSlot, zmm::Ref value) @@ -141,7 +141,7 @@ public: inline zmm::Ref get(zmm::String key) { struct dso_hash_slot *slot; - bool found = search(key, &slot); + bool found = this->search(key, &slot); if (found) return zmm::Ref(slot->value); else @@ -153,7 +153,7 @@ public: inline zmm::Ref get(zmm::String key, hash_slot_t *destSlot) { struct dso_hash_slot **slot = (struct dso_hash_slot **)destSlot; - bool found = search(key, slot); + bool found = this->search(key, slot); if (found) return zmm::Ref((*slot)->value); else debian/mediatomb-common.links0000664000000000000000000000012612257721415013466 0ustar /usr/share/javascript/prototype/prototype.js /usr/share/mediatomb/web/js/prototype.js debian/config.xml0000664000000000000000000001533212257721445011174 0ustar MediaTomb /var/lib/mediatomb /usr/share/mediatomb/web mediatomb.db localhost mediatomb mediatomb 128 5 yes no * /usr/share/mediatomb/js/common.js /usr/share/mediatomb/js/playlists.js /usr/share/mediatomb/js/import.js /usr/share/mediatomb/js/import-dvd.js metal audio/L16 no yes no video/mpeg yes yes yes debian/mediatomb.lintian-overrides0000664000000000000000000000045612257721445014527 0ustar # 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