LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 03-30-2007, 08:11 PM   #16
arcanex
Member
 
Registered: Mar 2007
Posts: 41

Rep: Reputation: 15

Quote:
Originally Posted by hussar
And checkinstall doesn't have root privileges - I am running it as root. The difference is critical and important for you to understand.
What is the difference? Please enlighten me. =)

Quote:
Originally Posted by hussar
What do you believe makepkg and installpkg are doing? Can you effectively run makepkg and installpkg as a user?
Makepkg and installpkg are little more than glorified bash scripts for tar! Really! (See, this is what I wish every Slacker already knows...) You can load it up in vim if you want to start realizing on what truly simple principles Slackware is founded on. You can run them as a regular user just fine. You just can't touch the system directories, of course, but the same functionality is there.

Oh, and by the way, running makepkg and installpkg as normal user (or managing "user packages", as I like to call it) is what I wrote another glorified bash script called 'uupt' for.

Quote:
Originally Posted by hussar
Well, it might be possible to run checkinstall as a user to build a package and then use installpkg as root to install the package, but I've never tried it and I'm unconvinced of its utility.
Well, I hate feeling like an idiot like this whenever I speak out about something I don't really know, but I just tried it a few minutes ago and YOU CAN RUN CHECKINSTALL AS A NORMAL USER just fine-- it'll build a normal package without needing write permissions to system directories (because checkinstall "traps" the file operations and it doesn't really get carried out). It won't install it on the system, because you don't have the permissions as non-root.

The ownership will be wrong, (since they will be owned by the normal user who ran 'checkinstall'), but I think 'fakeroot' was written to handle exactly this kind of thing (run 'checkinstall' as 'fakeroot' so that the package will have root:root ownership, for example, but not really have "root access").

Excellent! That is truly neat! That calms my paranoia down a bit!

I still won't run it as root though.
Because I don't need to.

But it'll make it so much easier to manage user packages with uupt.
 
Old 03-31-2007, 01:49 AM   #17
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
Hussar, src2pkg is just a collection of scripts so the program *is* the code. There is an uncompressed folder with all source files in the same directory where the package is:
http://distro.ibiblio.org/pub/linux/...migo-PkgBuild/

Now, let me clear up a thing or two about checkinstall. checkinstall will only work completely if you are root -if the installation installs to any system directories.

checkinstall works by using LD_PRELOAD to intercept system calls so it knows where a file is going to be created before it happens. If you use the backup function it will make copies of the original files *before* overwriting them with the new ones. It keeps a list of all files created and then copies them into a skeleton directory and then uses makepkg to create the final package. It then runs installpkg to *register* in the pkgtool database -the files created by 'make install' have already been installed, but the database files have not. checkinstall 'drops the ball' during these operations in a minor way. Try checkinstall with any program that installs an uncompressed man-page and you can see what I mean. After all is finished you'll have a gzipped man-page which is part of the package and the original uncompressed one remains orphaned on youir system as it's not listed in the package.

src2pkg uses the same installwaatch libs as checkinstall, but does a better job of keeping track of file and directrory creation. installllwatch will even keep track of file ownership and permissions changes. The only command it will not track are 'mknod' and any suid program.
If you run checkinstall as non-root, then you are denied permssion to install system files. So checkinstall doesn't register their creation, they are not installed and will be missing from your final package.
 
Old 03-31-2007, 07:00 AM   #18
hussar
Member
 
Registered: Oct 2003
Location: Heidelberg, Germany
Distribution: Slackware 11.0; Kubuntu 6.06; OpenBSD 4.0; OS X 10.4.10
Posts: 345

Rep: Reputation: 30
Quote:
Originally Posted by hussar
And checkinstall doesn't have root privileges - I am running it as root. The difference is critical and important for you to understand.
arcanex, I apologize. That was a pretty stupid and pompous thing to write. What I was thinking about at the time had to do with apps that are suid and apps that one calls explicitly as root to perform a discreet task. Thinking back on it, I took an idea that wasn't really well-formed or pertinent, and expressed myself very rudely. Again, I'm sorry.


Quote:
Originally Posted by arcanex
The ownership will be wrong, (since they will be owned by the normal user who ran 'checkinstall'), but I think 'fakeroot' was written to handle exactly this kind of thing (run 'checkinstall' as 'fakeroot' so that the package will have root:root ownership, for example, but not really have "root access").
Thanks for the tip on fakeroot. I had never heard of it before.

Quote:
Originally Posted by gnashley
Hussar, src2pkg is just a collection of scripts so the program *is* the code. There is an uncompressed folder with all source files in the same directory where the package is:
http://distro.ibiblio.org/pub/linux/...migo-PkgBuild/
It occurred to me later on as I was reading the makepkg manpage that I could have just downloaded the package to a temporary directory and then run explodepkg on it. Checkinstall has worked pretty well for me, but I wasn't aware of the man page issue you mention.
 
Old 03-31-2007, 08:35 AM   #19
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
If you like checkinstall, you'll find src2pkg even easeier to use as it takes you all the way throught the build -from driectory creation to cleanup and scripting and it automatically inserts slack-desc files unless you supply one.
 
Old 04-06-2007, 01:42 PM   #20
BlueSpirit
Member
 
Registered: Jun 2006
Distribution: Slackware
Posts: 144

Original Poster
Rep: Reputation: 15
LoL gnashley, normal... You're a developper of src2pkg... which is nice! :-]

But... Hihi...

Where can I dl your soft...
You don't even have a webpage... at least a webpage indexed in Google.


L0L

Thank you guys,

Blue

P.S. Now I compile Qt myself with thread support to compile kdelibs to compile k3b...

Used checkinstall, 1st b/c I got that answer 1st.

It works fine for some things, but when compiling Qt >>> Awww. Error 1.

So I'll try src2pkg.

If it doesn't work. Fine...

Ill use the tip with --prefix={to a $HOME/qt-3.3.8 dir} and make myself a Slack PKG. But it's a waste of time...

Cordially,

Blue
 
Old 04-06-2007, 02:05 PM   #21
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
I'm not even going to attempt to quote people, as there's simply too much. However...

1. makepkg(8) will run just fine as a normal user. /sbin isn't in a normal user's PATH, but it's still executable by a normal user.

2. checkinstall is indeed a great app, but you don't get the same granular control over the entire package contents that you have with some other methods (for example, SlackBuild scripts).

3. Building a package manually or with checkinstall has the potential to let you forget important configure options that were used to build the package. This certainly isn't an issue with a large percentage of apps, but it's important for more than handful of them - with those, you won't know exactly what options you passed last time when you need to upgrade it.

I'll admit to being a bit biased on the use of SlackBuild scripts, but I guess that's expected
 
Old 04-06-2007, 02:24 PM   #22
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
#3 is very important, IMO. I know a good number of packages that fit in this category.
 
Old 04-06-2007, 02:33 PM   #23
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
BlueSpirit, see the answer to Hussar for the directory where src2pkg lives. google probably doesn't have that indexed yet since the name of the software changed recently -search for PkgBuild and you'll find more, but mostly just links to this forum anyway.
src2pkg doesn't have its' own page and probably won't any time soon - I maintain over 500 packages and do some development on 20-30 different programs so I don't have much time for keeping up a webpage other than this one:
http://amigolinux.org

rworkman, one of the benefits of using src2pkg instead of checkinstall is that it will keep track of your configure and build options and customizations and write them into a script for you.
 
Old 04-06-2007, 02:54 PM   #24
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
Quote:
Originally Posted by gnashley
rworkman, one of the benefits of using src2pkg instead of checkinstall is that it will keep track of your configure and build options and customizations and write them into a script for you.
Ah, okay - I wasn't aware of that. Very nice.
 
Old 04-06-2007, 10:23 PM   #25
BlueSpirit
Member
 
Registered: Jun 2006
Distribution: Slackware
Posts: 144

Original Poster
Rep: Reputation: 15
Gnashley... Problem with src2pkg ... I'm maybe not patient but... Okay :

On my comp, it took me 2 hours when I compiled Qt with make.

Now, with src2pkg, I'm waiting since 3 hours and nothing? what can be wrong?

I did : src2pkg -i='make install' -e='-thread' qt-x11-free-3.3.8.tar.gz

I'm still waiting...

I'm not rly friendly with these concepts...
Just, anyone, tell me what to type in console to get a Slackware TGZ package with src2pkg. THX

4 hours : CTRL + C ... But no.

I know that theres something struck, and it won't work. But I'll not CTRL + C, because I'll just run src2pkg all night. Going bed. Later.

Thank you,

Blue

Last edited by BlueSpirit; 04-06-2007 at 11:01 PM.
 
Old 04-06-2007, 10:40 PM   #26
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
1. Post what src2pkg has printed out.
2. Check in the source directory for qt in /tmp to see if things look OK (object files are being created, etc.)
3. Check "top" to see if the compiler is running, etc.

The -i option should not be needed, since it does "make install" by default (usually, it sometimes does "scons install" or "jam install").

Last edited by tuxdev; 04-06-2007 at 10:41 PM.
 
Old 04-07-2007, 12:49 AM   #27
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
I'm not sure about the configure options you are using - '-thread' looks a little suspicious so make sure that is correct(usually long options have a doubel-dash -- to start, but not always).
If that is correct, then try it again. As tuxdev mentioned you shouldn't need to pass the -i option -what you are passing is the default anyway.
For packages that take a long time to compile it's good to see the ouput as you go. In order to see that src2pkg is working, use the -VV option so all messages will show from configure, make and make install.
If the sources contain a Jamfile or Sconstruct file src2pkg will try to use those by default. If you don't have jam or scons installed it could cause a hang-up, I guess. If so, let me know.
 
Old 04-07-2007, 09:23 AM   #28
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
I've just tried this. The reason for the hangup is
Quote:

This is the Qt/X11 Open Source Edition.

You are licensed to use this software under the terms of either
the Q Public License (QPL) or the GNU General Public License (GPL).

Type 'Q' to view the Q Public License.
Type 'G' to view the GNU General Public License.
Type 'yes' to accept this license offer.
Type 'no' to decline this license offer.

Do you accept the terms of either license?
Interactivity and src2pkg don't exactly get along very well. Perhaps src2pkg could do something with "expect"?
 
Old 04-07-2007, 09:33 AM   #29
BlueSpirit
Member
 
Registered: Jun 2006
Distribution: Slackware
Posts: 144

Original Poster
Rep: Reputation: 15
Omg guys. (thx for trying you too btw)
I totally forgot the question...

Okay. Is there any way to, first, show all output? -VV ? (Ill try).
Edit : I should have read Gnashley msg first... Its ok for that.

Then second, to say "yes" to the prompt?

I rapidly read mans first... HeHe.

For the -thread , don't wry, its the GOOD option. Enabling threading support is veery common in Qt.

Thank you,

Blue@

Last edited by BlueSpirit; 04-07-2007 at 09:42 AM.
 
Old 04-07-2007, 09:49 AM   #30
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
Saying "yes" to the prompt should work. It should work even if you can't actually see the question.

Anyway, why are you compiling qt yourself instead of using the official Slackware package? The -thread option?
 
  


Reply



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
tgz file doesn't end in .tgz? detpenguin Slackware 4 05-15-2004 07:13 PM
kernel 2.6.3 compile time and tgz newinlinux Slackware - Installation 2 02-19-2004 09:32 PM
[Discussion]compile error of adsl drive file xxx.src.tgz legendren Linux - Hardware 1 12-01-2003 08:14 AM
X Sever crash after xset.tgz & vg16.tgz install lachlan Slackware 0 08-13-2003 02:48 AM
compile qt > tgz hulf_slo Linux - Software 0 08-02-2003 06:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:12 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration