LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 09-11-2009, 08:56 AM   #1
Mol_Bolom
Member
 
Registered: Nov 2008
Location: S.W. Kansas
Distribution: Slackware64 14.0
Posts: 219
Blog Entries: 2

Rep: Reputation: 41
src2pkg can change home permissions.


I only did a small search for this so I don't know if someone had already posted about this.

Using src2pkg with codelite it creates a link in the home directory under Desktop in which when installed it changes the permissions of /home/user and /home/user/Desktop to root.

Out of curiosity I read through src2pkg man page but didn't see anything that would help. Would anyone know if there is an argument that can be passed that would keep that from happening?
 
Old 09-11-2009, 09:35 AM   #2
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,014

Rep: Reputation: 115Reputation: 115
set CORRECT_PKG_PERMS environment variable to "NO".

Or better yet, delete that nasty symlink right after the fake_install step. No package should install anything to a specific user account.

It's still a problem that src2pkg follows symlinks when it corrects package permissions.
 
Old 09-11-2009, 12:18 PM   #3
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.0
Posts: 1,142
Blog Entries: 29

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by tuxdev View Post
set CORRECT_PKG_PERMS environment variable to "NO".
I thought that that variable was supposed to prevent what Mol_Bolom experienced from happening.

Quote:
Or better yet, delete that nasty symlink right after the fake_install step. No package should install anything to a specific user account.
Agreed.

Quote:
It's still a problem that src2pkg follows symlinks when it corrects package permissions.
Hopefully Gilbert will read this and chime in.

Regards,


-Drew
 
Old 09-11-2009, 12:21 PM   #4
Mol_Bolom
Member
 
Registered: Nov 2008
Location: S.W. Kansas
Distribution: Slackware64 14.0
Posts: 219
Blog Entries: 2

Original Poster
Rep: Reputation: 41
Thanks. I tried CORRECT_PKG_PERMS to NO, but that didn't work

However, I added `cd $PKG_DIR/home && cd .. && rm -r $PKG_DIR/home` after fake_install, that worked. I don't think there is any programs that "have" to put anything in /home so I'll make this a necessary addition to the auto files.

<Edit> Not a big problem so not going to start a new thread/discussion/whatever...But I have been going through the src2pkg script and can't seem to find how an auto file is generated to make this a permanent addition. Any ideas?

Last edited by Mol_Bolom; 09-11-2009 at 02:14 PM.
 
Old 09-16-2009, 11:34 AM   #5
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,763

Rep: Reputation: 471Reputation: 471Reputation: 471Reputation: 471Reputation: 471
Okay, it took me most of the day to make sure I fixed this properly. I actually had a similar problem yesterday when building 'gcal'.

First, the easy and fast solution to the problem is that you need to pass '--disable-desktop_icon' to the configure script (-e=--disable-desktop_icon or EXTRA_CONFIGS=--disable-desktop_icon in script).
You can avoid the long time for recompiling (if you haven't removed the build dirs) by cd into the SRC_DIR and run:
./configure --prefix=/usr --disable-desktop_icon
Then, go back to where you ran src2pkg from and run it with the same command but add:
--resume=fake_install to the options.

It took me a long time because, first of all I had to compile and install wxwidgets-2.8 -that took over two hours. Then codelite needed nearyl two hours to build as well.
Meanwhile I used the shorter gcal build to come up with the best fix for the problem. You may have noticed that src2pkg warned you about the package containing your $HOME directory (if you are using the latest src2pkg-1.9.9). But it still allowed the build to continue.

What I have done is had src2pkg marks this and similar errors as being fatal and the build is aborted instead of just warning. This meantadding a new option to the src2pkg.conf file which allows the default behaviour to be overridden when needed/wanted.

The reason you had this problem is because you were building the package as a normal user. Your $HOME dir was included in the package (from installing a codelite.desktop file). codelite has an 'evil' Makefile -but it is not the only one that does such things. the reason that your $HOME dir got its' perms changed is because, when running as a normal user, src2pkg uses an option to 'tar' which allows all the file ownerships and group to be changed to root. Usually, package content should all be owned by root, but that is not always the case. If you had built the package as 'root' the package would still have contained the directory /root -which should not be the case.

For gcal, I had to fix the problem with a patch to a Makefile.in, but codelite has the above-mentioned configure option which allows you to disable the installation of the dekstop file in your $HOME dir. It is still an 'evil' thing and the authors knew about it:
I found this in the configure script:
Code:
# The next 2 aren't in the Usage, but will prevent undesirable things from happening when e.g. making rpms
		elif [ "$1" = "--disable-desktop_icon" ]; then
			add_desktop_icon="no"

		elif [ "$1" = "--disable-make_symlink" ]; then
			make_symlink="no
Actually, I had already found the fix for it because I downloaded the fc rpm sources and lloked at the codelite.spec file which shows these options to configure:
--prefix=%{_prefix} --plugins-dir=%{_libdir}/%{name} --disable-debian --disable-desktop_icon --disable-make_symlink

After checking, it seems that the other options are not needed, only: --disable-desktop_icon

To finish, thanks very much for promptly reporting the problem and congratulations(?) for having reported the worst problem with src2pkg in its' five-year history! Your name fit in several times in the long entry for the fix to the ChangeLog of the next version. I hope you didn't get panicky when you got locked out of your $HOME!!

In answer to your last question, 'src2pkg -N tarball-name' generates a generic NAME.src2pkg.auto script ready for editing -be sure to change the name to drop the '.auto' part so it doesn't get 'clobbered'.

Thanks to Drew for alerting me to this thread!
 
Old 09-16-2009, 12:10 PM   #6
Mol_Bolom
Member
 
Registered: Nov 2008
Location: S.W. Kansas
Distribution: Slackware64 14.0
Posts: 219
Blog Entries: 2

Original Poster
Rep: Reputation: 41
Thumbs up

thanks...

Quote:
Originally Posted by gnashley View Post
First, the easy and fast solution to the problem is that you need to pass '--disable-desktop_icon' to the configure script (-e=--disable-desktop_icon or EXTRA_CONFIGS=--disable-desktop_icon in script).
Mental note to myself, READ don't presume. However, I probably wouldn't have expected that it would have been a problem even if I would have read it, still a bit new, but with every problem something new learned.

Quote:
You may have noticed that src2pkg warned you about the package containing your $HOME directory (if you are using the latest src2pkg-1.9.9). But it still allowed the build to continue.

What I have done is had src2pkg marks this and similar errors as being fatal and the build is aborted instead of just warning. This meantadding a new option to the src2pkg.conf file which allows the default behaviour to be overridden when needed/wanted.
Unfortunately I didn't notice that, perhaps over looked it, or don't have a newer version. Going to check into it.

Quote:
I hope you didn't get panicky when you got locked out of your $HOME!!
Luckily I didn't panic and had it fixed within seconds of discovering it.
 
Old 09-16-2009, 12:24 PM   #7
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.0
Posts: 1,142
Blog Entries: 29

Rep: Reputation: 119Reputation: 119
Gilbert,

Thanks for your research, explanation, and prompt attention to this problem.

You said:
Quote:
What I have done is had src2pkg marks this and similar errors as being fatal and the build is aborted instead of just warning. This meant adding a new option to the src2pkg.conf file which allows the default behavior to be overridden when needed/wanted.
Does that mean you've got a new version coming out soon?

Regards,

-Drew

P.S. I really need to get to work updating the wiki...
 
Old 09-16-2009, 01:20 PM   #8
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,763

Rep: Reputation: 471Reputation: 471Reputation: 471Reputation: 471Reputation: 471
Yes, I am working towards src2pkg-2.0. It is going to be a bug-fix-only release -no new features will be added before 2.0. I am also planning to rewrite most or all of the documentation as it is getting quite out-of-date. So, don't put any time into the wiki just now. I'm going to try to simplify and condense the documentation as much as possible. src2pkg-2.0 is planned to be the most stable and problem-free release ever -one that can be used as a roll-back version that one can always later downgrade to if needed or wanted.
 
Old 09-16-2009, 07:45 PM   #9
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.0
Posts: 1,142
Blog Entries: 29

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by gnashley View Post
Yes, I am working towards src2pkg-2.0. It is going to be a bug-fix-only release -no new features will be added before 2.0. I am also planning to rewrite most or all of the documentation as it is getting quite out-of-date. So, don't put any time into the wiki just now. I'm going to try to simplify and condense the documentation as much as possible. src2pkg-2.0 is planned to be the most stable and problem-free release ever -one that can be used as a roll-back version that one can always later downgrade to if needed or wanted.
That's music to my ears! Let me know how and when I can help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
New src2pkg release available for download -Introducing the src2pkg WIKI gnashley Slackware 11 05-06-2008 11:09 AM
Help me change permissions and move my Home folder madhatter64 Linux - Newbie 4 02-05-2008 11:26 PM
src2pkg has a new home! gnashley Slackware 19 07-16-2007 09:18 PM
touch file in every users home, then change permissions paul_mat Linux - Networking 1 05-01-2006 06:06 PM
permissions in /home meem Linux - Newbie 1 02-15-2005 01:55 PM


All times are GMT -5. The time now is 04:40 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration