[packages/poldek/rpm5] - 'package-*.rpm: sha1 md5 OK' messages strike back because rpmlog got 'inlined', fix this by rede

baggins baggins at pld-linux.org
Mon Sep 17 21:14:40 CEST 2012


commit e0d173aa9f8c5465189f0deaed73e9b0c0fb3c20
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon Sep 17 21:13:09 2012 +0200

    - 'package-*.rpm: sha1 md5 OK' messages strike back because rpmlog
      got 'inlined', fix this by redefining vrpmlog if rpmlog is not found

 poldek-vrpmlog.patch | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 poldek.spec          |  4 ++-
 2 files changed, 77 insertions(+), 1 deletion(-)
---
diff --git a/poldek.spec b/poldek.spec
index 0a6de4f..2392cea 100644
--- a/poldek.spec
+++ b/poldek.spec
@@ -14,7 +14,7 @@
 %define		ver_rpm		5.4.10
 
 %define		snap	rc6
-%define		rel	0.2%{?with_snap:.%{SNAP}}
+%define		rel	0.3%{?with_snap:.%{SNAP}}
 Summary:	RPM packages management helper tool
 Summary(hu.UTF-8):	RPM csomagkezelést segítő eszköz
 Summary(pl.UTF-8):	Pomocnicze narzędzie do zarządzania pakietami RPM
@@ -43,6 +43,7 @@ Patch1:		%{name}-config.patch
 Patch2:		%{name}-size-type.patch
 Patch3:		%{name}-Os-fail-workaround.patch
 Patch4:		%{name}-link-rpmio.patch
+Patch5:		%{name}-vrpmlog.patch
 URL:		http://poldek.pld-linux.org/
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -206,6 +207,7 @@ Moduły języka Python dla poldka.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 
 %{__rm} m4/libtool.m4 m4/lt*.m4
 
diff --git a/poldek-vrpmlog.patch b/poldek-vrpmlog.patch
new file mode 100644
index 0000000..ae07f82
--- /dev/null
+++ b/poldek-vrpmlog.patch
@@ -0,0 +1,74 @@
+diff -ur poldek-0.30/config.h.in poldek-0.30-vrpmlog/config.h.in
+--- poldek-0.30/config.h.in	2012-09-13 15:34:44.000000000 +0200
++++ poldek-0.30-vrpmlog/config.h.in	2012-09-17 21:07:20.000000000 +0200
+@@ -359,6 +359,9 @@
+ /* Define to 1 if you have the `vprintf' function. */
+ #undef HAVE_VPRINTF
+ 
++/* Define to 1 if you have the `vrpmlog' function. */
++#undef HAVE_VRPMLOG
++
+ /* Define to 1 if you have the `_rpmvercmp' function. */
+ #undef HAVE__RPMVERCMP
+ 
+diff -ur poldek-0.30/configure.ac poldek-0.30-vrpmlog/configure.ac
+--- poldek-0.30/configure.ac	2012-09-17 21:11:07.933745548 +0200
++++ poldek-0.30-vrpmlog/configure.ac	2012-09-17 21:06:52.533754558 +0200
+@@ -343,7 +343,7 @@
+ 		[$DBLIB -lrpmdb]),
+ 	    [$DBLIB])
+ 
+-AC_CHECK_FUNCS(rpmlog rpmCheckSig rpmVerifySignature)
++AC_CHECK_FUNCS(rpmlog vrpmlog rpmCheckSig rpmVerifySignature)
+ 
+ dnl rpm 4.2?
+ AC_CHECK_FUNCS(rpmtsColor, [LIBS="$LIBS -lpthread"
+diff -ur poldek-0.30/pm/rpm/rpm.c poldek-0.30-vrpmlog/pm/rpm/rpm.c
+--- poldek-0.30/pm/rpm/rpm.c	2012-09-13 15:26:29.000000000 +0200
++++ poldek-0.30-vrpmlog/pm/rpm/rpm.c	2012-09-17 21:08:55.423750223 +0200
+@@ -317,14 +317,20 @@
+     return dir;
+ }
+ 
+-
+-#if defined HAVE_RPMLOG && !defined ENABLE_STATIC
++#if !defined ENABLE_STATIC && (defined HAVE_RPMLOG || defined HAVE_VRPMLOG)
+ /* XXX hack: rpmlib dumps messges to stdout only... (AFAIK)  */
++#if defined HAVE_RPMLOG
+ void rpmlog(int prii, const char *fmt, ...) __attribute__ ((visibility("default")));
+ 
+-void rpmlog(int prii, const char *fmt, ...) 
++void rpmlog(int prii, const char *fmt, ...)
+ {
+     va_list args;
++#elif defined HAVE_VRPMLOG
++void vrpmlog(unsigned prii, const char *fmt, va_list args) __attribute__ ((visibility("default")));
++
++void vrpmlog(unsigned prii, const char *fmt, va_list args)
++{
++#endif
+     int pri, mask;
+     int rpmlogMask, logpri = LOGERR, verbose_level = -1;
+ 
+@@ -350,7 +356,9 @@
+         verbose_level = 2;
+     }
+ 
++#if defined HAVE_RPMLOG
+     va_start(args, fmt);
++#endif
+ 
+ #if 0
+     printf("%d, v = %d, verbose = %d, pm_rpm_verbose = %d\n", pri,
+@@ -389,9 +397,10 @@
+         log(logpri | LOGWARN, "%s\n", p);
+     }
+         
++#if defined HAVE_RPMLOG
+     va_end(args);
++#endif
+ }
+-
+ #endif /* HAVE_RPMLOG */
+ 
+ int pm_rpm_vercmp(const char *one, const char *two)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/poldek.git/commitdiff/e0d173aa9f8c5465189f0deaed73e9b0c0fb3c20



More information about the pld-cvs-commit mailing list