Name: kannolo-root-unlocker Version: 4 Release: 1%{?dist} Summary: Autopatcher to allow running KDE applications as root License: MIT URL: https://svn.calcforge.org/viewvc/kannolo/trunk/packages/kannolo-root-unlocker/ Source0: LICENSE Requires: filesystem coreutils sed %description Empty metapackage using file triggers to automatically patch the following KDE applications: * Dolphin * KWrite * Kate to allow running them as root. The patched versions are written to %{_sbindir} instead of %{_bindir} so that integrity checks and delta RPMs still work. %prep cp -p %{SOURCE0} . %filetriggerin -- %{_bindir} while read filename ; do case "$filename" in %{_bindir}/dolphin) patchedname=%{_sbindir}/`basename "$filename"` cp --attributes-only --preserve=all "$filename" "$patchedname" && sed 's/libkdeinit5_dolphin\.so/libkdeinit5_d0lphin.so/g' "$filename" >"$patchedname" cp --attributes-only --preserve=all "%{_libdir}/libkdeinit5_dolphin.so" "%{_libdir}/libkdeinit5_d0lphin.so" && sed 's/getuid/getpid/g;s/libkdeinit5_dolphin\.so\c@/libkdeinit5_d0lphin.so\c@/g' "%{_libdir}/libkdeinit5_dolphin.so" >"%{_libdir}/libkdeinit5_d0lphin.so" ;; %{_bindir}/kwrite|%{_bindir}/kate) patchedname=%{_sbindir}/`basename "$filename"` cp --attributes-only --preserve=all "$filename" "$patchedname" && sed 's/getuid/getpid/g' "$filename" >"$patchedname" ;; esac done %files %license LICENSE %ghost %{_sbindir}/dolphin %ghost %{_sbindir}/kwrite %ghost %{_sbindir}/kate %ghost %{_libdir}/libkdeinit5_d0lphin.so %changelog * Thu Jan 18 2018 Kevin Kofler - 4-1 - Also patch the DT_SONAME in libkdeinit5_d0lphin.so to fix ldconfig warning * Thu Oct 26 2017 Kevin Kofler - 3-1 - Use /usr/sbin instead of /usr/local/bin to work around #1506422 * Sat Sep 30 2017 Kevin Kofler - 2-1 - Fix unlocking Dolphin: libkdeinit5_dolphin.so has to be patched * Wed Aug 16 2017 Kevin Kofler - 1-1 - First version