[packages/drpm] - updated to 0.5.2; rpm5 not supported

qboosh qboosh at pld-linux.org
Sun Oct 8 11:16:06 CEST 2023


commit 6196b85746932b7cad7999a5dbbd1167d49726a0
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Oct 8 10:10:18 2023 +0200

    - updated to 0.5.2; rpm5 not supported

 drpm-cmake.patch | 27 +++-----------------
 drpm-rpm5.patch  | 76 --------------------------------------------------------
 drpm.spec        | 24 ++++++++----------
 3 files changed, 15 insertions(+), 112 deletions(-)
---
diff --git a/drpm.spec b/drpm.spec
index f43788b..317d3db 100644
--- a/drpm.spec
+++ b/drpm.spec
@@ -1,4 +1,3 @@
-# TODO: more rpm5 porting or use rpm.org
 #
 # Conditional build:
 %bcond_without	apidocs		# API documentation
@@ -7,27 +6,29 @@
 Summary:	Library for making, reading and applying deltarpm packages
 Summary(pl.UTF-8):	Biblioteka do tworzenia, odczytu i aplikowania pakietów deltarpm
 Name:		drpm
-Version:	0.3.0
-Release:	0.1
+Version:	0.5.2
+Release:	1
 # drpm_{diff,search}.c are BSD; the rest LGPL v3+
 License:	LGPL v3+ with BSD parts
 Group:		Libraries
 #Source0Download: https://github.com/rpm-software-management/drpm/releases
 Source0:	https://github.com/rpm-software-management/drpm/releases/download/%{version}/%{name}-%{version}.tar.bz2
-# Source0-md5:	e1ca38e14f52d0f5229bba45ba8b8904
+# Source0-md5:	cd8f5fdc13cad7b97ab88f0e44b4bfe0
 Patch0:		%{name}-cmake.patch
-# not enough, drpm uses too many rpm4.6+ APIs
-Patch1:		%{name}-rpm5.patch
 URL:		https://github.com/rpm-software-management/drpm
 BuildRequires:	bzip2-devel
 BuildRequires:	cmake >= 2.8
-BuildRequires:	doxygen
+%{?with_apidocs:BuildRequires:	doxygen}
+# no option to enable
 #BuildRequires:	lzlib-devel
 BuildRequires:	openssl-devel
 BuildRequires:	pkgconfig
-BuildRequires:	rpm-devel
+BuildRequires:	rpm-build >= 4.6
+# which exactly? not specified, but rpm5 is not supported
+BuildRequires:	rpm-devel >= 1:4.16
 BuildRequires:	xz-devel
 BuildRequires:	zlib-devel
+BuildRequires:	zstd-devel
 %if %{with tests}
 BuildRequires:	cmocka-devel
 BuildRequires:	deltarpm
@@ -68,15 +69,12 @@ Dokumentacja API biblioteki drpm.
 %prep
 %setup -q
 %patch0 -p1
-%patch1 -p1
 
 %build
 install -d build
 cd build
-CFLAGS="%{rpmcflags} %{rpmcppflags} -I/usr/include/rpm"
 %cmake .. \
-	-DINCLUDE_INSTALL_DIR=%{_includedir} \
-	-DLIB_INSTALL_DIR=%{_lib}
+	-DCMAKE_INSTALL_LIBDIR=%{_lib}
 
 %{__make}
 
@@ -91,7 +89,7 @@ ctest
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__make} install \
+%{__make} -C build install \
 	DESTDIR=$RPM_BUILD_ROOT
 
 %clean
diff --git a/drpm-cmake.patch b/drpm-cmake.patch
index 257f67b..b1c1129 100644
--- a/drpm-cmake.patch
+++ b/drpm-cmake.patch
@@ -1,23 +1,13 @@
---- drpm-0.3.0/src/CMakeLists.txt.orig	2016-05-04 10:53:56.000000000 +0200
-+++ drpm-0.3.0/src/CMakeLists.txt	2018-05-12 21:55:55.404743698 +0200
-@@ -5,8 +5,6 @@
- set(DRPM_VERSION ${DRPM_VERSION_MAJOR}.${DRPM_VERSION_MINOR}.${DRPM_VERSION_PATCH})
- set(DRPM_SOVERSION ${DRPM_VERSION_MAJOR})
+--- drpm-0.5.2/src/CMakeLists.txt.orig	2023-10-08 09:42:28.374467283 +0200
++++ drpm-0.5.2/src/CMakeLists.txt	2023-10-08 09:42:56.150983471 +0200
+@@ -1,7 +1,5 @@
+ set(DRPM_SOVERSION ${DRPM_MAJOR_VERSION})
  
 -set(CMAKE_BUILD_TYPE RelWithDebInfo)
 -
  if (NOT ${CMAKE_SIZEOF_VOID_P} EQUAL 8)
     set(ARCH_LESS_64BIT 1)
  endif()
-#@@ -14,7 +14,7 @@
-# add_library(drpm SHARED ${DRPM_SOURCES})
-# 
-# set_source_files_properties(${DRPM_SOURCES} PROPERTIES
-#-   COMPILE_FLAGS "-std=c99 -pedantic -Wall -Wextra -DHAVE_CONFIG_H -I${CMAKE_BINARY_DIR}"
-#+   COMPILE_FLAGS "${CFLAGS} ${CPPFLAGS} -std=c99 -pedantic -Wall -Wextra -DHAVE_CONFIG_H -I${CMAKE_BINARY_DIR}"
-# )
-# 
-# target_link_libraries(drpm ${DRPM_LINK_LIBRARIES})
 --- drpm-0.3.0/test/CMakeLists.txt.orig	2016-05-12 17:12:05.000000000 +0200
 +++ drpm-0.3.0/test/CMakeLists.txt	2018-05-12 22:06:03.454736755 +0200
 @@ -12,8 +12,6 @@
@@ -29,12 +19,3 @@
  file(
     COPY ${DRPM_TEST_FILES}
     DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
-#@@ -33,7 +31,7 @@
-# add_executable(drpm_api_tests ${DRPM_TEST_SOURCES})
-# 
-# set_source_files_properties(${DRPM_TEST_SOURCES} PROPERTIES
-#-   COMPILE_FLAGS "-std=c99 -pedantic -Wall -Wextra -DHAVE_CONFIG_H -I${CMAKE_BINARY_DIR}"
-#+   COMPILE_FLAGS "${CFLAGS} ${CPPFLAGS} -std=c99 -pedantic -Wall -Wextra -DHAVE_CONFIG_H -I${CMAKE_BINARY_DIR}"
-# )
-# 
-# target_link_libraries(drpm_api_tests ${DRPM_LINK_LIBRARIES} ${CMOCKA_LIBRARIES})
diff --git a/drpm-rpm5.patch b/drpm-rpm5.patch
deleted file mode 100644
index 9cd897e..0000000
--- a/drpm-rpm5.patch
+++ /dev/null
@@ -1,76 +0,0 @@
---- drpm-0.3.0/src/drpm_make.c.orig	2016-05-09 16:20:20.000000000 +0200
-+++ drpm-0.3.0/src/drpm_make.c	2018-05-12 22:40:19.794713274 +0200
-@@ -33,8 +33,7 @@
- #include <openssl/md5.h>
- #include <openssl/sha.h>
- #include <rpm/rpmfi.h>
--#include <rpm/rpmvf.h>
--#include <rpm/rpmfc.h>
-+#include <rpm/rpmcli.h>
- #include <linux/kdev_t.h>
- 
- #define BUFFER_SIZE 4096
-@@ -47,6 +46,12 @@
- 
- #define MAGIC_RPML 0x52504D4C
- 
-+#ifndef RPMFC_ELF32
-+#define RPMFC_ELF32 1
-+#define RPMFC_ELF64 2
-+#define RPMFC_ELFX32 4
-+#endif
-+
- #ifndef RPMFILE_UNPATCHED
- #define RPMFILE_UNPATCHED (1 << 10)
- #endif
-@@ -406,10 +411,10 @@
-             } else if (S_ISREG(file.mode)) {
-                 skip = (c_filesize != file.size) ||
-                        ((file.flags & (RPMFILE_CONFIG | RPMFILE_MISSINGOK | RPMFILE_GHOST)) != 0) ||
--                       ((file.verify & VERIFY_MD5) == 0 ||
-+                       ((file.verify & VERIFY_FDIGEST) == 0 ||
-                         (file.verify & VERIFY_SIZE) == 0) ||
-                        (file_colors &&
--                        (file.color & (RPMFC_ELF32 | RPMFC_ELF64)) != 0 &&
-+                        (file.color & (RPMFC_ELF32 | RPMFC_ELF64 | RPMFC_ELFX32)) != 0 &&
-                         !IN_MULTILIB_DIR(name));
-                 cpio_hdr.filesize = file.size;
-             } else if (S_ISLNK(file.mode)) {
---- drpm-0.3.0/src/drpm_rpm.c.orig	2018-05-26 21:00:46.384303338 +0200
-+++ drpm-0.3.0/src/drpm_rpm.c	2018-05-26 21:00:49.630969967 +0200
-@@ -18,6 +18,7 @@
-     along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
- 
-+#define _DEFAULT_SOURCE /* for u_* types in db.h */
- #include "drpm.h"
- #include "drpm_private.h"
- 
-@@ -25,7 +26,8 @@
- #include <string.h>
- #include <limits.h>
- #include <fcntl.h>
--#include <rpm/rpmlib.h>
-+#include <rpm/rpm46compat.h>
-+#include <rpm/rpmio.h>
- #include <rpm/rpmts.h>
- #include <rpm/rpmdb.h>
- #include <openssl/md5.h>
-@@ -54,7 +56,7 @@
- static void rpm_free(struct rpm *);
- static int rpm_export_header(struct rpm *, unsigned char **, size_t *);
- static int rpm_export_signature(struct rpm *, unsigned char **, size_t *);
--static void rpm_header_unload_region(struct rpm *, rpmTagVal);
-+static void rpm_header_unload_region(struct rpm *, rpmTag);
- static int rpm_read_archive(struct rpm *, const char *, off_t, bool,
-                             unsigned short *, MD5_CTX *, MD5_CTX *);
- 
-@@ -144,7 +146,7 @@
-     return DRPM_ERR_OK;
- }
- 
--void rpm_header_unload_region(struct rpm *rpmst, rpmTagVal rpmtag)
-+void rpm_header_unload_region(struct rpm *rpmst, rpmTag rpmtag)
- {
-     Header hdr;
-     HeaderIterator hdr_iter;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/drpm.git/commitdiff/6196b85746932b7cad7999a5dbbd1167d49726a0



More information about the pld-cvs-commit mailing list