Add x86_64_v2 to arch_map
Add link to AlmaLinux bugtracker Fix tests on x86_64_v2
This commit is contained in:
commit
d173f4c8ae
107
0014-conf-Improve-granularity-of-ConfigParser-exceptions.patch
Normal file
107
0014-conf-Improve-granularity-of-ConfigParser-exceptions.patch
Normal file
@ -0,0 +1,107 @@
|
||||
From 0ab70d74fbdd1960a93a25bca9be8bea2dcdab4f Mon Sep 17 00:00:00 2001
|
||||
From: Marek Blaha <mblaha@redhat.com>
|
||||
Date: Fri, 7 Feb 2025 09:52:13 +0100
|
||||
Subject: [PATCH 14/15] conf: Improve granularity of ConfigParser exceptions
|
||||
|
||||
In some cases, we need to distinguish between a missing config file and
|
||||
one that exists but is unreadable (e.g., due to insufficient
|
||||
permissions).
|
||||
|
||||
This patch introduces a new FileDoesNotExist exception class, which is a
|
||||
more specific subclass of the existing CantOpenFile class. This ensures
|
||||
that any existing workflows remain unaffected.
|
||||
|
||||
Upstream commit: b5d48a6
|
||||
---
|
||||
libdnf/conf/ConfigParser.cpp | 2 ++
|
||||
libdnf/conf/ConfigParser.hpp | 3 +++
|
||||
libdnf/utils/iniparser/iniparser.cpp | 15 ++++++++++++++-
|
||||
libdnf/utils/iniparser/iniparser.hpp | 4 ++++
|
||||
4 files changed, 23 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libdnf/conf/ConfigParser.cpp b/libdnf/conf/ConfigParser.cpp
|
||||
index 186acdc8..6ff110a7 100644
|
||||
--- a/libdnf/conf/ConfigParser.cpp
|
||||
+++ b/libdnf/conf/ConfigParser.cpp
|
||||
@@ -271,6 +271,8 @@ void ConfigParser::read(const std::string & filePath)
|
||||
try {
|
||||
IniParser parser(filePath);
|
||||
::libdnf::read(*this, parser);
|
||||
+ } catch (const IniParser::FileDoesNotExist & e) {
|
||||
+ throw FileDoesNotExist(e.what());
|
||||
} catch (const IniParser::CantOpenFile & e) {
|
||||
throw CantOpenFile(e.what());
|
||||
} catch (const IniParser::Exception & e) {
|
||||
diff --git a/libdnf/conf/ConfigParser.hpp b/libdnf/conf/ConfigParser.hpp
|
||||
index de8a0c9d..2d269147 100644
|
||||
--- a/libdnf/conf/ConfigParser.hpp
|
||||
+++ b/libdnf/conf/ConfigParser.hpp
|
||||
@@ -55,6 +55,9 @@ public:
|
||||
struct CantOpenFile : public Exception {
|
||||
CantOpenFile(const std::string & what) : Exception(what) {}
|
||||
};
|
||||
+ struct FileDoesNotExist : public CantOpenFile {
|
||||
+ FileDoesNotExist(const std::string & what) : CantOpenFile(what) {}
|
||||
+ };
|
||||
struct ParsingError : public Exception {
|
||||
ParsingError(const std::string & what) : Exception(what) {}
|
||||
};
|
||||
diff --git a/libdnf/utils/iniparser/iniparser.cpp b/libdnf/utils/iniparser/iniparser.cpp
|
||||
index 1109c120..3c537826 100644
|
||||
--- a/libdnf/utils/iniparser/iniparser.cpp
|
||||
+++ b/libdnf/utils/iniparser/iniparser.cpp
|
||||
@@ -20,6 +20,9 @@
|
||||
|
||||
#include "iniparser.hpp"
|
||||
|
||||
+#include <errno.h>
|
||||
+#include <sys/stat.h>
|
||||
+
|
||||
constexpr char DELIMITER = '\n';
|
||||
|
||||
const char * IniParser::CantOpenFile::what() const noexcept
|
||||
@@ -27,6 +30,11 @@ const char * IniParser::CantOpenFile::what() const noexcept
|
||||
return "IniParser: Can't open file";
|
||||
}
|
||||
|
||||
+const char * IniParser::FileDoesNotExist::what() const noexcept
|
||||
+{
|
||||
+ return "IniParser: File does not exist";
|
||||
+}
|
||||
+
|
||||
const char * IniParser::MissingSectionHeader::what() const noexcept
|
||||
{
|
||||
return "IniParser: Missing section header";
|
||||
@@ -65,8 +73,13 @@ const char * IniParser::MissingEqual::what() const noexcept
|
||||
IniParser::IniParser(const std::string & filePath)
|
||||
: is(new std::ifstream(filePath))
|
||||
{
|
||||
- if (!(*is))
|
||||
+ if (!(*is)) {
|
||||
+ struct stat buffer;
|
||||
+ if (stat(filePath.c_str(), &buffer) != 0 && errno == ENOENT) {
|
||||
+ throw FileDoesNotExist();
|
||||
+ }
|
||||
throw CantOpenFile();
|
||||
+ }
|
||||
is->exceptions(std::ifstream::badbit);
|
||||
lineNumber = 0;
|
||||
lineReady = false;
|
||||
diff --git a/libdnf/utils/iniparser/iniparser.hpp b/libdnf/utils/iniparser/iniparser.hpp
|
||||
index a6635c6b..57494a18 100644
|
||||
--- a/libdnf/utils/iniparser/iniparser.hpp
|
||||
+++ b/libdnf/utils/iniparser/iniparser.hpp
|
||||
@@ -46,6 +46,10 @@ public:
|
||||
CantOpenFile() {}
|
||||
const char * what() const noexcept override;
|
||||
};
|
||||
+ struct FileDoesNotExist : public CantOpenFile {
|
||||
+ FileDoesNotExist() {}
|
||||
+ const char * what() const noexcept override;
|
||||
+ };
|
||||
struct MissingSectionHeader : public Exception {
|
||||
MissingSectionHeader(int lineNumber) : Exception(lineNumber) {}
|
||||
const char * what() const noexcept override;
|
||||
--
|
||||
2.48.1
|
||||
|
||||
87
0015-module-Warn-if-module-config-file-is-inaccessible.patch
Normal file
87
0015-module-Warn-if-module-config-file-is-inaccessible.patch
Normal file
@ -0,0 +1,87 @@
|
||||
From 0f2e24d2801efa866d5443f581ee25f3783a9a41 Mon Sep 17 00:00:00 2001
|
||||
From: Marek Blaha <mblaha@redhat.com>
|
||||
Date: Fri, 7 Feb 2025 10:04:50 +0100
|
||||
Subject: [PATCH 15/15] module: Warn if module config file is inaccessible
|
||||
|
||||
If a DNF module configuration file is unreadable, `dnf` may return
|
||||
unexpected results without warning the user, potentially affecting
|
||||
command output.
|
||||
|
||||
Steps to reproduce:
|
||||
|
||||
1. Enable the `nginx` module as root with a restrictive `umask`, making
|
||||
the config file unreadable for normal users:
|
||||
|
||||
# umask 0066
|
||||
# dnf module enable nginx:1.24
|
||||
# ls -l /etc/dnf/modules.d/nginx.module
|
||||
-rw-------. 1 root root 55 Oct 16 09:59 /etc/dnf/modules.d/nginx.module
|
||||
|
||||
2. Check available packages as root (CORRECT):
|
||||
|
||||
# dnf list --available nginx
|
||||
[...]
|
||||
Available Packages
|
||||
nginx.x86_64 1:1.24.0-1.module+el9.4.0+21950+8ebc21e2.1
|
||||
|
||||
3. Check available packages as a normal user (INCORRECT):
|
||||
|
||||
$ dnf list --available nginx
|
||||
[...]
|
||||
Available Packages
|
||||
nginx.x86_64 1:1.20.1-16.el9_4.1
|
||||
|
||||
This patch introduces a warning when a module config file exists but is
|
||||
inaccessible, helping users diagnose potential issues:
|
||||
|
||||
$ dnf list --available nginx
|
||||
[...]
|
||||
Cannot read "/etc/dnf/modules.d/nginx.module". Modular filtering may be affected.
|
||||
Available Packages
|
||||
nginx.x86_64 1:1.20.1-16.el9_4.1
|
||||
|
||||
Resolves: https://issues.redhat.com/browse/RHEL-62833
|
||||
Resolves: https://issues.redhat.com/browse/RHEL-83804
|
||||
|
||||
Upstream commit: 28805cd
|
||||
---
|
||||
libdnf/module/ModulePackageContainer.cpp | 11 ++++++++---
|
||||
1 file changed, 8 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/libdnf/module/ModulePackageContainer.cpp b/libdnf/module/ModulePackageContainer.cpp
|
||||
index 5727a96b..3745160f 100644
|
||||
--- a/libdnf/module/ModulePackageContainer.cpp
|
||||
+++ b/libdnf/module/ModulePackageContainer.cpp
|
||||
@@ -1370,10 +1370,10 @@ static inline void
|
||||
parseConfig(ConfigParser &parser, const std::string &name, const char *path)
|
||||
{
|
||||
auto logger(Log::getLogger());
|
||||
+ const auto fname = name + ".module";
|
||||
+ g_autofree gchar * cfn = g_build_filename(path, fname.c_str(), NULL);
|
||||
|
||||
try {
|
||||
- const auto fname = name + ".module";
|
||||
- g_autofree gchar * cfn = g_build_filename(path, fname.c_str(), NULL);
|
||||
parser.read(cfn);
|
||||
|
||||
/* FIXME: init empty config or throw error? */
|
||||
@@ -1393,10 +1393,15 @@ parseConfig(ConfigParser &parser, const std::string &name, const char *path)
|
||||
parser.setValue(name, "state", parser.getValue(name, "enabled"));
|
||||
parser.removeOption(name, "enabled");
|
||||
}
|
||||
- } catch (const ConfigParser::CantOpenFile &) {
|
||||
+ } catch (const ConfigParser::FileDoesNotExist &) {
|
||||
/* No module config file present. Fill values in */
|
||||
initConfig(parser, name);
|
||||
return;
|
||||
+ } catch (const ConfigParser::CantOpenFile &) {
|
||||
+ /* File exists but is not readable. */
|
||||
+ logger->warning(tfm::format("Cannot read \"%s\". Modular filtering may be affected.", cfn));
|
||||
+ initConfig(parser, name);
|
||||
+ return;
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.48.1
|
||||
|
||||
227
0016-history-DB-Add-persistence-column.patch
Normal file
227
0016-history-DB-Add-persistence-column.patch
Normal file
@ -0,0 +1,227 @@
|
||||
From 1f6d3284f161da1751798910d84ccd871a76a04d Mon Sep 17 00:00:00 2001
|
||||
From: Evan Goode <mail@evangoo.de>
|
||||
Date: Thu, 15 May 2025 20:44:18 +0000
|
||||
Subject: [PATCH 1/3] history DB: Add "persistence" column
|
||||
|
||||
For https://github.com/rpm-software-management/dnf/issues/2196.
|
||||
The `persistence` column is a TransactionPersistence enum, currently it
|
||||
can either be UNKNOWN, PERSIST, or TRANSIENT.
|
||||
---
|
||||
libdnf/transaction/Swdb.cpp | 8 ++++++++
|
||||
libdnf/transaction/Swdb.hpp | 1 +
|
||||
libdnf/transaction/Transaction.cpp | 2 ++
|
||||
libdnf/transaction/Transaction.hpp | 3 +++
|
||||
libdnf/transaction/Transformer.cpp | 7 +++++++
|
||||
libdnf/transaction/Transformer.hpp | 2 +-
|
||||
libdnf/transaction/Types.hpp | 6 ++++++
|
||||
libdnf/transaction/private/Transaction.cpp | 8 ++++++--
|
||||
libdnf/transaction/private/Transaction.hpp | 1 +
|
||||
libdnf/transaction/sql/migrate_tables_1_3.sql | 9 +++++++++
|
||||
10 files changed, 44 insertions(+), 3 deletions(-)
|
||||
create mode 100644 libdnf/transaction/sql/migrate_tables_1_3.sql
|
||||
|
||||
diff --git a/libdnf/transaction/Swdb.cpp b/libdnf/transaction/Swdb.cpp
|
||||
index 9626f732..3c7f84ce 100644
|
||||
--- a/libdnf/transaction/Swdb.cpp
|
||||
+++ b/libdnf/transaction/Swdb.cpp
|
||||
@@ -385,6 +385,14 @@ Swdb::setReleasever(std::string value)
|
||||
transactionInProgress->setReleasever(value);
|
||||
}
|
||||
|
||||
+void
|
||||
+Swdb::setPersistence(TransactionPersistence persistence)
|
||||
+{
|
||||
+ if (!transactionInProgress) {
|
||||
+ throw std::logic_error(_("Not in progress"));
|
||||
+ }
|
||||
+ transactionInProgress->setPersistence(persistence);
|
||||
+}
|
||||
|
||||
void
|
||||
Swdb::addConsoleOutputLine(int fileDescriptor, std::string line)
|
||||
diff --git a/libdnf/transaction/Swdb.hpp b/libdnf/transaction/Swdb.hpp
|
||||
index 5b2342c8..9ae6b52d 100644
|
||||
--- a/libdnf/transaction/Swdb.hpp
|
||||
+++ b/libdnf/transaction/Swdb.hpp
|
||||
@@ -114,6 +114,7 @@ public:
|
||||
|
||||
// misc
|
||||
void setReleasever(std::string value);
|
||||
+ void setPersistence(TransactionPersistence value);
|
||||
void addConsoleOutputLine(int fileDescriptor, std::string line);
|
||||
|
||||
/**
|
||||
diff --git a/libdnf/transaction/Transaction.cpp b/libdnf/transaction/Transaction.cpp
|
||||
index 208f6763..3aac1cb9 100644
|
||||
--- a/libdnf/transaction/Transaction.cpp
|
||||
+++ b/libdnf/transaction/Transaction.cpp
|
||||
@@ -82,6 +82,7 @@ Transaction::dbSelect(int64_t pk)
|
||||
" releasever, "
|
||||
" user_id, "
|
||||
" cmdline, "
|
||||
+ " persistence, "
|
||||
" state, "
|
||||
" comment "
|
||||
"FROM "
|
||||
@@ -100,6 +101,7 @@ Transaction::dbSelect(int64_t pk)
|
||||
releasever = query.get< std::string >("releasever");
|
||||
userId = query.get< uint32_t >("user_id");
|
||||
cmdline = query.get< std::string >("cmdline");
|
||||
+ persistence = static_cast<TransactionPersistence>(query.get<int>("persistence"));
|
||||
state = static_cast< TransactionState >(query.get< int >("state"));
|
||||
comment = query.get< std::string >("comment");
|
||||
}
|
||||
diff --git a/libdnf/transaction/Transaction.hpp b/libdnf/transaction/Transaction.hpp
|
||||
index a4aba8f3..58f4e4cd 100644
|
||||
--- a/libdnf/transaction/Transaction.hpp
|
||||
+++ b/libdnf/transaction/Transaction.hpp
|
||||
@@ -55,6 +55,8 @@ public:
|
||||
const std::string &getReleasever() const noexcept { return releasever; }
|
||||
uint32_t getUserId() const noexcept { return userId; }
|
||||
const std::string &getCmdline() const noexcept { return cmdline; }
|
||||
+ TransactionPersistence getPersistence() const noexcept { return persistence; }
|
||||
+
|
||||
TransactionState getState() const noexcept { return state; }
|
||||
const std::string &getComment() const noexcept { return comment; }
|
||||
|
||||
@@ -79,6 +81,7 @@ protected:
|
||||
std::string releasever;
|
||||
uint32_t userId = 0;
|
||||
std::string cmdline;
|
||||
+ TransactionPersistence persistence = TransactionPersistence::UNKNOWN;
|
||||
TransactionState state = TransactionState::UNKNOWN;
|
||||
std::string comment;
|
||||
};
|
||||
diff --git a/libdnf/transaction/Transformer.cpp b/libdnf/transaction/Transformer.cpp
|
||||
index ef4c0669..ba1b882d 100644
|
||||
--- a/libdnf/transaction/Transformer.cpp
|
||||
+++ b/libdnf/transaction/Transformer.cpp
|
||||
@@ -53,6 +53,10 @@ static const char * const sql_migrate_tables_1_2 =
|
||||
#include "sql/migrate_tables_1_2.sql"
|
||||
;
|
||||
|
||||
+static const char * const sql_migrate_tables_1_3 =
|
||||
+#include "sql/migrate_tables_1_3.sql"
|
||||
+ ;
|
||||
+
|
||||
void
|
||||
Transformer::createDatabase(SQLite3Ptr conn)
|
||||
{
|
||||
@@ -70,6 +74,9 @@ Transformer::migrateSchema(SQLite3Ptr conn)
|
||||
|
||||
if (schemaVersion == "1.1") {
|
||||
conn->exec(sql_migrate_tables_1_2);
|
||||
+ conn->exec(sql_migrate_tables_1_3);
|
||||
+ } else if (schemaVersion == "1.2") {
|
||||
+ conn->exec(sql_migrate_tables_1_3);
|
||||
}
|
||||
}
|
||||
else {
|
||||
diff --git a/libdnf/transaction/Transformer.hpp b/libdnf/transaction/Transformer.hpp
|
||||
index 87c0e1f4..a99ea066 100644
|
||||
--- a/libdnf/transaction/Transformer.hpp
|
||||
+++ b/libdnf/transaction/Transformer.hpp
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
static void migrateSchema(SQLite3Ptr conn);
|
||||
|
||||
static TransactionItemReason getReason(const std::string &reason);
|
||||
- static const char *getVersion() noexcept { return "1.2"; }
|
||||
+ static const char *getVersion() noexcept { return "1.3"; }
|
||||
|
||||
protected:
|
||||
void transformTrans(SQLite3Ptr swdb, SQLite3Ptr history);
|
||||
diff --git a/libdnf/transaction/Types.hpp b/libdnf/transaction/Types.hpp
|
||||
index 0003bbb7..574ed085 100644
|
||||
--- a/libdnf/transaction/Types.hpp
|
||||
+++ b/libdnf/transaction/Types.hpp
|
||||
@@ -56,6 +56,12 @@ enum class TransactionItemAction : int {
|
||||
REASON_CHANGE = 11 // a package was kept on the system but it's reason has changed
|
||||
};
|
||||
|
||||
+enum class TransactionPersistence : int {
|
||||
+ UNKNOWN = 0,
|
||||
+ PERSIST = 1,
|
||||
+ TRANSIENT = 2,
|
||||
+};
|
||||
+
|
||||
} // namespace libdnf
|
||||
/*
|
||||
Install
|
||||
diff --git a/libdnf/transaction/private/Transaction.cpp b/libdnf/transaction/private/Transaction.cpp
|
||||
index 088d6ba9..0131cbb8 100644
|
||||
--- a/libdnf/transaction/private/Transaction.cpp
|
||||
+++ b/libdnf/transaction/private/Transaction.cpp
|
||||
@@ -76,12 +76,13 @@ swdb_private::Transaction::dbInsert()
|
||||
" releasever, "
|
||||
" user_id, "
|
||||
" cmdline, "
|
||||
+ " persistence, "
|
||||
" state, "
|
||||
" comment, "
|
||||
" id "
|
||||
" ) "
|
||||
"VALUES "
|
||||
- " (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
|
||||
+ " (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
|
||||
SQLite3::Statement query(*conn.get(), sql);
|
||||
query.bindv(getDtBegin(),
|
||||
getDtEnd(),
|
||||
@@ -90,10 +91,11 @@ swdb_private::Transaction::dbInsert()
|
||||
getReleasever(),
|
||||
getUserId(),
|
||||
getCmdline(),
|
||||
+ static_cast<int>(getPersistence()),
|
||||
static_cast< int >(getState()),
|
||||
getComment());
|
||||
if (getId() > 0) {
|
||||
- query.bind(9, getId());
|
||||
+ query.bind(10, getId());
|
||||
}
|
||||
query.step();
|
||||
setId(conn->lastInsertRowID());
|
||||
@@ -138,6 +140,7 @@ swdb_private::Transaction::dbUpdate()
|
||||
" releasever=?, "
|
||||
" user_id=?, "
|
||||
" cmdline=?, "
|
||||
+ " persistence=?, "
|
||||
" state=?, "
|
||||
" comment=? "
|
||||
"WHERE "
|
||||
@@ -150,6 +153,7 @@ swdb_private::Transaction::dbUpdate()
|
||||
getReleasever(),
|
||||
getUserId(),
|
||||
getCmdline(),
|
||||
+ static_cast<int>(getPersistence()),
|
||||
static_cast< int >(getState()),
|
||||
getComment(),
|
||||
getId());
|
||||
diff --git a/libdnf/transaction/private/Transaction.hpp b/libdnf/transaction/private/Transaction.hpp
|
||||
index 9e0d6848..dd5ba0a0 100644
|
||||
--- a/libdnf/transaction/private/Transaction.hpp
|
||||
+++ b/libdnf/transaction/private/Transaction.hpp
|
||||
@@ -42,6 +42,7 @@ public:
|
||||
void setReleasever(const std::string &value) { releasever = value; }
|
||||
void setUserId(uint32_t value) { userId = value; }
|
||||
void setCmdline(const std::string &value) { cmdline = value; }
|
||||
+ void setPersistence(TransactionPersistence value) { persistence = value; }
|
||||
void setState(TransactionState value) { state = value; }
|
||||
void setComment(const std::string &value) { comment = value; }
|
||||
|
||||
diff --git a/libdnf/transaction/sql/migrate_tables_1_3.sql b/libdnf/transaction/sql/migrate_tables_1_3.sql
|
||||
new file mode 100644
|
||||
index 00000000..6901874e
|
||||
--- /dev/null
|
||||
+++ b/libdnf/transaction/sql/migrate_tables_1_3.sql
|
||||
@@ -0,0 +1,9 @@
|
||||
+R"**(
|
||||
+BEGIN TRANSACTION;
|
||||
+ ALTER TABLE trans
|
||||
+ ADD persistence INTEGER DEFAULT 0;
|
||||
+ UPDATE config
|
||||
+ SET value = '1.3'
|
||||
+ WHERE key = 'version';
|
||||
+COMMIT;
|
||||
+)**"
|
||||
--
|
||||
2.49.0
|
||||
|
||||
46
0017-MergedTransaction-listPersistences.patch
Normal file
46
0017-MergedTransaction-listPersistences.patch
Normal file
@ -0,0 +1,46 @@
|
||||
From 6d396e84cbf46386af87d829112ced8d7c1165cd Mon Sep 17 00:00:00 2001
|
||||
From: Evan Goode <mail@evangoo.de>
|
||||
Date: Mon, 19 May 2025 22:37:36 +0000
|
||||
Subject: [PATCH 2/3] MergedTransaction::listPersistences
|
||||
|
||||
---
|
||||
libdnf/transaction/MergedTransaction.cpp | 10 ++++++++++
|
||||
libdnf/transaction/MergedTransaction.hpp | 1 +
|
||||
2 files changed, 11 insertions(+)
|
||||
|
||||
diff --git a/libdnf/transaction/MergedTransaction.cpp b/libdnf/transaction/MergedTransaction.cpp
|
||||
index 75d2c1e7..8f556c02 100644
|
||||
--- a/libdnf/transaction/MergedTransaction.cpp
|
||||
+++ b/libdnf/transaction/MergedTransaction.cpp
|
||||
@@ -97,6 +97,16 @@ MergedTransaction::listCmdlines() const
|
||||
return cmdLines;
|
||||
}
|
||||
|
||||
+std::vector< TransactionPersistence >
|
||||
+MergedTransaction::listPersistences() const
|
||||
+{
|
||||
+ std::vector< TransactionPersistence > persistences;
|
||||
+ for (auto t : transactions) {
|
||||
+ persistences.push_back(t->getPersistence());
|
||||
+ }
|
||||
+ return persistences;
|
||||
+}
|
||||
+
|
||||
std::vector< TransactionState >
|
||||
MergedTransaction::listStates() const
|
||||
{
|
||||
diff --git a/libdnf/transaction/MergedTransaction.hpp b/libdnf/transaction/MergedTransaction.hpp
|
||||
index 50212159..5ef9fb30 100644
|
||||
--- a/libdnf/transaction/MergedTransaction.hpp
|
||||
+++ b/libdnf/transaction/MergedTransaction.hpp
|
||||
@@ -47,6 +47,7 @@ public:
|
||||
std::vector< int64_t > listIds() const;
|
||||
std::vector< uint32_t > listUserIds() const;
|
||||
std::vector< std::string > listCmdlines() const;
|
||||
+ std::vector< TransactionPersistence > listPersistences() const;
|
||||
std::vector< TransactionState > listStates() const;
|
||||
std::vector< std::string > listReleasevers() const;
|
||||
std::vector< std::string > listComments() const;
|
||||
--
|
||||
2.49.0
|
||||
|
||||
66
0018-conf-Add-usr_drift_protected_paths.patch
Normal file
66
0018-conf-Add-usr_drift_protected_paths.patch
Normal file
@ -0,0 +1,66 @@
|
||||
From fd638c7b0110547da1ea7ea994f695078db603a1 Mon Sep 17 00:00:00 2001
|
||||
From: Evan Goode <mail@evangoo.de>
|
||||
Date: Wed, 28 May 2025 20:39:20 +0000
|
||||
Subject: [PATCH 3/3] conf: Add usr_drift_protected_paths
|
||||
|
||||
Adds the `usr_drift_protected_paths` configuration option which can be
|
||||
configured by adding .conf files to the drop-in directory
|
||||
/etc/dnf/usr-drift-protected-paths.d, similar to /etc/dnf/protected.d.
|
||||
Distributions will be able to add paths that are known to cause problems
|
||||
when their contents drift with respect to /usr, e.g. /etc/pam.d.
|
||||
|
||||
For https://github.com/rpm-software-management/dnf/issues/2199.
|
||||
---
|
||||
libdnf/conf/ConfigMain.cpp | 9 +++++++++
|
||||
libdnf/conf/ConfigMain.hpp | 1 +
|
||||
2 files changed, 10 insertions(+)
|
||||
|
||||
diff --git a/libdnf/conf/ConfigMain.cpp b/libdnf/conf/ConfigMain.cpp
|
||||
index b58b2f47..fac8bbee 100644
|
||||
--- a/libdnf/conf/ConfigMain.cpp
|
||||
+++ b/libdnf/conf/ConfigMain.cpp
|
||||
@@ -293,6 +293,8 @@ class ConfigMain::Impl {
|
||||
OptionBool countme{false};
|
||||
OptionBool protect_running_kernel{true};
|
||||
|
||||
+ OptionStringList usr_drift_protected_paths{resolveGlobs("glob:/etc/dnf/usr-drift-protected-paths.d/*.conf")};
|
||||
+
|
||||
// Repo main config
|
||||
|
||||
OptionNumber<std::uint32_t> retries{10};
|
||||
@@ -460,6 +462,12 @@ ConfigMain::Impl::Impl(Config & owner)
|
||||
owner.optBinds().add("countme", countme);
|
||||
owner.optBinds().add("protect_running_kernel", protect_running_kernel);
|
||||
owner.optBinds().add("persistence", persistence);
|
||||
+ owner.optBinds().add("usr_drift_protected_paths", usr_drift_protected_paths,
|
||||
+ [&](Option::Priority priority, const std::string & value){
|
||||
+ if (priority >= usr_drift_protected_paths.getPriority())
|
||||
+ usr_drift_protected_paths.set(priority, resolveGlobs(value));
|
||||
+ }, nullptr, false
|
||||
+ );
|
||||
|
||||
// Repo main config
|
||||
|
||||
@@ -616,6 +624,7 @@ OptionString & ConfigMain::comment() { return pImpl->comment; }
|
||||
OptionBool & ConfigMain::downloadonly() { return pImpl->downloadonly; }
|
||||
OptionBool & ConfigMain::ignorearch() { return pImpl->ignorearch; }
|
||||
OptionEnum<std::string> & ConfigMain::persistence() { return pImpl->persistence; }
|
||||
+OptionStringList & ConfigMain::usr_drift_protected_paths() { return pImpl->usr_drift_protected_paths; }
|
||||
|
||||
OptionString & ConfigMain::module_platform_id() { return pImpl->module_platform_id; }
|
||||
OptionBool & ConfigMain::module_stream_switch() { return pImpl->module_stream_switch; }
|
||||
diff --git a/libdnf/conf/ConfigMain.hpp b/libdnf/conf/ConfigMain.hpp
|
||||
index af6496f3..b9d68939 100644
|
||||
--- a/libdnf/conf/ConfigMain.hpp
|
||||
+++ b/libdnf/conf/ConfigMain.hpp
|
||||
@@ -126,6 +126,7 @@ public:
|
||||
OptionBool & downloadonly();
|
||||
OptionBool & ignorearch();
|
||||
OptionEnum<std::string> & persistence();
|
||||
+ OptionStringList & usr_drift_protected_paths();
|
||||
|
||||
OptionString & module_platform_id();
|
||||
OptionBool & module_stream_switch();
|
||||
--
|
||||
2.49.0
|
||||
|
||||
19
libdnf.spec
19
libdnf.spec
@ -56,7 +56,7 @@
|
||||
|
||||
Name: libdnf
|
||||
Version: %{libdnf_major_version}.%{libdnf_minor_version}.%{libdnf_micro_version}
|
||||
Release: 9%{?dist}.alma.1
|
||||
Release: 12%{?dist}.alma.1
|
||||
Summary: Library providing simplified C and Python API to libsolv
|
||||
License: LGPL-2.1-or-later
|
||||
URL: https://github.com/rpm-software-management/libdnf
|
||||
@ -74,6 +74,11 @@ Patch10: 0010-C-API-Detect-releasever_major-releasever_minor-from-.patch
|
||||
Patch11: 0011-C-API-Use-releasever_-major-minor-from-context-inste.patch
|
||||
Patch12: 0012-C-API-support-shell-style-variable-substitution.patch
|
||||
Patch13: 0013-C-API-test-shell-style-variable-expressions.patch
|
||||
Patch14: 0014-conf-Improve-granularity-of-ConfigParser-exceptions.patch
|
||||
Patch15: 0015-module-Warn-if-module-config-file-is-inaccessible.patch
|
||||
Patch16: 0016-history-DB-Add-persistence-column.patch
|
||||
Patch17: 0017-MergedTransaction-listPersistences.patch
|
||||
Patch18: 0018-conf-Add-usr_drift_protected_paths.patch
|
||||
|
||||
# AlmaLinux Patch
|
||||
Patch1001: 0001-Add-link-to-AlmaLinux-bugtracker.patch
|
||||
@ -322,11 +327,21 @@ popd
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed May 14 2025 Eduard Abdullin <eabdullin@almalinux.org> - 0.73.1-9.alma.1
|
||||
* Tue Nov 11 2025 Eduard Abdullin <eabdullin@almalinux.org> - 0.73.1-12.alma.1
|
||||
- Add x86_64_v2 to arch_map
|
||||
- Add link to AlmaLinux bugtracker
|
||||
- Fix tests on x86_64_v2
|
||||
|
||||
* Thu Jun 26 2025 Evan Goode <egoode@redhat.com> - 0.73.1-12
|
||||
- Bump version due to failed build
|
||||
|
||||
* Tue Jun 24 2025 Evan Goode <egoode@redhat.com> - 0.73.1-11
|
||||
- history DB: Add "persistence" column (RHEL-99825)
|
||||
- conf: Add bootc_unsafe_paths (RHEL-99826)
|
||||
|
||||
* Thu Mar 20 2025 Marek Blaha <mblaha@redhat.com> - 0.73.1-10
|
||||
- module: Warn if module config file is inaccessible (RHEL-83804)
|
||||
|
||||
* Mon Mar 10 2025 Evan Goode <egoode@redhat.com> - 0.73.1-9
|
||||
- Support releasever_{major,minor}, shell-style variable substitution (RHEL-74025)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user