[mono-packagers] Moonlight for Debian - packaging report

Jo Shields directhex at apebox.org
Sun Oct 5 17:50:41 EDT 2008


I'm hoping that this report on Moonlight packaging should be helpful
both to upstream and other distribution developers. The same is true of
Ubuntu as well (indeed, the actual package development was done on
Ubuntu first).

== Source Issues ==
=== Missing LICENSE ===
Moonlight 0.8.1
(http://ftp.novell.com/pub/mono/sources/moon/moon-0.8.1.tar.bz2) is
missing a LICENSE file. This has been manually worked around using SVN,
and we use a machine-readable copyright format anyway
(http://svn.debian.org/wsvn/pkg-mono/moon/trunk/debian/copyright?op=file&rev=0&sc=0)

=== Extra binary DLLs ===
Moonlight 0.8.1 contains two binary DLLs:
  + ./test/harness/test-runner/NDesk.Options.dll
  + ./test/harness/test-runner/MySql.Data.dll
Whilst these obviously aren't needed for moon to operate, it's not
considered acceptable by Debian's powers that be to include binary-only
builds with unknown version numbers. It would be vastly preferable if
DLLs needed for the test harness were replaced with source code
snapshots (or, indeed, excluded entirely)

=== Silverlight.js ===
Moonlight 0.8.1 contains four copies of an unmodifiable Silverlight.js:
  + ./test/xaml/Silverlight.js
  + ./test/xaml/clock/Silverlight.js
  + ./test/xaml/enums/Silverlight.js
  + ./test/xaml/fullscreen/Silverlight.js
The Silverlight SDK 1.0 license
(http://msdn.microsoft.com/en-us/silverlight/bb743266.aspx) means these
files aren't even technically distributable:

"2. a. iii. Distribution Restrictions. You may not distribute
Distributable Code for use with any runtime other than Microsoft
Silverlight runtimes;".

It's certainly not modifiable ("2. a. iii. Distribution Restrictions.
You may not modify or distribute the source code of any Distributable
Code so that any part of it becomes subject to an Excluded License. An
Excluded License is one that requires, as a condition of use,
modification or distribution, that others have the right to modify it.")

And any arguments should go to debian-legal at lists.debian.org, not me.

=== Summary ===
The second two of the three points above have forced us to "dfsg" the
package, which essentially means we build our own altered "upstream"
tarball without any problem files included. It carries a slightly higher
maintainer overhead.

== Compilation Issues ==
A full build log from the package is attached, for reference. However,
the following sections deserve highlighting:

=== Rpath ===
[code]
(cd /tmp/buildd/moon-0.8.1
+dfsg/plugin/firefox/ff3; /bin/bash /tmp/buildd/moon-0.8.1
+dfsg/plugin/firefox/ff3/../../../libtool  --tag=CXX --mode=relink g++
-fno-inline -g -fno-inline-functions -g -DCOMPATIBILITY_BUGS=1
-Wl,-Bsymbolic-functions -o libmoonplugin-ff3bridge.la
-rpath /usr/lib/moon/plugin ff3-bridge.lo ff3-dom.lo ff3-http.lo
-L/usr/lib/xulrunner-devel-1.9.0.3/lib -lxpcomglue_s -lxul -lxpcom
-lpthread -ldl ../../libmoonplugin.la ../../../src/libmoon.la -lrt
-inst-prefix-dir /tmp/buildd/moon-0.8.1+dfsg/debian/tmp)
[/code]

Forcing non-standard RPATH is considered a problem in Debian, and is
flagged up by our package sanity checker 'lintian' as a problem. It's
discussed in depth at http://wiki.debian.org/RpathIssue

Rather than manually hacking on the build system, we are reversing this
unneccessary setting later in the build:
[code]
# Mangle rpath for lintain cleanness
chrpath -d /tmp/buildd/moon-0.8.1
+dfsg/debian/tmp/usr/lib/moon/plugin/libmoonplugin-ff3bridge.so.0.0.0
[/code]

Note that there are NO observed adverse effects from doing this with our
packages.

=== Over-eager linking ===
Our dependency building mechanisms perform some analysis of whether a
given link is actually required or not, to help minimise enormous
dependency chains. The following are flagged up:

[code]
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonplugin.so
shouldn't be linked with libavcodec.so.1d (it uses none of its symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonplugin.so
shouldn't be linked with libtheora.so.0 (it uses none of its symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonplugin.so
shouldn't be linked with libvorbisenc.so.2 (it uses none of its
symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonplugin.so
shouldn't be linked with libraw1394.so.8 (it uses none of its symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonplugin.so
shouldn't be linked with libavutil.so.1d (it uses none of its symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonplugin.so
shouldn't be linked with libvorbis.so.0 (it uses none of its symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonplugin.so
shouldn't be linked with libogg.so.0 (it uses none of its symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonplugin.so
shouldn't be linked with libfreetype.so.6 (it uses none of its symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonplugin.so
shouldn't be linked with libfontconfig.so.1 (it uses none of its
symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonplugin.so
shouldn't be linked with libatk-1.0.so.0 (it uses none of its symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonplugin.so
shouldn't be linked with libgdk_pixbuf-2.0.so.0 (it uses none of its
symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonplugin.so
shouldn't be linked with libpangocairo-1.0.so.0 (it uses none of its
symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonplugin.so
shouldn't be linked with libpango-1.0.so.0 (it uses none of its
symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonplugin.so
shouldn't be linked with libcairo.so.2 (it uses none of its symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonplugin.so
shouldn't be linked with libgmodule-2.0.so.0 (it uses none of its
symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonplugin.so
shouldn't be linked with libasound.so.2 (it uses none of its symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonplugin.so
shouldn't be linked with libz.so.1 (it uses none of its symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonplugin.so
shouldn't be linked with librt.so.1 (it uses none of its symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonloader.so
shouldn't be linked with libavcodec.so.1d (it uses none of its symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonloader.so
shouldn't be linked with libtheora.so.0 (it uses none of its symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonloader.so
shouldn't be linked with libvorbisenc.so.2 (it uses none of its
symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonloader.so
shouldn't be linked with libraw1394.so.8 (it uses none of its symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonloader.so
shouldn't be linked with libavutil.so.1d (it uses none of its symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonloader.so
shouldn't be linked with libvorbis.so.0 (it uses none of its symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonloader.so
shouldn't be linked with libogg.so.0 (it uses none of its symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonloader.so
shouldn't be linked with libfreetype.so.6 (it uses none of its symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonloader.so
shouldn't be linked with libfontconfig.so.1 (it uses none of its
symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonloader.so
shouldn't be linked with libgtk-x11-2.0.so.0 (it uses none of its
symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonloader.so
shouldn't be linked with libgdk-x11-2.0.so.0 (it uses none of its
symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonloader.so
shouldn't be linked with libatk-1.0.so.0 (it uses none of its symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonloader.so
shouldn't be linked with libgdk_pixbuf-2.0.so.0 (it uses none of its
symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonloader.so
shouldn't be linked with libpangocairo-1.0.so.0 (it uses none of its
symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonloader.so
shouldn't be linked with libpango-1.0.so.0 (it uses none of its
symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonloader.so
shouldn't be linked with libcairo.so.2 (it uses none of its symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonloader.so
shouldn't be linked with libgobject-2.0.so.0 (it uses none of its
symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonloader.so
shouldn't be linked with libgmodule-2.0.so.0 (it uses none of its
symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonloader.so
shouldn't be linked with libgthread-2.0.so.0 (it uses none of its
symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonloader.so
shouldn't be linked with libasound.so.2 (it uses none of its symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonloader.so
shouldn't be linked with libz.so.1 (it uses none of its symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonloader.so
shouldn't be linked with libpthread.so.0 (it uses none of its symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonloader.so
shouldn't be linked with librt.so.1 (it uses none of its symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-core/usr/lib/moon/plugin/libmoonloader.so
shouldn't be linked with libgcc_s.so.1 (it uses none of its symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-mozilla/usr/lib/moon/plugin/libmoonplugin-ff3bridge.so.0.0.0 shouldn't be linked with libpthread.so.0 (it uses none of its symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-mozilla/usr/lib/moon/plugin/libmoonplugin-ff3bridge.so.0.0.0 shouldn't be linked with libdl.so.2 (it uses none of its symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-mozilla/usr/lib/moon/plugin/libmoonplugin-ff3bridge.so.0.0.0 shouldn't be linked with libmoon.so.0 (it uses none of its symbols).
dpkg-shlibdeps: warning:
debian/moonlight-plugin-mozilla/usr/lib/moon/plugin/libmoonplugin-ff3bridge.so.0.0.0 shouldn't be linked with librt.so.1 (it uses none of its symbols).
dpkg-shlibdeps: warning: debian/libmoon0/usr/lib/libmoon.so.0.0.0
shouldn't be linked with libtheora.so.0 (it uses none of its symbols).
dpkg-shlibdeps: warning: debian/libmoon0/usr/lib/libmoon.so.0.0.0
shouldn't be linked with libvorbisenc.so.2 (it uses none of its
symbols).
dpkg-shlibdeps: warning: debian/libmoon0/usr/lib/libmoon.so.0.0.0
shouldn't be linked with libraw1394.so.8 (it uses none of its symbols).
dpkg-shlibdeps: warning: debian/libmoon0/usr/lib/libmoon.so.0.0.0
shouldn't be linked with libvorbis.so.0 (it uses none of its symbols).
dpkg-shlibdeps: warning: debian/libmoon0/usr/lib/libmoon.so.0.0.0
shouldn't be linked with libogg.so.0 (it uses none of its symbols).
dpkg-shlibdeps: warning: debian/libmoon0/usr/lib/libmoon.so.0.0.0
shouldn't be linked with libatk-1.0.so.0 (it uses none of its symbols).
dpkg-shlibdeps: warning: debian/libmoon0/usr/lib/libmoon.so.0.0.0
shouldn't be linked with libpangocairo-1.0.so.0 (it uses none of its
symbols).
dpkg-shlibdeps: warning: debian/libmoon0/usr/lib/libmoon.so.0.0.0
shouldn't be linked with libpango-1.0.so.0 (it uses none of its
symbols).
dpkg-shlibdeps: warning: debian/libmoon0/usr/lib/libmoon.so.0.0.0
shouldn't be linked with libgmodule-2.0.so.0 (it uses none of its
symbols).
dpkg-shlibdeps: warning: debian/libmoon0/usr/lib/libmoon.so.0.0.0
shouldn't be linked with libdl.so.2 (it uses none of its symbols).
dpkg-shlibdeps: warning: debian/libmoon0/usr/lib/libmoon.so.0.0.0
shouldn't be linked with libgthread-2.0.so.0 (it uses none of its
symbols).
[/code]

We're not doing anything fancy with our linking, and this causes us some
fairly extended dependencies:
[code]
Package: libmoon0
Depends: libasound2 (>> 1.0.14), libatk1.0-0 (>= 1.20.0), libavcodec1d
(>= 0.cvs20070307), libavutil1d (>= 0.cvs20070307), libc6 (>= 2.4),
libcairo2 (>= 1.6.0), libfontconfig1 (>= 2.4.0), libfreetype6 (>=
2.3.5), libgcc1 (>= 1:4.1.1-21), libglib2.0-0 (>= 2.16.0), libgtk2.0-0
(>= 2.12.0), libogg0, libpango1.0-0 (>= 1.20.5), libraw1394-8, libstdc
++6 (>= 4.1.1-21), libtheora0, libvorbis0a (>= 1.2.0), libvorbisenc2 (>=
1.1.2), zlib1g (>= 1:1.2.3.3.dfsg-1)

Package: moonlight-plugin-core
Depends: libasound2 (>> 1.0.14), libatk1.0-0 (>= 1.20.0), libavcodec1d
(>= 0.cvs20070307), libavutil1d (>= 0.cvs20070307), libc6 (>= 2.4),
libcairo2 (>= 1.6.0), libfontconfig1 (>= 2.4.0), libfreetype6 (>=
2.3.5), libgcc1 (>= 1:4.1.1-21), libglib2.0-0 (>= 2.14.0), libgtk2.0-0
(>= 2.12.0), libmoon0, libogg0, libpango1.0-0 (>= 1.20.5), libraw1394-8,
libstdc++6 (>= 4.1.1-21), libtheora0, libvorbis0a (>= 1.2.0),
libvorbisenc2 (>= 1.1.2), zlib1g (>= 1:1.2.3.3.dfsg-1)

Package: moonlight-plugin-mozilla
Depends: libc6 (>= 2.4), libgcc1 (>= 1:4.1.1-21), libmoon0, libstdc++6
(>= 4.1.1-21), moonlight-plugin-core (>= 0.8.1+dfsg-1), xulrunner-1.9
[/code]

I expect a number of these come from libavcodec, and the problem will go
away when libavcodec is replaced with the MS plugin pack - but we have
concerns about Moonlight becoming another arch-constrained plugin like
Flash if we need to rely on third parties for codecs.

=== Summary ===
There are no insurmountable problems with packaging, but certainly with
the Rpath issue it would be ice to analyse exactly why this Rpath is set
(I can't imagine a scenario where the bridge would be loaded in
isolation from the rest of the plugin such that it's necessary)

== Summary ==
We now have a functional initial package ready for offering Moonlight to
users, with the SL 1.0 profile. All current work can be seen in our SVN
repository, at
http://svn.debian.org/wsvn/pkg-mono/moon/trunk/debian/?rev=0&sc=0

SL 2.0 support will be added to the packaging at some point in the
future, after Mono 2.0 packages have been tested & validated
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.log
Type: text/x-log
Size: 173290 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-packagers-list/attachments/20081005/e49d2b6b/attachment-0001.bin 


More information about the mono-packagers-list mailing list