Hrvoje Senjan
2014-07-26 10:02:53 +00:00
committed by Git OBS Bridge
parent c9e1a7ff08
commit d5163f1aba
3 changed files with 41 additions and 2 deletions

18
fpie.patch Normal file
View File

@@ -0,0 +1,18 @@
diff --git a/src/kdesud/CMakeLists.txt b/src/kdesud/CMakeLists.txt
index 1276a55..998f9e0 100644
--- a/src/kdesud/CMakeLists.txt
+++ b/src/kdesud/CMakeLists.txt
@@ -17,10 +17,9 @@ ecm_mark_nongui_executable(kdesud)
target_link_libraries(kdesud KF5::Su KF5::I18n ${X11_LIBRARIES})
-if(KDE4_ENABLE_FPIE)
- macro_add_compile_flags(kdesud ${KDE4_CXX_FPIE_FLAGS})
- macro_add_link_flags(kdesud ${KDE4_PIE_LDFLAGS})
-endif()
+set_property(TARGET kdesud APPEND_STRING PROPERTY COMPILE_FLAGS " -fPIE")
+
+set_property(TARGET kdesud APPEND_STRING PROPERTY LINK_FLAGS " -pie")
########### install files ###############

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Sat Jul 26 10:00:31 UTC 2014 - hrvoje.senjan@gmail.com
- Add fpie.patch, to make kdesud link with -fPIE flag
- Add %verifyscript and adjust permission for kdesud libexec, now
that permissions are whitelisted
-------------------------------------------------------------------
Fri Jul 11 09:48:41 UTC 2014 - hrvoje.senjan@gmail.com

View File

@@ -36,6 +36,8 @@ Group: System/GUI/KDE
Url: http://www.kde.org
Source: http://download.kde.org/stable/frameworks/%{version}/%{name}-%{version}.tar.xz
Source1: baselibs.conf
# PATCH-FIX-OPENSUSE fpie.patch -- make kdesud compile/link with -(f)pie flags
Patch0: fpie.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@@ -46,6 +48,7 @@ kdessh use it to interface with su and ssh respectively.
%package -n %lname
Summary: User interface for running shell commands with root privileges
Group: System/GUI/KDE
PreReq: permissions
Obsoletes: libKF5Su4
%description -n %lname
@@ -69,6 +72,7 @@ Development files.
%prep
%setup -q
%patch0 -p1
%build
%cmake_kf5 -d build
@@ -78,16 +82,26 @@ Development files.
%kf5_makeinstall -C build
%fdupes -s %{buildroot}
%post -n %lname -p /sbin/ldconfig
%if 0%{?suse_version} <= 1310
# we need this for older oS releases; only Factory/13.2 has the whitelist
echo "setBadness('permissions-file-setuid-bit', 0)" > $RPM_SOURCE_DIR/%name-rpmlintrc
%endif
%post -n %lname
/sbin/ldconfig
%set_permissions %{_kf5_libexecdir}/kdesud
%postun -n %lname -p /sbin/ldconfig
%verifyscript -n %lname
%verify_permissions -e %{_kf5_libexecdir}/kdesud
%files -n %lname
%defattr(-,root,root)
%doc COPYING* README*
%{_kf5_libdir}/libKF5Su.so.*
%{_kf5_libexecdir}/kdesu_stub
%{_kf5_libexecdir}/kdesud
%verify(not mode) %attr(2755,root,nogroup) %{_kf5_libexecdir}/kdesud
%files devel
%defattr(-,root,root)