Bug 480989

Summary: missing dependency on sqlite
Product: [Fedora] Fedora Reporter: Stepan Kasal <kasal>
Component: xulrunnerAssignee: Martin Stransky <stransky>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: high    
Version: 12CC: caillon, dmalcolm, emparq, gecko-bugs-nobody, john.ellson, johnp, lex.lists, mcepl, mtasaka, stransky, walters
Target Milestone: ---Keywords: EasyFix, Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.9.1.6-2.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-11-18 10:24:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
spec patch
none
spec patch 2
none
a safer patch
none
patch to engrave the real sqlite version none

Description Stepan Kasal 2009-01-21 16:03:17 UTC
On my randomly updated Fedora, I issued "yum update firefox"
I've got
firefox-3.1-0.4.beta2.fc11 and
xulrunner-1.9.1-0.6.beta2.fc11

But when I started firefox, an error message box said:
"The application has been updated, but your version of SQLite is too old and the application cannot run.   [ OK ]"

So I updated my sqlite-3.5.9-1.fc10 to the current sqlite-3.6.7-1.fc11 and voila, it works.

I believe firefox should require sqlite >= x.y.z.

Comment 1 John Ellson 2009-05-06 21:31:47 UTC
I'm getting the same problem on Rawhide today with:

firefox-3.5-0.20.beta4.fc11.x86_64
sqlite-3.6.12-3.fc11.x86_64
xulrunner-1.9.1-0.20.beta4.fc11.x86_64

I don't see any updates to these, even on Koji.

I don't understand what changed.  None of these have been updated in the last few days and my firefox was OK this morning before today's updates which also didn't change these (according to the announcement anyway)!

Comment 2 Christopher Aillon 2009-05-07 15:51:28 UTC
That's very strange.  Beta 4 requires sqlite 3.6.10 or greater.  The plan was to bump to 3.6.13 but that didn't make it into the beta.  Final will require 3.6.14.  I just checked and there's just a versioned BuildRequires in xulrunner.spec (which is where this needs to live), and no explicit versioned Requires but adding one won't help in this case since >=3.6.10 exists on the system per comment #1!  However, yes, AFAIK nothing got updated so I'm not quite sure what to make of this...

Comment 3 John Ellson 2009-05-07 22:42:19 UTC
Can you reproduce this?  Are there any other reports?   I'm trying to work out if I need to probe deeper on my local system, or if I should just wait for an update?

Comment 4 Christopher Aillon 2009-05-09 03:52:35 UTC
I just fully updated to rawhide, and no, I can't reproduce this...  Submitting this comment using rawhide's FF.  Perhaps strace output could help figure this out?

Comment 5 John Ellson 2009-05-09 10:33:53 UTC
Can you give me clue, or point me at a howto, on running strace on firefox?
All I can see is reams of X11 polling.

I tried running "firefox -g -d gdb"  but I'm confused by all the threads.  Is there a howto?

BTW.  This may be x86_64 specific.   I don't get the same problem on an i386 machine of the same Rawide vintage, but with a smaller set of rpms installed.

I tried "firefox -safemode", but same result, suggesting that the problem is not caused by extensions or themes.

I've tried moving aside: /usr/lib64/moz* /usr/lib64/fire* $HOME/.moz* $HOME/.fire*
then "yum reinstall firefox xulrunner sqlite"
but no change.

Comment 6 John Ellson 2009-05-09 22:50:46 UTC
OK, problem solved, my bad.

I had an old copy of sqlite installed from source.

Sorry to bother you.

Comment 7 Martin Stransky 2009-05-29 12:46:40 UTC
okay, closing as notabug.

Comment 8 Stepan Kasal 2009-06-13 16:07:34 UTC
Hi,
I'm experiencing the problem again.

xulrunner-1.9.1-0.20.beta4.fc12.i586
firefox-3.5-0.21.beta4.fc12.i586
sqlite-3.6.12-1.fc11.i586

The spec file says sqlite > 3.6.10 is BuildRequired and Required.
But this version of xulrunner was actually built against sqlite 3.6.14 and it will check on startup that that the sqlite actually used is >= 3.6.14.

I'm going to fix this by adding the following require to xulrunner:

Requires: sqlite >= %(rpm -q --qf %%{VERSION} sqlite)

Comment 9 Stepan Kasal 2009-06-13 16:54:01 UTC
I comitted my fix to cvs as xulrunner-1.9.1-0.21.beta4.fc12.
(No rebuild yet.)

Comment 10 Stepan Kasal 2009-06-13 16:58:11 UTC
Created attachment 347753 [details]
spec patch

Oops, uberpackager spell is not enough.
This is the patch to be committed

Comment 11 Matěj Cepl 2009-06-16 14:05:12 UTC
*** Bug 487676 has been marked as a duplicate of this bug. ***

Comment 12 Stepan Kasal 2009-06-16 14:34:28 UTC
Created attachment 348120 [details]
spec patch 2

Second iteration.

The runtime check is based on checking SQLITE_VERSION_NUMBER from sqlite3.h; that means that the fourth commponent of version string is ignored.  For example, versions 3.6.14.2 and 3.6.14 are equal.

I considered four places where the version can be taken from:
- rpm -q sqlite
- grep sqlite3.h
- sqlite3 --version
- pkg-config --modversion sqlite3

I was told not to use rpm -q.
All the other ways need computing the name "sqlite3" from the minimum version macro.

I tried to use SQLITE_VERSION_NUMBER, as this is exactly what is used runtime but the code I got was not a one-liner, I had to add the awk script as Source1:.
So I threw that out.

This patch gets the version number reported by sqlite3 and truncates it to three fields.

How do you like it?

Comment 13 Martin Stransky 2009-06-18 09:30:52 UTC
added to rawhide with some modifications (removed version restriction & switched to pkg-config).

Comment 14 Mamoru TASAKA 2009-06-18 10:20:00 UTC
I guess what pidgin.spec does for glib2 dependency can
be applied to xulrunner.spec:

http://cvs.fedoraproject.org/viewvc/rpms/pidgin/devel/pidgin.spec?view=co

---------------------------------------------------------------
# Require Binary Compatible glib
# returns bogus value if glib2-devel is not installed in order for parsing to succeed
# bogus value wont make it into a real package
%define glib_ver %([ -a %{_libdir}/pkgconfig/glib-2.0.pc ] && pkg-config --modversion glib-2.0 | cut -d. -f 1,2 || echo -n "999")
BuildRequires:	glib2-devel
Requires:       glib2 >= %{glib_ver}
----------------------------------------------------------------

Comment 15 Stepan Kasal 2009-06-18 10:43:51 UTC
Indeed, I invented the same trick.

In reply to comment #14, a few nits:
> [ -a %{_libdir}/pkgconfig/glib-2.0.pc ]

I would use -e instead of -a, it means the same and cannot be confused with the and operator.  Or even better, I'd use -r.
And even better, pkg-config has an option --silence-errors.

Comment 16 Stepan Kasal 2009-06-18 10:46:15 UTC
Created attachment 348410 [details]
a safer patch

This is a variant with a fallback branch.  Again, it applies to the up-to-date rawhide.

Comment 17 Stepan Kasal 2009-06-18 10:50:16 UTC
That patch from comment #16 shoudl work in koji.
But I cannot check it easily, the problem happened during checkout for srpm build, which I cannot test not having access to cvs.

Comment 18 Stepan Kasal 2009-10-27 14:43:14 UTC
Created attachment 366281 [details]
patch to engrave the real sqlite version

The patch has been updated against current devel.

It contains a fallback so that the specfile can be parsed even on machines without pkg-config installed.

Moreover, there is a sanity check at the begining of %build to prevent creating a build with crippled dependencies.

OK to apply this patch?

Comment 19 Bug Zapper 2009-11-16 09:46:34 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 20 Martin Stransky 2009-11-18 10:24:25 UTC
Added to rawhide.

Comment 21 Martin Stransky 2010-01-07 11:29:22 UTC
Added to xulrunner-1.9.1.6-2.fc12.

Comment 22 Martin Stransky 2010-01-07 11:30:00 UTC
*** Bug 549576 has been marked as a duplicate of this bug. ***

Comment 23 Martin Stransky 2010-01-07 11:30:04 UTC
*** Bug 553036 has been marked as a duplicate of this bug. ***

Comment 24 Fedora Update System 2010-01-07 12:52:57 UTC
xulrunner-1.9.1.6-2.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/xulrunner-1.9.1.6-2.fc12

Comment 25 Fedora Update System 2010-01-08 20:16:03 UTC
xulrunner-1.9.1.6-2.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 26 Mike Park 2010-01-09 22:02:45 UTC
I've got the same problem. Here are the problem versions:

## same problem re: SQLite version being too old
[emparq@bart:~]$ rpm -q firefox xulrunner
firefox-3.5.6-1.fc12.x86_64
xulrunner-1.9.1.6-2.fc12.x86_64

...and uninstalling and re-installing the older versions of these two packages still work for me:

## reinstalling older versions of just 'firefox' and 'xulrunner'
[emparq@bart:~]$ sudo rpm -e --nodeps xulrunner firefox && sudo yum install -y --disablerepo=updates firefox xulrunner

## older versions that are still working after the above command
[emparq@bart:~]$ rpm -q firefox xulrunner
firefox-3.5.4-1.fc12.x86_64
xulrunner-1.9.1.4-1.fc12.x86_64

Comment 27 Martin Stransky 2010-01-11 10:14:20 UTC
Which sqlite package do you have installed?

Comment 28 Mike Park 2010-01-12 08:28:52 UTC
Here you go:

[emparq@bart:~]$ rpm -qa sqlite
sqlite-3.6.20-1.fc12.i686
sqlite-3.6.20-1.fc12.x86_64