Opened 13 years ago

Closed 13 years ago

#33356 closed update (fixed)

php5-rrd: new port

Reported by: opensource@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc: markd@…
Port: php5-rrd

Description

update php5-rrdtool to the latest version of the php pecl module. which works with php 5.3.10 on mac osx 10.7

Attachments (2)

Portfile-php5-rrdtool.diff (993 bytes) - added by opensource@… 13 years ago.
Portfile (836 bytes) - added by ryandesign (Ryan Carsten Schmidt) 13 years ago.
revised proposal

Download all attachments as: .zip

Change History (15)

comment:1 Changed 13 years ago by mf2k (Frank Schima)

Milestone: MacPorts 2.0.4
Owner: changed from macports-tickets@… to markd@…
Port: php5-rrdtool added
Type: submissionupdate
Version: 2.0.3

This patch does not look right to me. The version is hardcoded in a few places, the revision is not reset, and the name is changed to rrd.

comment:2 Changed 13 years ago by opensource@…

The reason that the version is in the file is because the pecl page of php is providing it this way. I don't know if there are other ways to do this? also the make files are different than the earlier provided source. so the library has a different name. that is why it is no longer called rrdtool.

Changed 13 years ago by opensource@…

Attachment: Portfile-php5-rrdtool.diff added

comment:3 Changed 13 years ago by opensource@…

I just found a better example how to install a pecl package. So most of the comments of macsforever2000@… are solved.

comment:4 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Keywords: haspatch added
Summary: update php5-rrdtoolphp5-rrdtool: update to 1.0.5

Much of the patch is still wrong:

  • In your patch, do not change the $Id$ line
  • Do not change the port name
  • Set the revision to 0 (or, more simply, remove the revision line entirely) when the version increases
  • You don't need to provide master_sites when passing "pecl" to php5extension.setup
  • Ports should be using rmd160 and sha256 checksums these days

I'll see if I can clean this up.

comment:5 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: markd@… added; ryandesign@… removed
Owner: changed from markd@… to ryandesign@…
Port: php5-rrd added; php5-rrdtool removed
Summary: php5-rrdtool: update to 1.0.5php5-rrd: new port

Actually.... This PECL rrd package seems to be a totally different piece of software than the existing php5-rrdtool port. So this should be a totally new port called php5-rrd.

comment:6 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Status: newassigned

Actually... with both the old php5-rrdtool and the new php5-rrd loaded, php crashes:

$ php
PHP Warning:  Function registration failed - duplicate name - rrd_graph in Unknown on line 0

Warning: Function registration failed - duplicate name - rrd_graph in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - rrd_fetch in Unknown on line 0

Warning: Function registration failed - duplicate name - rrd_fetch in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - rrd_error in Unknown on line 0

Warning: Function registration failed - duplicate name - rrd_error in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - rrd_update in Unknown on line 0

Warning: Function registration failed - duplicate name - rrd_update in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - rrd_last in Unknown on line 0

Warning: Function registration failed - duplicate name - rrd_last in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - rrd_create in Unknown on line 0

Warning: Function registration failed - duplicate name - rrd_create in Unknown on line 0
PHP Warning:  rrdtool: Unable to register functions, unable to load in Unknown on line 0

Warning: rrdtool: Unable to register functions, unable to load in Unknown on line 0
Segmentation fault

Those "duplicate name" messages make me think the new php5-rrd is indeed an evolution of the old php5-rrdtool after all. The old php5-rrdtool was from 2005 and the new php5-rrd is from 2011 so I suppose it's not surprising that the extracted directories bear little resemblance to one another after 6 years of evolution.

So my new suggestion is to add a new php5-rrd port (I've attached a cleaned-up portfile) while marking php5-rrdtool as replaced_by php5-rrd. Mark, does that sound right?

Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: Portfile added

revised proposal

comment:7 Changed 13 years ago by markd@…

That sounds very plausible Ryan. If you think that best I'd go ahead. I think you should remove me as maintainer since I really don't know about it anymore.

BTW, I see freebsd maintains both ports (http://www.freebsd.org/cgi/cvsweb.cgi/ports/databases/php5-rrdtool/), but I agree with you it seems unnecessary since it seems that the old one is abandoned.

comment:8 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

The alternative would be we could keep both, and mark them as conflicting with one another. But since I think they export the same functions, there's probably no reason anyone would prefer the old one. Maybe I can do some more research into older versions of php5-rrd and discover whether it really did descend from php5-rrdtool.

comment:9 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Ok, I downloaded php5-rrd 0.9.0, the oldest version posted on pecl. Its config.m4 is clearly evolved from the old 2005 php5-rrdtool's config.m4. And the CREDITS file of php5-rrd gives thanks to "Joe Miller - author of first rrdtool extension", who is indeed listed as the author in the php_rrdtool.h header in the original php5-rrdtool. So yes, unless anyone thinks I shouldn't, I'll replace php5-rrdtool with the new php5-rrd.

comment:10 Changed 13 years ago by markd@…

Great find. I looked at the credits too, but I didn't pick up on that in my haste. Sounds like the new one should definitely replace the old one. I'll try to remember to recommend to the rrdtool author that the readme on the old extension should note that it should be deprecated in favor of the newer one at the least, unless he'd rather remove it.

comment:11 in reply to:  7 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to markd@…:

I think you should remove me as maintainer since I really don't know about it anymore.

r91280

comment:12 in reply to:  6 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to ryandesign@…:

So my new suggestion is to add a new php5-rrd port

r91282

comment:13 in reply to:  9 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

Replying to ryandesign@…:

replace php5-rrdtool with the new php5-rrd.

r91286

Note: See TracTickets for help on using tickets.