Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debian Package issues #330

Open
freaktechnik opened this issue Dec 1, 2014 · 13 comments
Open

Debian Package issues #330

freaktechnik opened this issue Dec 1, 2014 · 13 comments
Labels

Comments

@freaktechnik
Copy link
Member

freaktechnik commented Dec 1, 2014

This is kind of a metabug/milestone for all the issues we need to resolve with the current debian package.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/6658141-debian-package-issues?utm_campaign=plugin&utm_content=tracker%2F230233&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F230233&utm_medium=issues&utm_source=github).
@freaktechnik
Copy link
Member Author

We need to resolve #210. Also see #315 for other issues related to libraries.

@darealshinji
Copy link
Contributor

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

@freaktechnik
Copy link
Member Author

Not to self: give @darealshinji a test case to test if the disabling of ogg potentially breaks things.

@darealshinji
Copy link
Contributor

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.

@freaktechnik
Copy link
Member Author

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?

@darealshinji
Copy link
Contributor

Sorry for the question, but how do I test that code?

@freaktechnik
Copy link
Member Author

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).

@darealshinji
Copy link
Contributor

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.

@freaktechnik
Copy link
Member Author

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.

@darealshinji
Copy link
Contributor

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]

@freaktechnik
Copy link
Member Author

Oh, one of the most descriptive errors, indicating that there was an error inside a wrapped object. So anywhere and anything.

@darealshinji
Copy link
Contributor

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:

  • removed everything that's not required for builds on Debian/Ubuntu
  • removed some backup files (which I assume were accidentally created)
  • removed or updated some automake files
  • removed or fixed files that triggered Lintian during the source package creation
  • removed precompiled binary files (.exe, .a, .class, etc.)
  • deleted Firefox branding stuff, since the Firefox icons are non-free
  • taglib was updated to v1.9.1-186-g8fccaf3
  • sqlite was updated to version 3.8.8.2 (the new sqlite and taglib seem to work fine for me on Ubuntu 14.04)
  • use more system libraries in xulrunner: --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

@freaktechnik
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants