On Sep 26, 2006, at 5:46 AM, Thomas Anders wrote:

> Wes Hardaker wrote:
>> Update of /cvsroot/net-snmp/net-snmp
>> In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv5621
>>
>> Modified Files:
>> configure configure.in
>> Log Message:
>> CHANGES: snmpd: BUGS: 1564233: Have configure test for rpm headers
>> not just the libraries

>
> This breaks the build for me on any non-RPM-based system (Solaris,
> AIX,
> HP-UX, IRIX, Tru64 at least):
>
> configure: error: Could not find either the RPM header files needed
> and
> was specifically asked to use RPM support
>
> All branches (5.[234]) affected, including 5.4.pre2.
>
> There's also an additional remark from Magnus in the original bug
> report:
> https://sourceforge.net/tracker/?
> func=detail&atid=112694&aid=1564233&group_id=12694
>


A tangential issue is simplifying the HR-MIB interface to an rpm (or
other package manager)
installed software database to remove the need for configuration
entirely.

This script queries the information needed by the HR-MIB from an
rpmdb, and creates
files with the name-version-release.arch, changing the mtime to be
the same as the install time.

That means that opendir(3) and stat(2) can be used for the HR-MIB
instead of linking -lrpm,
dragging in Berkeley DB and lots of other "stuff" that is bloat from
a net-snmp POV.

I have also changed rpm-4.4.7 to add/remove files in /var/cache/hrmib
when packages are
added and removed.

I'll get around to sending a patch for net-snmp to use /var/cache/
hrmib/* instead of /var/lib/rpm
one of these days.

All the Good Old Stuff is still there, net-snmp can continue to link -
lrpm forever if desired. I suspect
that code using opendir(3) and stat(2) is simpler and more portable.

73 de Jeff

=========== script to populate /var/cache/hrmib with install software
info

#!/bin/sh

mydir=/var/cache/hrmib
mkdir -p $mydir || exit 1
rm -f $mydir/*

rpm -qa --qf '%{name}-%{version}-%{release}.%{arch} %
{installtime:date}\n' | \
while read nvra idate ; do
case $nvra in
gpg-pubkey-*)
;;
*)
touch -d "`echo $idate`" $mydir/$nvra
;;
esac
done
touch $mydir



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?p...rge&CID=DEVDEV
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders