From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/nextcloud-client/, net-misc/nextcloud-client/files/
Date: Wed, 8 Feb 2023 04:22:52 +0000 (UTC) [thread overview]
Message-ID: <1675830142.992d3f3d35158fa1deaf87e928a030bcd1be6905.sam@gentoo> (raw)
commit: 992d3f3d35158fa1deaf87e928a030bcd1be6905
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 8 04:22:21 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Feb 8 04:22:22 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=992d3f3d
net-misc/nextcloud-client: don't redefine _FORTIFY_SOURCE
Fixes build on hardened. We already set F_S w/ level 2 as minimum even on non-
hardened.
Closes: https://bugs.gentoo.org/890072
Signed-off-by: Sam James <sam <AT> gentoo.org>
...d-client-3.6.6-no-redefine-fortify-source.patch | 31 ++++++++++++++++++++++
.../nextcloud-client/nextcloud-client-3.6.6.ebuild | 4 +++
2 files changed, 35 insertions(+)
diff --git a/net-misc/nextcloud-client/files/nextcloud-client-3.6.6-no-redefine-fortify-source.patch b/net-misc/nextcloud-client/files/nextcloud-client-3.6.6-no-redefine-fortify-source.patch
new file mode 100644
index 000000000000..2c3d23c1ff35
--- /dev/null
+++ b/net-misc/nextcloud-client/files/nextcloud-client-3.6.6-no-redefine-fortify-source.patch
@@ -0,0 +1,31 @@
+Gentoo's toolchain always sets F_S (level 2 at minimum) by default.
+
+https://bugs.gentoo.org/890072
+--- a/cmake/modules/DefineCompilerFlags.cmake
++++ b/cmake/modules/DefineCompilerFlags.cmake
+@@ -47,12 +47,6 @@ if (${CMAKE_C_COMPILER_ID} MATCHES "(GNU|Clang)")
+
+ if (CMAKE_BUILD_TYPE)
+ string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
+- if (CMAKE_BUILD_TYPE_LOWER MATCHES "(release|relwithdebinfo|minsizerel)" AND (NOT ${CMAKE_C_FLAGS} MATCHES "FORTIFY_SOURCE=[3-9]"))
+- check_c_compiler_flag("-Wp,-D_FORTIFY_SOURCE=2" WITH_FORTIFY_SOURCE)
+- if (WITH_FORTIFY_SOURCE)
+- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wp,-D_FORTIFY_SOURCE=2")
+- endif (WITH_FORTIFY_SOURCE)
+- endif()
+ endif()
+ endif (${CMAKE_C_COMPILER_ID} MATCHES "(GNU|Clang)")
+
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -31,10 +31,6 @@ if(NOT MSVC)
+ endif()
+
+ string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
+- if(CMAKE_BUILD_TYPE_LOWER MATCHES "(release|relwithdebinfo|minsizerel)" AND ((NOT ${CMAKE_C_FLAGS} MATCHES "FORTIFY_SOURCE=[3-9]") AND (NOT ${CMAKE_CXX_FLAGS} MATCHES "FORTIFY_SOURCE=[3-9]")))
+- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FORTIFY_SOURCE=2")
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FORTIFY_SOURCE=2")
+- endif()
+
+ if (CMAKE_CXX_COMPILER MATCHES "Clang")
+ # Calling Qt's qCWarning(category, ...) with no params for "..." is a GNU
diff --git a/net-misc/nextcloud-client/nextcloud-client-3.6.6.ebuild b/net-misc/nextcloud-client/nextcloud-client-3.6.6.ebuild
index 8496954d4804..943bb9b77797 100644
--- a/net-misc/nextcloud-client/nextcloud-client-3.6.6.ebuild
+++ b/net-misc/nextcloud-client/nextcloud-client-3.6.6.ebuild
@@ -61,6 +61,10 @@ BDEPEND="
dolphin? ( kde-frameworks/extra-cmake-modules )
"
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.6.6-no-redefine-fortify-source.patch
+)
+
src_prepare() {
# Keep tests in ${T}
sed -i -e "s#\"/tmp#\"${T}#g" test/test*.cpp || die
next reply other threads:[~2023-02-08 4:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-08 4:22 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-07-16 20:27 [gentoo-commits] repo/gentoo:master commit in: net-misc/nextcloud-client/, net-misc/nextcloud-client/files/ Bernard Cafarelli
2021-09-28 21:21 Bernard Cafarelli
2021-07-07 19:16 Bernard Cafarelli
2020-09-02 20:56 Bernard Cafarelli
2020-06-10 11:58 Bernard Cafarelli
2019-12-13 12:43 Bernard Cafarelli
2019-03-20 15:50 Miroslav Šulc
2018-08-20 18:13 Bernard Cafarelli
2017-07-18 16:42 Bernard Cafarelli
2016-11-29 13:32 Bernard Cafarelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1675830142.992d3f3d35158fa1deaf87e928a030bcd1be6905.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox