# Few BASIC Questions



## bindicus (Oct 26, 2009)

Dear All,
Could I get some straight answers to these few basic questions?:

1. When freebsd 7.2 is installed through a single dvd which has all packages and ports and when all are installed[all packages are added succesfully as IT says](packages,ports etc), does this mean that Xorg is already installed? or should we built from packages with these commands?

# cd /usr/ports/x11/xorg
# make install clean

2. So when the system says packages are added succesfully DOES IT mean to say that they are installed? (so we can proceed with configuration?)

3. What I understand from Handbook is when we install packages(which are binary) they are automatically extracted/unzipped and installed. --- Did I got it right?

4. And also I do understand that when I issued make command on some files IT does the same thing(they are automatically extracted/unzipped and installed) -- Am I Right?

Sorry for overlapping Questions. But they add clarity for new users like me. And sorry again if my questions seems silly for anyone.

Thank you for your help.


----------



## Zare (Oct 26, 2009)

> 1. When freebsd 7.2 is installed through a single dvd which has all packages and ports and when all are installed[all packages are added succesfully as IT says](packages,ports etc), does this mean that Xorg is already installed?



Yes.



> or should we built from packages with these commands?



No, that commands are used for building from ports. Ports is a repository which tracks information for available programs in *source* form. Thus, when you do "make install clean" in port directory, in 90% of the cases automatic system will download source files (or use preexisting ones located in /usr/ports/distfiles), resolve dependencies, apply patches to sources, then compile the programs *on-site*, and then install them.

On the other hand, pkg_add installs programs which are already compiled, thus you won't be hassled with extra time for compilation, but compilation can be useful for compile-time tunings.

Thus, if you don't require newer X.org version which can be compiled from ports after you synchronize your ports tree with current, pkg_add-ing archives from release DVD or whatever will do just fine.



> 2. So when the system says packages are added succesfully DOES IT mean to say that they are installed? (so we can proceed with configuration?)



Yes.



> 3. What I understand from Handbook is when we install packages(which are binary) they are automatically extracted/unzipped and installed. --- Did I got it right?



Yes.



> 4. And also I do understand that when I issued make command on some files IT does the same thing(they are automatically extracted/unzipped and installed) -- Am I Right?



"make" just interprets the Makefile located in current directory. And you can put all sorts of things in there. You can even make a Makefile that will start deleting everything from your freeBSD slice if you run it as root.

However, don't be frightened  Those things don't happen. In reality, running a Makefile with make command in port directory will download sources, resolve dependencies, configure compile-time options, apply patches and compile the program. The binary output of compilation (eg. the programs and libraries) and other auxiliary stuff (docs, conf files, icons, whatever) will be located inside a subdirectory of port directory called "work". It won't install it to system predefined locations, unless you run "make install" afterwards. Then those files will be copied to respective locations so you can run the program seamlessly. If you don't need extracted sources and files that were "made" inside "work", you run make clean to clear it up. It will also clean up all dependencies that were used for target program.

Thus, running a "make install clean" inside port directory will download, compile, install, and clear all compile-time stuff.

Regarding generic source packages that you compile "manually" (outside of ports tree), you'll need to read documenatation of the source package. In most cases, you'll need to run "configure", then "make", then "make install" to configure, compile and install the program. However, i've seen source packages that just require "make" to do all the stuff, or require more steps than three above, etc. 



> And sorry again if my questions seems silly for anyone.



No they don't. They look like questions of BSD beginner, but a beginner that wants to really understand what's it all about. And from one that actually read some chapters from the Handbook.



> Thank you for your help.



No problem, anytime.


----------

