Opened 9 years ago

Closed 8 years ago

#26982 closed defect (fixed)

Suggesting a patch for kdelibs4

Reported by: mkae (Marko Käning) Owned by: nerdling (Jeremy L)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: sharky@…, michaelld (Michael Dickens)
Port: kdelibs4

Description

Hi I have a suggestion for a new patch to kdelibs4. During building of KDE4 packages one often sees messages like this:

######################################################
#  Programs will not start until you run the command 
#  'sudo chown -R $USER ~/Library/Preferences/KDE'  
#  replacing $USER with your username.              
######################################################

In KDE3 it has been the same with .kde, which droves me quite insane back then when I tried to get kmymoney up and running. Brad Giesbrecht found a way how to work around it, which was then implemented in our portfiles for kmymoney related ports.

Back then I also filed a bug at KDE's bug tracker. Very recently I got a response and it seems this bug could be fixed now, making these "sudo chown"'s unnecessary - I HOPE at least.

So, if you want to give it a try, consider the attached patch.

Attachments (1)

portfile-kdelibs4-config-dir-patch.diff (1.4 KB) - added by mkae (Marko Käning) 9 years ago.
patch to fix user permission issues after installing KDE4 ports

Download all attachments as: .zip

Change History (23)

Changed 9 years ago by mkae (Marko Käning)

patch to fix user permission issues after installing KDE4 ports

comment:1 Changed 9 years ago by mkae (Marko Käning)

I don't know what happened now. I removed the previously installed kdelibs3 and reinstalled it again this time with above patch and it leads to what I described in http://trac.macports.org/ticket/26943#comment:36

Suddenly nothing can be installed into destroot anymore.

Something's broken and I don't understand what it could be. :(

comment:2 in reply to:  1 Changed 9 years ago by mkae (Marko Käning)

Replying to mk@…: Of course I meant kdelibs4 above!!!

comment:3 Changed 9 years ago by mkae (Marko Käning)

Well, it's up and running again, but I am irritated why I could not do my usual step by step procedure of port extract,build,destroot,install and instead had to clean and install directly to avoid failing the install. :(

Another question is: who creates the folder ~/Library/Preferences/KDE initially???

It was already present after installing some ports, which is why I couldn't figure out anymore when it appeared first.

comment:4 Changed 9 years ago by mkae (Marko Käning)

Could it be that the observed weird behavior during destroot and install (as described in the other ticket above) could be caused by the new KDE4 port group 1.1? (Please mind the strange error messages in the other ticket's comments!)

comment:5 Changed 9 years ago by jmroot (Joshua Root)

Cc: sharky@… added
Owner: changed from macports-tickets@… to snc@…

comment:6 Changed 9 years ago by mkae (Marko Käning)

It would be great if someone could independently verify that this patch indeed does prevent useless creation of the empty folder Library/Preferences/KDE with root permissions. (I think I should be able to answer my question from further up myself: The config folder should have been created previously by tools built from kdelibs4 sources during the install phase.)

I at least didn't see it reappearing after I had deleted it deliberately and reinstalled kdelibs4 from scratch.

(I'm sick for today of re-building and installing this again, because my machine did nothing else this weekend - so it seems.)

comment:7 Changed 9 years ago by mkae (Marko Käning)

I could verify that just an empty configuration folder does not get created by kde4-config anymore.

Brad has shown however that the configuration folder DOES GET CREATED during build of kdelibs4.

So, it is very likely that it actually gets created by the build procedure itself and not by kde4-config, as we thought all along.

comment:8 Changed 9 years ago by mkae (Marko Käning)

If someone is about to be recompiling kdelibs4 I suggest running this command in a separate shell during the build & install phases:

sudo dtrace  -n 'syscall::open*:entry { printf("%s %s",execname,copyinstr(arg0)); }' 2>/dev/null | grep KDE

which should help to find the culprit, i.e. the process which creates the folder structure ~/Library/Preferences/KDE with unwanted admin permissions!

comment:9 Changed 9 years ago by mkae (Marko Käning)

Well, in the process of building kmymoney4 no config directory with admin permissions was created, which is evidence that the kde-config patch actually works - at least for derived ports. (Well, at least for kmymoney4 port it worked out fine, certainly further tests needed.)

comment:10 Changed 9 years ago by mkae (Marko Käning)

Further tests with installations and upgrades of KDE-related ports showed no further issues.

The KDE directory always kept its user's ownership.

So, I guess this patch can be incorporated in the current kdelibs4 port.

Any objections?

comment:11 Changed 9 years ago by mkae (Marko Käning)

Just realized that I was still working with version 4.5.2 locally.

Upgraded to 4.5.3 now.

Incorporating above patch works also for this version.

comment:12 Changed 9 years ago by mkae (Marko Käning)

Various installs of ports kdelibs4, kdepimlibs4, kmymoney4 (during the fortnight) have never produced admin ownership of the config folder.

So, I guess this patch can be considered safe.

comment:13 Changed 9 years ago by mkae (Marko Käning)

r74224 introduces this patch, but doesn't actually patch, since it's still omitted in the patchfiles block in the port file.

Is this intentional?

comment:14 Changed 9 years ago by nerdling (Jeremy L)

Status: newassigned

Eh, I forgot. The DBus issue (#21937 #27555) was distracting. I'm checking the patch now and will update as soon as it's done building.

comment:15 Changed 9 years ago by nerdling (Jeremy L)

Sorry: #31973

comment:16 Changed 9 years ago by nerdling (Jeremy L)

Wow, one last time: #21973

comment:17 Changed 9 years ago by nerdling (Jeremy L)

Resolution: fixed
Status: assignedclosed

comment:18 Changed 9 years ago by mkae (Marko Käning)

snc, this patch makes these messages obsolete:

######################################################
#  Programs will not start until you run the command 
#  'sudo chown -R $USER ~/Library/Preferences/KDE'  
#  replacing $USER with your username.              
######################################################

I guess they are scattered around in various ports... But they are not needed anymore.

comment:19 Changed 9 years ago by nerdling (Jeremy L)

Those messages are necessary until the next version comes out as this was not worth a rev bump.

comment:20 Changed 9 years ago by mkae (Marko Käning)

Oh, sorry, I didn't verify whether there was a rev bump or not. :-) OK

comment:21 Changed 8 years ago by mkae (Marko Käning)

Resolution: fixed
Status: closedreopened

The message is still appearing, although it's not necessary anymore, instead irritates (new) KDE users as in macports-user's ML post titled "How to start kde4".

comment:22 Changed 8 years ago by nerdling (Jeremy L)

Resolution: fixed
Status: reopenedclosed

Nag message removed in r89389.

Note: See TracTickets for help on using tickets.