Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 194894 - [webapps-experimental overlay] www-apps/knowledgetree needs a PHP5-compatible version in the tree
Summary: [webapps-experimental overlay] www-apps/knowledgetree needs a PHP5-compatible...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High major with 2 votes (vote)
Assignee: Default Assignee for New Packages
URL:
Whiteboard:
Keywords: EBUILD, InOverlay
Depends on:
Blocks:
 
Reported: 2007-10-06 10:26 UTC by Jakub Moc (RETIRED)
Modified: 2009-04-29 13:46 UTC (History)
5 users (show)

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


Attachments
Patch to add missing .htaccess entries for php5 (knowledgetree-3.4.3-php5.patch,621 bytes, patch)
2007-10-14 22:20 UTC, Matthew Kasa (RETIRED)
Details | Diff
knowledgetree-3.4.3.ebuild.patch (knowledgetree-3.4.3.ebuild.patch,7.07 KB, patch)
2007-10-24 18:32 UTC, MT
Details | Diff
knowledgetree-3.4.3-config.patch (knowledgetree-3.4.3-config.patch,1.54 KB, patch)
2007-10-24 18:32 UTC, MT
Details | Diff
knowledgetree-3.4.3-php5.patch (knowledgetree-3.4.3-php5.patch,14.14 KB, patch)
2007-10-24 18:33 UTC, MT
Details | Diff
ktdms.conf (ktdms.conf,462 bytes, patch)
2007-10-24 18:33 UTC, MT
Details | Diff
postinstall-en-3.4.3.txt (postinstall-en-3.4.3.txt,1.48 KB, patch)
2007-10-24 18:33 UTC, MT
Details | Diff
postupgrade-en-3.4.3.txt (postupgrade-en-3.4.3.txt,511 bytes, text/plain)
2007-10-24 18:34 UTC, MT
Details
config-hook-3.4.3.sh (config-hook-3.4.3.sh,226 bytes, text/plain)
2007-10-24 18:34 UTC, MT
Details
ktdms.eclass (ktdms.eclass,979 bytes, text/plain)
2007-10-24 18:34 UTC, MT
Details
knowledgetree-3.5.2b.ebuild (knowledgetree-3.5.2b.ebuild,2.80 KB, text/plain)
2008-04-30 04:52 UTC, Elias Probst
Details
Xvfb init script (xvfb,569 bytes, text/plain)
2008-06-14 00:09 UTC, Yohan
Details
soffice init (soffice,671 bytes, text/plain)
2008-06-14 00:10 UTC, Yohan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Moc (RETIRED) gentoo-dev 2007-10-06 10:26:15 UTC
AFAIK they have a development branch which is PHP5 compatible; please bump this ASAP. PHP4 is going to be masked for security in about a week and the only knowledgetree version we have requires PHP4.
Comment 1 Matthew Kasa (RETIRED) gentoo-dev 2007-10-14 22:20:55 UTC
Created attachment 133476 [details, diff]
Patch to add missing .htaccess entries for php5

knowledgetree-3.4.3 can be made to work with php5 by patching the included .htaccess, and changing need_php4_httpd to need_php_httpd in the ebuild.
Comment 2 Christian Hoffmann (RETIRED) gentoo-dev 2007-10-19 19:39:42 UTC
p.mask'ed along with the big php-4 mask as it would have broken the deptree otherwise.
Comment 3 MT 2007-10-24 18:32:08 UTC
Created attachment 134252 [details, diff]
knowledgetree-3.4.3.ebuild.patch

attached there is an improved www-apps/knowledgetree ebuild plus a patch set to make the application run with PHP5.

here the changelog for the ebuild patch:
- removed USE "office ps pdf opendoc" because are mandatary dependencies and not optional;
- all the KTDMS dependencies are RDEPEND, and not DEPEND;
- forced the use of PHP5;
- added missing Smarty, PEAR and PECL dependencies;
- removed all the Smarty and PEAR packages bundled with KTDMS (they are outdated and buggy, so it's better to use the one from the portage tree);
- modified the PHP source code to use the the native JSON extension of PHP instead of the bundled PEAR-JSON (this dramastically improve the application performance);
- fixed all the issues with the docs made by the ebuild, probably a wrong heritage from the 3.0.x ebuild (3.0.x branch is incompatible with the 3.4.x serie);
- documents, caches and logs are saved in a shared environment into /var/* directories (as suggested by the official documentation), avoiding the usage of local dirs into the HTDOCSDIR. this ensure transparent upgrades of the application, eliminating a lot of troubles to the end users (and also to ebuild maintainers);
- for the USE "vhosts" is proposed a ready-to-use apache vhost file (less troubles for the end users);
- added LINGUAS support (throught the ktdms.eclass to simplify ebuild maintainance) downloading automatically the right Language Plugins from the KTForge (NOTE: not all the language plugins from KTForge are working, need some care when maintainers add new languages to the ebuild);
- KTDMS require OpenOffice 2.x to work correctly (some Core Plugins rely on the python facilities from the OOffice Framework) so i have added virtual/ooo to the RDEPEND;

as AT i have spend two days to test the application on both Gentoo/Linux and Gentoo/FreeBSD archs tring to figure out all the possible PHP5 errors; i think to have fixed all the major problems, but probably still exists others.
Comment 4 MT 2007-10-24 18:32:36 UTC
Created attachment 134253 [details, diff]
knowledgetree-3.4.3-config.patch
Comment 5 MT 2007-10-24 18:33:03 UTC
Created attachment 134255 [details, diff]
knowledgetree-3.4.3-php5.patch
Comment 6 MT 2007-10-24 18:33:20 UTC
Created attachment 134256 [details, diff]
ktdms.conf
Comment 7 MT 2007-10-24 18:33:37 UTC
Created attachment 134258 [details, diff]
postinstall-en-3.4.3.txt
Comment 8 MT 2007-10-24 18:34:01 UTC
Created attachment 134259 [details]
postupgrade-en-3.4.3.txt
Comment 9 MT 2007-10-24 18:34:23 UTC
Created attachment 134261 [details]
config-hook-3.4.3.sh
Comment 10 MT 2007-10-24 18:34:44 UTC
Created attachment 134262 [details]
ktdms.eclass
Comment 11 Gunnar Wrobel (RETIRED) gentoo-dev 2007-10-29 14:29:50 UTC
Thanks for the submission!

Sorry for the delay on this one. I started on friday and this turned out to be a little bit more complex than I envisioned. So I'm still not done, but you deserve at least an update.

I'm of course in trouble since knowledgetree 3.5.1 got released last week.
                                                                                                                             
I already have an ebuild for a developmental version of pre 3.5.* from Kevin Fourie (knowledgetree dev) in our webapps overlay.
                                                                                                                             
Now I think I'm need to merge all the different versions of the ebuilds. I can't directly import the files as you provided them. I'll comment on the some of the changes you made and hope you take a look at my suggestion for the knowledgetree ebuild in the webapps overlay.

Concerning inherit:

 - The webapp-apache eclass is outdated and not being used anymore

Concerning RDEPEND:
            
 - A webapp never depends on mysql. The mysql db could be installed on a different server on the web. There is usually no requirement to install mysql locally.

 - A webapp usually does not depend on apache. Most web applications can easily be served with another web server. You can use "virtual/httpd-cgi" to indicate that a web application requires a cgi capable web server. In the case of knowledgetree this might be slightly justified since it extensively uses .htaccess but still you could serve it via a different web server.

Concerning pkg_setup:

 - Why not use:

   require_php_with_use "session nls json mysqli mysql"

Concerning src_unpack:

 - I removed the php5 patch since this should be obsolete with KT-3.5.1

Concerning src_install:

 - Never remove files within ${S} (for a webapp the usual
   approach is "copy first, remove in destination")

 - Stuff is also never moved from the WORKDIR but instead copied. Reason for this is that "src_install" must leave in a state that it could be run twice in succession (without running "clean" before).

 - ebegin/eend shouldn't be used too frequently. The user usually does not need debugging messages.

 - I removed the language pack installation since we seldom add plugins to a webapp. This may be done in extreme cases if a plugin is used nearly every time with the main app. But in general the vendor does distribute stuff as a plugin in order to be more flexible. For our side this means a tremendous amount of additional work to cope with this flexibility. So we do this only when really, really necessary. Rather document the plugin installation for the end user.

 - Using /var/knowledgetree violates the Gentoo directory layout. I do not fully understand why this should be preferred. I found no such reference in the Knowledgetree docs. In any case you would not want only one such directory across several virtual hosts. You might rather install this into a hostroot if really necessary (e.g. in /var/www/localhost/knowledgetree-3.5.1/)

Concerning pkg_postinst:

 - If somehow possible provide instuctions using the postinst file. I didn't see a reason why this should not be possible here.


The current, merged version can be found at 

http://overlays.gentoo.org/proj/webapps/browser/experimental/www-apps/knowledgetree

It does not work yet since it still misses some PEAR deps and probably still has other problems but it will still take some time until I can continue there.

Maybe you can check the ebuild and comment on it or my remarks in this bug.
Comment 12 Ezequiel Valenzuela 2008-03-23 16:39:45 UTC
It seems that the latest 3.5.x (3.5.2) release does support php5 properly.

From http://www.knowledgetree.com/products/whats-new:

-->

KnowledgeTree 3.5.2

This is KnowledgeTree’s first production-ready release of our new PHP5 and MySQL5-based stack. The move to PHP5 provides a modern application environment that will bring improved performance and stability. This stack also brings support for Windows® Vista® and a host of new features detailed below. 

<--

Do we have a volunteer for updating the ebuild(s)?

I'd be happy with an ebuild in the "webapps-experimental" overlay or just an attachment here.

Thank you in advance.
Comment 13 Elias Probst 2008-04-30 04:52:06 UTC
Created attachment 151393 [details]
knowledgetree-3.5.2b.ebuild

Knowledgetree needs PHP to be compiled with the 'tokenizer' USE flag.
Used the 3.5.1 ebuild from the experimental webapps overlay and added the check for this + bumped it to 3.5.2b.
Comment 14 Yohan 2008-06-14 00:09:08 UTC
Created attachment 156689 [details]
Xvfb init script

Xvfb init script for headless X
Comment 15 Yohan 2008-06-14 00:10:18 UTC
Created attachment 156691 [details]
soffice init

OpenOffice init script for headless config.
Comment 16 Christian Hoffmann (RETIRED) gentoo-dev 2008-08-09 23:45:26 UTC
Sadly noone had the time/motivation to update this package to work with php5, which lead to its removal along with every other php-4-only software.
Re-assigning to maintainer-wanted because of that.
Comment 17 Momesso Andrea 2009-04-29 13:46:40 UTC
Knowledgetree 3.6.0 should work using php 5.1.6 or above.

http://docs.knowledgetree.com/manuals/ig/system_requirements.html