LinuxQuestions.org
Review your favorite Linux distribution.
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 10-24-2008, 07:36 PM   #1
moonfrog
Member
 
Registered: Oct 2008
Location: San Diego County, CA
Distribution: LFS, Gentoo
Posts: 64

Rep: Reputation: 23
Patch Coreutils?


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?
 
Old 10-24-2008, 11:23 PM   #2
ProtoformX
Member
 
Registered: Feb 2004
Location: Canada
Distribution: LFS SVN
Posts: 334

Rep: Reputation: 34
Well you can recompile things in a running system, but keep in mind that anything compiled against coreutils should be / has to be recompiled
 
Old 10-25-2008, 12:08 AM   #3
moonfrog
Member
 
Registered: Oct 2008
Location: San Diego County, CA
Distribution: LFS, Gentoo
Posts: 64

Original Poster
Rep: Reputation: 23
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.
 
Old 10-25-2008, 02:02 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.

Last edited by jschiwal; 10-25-2008 at 02:05 AM.
 
Old 10-25-2008, 12:31 PM   #5
ProtoformX
Member
 
Registered: Feb 2004
Location: Canada
Distribution: LFS SVN
Posts: 334

Rep: Reputation: 34
Quote:
Originally Posted by jschiwal View Post
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.
 
Old 10-25-2008, 08:15 PM   #6
moonfrog
Member
 
Registered: Oct 2008
Location: San Diego County, CA
Distribution: LFS, Gentoo
Posts: 64

Original Poster
Rep: Reputation: 23
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.

Thanks for your responses.
 
Old 10-25-2008, 11:36 PM   #7
ProtoformX
Member
 
Registered: Feb 2004
Location: Canada
Distribution: LFS SVN
Posts: 334

Rep: Reputation: 34
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
anyone installed coreutils 6.3? ygloo Linux - General 1 10-28-2006 07:33 PM
possible coreutils bug (tr) mebaro Linux - General 3 06-15-2006 10:04 AM
info about coreutils fastmach Linux - Newbie 2 01-02-2006 01:02 PM
coreutils version. bruse Linux - Newbie 2 08-27-2005 04:59 AM
coreutils-5.0 error rahul_jain_9684 Linux From Scratch 0 09-27-2003 12:51 AM

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

All times are GMT -5. The time now is 07:50 AM.

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