When it is the right time to try to implement a package manager?
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.
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 3,129
Rep:
No sorry, you will have to wait until later on in the build if you want to use a package manager that needs a lot of deps, just had a look at the deps for libarchive, you will need to install quite a few before you can install it.
You can either wait until the basic system is installed or find a binary version of the package manager you want to install ( and the dependencies).
This is one of the problems of using a package manager you often need a lot of stuff installed before you can run it, its a bit of a chicken and egg problem.
You could try a simpler script based package manager, which would only need bash/tar for instance which is available from the tools.
In some ways it might be best to think of the basic system as one 'meta' package and don't update bits of it, just redo the whole basic system when needed.
It just requires libarchive, xz and zlib. Maybe it works? And I thought about that like using it just for the BLFS packages bit I'd rather use it for everything.
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 3,129
Rep:
You may find that the dependencies although optional for libarchive in the BLFS book if not installed will cause you some problems if they are not installed, suck it and see
Is it posible to build a single package on another system with the pkg manager and all its dependencies? Idk the name of this and idk how to explain but I am thinking about somethin like what happens with ffmpeg, where you can either have all its dependencies separatadely or have them all built in on a single ffmpeg package.
Last edited by moisespedro; 04-15-2014 at 08:01 AM.
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 3,129
Rep:
Quote:
Originally Posted by moisespedro
Is it posible to build a single package on another system with the pkg manager and all its dependencies?...
That's a bit like asking "how long is a piece of string?", it would depend on the package manager, the package you are building, and the system, probably yes but maybe no, it would I suppose depend on the libs it was linked to on the build system and the libs installed in the target system, if for instance it is linked to libA version 3.0 and on the target system you have libA version 1.0 you will probably have difficulties.
Don't worry about an add-in package manager. In fact Make itself is an excellent package manager in it's own right as are shell scripts.
When I start chapter 6, usually I start backing up my sources using
Code:
make clean
This way, if and when I need to rebuild or reinstall a package all I have to do is run:
Code:
make uninstall
./configure --<options>
make -jX
make install
Along with any other extra mv, cp, etc. commands.
If a file is moved around for the install, I usually will copy the cp commands and re-edit them in a shell script to delete them using the rm command.
Make really is the best package manager truthfully for LFS due to it's design.
As for x11, I actually still utilize the Alan Coopersmith of Sun/Oracle's method:
Quote:
"At Sun, we were using /usr/X11 and plan to stick with it."
There's also the Fakeroot methodology as well that's officially hinted at by the book. I would learn how to use Fakeroot first before you attempt anything like pkgtools, pacman, etc.
I got some help on #lfs-support and I managed to install pkgutils before chapter 6, I am writing the Pkgfiles (they are like this) and as we speak I am here packaging GCC with pkgutils, everything is going fine so far (a lot of trial and error but still). Reaper, the idea of using just Make is bad imo, I am too disorganized and a package manager like pkgutils or pkgtool is perfect for me.
Adding in a package manager is good but take care with scripting especially with post-install scripts.
BLFS did specifically warn against certain installation practices such as a package manager in which some files can't be installed or generated without a post-installation script to work.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.