About
Community
Bad Ideas
Drugs
Ego
Erotica
Fringe
Society
Technology
register | bbs | search | rss | faq | about
meet up | add to del.icio.us | digg it
Go Back   Community > Technology > Everything *NIX
Register FAQ Members List Calendar Today's Posts

Everything *NIX This is a general forum about all forms of *nix. Post your ideas and thoughts on this wonderful OS family. Talk about your personal favorite flavor of *nix and why you think it's so much better than the others. Anything pertaining to *nix and *nix administration should be posted here.

Reply
 
Thread Tools Display Modes
  #1   Add rabbitweed to your ignore list  
Old 2008-06-19, 11:35
rabbitweed rabbitweed is offline
Regular
 
New Zealand Send a message via MSN to rabbitweed
Default source code, binaries and...ports?

Ok, so my understand is this;

source code is written in a "high level language", which needs a compiler to translate it to 0s and 1s that the computer can read.

binaries are precompiled source codes, optimised for different distributions.

ports are...what the fuck are ports? and portage? I have read explinations but they still make no sense as they are aimed at more advanced users than me.
Reply With Quote
  #2   Add oddballz194 to your ignore list  
Old 2008-06-19, 14:59
oddballz194 oddballz194 is offline
Super Moderator
 
In a nuclear crater
Default Re: source code, binaries and...ports?

A port is a version of a program which has been modified and compiled to run on a different system than the one it was written on. For example, a program for x86 Linux can be ported to Mac OS X -- it gets modified and compiled for that other platform.

Note that changing from x86 Linux to Sparc Linux would also be a port, because they have different CPUs.

IIRC, Portage is one specific distro's system to compile your software specifically for the hardware you have installed, for performance, rather than distributing more generic binary versions.
__________________
oddballz194@gmail.com <-- my email
Reply With Quote
  #3   Add Prometheum to your ignore list  
Old 2008-06-20, 00:00
Prometheum Prometheum is offline
Regular
 
01 Send a message via AIM to Prometheum Send a message via MSN to Prometheum
Default Re: source code, binaries and...ports?

Binaries aren't optimized for distros, they're optimized for CPU architectures and instruction sets.

What oddballz said is one definition of "port(s)", but they can also mean something to the effect of packages -- anything that you install, like a program, a library, or documentation.
Reply With Quote
  #4   Add rabbitweed to your ignore list  
Old 2008-06-20, 10:58
rabbitweed rabbitweed is offline
Regular
 
New Zealand Send a message via MSN to rabbitweed
Default Re: source code, binaries and...ports?

Quote:
Originally Posted by oddballz194 View Post
A port is a version of a program which has been modified and compiled to run on a different system than the one it was written on. For example, a program for x86 Linux can be ported to Mac OS X -- it gets modified and compiled for that other platform.
So FreeBSD ports are apps that usually run on linux but have been modified to run on FreeBSD?
Reply With Quote
  #5   Add rabbitweed to your ignore list  
Old 2008-06-20, 10:59
rabbitweed rabbitweed is offline
Regular
 
New Zealand Send a message via MSN to rabbitweed
Default Re: source code, binaries and...ports?

Quote:
Originally Posted by Prometheum View Post
Binaries aren't optimized for distros, they're optimized for CPU architectures and instruction sets.
Then why do so many distros maintain their own binaries?

Does it not really matter what binary you use? rpms seem to work fine on debian based distros, IME.
Reply With Quote
  #6   Add Prometheum to your ignore list  
Old 2008-06-20, 13:36
Prometheum Prometheum is offline
Regular
 
01 Send a message via AIM to Prometheum Send a message via MSN to Prometheum
Default Re: source code, binaries and...ports?

Quote:
Originally Posted by rabbitweed View Post
So FreeBSD ports are apps that usually run on linux but have been modified to run on FreeBSD?
No, like I said, in FreeBSD terminology, "port" means "package".

Quote:
Originally Posted by rabbitweed View Post
Then why do so many distros maintain their own binaries?

Does it not really matter what binary you use? rpms seem to work fine on debian based distros, IME.
They maintain their own packages, not their own binaries. The binaries are probably compiled with roughly similar settings, and yes, you can run RPM's on Debian as long as the architecture matches.

Distros maintain their own packages because it allows for centralization of things known to work for that distro, but also for other reasons. For instance, Ubuntu takes most of its packages from Debian, but it will modifiy some or patch them because Ubuntu isn't as hell-bent on stability. BLAG and GnewSense modify Fedora and Ubuntu packages (respectively) to optimize for Freedom.
Reply With Quote
  #7   Add oddballz194 to your ignore list  
Old 2008-06-20, 16:38
oddballz194 oddballz194 is offline
Super Moderator
 
In a nuclear crater
Default Re: source code, binaries and...ports?

Quote:
Originally Posted by Prometheum View Post
No, like I said, in FreeBSD terminology, "port" means "package".
Now it does, yes, but originally even in BSD it referred to porting software from the main AT&T distribution of Unix so that it would run on the BSD system. It was therefore a set of software source code and the patches that would allow relatively smooth compilation on the new system.
__________________
oddballz194@gmail.com <-- my email
Reply With Quote
  #8   Add Prometheum to your ignore list  
Old 2008-06-21, 03:45
Prometheum Prometheum is offline
Regular
 
01 Send a message via AIM to Prometheum Send a message via MSN to Prometheum
Default Re: source code, binaries and...ports?

Quote:
Originally Posted by oddballz194 View Post
Now it does, yes, but originally even in BSD it referred to porting software from the main AT&T distribution of Unix so that it would run on the BSD system. It was therefore a set of software source code and the patches that would allow relatively smooth compilation on the new system.
Huh, didn't know that. Cool.
Reply With Quote
  #9   Add rabbitweed to your ignore list  
Old 2008-06-21, 07:31
rabbitweed rabbitweed is offline
Regular
 
New Zealand Send a message via MSN to rabbitweed
Default Re: source code, binaries and...ports?

Quote:
Originally Posted by Prometheum View Post
They maintain their own packages, not their own binaries. The binaries are probably compiled with roughly similar settings, and yes, you can run RPM's on Debian as long as the architecture matches.
So what's the difference between a binary and a package?

And if FreeBSD ports are just packages, why does everyone go on about how clever gentoo's portage is and how similar it is to BSD?
Reply With Quote
  #10   Add Prometheum to your ignore list  
Old 2008-06-21, 16:29
Prometheum Prometheum is offline
Regular
 
01 Send a message via AIM to Prometheum Send a message via MSN to Prometheum
Default Re: source code, binaries and...ports?

Quote:
Originally Posted by rabbitweed View Post
So what's the difference between a binary and a package?

And if FreeBSD ports are just packages, why does everyone go on about how clever gentoo's portage is and how similar it is to BSD?
A binary is just a compiled piece of code. Several binaries can make up one program. A package isn't necessarily binary or even a program -- packages can be source files, documentation, images, etc.

FreeBSD ports are just names of programs that are in their ports tree (I don't think the FreeBSD ports tree includes non-program-related data, the documentation is along with the program IIRC). Gentoo has a similar system to FreeBSD because they have a source-based system where the programs are compiled on your machine, and the system is structured similarly to a BSD ports tree.

An example: A program, when installed on Debian, might actually install three packages: the program itself, (foo), the program's library (libfoo), and the programs documentation (foo-doc). On FreeBSD, you could install that by going into the ports tree and typing ``make install'' in the port's directory (cd /usr/ports/sys-apps/foo && make install). This would pull in the library as a dependancy (the same as if you did ``cd /usr/ports/sys-libs/libfoo && make install) and will also download the documentation. On Gentoo, you'd use portage to install the program (emerge foo), it will pull in the library as a dependancy (the same as if you did emerge libfoo) and also download the documentation.

Ultimately, the program gets installed. The key difference is that on BSD and Gentoo, the program is compiled on your own system, allowing it to be tuned to your paticluar CPU.
Reply With Quote
This thread continued for 2 pages in the real archive, 12 posts total - only page 1 survived here.
Reply


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
Forum Jump

 
To the best of our knowledge, the text on this page may be freely reproduced and distributed.
 

totse.com certificate signatures
 
 
About | Community | Bad Ideas | Drugs | Ego | Erotica | Fringe | Society | Technology
Hot Topics