Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
17.04 updates kdesu dolphin Dolphin as root not possible
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 5575
Location: Austria

PostPosted: Sat Oct 21, 2017 7:51 am    Post subject: Reply with quote

A USE-conditional non-upstreamable patch - not likely to happen.
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 931
Location: Greece

PostPosted: Sat Oct 21, 2017 2:05 pm    Post subject: Reply with quote

asturm wrote:
A USE-conditional non-upstreamable patch - not likely to happen.

Do you have any suggestion for a long-term solution?
How would it be to have a "package" which merely puts the patches into the epath_user directory? Then enabling the USE for kwrite/kate/dolphin would pull this package into the dependency tree and consequently apply it. It could be also manage different patches, if the patch needs to change in a future version at all. Just a wild suggestion.
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 5575
Location: Austria

PostPosted: Sat Oct 21, 2017 3:11 pm    Post subject: Reply with quote

Holysword wrote:
Do you have any suggestion for a long-term solution?

Yes:
asturm wrote:
Meanwhile upstream is working on a real solution around kio/kauth support which we hopefully are going to see in kf-5.40/kde-apps-17.12.


Holysword wrote:
How would it be to have a "package" which merely puts the patches into the epath_user directory?

No, that's an awful idea tbh. ;) The minority that relies on GUI tools for root operations can find and use those patches easily; you couldn't do the same on a binary distro.
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 931
Location: Greece

PostPosted: Sat Oct 21, 2017 3:56 pm    Post subject: Reply with quote

asturm wrote:
Meanwhile upstream is working on a real solution around kio/kauth support which we hopefully are going to see in kf-5.40/kde-apps-17.12.

What scares me is the "hopefully" part of your sentence, specially considering the apparent disdain for the "minority that relies on GUI tools for root operations" that is so common around.

We will see though.
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1318

PostPosted: Tue Nov 07, 2017 4:43 pm    Post subject: Re: Reverse patches Reply with quote

Nsane457 wrote:
For anyone who needs patches to reenable execution as root for kate, kwrite, and dolphin, here you go:

kwrite-17.04.0-allow-root.patch
kate-17.04.0-allow-root.patch
dolphin-17.04.0-allow-root.patch



I just discovered this, thank you so much!
This is why I love Gentoo

Code:
 * Applying dolphin-17.04.3-allow-root.patch ...                                                                       [ ok ]
 * User patches applied.


Perhaps this should be made stickey or even better a add a kde use flag for it.
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
dalek
Veteran
Veteran


Joined: 19 Sep 2003
Posts: 1323
Location: Mississippi USA

PostPosted: Tue Dec 05, 2017 5:47 am    Post subject: Reply with quote

I just switched to the new profile and am going through the emerge -e world part. It seems the patches are failing. Here is one of the errors.

Code:
root@fireball / # cat /var/log/portage/kde-apps\:dolphin-17.08.3\:20171205-052812.log
 * Package:    kde-apps/dolphin-17.08.3
 * Repository: gentoo
 * Maintainer: kde@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc handbook kernel_linux userland_GNU
 * FEATURES:   preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking dolphin-17.08.3.tar.xz to /var/tmp/portage/kde-apps/dolphin-17.08.3/work
>>> Source unpacked in /var/tmp/portage/kde-apps/dolphin-17.08.3/work
>>> Preparing source in /var/tmp/portage/kde-apps/dolphin-17.08.3/work/dolphin-17.08.3 ...
 * Applying allow-root.patch ...
/var/tmp/portage/kde-apps/dolphin-17.08.3/temp/environment: line 1427: /etc/portage/patches/kde-apps/dolphin/allow-root.patch: Permission denied
 [ !! ]
 * ERROR: kde-apps/dolphin-17.08.3::gentoo failed (prepare phase):
 *   patch -p1  failed with /etc/portage/patches/kde-apps/dolphin/allow-root.patch
 *
 * Call stack:
 *               ebuild.sh, line  124:  Called src_prepare
 *             environment, line 4000:  Called kde5_src_prepare
 *             environment, line 2905:  Called cmake-utils_src_prepare
 *             environment, line 1272:  Called default_src_prepare
 *      phase-functions.sh, line  918:  Called __eapi6_src_prepare
 *             environment, line  343:  Called eapply_user
 *             environment, line 1522:  Called eapply '/etc/portage/patches/kde-apps/dolphin/allow-root.patch'
 *             environment, line 1492:  Called _eapply_patch '/etc/portage/patches/kde-apps/dolphin/allow-root.patch'
 *             environment, line 1430:  Called __helpers_die 'patch -p1  failed with /etc/portage/patches/kde-apps/dolphin/allow-root.patch'
 *   isolated-functions.sh, line  117:  Called die
 * The specific snippet of code:
 *              die "$@"
 *
 * If you need support, post the output of `emerge --info '=kde-apps/dolphin-17.08.3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=kde-apps/dolphin-17.08.3::gentoo'`.
 * The complete build log is located at '/var/log/portage/kde-apps:dolphin-17.08.3:20171205-052812.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/kde-apps/dolphin-17.08.3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/kde-apps/dolphin-17.08.3/temp/environment'.
 * Working directory: '/var/tmp/portage/kde-apps/dolphin-17.08.3/work/dolphin-17.08.3'
 * S: '/var/tmp/portage/kde-apps/dolphin-17.08.3/work/dolphin-17.08.3'
root@fireball / #


Is anyone else running into this yet? I was planning to wait on this upgrade but it seems some other things was going to make waiting harder than just biting the bullet and doing the upgrade.

:) :)
_________________
My rig: Gigabyte GA-770T-USB3 mobo AMD Phenom II X4 955 3.2GHz ZALMAN CNPS10X Performa CPU cooler
G.SKILL 16GB DDR3 PC3 12800 Memory Nvidia GT-220 video card LG W2253 Monitor
WD1600AAJS & WD2502ABYS hard drives
Cooler Master HAF-932 Case
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 16931
Location: here

PostPosted: Tue Dec 05, 2017 7:11 am    Post subject: Reply with quote

Code:
/var/tmp/portage/kde-apps/dolphin-17.08.3/temp/environment: line 1427: /etc/portage/patches/kde-apps/dolphin/allow-root.patch: Permission denied

It isn't patch problem.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
dalek
Veteran
Veteran


Joined: 19 Sep 2003
Posts: 1323
Location: Mississippi USA

PostPosted: Tue Dec 05, 2017 10:36 am    Post subject: Reply with quote

fedeliallalinea wrote:
Code:
/var/tmp/portage/kde-apps/dolphin-17.08.3/temp/environment: line 1427: /etc/portage/patches/kde-apps/dolphin/allow-root.patch: Permission denied

It isn't patch problem.


Good catch fedeliallalinea. I did a bit of digging and found out the problem. If userpriv is set in FEATURES then the directory and files must be portage:portage and not root:root. Like this:

Code:
root@fireball / # ls -al /etc/portage/patches/kde-apps/
total 16
drwxr-xr-x 4 portage portage 4096 May  4  2017 .
drwxr-xr-x 4 portage portage 4096 Oct 11 21:28 ..
drwxr-xr-x 2 portage portage 4096 May  4  2017 dolphin
drwxr-xr-x 2 portage portage 4096 May  4  2017 kwrite
root@fireball / #


I've only tested kwrite so far but suspect the others will work now. I think I had to change that setting recently for some reason so it may be that others will have to do the same.

Hope this helps someone else if they run into this.

:D :D
_________________
My rig: Gigabyte GA-770T-USB3 mobo AMD Phenom II X4 955 3.2GHz ZALMAN CNPS10X Performa CPU cooler
G.SKILL 16GB DDR3 PC3 12800 Memory Nvidia GT-220 video card LG W2253 Monitor
WD1600AAJS & WD2502ABYS hard drives
Cooler Master HAF-932 Case
Back to top
View user's profile Send private message
gerard27
Advocate
Advocate


Joined: 04 Jan 2004
Posts: 2353
Location: Netherlands

PostPosted: Tue Dec 05, 2017 2:21 pm    Post subject: Reply with quote

I just recompiled dolphin-17.08.3.
In the emerge log it says user patches applied but I can't use it as root.
Should the patch be modified?
Gerard.
_________________
To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 16931
Location: here

PostPosted: Tue Dec 05, 2017 3:08 pm    Post subject: Reply with quote

gerard27 wrote:
Should the patch be modified?

Teorically not, this is patch ported for 17.08 but it seems the sama
Code:
diff -Naru dolphin-17.08.3.orig/src/main.cpp dolphin-17.08.3/src/main.cpp
--- dolphin-17.08.3.orig/src/main.cpp   2017-12-05 08:07:34.891004473 +0100
+++ dolphin-17.08.3/src/main.cpp        2017-12-05 08:08:07.911004852 +0100
@@ -35,21 +35,8 @@
 #include <KLocalizedString>
 #include <Kdelibs4ConfigMigrator>
 
-#ifndef Q_OS_WIN
-#include <unistd.h>
-#endif
-#include <iostream>
-
 extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
 {
-#ifndef Q_OS_WIN
-    // Check whether we are running as root
-    if (getuid() == 0) {
-        std::cout << "Executing Dolphin as root is not possible." << std::endl;
-        return EXIT_FAILURE;
-    }
-#endif
-
     QApplication app(argc, argv);
     app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
     app.setWindowIcon(QIcon::fromTheme(QStringLiteral("system-file-manager"), app.windowIcon()));

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
dalek
Veteran
Veteran


Joined: 19 Sep 2003
Posts: 1323
Location: Mississippi USA

PostPosted: Tue Dec 05, 2017 3:18 pm    Post subject: Reply with quote

gerard27 wrote:
I just recompiled dolphin-17.08.3.
In the emerge log it says user patches applied but I can't use it as root.
Should the patch be modified?
Gerard.


I upgraded and have been using mine so it works here. Could it be something else? Maybe you need to logout and back in or something??
_________________
My rig: Gigabyte GA-770T-USB3 mobo AMD Phenom II X4 955 3.2GHz ZALMAN CNPS10X Performa CPU cooler
G.SKILL 16GB DDR3 PC3 12800 Memory Nvidia GT-220 video card LG W2253 Monitor
WD1600AAJS & WD2502ABYS hard drives
Cooler Master HAF-932 Case
Back to top
View user's profile Send private message
gerard27
Advocate
Advocate


Joined: 04 Jan 2004
Posts: 2353
Location: Netherlands

PostPosted: Tue Dec 05, 2017 3:35 pm    Post subject: Reply with quote

Thanks fedeliallalinea!
I recompiled dolphin with your patch and now it works!
Gerard.

Edit:I hadn't yet applied the patches for kate and kwrite.
These don't have a version number in them and worked w/o a hitch.
_________________
To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum