import mptcpd-0.7-3.el9

This commit is contained in:
CentOS Sources 2021-11-02 11:42:00 -04:00 committed by Stepan Oksanichenko
commit 6d634b064e
6 changed files with 289 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
SOURCES/mptcpd-0.7.tar.gz

1
.mptcpd.metadata Normal file
View File

@ -0,0 +1 @@
a5307a3515e2fa7fd8c3be26a160ce5bed56878d SOURCES/mptcpd-0.7.tar.gz

View File

@ -0,0 +1,70 @@
From a908793d8c816ba8e08950f7407de2ea9d144800 Mon Sep 17 00:00:00 2001
Message-Id: <a908793d8c816ba8e08950f7407de2ea9d144800.1622734184.git.dcaratti@redhat.com>
From: dddaniel <d.danzberger@ddf-software.de>
Date: Fri, 23 Apr 2021 23:19:23 +0200
Subject: [PATCH] configure: add --disable-stack-protection option (#125)
Enabling -DFORTIFY_SOURCE=* and -fstack-protector-* by default may
overwrite global (build) system settings, causing redefinition errors at
compile time.
---
configure.ac | 37 +++++++++++++++++++++++++------------
1 file changed, 25 insertions(+), 12 deletions(-)
diff --git a/configure.ac b/configure.ac
index 3d6a2f0..4be1b81 100644
--- a/configure.ac
+++ b/configure.ac
@@ -255,24 +255,37 @@ AX_APPEND_COMPILE_FLAGS([-Wextra -Werror -pedantic])
# ---------------------------------------------------------------
# Enable compile-time defense
# ---------------------------------------------------------------
-# Fortify source
-# Enabling optimization implies _FORTIFY_SOURCE on some platforms.
-# Explicitly redefine to _FORTIFY_SOURCE=2 to make sure we have the
-# desired fortification level.
-AX_APPEND_FLAG([-U_FORTIFY_SOURCE], [CPPFLAGS])
-AX_APPEND_FLAG([-D_FORTIFY_SOURCE=2], [CPPFLAGS])
+
+AC_ARG_ENABLE(stack-protection,
+ [AS_HELP_STRING([--disable-stack-protection],
+ [Disable compiler stack protection.
+ FORTIFY_SOURCE=2 and -fstack-protector-strong]
+ )],
+ [],
+ [enable_stack_protection=yes])
+
+AS_IF([test "x$enable_stack_protection" = "xyes"],
+ [
+ # Fortify source
+ # Enabling optimization implies _FORTIFY_SOURCE on some platforms.
+ # Explicitly redefine to _FORTIFY_SOURCE=2 to make sure we have the
+ # desired fortification level.
+ AX_APPEND_FLAG([-U_FORTIFY_SOURCE], [CPPFLAGS])
+ AX_APPEND_FLAG([-D_FORTIFY_SOURCE=2], [CPPFLAGS])
+
+ # Stack-based buffer overrun detection
+ MPTCPD_ADD_COMPILE_FLAG([-fstack-protector-strong],
+ [# GCC < 4.9
+ MPTCPD_ADD_COMPILE_FLAG([-fstack-protector])
+ ])
+ ],[]
+ )
# Format string vulnerabilities
# -Wformat=2 implies:
# -Wformat -Wformat-nonliteral -Wformat-security -Wformat-y2k
AX_APPEND_COMPILE_FLAGS([-Wformat=2])
-# Stack-based buffer overrun detection
-MPTCPD_ADD_COMPILE_FLAG([-fstack-protector-strong],
- [# GCC < 4.9
- MPTCPD_ADD_COMPILE_FLAG([-fstack-protector])
- ])
-
# Position Independent Execution (PIE)
AX_APPEND_COMPILE_FLAGS([-fPIE], [EXECUTABLE_CFLAGS])
AC_SUBST([EXECUTABLE_CFLAGS])
--
2.31.1

View 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

View 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

108
SPECS/mptcpd.spec Normal file
View File

@ -0,0 +1,108 @@
Summary: Multipath TCP daemon
Name: mptcpd
Version: 0.7
Release: 3%{?dist}
License: BSD
URL: https://multipath-tcp.org
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
BuildRequires: make
BuildRequires: gcc
BuildRequires: libtool
BuildRequires: automake
BuildRequires: autoconf
BuildRequires: autoconf-archive
BuildRequires: libell-devel
BuildRequires: systemd-units
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
performs multipath TCP path management related operations in user space. It
interacts with the Linux kernel through a generic netlink connection to track
per-connection information (e.g. available remote addresses), available network
interfaces, request new MPTCP subflows, handle requests for subflows, etc.
%package devel
Summary: MPTCP path manager header files
Group: Development/Libraries
Requires: pkgconfig
Requires: %{name}%{?_isa} = %{version}-%{release}
License: BSD
%description devel
Header files for adding MPTCP path manager support to applications
%prep
%autosetup -p1
%build
autoreconf --install --symlink --force
%configure --enable-debug=info
%make_build V=1
%install
install -d %{buildroot}/%{_libexecdir}
install -d %{buildroot}/%{_mandir}/man8
install -d %{buildroot}/%{_sysconfdir}/%{name}
install -d %{buildroot}/%{_unitdir}
install -d %{buildroot}/%{_libdir}/%{name}
install -d %{buildroot}/%{_includedir}/%{name}
%make_install
find %{buildroot} -name '*.la' -exec rm -f {} ';'
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%systemd_postun mptcp.service
%files
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
%dir %{_sysconfdir}/%{name}
%dir %{_libdir}/%{name}
%{_libdir}/libmptcpd.so.*
%{_libdir}/%{name}/*.so
%{_libexecdir}/%{name}
%{_unitdir}/mptcp.service
%{_mandir}/man8/%{name}.8.gz
# todo add %doc
%license COPYING
%files devel
%doc COPYING
%dir %{_includedir}/%{name}
%{_libdir}/*.so
%{_includedir}/mptcpd/*.h
%{_libdir}/pkgconfig/mptcpd.pc
%changelog
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0.7-3
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* 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
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.6-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Wed Mar 17 2021 Davide Caratti <dcaratti@redhat.com> - 0.6-1
- update to version 0.6
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jan 20 2021 Davide Caratti <dcaratti@redhat.com> - 0.5.1-1
- initial build