Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 343275 - www-apps/mediawiki-1.15.5 should have an sqlite USE flag; www-apps/mediawiki-1.16.0 should depend on php[sqlite,pdo] whet USEd with +sqlite3
Summary: www-apps/mediawiki-1.15.5 should have an sqlite USE flag; www-apps/mediawiki-...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Web Application Packages Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-29 17:40 UTC by matthias.grobarek
Modified: 2010-11-28 09:37 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description matthias.grobarek 2010-10-29 17:40:22 UTC
I’ve been running MediaWiki on top of Apache, PHP and SQLite for some time now. Back when I used PHP 5.2, its SQLite support depended on SQLite 2 – all other apps on my system could cope with SQLite 3, though. When I saw PHP’s USE flag "pdo" depended on SQLite 3 as well, I activated it but I failed to see that the hard dependency on SQLite 2 was still active. I forgot about the USE flag but left it activated.

Lately I upgraded PHP to 5.3.3-r1 which depended solely on SQLite 3 when using +sqlite3 instead of +sqlite. So I took this opportunity to get rid of SQLite 2 and threw away the "pdo" USE flag for PHP as well. Since that PHP upgrade, MediaWiki stopped working. Apache gave me these error messages in the error log:

[Fri Oct 29 18:37:16 2010] [error] [client ::1] PHP Fatal error:  Class 'PDO' not found in /var/www/localhost/htdocs/mediawiki/includes/db/DatabaseSqlite.php on line 56

Fortunately this led me to the solution: recompile PHP with +pdo and I’m done, MediaWiki works again.

Now this leads me to the conclusion that MediaWiki used with SQLite needs not only SQLite itself but also PHP compiled with SQLite and PDO support. This should be reflected in the ebuilds.

Only mediawiki-1.16.0 seems to have adopted an sqlite USE flag (sqlite3), earlier versions don’t have one. So I suggest:
• Add an sqlite (or sqlite3) USE flag to MediaWiki <1.16.0. When this flag is used, the ebuild should depend on dev-db/sqlite as well as dev-lang/php[sqlite3,pdo]
• Modify the RDEPEND in MediaWiki >=1.16.0 so when +sqlite3 is used, the ebuild also depends on dev-lang/php[sqlite3,pdo]

Reproducible: Always

Steps to Reproduce:
Probably (not tested like this):
1. USE="sqlite3 -pdo" emerge mediawiki
2. Open a browser on the MediaWiki URL

Actual Results:  
You will get a 500 error (oddly, not properly displayed in either Firefox or Opera, had to use wget to see it) and an appropriate Apache error message in /var/log

Expected Results:  
A working MediaWiki installation due to PDO being automatically USEd.

emerge --info says:

Portage 2.1.8.3 (default/linux/amd64/10.0/desktop, gcc-4.4.4, glibc-2.11.2-r2, 2.6.34-gentoo-r12 x86_64)
=================================================================
System uname: Linux-2.6.34-gentoo-r12-x86_64-AMD_Phenom-tm-_II_X4_965_Processor-with-gentoo-2.0.1
Timestamp of tree: Fri, 29 Oct 2010 07:30:20 +0000
app-shells/bash:     4.1_p7
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r3, 3.1.2-r4
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.3
sys-apps/sandbox:    2.3-r1
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.4-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA @FREE ut2003 skype-eula RTCW-ETEULA dlj-1.1 PUEL teamspeak3 AdobeFlash-10 AdobeFlash-10.1"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=amdfam10 -O2 -mfpmath=sse -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /usr/share/openvpn/easy-rsa"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=amdfam10 -O2 -mfpmath=sse -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.hadiko.de/pub/dists/gentoo/gentoo"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en de ja"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/Spring /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X Xaw3d a52 aac acl acpi aim alsa amd64 amr anthy ao apm audiofile bash-completion berkdb bidi bzip2 cairo cdda cddb cdparanoia cdr chroot cjk cli consolekit cracklib crypt css cups curl cxx dbus dri dts dvd dvdnav dvdr eds emboss enca encode exif faac faad fam fbcon ffmpeg firefox flac fontconfig foomaticdb ftp gcrypt gd gdbm geoip gif gimp gloox gmp gnome gnutls gpm gs gstreamer gtk hal iconv icq icu id3 id3tag idn imagemagick imap imlib immqt-bc ipod ipv6 irc jabber jack java java6 javascript joystick jpeg jpeg2k kde lame latex lcms libcaca libnotify libsamplerate libwww lm_sensors logitech-mouse lzma lzo m17n-lib mad matroska memlimit midi mikmod mime mmap mmx mmxext mng modplug modules mp2 mp3 mp4 mpeg mplayer mudflap multilib musepack nautilus ncurses network nls nntp nptl nptlonly nsplugin offensive ogg openal opengl openmp oscar otr pam pango pcre pdf perl pic png policykit posix ppds pppd prime qt3support qt4 quicktime rar readline realmedia recode rss rtsp samba sasl sdl session sharedmem sndfile snmp sockets socks5 soundtouch speex sse sse2 sse3 sse4a ssl startup-notification subversion svg sysfs syslog system-sqlite sysvipc taglib tcpd theora threads tiff truetype twolame udev unicode usb vcd vdpau videos vorbis wavpack wma wmf x264 xcb xft xine xml xorg xpm xprint xulrunner xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev keyboard mouse joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de ja" PHP_TARGETS="php5-2" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev vesa fglrx radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


Additionally, I originally had this set in /etc/portage/package.use:

dev-lang/php apache2 -berkdb -sqlite sqlite3 -imap -sharedmem
Comment 1 August Hörandl 2010-11-04 19:57:14 UTC
Just for the records:

i just tried to create/configure a new mediawiki (1.16.0, build with USE=sqlite3):

* php without USE=pdo: sqlite is NOT offered as a database backend
* php with USE=pdo: sqlite is offered as a database backend


so mediawiki needs dev-lang/php[sqlite3,pdo]
Comment 2 Tim Harder gentoo-dev 2010-11-28 09:37:59 UTC
Fixed in CVS. Note that I changed the USE flag to be sqlite rather than sqlite3 for both versions.