Linux From ScratchThis 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
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.
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?
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.
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.
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.
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
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.
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.
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.
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.
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
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.
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
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:
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:
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?
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>
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.