Date: Tue, 5 Feb 2002 23:05:17 +1100 From: Sue Blake <sue@welearn.com.au> To: Bsd Neophyte <bsdneophyte@yahoo.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: i still don't understand what cvsup does... entirely Message-ID: <20020205230517.B46491@welearn.com.au> In-Reply-To: <20020205103641.25042.qmail@web20109.mail.yahoo.com>; from bsdneophyte@yahoo.com on Tue, Feb 05, 2002 at 02:36:41AM -0800 References: <20020205103641.25042.qmail@web20109.mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Feb 05, 2002 at 02:36:41AM -0800, Bsd Neophyte wrote: > > I've read the section on cvsup in both the handbook and in Greg Lehey's > book... but it still confuses me. Been there, done that, burned the dictionary. We tend to reuse some words for several meanings. In this case, I think the two uses of "sources" has you confused, and it's not your fault. > Lemme explain it the way I understand it and then you guys can correct me > and/or add information (actually i'd really appreciate details). Hey that's a really good idea. I can see exactly what you're going through. > First, can someone distingusih between ports and between sources? Sources refers to the source code that is used to build a program that runs. Normally when talking about cvsup we're talking about the sources that build the operating system. Most of the time, unqualified use of the word will mean the OS sources. Ports are the stuff under /usr/ports that enable each optional program to be downloaded and built in a manner that suits FreeBSD. What gets downloaded and built? The sources (that word!!) for the port. The only way you get _these_ sources is by typing make <something> in the port directory for the program you want. (Or by downloading it separately, but why bother.) You have on your system (1) the running operating system files -- /usr/bin and so on and so on (2) the sources (for the operating system and kernel) -- /usr/src ... (3) the ports tree -- /usr/ports/whatever/whatever Some people only have (1), since the system runs fine without (2) or (3). Some people also have (4) the complete CVS repository (huge!), containing historical details of every version of every file of FreeBSD since it was born. From that you can _extract_ (= check out) all of the sources you need to build your system, for any recent or ancient version of any branch of FreeBSD. Overkill. But hardly anyone (except developers) does it that way. Most of us use the respository that's sitting on a big FreeBSD server somewhere and update our sources (2 above) across the Internet using cvsup. WARNING: if you're having any doubts about understanding, keep well away from doing or reading about doing the full repository thing. It'll confuse the hell out of you while everything else is new and strange, I guarantee it, and won't help you build or upgrade system in any direct way. When you update your sources (2 above) you can opt to also update your ports tree. Or you can just do the ports tree alone. That gets you everthing you need to build each extra program for FreeBSD, except the program's source code (different meaning!). The sources for the port get downloaded automatically when you try to build them, so you don't have to worry, you can pretend you didn't even notice, and you won't need to utter that confusing s word in the context of ports. When you install a port from the ports tree, the make program will go fetch the sources (different meaning) for the port, and place them (as an archive file) in the distfiles directory, then unarchive them into the relevant part of the ports tree for building. All of that happens behind the scenes while you type something like 'make' in the ports directory for the program you want to install. But if you snoop around, you'll see the sources (ports-meaning of the word) archived up in the distfiles directory after you've finished, and spread out all over the place under the /usr/ports/section/myprogram directory. Sources sources sources... but not what most people mean most often when they just say "sources" (2 above). > CVSUP doesn't actually download the port or source to > your system, it merely gives a pointer where you can download the source > or port. Oh it really does download "the port", i.e. the collection of little files that are needed to help build the port for FreeBSD. In these files there is a pointer to where _the_make_program_ can get the port sources from, if it can't find the archive sitting in distfiles directory already. > One has the ability to install a port For clarity, delete these two words: > or source > by going to the specific > directory and typing "make clean && make && make install" (I think I've > left something out in that command string). Yes. Everyone will tell you a different version of the make command :-) I type 'make' and if that works I then type 'make install'. Better, find a document that makes sense to you, and do whatever it says when you build a port. Stick to it. After you have much confidence and experience, you can begin to impress/confuse people with more elaborate methods that give no document for them to fall back to when the results are unexpected. What you're doing here is installing a new optional program. Behind the scenes its source code is fetched and manipulated with help from those tiny files already in the ports tree, but all you know is that after a minute or so you can type "solitaire" and play it! > When you run cvsup does it automatically download the latest release > sources? Or is there a special method you need to download the these > sources? It downloads, or rather updates, the OS sources (2 above) for a particular version or branch of FreeBSD. Which one? The one you told it to get for you. How do you ask for the one you want? It's late and I don't want to risk telling you the wrong answer. I think it's all spelled out in the handbook, and if this email starts to make sense then you might find that the instructions that you've already seen become easier to read and understand. If I've got some of this wrong, others will reply and correct my explanation and cc to you. And you might have follow-up questions to send back to freebsd-questions for more clarification. Please feel free to do so. You're the umteenth person I've met with this type of confusion, so we'd better sort it out for the silent types, too. -- Regards, -*Sue*- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020205230517.B46491>