LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 01-28-2014, 01:58 AM   #1
moisespedro
Senior Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,223

Rep: Reputation: 195Reputation: 195
Package Manager - which one do you use?


I am building my first LFS system right now and I'd like to know which package manager you've choosen and why. I am asking this because I want to know your experiences and many things I've found are very old so I don't know if it would still work properly. Anyways, I really liked the timestamp scheme, what do you think about it?
 
Old 01-28-2014, 02:02 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
I would recommend for the first time you go through LFS not to use a package manager, but to concentrate on the actual LFS build. Don't distract yourself.
I have never built LFS with package management, but if I would I would opt for the package management systems of either Slackware or CRUX.
 
Old 01-28-2014, 02:13 AM   #3
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Adding a package manager is fickle. Don't worry about one really. Make install and make uninstall both can serve you well enough for a system if you archive the sources after configuration, build, and clean up.

After you start BLFS, just use:

make
make install
make clean

And then keep the source pack in /sources.

The only exceptions are packages like perl, and packages using cmake. However, yes pkgtools used by Slackware will work very well if you learn how to use it and build packages. Just be aware that you should ONLY use this against non-core packages.

Try to treat the LFS core as a single entity. You can update some packages in the core, but DO NOT TOUCH GLIBC OR THE KERNEL HEADERS... Once you install glibc and the glibc-kernel-headers they are hard-locked to the system until you rebuild everything all over again.

This more or less resides along the same lines as treating LFS as a BSD operating system, but it work very well to ensure you keep a working core.

Last edited by ReaperX7; 01-28-2014 at 02:44 AM.
 
1 members found this post helpful.
Old 01-28-2014, 08:40 AM   #4
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 628

Rep: Reputation: 185Reputation: 185
Quote:
Originally Posted by moisespedro

Anyways, I really liked the timestamp scheme, what do you think about it?
I used that while building my current BLFS system. But not for package management, just to have the logs of what each package installed. And for that purpose, it works fine. I used a homemade script with the find command and ran it after each package was installed.

But to me, the real chore of package management is dependency management, and the timestamp thing doesn't do that. Some members here are using distro package managers or homemade package manager scripts with B/LFS. Maybe they will come along and post about those.

In the end though, I don't bother updating anything in my BLFS systems. I rebuild the whole thing starting when the new core LFS books are released (and send in a donation to Beekmans). So I don't use any package management method.

Last edited by stoat; 01-28-2014 at 09:01 AM.
 
Old 01-28-2014, 11:36 AM   #5
moisespedro
Senior Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,223

Original Poster
Rep: Reputation: 195Reputation: 195
I don't want slackware package system, I am already on slack and that would be boring :P and I don't care much for dependency resolution

Quote:
Originally Posted by ReaperX7 View Post
Adding a package manager is fickle. Don't worry about one really. Make install and make uninstall both can serve you well enough for a system if you archive the sources after configuration, build, and clean up.

After you start BLFS, just use:

make
make install
make clean

And then keep the source pack in /sources.

The only exceptions are packages like perl, and packages using cmake. However, yes pkgtools used by Slackware will work very well if you learn how to use it and build packages. Just be aware that you should ONLY use this against non-core packages.

Try to treat the LFS core as a single entity. You can update some packages in the core, but DO NOT TOUCH GLIBC OR THE KERNEL HEADERS... Once you install glibc and the glibc-kernel-headers they are hard-locked to the system until you rebuild everything all over again.

This more or less resides along the same lines as treating LFS as a BSD operating system, but it work very well to ensure you keep a working core.
Isn't that too much time and space disk consuming? I am planning on using LFS as a desktop system, I think it would be too much packages to administrate.
 
Old 01-28-2014, 03:58 PM   #6
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Sizewise, LFS is very small. Even with BLFS with all proper dependencies for X, Xfce, and the complete Xfce extras for a fully functional desktop, it's still very small for a distribution. If you have 100+ GB of disk space and aren't dual-booting, don't even worry about it. If you use stripping, it can be a real space saver. Just be careful using stripping that you don't destroy the wrong libraries.

I have started a rebuild against pkgtools on my system with LFS excluded as a single entity component of the system, but my method doesn't include using the post-install scripts like Slackware. I regenerate scripts and other configuration files per update and delete old ones if anything has changed using diffutils, and my own generator scripts.

Pkgtools works very nice though and is very simplistic.
 
Old 01-28-2014, 05:04 PM   #7
moisespedro
Senior Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,223

Original Poster
Rep: Reputation: 195Reputation: 195
I am a complete linux noob lol, btw my LFS partition only has 18 GB free. I am thinking about creating another partition for /sources. Nah, I wanted something new not pkgtools. And, afaik lots of packages doesn't come with 'make uninstall'. My idea is something as easy as posible to track the installed packages and posible updates. Two more questions: how do you upgrade LFS? I am running LFS 7.4. When LFS 7.5 gets released can I build it over my existing LFS system? The other question is: lets say I have package Y version 1.0 installed. Then, they release Y version 1.1. Is it safe to just download the source file and compile it over the existing package? Because it doesn't seem to be safe to me.
 
Old 01-28-2014, 08:20 PM   #8
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
New doesn't mean better. If you are going for package management, always using a system that is tested with a strong reputation.

If you have only 18GB of space, chances are you will need another partition. However you should have by now performed the stripping commands to downsize enough stuff.

You may also want to consider drafting autobuild scripts for packages that will download, unpack, build, install, and delete the source packages from what is covered in the book, and then keep a log file of what you install, version numbers, etc.

It's not as comprehensive as storing source packs, but it works fairly well.
 
Old 01-28-2014, 08:30 PM   #9
moisespedro
Senior Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,223

Original Poster
Rep: Reputation: 195Reputation: 195
Ok thanks, and disk size isn't a problem anymore. I've created a 30GB partition just for source files. And I am not crazy about updates but they might be necessary, I want it stable but not debian-stable xD
 
Old 01-29-2014, 03:15 AM   #10
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
You might want to also look into ArchLinux's pacman package manager. I don't know how it compares to pkgtools, but a few people here use it.

There's several other package managers out there also, but to be honest, as the book says plainly... It's all in your head. I started keeping scripts to manage things minus deleting.
 
Old 01-29-2014, 10:32 AM   #11
moisespedro
Senior Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,223

Original Poster
Rep: Reputation: 195Reputation: 195
I don't like pacman much, I mean I like it but I rather have something simple like the one we have on slack.
 
Old 01-29-2014, 03:38 PM   #12
Lennie
Member
 
Registered: Aug 2012
Location: Sweden
Distribution: LFS, built with pacman
Posts: 374

Rep: Reputation: 85
I use pacman. I just love it and can't even think of any other package manager. I feel safe with pacman, because he will never overwrite any files or directories (as long as one doesn't use --force).

My system is now rolling. When I installed 7.4 I rebuilt everything. Since then I have kept BLFS updated, and lately I have also updated most packages from LFS-svn.

Quote:
Originally Posted by moisespedro View Post
The other question is: lets say I have package Y version 1.0 installed. Then, they release Y version 1.1. Is it safe to just download the source file and compile it over the existing package? Because it doesn't seem to be safe to me.
If it is only the patchlevel, the third number, it should be safe to upgrade. If it is the 1'st or 2'nd you need to check the libraries if the number has changed. For example:
Code:
libsomething.so
libsomething.so.1
libsomething.so.1.2
The important file is libsomething.so.1. If that is changed to libsomething.so.2 you need to recompile all packages that links against it.
 
Old 02-10-2014, 02:39 AM   #13
hendrickxm
Member
 
Registered: Feb 2014
Posts: 344

Rep: Reputation: Disabled
Quote:
Originally Posted by Lennie View Post
I use pacman. I just love it and can't even think of any other package manager. I feel safe with pacman, because he will never overwrite any files or directories (as long as one doesn't use --force).

My system is now rolling. When I installed 7.4 I rebuilt everything. Since then I have kept BLFS updated, and lately I have also updated most packages from LFS-svn.


If it is only the patchlevel, the third number, it should be safe to upgrade. If it is the 1'st or 2'nd you need to check the libraries if the number has changed. For example:
Code:
libsomething.so
libsomething.so.1
libsomething.so.1.2
The important file is libsomething.so.1. If that is changed to libsomething.so.2 you need to recompile all packages that links against it.
I am building LFS in a similar way as in your script. I would like to do all manually so I have a better idea what I am doing, could you guide me through a little.

After chrooting, to which dir do I have to go and should I run makepkg and afterwards pacman -U somewhere else?
 
Old 02-10-2014, 12:08 PM   #14
Lennie
Member
 
Registered: Aug 2012
Location: Sweden
Distribution: LFS, built with pacman
Posts: 374

Rep: Reputation: 85
Quote:
Originally Posted by hendrickxm View Post
I am building LFS in a similar way as in your script. I would like to do all manually so I have a better idea what I am doing, could you guide me through a little.

After chrooting, to which dir do I have to go and should I run makepkg and afterwards pacman -U somewhere else?
You should have one dir for each package, and in each of those dir there should be a file named PKGBUILD. cd to the dir for the package you want to build and run makepkg. That should create a package in the same dir and you can then install it with pacman -U <package>
 
Old 02-10-2014, 12:34 PM   #15
hendrickxm
Member
 
Registered: Feb 2014
Posts: 344

Rep: Reputation: Disabled
Quote:
Originally Posted by Lennie View Post
You should have one dir for each package, and in each of those dir there should be a file named PKGBUILD. cd to the dir for the package you want to build and run makepkg. That should create a package in the same dir and you can then install it with pacman -U <package>
Thanks. I knew it was something like that.
Do I have to change your PKGBUILDS if I copy each PKGBUILD to a directory for each package conserning the $srcdir and pkgversion names?
The sources will be downloaded and removed automatically? I use archlinux and pacman but never made my own PKGBUILDS, I do use yaourt sometimes when something is otherwise unavailable.
 
  


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
Update Manager , Synaptic package manager & dpkg: warning error massage sa3paleasm Linux - Software 1 08-07-2013 04:45 PM
[SOLVED] Synaptic package manager won't open due to faulty package nine9nine Linux - Software 7 09-15-2011 07:30 PM
Adept package installer not working if not launched by package manager iqbala Ubuntu 3 11-29-2008 06:32 AM
LXer: Simple Package management with Synaptic Package Manager LXer Syndicated Linux News 0 12-05-2006 06:33 PM
Poll: Yast Package Manager vs. Smart Package Manager in 10.1 agentchange SUSE / openSUSE 6 06-02-2006 08:29 AM

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

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