forked from pool/nextcloud-desktop
Accepting request 986455 from home:bnavigator:branches:network
- Add nextcloud-remove-fortify-source-2.patch * A more future-proof and distribution friendly fix for boo#1201070 * Upstream issue: gh#nextcloud/desktop#4697 OBS-URL: https://build.opensuse.org/request/show/986455 OBS-URL: https://build.opensuse.org/package/show/network/nextcloud-desktop?expand=0&rev=65
This commit is contained in:
parent
d42ce01762
commit
b4b2b15c4f
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Jul 3 12:21:10 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Add nextcloud-remove-fortify-source-2.patch
|
||||||
|
* A more future-proof and distribution friendly fix for
|
||||||
|
boo#1201070
|
||||||
|
* Upstream issue: gh#nextcloud/desktop#4697
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Jul 1 11:08:59 UTC 2022 - ecsos <ecsos@opensuse.org>
|
Fri Jul 1 11:08:59 UTC 2022 - ecsos <ecsos@opensuse.org>
|
||||||
|
|
||||||
|
@ -29,6 +29,8 @@ Source: https://github.com/nextcloud/desktop/archive/v%{version}/%{name}
|
|||||||
Source1: sysctl-sync-inotify.conf
|
Source1: sysctl-sync-inotify.conf
|
||||||
# PATCH-FIX-OPENSUSE nextcloud-desktop-remove-datetime.patch sor.alexei@meowr.ru -- Remove __TIME__ and __DATE__.
|
# PATCH-FIX-OPENSUSE nextcloud-desktop-remove-datetime.patch sor.alexei@meowr.ru -- Remove __TIME__ and __DATE__.
|
||||||
Patch1: nextcloud-desktop-remove-datetime.patch
|
Patch1: nextcloud-desktop-remove-datetime.patch
|
||||||
|
# PATCH-FIX-OPENSUSE nextcloud-remove-fortify-source-2.patch code@bnavigator.de -- Remove hardcoding of _FORTIFY_SOURCE=2 in order to not conflict with distribtion presets, boo#1201070, gh#nextcloud/desktop#4697
|
||||||
|
Patch2: nextcloud-remove-fortify-source-2.patch
|
||||||
BuildRequires: AppStream
|
BuildRequires: AppStream
|
||||||
BuildRequires: cmake >= 3.2
|
BuildRequires: cmake >= 3.2
|
||||||
BuildRequires: extra-cmake-modules
|
BuildRequires: extra-cmake-modules
|
||||||
@ -175,16 +177,11 @@ Dolphin filemanager to display overlay icons.
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n desktop-%{version}
|
%autosetup -p1 -n desktop-%{version}
|
||||||
%patch1 -p1
|
|
||||||
cp -a %{SOURCE1} sysctl-sync-inotify.conf
|
cp -a %{SOURCE1} sysctl-sync-inotify.conf
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
%if %{?suse_version} > 1500
|
|
||||||
CFLAGS="-O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type"
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%cmake \
|
%cmake \
|
||||||
%if 0%{?is_opensuse}
|
%if 0%{?is_opensuse}
|
||||||
-DWITH_DOC=ON \
|
-DWITH_DOC=ON \
|
||||||
|
33
nextcloud-remove-fortify-source-2.patch
Normal file
33
nextcloud-remove-fortify-source-2.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
Index: desktop-3.5.1/cmake/modules/DefineCompilerFlags.cmake
|
||||||
|
===================================================================
|
||||||
|
--- desktop-3.5.1.orig/cmake/modules/DefineCompilerFlags.cmake
|
||||||
|
+++ desktop-3.5.1/cmake/modules/DefineCompilerFlags.cmake
|
||||||
|
@@ -45,15 +45,6 @@ if (${CMAKE_C_COMPILER_ID} MATCHES "(GNU
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector")
|
||||||
|
endif (WITH_STACK_PROTECTOR AND NOT WIN32)
|
||||||
|
|
||||||
|
- if (CMAKE_BUILD_TYPE)
|
||||||
|
- string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
|
||||||
|
- if (CMAKE_BUILD_TYPE_LOWER MATCHES "(release|relwithdebinfo|minsizerel)")
|
||||||
|
- 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)")
|
||||||
|
|
||||||
|
if (UNIX AND NOT WIN32)
|
||||||
|
Index: desktop-3.5.1/src/CMakeLists.txt
|
||||||
|
===================================================================
|
||||||
|
--- desktop-3.5.1.orig/src/CMakeLists.txt
|
||||||
|
+++ desktop-3.5.1/src/CMakeLists.txt
|
||||||
|
@@ -32,8 +32,6 @@ if(NOT MSVC)
|
||||||
|
|
||||||
|
string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
|
||||||
|
if(CMAKE_BUILD_TYPE_LOWER MATCHES "(release|relwithdebinfo|minsizerel)")
|
||||||
|
- 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")
|
Loading…
x
Reference in New Issue
Block a user