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.
Hey again folks! I have another question for you, has anyone here installed Portage on their LFS system?
I currently have a temporary system I can chroot into, and I decided to try and install Portage. I do realize that it will, sooner or later, turn my LFS into Gentoo, but I'd like to do it anyway. On Gentoo, running setup.py of Portage should be more than enough to set it up (not counting the configuring part).
That's what I did on my LFS, but it doesn't really want to work. There are circular dependencies everywhere, and even if I use the --nodeps option, Emerging gets stuck at configuring the downloaded package (if I even get to that point).
I'm more used to the Pacman of Arch Linux, but I think it would be cool to mess around with another package manager. Does anyone have any ideas? Thank you in advance!
Those setup scripts are typically setup to detect the most popular distros, then use their package manager to install the dependencies. Since you are neither on a popular distro, and do not have a package manager installed with a package repo set up, you are going to have to manually install all the dependencies yourself.
You mean the setup script of Portage, yes? From what I see, Bash and Python 2 are the only hard dependencies. I installed Bash as part of temp system creation process of LFS, and the latest Python just to be sure.
I managed to install Portage but, as I mentioned, the Emerging process of any package gets stuck at configuring the downloaded source tarball. The only package I successfully Emerged so far, was elt-patches. It's probably a matter of configuring everything correctly, but I'm not sure.
Welp, as a desperate attempt at trying to figure it out, I fetched the Gentoo Stage 3 tarball, and extracted it to the root of my LFS. And lo and behold, Emerge works now (I mean, I would be surprised if it didn't - I essentially downloaded an entire system). So now I "just" need to figure out what exactly makes it tick. Thank you for trying to help me out GeekBoy, if you or anyone else out there have any ideas as to how to make Portage work without actually downloading the Stage 3 tarball, I would gladly appreciate it!
EDIT: I think I've done it! I noticed that both Portage and Eselect are available on the AUR, so I booted up a live session of Manjaro and built them.
After the installation, the Emerging process seems to work, it no longer gets stuck at ">>> Configuring source...". Now it actually does that step, with logging and all.
I'll have to clean up my current LFS system and start all over again, and then I'll know for sure. The PKGBUILDs of Arch Linux are pretty easy to understand, so you should be able to simply copy the commands from them (perhaps with some minor tweaks), but I'll be more than glad to share some more info, should anyone need it.
EDIT 2: I got too excited far too early, as it still gets stuck at configuring step. It's definitely missing something, but I have no idea what it is. It doesn't log any errors, unfortunately.
EDIT 3 (most likely final): Jesus, it was missing something alright... The entire /bin folder! Portage was looking for stuff inside /bin! Not /tools/bin, simply /bin. After I made /bin point at /tools/bin it's finally configuring and installing stuff straight into /usr! I can't believe just how dumb I can be sometimes... That was a lesson I'll never forget. I'll think of a way to unlink these two folders some time in the future. I'll be sure to write here, should I need some more assistance, but for now the case is solved. I'll finally be able to sleep peacefully.
Last edited by PepperLegs; 10-13-2019 at 08:34 AM.
Reason: I think it's finally solved.
And how does Portage behave in LFS? Does it work like in Gentoo without any problem?
Does it show previously (before installation of Portage) packages as installed?
Oh dear, I'm afraid I can only guess... I wanted to start my LFS all over again, but, as embarassed as I am to say this, I didn't really do so.
As far as I know, Portage shouldn't complain about not being on Gentoo. It seems to be distro-agnostic. If you decide to use it on your LFS, it will connect to the Gentoo servers and download its ebuilds from there. Unless you make your own repository with ebuilds and tell Portage to use that instead.
As for the packages not installed with Portage, I don't think they will show as such. I assume you mean the packages installed with the good old "./configure, make, make install", am I correct? If so, I don't think any package manager registers such packages as installed. You would have to download a ready ebuild, or write one yourself, and use this to install your desired package.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.