From d5163f1aba28aec42e8216751c5483f28aedab00a88f47d8a88570d6eea87f21 Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Sat, 26 Jul 2014 10:02:53 +0000 Subject: [PATCH 1/2] OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kdesu?expand=0&rev=31 --- fpie.patch | 18 ++++++++++++++++++ kdesu.changes | 7 +++++++ kdesu.spec | 18 ++++++++++++++++-- 3 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 fpie.patch diff --git a/fpie.patch b/fpie.patch new file mode 100644 index 0000000..c3a6ec9 --- /dev/null +++ b/fpie.patch @@ -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 ############### + diff --git a/kdesu.changes b/kdesu.changes index b708b0c..b4a62a4 100644 --- a/kdesu.changes +++ b/kdesu.changes @@ -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 diff --git a/kdesu.spec b/kdesu.spec index 520ac69..0ba9fd8 100644 --- a/kdesu.spec +++ b/kdesu.spec @@ -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) From 05c438a33c0dfd3b2cbe02841029d76a277118608ee20c12e2f910eb690b5073 Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Sat, 2 Aug 2014 13:12:16 +0000 Subject: [PATCH 2/2] 5.1.0 OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kdesu?expand=0&rev=32 --- kdesu-5.0.0.tar.xz | 3 --- kdesu-5.1.0.tar.xz | 3 +++ kdesu.changes | 7 +++++++ kdesu.spec | 4 ++-- 4 files changed, 12 insertions(+), 5 deletions(-) delete mode 100644 kdesu-5.0.0.tar.xz create mode 100644 kdesu-5.1.0.tar.xz diff --git a/kdesu-5.0.0.tar.xz b/kdesu-5.0.0.tar.xz deleted file mode 100644 index cb6195c..0000000 --- a/kdesu-5.0.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5203321254e16dd2986e7fbedc92c2914384d5938d53ad364413c4681256be23 -size 36748 diff --git a/kdesu-5.1.0.tar.xz b/kdesu-5.1.0.tar.xz new file mode 100644 index 0000000..141bc16 --- /dev/null +++ b/kdesu-5.1.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ed1e2b5339c12c0ea0b327c8397b6a755da86ac6fb17078d7bc42b086865e4ea +size 36700 diff --git a/kdesu.changes b/kdesu.changes index b4a62a4..1e890e6 100644 --- a/kdesu.changes +++ b/kdesu.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sat Aug 2 10:19:59 UTC 2014 - hrvoje.senjan@gmail.com + +- Update to 5.1.0 + * For more details please see: + http://www.kde.org/announcements/kde-frameworks-5.1.php + ------------------------------------------------------------------- Sat Jul 26 10:00:31 UTC 2014 - hrvoje.senjan@gmail.com diff --git a/kdesu.spec b/kdesu.spec index 0ba9fd8..b86ce54 100644 --- a/kdesu.spec +++ b/kdesu.spec @@ -18,11 +18,11 @@ %define lname libKF5Su5 Name: kdesu -Version: 5.0.0 +Version: 5.1.0 Release: 0 %define kf5_version %{version} BuildRequires: cmake >= 2.8.12 -BuildRequires: extra-cmake-modules >= 1.0.0 +BuildRequires: extra-cmake-modules >= 1.1.0 BuildRequires: fdupes BuildRequires: kcoreaddons-devel >= %{kf5_version} BuildRequires: kf5-filesystem