OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Michael van Elst
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src openpkg-web Date: 08-Aug-2003 10:58:23
Branch: HEAD Handle: 2003080809582201
Modified files:
openpkg-src/snmp snmp.patch snmp.spec
openpkg-web news.txt
Log:
use fixed path for locating openpkg rpmrc file, the libray default is
invalid. add proper error checking to avoid crash when rpmrc file
cannot be read
Summary:
Revision Changes Path
1.2 +35 -0 openpkg-src/snmp/snmp.patch
1.52 +4 -1 openpkg-src/snmp/snmp.spec
1.6079 +2 -0 openpkg-web/news.txt
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/snmp/snmp.patch
============================================================================
$ cvs diff -u -r1.1 -r1.2 snmp.patch
--- openpkg-src/snmp/snmp.patch 7 Aug 2003 15:27:48 -0000 1.1
+++ openpkg-src/snmp/snmp.patch 8 Aug 2003 08:58:23 -0000 1.2
@@ -21,3 +21,38 @@
#endif
int calculate_time_diff(struct timeval *,
+--- agent/mibgroup/host/hr_swinst.c.dist 2003-08-08 07:59:16.000000000 +0200
++++ agent/mibgroup/host/hr_swinst.c 2003-08-08 09:35:50.000000000 +0200
+@@ -202,10 +202,10 @@
+ * XXX distinguish between rpm-2.5.x and rpm-2.9x
+ */
+ #ifdef HAVE_RPMGETPATH
+- rpmReadConfigFiles(NULL, NULL);
++ rpmReadConfigFiles(@OPENPKG_RPMRC@, NULL);
+ swi->swi_dbpath = rpmGetPath("%{_dbpath}", NULL);
+ #else
+- rpmReadConfigFiles(NULL, NULL, NULL, 0);
++ rpmReadConfigFiles(@OPENPKG_RPMRC@, NULL, NULL, 0);
+ swi->swi_dbpath = rpmGetVar(RPMVAR_DBPATH);
+ #endif
+ if (swi->swi_directory != NULL)
+@@ -557,7 +557,8 @@
+ return;
+ if (rpmdbOpen("", &swi->swi_rpmdb, O_RDONLY, 0644) != 0)
+ swi->swi_index = -1;
+- Check_HRSW_cache(swi);
++ else
++ Check_HRSW_cache(swi);
+ #else
+ if (swi->swi_directory != NULL) {
+ if (swi->swi_dp != NULL) {
+@@ -676,6 +677,9 @@
+ {
+ SWI_t *swi = &_myswi; /* XXX static for now */
+
++ if (swi->swi_index == -1)
++ return;
++
+ #ifdef HAVE_LIBRPM
+ rpmdbClose(swi->swi_rpmdb); /* or only on finishing ? */
+ swi->swi_rpmdb = NULL;
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/snmp/snmp.spec
============================================================================
$ cvs diff -u -r1.51 -r1.52 snmp.spec
--- openpkg-src/snmp/snmp.spec 7 Aug 2003 15:27:48 -0000 1.51
+++ openpkg-src/snmp/snmp.spec 8 Aug 2003 08:58:23 -0000 1.52
@@ -33,7 +33,7 @@
Group: Network
License: BSD
Version: 5.0.8
-Release: 20030807
+Release: 20030808
# package options
%option with_fsl yes
@@ -79,6 +79,9 @@
-e 's;-lrpm\([^a-z]\);-lrpm -lrpmio\1;g' \
-e 's;-lrpmio\([^a-z]\);-lrpmio -lrpmpopt -lrpmbz2 -lrpmz\1;g' \
configure
+ %{l_shtool} subst \
+ -e 's;@OPENPKG_RPMRC@;"%{l_prefix}/etc/openpkg/rpmrc";' \
+ agent/mibgroup/host/hr_swinst.c
%build
# disable search for db library
@@ .
patch -p0 <<'@@ .'
Index: openpkg-web/news.txt
============================================================================
$ cvs diff -u -r1.6078 -r1.6079 news.txt
--- openpkg-web/news.txt 8 Aug 2003 08:17:03 -0000 1.6078
+++ openpkg-web/news.txt 8 Aug 2003 08:58:22 -0000 1.6079
@@ -1,3 +1,5 @@
+08-Aug-2003: Upgraded package: P<snmp-5.0.8-20030808>
+08-Aug-2003: Upgraded package: P<perl-mail-20030808-20030808>
08-Aug-2003: Upgraded package: P<perl-util-20030808-20030808>
08-Aug-2003: Upgraded package: P<acroread-5.08-20030808>
08-Aug-2003: Upgraded package: P<linkchecker-1.8.22-20030808>
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]