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.
Created attachment 23603 [details] unfinished ebuild for mediawiki Could someone with a knowledge of the portage system, please finish this?
Created attachment 23604 [details] Fixed ebuild
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
Created attachment 30897 [details] new ebuild updated ebuild using the new webapp.eclass stuff.
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..
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.
<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>
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
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.
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
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.
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.
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)
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
I'm going to see if this works for me or not!
any chance to get this into portage?
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 :)
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.
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
* 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.