Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 37894 - Attempt at mediawiki ebuild
Summary: Attempt at mediawiki ebuild
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Christian Parpart (RETIRED)
URL:
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2004-01-11 09:16 UTC by Alex Plank
Modified: 2005-01-15 15:45 UTC (History)
15 users (show)

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


Attachments
unfinished ebuild for mediawiki (mediawiki-1.1.0.ebuild,734 bytes, application/octet-stream)
2004-01-11 09:17 UTC, Alex Plank
Details
Fixed ebuild (mediawiki-1.1.0.ebuild,691 bytes, text/plain)
2004-01-11 09:40 UTC, Alex Plank
Details
new ebuild (mediawiki-1.2.5.ebuild,910 bytes, text/plain)
2004-05-06 21:36 UTC, j.
Details
MediaWiki 1.2.6 ebuild (mediawiki-1.2.6.ebuild,2.71 KB, text/plain)
2004-06-17 19:05 UTC, Chris Williams
Details
Post install notes related to MediaWiki 1.2.6 ebuild (postintall-en.txt,1.64 KB, text/plain)
2004-06-17 19:07 UTC, Chris Williams
Details
Mediawiki 1.3.2 ebuild (mediawiki-1.3.2.ebuild,4.03 KB, text/plain)
2004-08-30 13:51 UTC, Paul Kronenwetter
Details
mediawiki-1.3.5.ebuild (mediawiki-1.3.5.ebuild,6.09 KB, text/plain)
2004-10-11 13:10 UTC, Ævar Arnfjörð Bjarmason
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Plank 2004-01-11 09:16:11 UTC
I tried to make a mediawiki ebuild.  It isn't very good (i've never written one before), but at least its a start.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Alex Plank 2004-01-11 09:17:31 UTC
Created attachment 23603 [details]
unfinished ebuild for mediawiki

Could someone with a knowledge of the portage system, please finish this?
Comment 2 Alex Plank 2004-01-11 09:40:59 UTC
Created attachment 23604 [details]
Fixed ebuild
Comment 3 Stuart Herbert (RETIRED) gentoo-dev 2004-04-23 03:35:59 UTC
Hi,

Sorry for the delay in replying.  We've been very busy putting a new
framework in place for ebuilds for web-based applications.  This has
now been added to Portage.

We need you to update your ebuild to use the new framework before we
can accept your ebuild.

Please emerge net-www/webapp-config (make sure you get version 1.2 or
later), and update your ebuild to work with this new tool.  You can
use 'man 5 webapp.eclass', 'man 5 webapp-config' and 'man 8 webapp-config'
to learn more about how your ebuild needs to work.

You can find an example ebuild, for phpmyadmin, in

	/usr/share/doc/webapp-config-1.2/
	
If you encounter any difficulties with the new framework (and we
apologise, but there are sure to be a few at first), please let us know
and we'll do our best to help you.

Best regards,
Stu
Comment 4 j. 2004-05-06 21:36:34 UTC
Created attachment 30897 [details]
new ebuild

updated ebuild using the new webapp.eclass stuff.
Comment 5 Aaron Peterson 2004-05-07 03:05:36 UTC
wow, you have the ebuild all built!

I installed it manually allready :(
I just wanna keep up on this, but it looks like it will be closed in a day or so..
Comment 6 Aaron Peterson 2004-05-15 12:55:52 UTC
found a bug, or security vulnerability.

	einfo "Installing main files"
	cp -r . ${D}${MY_HTDOCSDIR}

I have no idea how to do this in an ebuild... because people might nave nonstandard htdocsdirs...
but this belongs in /var/www/localhost/
not /var/www/localhost/htdocs

Because.. it is a security vulnerability if php fails to start.

you will also have to create a file and place it in /etc/apache2/conf/modules.d/ including:

#<IfModule mod_php3.c>
    Alias /mediawiki/ "/var/www/localhost/mediawiki/"
    <Directory "/var/www/localhost/mediawiki">
        Options Includes
        Order allow,deny
        Allow from all
    </Directory>
#</IfModule>

except you have to figure out what module it depends on!
and you should probably also figure out what to do when just mediawiki is typed in (without the trailing /"

basically, showing your php source is a super horrible idea... and that happens occasionally when upgrading php here on gentoo.
Comment 7 Aaron Peterson 2004-05-16 02:15:18 UTC
<IfModule sapi_apache2.c>
    Alias /mediawiki/ "/var/www/localhost/mediawiki/"
    <Directory "/var/www/localhost/mediawiki">
        Options Includes
        Order allow,deny
        Allow from all
    </Directory>
</IfModule>
Comment 8 Stuart Herbert (RETIRED) gentoo-dev 2004-05-16 02:27:53 UTC
We're going to be including a change in our default Apache config files, so that .php files are automatically hidden if PHP is not running.  It's not high on my priority list, but there is a bug open somewhere about this (50016 from memory, but don't quote me on that).

To be honest, if you're using **any** UNIX system (including Gentoo Linux) in a production environment, you should **always** have a staging server to test upgrades on before they are applied to a production server.

Your solution of aliasing the /mediawiki directory isn't going to be accepted.  First off, it's no good for virtual hosting support.  Secondly, it's Apache-specific (we have at least five supported web servers in Portage atm).

Best regards,
Stu
Comment 9 Chris Williams 2004-06-17 19:05:42 UTC
Created attachment 33456 [details]
MediaWiki 1.2.6 ebuild

I have attached an extended form of this ebuild and some post-install notes
(for the files directory).  The ebuild supports the math (TeX) rendering
extension (USE=tetex) and image uploading (USE=imagemagick).  The ebuild was
tested with MediaWiki 1.2.6.

I'm fairly confident about the integrity of the ebuild, but I have some
reservations about the run-time dependency for PHP and how that should be
expressed to be independent of web server (i.e. virtual/php), but still
encoding a minimum PHP version.  See my comment in the ebuild.
Comment 10 Chris Williams 2004-06-17 19:07:48 UTC
Created attachment 33457 [details]
Post install notes related to MediaWiki 1.2.6 ebuild 

Post install notes related to MediaWiki 1.2.6 ebuild 
http://bugs.gentoo.org/attachment.cgi?id=33456
Comment 11 Chris Williams 2004-06-17 19:52:36 UTC
I've just been looking thorugh the webapp.eclass itself.  Given that the eclass extends DEPEND and IUSE, the 'inherit webapp' call may need to be moved _after_ these variables are set, or the ebuild should set them thus:
DEPEND="$DEPEND ...".  I don't recall seeing this mentioned in the webapp.eclass man page.
Comment 12 Paul Kronenwetter 2004-08-30 13:51:33 UTC
Created attachment 38534 [details]
Mediawiki 1.3.2 ebuild

Modified for MediaWiki 1.3.2.

I've installed this version using this ebuild and it appears to work normally. 
The same caveats as the original ebuild as far as inexperience with the
generation of ebuilds.
Comment 13 Ævar Arnfjörð Bjarmason 2004-10-11 13:10:59 UTC
Created attachment 41576 [details]
mediawiki-1.3.5.ebuild

This obsoletes the post-install attachment notes by Chris Williams by showing
them  inline with pkg_postinst() rather than in a separate file.

It also works with 1.3.5 (just changed the name)
Comment 14 Daniel Webert 2004-10-15 20:54:24 UTC
using attachment #41576 [details] gives this error ... plz kick the webapp_postinst_txt ...
<snip>
 * Installing math support
 * (server owned) htdocs/images/math
 * (server owned) htdocs/images/tmp
 * ebuild fault: file '/usr/local/portage/net-www/mediawiki/files/postintall-en.txt' not found
 * Please report this as a bug at http://bugs.gentoo.org/

!!! ERROR: net-www/mediawiki-1.3.5 failed.
!!! Function webapp_checkfileexists, Line 59, Exitcode 0
!!! ebuild fault: file '/usr/local/portage/net-www/mediawiki/files/postintall-en.txt' not found
!!! If you need support, post the topmost build error, NOT this status message.
</snip>

and we have a small typo in the einfo 
 'After setup move the newly created LocalSettings.hp from'

and also works like charm w/ 1.3.6 - thx
Comment 15 Lance Albertson (RETIRED) gentoo-dev 2004-10-21 09:47:18 UTC
I'm going to see if this works for me or not!
Comment 16 Stefan Briesenick (RETIRED) gentoo-dev 2004-11-10 04:43:49 UTC
any chance to get this into portage?
Comment 17 Christian Parpart (RETIRED) gentoo-dev 2004-11-16 10:33:17 UTC
Hmm... I just committed an ebuild for this a few 
minutes ago and found *this* bug report / feature 
request here afterthen.

I'll merge the existing one with your ideas then :)
Comment 18 Christian Parpart (RETIRED) gentoo-dev 2004-11-16 11:32:19 UTC
I adapted the ebuild to your ideas found in the 
ebuilds right here. Please test them (they're 
masked) and give me some feedback on it.

Regards,
Christian Parpart.
Comment 19 Wolfgang Loeffler 2004-12-01 07:52:39 UTC
I tested the hard-masked ebuild on amd64, it works very well!
Images and formulas: all ok.
Could you please set the "~amd64"-keyword?
Greetings, wolfgang
Comment 20 Christian Parpart (RETIRED) gentoo-dev 2004-12-05 05:18:23 UTC
* added ~amd64 (no problem ;)
* removed hardmask as I already emerged it on several vhosts successively.

I'll close this bug as the ebuild is in portage for a good while now.