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.
In SVN there's a new patch for Coreutils that replaces an old patch.
I'm a source code newbie so these may be dumb questions but...
Is there a way to install the patch to my system, and if so should the old one be removed first?
If I have to recompile Coreutils can I do it inside the running system, or should I replace the tools directory and chroot in from another Linux like when I built it?
Also, should I uninstall the original Coreutils first to get rid of the old patch?
Thanks ProtoformX, in one sentence you answered alot of questions I had.
Looking at the LFS build list Coreutils is near the beginning of the install order, which (to me) means that any number of packages could be compiled against it.
Plus I've already added a full KDE, Amarok, and Firefox that I'm guessing could be problems as well.
At my skill level it sounds like it would be easier to build another LFS.
I think you are confusing coreutils with binutils or glibc. Coreutils contains the core utilities such as cp, ls, mkdir, cut, cat, etc. It doesn't contain libraries or headers that you use to build other packages with. You would have a lot of work ahead of you if you updated glibc. It is at the beginning of the list because you need these programs to run scripts. Imagine trying to do without the "cp" or "mv" command.
You asked about patches but didn't provide version information. You apply patches sequenctially. If you started with version 6.09 and patched to 6.10. The more recent patch is probably from 6.10 to 6.11 instead of 6.09 to 6.11. If this is the case you would apply the 6.11 patch. There should be a README to consult. If you are starting with a 6.09 tarball, you will most likely need to apply the 6.10 patch and then the 6.11 patch.
You won't need to (or want to) uninstall the original version, but you will want to run "make distclean" in the source directory. This will remove the old object files.
I think you are confusing coreutils with binutils or glibc. Coreutils contains the core utilities such as cp, ls, mkdir, cut, cat, etc. It doesn't contain libraries or headers that you use to build other packages with. You would have a lot of work ahead of you if you updated glibc. It is at the beginning of the list because you need these programs to run scripts. Imagine trying to do without the "cp" or "mv" command.
The only problem with doing that is if a newer coreutils adds or takes away any parameter switches some older software that depends on coreutils might not work anymore, this is determined at compile time of the software and probly has a work around if your version of coreutils doesn't support a certain switch, thus it is imporantant in order to insure you have a working stable environment you wouldn't recompile single package that is part of the core.
This isn't like a patch meant to be applied to an existing distro, this patch modifies coreutils before it's initial build. It also changes the LFS build version, so the patch it replaces is treated as if it never existed.
If coreutils contains cp and mkdir and I recompile from the running system wouldn't it "short circuit" during the make install?
I don't really care about the patch itself, I just thought this would be a good chance to learn how to update my LFS's. It looks like the safe way to update a package can vary wildly depending on which one, anywhere from "just do it" to "don't touch it". I think I'm trying to leap way too far forward for now.
No it won't shortcircut, when linux runs a program it puts it into memory first, it will not try to run it off the disk, since cp or mkdir are already in memory nothing will happen, in any mediaplayer play a song and quickly delete the file it's playing.. you will notice something.. it plays until the very end of the song... this is because it's small enough to be cached in memory, the same thing works for small commands, you can copy a different version of cp with cp, it will over write itself without question because the cp you executing is already in memory, so when it is over written nothing happends because that command is still there.
Keep in mind you can't "make uninstall" because the makefile may use coreutils in the script, this is where package management comes into play, creating a fake root compiling the packages and installing it in a fake root fixes this problem, because now i can build the package, uninstall the old one and reinstall the new one because I have already built the new one, all i need to do is install it now.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.