Bug 213511

Summary: Review Request: gxine - Gnome frontend for the xine multimedia library
Product: [Fedora] Fedora Reporter: Mola Pahnadayan <mola.mp>
Component: Package ReviewAssignee: Michel Alexandre Salim <michel.salim>
Status: CLOSED DUPLICATE QA Contact: Fedora Package Reviews List <fedora-package-review>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: gauret, martin.sourada, michel.salim, panemade
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-01-06 16:20:53 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 201449    
Attachments:
Description Flags
errors i got which i used gxine
none
Patch to gxine.spec
none
Updated spec
none
spec file with mozplugin subpackage
none
Patch to Martin's latest spec
none
New gxine spec
none
The LIRC patch
none
Patch to fix DBUS interface to gnome-screensaver
none
Fixed screensaver patch, borrowed from Totem
none
New screensaver patch
none
gxine-0.5.9 spec none

Description Mola Pahnadayan 2006-11-01 13:57:53 EST
Spec URL: http://c100c.com/fedora/gxine.spec
SRPM URL: http://www.c100c.com/fedora/gxine-0.5.8-1.src.rpm
Description: gxine is a fully-featured free audio/video player for unix-like systems which
uses libxine for audio/video decoding and playback. For more informations on
what formats are supported, please refer to the libxine documentation.
gxine is a gtk based gui for this xine-library alternate to xine-ui.
Comment 1 Michel Alexandre Salim 2006-11-01 21:53:17 EST
Preliminary review:

rpmlint:
- clean on srpm
- one warning on binary: "incoherent-version-in-changelog 0.5.8 0.5.8-1"

To fix this, add the release number to your changelog entries

BuildRequires:
glib2-devel is redundant (pulled in by gtk2-devel)
gettext is missing

You need to use the find_lang macro to find the locale files, not hardcode them
yourself:

http://fedoraproject.org/wiki/Packaging/Guidelines#head-8c605ebf8330f6d505f384e671986fa99a8f72ee

Comment 2 Parag AN(पराग) 2006-11-02 01:27:26 EST
rpmlint is not silent on SRPM
W: kaffeine mixed-use-of-spaces-and-tabs (spaces: line 25, tab: line 16)
The specfile mixes use of spaces and tabs for indentation, which is a
cosmetic annoyance.  Use either spaces or tabs for indentation, not both.

W: kaffeine patch-not-applied Patch1: kaffeine-0.8.2-codecs.patch
A patch is included in your package but was not applied. Refer to the patches
documentation to see what's wrong.

rpmlint is not silent on RPM
E: kaffeine script-without-shebang /usr/share/doc/kaffeine-0.8.2/ChangeLog
This text file has executable bits set or is located in a path dedicated
for executables, but lacks a shebang and cannot thus be executed.  If the file
is meant to be an executable script, add the shebang, otherwise remove the
executable bits or move the file elsewhere.

E: kaffeine script-without-shebang /usr/share/doc/kaffeine-0.8.2/TODO
This text file has executable bits set or is located in a path dedicated
for executables, but lacks a shebang and cannot thus be executed.  If the file
is meant to be an executable script, add the shebang, otherwise remove the
executable bits or move the file elsewhere.

W: kaffeine dangling-symlink /usr/share/doc/HTML/en/kaffeine/common
/usr/share/doc/HTML/en/common
The symbolic link points nowhere.

W: kaffeine symlink-should-be-relative /usr/share/doc/HTML/en/kaffeine/common
/usr/share/doc/HTML/en/common
Absolute symlinks are problematic eg. when working with chroot environments.

E: kaffeine script-without-shebang /usr/share/doc/kaffeine-0.8.2/AUTHORS
This text file has executable bits set or is located in a path dedicated
for executables, but lacks a shebang and cannot thus be executed.  If the file
is meant to be an executable script, add the shebang, otherwise remove the
executable bits or move the file elsewhere.

/tmp/kaffeine-0.8.2-3.i386.rpm.26889/usr/share/applications/kde/kaffeine.desktop:
warning: file contains key "DocPath", this key is currently reserved for use 
within KDE, and should in the future KDE releases be prefixed by "X-"

Solve these errors and resubmit new package. I hope all rpmlint warnings and
errros are self explanatory here.
Comment 3 Parag AN(पराग) 2006-11-02 01:31:33 EST
oops, Sorry Mola i replied to wrong BUG
Actually i had opened both new xine review requests and took first kaffine and
checked that package and wrongly replied here without seeing bug number.
sorry again
Comment 4 Parag AN(पराग) 2006-11-02 03:46:24 EST
heres review for your package.
Got same results for rpmlint on RPM and SRPM as Michel got.

use 
%find_lang gxine

and remove .mo listings under %files

Then i installed on my FC6 T3 machine and got errors
what may i missings?
Comment 5 Parag AN(पराग) 2006-11-02 03:58:12 EST
Created attachment 140095 [details]
errors i got which i used gxine
Comment 6 Michel Alexandre Salim 2006-11-02 11:12:11 EST
Uh, Parag, it looks from your desktop integration errors that you're running
gxine as the *root* user? Those are just because the directories you were
writing to did not exist.

I do get the 'xine-lib: error: The xine engine failed to start.: No demuxer
found - stream format not recognized.' errors as well. They keep appearing on
stderr, together with a dialog box saying the same thing, until I kill gxine.
Comment 7 Michel Alexandre Salim 2006-11-02 11:15:20 EST
Also, from the INSTALL file provided by gxine, it looks like you might want to
BuildReq on several other optional packages: libxext-dev (for DPMS, presumably
so gxine can stop your screen from blanking during playback), Xinerama, etc.
Comment 8 Michel Alexandre Salim 2006-11-02 13:21:32 EST
So, the error is because the /usr/share/gxine/logo.mpv file that gxine tries to
open on startup .. cannot be played without the nonfree codecs. Problem goes
away after installing xine-lib-extras-nonfree from Livna, which is not a viable
solution for an Extras package.

You might want to ask Upstream if they could change the format used for the logo
file. Or alternatively, patch gxine not to load the file.
Comment 9 Michel Alexandre Salim 2006-11-02 14:06:30 EST
Accidentally moved it to the wrong bug tracker
Comment 10 Mola Pahnadayan 2006-11-03 02:03:54 EST
Update

Spec :  http://www.c100c.com/fedora/gxine.spec
Rrpm :  http://www.c100c.com/fedora/gxine-0.5.8-2.src.rpm

i patch it for use free logo.ogg
some fix
help for :) %{name}.theme.mo file 

Comment 11 Michel Alexandre Salim 2006-11-03 13:01:06 EST
Created attachment 140298 [details]
Patch to gxine.spec

Several things:
- The find-lang.sh in redhat-rpm-config does not support the --all-name switch,
so I'm using the one in /usr/lib/rpm instead. The proper way of using
%find_lang is commented out, you can uncomment it when redhat-rpm-config is
updated

- the version numbers you use in the changelog were incorrect. Separate version
number and release number with -, not .

You might want to consider BuildReq:ing the other libraries specified in the
INSTALL file? A lot of them are in core and/or extras, so you might want to
turn on support for them. Dual-monitor people will be really annoyed if you
don't link against Xinerama :)
Comment 12 Mola Pahnadayan 2006-11-07 02:00:18 EST
Update

Spec :  http://www.c100c.com/fedora/gxine.spec
Rrpm :  http://www.c100c.com/fedora/gxine-0.5.8-3.src.rpm

thanks Michel Alexandre 
some fix
Comment 13 Michel Alexandre Salim 2006-11-07 13:32:32 EST
Created attachment 140580 [details]
Updated spec

There are missing BuildReqs still. The INSTALL file in the tarball describes
what libraries you want to link against and why; I've added them (libXext for
DPMS, dbus-glib-devel for controlling the screensaver, and libXaw-devel and
nspr-devel for the Mozilla browser plugin).

Versioning the dependencies is not required if the target distribution has the
required packages. Also, your Requires: declarations are not necessary either.
RPM automatically adds those in (try rpm -qp --requires <binary rpm>).

Building this in mock now to test.
Comment 14 Michel Alexandre Salim 2006-11-07 16:47:45 EST
Also needed: BRs on libXtst-devel and gnome-screensaver (for some reason, the
test for gnome-screensaver is done at build time, ugh). You might want to
manually Require: gnome-screensaver since RPM won't pick this one up

The alternative is to not BR: gnome-screensaver, but then people using gxine
will get annoyed when their screensaver kicks in during playback.
Comment 15 Michel Alexandre Salim 2006-11-10 17:03:24 EST
ping.

The package is almost ready, if you fix comment #14 and nothing else is wrong
I'll approve it.
Comment 16 Martin Sourada 2006-11-12 17:30:52 EST
Hi, about a week ago I also made a package for gxine and now I go through this
thread... I want to help you if I could with your package, so I took a rough
look and I saw some differences between our packages. 

The most notable is that I include gxine browser plug-in (though I have there an
error - subpackage gxine-mozplugin should have Group: Applications/Multimedia
instead of Group: Video). There is also a little difference between our BR
sections (I looked for BR in configure.in)... Also I use %find_lang (combined
with echo and cat you can handle it) and update desktop database in %post and
%postun sections. I saw that you don't handle the desktop file at all. The rest
of your package is handled better than mine I think. Well, one another thought,
I don't know if it is needed, but I think you should remove non-free mime types
(like audio/x-mp3).

My source package (gziped) is here:
http://forums.fedoraforum.org/forum/attachment.php?attachmentid=10272

My second though for your package review is possible bug in gxine. It crashes to
me randomly (when starting to play a video; using my package, yours I did not
tried yet). Terminal output is this: 
CDROMREADTOCHDR: Chyba vstupu/výstupu
WARN: error in ioctl CDROMREADTOCHDR: Chyba vstupu/výstupu

WARN: error reading PVD sector (16) error -1
CDROMREADTOCHDR: Input/Output error
WARN: error in ioctl CDROMREADTOCHDR: Chyba vstupu/výstupu

WARN: error reading PVD sector (16) error -1
Unauthorized access to memory (SIGSEGV)

I should say that I have livna's xine-lib-extras-nonfree installed and I, at
first, thought that it might be caused by wrongly implemented non-free codec,
but in kaffeine (too using xine-lib) all is fine.
Comment 17 Martin Sourada 2006-11-12 17:36:20 EST
Well, I see I did not translated whole output. Where is 'Chyba vstupu/výstupu'
you should have 'Intput/Output error'. So the WHOLLY translated output should
look like this:

CDROMREADTOCHDR: Input/Output error
WARN: error in ioctl CDROMREADTOCHDR: Input/Output error

WARN: error reading PVD sector (16) error -1
CDROMREADTOCHDR: Input/Output error
WARN: error in ioctl CDROMREADTOCHDR: Input/Output error

WARN: error reading PVD sector (16) error -1
Unauthorized access to memory (SIGSEGV)

Sorry for that.
Comment 18 Michel Alexandre Salim 2006-11-13 00:41:23 EST
It's probably not necessary to remove the non-free MIME types, otherwise, when
xine-lib-extras-nonfree is installed gxine would still not be used to open MP3s
etc. Back when Red Hat/Fedora still ships XMMS, it still would be set up to open
MP3s, it would just display a message informing the user that MP3 playback is
disabled.

The latest .spec I posted as part of the review did have the BRs to have the
browser plugin built. I agree with Martin though that it probably should be
split into a subpackage. %find_lang is also used (Martin, check out
/usr/lib/rpm/find-lang.sh - it has a --all-name option that the version called
by %find_lang does not have).

I just realized I forgot about the desktop file. Good call.
Comment 19 Mola Pahnadayan 2006-11-13 01:21:16 EST
Update

Spec :  http://www.c100c.com/fedora/gxine.spec
Rrpm :  http://www.c100c.com/fedora/gxine-0.5.8-4.src.rpm

Add libXtst-devel in build requires

Comment 20 Martin Sourada 2006-11-13 09:54:02 EST
(In reply to comment #18)
> It's probably not necessary to remove the non-free MIME types, otherwise, when
> xine-lib-extras-nonfree is installed gxine would still not be used to open MP3s
> etc. Back when Red Hat/Fedora still ships XMMS, it still would be set up to open
> MP3s, it would just display a message informing the user that MP3 playback is
> disabled.
Yes, if it does not violate fedora guidelines than it is better to leave it as
it is :-).

> The latest .spec I posted as part of the review did have the BRs to have the
> browser plugin built. I agree with Martin though that it probably should be
> split into a subpackage.
No, you don't build (I think) browser plug-in and you do not install it (at this
point I am sure). Check INSTALL file for more info. You must copy or symlink the
gxineplugin.so to /usr/lib/mozilla/plugins. About splitting: not necessary, I
think, but all packages I have seen have browser plug-in in subpackage.
 
> %find_lang is also used (Martin, check out
> /usr/lib/rpm/find-lang.sh - it has a --all-name option that the version called
> by %find_lang does not have).
I just like the look of %find_lang more - I don't like hard-coded paths in spec
file if not necessary.
Comment 21 Martin Sourada 2006-11-13 09:56:25 EST
Some hints about BR according to INSTALL:
> gxine will use the following libraries if their header files are available at
> compile time:
>
>   X DPMS extn
This is in library libXext-devel

> gxine will use the following libraries unless configured not to do so or
> their header files aren't available at compile time:

>   dbus (glib)
library dbus-glib-devel

> gxine requires the following packages at compile time:
>
>   pkg-config
library pkgconfig

> gxine's browser plugin requires the following libraries:
>
>    X Athena widgets

> gxine's browser plugin requires the following packages at compile time:
>
>  libnspr
libraries libXaw-devel and nspr-devel

From configure.ac I can read one another optional BR: libXrandr-devel and also
it checks for pango (pango-devel) - not optional.

So I think you should add BuildRequire: nspr-devel libXaw-devel pkgconfig
pango-devel. Other BR is on your judge since they are optional.
Comment 22 Michel Alexandre Salim 2006-11-13 17:12:25 EST
Mola is not currently building the browser plugin; the latest spec I posted,
however, does (see attachment #140580 [details] and comment #13)

gtk2-devel depends on pango-devel, so pango-devel does not have to be explicitly
required.

To summarize:
Missing BRs:
libXext-devel (prevent display blanking during playback. important!)
gnome-screensaver (don't ask me why, but it's being detected at compile time)

libXaw-devel and nspr-devel (for browser plugin. Also need to symlink to
%{_libdir}/mozilla/plugins, and optionally split this into a subpackage)

Unnecessary:
All the Requires: lines. rpm will add in dependencies on the proper library
files necessary, and the versioned dependency for Xine is unnecessary since the
lowest version of Xine we ship in Extras is sufficient.

Comment 23 Michel Alexandre Salim 2006-11-13 17:15:22 EST
The --all-name will be usable from the normal %find_lang once redhat-rpm-config
is updated, it'll be an easy fix to remove the hardcoding once that takes place.

Comment 24 Martin Sourada 2006-11-13 18:38:20 EST
(In reply to comment #22)
> Mola is not currently building the browser plugin; the latest spec I posted,
> however, does (see attachment #140580 [details] [edit] and comment #13)
Sorry, I overlooked the attachment. 

> gtk2-devel depends on pango-devel, so pango-devel does not have to be explicitly
> required.
Also overlooked.
Comment 25 Martin Sourada 2006-11-14 16:30:52 EST
Created attachment 141188 [details]
spec file with mozplugin subpackage

I attach my revised specfile. I have fixed fixed all rpmlint errors and
warnings, included your logo's patch, edited the spec to follow fedora
packaging guidelines, in mozplugin sub-package I created symlink instead of
copying the library and I included all optional build dependencies.
Comment 26 Michel Alexandre Salim 2006-11-14 22:33:42 EST
Reviewing Martin's:
- Summary: gxine does not really use any gnome libraries, so perhaps call it
"GTK+ frontend" instead

URL does not allow direct download. Change to one of the SF.net download server
that does have gxine? (easynews.dl.sourceforge.net works, for instance)

For some reason libXrandr and libXtst dependencies are not picked up by RPM,
which is strange. Not sure what we need to do about that yet.


BuildReqs:
Pkgconfig is not explicitly required (all -devel packages that provide a .pc
file depends on it)

%setup:
You need to pass --with-dbus to configure, otherwise support is not turned on by
default. --disable-static is optional since it's the default, but good to have,
I guess.

configure needs to be patched to fix lirc detection on x86_64 - see next comment.

Browser plugin: perhaps move it instead of symlinking?

%post / %postun:
- You need to update the icon cache as well.
Comment 27 Michel Alexandre Salim 2006-11-14 22:37:22 EST
Created attachment 141214 [details]
Patch to Martin's latest spec

Patch to Martin's spec. I'm posting the full spec as well but it's easier to
see the differences this way
Comment 28 Michel Alexandre Salim 2006-11-14 22:39:17 EST
Created attachment 141215 [details]
New gxine spec

The new spec, with the LIRC patch. Also updates icon cache after
(un-)installation, and move browser plugin instead of symlinking
Comment 29 Michel Alexandre Salim 2006-11-14 22:40:41 EST
Created attachment 141218 [details]
The LIRC patch

Replace the /lib /usr/lib /usr/local/lib nonsense with just ${libdir} since
that's where Fedora's LIRC is. This also makes it work on x86_64
(libdir=/usr/lib64)
Comment 30 Michel Alexandre Salim 2006-11-14 22:43:23 EST
Mola, please have a look at the latest .spec and consider merging in the
changes. Let me know if there's any change you don't think should be applied and
your reasoning. Thanks!

Martin, is gxine still crashing on you?
Comment 31 Martin Sourada 2006-11-15 09:45:45 EST
(In reply to comment #26)
> - Summary: gxine does not really use any gnome libraries, so perhaps call it
> "GTK+ frontend" instead
You are right. It should be GTK frontend
 
> URL does not allow direct download. Change to one of the SF.net download server
> that does have gxine? (easynews.dl.sourceforge.net works, for instance)
This one can work, I think:
http://superb-west.dl.sourceforge.net/sourceforge/xine/gxine-0.5.8.tar.bz2

> For some reason libXrandr and libXtst dependencies are not picked up by RPM,
> which is strange. Not sure what we need to do about that yet.

I will try how gxine works without them installed. 

> BuildReqs:
> Pkgconfig is not explicitly required (all -devel packages that provide a .pc
> file depends on it)
Overlooked

>configure needs to be patched to fix lirc detection on x86_64 - see next comment. 
I don't have x86_64 machine so I did not know about the problem.

> Browser plugin: perhaps move it instead of symlinking?
I used the way they suggested in INSTALL file, but copying should work, too. 
Comment 32 Martin Sourada 2006-11-15 09:59:43 EST
(In reply to comment #30)

> Martin, is gxine still crashing on you?
> 

Yes, still crashing. Do you have any idea whence the SIGSEGV come? I noticed
that the first part of error message (everything without the line with SIGSEGV)
also appears when adding videos to playlist - this part appears once for each file:
> CDROMREADTOCHDR: Input/Output error
> WARN: error in ioctl CDROMREADTOCHDR: Input/Output error
>
> WARN: error reading PVD sector (16) error -1

And this very line appears before gxine crashes - as far as I remember it
happens only when opening the video:
> Unauthorized access to memory (SIGSEGV)

And it seems that it happens to one certain file. Maybe the problem is in the
very file, but kaffeine plays it without problems. I will try to find out more
about the problem.
Comment 33 Martin Sourada 2006-11-15 10:25:13 EST
(In reply to comment #32)

> And it seems that it happens to one certain file. Maybe the problem is in the
> very file, but kaffeine plays it without problems. I will try to find out more
> about the problem.

Checked all my videos - it happens to 9 out of 45 videos. I will try to check
what is the connection between them. I must say though that all of them are
encoded with DivX/mpeg-4/XviD so if the problem is due to codec we will not try
to solve it here, I think.
Comment 34 Michel Alexandre Salim 2006-11-15 10:45:54 EST
I've had one troublesome video (Doug Lenat's lecture at Google, downloadable
from Google Video in - unfortunately - mp4 format) that can't be seeked from
gxine but plays fine in mplayer. But agreed, it's not a packaging bug, it
probably should just be filed upstream.

Could you compile the standard xine player on your computer and see if it's a
xine-lib problem or a gxine problem?
Comment 35 Martin Sourada 2006-11-15 10:56:55 EST
(In reply to comment #34)

> Could you compile the standard xine player on your computer and see if it's a
> xine-lib problem or a gxine problem?

I think that it is not xine-lib bug, since in totem and kaffeine (both using
xine-lib as backend in my computer) it plays without problems. But I will
install xine still, and check it to be sure.
Comment 36 Martin Sourada 2006-11-15 11:02:54 EST
Ok, installed xine from livna. Result is: gxine bug. In xine it works.
Comment 37 Michel Alexandre Salim 2006-12-16 09:24:36 EST
Created attachment 143854 [details]
Patch to fix DBUS interface to gnome-screensaver

This review seems stall. Mola, please respond within one week if you are still
interested. Martin has expressed an interest in maintaining this otherwise.
Comment 38 Michel Alexandre Salim 2006-12-16 11:53:14 EST
Created attachment 143858 [details]
Fixed screensaver patch, borrowed from Totem

Turns out just changing the message name is not enough. I ported the code to
handle the old and new screensaver API from Totem
Comment 39 Michel Alexandre Salim 2006-12-16 23:40:31 EST
Created attachment 143863 [details]
New screensaver patch

Updated patch to 0.5.9, also fixes an upstream bug (change priv to gtv->priv)
Comment 40 Michel Alexandre Salim 2006-12-16 23:49:41 EST
Created attachment 143864 [details]
gxine-0.5.9 spec

Updated spec to 0.5.9
Comment 41 Mola Pahnadayan 2006-12-17 02:36:18 EST
gxine 0.5.9

checking for gnome-screensaver-command... /usr/bin/gnome-screensaver-command
checking for DBUS... configure: error: Package requirements (dbus-glib-1) were
not met:
Package dbus-1 was not found in the pkg-config search path.
Perhaps you should add the directory containing `dbus-1.pc'
to the PKG_CONFIG_PATH environment variable
Package 'dbus-1', required by 'dbus-glib', not found
Comment 42 Martin Sourada 2006-12-17 06:01:56 EST
(In reply to comment #41)
> gxine 0.5.9
> 
> checking for gnome-screensaver-command... /usr/bin/gnome-screensaver-command
> checking for DBUS... configure: error: Package requirements (dbus-glib-1) were
> not met:
> Package dbus-1 was not found in the pkg-config search path.
> Perhaps you should add the directory containing `dbus-1.pc'
> to the PKG_CONFIG_PATH environment variable
> Package 'dbus-1', required by 'dbus-glib', not found

Try adding 
BuildRequires: dbus-devel
Comment 43 Michel Alexandre Salim 2006-12-17 17:22:28 EST
Ah, right. I've been wondering if dbus-devel is required or not.
Comment 44 Martin Sourada 2006-12-30 08:01:06 EST
I have finally discovered, by accident, the core of the problem with gxine
crashing while playing certain videos, though I still don't know why I encounter
it only with some movies... I have not right gamma on my monitor, so I use gamma
correction (via video>post-processing eq2 plugin) to get the right colors. But,
lately, I turned the post-processing for video off and gxine suddenly stopped
segfaulting. Furthermore, I discovered, that if I enable eq2 plugin in
video>deinterlacing gxine still works. So I moved eq2 plugin from
video>post-processing to video>deinterlacing and gxine now works as it ought to. 

My conclusion about the problem therefore is that video>post-processing in gxine
is very unstable. Furthermore, I recently installed gxine on a different machine
and tried to set up and enable video>post-processing - and without crashes I was
able to enable it only via file>configure>preferences dialog... It only supports
my conclusion.
Comment 45 Michel Alexandre Salim 2007-01-06 16:20:53 EST
Submitter unresponsive; Martin is going to submit his review request instead
Comment 47 Mamoru TASAKA 2007-01-11 14:13:35 EST

*** This bug has been marked as a duplicate of 222326 ***