[packages/rpm] - cleaner fix for exporting interfaces C-style

baggins baggins at pld-linux.org
Sun Oct 5 15:24:18 CEST 2025


commit 72f321c8a333e66649c75e2f08e95a8b2948395a
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Oct 5 17:09:28 2025 +0200

    - cleaner fix for exporting interfaces C-style

 export-interfaces-for-poldek.patch | 133 +++++++++----------------------------
 rpm.spec                           |   2 +-
 2 files changed, 32 insertions(+), 103 deletions(-)
---
diff --git a/rpm.spec b/rpm.spec
index 9641a5a..9c94f96 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -34,7 +34,7 @@ Summary(ru.UTF-8):	Менеджер пакетов от RPM
 Summary(uk.UTF-8):	Менеджер пакетів від RPM
 Name:		rpm
 Version:	6.0.0
-Release:	0.3
+Release:	0.4
 Epoch:		1
 License:	GPL v2 / LGPL v2.1
 Group:		Base
diff --git a/export-interfaces-for-poldek.patch b/export-interfaces-for-poldek.patch
index af79f8b..28547ad 100644
--- a/export-interfaces-for-poldek.patch
+++ b/export-interfaces-for-poldek.patch
@@ -1,115 +1,44 @@
-Only in rpm-6.0.0-poldek: bdb
-Only in rpm-6.0.0-poldek: build-cmake
-diff -ur rpm-6.0.0/include/rpm/rpmlib.h rpm-6.0.0-poldek/include/rpm/rpmlib.h
---- rpm-6.0.0/include/rpm/rpmlib.h	2025-09-22 14:09:24.000000000 +0200
-+++ rpm-6.0.0-poldek/include/rpm/rpmlib.h	2025-10-05 16:52:41.946664124 +0200
-@@ -167,6 +167,40 @@
- 			char ** specFilePtr,
- 			char ** cookie);
- 
-+/** \ingroup lead
-+ * Write lead to file handle.
-+ * @param fd		file handle
-+ * @param h		package header
-+ * @return		RPMRC_OK on success, RPMRC_FAIL on error
-+ */
-+rpmRC rpmLeadWrite(FD_t fd, Header h);
-+
-+/** \ingroup lead
-+ * Read lead from file handle.
-+ * @param fd		file handle
-+ * @param[out] emsg		failure message on error (malloced)
-+ * @return		RPMRC_OK on success, RPMRC_FAIL/RPMRC_NOTFOUND on error
-+ */
-+rpmRC rpmLeadRead(FD_t fd, char **emsg);
-+
-+/** \ingroup signature
-+ * Read (and verify header+payload size) signature header.
-+ * If an old-style signature is found, we emulate a new style one.
-+ * @param fd		file handle
-+ * @param[out] sighp	address of (signature) header (or NULL)
-+ * @param[out] msg		failure msg
-+ * @return		rpmRC return code
-+ */
-+rpmRC rpmReadSignature(FD_t fd, Header *sighp, char ** msg);
-+
-+/** \ingroup signature
-+ * Write signature header.
-+ * @param fd		file handle
-+ * @param h		(signature) header
-+ * @return		0 on success, 1 on error
-+ */
-+int rpmWriteSignature(FD_t fd, Header h);
-+
- #ifdef __cplusplus
- }
- #endif
-Only in rpm-6.0.0-poldek/include/rpm: rpmlib.h~
-Only in rpm-6.0.0-poldek/include/rpm: rpmlib.h.orig
-diff -ur rpm-6.0.0/lib/rpmlead.hh rpm-6.0.0-poldek/lib/rpmlead.hh
---- rpm-6.0.0/lib/rpmlead.hh	2025-09-22 14:09:24.000000000 +0200
-+++ rpm-6.0.0-poldek/lib/rpmlead.hh	2025-10-05 16:54:13.416664116 +0200
-@@ -1,6 +1,8 @@
+--- rpm-6.0.0/lib/rpmlead.hh~	2025-09-22 14:09:24.000000000 +0200
++++ rpm-6.0.0/lib/rpmlead.hh	2025-10-05 17:03:28.863330730 +0200
+@@ -1,6 +1,10 @@
  #ifndef _H_RPMLEAD
  #define _H_RPMLEAD
  
-+#include <rpm/rpmlib.h>
++#ifdef __cplusplus
++extern "C" {
++#endif
 +
  /** \ingroup lead
   * \file rpmlead.h
   * Routines to read and write an rpm lead structure for a a package.
-@@ -15,20 +17,4 @@
- 
- #define RPMLEAD_SIZE 96         /*!< Don't rely on sizeof(struct) */
+@@ -31,4 +35,8 @@
+  */
+ rpmRC rpmLeadRead(FD_t fd, char **emsg);
  
--/** \ingroup lead
-- * Write lead to file handle.
-- * @param fd		file handle
-- * @param h		package header
-- * @return		RPMRC_OK on success, RPMRC_FAIL on error
-- */
--rpmRC rpmLeadWrite(FD_t fd, Header h);
--
--/** \ingroup lead
-- * Read lead from file handle.
-- * @param fd		file handle
-- * @param[out] emsg		failure message on error (malloced)
-- * @return		RPMRC_OK on success, RPMRC_FAIL/RPMRC_NOTFOUND on error
-- */
--rpmRC rpmLeadRead(FD_t fd, char **emsg);
--
++#ifdef __cplusplus
++}
++#endif
++
  #endif	/* _H_RPMLEAD */
-Only in rpm-6.0.0-poldek/lib: rpmlead.hh.orig
-diff -ur rpm-6.0.0/lib/signature.hh rpm-6.0.0-poldek/lib/signature.hh
---- rpm-6.0.0/lib/signature.hh	2025-09-22 14:09:24.000000000 +0200
-+++ rpm-6.0.0-poldek/lib/signature.hh	2025-10-05 16:53:41.323330786 +0200
-@@ -6,24 +6,7 @@
-  * Generate and verify signatures.
+--- rpm-6.0.0/lib/signature.hh~	2025-09-22 14:09:24.000000000 +0200
++++ rpm-6.0.0/lib/signature.hh	2025-10-05 17:04:07.186664064 +0200
+@@ -7,6 +7,10 @@
   */
  #include <rpm/rpmtypes.h>
--
--/** \ingroup signature
-- * Read (and verify header+payload size) signature header.
-- * If an old-style signature is found, we emulate a new style one.
-- * @param fd		file handle
-- * @param[out] sighp	address of (signature) header (or NULL)
-- * @param[out] msg		failure msg
-- * @return		rpmRC return code
-- */
--rpmRC rpmReadSignature(FD_t fd, Header *sighp, char ** msg);
--
--/** \ingroup signature
-- * Write signature header.
-- * @param fd		file handle
-- * @param h		(signature) header
-- * @return		0 on success, 1 on error
-- */
--int rpmWriteSignature(FD_t fd, Header h);
-+#include <rpm/rpmlib.h>
  
++#ifdef __cplusplus
++extern "C" {
++#endif
++
  /** \ingroup signature
-  * Generate signature and write to file
-Only in rpm-6.0.0-poldek/lib: signature.hh.orig
-Only in rpm-6.0.0-poldek: ndb
-Only in rpm-6.0.0-poldek: rpm.lang
-Only in rpm-6.0.0-poldek: sqlite
+  * Read (and verify header+payload size) signature header.
+  * If an old-style signature is found, we emulate a new style one.
+@@ -41,4 +45,8 @@
+ 			rpm_loff_t size, rpm_loff_t payloadSize, FD_t fd,
+ 			int rpmver);
+ 
++#ifdef __cplusplus
++}
++#endif
++
+ #endif	/* H_SIGNATURE */
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm.git/commitdiff/4a2901f0acb1745b13bf6af1cea7988280f98814



More information about the pld-cvs-commit mailing list