LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 03-29-2007, 05:36 AM   #1
arcanex
Member
 
Registered: Mar 2007
Posts: 41

Rep: Reputation: 15
uupt -- slackware's pkgtool, easily packaged even for you crazy LFS users


I've always wondered how you LFS guys managed the programs you installed from source.

Things I've found out by searching through this forums a couple of minutes ago: the package-users management system seems pretty l33t but, frankly, hackish and abusive of the owner:group idea, but sounds a lot like old-school UNIX practice. I've never heard of paco before, but it sounds like it does a lot of things I would want a compiled-from-source packaging system to do and I should give that a try sometime.

I also see that there's some interest in adopting Slackware's pkgtool for use in LFS. This makes a lot of sense since the pkgtool scripts are very simple and will probably work with minimal changes to any other distro.

I have thought of that as well and have been working in the last few days to repackage Slackware's pkgtool for use in other distros, and I'm sure some LFS users would be interested in what I've come up with -- uupt, or universal/user pkgtool.

http://iacs5.ucsd.edu/~pbang/uupt.htm

It's basically makepkg, installpkg, and removepkg from pkgtool, with a simple wrapper script. It's so simple, you can probably rewrite and improve it much better than I can, if you wanted to. =)

But if you want to try Slack's pkgtool on LFS right away, try uupt now and let me know how well it works.
 
Old 03-29-2007, 10:26 PM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
Quote:
Originally Posted by arcanex
I've always wondered how you LFS guys managed the programs you installed from source.
It's all in my head. Admittedly, I do use InstallWatch to make a list of all the files installed by a package. But, I'll bookmark the link and maybe give uupt a try for a package or two.

Quote:
Originally Posted by arcanex
the package-users management system seems pretty l33t but, frankly, hackish and abusive of the owner:group idea
I really don't understand what you mean by this statement. There is no package management system for (C)LFS except what the (C)LFS user creates or borrows.

Incidentally, you can install and use other distros' package managers too; RPM, APT, Portage, and pkgtool have all been used (so I've been told). But, IMHO, after awhile the (C)LFS system has transformed to something else using one of these, especially Portage. And most (C)LFS users don't want to use precompiled software.
 
Old 03-30-2007, 12:55 AM   #3
arcanex
Member
 
Registered: Mar 2007
Posts: 41

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Arow
I really don't understand what you mean by this statement. There is no package management system for (C)LFS except what the (C)LFS user creates or borrows.
I saw a couple of posts talking about creating a user and/or group for each package you install and managing files through these pseudo-users and -groups. That sounds like an awful lot of work for many packages to me, but, then again, I heard that's how we ended up with '/usr/bin' and '/usr/local' today (with '/usr' initially intended to be what the '/home' directory today is, and early UNIX admins settling on conventions such as a 'bin' user and 'local' user, etc.)
 
Old 03-30-2007, 07:58 AM   #4
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
Oh! I don't think I've heard about that one. I think dumb might be a better adjective than "l33t" and it's probably not very widely practiced. I'd agree that it'd be a lot of work! There are several techniques discussed in the (C)LFS books none of which are explicitly endorsed; I think you'll find there's an implicit endorsement of the fakeroot method though.
 
Old 03-30-2007, 01:07 PM   #5
Zention
Member
 
Registered: Mar 2007
Posts: 119

Rep: Reputation: 16
Not sure dumb or l33t are really words to describe the approach of assigning a user to the install files of a package.

There is hardly any work involved just a matter of either assigning an owner to each file on install or just switching to that user upon install.

There is a lot more effort involved if you install a package that is malicious and wipes your system, and there is more effort involved to provide a separate lookup to work out what files belong to which package.
 
Old 03-30-2007, 02:18 PM   #6
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
Quote:
Originally Posted by Zention
Not sure dumb or l33t are really words to describe the approach of assigning a user to the install files of a package.
I retract my dumb. I know what arcanex is referring to now ---> http://www.linuxfromscratch.org/hint...nd_pkg_man.txt. I still think it's a lot of work and don't think the risk/reward ratio is low enough for a single desktop box, but I see the appeal.
Quote:
Originally Posted by Zention
There is a lot more effort involved if you install a package that is malicious and wipes your system
Really? One line of code is a lot of work?
Code:
dd if=/dev/<backup partition> of=/dev/<hosed up partition>
Backup up often enough on a stable system and you won't have many (if any) packages to re-install.
Quote:
Originally Posted by Zention
there is more effort involved to provide a separate lookup to work out what files belong to which package.
Nah. InstallWatch creates a log of every file installed by a package. That's really all you need. I do parse the log with a script to create an XML file that I can view in my always open web browser.

In the end, it's whatever works for you.
 
Old 03-30-2007, 04:14 PM   #7
Zention
Member
 
Registered: Mar 2007
Posts: 119

Rep: Reputation: 16
The point is not how easy it is to hose your system, but how hard it is to get it back

The code you gave would not hose your system if the user running it was limited, you don't have to use root to install all your files if you install as the user of the package.

Someone had to write installwatch so you cannot discount their effort.

And the effort of scanning that file by the computer system is extra to displaying a file's given ownership.

You can automate the process of assigning users to install, so really the point was it does not introduce extra effort.

Last edited by Zention; 03-30-2007 at 04:17 PM.
 
Old 03-30-2007, 10:47 PM   #8
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
Quote:
Originally Posted by Zention
The point is not how easy it is to hose your system, but how hard it is to get it back

The code you gave would not hose your system if the user running it was limited, you don't have to use root to install all your files if you install as the user of the package.
That's the command to restore your system, not hose it. Not a lot of effort to fix a boo boo.
Quote:
Originally Posted by Zention
Someone had to write installwatch so you cannot discount their effort.
Someone had to write the hint too.
Quote:
Originally Posted by Zention
And the effort of scanning that file by the computer system is extra to displaying a file's given ownership.
Nothing perceptible to the user though.
Quote:
Originally Posted by Zention
You can automate the process of assigning users to install, so really the point was it does not introduce extra effort.
Which adds to the effort of using this technique.

Like I said, whatever works for you.

Last edited by weibullguy; 03-30-2007 at 10:48 PM.
 
Old 03-30-2007, 11:50 PM   #9
Zention
Member
 
Registered: Mar 2007
Posts: 119

Rep: Reputation: 16
Ok, I see what you are saying.

Quote:
Really? One line of code is a lot of work?
You have to make the backup first it does not magically appear, and of course most working systems will have more than one partition. So, not really one line of code involved at all.

Say an install hoses part of your system you might not detect until after another package install, by then your backup will just be as corrupted.

You would be advised of this complication using the name approach straightaway, though of course you could set the shell to no clobber when installing as well (though that still has less protection).

The backup approach is not without performance degradation in your system, you will be backing up prior to each install and of course you half the available drive size you have.

To be fair the effort required to use the name approach is minimal the only reason I highlighted the effort levels between installwatch is because of this:

Quote:
I'd agree that it'd be a lot of work!
It just is not a lot of work!

The problem with using the name approach could appear with group limits in NFS, in which case applying the package name to the group is not advisable.

There is nothing wrong with combining approaches as well, so you could have a backup, installwatch and use the named package approach.

The named package approach just improves system stability on install and speed of feedback on what file belongs to what package.

Having one file contain all the details of the install files whilst taking up more room should respond faster when requesting a list of all files installed, so there is a reason to have another system to find file and package association.
 
Old 04-01-2007, 01:04 PM   #10
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
What in the world is this user-based package management supposed to accomplish? I don't get it -where's the benefit?
 
Old 04-01-2007, 11:13 PM   #11
Zention
Member
 
Registered: Mar 2007
Posts: 119

Rep: Reputation: 16
It helps stop an install nobbling existing files and provides a very quick and simple way to see what package a file belongs to.
 
Old 04-02-2007, 12:02 PM   #12
smurth
LQ Newbie
 
Registered: Feb 2007
Posts: 9

Rep: Reputation: 0
I'm using a modified version of pkgtool, too, in my LFS box. It's so easy.
I've enhanced it with a "buildpkg" script that is really powerfull to install or fake-install one or many packages in one go.
It's working good but, currently no help is available and I have no place on the net to hold the stuff
 
Old 04-02-2007, 12:53 PM   #13
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
smurth, have a look at this:
http://distro.ibiblio.org/pub/linux/...migo-PkgBuild/
 
Old 04-03-2007, 12:20 AM   #14
smurth
LQ Newbie
 
Registered: Feb 2007
Posts: 9

Rep: Reputation: 0
Quote:
Originally Posted by gnashley
Sorry, I have no time to completely look at it... and my "buildpkg" script actually do want I want it to do. I'm adding new features as I need them.
It's a very simple but really powerfull tool.
I'm taking my time to build my linux box. It takes me months to do what could be done in one week. But I'm taking pleasure with this all.
When I'll have some time, I'll try to release my modified version of pkgtool, including my "buildpkg" script; but if someone wants to play with it now, just drop me a line at "smurth at free dot fr"
 
  


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
uupt -- slackware pkgtools on other platforms arcanex Slackware 8 03-31-2007 01:28 AM
Skype not working: How to easily give ALSA permission for users for a noob ? Xeratul Linux - General 1 11-27-2006 07:18 PM
slack packaged gnome sridharinfinity Slackware 0 12-01-2003 02:34 AM
Way to easily view a list of users that have been added Aij Linux - General 1 09-10-2003 12:03 AM
pkgtool in LFS newpenguin Linux From Scratch 2 01-18-2003 05:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 09:21 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