[packages/libsolv] - updated to 0.6.34 - added rpm5 patch, but new librpm options require more APIs from rpm.org 4.6+
qboosh
qboosh at pld-linux.org
Fri May 11 18:48:23 CEST 2018
commit 8163445ef0945a6f4e6217920c1bf6d7f68c5ffb
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri May 11 18:49:06 2018 +0200
- updated to 0.6.34
- added rpm5 patch, but new librpm options require more APIs from rpm.org 4.6+
libsolv-rpm5.patch | 39 +++++++++++++++++++++++++++++++++++++++
libsolv.spec | 43 ++++++++++++++++++++++---------------------
2 files changed, 61 insertions(+), 21 deletions(-)
---
diff --git a/libsolv.spec b/libsolv.spec
index e33e183..b69d552 100644
--- a/libsolv.spec
+++ b/libsolv.spec
@@ -9,15 +9,16 @@
Summary: Package dependency solver
Summary(pl.UTF-8): Biblioteka do rozwiązywania zależności pakietów
Name: libsolv
-Version: 0.6.30
+Version: 0.6.34
Release: 1
License: BSD
Group: Libraries
#Source0Download: https://github.com/openSUSE/libsolv/releases
Source0: https://github.com/openSUSE/libsolv/archive/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 76fad6d855817f6fbe70fdec384885ae
+# Source0-md5: b61f8268a60086ae6fbf7a3454d669cb
Patch0: ruby.patch
Patch1: %{name}-python.patch
+Patch2: %{name}-rpm5.patch
URL: https://github.com/openSUSE/libsolv
BuildRequires: bzip2-devel
BuildRequires: cmake >= 2.4
@@ -174,47 +175,47 @@ Wiązania języka Tcl do bibliotek libsolv.
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
# use system one
%{__rm} cmake/modules/FindRuby.cmake
%build
+# TODO: -DENABLE_RPMDB_LIBRPM=ON -DENABLE_RPMPKG_LIBRPM=ON (rpm5 not supported)
+
+%define common_opts \\\
+ -DENABLE_APPDATA=ON \\\
+ -DENABLE_BZIP2_COMPRESSION=ON \\\
+ -DENABLE_HELIXREPO=ON \\\
+ -DENABLE_LZMA_COMPRESSION=ON \\\
+ -DENABLE_PUBKEY=ON \\\
+ -DENABLE_RPMDB=ON \\\
+ -DENABLE_RPMDB_BYRPMHEADER=ON \\\
+ -DENABLE_RPMMD=ON \\\
+ %{?with_static_libs:-DENABLE_STATIC=ON} \\\
+ -DRPM5=ON \\\
+ %{nil}
+
install -d build %{?with_python3:build-py3}
cd build
%cmake .. \
- -DENABLE_APPDATA=ON \
- -DENABLE_BZIP2_COMPRESSION=ON \
- -DENABLE_HELIXREPO=ON \
- -DENABLE_LZMA_COMPRESSION=ON \
+ %{common_opts} \
-DENABLE_PERL=ON \
- -DENABLE_PUBKEY=ON \
-DENABLE_PYTHON=ON \
- -DENABLE_RPMDB=ON \
- -DENABLE_RPMDB_BYRPMHEADER=ON \
- -DENABLE_RPMMD=ON \
%{?with_ruby:-DENABLE_RUBY=ON} \
- %{?with_static_libs:-DENABLE_STATIC=ON} \
%{?with_tcl:-DENABLE_TCL=ON} \
-DPythonLibs_FIND_VERSION=2 \
-DPythonLibs_FIND_VERSION_MAJOR=2 \
- -DRPM5=ON \
-DUSE_VENDORDIRS=ON
%{__make}
%if %{with python3}
cd ../build-py3
%cmake .. \
- -DENABLE_APPDATA=ON \
- -DENABLE_BZIP2_COMPRESSION=ON \
- -DENABLE_LZMA_COMPRESSION=ON \
- -DENABLE_PUBKEY=ON \
+ %{common_opts} \
-DENABLE_PYTHON=ON \
- -DENABLE_RPMDB=ON \
- -DENABLE_RPMMD=ON \
- -DENABLE_RPMDB_BYRPMHEADER=ON \
-DPythonLibs_FIND_VERSION=3 \
- -DPythonLibs_FIND_VERSION_MAJOR=3 \
- -DRPM5=ON
+ -DPythonLibs_FIND_VERSION_MAJOR=3
%{__make}
%endif
diff --git a/libsolv-rpm5.patch b/libsolv-rpm5.patch
new file mode 100644
index 0000000..deec7eb
--- /dev/null
+++ b/libsolv-rpm5.patch
@@ -0,0 +1,39 @@
+(partial, not finished: rpmdbIndex* and headerImport APIs are used)
+--- libsolv-0.6.34/ext/repo_rpmdb_librpm.h.orig 2018-03-23 12:04:14.000000000 +0100
++++ libsolv-0.6.34/ext/repo_rpmdb_librpm.h 2018-05-10 20:28:01.213443653 +0200
+@@ -15,6 +15,12 @@
+ #include <rpm/rpmts.h>
+ #include <rpm/rpmmacro.h>
+
++#ifdef RPM5
++#define _RPMVSF_NOSIGNATURES (RPMVSF_NODSAHEADER | RPMVSF_NORSAHEADER | RPMVSF_NODSA | RPMVSF_NORSA)
++#define _RPMVSF_NODIGESTS (RPMVSF_NOSHA1HEADER | RPMVSF_NOMD5HEADER | RPMVSF_NOSHA1 | RPMVSF_NOMD5)
++#define _RPMVSF_NOHEADER (RPMVSF_NOSHA1HEADER | RPMVSF_NOMD5HEADER | RPMVSF_NODSAHEADER | RPMVSF_NORSAHEADER)
++#endif
++
+ struct rpmdbstate {
+ Pool *pool;
+ char *rootdir;
+--- libsolv-0.6.34/ext/repo_rpmdb.c.orig 2018-03-23 12:04:14.000000000 +0100
++++ libsolv-0.6.34/ext/repo_rpmdb.c 2018-05-10 19:30:12.563483259 +0200
+@@ -30,6 +30,8 @@
+ #include <rpm/rpmpgp.h>
+ #ifndef RPM5
+ #include <rpm/header.h>
++#else
++#include <rpm/rpm46compat.h>
+ #endif
+ #include <rpm/rpmdb.h>
+
+@@ -457,7 +459,11 @@
+ static int
+ headissourceheuristic(RpmHead *h)
+ {
++#ifdef RPM5
++ return !headerIsEntry(h, RPMTAG_SOURCERPM);
++#else
+ return headerIsSource(h);
++#endif
+ }
+
+ static inline void
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libsolv.git/commitdiff/8163445ef0945a6f4e6217920c1bf6d7f68c5ffb
More information about the pld-cvs-commit
mailing list