-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issues flagged by Lintian. #200
Fix issues flagged by Lintian. #200
Conversation
Pull Request Test Coverage Report for Build 1752399431Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
@@ -16,4 +16,4 @@ AmbientCapabilities=CAP_NET_ADMIN | |||
LimitNPROC=1 | |||
|
|||
[Install] | |||
WantedBy=sockets.target | |||
WantedBy=multi-user.target |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the systemd bootup diagram for further details.
@matttbe: FYI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks ok, I tried building & running on both Ubuntu 18.04 and Fedora 35. Didn't have things set up to try lintian so can't confirm that tool is happy.
One date to fix.
src/mptcp.service.in
Outdated
@@ -1,6 +1,6 @@ | |||
# SPDX-License-Identifier: BSD-3-Clause | |||
# | |||
# Copyright (c) 2017-2019, Intel Corporation | |||
# Copyright (c) 2017-2019, 2021, Intel Corporation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2022?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! I'll fix that right away.
@ossama-othman thank you for the modifications! I tried the new version and situation is better! I still have warnings related to the packaging itself I will need to fix but also one warning linked to autotools and reported by Lintian:
Here are the logs of the build but I don't see any differences with I can share more to be able to reproduce it on your side if you need to. Also, regarding |
@matttbe I was able to reproduce the fortify function issue by running configure like so: $ CPPFLAGS=-D_FORTIFY_SOURCE=2 ./configure This causes the following code in # 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]) The intent of this code is to make CPPLAGS="-D_FORTIFY_SOURCE -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2" However, CPPLAGS="-D_FORTIFY_SOURCE=2 -U_FORTIFY_SOURCE" meaning the user defined I'll revise this code in |
@ossama-othman for the
It might be a false positive, please see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=896012 On the other hand, it is strange there is no issue with
Do you confirm it is a false positive and we should ignore this? |
Hardening linker flags such as "-pie" were missing for the `mptcpize' program. Explicitly set mptcpize LDFLAGS accordingly.
Prevent '-fPIE' from beging added to the libmptcpwrap CFLAGS. '-fPIE' is meant for executables, not shared libraries.
Lintian complains about the "WantedBy=socket.target" in the mptcpd `mptcp.service' systemd unit file. Use "multi-user.target" instead.
The configure script ended up causing _FORTIFY_SOURCE to be undefined if the user explicitly adds _FORTIFY_SOURCE=2 to the CPPFLAGS. For example, running the configure script like so: CPPFLAGS=-D_FORTIFY_SOURCE=2 ./configure ultimately caused CPPFLAGS to contain "-D_FORTIFY_SOURCE=2 -U_FORTIFY_SOURCE" instead of "-D_FORTIFY_SOURCE=2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2" due to the AX_APPEND_FLAG() autoconf archive macro behavior of not appending duplicate flags. Only append -D_FORTIFY_SOURCE=2 to CPPFLAGS if the user hasn't defined _FORTIFY_SOURCE rather than attempt to override the user provided value. This is more in line with Autoconf conventions as well.
Install the libmptcpwrap library in a ${libdir}/mptcpize instead of ${libdir}/mptcpd to differentiate it from mptcpd plugins. Closes #202.
Potential |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for the modifications!
Recent attempts to package mptcpd for Debian triggered several Lintian issues. This set of changes addresses some of them. The list of mptcpd related Lintian warnings and errors may be found here.