LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 05-07-2003, 02:28 PM   #1
aes12
LQ Newbie
 
Registered: Feb 2003
Location: Ohio, USA
Distribution: Slackware 8-1
Posts: 23

Rep: Reputation: 15
Lightbulb LFS package management


I was wondering if anyone had played around with the idea of implementing any kind of package management on thier LFS system. I'm getting ready to start on my own, and in reading the book, before I get to it, it occured to me that managing all of these packages could be somewhat of a hassle, if you were to use the system for any significant length of time.

Here's my idea:
In addition to the recommended packages, statically compile a copy of Slackware's pkgtool and checkinstall programs. When you go on to create your dynamically linked programs, use checkinstall to create a slackware package tarball. Use pkgtool to to the actual installation.

Yeah, it's an extra step, but you get the ability to easily uninstall/upgrade the packages later on...

Now, has anyone tried this? What problems am I likely to run into?

Moreover, what do you think of the idea, in general?
 
Old 05-07-2003, 03:00 PM   #2
lfslinux
LFS Maintainer
 
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372

Rep: Reputation: 30
checkinstall works yes. I myself use a different method that doesn't require any additional programs. The only required programs are find and sed which are present on most any Linux system.

The method is simplicity in itself: before installing a package take note of the current time on the system then use 'find' and tel lit to return all files whose status was changed after the noted timestamp you took earlier. This will return a list of all new and modified files.

The only drawback is that this method takes some time because it needs to scan every file on the filesystem. This might take a while on slow harddrives.

The script I use can be found at http://linuxfromscratch.org/~gerard/log-install

Another method could be using a program like "strace" or "checkinstall" which can be told to intercept system calls relating to file creation and writing. This is a faster method since it only scans what a process like "make install" actually does in real-time, instead of scanning the entire filesystem afterwards to see what it has done.

There are many other forms of package management that people have implemented. I suggest using the LFS search engine at http://search.linuxfromscratch.org and look around some yourself.

Lastly, go to http://hints.linuxfromscratch.org/hints.shtml and look for the "package management" section. It has a number of examples there too
 
Old 05-07-2003, 09:26 PM   #3
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Gerard didn't mention why his way might work a little better than checkinstall at times...

By scanning for the changes rather than using "checkinstall" you can use some of the bundled installers (./install.sh) and such and not have to worry about editing the script (if even possible). It's more of a "works all the time" thing than checkinstall.

I personally use checkinstall and run into this problem more and more frequently now; I might give Mr Beekmans' script a go...

Cool
 
Old 05-07-2003, 09:35 PM   #4
lfslinux
LFS Maintainer
 
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372

Rep: Reputation: 30
In that case I recomment going with "strace". strace can be used to prepend to anything that runs, including those install.sh scripts and what not.

The only reason my own script doesn't use strace is that I haven't found the time to upgrade yet. The 'find' method is very reliable and works flawlessly (for me anyways, I haven't noticed any bugs) but it's slow due to full filesystem scans. I'll get around to upgrading to strace one of these days...
 
Old 05-09-2003, 09:46 AM   #5
CragStar
Senior Member
 
Registered: Oct 2000
Location: UK - Frome
Distribution: Ubuntu
Posts: 1,081

Rep: Reputation: 47
I use install-log from the hints section at LFS. For me it was the first thing I looked at and saw it wasn't too difficult to setup and mantain so decided to use it. Haven't used any of the others, but I think i does the job just grand!

If nothing else I just like to remember the versions of software I have installed rather than the files themselves as I hardly remove things because I only install something if I need it. So install-log is great for that as it is not too slow after the first time you use it. Plus you can choose which directories you want it to search.
 
  


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
Using Package Archive style package management mugwump84 Linux From Scratch 3 08-25-2005 05:19 PM
Has anyone tried to use package management conary to build LFS? jery_wang2002 Linux From Scratch 1 05-31-2005 06:30 PM
LFS and package management michaely Linux From Scratch 7 07-02-2004 12:57 AM
Package management? darkRoom Linux From Scratch 9 06-04-2004 10:00 AM
Package management in LFS CragStar Linux From Scratch 7 11-04-2002 02:58 AM

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

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