Darwin Streaming Server (DSS) is Apple’s Open Source variant of commercially available Quicktime Streaming Server. In currently available version 6.0.3 there is a lot broken when trying to build that server from source under Linux (e.g. Gentoo Linux in our case).
It took some hours to fix the sources so they fit Linux build environment. Some of the found bugs make it hard to believe that this source builds under MacOS X, obviously used by DSS core developers. Find attached a patch providing a successful build process at least. Here is a short explanation on how to build and install DSS under Linux:
- Get a copy of DSS from dss.macforge.com!
- Untar DSS source archive to a folder of your choice!
- Download attached patch into the same folder.
- Change to that folder and type
# gunzip patch.gz # patch -p1 <patch
- Invoke build of DSS by typing
# ./Buildit install
- After compiling a subfolder (DarwinStreamingSrvr6.0.3-Linux) is created ready for real installation. Change to that folder and type
# ./Install
- Check output of Install. It might state user “qtss” being unknown. Then you probably need to add this user manually.
In Gentoo creating group qtss prior to user qtss didn’t succeed since Gentoo demands to join this user to the group of same name, thus you need to type# useradd qtss -g qtss
- Enter administrator’s username and password on demand.
The DSS is running now, but prefers to authenticate requests using Apple’s Open Directory Service, which is defunct due to the applied patch. Thus you need disable the related module in server’s configuration and restart it afterwards.
- Open file /etc/streaming/streamingserver.xml in your favourite (XML) editor.
- Search for the PREF-node with attribute name having value “modDSAuth_enabled” and change the node’s value from true to false. In XML source code your line should look like this afterwards:
<PREF NAME="modDSAuth_enabled" TYPE="Bool16" >false</PREF>
- Find and kill processes of running DSS and DSS Admin Server typing
# kill `ps axo user,pid,cmd|grep treaming|grep qtss|awk '{print $2}'` - Restart DSS Admin Server by typing
# /usr/local/sbin/streamingsadminserver.pl
Now it’s time to open a web browser of your choice and point it to http://yourserver:1220 to finalize and start using your installation of DSS.
Some honest notes on provided patch:
- The patch is excluding some parts of code using conditional compiling. After applying it those excluded parts of code are compiled under MacOS X, only. I didn’t test whether or not they are working under FreeBSD, Win32 oder SunOS etc. and thus should be kept included under those operating systems.
- The included module QTSSDSAuthModule integrates Apple’s Open Directory Service to authorize requests. Since this isn’t available under Linux the patch is basically excluding calls for unsupported libraries, while runtime configuration is then adjusted to completely disable this module.
- Another MacOS-specific part is checking a user’s membership in a given group. I tried to simulate the behaviour using POSIX-functions getpwnam() and getgrnam(), but didn’t test that code.
- Currently I’m happy to have a running instance of DSS after 10-15 hours of analyzing and debugging, succeeding to login, managing administrative actions and streaming sample movies as broadcast and on demand to VLC and Quicktime player. Nevertheless I don’t know if some features essential for others are broken after patching sources.
All these disadvantages of my patch kept me from providing it as an official one to make current or any upcoming release compiling under Linux again.
UPDATE on November, 17th 2010: The previously provided patch didn’t succeed on AMD64 platforms due to testing wrong definitions thus resulting in using wrong code. Though this problem has been fixed there are still issues resulting in binaries dead-locking due to thread interaction. As I didn’t find time to fix that issue here you’re advised to check out one of the other available tutorials such as this (tested here, but in German) or that.