update to 0.22.0 [release 0.22.0-1mamba;Sat Jun 01 2019]
This commit is contained in:
parent
7b35900792
commit
61dbfe8b23
@ -1,11 +0,0 @@
|
||||
--- libdnf-0.11.1/libdnf/dnf-keyring.c.orig 2019-06-01 12:30:44.107188208 +0200
|
||||
+++ libdnf-0.11.1/libdnf/dnf-keyring.c 2019-06-01 12:31:56.831497775 +0200
|
||||
@@ -286,7 +286,7 @@
|
||||
ret = TRUE;
|
||||
out:
|
||||
if (dig != NULL)
|
||||
- dig = pgpDigFree(dig);
|
||||
+ dig = pgpDigFree(dig, 0);
|
||||
if (td != NULL) {
|
||||
rpmtdFreeData(td);
|
||||
free(td);
|
358
libdnf-0.22.0-rpm5-2.patch
Normal file
358
libdnf-0.22.0-rpm5-2.patch
Normal file
@ -0,0 +1,358 @@
|
||||
diff -ru libdnf-0.22.0/libdnf/dnf-rpmts.cpp libdnf-0.22.0.patched/libdnf/dnf-rpmts.cpp
|
||||
--- libdnf-0.22.0/libdnf/dnf-rpmts.cpp 2019-06-02 12:19:17.767417367 +0200
|
||||
+++ libdnf-0.22.0.patched/libdnf/dnf-rpmts.cpp 2019-06-02 11:56:44.647788759 +0200
|
||||
@@ -193,7 +193,7 @@
|
||||
while (rpmpsNextIterator(psi) >= 0) {
|
||||
g_autofree gchar *msg = NULL;
|
||||
prob = rpmpsGetProblem(psi);
|
||||
- msg = rpmProblemString(prob);
|
||||
+ msg = (gchar*)rpmProblemString(prob);
|
||||
g_string_append(string, msg);
|
||||
g_string_append(string, "\n");
|
||||
}
|
||||
@@ -268,7 +268,7 @@
|
||||
/* find package by db-id */
|
||||
recOffset = dnf_package_get_rpmdbid(pkg);
|
||||
rpmlogSetCallback(dnf_rpmts_log_handler_cb, &rpm_error);
|
||||
- iter = rpmtsInitIterator(ts, RPMDBI_PACKAGES,
|
||||
+ iter = rpmtsInitIterator(ts, (rpmTag)RPMDBI_PACKAGES,
|
||||
&recOffset, sizeof(recOffset));
|
||||
if (iter == NULL) {
|
||||
if (rpm_error != NULL) {
|
||||
diff -ru libdnf-0.22.0/libdnf/dnf-transaction.cpp libdnf-0.22.0.patched/libdnf/dnf-transaction.cpp
|
||||
--- libdnf-0.22.0/libdnf/dnf-transaction.cpp 2019-06-02 12:19:17.768417372 +0200
|
||||
+++ libdnf-0.22.0.patched/libdnf/dnf-transaction.cpp 2019-06-02 12:10:17.656626376 +0200
|
||||
@@ -1062,8 +1062,8 @@
|
||||
GPtrArray *pkglist;
|
||||
DnfPackage *pkg;
|
||||
DnfPackage *pkg_tmp;
|
||||
- rpmprobFilterFlags problems_filter = 0;
|
||||
- rpmtransFlags rpmts_flags = RPMTRANS_FLAG_NONE;
|
||||
+ int problems_filter = 0;
|
||||
+ int rpmts_flags = RPMTRANS_FLAG_NONE;
|
||||
DnfTransactionPrivate *priv = GET_PRIVATE(transaction);
|
||||
libdnf::Swdb *swdb = priv->swdb;
|
||||
|
||||
@@ -1306,8 +1306,8 @@
|
||||
goto out;
|
||||
|
||||
/* no signature checking, we've handled that already */
|
||||
- vs_flags = rpmtsSetVSFlags(priv->ts, _RPMVSF_NOSIGNATURES | _RPMVSF_NODIGESTS);
|
||||
- rpmtsSetVSFlags(priv->ts, vs_flags);
|
||||
+ vs_flags = rpmtsSetVSFlags(priv->ts, (rpmVSFlags)(_RPMVSF_NOSIGNATURES | _RPMVSF_NODIGESTS));
|
||||
+ rpmtsSetVSFlags(priv->ts, (rpmVSFlags)vs_flags);
|
||||
|
||||
/* filter diskspace */
|
||||
if (!dnf_context_get_check_disk_space(priv->context))
|
||||
@@ -1326,10 +1326,10 @@
|
||||
|
||||
priv->state = dnf_state_get_child(state);
|
||||
priv->step = DNF_TRANSACTION_STEP_IGNORE;
|
||||
- rpmtsSetFlags(priv->ts, rpmts_flags);
|
||||
+ rpmtsSetFlags(priv->ts, (rpmtransFlags)rpmts_flags);
|
||||
g_debug("Running transaction in test mode");
|
||||
dnf_state_set_allow_cancel(state, FALSE);
|
||||
- rc = rpmtsRun(priv->ts, NULL, problems_filter);
|
||||
+ rc = rpmtsRun(priv->ts, NULL, (rpmprobFilterFlags)problems_filter);
|
||||
if (rc < 0) {
|
||||
ret = FALSE;
|
||||
g_set_error(error,
|
||||
@@ -1359,10 +1359,10 @@
|
||||
/* run the transaction */
|
||||
priv->state = dnf_state_get_child(state);
|
||||
priv->step = DNF_TRANSACTION_STEP_STARTED;
|
||||
- rpmtsSetFlags(priv->ts, rpmts_flags);
|
||||
+ rpmtsSetFlags(priv->ts, (rpmtransFlags)rpmts_flags);
|
||||
g_debug("Running actual transaction");
|
||||
dnf_state_set_allow_cancel(state, FALSE);
|
||||
- rc = rpmtsRun(priv->ts, NULL, problems_filter);
|
||||
+ rc = rpmtsRun(priv->ts, NULL, (rpmprobFilterFlags)problems_filter);
|
||||
if (rc < 0) {
|
||||
ret = FALSE;
|
||||
g_set_error(
|
||||
diff -ru libdnf-0.22.0/libdnf/repo/solvable/Package.cpp libdnf-0.22.0.patched/libdnf/repo/solvable/Package.cpp
|
||||
--- libdnf-0.22.0/libdnf/repo/solvable/Package.cpp 2019-06-01 21:09:37.000000000 +0200
|
||||
+++ libdnf-0.22.0.patched/libdnf/repo/solvable/Package.cpp 2019-06-02 12:15:17.288215714 +0200
|
||||
@@ -3,12 +3,12 @@
|
||||
#include <utility>
|
||||
#include "DependencyContainer.hpp"
|
||||
|
||||
-Package::Package(DnfSack *sack, Id id)
|
||||
+Package_::Package_(DnfSack *sack, Id id)
|
||||
: sack(sack)
|
||||
, id(id)
|
||||
{}
|
||||
|
||||
-Package::Package(DnfSack *sack,
|
||||
+Package_::Package_(DnfSack *sack,
|
||||
HyRepo repo,
|
||||
const char *name,
|
||||
const char *version,
|
||||
@@ -22,7 +22,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
-Package::Package(DnfSack *sack,
|
||||
+Package_::Package_(DnfSack *sack,
|
||||
HyRepo repo,
|
||||
const std::string &name,
|
||||
const std::string &version,
|
||||
@@ -36,148 +36,148 @@
|
||||
}
|
||||
}
|
||||
|
||||
-Package::Package(const Package &package)
|
||||
+Package_::Package_(const Package_ &package)
|
||||
: sack(package.sack)
|
||||
, id(package.id)
|
||||
{}
|
||||
|
||||
-Package::~Package() = default;
|
||||
+Package_::~Package_() = default;
|
||||
|
||||
-const char *Package::getSolvableName() const
|
||||
+const char *Package_::getSolvableName() const
|
||||
{
|
||||
Pool *pool = dnf_sack_get_pool(sack);
|
||||
Solvable *solvable = pool_id2solvable(pool, id);
|
||||
return pool_id2str(pool, solvable->name);
|
||||
}
|
||||
|
||||
-const char *Package::getSolvableEvr() const
|
||||
+const char *Package_::getSolvableEvr() const
|
||||
{
|
||||
Pool *pool = dnf_sack_get_pool(sack);
|
||||
Solvable *solvable = pool_id2solvable(pool, id);
|
||||
return pool_id2str(pool, solvable->evr);
|
||||
}
|
||||
|
||||
-const char *Package::getArch() const
|
||||
+const char *Package_::getArch() const
|
||||
{
|
||||
Pool *pool = dnf_sack_get_pool(sack);
|
||||
Solvable *solvable = pool_id2solvable(pool, id);
|
||||
return pool_id2str(pool, solvable->arch);
|
||||
}
|
||||
|
||||
-const char *Package::getSolvableVendor() const
|
||||
+const char *Package_::getSolvableVendor() const
|
||||
{
|
||||
Pool *pool = dnf_sack_get_pool(sack);
|
||||
Solvable *solvable = pool_id2solvable(pool, id);
|
||||
return pool_id2str(pool, solvable->vendor);
|
||||
}
|
||||
|
||||
-void Package::setSolvableVendor(const char *vendor)
|
||||
+void Package_::setSolvableVendor(const char *vendor)
|
||||
{
|
||||
Solvable *solvable = pool_id2solvable(dnf_sack_get_pool(sack), id);
|
||||
solvable_set_str(solvable, SOLVABLE_VENDOR, vendor);
|
||||
}
|
||||
|
||||
-Id Package::getId() const
|
||||
+Id Package_::getId() const
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
-std::shared_ptr<libdnf::DependencyContainer> Package::getConflicts() const
|
||||
+std::shared_ptr<libdnf::DependencyContainer> Package_::getConflicts() const
|
||||
{
|
||||
return getDependencies(SOLVABLE_CONFLICTS);
|
||||
};
|
||||
|
||||
-std::shared_ptr<libdnf::DependencyContainer> Package::getEnhances() const
|
||||
+std::shared_ptr<libdnf::DependencyContainer> Package_::getEnhances() const
|
||||
{
|
||||
return getDependencies(SOLVABLE_ENHANCES);
|
||||
}
|
||||
|
||||
-std::shared_ptr<libdnf::DependencyContainer> Package::getObsoletes() const
|
||||
+std::shared_ptr<libdnf::DependencyContainer> Package_::getObsoletes() const
|
||||
{
|
||||
return getDependencies(SOLVABLE_OBSOLETES);
|
||||
}
|
||||
|
||||
-std::shared_ptr<libdnf::DependencyContainer> Package::getProvides() const
|
||||
+std::shared_ptr<libdnf::DependencyContainer> Package_::getProvides() const
|
||||
{
|
||||
return getDependencies(SOLVABLE_PROVIDES);
|
||||
}
|
||||
|
||||
-std::shared_ptr<libdnf::DependencyContainer> Package::getRecommends() const
|
||||
+std::shared_ptr<libdnf::DependencyContainer> Package_::getRecommends() const
|
||||
{
|
||||
return getDependencies(SOLVABLE_RECOMMENDS);
|
||||
}
|
||||
|
||||
-std::shared_ptr<libdnf::DependencyContainer> Package::getRequires() const
|
||||
+std::shared_ptr<libdnf::DependencyContainer> Package_::getRequires() const
|
||||
{
|
||||
return getDependencies(SOLVABLE_REQUIRES, 0);
|
||||
}
|
||||
|
||||
-std::shared_ptr<libdnf::DependencyContainer> Package::getRequiresPre() const
|
||||
+std::shared_ptr<libdnf::DependencyContainer> Package_::getRequiresPre() const
|
||||
{
|
||||
return getDependencies(SOLVABLE_REQUIRES, 1);
|
||||
}
|
||||
|
||||
-std::shared_ptr<libdnf::DependencyContainer> Package::getSuggests() const
|
||||
+std::shared_ptr<libdnf::DependencyContainer> Package_::getSuggests() const
|
||||
{
|
||||
return getDependencies(SOLVABLE_SUGGESTS);
|
||||
}
|
||||
|
||||
-std::shared_ptr<libdnf::DependencyContainer> Package::getSupplements() const
|
||||
+std::shared_ptr<libdnf::DependencyContainer> Package_::getSupplements() const
|
||||
{
|
||||
return getDependencies(SOLVABLE_SUPPLEMENTS);
|
||||
}
|
||||
|
||||
-void Package::addConflicts(std::shared_ptr<libdnf::Dependency> dependency)
|
||||
+void Package_::addConflicts(std::shared_ptr<libdnf::Dependency> dependency)
|
||||
{
|
||||
addDependency(std::move(dependency), SOLVABLE_CONFLICTS);
|
||||
}
|
||||
|
||||
-void Package::addEnhances(std::shared_ptr<libdnf::Dependency> dependency)
|
||||
+void Package_::addEnhances(std::shared_ptr<libdnf::Dependency> dependency)
|
||||
{
|
||||
addDependency(std::move(dependency), SOLVABLE_ENHANCES);
|
||||
}
|
||||
|
||||
-void Package::addObsoletes(std::shared_ptr<libdnf::Dependency> dependency)
|
||||
+void Package_::addObsoletes(std::shared_ptr<libdnf::Dependency> dependency)
|
||||
{
|
||||
addDependency(std::move(dependency), SOLVABLE_OBSOLETES);
|
||||
}
|
||||
|
||||
-void Package::addProvides(std::shared_ptr<libdnf::Dependency> dependency)
|
||||
+void Package_::addProvides(std::shared_ptr<libdnf::Dependency> dependency)
|
||||
{
|
||||
addDependency(std::move(dependency), SOLVABLE_PROVIDES);
|
||||
}
|
||||
|
||||
-void Package::addRecommends(std::shared_ptr<libdnf::Dependency> dependency)
|
||||
+void Package_::addRecommends(std::shared_ptr<libdnf::Dependency> dependency)
|
||||
{
|
||||
addDependency(std::move(dependency), SOLVABLE_RECOMMENDS);
|
||||
}
|
||||
|
||||
-void Package::addRequires(std::shared_ptr<libdnf::Dependency> dependency)
|
||||
+void Package_::addRequires(std::shared_ptr<libdnf::Dependency> dependency)
|
||||
{
|
||||
addDependency(std::move(dependency), SOLVABLE_REQUIRES, 0);
|
||||
}
|
||||
|
||||
-void Package::addRequiresPre(std::shared_ptr<libdnf::Dependency> dependency)
|
||||
+void Package_::addRequiresPre(std::shared_ptr<libdnf::Dependency> dependency)
|
||||
{
|
||||
addDependency(std::move(dependency), SOLVABLE_REQUIRES, 1);
|
||||
}
|
||||
|
||||
-void Package::addSuggests(std::shared_ptr<libdnf::Dependency> dependency)
|
||||
+void Package_::addSuggests(std::shared_ptr<libdnf::Dependency> dependency)
|
||||
{
|
||||
addDependency(std::move(dependency), SOLVABLE_SUGGESTS);
|
||||
}
|
||||
|
||||
-void Package::addSupplements(std::shared_ptr<libdnf::Dependency> dependency)
|
||||
+void Package_::addSupplements(std::shared_ptr<libdnf::Dependency> dependency)
|
||||
{
|
||||
addDependency(std::move(dependency), SOLVABLE_SUPPLEMENTS);
|
||||
}
|
||||
|
||||
-void Package::createSolvable(HyRepo repo)
|
||||
+void Package_::createSolvable(HyRepo repo)
|
||||
{
|
||||
id = repo_add_solvable(repo->libsolv_repo);
|
||||
}
|
||||
|
||||
-void Package::fillSolvableData(const char *name, const char *version,
|
||||
+void Package_::fillSolvableData(const char *name, const char *version,
|
||||
const char *arch) const
|
||||
{
|
||||
Solvable *solvable = pool_id2solvable(dnf_sack_get_pool(sack), id);
|
||||
@@ -187,7 +187,7 @@
|
||||
solvable_set_str(solvable, SOLVABLE_ARCH, arch);
|
||||
}
|
||||
|
||||
-std::shared_ptr<libdnf::DependencyContainer> Package::getDependencies(Id type, Id marker) const
|
||||
+std::shared_ptr<libdnf::DependencyContainer> Package_::getDependencies(Id type, Id marker) const
|
||||
{
|
||||
auto queue = getDependencyQueue(type, marker);
|
||||
auto container = std::make_shared<libdnf::DependencyContainer>(sack, *queue);
|
||||
@@ -198,7 +198,7 @@
|
||||
return container;
|
||||
}
|
||||
|
||||
-Queue *Package::getDependencyQueue(Id type, Id marker) const
|
||||
+Queue *Package_::getDependencyQueue(Id type, Id marker) const
|
||||
{
|
||||
Queue dependencyQueue{};
|
||||
auto queue = static_cast<Queue *>(malloc(sizeof(Queue)));
|
||||
@@ -219,7 +219,7 @@
|
||||
return queue;
|
||||
}
|
||||
|
||||
-void Package::addDependency(std::shared_ptr<libdnf::Dependency> dependency, int type, Id marker)
|
||||
+void Package_::addDependency(std::shared_ptr<libdnf::Dependency> dependency, int type, Id marker)
|
||||
{
|
||||
Solvable *solvable = pool_id2solvable(dnf_sack_get_pool(sack), id);
|
||||
solvable_add_deparray(solvable, type, dependency->getId(), marker);
|
||||
diff -ru libdnf-0.22.0/libdnf/repo/solvable/Package.hpp libdnf-0.22.0.patched/libdnf/repo/solvable/Package.hpp
|
||||
--- libdnf-0.22.0/libdnf/repo/solvable/Package.hpp 2019-06-01 21:09:37.000000000 +0200
|
||||
+++ libdnf-0.22.0.patched/libdnf/repo/solvable/Package.hpp 2019-06-02 11:33:12.717551563 +0200
|
||||
@@ -11,12 +11,12 @@
|
||||
|
||||
#include "Dependency.hpp"
|
||||
|
||||
-struct Package
|
||||
+struct Package_
|
||||
{
|
||||
public:
|
||||
- Package(DnfSack *sack, Id id);
|
||||
- Package(const Package &package);
|
||||
- virtual ~Package();
|
||||
+ Package_(DnfSack *sack, Id id);
|
||||
+ Package_(const Package_ &package);
|
||||
+ virtual ~Package_();
|
||||
|
||||
std::shared_ptr<libdnf::DependencyContainer> getConflicts() const;
|
||||
std::shared_ptr<libdnf::DependencyContainer> getEnhances() const;
|
||||
@@ -34,8 +34,8 @@
|
||||
const char *getArch() const;
|
||||
|
||||
protected:
|
||||
- Package(DnfSack *sack, HyRepo repo, const char *name, const char *version, const char *arch, bool createSolvable = true);
|
||||
- Package(DnfSack *sack, HyRepo repo, const std::string &name, const std::string &version, const std::string &arch, bool createSolvable = true);
|
||||
+ Package_(DnfSack *sack, HyRepo repo, const char *name, const char *version, const char *arch, bool createSolvable = true);
|
||||
+ Package_(DnfSack *sack, HyRepo repo, const std::string &name, const std::string &version, const std::string &arch, bool createSolvable = true);
|
||||
|
||||
void addConflicts(std::shared_ptr<libdnf::Dependency> dependency);
|
||||
void addEnhances(std::shared_ptr<libdnf::Dependency> dependency);
|
||||
diff -ru libdnf-0.22.0/tests/libdnf/repo/PackageInstantiable.cpp libdnf-0.22.0.patched/tests/libdnf/repo/PackageInstantiable.cpp
|
||||
--- libdnf-0.22.0/tests/libdnf/repo/PackageInstantiable.cpp 2019-06-01 21:09:37.000000000 +0200
|
||||
+++ libdnf-0.22.0.patched/tests/libdnf/repo/PackageInstantiable.cpp 2019-06-02 12:17:06.988770015 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
const char *name,
|
||||
const char *version,
|
||||
const char *arch)
|
||||
- : Package(sack, repo, name, version, arch)
|
||||
+ : Package_(sack, repo, name, version, arch)
|
||||
{
|
||||
addProvides(std::make_shared<libdnf::Dependency>(sack, "rpm = 1.0"));
|
||||
}
|
||||
diff -ru libdnf-0.22.0/tests/libdnf/repo/PackageInstantiable.hpp libdnf-0.22.0.patched/tests/libdnf/repo/PackageInstantiable.hpp
|
||||
--- libdnf-0.22.0/tests/libdnf/repo/PackageInstantiable.hpp 2019-06-01 21:09:37.000000000 +0200
|
||||
+++ libdnf-0.22.0.patched/tests/libdnf/repo/PackageInstantiable.hpp 2019-06-02 12:16:36.165615422 +0200
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "libdnf/repo/solvable/Package.hpp"
|
||||
|
||||
-class PackageInstantiable : public Package
|
||||
+class PackageInstantiable : public Package_
|
||||
{
|
||||
public:
|
||||
PackageInstantiable(DnfSack *sack, HyRepo repo, const char *name, const char *version, const char *arch);
|
@ -1,5 +1,3 @@
|
||||
Only in libdnf-0.11.1.good: build
|
||||
Only in libdnf-0.11.1.good/docs/libdnf: version.xml
|
||||
diff -ru libdnf-0.11.1.good/libdnf/dnf-keyring.h libdnf-0.11.1/libdnf/dnf-keyring.h
|
||||
--- libdnf-0.11.1.good/libdnf/dnf-keyring.h 2019-06-01 12:44:55.271022533 +0200
|
||||
+++ libdnf-0.11.1/libdnf/dnf-keyring.h 2019-06-01 12:45:34.318205068 +0200
|
||||
@ -11,9 +9,9 @@ diff -ru libdnf-0.11.1.good/libdnf/dnf-keyring.h libdnf-0.11.1/libdnf/dnf-keyrin
|
||||
#include <rpm/rpmts.h>
|
||||
|
||||
gboolean dnf_keyring_add_public_key (const rpmts ts,
|
||||
diff -ru libdnf-0.11.1.good/libdnf/dnf-repo.c libdnf-0.11.1/libdnf/dnf-repo.c
|
||||
--- libdnf-0.11.1.good/libdnf/dnf-repo.c 2019-06-01 12:41:19.347019561 +0200
|
||||
+++ libdnf-0.11.1/libdnf/dnf-repo.c 2019-06-01 12:45:34.318205068 +0200
|
||||
diff -ru libdnf-0.11.1.good/libdnf/dnf-repo.cpp libdnf-0.11.1/libdnf/dnf-repo.cpp
|
||||
--- libdnf-0.11.1.good/libdnf/dnf-repo.cpp 2019-06-01 12:41:19.347019561 +0200
|
||||
+++ libdnf-0.11.1/libdnf/dnf-repo.cpp 2019-06-01 12:45:34.318205068 +0200
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <glib/gstdio.h>
|
||||
#include "hy-util.h"
|
@ -1,32 +1,3 @@
|
||||
--- libdnf-0.11.1/CMakeLists.txt.orig 2017-10-16 09:00:54.000000000 +0200
|
||||
+++ libdnf-0.11.1/CMakeLists.txt 2018-05-27 09:46:34.473778693 +0200
|
||||
@@ -30,6 +30,8 @@
|
||||
PKG_CHECK_MODULES(GLIB gio-unix-2.0>=2.46.0 REQUIRED)
|
||||
FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb)
|
||||
find_package (LibSolv 0.6.21 REQUIRED COMPONENTS ext)
|
||||
+PKG_CHECK_MODULES(RPM rpm REQUIRED)
|
||||
+include_directories (${RPM_INCLUDE_DIRS})
|
||||
if (ENABLE_RHSM_SUPPORT)
|
||||
pkg_check_modules (RHSM REQUIRED librhsm)
|
||||
include_directories (${RHSM_INCLUDE_DIRS})
|
||||
@@ -56,13 +58,14 @@
|
||||
|
||||
# rpm:
|
||||
FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb)
|
||||
-IF (NOT RPMDB_LIBRARY)
|
||||
- FIND_LIBRARY (RPMDB_LIBRARY NAMES rpm)
|
||||
-ENDIF (NOT RPMDB_LIBRARY)
|
||||
+FIND_LIBRARY (RPMLIB_LIBRARY NAMES rpm)
|
||||
FIND_LIBRARY (RPMIO_LIBRARY NAMES rpmio)
|
||||
IF (RPMIO_LIBRARY)
|
||||
SET(RPMDB_LIBRARY ${RPMIO_LIBRARY} ${RPMDB_LIBRARY})
|
||||
ENDIF (RPMIO_LIBRARY)
|
||||
+IF (RPMLIB_LIBRARY)
|
||||
+ SET(RPMDB_LIBRARY ${RPMDB_LIBRARY} ${RPMLIB_LIBRARY})
|
||||
+ENDIF (RPMLIB_LIBRARY)
|
||||
|
||||
ADD_DEFINITIONS(-DTESTDATADIR=\\"${CMAKE_SOURCE_DIR}/data/tests\\")
|
||||
ADD_DEFINITIONS(-DPACKAGE_VERSION=\\"${LIBDNF_VERSION}\\")
|
||||
--- libdnf-0.11.1/libdnf/rpmorg-compat.h.orig 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ libdnf-0.11.1/libdnf/rpmorg-compat.h 2018-05-27 11:32:14.263706303 +0200
|
||||
@@ -0,0 +1,64 @@
|
||||
@ -38,7 +9,7 @@
|
||||
+#define _RPMVSF_NOSIGNATURES (RPMVSF_NODSAHEADER | RPMVSF_NORSAHEADER | RPMVSF_NODSA | RPMVSF_NORSA)
|
||||
+#define _RPMVSF_NODIGESTS (RPMVSF_NOSHA1HEADER | RPMVSF_NOMD5HEADER | RPMVSF_NOSHA1 | RPMVSF_NOMD5)
|
||||
+
|
||||
+static inline const char * headerGetString(Header h, int32_t tag)
|
||||
+static inline const char * headerGetString(Header h, rpmTag tag)
|
||||
+{
|
||||
+ const char *res = NULL;
|
||||
+ struct rpmtd_s td;
|
||||
@ -79,7 +50,7 @@
|
||||
+ return val;
|
||||
+}
|
||||
+
|
||||
+static inline uint64_t headerGetNumber(Header h, int32_t tag)
|
||||
+static inline uint64_t headerGetNumber(Header h, rpmTag tag)
|
||||
+{
|
||||
+ uint64_t res = 0;
|
||||
+ struct rpmtd_s td;
|
||||
@ -94,18 +65,49 @@
|
||||
+}
|
||||
+
|
||||
+#endif /* RPMORG_COMPAT_H */
|
||||
--- libdnf-0.11.1/libdnf/dnf-context.c.orig 2017-10-16 09:00:54.000000000 +0200
|
||||
+++ libdnf-0.11.1/libdnf/dnf-context.c 2018-05-27 09:43:03.723781098 +0200
|
||||
@@ -32,7 +32,7 @@
|
||||
diff -ru libdnf-0.22.0.orig/CMakeLists.txt libdnf-0.22.0/CMakeLists.txt
|
||||
--- libdnf-0.22.0.orig/CMakeLists.txt 2019-06-01 21:09:37.000000000 +0200
|
||||
+++ libdnf-0.22.0/CMakeLists.txt 2019-06-02 10:44:31.421947961 +0200
|
||||
@@ -54,6 +54,8 @@
|
||||
pkg_check_modules(SMARTCOLS REQUIRED smartcols)
|
||||
FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb)
|
||||
find_package (LibSolv 0.6.30 REQUIRED COMPONENTS ext)
|
||||
+PKG_CHECK_MODULES(RPM rpm REQUIRED)
|
||||
+include_directories (${RPM_INCLUDE_DIRS})
|
||||
if (ENABLE_RHSM_SUPPORT)
|
||||
pkg_check_modules (RHSM REQUIRED librhsm>=0.0.3)
|
||||
include_directories (${RHSM_INCLUDE_DIRS})
|
||||
@@ -96,13 +98,14 @@
|
||||
|
||||
# rpm:
|
||||
FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb)
|
||||
-IF (NOT RPMDB_LIBRARY)
|
||||
- FIND_LIBRARY (RPMDB_LIBRARY NAMES rpm)
|
||||
-ENDIF (NOT RPMDB_LIBRARY)
|
||||
+FIND_LIBRARY (RPMLIB_LIBRARY NAMES rpm)
|
||||
FIND_LIBRARY (RPMIO_LIBRARY NAMES rpmio)
|
||||
IF (RPMIO_LIBRARY)
|
||||
SET(RPMDB_LIBRARY ${RPMIO_LIBRARY} ${RPMDB_LIBRARY})
|
||||
ENDIF (RPMIO_LIBRARY)
|
||||
+IF (RPMLIB_LIBRARY)
|
||||
+ SET(RPMDB_LIBRARY ${RPMDB_LIBRARY} ${RPMLIB_LIBRARY})
|
||||
+ENDIF (RPMLIB_LIBRARY)
|
||||
|
||||
pkg_check_modules(SQLite3 sqlite3 REQUIRED)
|
||||
|
||||
diff -ru libdnf-0.22.0.orig/libdnf/dnf-context.cpp libdnf-0.22.0/libdnf/dnf-context.cpp
|
||||
--- libdnf-0.22.0.orig/libdnf/dnf-context.cpp 2019-06-01 21:09:37.000000000 +0200
|
||||
+++ libdnf-0.22.0/libdnf/dnf-context.cpp 2019-06-02 10:38:31.050550741 +0200
|
||||
@@ -36,7 +36,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <gio/gio.h>
|
||||
-#include <rpm/rpmlib.h>
|
||||
+#include "rpmorg-compat.h"
|
||||
#include <rpm/rpmmacro.h>
|
||||
#include <rpm/rpmts.h>
|
||||
#include <rpm/rpmdb.h>
|
||||
@@ -297,9 +297,9 @@
|
||||
@@ -328,9 +328,9 @@
|
||||
return priv->base_arch;
|
||||
|
||||
/* get info from RPM */
|
||||
@ -117,29 +119,9 @@
|
||||
priv->arch_info = g_strdup(value);
|
||||
|
||||
/* find the base architecture */
|
||||
--- libdnf-0.11.1/libdnf/dnf-keyring.h.orig 2017-10-16 09:00:54.000000000 +0200
|
||||
+++ libdnf-0.11.1/libdnf/dnf-keyring.h 2018-05-27 11:14:47.623718253 +0200
|
||||
@@ -24,14 +24,14 @@
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
-#include <rpm/rpmkeyring.h>
|
||||
+#include <rpm/rpmts.h>
|
||||
|
||||
-gboolean dnf_keyring_add_public_key (rpmKeyring keyring,
|
||||
+gboolean dnf_keyring_add_public_key (const rpmts ts,
|
||||
const gchar *filename,
|
||||
GError **error);
|
||||
-gboolean dnf_keyring_add_public_keys (rpmKeyring keyring,
|
||||
+gboolean dnf_keyring_add_public_keys (rpmts ts,
|
||||
GError **error);
|
||||
-gboolean dnf_keyring_check_untrusted_file (rpmKeyring keyring,
|
||||
+gboolean dnf_keyring_check_untrusted_file (
|
||||
const gchar *filename,
|
||||
GError **error);
|
||||
|
||||
--- libdnf-0.11.1/libdnf/dnf-keyring.c.orig 2017-10-16 09:00:54.000000000 +0200
|
||||
+++ libdnf-0.11.1/libdnf/dnf-keyring.c 2018-05-27 11:15:39.210384333 +0200
|
||||
diff -ru libdnf-0.22.0.orig/libdnf/dnf-keyring.cpp libdnf-0.22.0/libdnf/dnf-keyring.cpp
|
||||
--- libdnf-0.22.0.orig/libdnf/dnf-keyring.cpp 2019-06-01 21:09:37.000000000 +0200
|
||||
+++ libdnf-0.22.0/libdnf/dnf-keyring.cpp 2019-06-02 10:48:29.955925592 +0200
|
||||
@@ -32,7 +32,9 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -264,24 +246,24 @@
|
||||
|
||||
/* convert and upscale */
|
||||
- headerConvert(hdr, HEADERCONV_RETROFIT_V3);
|
||||
+/* headerConvert(hdr, HEADERCONV_RETROFIT_V3); */
|
||||
+ /*headerConvert(hdr, HEADERCONV_RETROFIT_V3);*/
|
||||
|
||||
/* get RSA key */
|
||||
- td = rpmtdNew();
|
||||
+ td = malloc (sizeof (*td));
|
||||
rc = headerGet(hdr,
|
||||
RPMTAG_RSAHEADER,
|
||||
td,
|
||||
@@ -265,7 +259,7 @@
|
||||
+ td = (rpmtd)malloc (sizeof (*td));
|
||||
rc = static_cast<rpmRC>(headerGet(hdr, RPMTAG_RSAHEADER, td, HEADERGET_MINMEM));
|
||||
if (rc != RPMRC_NOTFOUND) {
|
||||
/* try to read DSA key as a fallback */
|
||||
@@ -259,7 +253,7 @@
|
||||
}
|
||||
|
||||
/* make it into a digest */
|
||||
- dig = pgpNewDig();
|
||||
+ dig = rpmtsDig(ts);
|
||||
rc = pgpPrtPkts(td->data, td->count, dig, 0);
|
||||
if (rc != 0) {
|
||||
rc = static_cast<rpmRC>(pgpPrtPkts(static_cast<const uint8_t *>(td->data), td->count, dig, 0));
|
||||
if (rc != RPMRC_OK) {
|
||||
g_set_error(error,
|
||||
@@ -277,7 +271,7 @@
|
||||
@@ -271,7 +265,7 @@
|
||||
}
|
||||
|
||||
/* does the key exist in the keyring */
|
||||
@ -290,7 +272,7 @@
|
||||
if (rc != RPMRC_OK) {
|
||||
g_set_error(error,
|
||||
DNF_ERROR,
|
||||
@@ -292,15 +286,15 @@
|
||||
@@ -286,15 +280,15 @@
|
||||
ret = TRUE;
|
||||
out:
|
||||
if (dig != NULL)
|
||||
@ -310,101 +292,34 @@
|
||||
if (fd != NULL)
|
||||
Fclose(fd);
|
||||
return ret;
|
||||
--- libdnf-0.11.1/libdnf/dnf-rpmts.c.orig 2017-10-16 09:00:54.000000000 +0200
|
||||
+++ libdnf-0.11.1/libdnf/dnf-rpmts.c 2018-05-27 11:19:52.157048112 +0200
|
||||
@@ -32,7 +32,8 @@
|
||||
|
||||
diff -ru libdnf-0.22.0.orig/libdnf/dnf-keyring.h libdnf-0.22.0/libdnf/dnf-keyring.h
|
||||
--- libdnf-0.22.0.orig/libdnf/dnf-keyring.h 2019-06-01 21:09:37.000000000 +0200
|
||||
+++ libdnf-0.22.0/libdnf/dnf-keyring.h 2019-06-02 10:46:47.839503435 +0200
|
||||
@@ -24,16 +24,16 @@
|
||||
|
||||
#include <glib.h>
|
||||
-#include <rpm/rpmlib.h>
|
||||
+#define _RPMLOG_INTERNAL
|
||||
+#include <rpm/rpm46compat.h>
|
||||
#include <rpm/rpmlog.h>
|
||||
#include <rpm/rpmdb.h>
|
||||
|
||||
@@ -155,7 +156,7 @@
|
||||
}
|
||||
out:
|
||||
Fclose(fd);
|
||||
- headerFree(hdr);
|
||||
+ hdr = headerFree(hdr);
|
||||
return ret;
|
||||
}
|
||||
-#include <rpm/rpmkeyring.h>
|
||||
+#include <rpm/rpmts.h>
|
||||
|
||||
@@ -231,10 +232,17 @@
|
||||
diskspace,
|
||||
generic_str);
|
||||
break;
|
||||
- case RPMPROB_OBSOLETES:
|
||||
- str = g_strdup_printf("package %s is obsoleted by %s",
|
||||
- pkg_nevr,
|
||||
- pkg_nevr_alt);
|
||||
+ case RPMPROB_RDONLY:
|
||||
+ str = g_strdup_printf ("tried to install package on read-only filesystem");
|
||||
+ break;
|
||||
+ case RPMPROB_BADPRETRANS:
|
||||
+ str = g_strdup_printf ("bad %%pretrans?"); // unimplemented acc. to rpmps.h
|
||||
+ break;
|
||||
+ case RPMPROB_BADPLATFORM:
|
||||
+ str = g_strdup_printf ("package %s is for a different platform", pkg_nevr);
|
||||
+ break;
|
||||
+ case RPMPROB_NOREPACKAGE:
|
||||
+ str = g_strdup_printf ("re-packaged package %s is missing", pkg_nevr);
|
||||
break;
|
||||
}
|
||||
return str;
|
||||
@@ -297,7 +305,7 @@
|
||||
DNF_ERROR_INTERNAL_ERROR,
|
||||
"Error running transaction and no problems were reported!");
|
||||
out:
|
||||
- rpmpsFree(probs);
|
||||
+ probs = rpmpsFree(probs);
|
||||
return ret;
|
||||
}
|
||||
G_BEGIN_DECLS
|
||||
|
||||
@@ -310,11 +318,11 @@
|
||||
GString **string =(GString **) data;
|
||||
-gboolean dnf_keyring_add_public_key (rpmKeyring keyring,
|
||||
+gboolean dnf_keyring_add_public_key (const rpmts ts,
|
||||
const gchar *filename,
|
||||
GError **error);
|
||||
-gboolean dnf_keyring_add_public_keys (rpmKeyring keyring,
|
||||
+gboolean dnf_keyring_add_public_keys (rpmts ts,
|
||||
GError **error);
|
||||
-gboolean dnf_keyring_check_untrusted_file (rpmKeyring keyring,
|
||||
+gboolean dnf_keyring_check_untrusted_file (
|
||||
const gchar *filename,
|
||||
GError **error);
|
||||
|
||||
/* only log errors */
|
||||
- if (rpmlogRecPriority(rec) != RPMLOG_ERR)
|
||||
+ if (rec->pri != RPMLOG_ERR)
|
||||
return RPMLOG_DEFAULT;
|
||||
|
||||
/* do not log internal BDB errors */
|
||||
- if (g_strstr_len(rpmlogRecMessage(rec), -1, "BDB") != NULL)
|
||||
+ if (g_strstr_len(rec->message, -1, "BDB") != NULL)
|
||||
return 0;
|
||||
|
||||
/* create string if required */
|
||||
@@ -324,7 +332,7 @@
|
||||
/* if text already exists, join them */
|
||||
if ((*string)->len > 0)
|
||||
g_string_append(*string, ": ");
|
||||
- g_string_append(*string, rpmlogRecMessage(rec));
|
||||
+ g_string_append(*string, rec->message);
|
||||
|
||||
/* remove the trailing /n which rpm does */
|
||||
if ((*string)->len > 0)
|
||||
@@ -373,7 +381,7 @@
|
||||
}
|
||||
|
||||
/* success */
|
||||
- headerLink(hdr);
|
||||
+ hdr = headerLink(hdr);
|
||||
out:
|
||||
rpmlogSetCallback(NULL, NULL);
|
||||
if (iter != NULL)
|
||||
@@ -419,6 +427,6 @@
|
||||
}
|
||||
out:
|
||||
if (hdr != NULL)
|
||||
- headerFree(hdr);
|
||||
+ hdr = headerFree(hdr);
|
||||
return ret;
|
||||
}
|
||||
--- libdnf-0.11.1/libdnf/dnf-repo.c.orig 2017-10-16 09:00:54.000000000 +0200
|
||||
+++ libdnf-0.11.1/libdnf/dnf-repo.c 2018-05-27 11:21:27.687047021 +0200
|
||||
@@ -1501,15 +1501,12 @@
|
||||
diff -ru libdnf-0.22.0.orig/libdnf/dnf-repo.cpp libdnf-0.22.0/libdnf/dnf-repo.cpp
|
||||
--- libdnf-0.22.0.orig/libdnf/dnf-repo.cpp 2019-06-01 21:09:37.000000000 +0200
|
||||
+++ libdnf-0.22.0/libdnf/dnf-repo.cpp 2019-06-02 10:38:31.051550744 +0200
|
||||
@@ -1558,15 +1558,12 @@
|
||||
GError **error)
|
||||
{
|
||||
gboolean ret;
|
||||
@ -422,34 +337,106 @@
|
||||
return ret;
|
||||
}
|
||||
|
||||
--- libdnf-0.11.1/libdnf/dnf-transaction.c.orig 2017-10-16 09:00:54.000000000 +0200
|
||||
+++ libdnf-0.11.1/libdnf/dnf-transaction.c 2018-05-27 11:31:42.767039995 +0200
|
||||
@@ -29,7 +29,7 @@
|
||||
*/
|
||||
diff -ru libdnf-0.22.0.orig/libdnf/dnf-rpmts.cpp libdnf-0.22.0/libdnf/dnf-rpmts.cpp
|
||||
--- libdnf-0.22.0.orig/libdnf/dnf-rpmts.cpp 2019-06-01 21:09:37.000000000 +0200
|
||||
+++ libdnf-0.22.0/libdnf/dnf-rpmts.cpp 2019-06-02 10:38:31.051550744 +0200
|
||||
@@ -32,7 +32,8 @@
|
||||
|
||||
|
||||
#include <glib.h>
|
||||
-#include <rpm/rpmlib.h>
|
||||
+#define _RPMLOG_INTERNAL
|
||||
+#include <rpm/rpm46compat.h>
|
||||
#include <rpm/rpmlog.h>
|
||||
#include <rpm/rpmdb.h>
|
||||
|
||||
@@ -157,7 +158,7 @@
|
||||
}
|
||||
out:
|
||||
Fclose(fd);
|
||||
- headerFree(hdr);
|
||||
+ hdr = headerFree(hdr);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -218,7 +219,7 @@
|
||||
DNF_ERROR_INTERNAL_ERROR,
|
||||
_("Error running transaction and no problems were reported!"));
|
||||
out:
|
||||
- rpmpsFree(probs);
|
||||
+ probs = rpmpsFree(probs);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -231,11 +232,11 @@
|
||||
GString **string =(GString **) data;
|
||||
|
||||
/* only log errors */
|
||||
- if (rpmlogRecPriority(rec) != RPMLOG_ERR)
|
||||
+ if (rec->pri != RPMLOG_ERR)
|
||||
return RPMLOG_DEFAULT;
|
||||
|
||||
/* do not log internal BDB errors */
|
||||
- if (g_strstr_len(rpmlogRecMessage(rec), -1, "BDB") != NULL)
|
||||
+ if (g_strstr_len(rec->message, -1, "BDB") != NULL)
|
||||
return 0;
|
||||
|
||||
/* create string if required */
|
||||
@@ -245,7 +246,7 @@
|
||||
/* if text already exists, join them */
|
||||
if ((*string)->len > 0)
|
||||
g_string_append(*string, ": ");
|
||||
- g_string_append(*string, rpmlogRecMessage(rec));
|
||||
+ g_string_append(*string, rec->message);
|
||||
|
||||
/* remove the trailing /n which rpm does */
|
||||
if ((*string)->len > 0)
|
||||
@@ -294,7 +295,7 @@
|
||||
}
|
||||
|
||||
/* success */
|
||||
- headerLink(hdr);
|
||||
+ hdr = headerLink(hdr);
|
||||
out:
|
||||
rpmlogSetCallback(NULL, NULL);
|
||||
if (iter != NULL)
|
||||
@@ -340,6 +341,6 @@
|
||||
}
|
||||
out:
|
||||
if (hdr != NULL)
|
||||
- headerFree(hdr);
|
||||
+ hdr = headerFree(hdr);
|
||||
return ret;
|
||||
}
|
||||
diff -ru libdnf-0.22.0.orig/libdnf/dnf-transaction.cpp libdnf-0.22.0/libdnf/dnf-transaction.cpp
|
||||
--- libdnf-0.22.0.orig/libdnf/dnf-transaction.cpp 2019-06-01 21:09:37.000000000 +0200
|
||||
+++ libdnf-0.22.0/libdnf/dnf-transaction.cpp 2019-06-02 10:55:58.480821893 +0200
|
||||
@@ -28,7 +28,7 @@
|
||||
* This object represents an RPM transaction.
|
||||
*/
|
||||
|
||||
-#include <rpm/rpmlib.h>
|
||||
+#include "rpmorg-compat.h"
|
||||
#include <rpm/rpmts.h>
|
||||
#include <rpm/rpmlog.h>
|
||||
#include <rpm/rpmts.h>
|
||||
|
||||
@@ -54,7 +54,6 @@
|
||||
typedef struct
|
||||
{
|
||||
DnfDb *db;
|
||||
- rpmKeyring keyring;
|
||||
rpmts ts;
|
||||
DnfContext *context; /* weak reference */
|
||||
GPtrArray *repos;
|
||||
@@ -89,7 +88,6 @@
|
||||
@@ -56,7 +56,6 @@
|
||||
} DnfTransactionStep;
|
||||
|
||||
typedef struct {
|
||||
- rpmKeyring keyring;
|
||||
rpmts ts;
|
||||
DnfContext *context; /* weak reference */
|
||||
GPtrArray *repos;
|
||||
@@ -93,7 +92,6 @@
|
||||
|
||||
g_ptr_array_unref(priv->pkgs_to_download);
|
||||
g_timer_destroy(priv->timer);
|
||||
- rpmKeyringFree(priv->keyring);
|
||||
rpmtsFree(priv->ts);
|
||||
|
||||
if (priv->db != NULL)
|
||||
@@ -354,7 +352,7 @@
|
||||
if (priv->swdb != NULL)
|
||||
@@ -335,7 +333,7 @@
|
||||
}
|
||||
|
||||
/* check file */
|
||||
@ -457,16 +444,31 @@
|
||||
+ if (!dnf_keyring_check_untrusted_file(fn, &error_local)) {
|
||||
|
||||
/* probably an i/o error */
|
||||
if (!g_error_matches(error_local,
|
||||
@@ -721,7 +719,6 @@
|
||||
/* don't do anything */
|
||||
break;
|
||||
if (!g_error_matches(error_local, DNF_ERROR, DNF_ERROR_GPG_SIGNATURE_INVALID)) {
|
||||
@@ -692,22 +690,6 @@
|
||||
/* don't do anything */
|
||||
break;
|
||||
|
||||
- case RPMCALLBACK_INST_STOP:
|
||||
case RPMCALLBACK_UNINST_STOP:
|
||||
- case RPMCALLBACK_INST_STOP:
|
||||
- pkg = dnf_find_pkg_from_header(priv->install, hdr);
|
||||
- if (pkg == NULL && filename != NULL) {
|
||||
- pkg = dnf_find_pkg_from_filename_suffix(priv->install, filename);
|
||||
- }
|
||||
-
|
||||
- // transaction item install complete
|
||||
- _swdb_transaction_item_progress(swdb, pkg);
|
||||
-
|
||||
- /* phase complete */
|
||||
- ret = dnf_state_done(priv->state, &error_local);
|
||||
- if (!ret) {
|
||||
- g_warning("state increment failed: %s", error_local->message);
|
||||
- }
|
||||
- break;
|
||||
-
|
||||
case RPMCALLBACK_UNINST_STOP:
|
||||
|
||||
/* phase complete */
|
||||
@@ -1195,7 +1192,7 @@
|
||||
pkg = dnf_find_pkg_from_header(priv->remove, hdr);
|
||||
@@ -1025,7 +1007,7 @@
|
||||
|
||||
DnfTransactionPrivate *priv = GET_PRIVATE(transaction);
|
||||
/* import all system wide GPG keys */
|
||||
@ -475,7 +477,7 @@
|
||||
return FALSE;
|
||||
|
||||
/* import downloaded repo GPG keys */
|
||||
@@ -1208,7 +1205,7 @@
|
||||
@@ -1038,7 +1020,7 @@
|
||||
const char *pubkey = *iter;
|
||||
if (g_file_test(pubkey, G_FILE_TEST_EXISTS)) {
|
||||
/* import */
|
||||
@ -484,28 +486,46 @@
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@@ -1307,15 +1304,7 @@
|
||||
@@ -1134,12 +1116,7 @@
|
||||
|
||||
/* setup the transaction */
|
||||
tmp = dnf_context_get_install_root(priv->context);
|
||||
- rc = rpmtsSetRootDir(priv->ts, tmp);
|
||||
- if (rc < 0) {
|
||||
- ret = FALSE;
|
||||
- g_set_error_literal(error,
|
||||
- DNF_ERROR,
|
||||
- DNF_ERROR_INTERNAL_ERROR,
|
||||
- "failed to set root");
|
||||
- g_set_error_literal(error, DNF_ERROR, DNF_ERROR_INTERNAL_ERROR, _("failed to set root"));
|
||||
- goto out;
|
||||
- }
|
||||
+ rpmtsSetRootDir(priv->ts, tmp);
|
||||
rpmtsSetNotifyCallback(priv->ts,
|
||||
dnf_transaction_ts_progress_cb,
|
||||
transaction);
|
||||
@@ -1602,7 +1591,6 @@
|
||||
g_object_add_weak_pointer(G_OBJECT(priv->context),(void **) &priv->context);
|
||||
rpmtsSetNotifyCallback(priv->ts, dnf_transaction_ts_progress_cb, transaction);
|
||||
|
||||
/* add things to install */
|
||||
@@ -1471,6 +1448,5 @@
|
||||
g_object_add_weak_pointer(G_OBJECT(priv->context), (void **)&priv->context);
|
||||
priv->ts = rpmtsCreate();
|
||||
rpmtsSetRootDir(priv->ts, dnf_context_get_install_root(context));
|
||||
- priv->keyring = rpmtsGetKeyring(priv->ts, 1);
|
||||
priv->db = dnf_db_new(context);
|
||||
/* propagate db enablement */
|
||||
dnf_db_set_enabled(priv->db, dnf_context_get_yumdb_enabled(context));
|
||||
return transaction;
|
||||
}
|
||||
--- libdnf-0.22.0/libdnf/dnf-keyring.cpp.orig 2019-06-02 10:58:36.901502058 +0200
|
||||
+++ libdnf-0.22.0/libdnf/dnf-keyring.cpp 2019-06-02 10:58:42.824527553 +0200
|
||||
@@ -280,7 +280,7 @@
|
||||
ret = TRUE;
|
||||
out:
|
||||
if (dig != NULL)
|
||||
- dig = pgpDigFree(dig);
|
||||
+ dig = pgpDigFree(dig, 0);
|
||||
if (td != NULL) {
|
||||
rpmtdFreeData(td);
|
||||
free(td);
|
||||
--- libdnf-0.22.0/libdnf/dnf-keyring.cpp.orig 2019-06-02 11:26:04.809681377 +0200
|
||||
+++ libdnf-0.22.0/libdnf/dnf-keyring.cpp 2019-06-02 11:24:00.029136905 +0200
|
||||
@@ -215,7 +215,7 @@
|
||||
|
||||
/* we don't want to abort on missing keys */
|
||||
ts = rpmtsCreate();
|
||||
- rpmtsSetVSFlags(ts, _RPMVSF_NOSIGNATURES);
|
||||
+ rpmtsSetVSFlags(ts, (rpmVSFlags)_RPMVSF_NOSIGNATURES);
|
||||
|
||||
/* read in the file */
|
||||
rc = rpmReadPackageFile(ts, fd, filename, &hdr);
|
19
libdnf.spec
19
libdnf.spec
@ -1,5 +1,5 @@
|
||||
Name: libdnf
|
||||
Version: 0.11.1
|
||||
Version: 0.22.0
|
||||
Release: 1mamba
|
||||
Summary: Software management library
|
||||
Group: System/Libraries
|
||||
@ -10,9 +10,9 @@ URL: https://github.com/rpm-software-management/libdnf
|
||||
## GITSOURCE https://github.com/rpm-software-management/libdnf.git 0.22.4
|
||||
Source: https://github.com/rpm-software-management/libdnf.git/%{version}/libdnf-%{version}.tar.bz2
|
||||
Patch0: libdnf-0.33.0-gcc-8.3.0.patch
|
||||
Patch1: libdnf-0.11.1-rpm-5.patch
|
||||
Patch2: libdnf-0.11.1-rpm-5.2.patch
|
||||
Patch3: libdnf-0.11.1-rpm-5-additional.patch
|
||||
Patch1: libdnf-0.22.0-rpm5.patch
|
||||
Patch2: libdnf-0.22.0-rpm5-2.patch
|
||||
Patch3: libdnf-0.22.0-rpm5-additional.patch
|
||||
License: LGPL
|
||||
## AUTOBUILDREQ-BEGIN
|
||||
BuildRequires: glibc-devel
|
||||
@ -73,7 +73,8 @@ This package contains libraries and header files for developing applications tha
|
||||
%files -f %{name}.lang
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/libdnf.so.*
|
||||
%{_libdir}/girepository-1.0/Dnf-1.0.typelib
|
||||
%dir %{python27_sitearch}/libdnf
|
||||
%{python27_sitearch}/libdnf/*
|
||||
%dir %{python27_sitearch}/hawkey
|
||||
%{python27_sitearch}/hawkey/*
|
||||
%doc AUTHORS COPYING
|
||||
@ -81,18 +82,18 @@ This package contains libraries and header files for developing applications tha
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%dir %{_includedir}/libdnf
|
||||
%{_includedir}/libdnf/dnf-*.h
|
||||
%{_includedir}/libdnf/hy-*.h
|
||||
%{_includedir}/libdnf/libdnf.h
|
||||
%{_includedir}/libdnf/*
|
||||
%{_libdir}/libdnf.so
|
||||
%{_libdir}/pkgconfig/libdnf.pc
|
||||
%{_datadir}/gir-1.0/Dnf-1.0.gir
|
||||
%dir %{_datadir}/gtk-doc/html/libdnf
|
||||
%{_datadir}/gtk-doc/html/libdnf/*
|
||||
%{_mandir}/man3/hawkey.3*
|
||||
%doc README.md
|
||||
|
||||
%changelog
|
||||
* Sat Jun 01 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 0.22.0-1mamba
|
||||
- update to 0.22.0
|
||||
|
||||
* Sat Jun 01 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 0.11.1-1mamba
|
||||
- update to 0.11.1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user