| Summary: | Ebuild request : JpGraph - OO Graph Library for PHP | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Hans-Henry Jakobsen <hanshj> |
| Component: | New packages | Assignee: | PHP Bugs <php-bugs> |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | gentoo-bugs2 |
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| URL: | http://www.aditus.nu/jpgraph/ | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: |
jpgraph.tbz2
Alternate suggestion Alternate Suggestion - take 2 |
||
|
Description
Hans-Henry Jakobsen
2003-07-02 05:37:04 UTC
weird, i thought i had added this one already ive used it before, pretty nice app :) Vapier: please use the php-ext eclass to put this in. Created attachment 14122 [details]
jpgraph.tbz2
cd /usr/portage/dev-php/
tar -jxvf jpgraph.tbz2
the trouble with this package rob is that it isnt a module ... its a class
written in php ... the other trouble is it requires gd support to be enabled in
php ... i could make a script to test that if you want ...
This is great. But I would suggest that /usr/lib/php/jpgraph would be a better place for this. Created attachment 15067 [details]
Alternate suggestion
Not necessarily better, just different. I had written this before I saw this
bug here, perhaps it has something useful to offer...
Created attachment 15068 [details]
Alternate Suggestion - take 2
/var/cache is not writable by apache...
only reason i put it under /home/httpd/htdocs/ was because of the fact you need to include() this library ... didnt bother worrying about permissions and such Hi everyone, I've committed an ebuild to handle this, based on Carl's attached ebuild. Main difference is that it relies on a couple of eclasses that I've added this evening to help standardise behaviour. I haven't tested jpgraph once installed, so it'd be great if you could test it, and let me know of any bugs or problems. Also, I haven't tested installing this on a machine that doesn't have Apache installed (all my boxes have Apache on them). Thanks, Stu # emerge jpgraph
Calculating dependencies ...done!
>>> emerge (1 of 1) dev-php/jpgraph-1.12.2 to /
>>> md5 src_uri ;-) jpgraph-1.12.2.tar.gz
* Configuring cache dir /var/cache/jpgraph for Apache v2
/usr/sbin/ebuild.sh: line 104: /dev/stdout: Permission denied
php-lib
/usr/sbin/ebuild.sh: line 104: /dev/stdout: Permission denied
webapp-apache
/usr/sbin/ebuild.sh: line 88: /dev/stdout: Permission denied
apache2
install: cannot change permissions of
`/var/tmp/portage/jpgraph-1.12.2/image//home/httpd/htdocs': Operation not permitted
touch: cannot touch `/var/tmp/portage/jpgraph-1.12.2/image///home/httpd/htdocs/.keep':
Permission denied
!!! ERROR: dev-php/jpgraph-1.12.2 failed.
!!! Function keepdir, Line 226, Exitcode 1
!!! Failed to create .keep in /var/tmp/portage/jpgraph-1.12.2/image///home/httpd/htdocs
#
Running as root, but using FEATURES="sandbox strict userpriv ccache"
# ls -lid /var/tmp/portage/jpgraph-1.12.2/image/home/httpd/htdocs
572546 drwxr-xr-x 2 apache apache 4096 Aug 4 14:26
/var/tmp/portage/jpgraph-1.12.2/image/home/httpd/htdocs
Wow. That's an impressive list of errors you have there ;-) What happens if you take 'userpriv' out of FEATURES? This looks like a Portage bug to me ... Best regards, Stu does /var/cache/jpgraph necessarily need to have have 777 permissions? wouldn't it be sufficient/better if just the apache-user had access ? Hi Nikl (hope I got that right), Okay, imagine that /var/cache/jpcache is owned by apache, and chmod'd 755 (or even stricter 700). What happens when I want to generate a graph using the CLI version of PHP? To be honest, PHP scripts that create their own cache directories are broken, and need fixing ;-) Best regards, Stu -- The solution is chmod 1777 on the directory. Files accessible only by creator. that bug is actually Bug 25472, please pursue it there Actually, reading the source code, the solution is to mark the directory 0700 after all. It looks to me that JpGraph won't run under PHP/CLI without a fair bit of patching, if at all. I'll commit a fix to do this. Best regards, Stu -- Stu,
FEATURES="-userpriv" worked for the emerge.
There is a slight typo in patch 1, it should be (was missing a close paren):
sed -i
"s|^DEFINE(\"CACHE_FILE_GROUP\",\"wwwadmin\");|DEFINE(\"CACHE_FILE_GROUP\",
\"${HTTPD_GROUP}\");|" src/jpgraph.php
Also, patch 4 should be:
sed -i 's|DEFINE("READ_CACHE",true);|DEFINE("READ_CACHE", USE_CACHE);|'
src/jpgraph.php
USE_CACHE is a define, not a variable. :)
Otherwise, looks great.
Thanks!
Thanks for letting me know about these. I've just committed v1.5 of the jpgraph ebuild to CVS; it should be showing up on your local rsync mirror within the hour or so. Hopefully this one is good to go. Your other patches are sat in my inbox right now. Once this install of jpgraph is working fine, I'll then look to add your patches in too. Best regards, Stu Works for me now. As for the patches, you should probably toss the Y2 one. The developer closed my bug with a slightly different change that has a different interface, so it's probably better to wait to get the official one in the next rev... Stuart, close bugs after you fix them :) |