added upstream patch to fix endianess with rpm 5.2 [release 0.7.4-3mamba;Wed Jun 05 2019]
This commit is contained in:
parent
b7396071a6
commit
501a71dcff
@ -14,8 +14,8 @@
|
|||||||
struct rpmdbstate {
|
struct rpmdbstate {
|
||||||
Pool *pool;
|
Pool *pool;
|
||||||
char *rootdir;
|
char *rootdir;
|
||||||
--- libsolv-0.6.34/ext/repo_rpmdb.c.orig 2018-03-23 12:04:14.000000000 +0100
|
--- libsolv-0.6.35/ext/repo_rpmdb.c.orig 2019-06-04 17:32:58.000000000 +0200
|
||||||
+++ libsolv-0.6.34/ext/repo_rpmdb.c 2018-05-10 19:30:12.563483259 +0200
|
+++ libsolv-0.6.35/ext/repo_rpmdb.c 2019-06-04 17:33:15.457951815 +0200
|
||||||
@@ -30,6 +30,8 @@
|
@@ -30,6 +30,8 @@
|
||||||
#include <rpm/rpmpgp.h>
|
#include <rpm/rpmpgp.h>
|
||||||
#ifndef RPM5
|
#ifndef RPM5
|
||||||
@ -25,15 +25,3 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <rpm/rpmdb.h>
|
#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
|
|
50
libsolv-0.7.4-rpm5-5.2-endianess-fix.patch
Normal file
50
libsolv-0.7.4-rpm5-5.2-endianess-fix.patch
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
From 68d72a88d5dc983aff2ff5dce65581de0ee42b6d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michael Schroeder <mls@suse.de>
|
||||||
|
Date: Wed, 5 Jun 2019 15:58:55 +0200
|
||||||
|
Subject: [PATCH] Make libsolv work with rpm 5.2
|
||||||
|
|
||||||
|
Version 5.2 still used native endian encoding for the database ids.
|
||||||
|
---
|
||||||
|
ext/repo_rpmdb_bdb.h | 12 +++++++++---
|
||||||
|
1 file changed, 9 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/ext/repo_rpmdb_bdb.h b/ext/repo_rpmdb_bdb.h
|
||||||
|
index ed82a69c..d0053f71 100644
|
||||||
|
--- a/ext/repo_rpmdb_bdb.h
|
||||||
|
+++ b/ext/repo_rpmdb_bdb.h
|
||||||
|
@@ -27,6 +27,13 @@
|
||||||
|
# define RPM_INDEX_SIZE 8 /* rpmdbid + array index */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#ifdef RPM5
|
||||||
|
+# include <rpm/rpmversion.h>
|
||||||
|
+# if RPMLIB_VERSION_GE(5,3,_,0,0,_)
|
||||||
|
+# define RPM5_BIG_ENDIAN_ID
|
||||||
|
+# endif
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
|
||||||
|
/******************************************************************/
|
||||||
|
/* Rpm Database stuff
|
||||||
|
@@ -66,11 +73,10 @@ stat_database(struct rpmdbstate *state, char *dbname, struct stat *statbuf, int
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
-
|
||||||
|
static inline Id
|
||||||
|
db2rpmdbid(unsigned char *db, int byteswapped)
|
||||||
|
{
|
||||||
|
-#ifdef RPM5
|
||||||
|
+#ifdef RPM5_BIG_ENDIAN_ID
|
||||||
|
return db[0] << 24 | db[1] << 16 | db[2] << 8 | db[3];
|
||||||
|
#else
|
||||||
|
# if defined(WORDS_BIGENDIAN)
|
||||||
|
@@ -87,7 +93,7 @@ db2rpmdbid(unsigned char *db, int byteswapped)
|
||||||
|
static inline void
|
||||||
|
rpmdbid2db(unsigned char *db, Id id, int byteswapped)
|
||||||
|
{
|
||||||
|
-#ifdef RPM5
|
||||||
|
+#ifdef RPM5_BIG_ENDIAN_ID
|
||||||
|
db[0] = id >> 24, db[1] = id >> 16, db[2] = id >> 8, db[3] = id;
|
||||||
|
#else
|
||||||
|
# if defined(WORDS_BIGENDIAN)
|
38
libsolv-0.7.4-rpm5.2-still-has-array-index.patch
Normal file
38
libsolv-0.7.4-rpm5.2-still-has-array-index.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
From 841287dfb7a5992b374aa5326e776cd7d54fc0da Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michael Schroeder <mls@suse.de>
|
||||||
|
Date: Wed, 5 Jun 2019 16:16:09 +0200
|
||||||
|
Subject: [PATCH] rpm-5.2 still had an array index
|
||||||
|
|
||||||
|
---
|
||||||
|
ext/repo_rpmdb_bdb.h | 15 +++++++--------
|
||||||
|
1 file changed, 7 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/ext/repo_rpmdb_bdb.h b/ext/repo_rpmdb_bdb.h
|
||||||
|
index d0053f71..c680da6b 100644
|
||||||
|
--- a/ext/repo_rpmdb_bdb.h
|
||||||
|
+++ b/ext/repo_rpmdb_bdb.h
|
||||||
|
@@ -21,17 +21,16 @@
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#ifdef RPM5
|
||||||
|
-# define RPM_INDEX_SIZE 4 /* just the rpmdbid */
|
||||||
|
-#else
|
||||||
|
-# define RPM_INDEX_SIZE 8 /* rpmdbid + array index */
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
#ifdef RPM5
|
||||||
|
# include <rpm/rpmversion.h>
|
||||||
|
-# if RPMLIB_VERSION_GE(5,3,_,0,0,_)
|
||||||
|
+# if RPMLIB_VERSION < RPMLIB_VERSION_ENCODE(5,3,_,0,0,_)
|
||||||
|
+# define RPM_INDEX_SIZE 8 /* rpmdbid + array index */
|
||||||
|
+# else
|
||||||
|
+# define RPM_INDEX_SIZE 4 /* just the rpmdbid */
|
||||||
|
# define RPM5_BIG_ENDIAN_ID
|
||||||
|
-# endif
|
||||||
|
+#endif
|
||||||
|
+#else
|
||||||
|
+# define RPM_INDEX_SIZE 8 /* rpmdbid + array index */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
36
libsolv.spec
36
libsolv.spec
@ -1,6 +1,6 @@
|
|||||||
Name: libsolv
|
Name: libsolv
|
||||||
Version: 0.6.34
|
Version: 0.7.4
|
||||||
Release: 2mamba
|
Release: 3mamba
|
||||||
Summary: Library for solving packages and reading repositories
|
Summary: Library for solving packages and reading repositories
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
Vendor: openmamba
|
Vendor: openmamba
|
||||||
@ -8,10 +8,12 @@ Distribution: openmamba
|
|||||||
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||||
URL: http://en.opensuse.org/openSUSE:Libzypp_satsolver
|
URL: http://en.opensuse.org/openSUSE:Libzypp_satsolver
|
||||||
Source: https://github.com/openSUSE/libsolv.git/%{version}/libsolv-%{version}.tar.bz2
|
Source: https://github.com/openSUSE/libsolv.git/%{version}/libsolv-%{version}.tar.bz2
|
||||||
Patch0: libsolv-0.6.34-rpm-5.patch
|
Patch0: libsolv-0.6.35-rpm-5.patch
|
||||||
Patch1: libsolv-0.6.34-rpm-5.2.patch
|
Patch1: libsolv-0.6.34-rpm-5.2.patch
|
||||||
Patch2: libsolv-0.6.34-python.patch
|
Patch2: libsolv-0.6.34-python.patch
|
||||||
Patch3: libsolv-0.6.34-swig-4.0.0.patch
|
Patch3: libsolv-0.6.34-swig-4.0.0.patch
|
||||||
|
Patch4: libsolv-0.7.4-rpm5-5.2-endianess-fix.patch
|
||||||
|
Patch5: libsolv-0.7.4-rpm5.2-still-has-array-index.patch
|
||||||
License: BSD
|
License: BSD
|
||||||
## AUTOBUILDREQ-BEGIN
|
## AUTOBUILDREQ-BEGIN
|
||||||
BuildRequires: glibc-devel
|
BuildRequires: glibc-devel
|
||||||
@ -56,18 +58,20 @@ This package contains utility applications for %{name}.
|
|||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
|
%patch4 -p1
|
||||||
|
%patch5 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake -d build \
|
%cmake -d build \
|
||||||
-DENABLE_APPDATA=ON \
|
-DENABLE_APPDATA=ON \
|
||||||
-DENABLE_BZIP2_COMPRESSION=ON \
|
-DENABLE_BZIP2_COMPRESSION=ON \
|
||||||
-DENABLE_COMPLEX_DEPS=ON \
|
-DENABLE_COMPLEX_DEPS=ON \
|
||||||
-DENABLE_HELIXREPO=ON \
|
|
||||||
-DENABLE_LZMA_COMPRESSION=ON \
|
-DENABLE_LZMA_COMPRESSION=ON \
|
||||||
-DENABLE_PUBKEY=ON \
|
-DENABLE_ZCHUNK_COMPRESSION=ON \
|
||||||
-DENABLE_RPMDB=ON \
|
-DENABLE_RPMDB=ON \
|
||||||
-DENABLE_RPMDB_BYRPMHEADER=ON \
|
-DENABLE_RPMPKG=ON \
|
||||||
-DENABLE_RPMMD=ON \
|
-DENABLE_RPMMD=ON \
|
||||||
|
-DWITH_LIBXML2=ON \
|
||||||
-DRPM5=ON \
|
-DRPM5=ON \
|
||||||
-DENABLE_PERL=ON \
|
-DENABLE_PERL=ON \
|
||||||
-DENABLE_PYTHON=ON \
|
-DENABLE_PYTHON=ON \
|
||||||
@ -117,17 +121,16 @@ cp ext/*.h %{buildroot}%{_includedir}/solv/
|
|||||||
%{_mandir}/man3/libsolv-history.3*
|
%{_mandir}/man3/libsolv-history.3*
|
||||||
%{_mandir}/man3/libsolv-pool.3*
|
%{_mandir}/man3/libsolv-pool.3*
|
||||||
%{_mandir}/man3/libsolv.3*
|
%{_mandir}/man3/libsolv.3*
|
||||||
%doc BUGS NEWS README
|
%doc NEWS README
|
||||||
|
|
||||||
%files tools
|
%files tools
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_bindir}/appdata2solv
|
%{_bindir}/appdata2solv
|
||||||
%{_bindir}/deltainfoxml2solv
|
%{_bindir}/deltainfoxml2solv
|
||||||
%{_bindir}/dumpsolv
|
%{_bindir}/dumpsolv
|
||||||
%{_bindir}/helix2solv
|
|
||||||
%{_bindir}/installcheck
|
%{_bindir}/installcheck
|
||||||
%{_bindir}/mergesolv
|
%{_bindir}/mergesolv
|
||||||
%{_bindir}/repo2solv.sh
|
%{_bindir}/repo2solv
|
||||||
%{_bindir}/testsolv
|
%{_bindir}/testsolv
|
||||||
%{_bindir}/repomdxml2solv
|
%{_bindir}/repomdxml2solv
|
||||||
%{_bindir}/rpmdb2solv
|
%{_bindir}/rpmdb2solv
|
||||||
@ -137,9 +140,10 @@ cp ext/*.h %{buildroot}%{_includedir}/solv/
|
|||||||
%{_mandir}/man1/appdata2solv.1*
|
%{_mandir}/man1/appdata2solv.1*
|
||||||
%{_mandir}/man1/deltainfoxml2solv.1*
|
%{_mandir}/man1/deltainfoxml2solv.1*
|
||||||
%{_mandir}/man1/dumpsolv.1*
|
%{_mandir}/man1/dumpsolv.1*
|
||||||
%{_mandir}/man1/helix2solv.1*
|
|
||||||
%{_mandir}/man1/installcheck.1*
|
%{_mandir}/man1/installcheck.1*
|
||||||
%{_mandir}/man1/mergesolv.1*
|
%{_mandir}/man1/mergesolv.1*
|
||||||
|
%{_mandir}/man1/repo2solv.1*
|
||||||
|
%{_mandir}/man1/solv.1*
|
||||||
%{_mandir}/man1/testsolv.1*
|
%{_mandir}/man1/testsolv.1*
|
||||||
%{_mandir}/man1/repomdxml2solv.1*
|
%{_mandir}/man1/repomdxml2solv.1*
|
||||||
%{_mandir}/man1/rpmdb2solv.1*
|
%{_mandir}/man1/rpmdb2solv.1*
|
||||||
@ -148,6 +152,18 @@ cp ext/*.h %{buildroot}%{_includedir}/solv/
|
|||||||
%{_mandir}/man1/updateinfoxml2solv.1*
|
%{_mandir}/man1/updateinfoxml2solv.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jun 05 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 0.7.4-3mamba
|
||||||
|
- added upstream patch to fix endianess with rpm 5.2
|
||||||
|
|
||||||
|
* Tue Jun 04 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 0.7.4-2mamba
|
||||||
|
- rebuilt with ENABLE_RPMMD=ON for fedora like repository (yum)
|
||||||
|
|
||||||
|
* Tue Jun 04 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 0.7.4-1mamba
|
||||||
|
- update to 0.7.4
|
||||||
|
|
||||||
|
* Tue Jun 04 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 0.6.35-1mamba
|
||||||
|
- update to 0.6.35
|
||||||
|
|
||||||
* Sat Jun 01 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 0.6.34-2mamba
|
* Sat Jun 01 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 0.6.34-2mamba
|
||||||
- rebuilt with rpm5 patch and build options from pld
|
- rebuilt with rpm5 patch and build options from pld
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user