 |
 |
 |
 |
| Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc. |

4th February 2010, 05:19 AM
|
|
Registered User
|
|
Join Date: Feb 2010
Location: Upstate New York
Posts: 4

|
|
Help: Enabling sqlite in Fedora 12
I'm having a bit of trouble with a web server running Fedora 12. Apache works fine, and serves up php content without a hitch. My problem is SQLite -- I thought that it was built into php5, but support is disabled in the repo version. phpinfo shows this as part of the configure command:
Code:
'--without-sqlite' ... '--disable-pdo' ... '--without-sqlite3'
The only solution I've read anywhere is "compile php from source," but I'd like to avoid that if possible, for ease of future upgrades. Is there a way to convince php to use sqlite despite its current state? Thanks to anyone who can offer some insight.
|

5th February 2010, 04:22 AM
|
|
Registered User
|
|
Join Date: Oct 2006
Posts: 4,752

|
|
Rebuild the rpm.
|

11th February 2010, 02:29 PM
|
|
Registered User
|
|
Join Date: Feb 2010
Location: Upstate New York
Posts: 4

|
|
yum-builddep fails
Dies, thanks for the quick reply. I've grabbed the src.rpm for php and modified the spec file so that it will include sqlite when it is rebuilt. The problem I am now running into, however, is that when I run
Code:
sudo yum-builddep php-5.3.1-1.fc12.src.rpm
It returns
Code:
Loaded plugins: refresh-packagekit
updates/metalink | 12 kB 00:00
Traceback (most recent call last):
File "/usr/bin/yum-builddep", line 196, in <module>
util = YumBuildDep()
File "/usr/bin/yum-builddep", line 64, in __init__
self.main()
File "/usr/bin/yum-builddep", line 93, in main
self.get_build_deps(opts)
File "/usr/bin/yum-builddep", line 173, in get_build_deps
for srpm in toActOn:
UnboundLocalError: local variable 'toActOn' referenced before assignment
To me this looks like a bug with yum-builddep, but this is my first time rebuilding an rpm, so it's very possible I've botched it somewhere. Anyone with similar experiences? Perhaps someone who has gleaned the magic steps needed to eliminate these errors?
|

11th February 2010, 04:11 PM
|
|
Registered User
|
|
Join Date: Oct 2006
Posts: 4,752

|
|
Yeah, that's not anything you're doing wrong, it's just... well Fedora.
If you haven't tried "yum clean all", "yum update" yet, do that then try again. If you still get the same failure I would suggest
a.) File a bug
b.) Install any requirements/dependencies listed in the spec manually so you can get your package built
|

11th February 2010, 04:20 PM
|
|
Registered User
|
|
Join Date: Feb 2010
Location: Upstate New York
Posts: 4

|
|
Thanks for both of your replies, I appreciate the help
Yeah, the process I've run through is
yum clean all
yum update
yum-builddep
a) yep, just filed one: https://bugzilla.redhat.com/show_bug.cgi?id=563946
b) I was going to try that, but I have one question about the binary package that will be built as a result: will it be portable to another fedora 12 system? I'm building this on a box I set up to be identical to a production machine, and want to test this new php build before deploying on the production machine.
|

11th February 2010, 04:37 PM
|
|
Registered User
|
|
Join Date: Oct 2006
Posts: 4,752

|
|
Quote:
Originally Posted by opensourcefool
b) I was going to try that, but I have one question about the binary package that will be built as a result: will it be portable to another fedora 12 system? I'm building this on a box I set up to be identical to a production machine, and want to test this new php build before deploying on the production machine.
|
As long as they are the same arch and you don't mess too much with the dependencies listed in the spec, sure, just like any other rpm. You'll have to install it using "--nogpgcheck" but doesn't matter since you built it yourself.
If you really want to be proper you can rebuild it using mock.
http://fedoraproject.org/wiki/Projects/Mock
But that's not really necessary for a package you just rebuilt from an upstream rpm.
|

14th February 2010, 06:53 PM
|
|
Registered User
|
|
Join Date: Dec 2009
Location: Dublin,Ireland
Posts: 101

|
|
I also had the same issue and was trying to fix it without success, so it's good to know that it was a bug. It has been fixed, but the update has still not been pushed downstream (it's in testing):
https://admin.fedoraproject.org/upda...DORA-2010-1728
----------
Update
I did "yum update --enablerepo=updates-testing yum-utils" to get yum-utils-1.1.26 and it has indeed fixed the problem.
Quote:
Originally Posted by opensourcefool
Dies, thanks for the quick reply. I've grabbed the src.rpm for php and modified the spec file so that it will include sqlite when it is rebuilt. The problem I am now running into, however, is that when I run
Code:
sudo yum-builddep php-5.3.1-1.fc12.src.rpm
It returns
Code:
Loaded plugins: refresh-packagekit
updates/metalink | 12 kB 00:00
Traceback (most recent call last):
File "/usr/bin/yum-builddep", line 196, in <module>
util = YumBuildDep()
File "/usr/bin/yum-builddep", line 64, in __init__
self.main()
File "/usr/bin/yum-builddep", line 93, in main
self.get_build_deps(opts)
File "/usr/bin/yum-builddep", line 173, in get_build_deps
for srpm in toActOn:
UnboundLocalError: local variable 'toActOn' referenced before assignment
To me this looks like a bug with yum-builddep, but this is my first time rebuilding an rpm, so it's very possible I've botched it somewhere. Anyone with similar experiences? Perhaps someone who has gleaned the magic steps needed to eliminate these errors?
|
Last edited by Piscium; 14th February 2010 at 07:08 PM.
Reason: update
|

15th February 2010, 06:02 PM
|
|
Registered User
|
|
Join Date: Feb 2010
Location: Upstate New York
Posts: 4

|
|
Until the update clears testing, you could try a quick workaround. This is from a python programmer I work with, no guarantees it will work (I had to take the system I was working on offline for the weekend):
toActOn is only created when srcnames is not empty:
Code:
if srcnames:
self.setupSourceRepos()
exact, match, unmatch = yum.packages.parsePackages(self.pkgSack.returnPackages(), srcnames, casematch=1)
srpms += exact + match
if len(unmatch):
exact, match, unmatch = yum.packages.parsePackages(self.rpmdb.returnPackages(), unmatch, casematch=1)
if len(unmatch):
self.logger.error("No such package(s): %s" %
", ".join(unmatch))
sys.exit(1)
toActOn = [] for newpkg in srpms:
toActOn.extend(_best_convert_pkg2srcpkgs(self, opts, newpkg))
# Get the best matching srpm toActOn = self.bestPackagesFromList(toActOn, 'src')
try putting toActon = [] before the if statement.
|

20th February 2010, 09:07 AM
|
 |
Registered User
|
|
Join Date: Feb 2010
Posts: 2

|
|
@Piscium THX!
I had the same problem, while trying to make a custom kernel from fedora wiki
HTML Code:
http://fedoraproject.org/wiki/Docs/CustomKernel
with that command:
Code:
su -c 'yum-builddep kernel-<version>.src.rpm'
Your trick solved the problem:
Code:
yum update --enablerepo=updates-testing yum-utils
Reserpine
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 10:00 (Saturday, 18-05-2013)
|
|
 |
 |
 |
 |
|
|