Bug 123149 - RFE: include php-snmp subpackage
Summary: RFE: include php-snmp subpackage
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: distribution
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Riek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-05-13 03:03 UTC by Sean Scott
Modified: 2008-08-02 23:40 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-08-02 16:36:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sean Scott 2004-05-13 03:03:50 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET 
CLR 1.1.4322)

Description of problem:
Since migrating to RHEL 3 from standard RedHat Linux I have found 
that php-snmp (and many of the -devel packages I frequently use) are 
missing.

I am unable to move some of my systems to RHEL 3 until a php-snmp 
package is available or manbual compile is possible as it is a 
dependencies of many of the applications I run.

I cannot compile the module seperately as the php_config file seems 
to be deleted.  The spec file for php indicates this is done post 
install.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
while compiling rrd-php and php-snmp with ./configure & make & make 
install the compile terminates while looking for php_config

Additional info:

Comment 1 Joe Orton 2004-05-13 09:07:16 UTC
Thanks for the report.  Bug 109697 is the RFE for inclusion of php-devel.

Comment 2 Gabriel Preston 2004-09-15 14:36:04 UTC
Unfortunately, that RFE for the inclusion of php-devel does not seem 
to do anything about the problem regarding the php-snmp package.

We have several systems here (six at the moment) that currently run 
RH7.3 that make use of the php-snmp package.  We currently have eight 
new servers sitting here that we have installed RHEL3 on with plans 
of replacing the older servers.  And much to my dismay, we can't go 
through with the installation because the servers are useless without 
the ability to run the plethera of scripts that make use of PHP's 
SNMP functions.

Has there been any work done on including php-snmp with the RHEL3 
Channels, or is this package dropped for good?

Comment 3 Dan Eggleston 2004-09-17 15:00:18 UTC
We had the exact same problem - we really need php-snmp on RHEL3! Best
I could manage was to either use one of the recent Fedora php-snmp
rpms which seem to work (despite being compiled against a newer PHP
version!), or build the shared object one from the non-Red Hat php source:

1. ensure the net-snmp-devel and elfutils-libelf-devel packages are
installed
2. get the full 4.3.2 source from http://www.php.net/releases.php
3. go to the ext/snmp directory and run...
#phpize
#./configure --enable-shared
#make
#make install

this builds just the snmp extension and leaves the rest of your Red
Hat php installation alone. Hey presto, you should have a working
/usr/lib/php4/snmp.so. Not perfect I know, but needs must... :-)


Comment 4 Gabriel Preston 2004-09-20 12:51:41 UTC
I used the following method to get php-snmp working with 4.3.2-14:

1) Make the required RPM directory structure to rebuild with
	useradd -d /home/rpmbuild -m rpmbuild
	echo "%_topdir /home/rpmbuild/rpm" > /home/rpmbuild/.rpmmacros
	echo "%_tmppath /home/rpmbuild/rpm/tmp" 
>> /home/rpmbuild/.rpmmacros
	su - rpmbuild
	mkdir rpm; cd rpm;
	mkdir SPECS SOURCES BUILD RPMS SRPMS tmp
	cd ..


2) Download the latest Source RPM (SRPM) from a mirror and rebuild
	rpmbuild --recompile php-VERSION.src.rpm


3) Apply php-snmp patch to php.spec file
   or 
   Edit php.spec file by hand
	patch rpm/SPECS/php.spec php-snmp.diff
	or
	vi rpm/SPECS/php.spec


4) Rebuild the SRPM with the new php.spec file
	rpmbuild -ba rpm/SPECS/php.spec


5) Install the newly created php-snmp-VERSION.rpm
	rpm -i rpm/RPMS/i386/php-snmp-VERSION.ent.i386.rpm


6) Restart Apache
	/etc/init.d/httpd restart


================================================
BEGIN php-snmp.diff patch
NOTE: This patch applies to 4.3.2-14 version of
      the PHP RPM and may require modification
      or rebuilding to work on future versions
================================================
--- php.spec.orig	2004-09-16 08:46:30.000000000 +0200
+++ php.spec	2004-09-16 09:17:46.000000000 +0200
@@ -157,6 +157,18 @@
 applications, you will need to install this package and the php
 package.
 
+%package snmp
+Group: Development/Languages
+Requires: php = %{version}-%{release}
+Summary: A module for PHP applications that query SNMP-managed 
devices.
+BuildRequires: net-snmp-devel
+
+%description snmp
+The php-snmp package contains a dynamic shared object that will add
+support for querying SNMP devices to PHP.  PHP is an HTML-embeddable
+scripting language. If you need SNMP support for PHP applications, 
you
+will need to install this package and the php package.
+
 %if %{oracle}
 %package oci8
 Group: Development/Languages
@@ -331,6 +343,7 @@
 	--enable-dbx \
 	--enable-dio \
 	--enable-mcal \
+	--with-snmp=shared \
 	$* || tail -200 config.log
 
 make %{?_smp_mflags}
@@ -387,7 +400,7 @@
 ocimod=oci8
 %endif
 # Generate files lists and stub .ini files for each subpackage
-for mod in pgsql mysql odbc imap ldap ${ocimod}; do
+for mod in pgsql mysql odbc imap ldap ${ocimod} snmp; do
     cat > $RPM_BUILD_ROOT%{_sysconfdir}/php.d/${mod}.ini <<EOF
 ; Enable ${mod} extension module
 extension=${mod}.so
@@ -449,6 +462,8 @@
 
 %files ldap -f files.ldap
 
+%files snmp -f files.snmp
+
 %changelog
 * Mon Jul 12 2004 Joe Orton <jorton> 4.3.2-14.ent
 - have -devel require php of same release
================================================
      END php-snmp.diff patch
================================================


Comment 6 David Lawrence 2006-03-10 17:08:49 UTC
NEEDINFO_PM has been deprecated. Changing status to NEEDINFO and changing
ownership to pm manager.

Comment 7 Daniel Riek 2006-08-02 16:33:33 UTC
After carefully evaluating the benefits from adding this package in an update
release versus the additional work, Product Management decided to decline this
request. We are planning on adding iptraf to the next major version Red Hat
Enterprise Linux 5.

Comment 8 RHEL Program Management 2006-08-02 16:36:22 UTC
Product Management has reviewed and declined this request.  You may appeal this decision by reopening this request.


Note You need to log in before you can comment on or make changes to this bug.