fix 'check_conflicts' on multilib
Related: #1967697 Signed-off-by: Davide Caratti <dcaratti@redhat.com>
This commit is contained in:
parent
f0e9a8533e
commit
0aee7ca3f6
85
0002-issue144.patch
Normal file
85
0002-issue144.patch
Normal file
@ -0,0 +1,85 @@
|
||||
From f1207f311ec04aeda07759e04538d65d41d4ea4a Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <f1207f311ec04aeda07759e04538d65d41d4ea4a.1624465064.git.dcaratti@redhat.com>
|
||||
From: dcaratti <davide.caratti@gmail.com>
|
||||
Date: Wed, 23 Jun 2021 18:12:41 +0200
|
||||
Subject: [PATCH] Allow empty values of "plugin_dir" in mptcpd.conf. (#145)
|
||||
|
||||
The plugin dirname is $(libdir)/mptcpd/ on standard configurations:
|
||||
use this value in case the value of plugin_dir is empty in
|
||||
/etc/mptcpd/mptcpd.conf.
|
||||
---
|
||||
src/Makefile.am | 3 ++-
|
||||
src/configuration.c | 27 ++++++++++-----------------
|
||||
2 files changed, 12 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
index 09ca74c..4aa5037 100644
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -31,7 +31,8 @@ libpath_manager_la_LIBADD = \
|
||||
|
||||
libpath_manager_la_CPPFLAGS = \
|
||||
$(AM_CPPFLAGS) \
|
||||
- -DMPTCPD_CONFIG_FILE='"$(sysconfdir)/@PACKAGE@/@PACKAGE@.conf"'
|
||||
+ -DMPTCPD_CONFIG_FILE='"$(sysconfdir)/@PACKAGE@/@PACKAGE@.conf"' \
|
||||
+ -DMPTCPD_DEFAULT_PLUGINDIR='"$(libdir)/@PACKAGE@"'
|
||||
|
||||
EXTRA_DIST = mptcp.service.in
|
||||
|
||||
diff --git a/src/configuration.c b/src/configuration.c
|
||||
index 2a48405..70a8e19 100644
|
||||
--- a/src/configuration.c
|
||||
+++ b/src/configuration.c
|
||||
@@ -304,8 +304,6 @@ static bool check_file_perms(char const *f)
|
||||
static bool parse_config_file(struct mptcpd_config *config,
|
||||
char const *filename)
|
||||
{
|
||||
- bool parsed = true;
|
||||
-
|
||||
assert(filename != NULL);
|
||||
|
||||
if (!check_file_perms(filename))
|
||||
@@ -337,22 +335,17 @@ static bool parse_config_file(struct mptcpd_config *config,
|
||||
group,
|
||||
"plugin-dir");
|
||||
|
||||
- if (plugin_dir == NULL) {
|
||||
- l_error("No plugin directory set in mptcpd "
|
||||
- "configuration.");
|
||||
+ set_plugin_dir(config,
|
||||
+ plugin_dir ? plugin_dir :
|
||||
+ l_strdup(MPTCPD_DEFAULT_PLUGINDIR));
|
||||
|
||||
- parsed = false;
|
||||
- } else {
|
||||
- set_plugin_dir(config, plugin_dir);
|
||||
-
|
||||
- // Default plugin name. Can be NULL.
|
||||
- char *const default_plugin =
|
||||
- l_settings_get_string(settings,
|
||||
- group,
|
||||
- "path-manager");
|
||||
+ // Default plugin name. Can be NULL.
|
||||
+ char *const default_plugin =
|
||||
+ l_settings_get_string(settings,
|
||||
+ group,
|
||||
+ "path-manager");
|
||||
|
||||
- set_default_plugin(config, default_plugin);
|
||||
- }
|
||||
+ set_default_plugin(config, default_plugin);
|
||||
} else {
|
||||
l_debug("Unable to mptcpd load settings from file '%s'",
|
||||
filename);
|
||||
@@ -360,7 +353,7 @@ static bool parse_config_file(struct mptcpd_config *config,
|
||||
|
||||
l_settings_free(settings);
|
||||
|
||||
- return parsed;
|
||||
+ return true;
|
||||
}
|
||||
|
||||
/**
|
||||
--
|
||||
2.31.1
|
||||
|
||||
24
0003-fix-multilib-install.patch
Normal file
24
0003-fix-multilib-install.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff --git a/etc/mptcpd.conf.in b/etc/mptcpd.conf.in
|
||||
index 615c63b..c6b31ac 100644
|
||||
--- a/etc/mptcpd.conf.in
|
||||
+++ b/etc/mptcpd.conf.in
|
||||
@@ -19,7 +19,6 @@ log=@mptcpd_logger@
|
||||
# ----------------
|
||||
# Plugin directory
|
||||
# ----------------
|
||||
-plugin-dir=@pkglibdir@
|
||||
|
||||
# -------------------
|
||||
# Path manager plugin
|
||||
diff --git a/src/mptcp.service.in b/src/mptcp.service.in
|
||||
index 89dfe04..738f59f 100644
|
||||
--- a/src/mptcp.service.in
|
||||
+++ b/src/mptcp.service.in
|
||||
@@ -9,7 +9,6 @@ Documentation=man:mptcpd(8)
|
||||
[Service]
|
||||
Type=simple
|
||||
DynamicUser=yes
|
||||
-Environment=LD_LIBRARY_PATH=@libdir@
|
||||
ExecStart=@libexecdir@/mptcpd --log=journal
|
||||
CapabilityBoundingSet=CAP_NET_ADMIN
|
||||
AmbientCapabilities=CAP_NET_ADMIN
|
||||
@ -20,6 +20,8 @@ BuildRequires: systemd-rpm-macros
|
||||
Source0: https://github.com/intel/mptcpd/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
Patch1: 0001-issue125.patch
|
||||
Patch2: 0002-issue144.patch
|
||||
Patch3: 0003-fix-multilib-install.patch
|
||||
|
||||
%description
|
||||
The Multipath TCP Daemon is a daemon for Linux based operating systems that
|
||||
@ -81,9 +83,10 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';'
|
||||
%{_libdir}/pkgconfig/mptcpd.pc
|
||||
|
||||
%changelog
|
||||
* Tue Jun 22 2021 Davide Caratti <dcaratti@redhat.com> - 0.7-2
|
||||
* Wed Jun 23 2021 Davide Caratti <dcaratti@redhat.com> - 0.7-2
|
||||
- add a simple sanity test and enable gating. Related: rhbz#1962741
|
||||
- don't overwrite global build options. Related: rhbz#1967697
|
||||
- fix 'check_conflicts' on multilib. Related: rhbz#1967697
|
||||
|
||||
* Wed Apr 28 2021 Davide Caratti <dcaratti@redhat.com> - 0.7-1
|
||||
- update to version 0.7
|
||||
|
||||
Loading…
Reference in New Issue
Block a user