SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
Distribution: Slackware 11.0; Kubuntu 6.06; OpenBSD 4.0; OS X 10.4.10
Posts: 345
Rep:
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.
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.
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
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.
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.
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").
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.
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"?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.