Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 23866 - Ebuild request : JpGraph - OO Graph Library for PHP
Summary: Ebuild request : JpGraph - OO Graph Library for PHP
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: PHP Bugs
URL: http://www.aditus.nu/jpgraph/
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-02 05:37 UTC by Hans-Henry Jakobsen
Modified: 2003-10-01 05:28 UTC (History)
1 user (show)

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


Attachments
jpgraph.tbz2 (jpgraph.tbz2,857 bytes, application/octet-stream)
2003-07-02 15:21 UTC, SpanKY
Details
Alternate suggestion (jpgraph-1.12.2.ebuild,1.29 KB, text/plain)
2003-07-26 21:21 UTC, Carl A. Dunham
Details
Alternate Suggestion - take 2 (jpgraph-1.12.2.ebuild,1.29 KB, text/plain)
2003-07-26 22:04 UTC, Carl A. Dunham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hans-Henry Jakobsen 2003-07-02 05:37:04 UTC
JpGraph is an OO class library for PHP 4.1 (or higher). The only requirement is 
that the PHP installation needs to have the GD library setup correctly (most PHP 
installations do). 

JpGraph makes it easy to draw both "quick and dirty" graphs with a minimum of 
code and complex professional graphs which requires a very fine grain control. 
JpGraph is equally well suited for both scientific and business type of graphs. 

Reproducible: Always
Steps to Reproduce:
Comment 1 SpanKY gentoo-dev 2003-07-02 09:52:45 UTC
weird, i thought i had added this one already 
 
ive used it before, pretty nice app :) 
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-07-02 11:27:14 UTC
Vapier: please use the php-ext eclass to put this in.
Comment 3 SpanKY gentoo-dev 2003-07-02 15:21:17 UTC
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 ...
Comment 4 Carl A. Dunham 2003-07-25 17:21:36 UTC
This is great. But I would suggest that /usr/lib/php/jpgraph would be a better place for this. 
Comment 5 Carl A. Dunham 2003-07-26 21:21:23 UTC
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...
Comment 6 Carl A. Dunham 2003-07-26 22:04:33 UTC
Created attachment 15068 [details]
Alternate Suggestion - take 2

/var/cache is not writable by apache...
Comment 7 SpanKY gentoo-dev 2003-07-26 22:07:39 UTC
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 
Comment 8 Stuart Herbert (RETIRED) gentoo-dev 2003-08-03 17:36:49 UTC
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
Comment 9 Carl A. Dunham 2003-08-04 11:35:52 UTC
# 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 
 
Comment 10 Stuart Herbert (RETIRED) gentoo-dev 2003-08-04 13:31:34 UTC
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 
Comment 11 Nikl 2003-08-04 14:11:32 UTC
does /var/cache/jpgraph necessarily need to have have 777 permissions? wouldn't it be sufficient/better if just the apache-user had access ?
Comment 12 Stuart Herbert (RETIRED) gentoo-dev 2003-08-04 15:24:20 UTC
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 
-- 
Comment 13 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-08-04 15:27:33 UTC
The solution is chmod 1777 on the directory.
Files accessible only by creator.
Comment 14 SpanKY gentoo-dev 2003-08-04 15:35:38 UTC
that bug is actually Bug 25472, please pursue it there 
Comment 15 Stuart Herbert (RETIRED) gentoo-dev 2003-08-04 15:52:16 UTC
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 
-- 
Comment 16 Carl A. Dunham 2003-08-08 20:42:11 UTC
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! 
 
 
Comment 17 Stuart Herbert (RETIRED) gentoo-dev 2003-08-12 01:23:34 UTC
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 
Comment 18 Carl A. Dunham 2003-08-16 23:25:33 UTC
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... 
Comment 19 Tal Peer (RETIRED) gentoo-dev 2003-10-01 05:28:23 UTC
Stuart, close bugs after you fix them :)