Open freaktechnik opened 9 years ago
We need to resolve #210. Also see #315 for other issues related to libraries.
libxul.so: libtheora
can be solved by building xulrunner with --disable-ogg
.
Warnings about images and jars in /usr/lib could be solved by adding this code to override_dh_install:
cp -f debian/nightingale.links.in debian/nightingale.links
prefix=debian/tmp/usr ;\
DIR=$$prefix/lib/nightingale/ ;\
\
files=$$(\
find $$DIR -name \*.png -printf '%p '; \
find $$DIR -name \*.gif -printf '%p '; \
find $$DIR -name \*.jpg -printf '%p '; \
find $$DIR -name \*.xpm -printf '%p '; \
find $$DIR -name \*.jar -printf '%p ';) ;\
\
for f in $$files; do \
in=$$(echo $$f | sed -e "s:$$prefix:/usr:") ;\
out=$$(echo $$f | sed -e "s:$$prefix/lib:$$prefix/share:") ;\
target=$$(echo $$out | sed -e "s:$$prefix:/usr:") ;\
mkdir -v -p $$(dirname $$out) ;\
mv -v $$f $$(dirname $$out) ;\
echo $$target' '$$in | tee -a debian/nightingale.links ;\
done
It moves the files into /usr/share and creates symbolic links. You could also create a binary-independend nightingale-common package, which I did for my own PPA: https://launchpad.net/~djcj/+archive/ubuntu/nightingale/+packages
Not to self: give @darealshinji a test case to test if the disabling of ogg potentially breaks things.
I've created a fork of nightingale-deps and removed everything that's not needed for package building on Debian systems or might not be conform with Debian guidelines: https://github.com/darealshinji/nightingale-deps/
Packaging files for the deps are here: https://github.com/darealshinji/nightingale-deps/tree/debian-packaging This package will then contain the .tar.lzma files in /usr/lib/nightingale-deps.
This package can then be used as a build dependency for the actual Nightingale package. Instead of running the build script, the tarball is instead extracted into the dependencies directory and the Makefile is used directly.
I'd assume that's without ogg support for xulr? If yes, does https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsISound#play%28%29 sill work? To test it run code similar to Components.classes["@mozilla.org/sound;1"].createInstance(Components.interfaces.nsISound).play("fille:///home/djcj/test.ogg")
work and play the specified file?
Sorry for the question, but how do I test that code?
Oh, I forgot the end of the sentence: run the code in the text field at the top of the error console (by pressing enter or the evaluate button).
I get this error:
Error: uncaught exception: [Exception... "Could not convert JavaScript argument arg 0 [nsISound.play]" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: javascript:%20Components.classes["@mozilla.org/sound;1"].createInstance(Components.interfaces.nsISound).play("file:///home/djcj/test.ogg") :: <TOP_LEVEL> :: line 1" data: no]
The same happens with the 1.12.1 release.
But I don't see any problems with ogg support missing since it doesn't affect ogg vorbis playback for me.
There is a difference between ogg playback in our mediacore and playback through gecko. Since some extensions use it, I want to make sure it's not broken. And I just realized that nsISound takes an nsIURL, so this'd look like Components.classes["@mozilla.org/sound;1"].createInstance(Components.interfaces.nsISound).play(Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService).newURI("file:///home/djcj/test.ogg", null, null))
Also, adjust the file path to actually lead to a valid ogg file.
Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISound.play]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: javascript:%20Components.classes["@mozilla.org/sound;1"].createInstance(Components.interfaces.nsISound).play(Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService).newURI("file:///home/djcj/test.ogg",%20null,%20null)) :: <TOP_LEVEL> :: line 1" data: no]
Oh, one of the most descriptive errors, indicating that there was an error inside a wrapped object. So anywhere and anything.
I was working on building packages which are more Debian guidelines-friendly and use more system libraries. Most changes must be applied to the nightingale-deps stuff. I've created a fork and made quite some changes: https://github.com/darealshinji/nightingale-deps
A summary:
--disable-ogg --with-system-jpeg --with-system-zlib --with-system-bz2 --with-system-nspr --with-system-libevent --with-system-nss --enable-system-hunspell --enable-system-sqlite --enable-system-cairo
The dependencies are created as a separate Debian package, providing the tarball with sqlite, taglib and xulrunner. The NG package will use that package as a build-dependency. To prevent warnings about jars and images being stored in /usr/lib I'm moving some stuff to /usr/share and replace it with symbolic links. The only remaining Lintian tag is an error about the embedded sqlite library in sbDBEngine.so. I've tried linking it against the system's shared library which didn't really work. NG didn't even really start up, it just showed an error message about the database being currupted. With the embedded sqlite 3.8.8.2 it worked fine.
Here are the packaging files: https://github.com/darealshinji/nightingale-deps/tree/debian-packaging
With Xulr8 there will be --with-system-ffi
. From my research XULR doesn't actualy link against libogg until xulr2, which is weird, but there's very little information out there.
This is kind of a metabug/milestone for all the issues we need to resolve with the current debian package.