LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 10-02-2013, 08:06 PM   #1
vdubster
LQ Newbie
 
Registered: Oct 2013
Posts: 2

Rep: Reputation: Disabled
Question source code vs others?


Hello everyone. I am planning on installing slackware distribution in a very near future. I was wondering what is a source code download. On their website I was trying to figure out what to download to get started. There are a few options and a couple of them say 'source code'. Some offer a full download without a source code. So what exactly is it? I have been using linux for a while but never really got under the hood of it so I just want to go all out and install something like slackware to gain knowledge about it. So anyway.. what is a source code?
Thank you everyone
 
Old 10-02-2013, 08:55 PM   #2
NoStressHQ
Member
 
Registered: Apr 2010
Location: Lausanne - Switzerland ( Bordeaux - France / Montreal - QC - Canada)
Distribution: Slackware Leet - 32/64bit
Posts: 271

Rep: Reputation: 87
Hello, Welcome to Slackware.

"On their website" ? Are you talking about slackware.com ?

Slackware is distributed already compiled, source code is available but it's often removed from DVD isos in order to save some space.

Does it answer your question ?

Bests.

Garry.
 
Old 10-02-2013, 08:57 PM   #3
ReaperX7
Senior Member
 
Registered: Jul 2011
Distribution: LFS-SVN, Slackware-14.1, PCBSD-10.0
Posts: 2,406
Blog Entries: 14

Rep: Reputation: 584Reputation: 584Reputation: 584Reputation: 584Reputation: 584Reputation: 584
Source code packages are basically the original developer released source code provided to build the package from scratch.

Slackware and many distributions offer what are called pre-built Binary packages to simply download and install.
 
Old 10-02-2013, 08:58 PM   #4
vdubster
LQ Newbie
 
Registered: Oct 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
well i was just wondering what the 'source code' is in the first plays. I couldn't find the definition of the source code for the distros only for the packages. I understand that the source code is where you download a package and compile it yourself. But what is a distro source code? Is that where you have to compile every singe question? Hopefully this clarifies. I'm having a hard time even putting this question to work because I am clueless

hmmm... i think Reaper's answear pretty much answeared. But if there is anyone else that could add then please do so. Thank

Last edited by vdubster; 10-02-2013 at 08:59 PM.
 
Old 10-02-2013, 09:03 PM   #5
NoStressHQ
Member
 
Registered: Apr 2010
Location: Lausanne - Switzerland ( Bordeaux - France / Montreal - QC - Canada)
Distribution: Slackware Leet - 32/64bit
Posts: 271

Rep: Reputation: 87
Haha no... Source code means the "human readable code" that is written by developers before being processed (compiled) into binary machine code. So source code is some text file written in some "syntax" (like C/C++...). But machine doesn't understand "raw text", it means nothing for it. So we need to translate this human readable text file for the machine to be able to "understand" it (execute machine commands).

That's all. So you always have "source code" somewhere at the beginning of ANY program on ANY computer (is it you watch, your smartphone, Windows, Linux, MacOS, Photoshop, a Game,...)

For mainstream usage, and ease of use (and commercial/industrial purposes, like "closed source"), you often get already compiled (pre-build) binaries of programs.

Although on UNIX there is a tradition to have "open source" (it's not reduced to UNIX but it's a philosophy here), and you can recompile the program tweaking it to your need, or even "fix it" if you have the skills to do that.

Is it more clear ?

Cheers.
 
Old 10-02-2013, 09:42 PM   #6
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,010

Rep: Reputation: 352Reputation: 352Reputation: 352Reputation: 352
Quote:
Originally Posted by NoStressHQ View Post
Haha no... Source code means the "human readable code" that is written by developers before being processed (compiled) into binary machine code. So source code is some text file written in some "syntax" (like C/C++...). But machine doesn't understand "raw text", it means nothing for it. So we need to translate this human readable text file for the machine to be able to "understand" it (execute machine commands).

That's all. So you always have "source code" somewhere at the beginning of ANY program on ANY computer (is it you watch, your smartphone, Windows, Linux, MacOS, Photoshop, a Game,...)

For mainstream usage, and ease of use (and commercial/industrial purposes, like "closed source"), you often get already compiled (pre-build) binaries of programs.

Although on UNIX there is a tradition to have "open source" (it's not reduced to UNIX but it's a philosophy here), and you can recompile the program tweaking it to your need, or even "fix it" if you have the skills to do that.

Is it more clear ?

Cheers.
NoStressHQ pretty well summed it up, source code is the actual code written by the programmer. I might add, that some programs, particularly larger ones might have optional features that can be enabled/disabled at compile time, and different 'distributions' of Linux sometimes package the software with different features enabled/disabled in their releases, so sometimes to enable a certain feature that wasn't enabled by your distribution you can install the program from source.

the beauty of source code is, unless it's in a low level language like assembler which is machine spescific, a source code distribution can be installed on ANY platform/architecture that has the proper libraries by simply compiling the software and installing it.
 
Old 10-02-2013, 10:39 PM   #7
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware-14.0 on a Lenovo T61 6457-4XG
Posts: 3,643

Rep: Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828
Three more things:
  1. Most distributions, including Slackware, are "turnkey" ones, i.e. software is shipped already compiled or "built", so you just have to type a program's name to run it. In a few other ones (Gentoo comes to mind) software is shipped as source files, that you first compile or build yourself (but they provide tools to help you doing that). The latter are called "source" distributions.
  2. In Slackware's case, in addition to already built packages, all their source files are provided in a specific directory of te ftp site (and mirrors) whose name is /source. This allows you to re-build a package (that contains one or several programs), as in its subdirectory you will find not only source code but also the tools (or SlackBuilds) needed to re-build the package with, say, a newer version of the source files or different settings.
  3. But the /source directory is pretty heavy, so if you don't intend to compile any program and lack space on a distribution media or hard disk to host it, you can just not include or download it.

Last edited by Didier Spaier; 10-03-2013 at 03:46 AM. Reason: Typos
 
Old 10-02-2013, 11:42 PM   #8
ReaperX7
Senior Member
 
Registered: Jul 2011
Distribution: LFS-SVN, Slackware-14.1, PCBSD-10.0
Posts: 2,406
Blog Entries: 14

Rep: Reputation: 584Reputation: 584Reputation: 584Reputation: 584Reputation: 584Reputation: 584
There's several types of source code that are out there. This isn't all of them.

Vanilla - Original unmodified and unpatched source code released by the developer.

Distribution Specific - Patched and/or modified sources specifically used by a distribution of GNU/Linux. Usually is released as a Vanilla package with various patch files (.patch, .diff, etc).

Branched/Forked - Source code that was taken by a different developer and branched into a separate project usually containing various patches and reworking of the code to work on different platforms, operating systems, and environments.
 
Old 10-03-2013, 12:20 AM   #9
kikinovak
Senior Member
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: Slackware, Slackware64
Posts: 1,410

Rep: Reputation: 630Reputation: 630Reputation: 630Reputation: 630Reputation: 630Reputation: 630
Quote:
Originally Posted by vdusbter View Post
Hello everyone. I am planning on installing slackware distribution in a very near future. I was wondering what is a source code download. On their website I was trying to figure out what to download to get started. There are a few options and a couple of them say 'source code'. Some offer a full download without a source code. So what exactly is it? I have been using linux for a while but never really got under the hood of it so I just want to go all out and install something like slackware to gain knowledge about it. So anyway.. what is a source code?
Thank you everyone
Let's say you want an apple cake. The source code is basically flour, sugar, milk, eggs, apples and whatever you put in the cake. The *.SlackBuild file in every source directory is the receipt. And the resulting binary *.txz package, well, it's your cake. Some folks (like me) use the source code because they like to modify the receipt (add cinnamon, use less sugar). But this also means you have to get your hands dirty.

Cheers,

Niki
 
1 members found this post helpful.
Old 10-03-2013, 01:41 AM   #10
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 1,636

Rep: Reputation: 730Reputation: 730Reputation: 730Reputation: 730Reputation: 730Reputation: 730Reputation: 730
Quote:
Originally Posted by vdusbter View Post
But what is a distro source code?
In addition to what the others have said, each distro does have some of its own source code. In addition to bundling the source for applications it includes, distro specific source code controls things like making the installable packages and creating the distro's installer.

For example, if you look at the Slackware source directory for a program like gzip, you would find the source package 'gzip-1.5.tar.xz' (needed by any distro that wants to include this version of gzip). Alongside this file you will also find 'gzip.SlackBuild'. The .SlackBuild file is distro specific source code (only Slackware and Slackware derivative distress will have it). This file controls the build and packaging process of gzip, such that you end up with an installable Slackware package, e.g. 'gzip-1.5-x86_64-1.txz'.

No matter what type of source code we are talking about, it is provided so that you as a user can make changes. These changes could be big, like fixing bugs or adding new features (often requiring programming knowledge) or relatively small. A small change might be tweaking the SlackBuild to package a newer version of an application so that you can upgrade this application even if the distro maintainer does not yet provide a newer package him/herself. This is usually a small change, as typically you can do this by changing a single variable and saving a newer version of the application's own source package alongside the SlackBuild script.
 
Old 10-03-2013, 01:44 AM   #11
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 1,636

Rep: Reputation: 730Reputation: 730Reputation: 730Reputation: 730Reputation: 730Reputation: 730Reputation: 730
Quote:
Originally Posted by kikinovak View Post
The *.SlackBuild file in every source directory is the receipt.
I think you meant "recipe".

Additionally, I would also argue that all source code (*.SlackBuild files included) are recipes, rather than ingredients. I don't think you can call source code ingredients because most people do not modify raw ingredients prior to starting the cooking process†. This happens with source code.

The ingredients that the recipe (source code) uses to produce an application are a little harder to define (at least for me, right now). Perhaps the ingredients are libraries that you link to, or maybe the analogy just falls down.

P.S. Other applications involved in the build process (e.g. patch, make, gcc etc.) are tools like knives, mixing bowls, ovens etc.

†You do not redesign a raw egg (genetic modification notwithstanding) prior to using it in the baking process but you may alter or rewrite source code prior to building it.

Last edited by ruario; 10-03-2013 at 02:17 AM. Reason: Added thoughts on all source code being recipes; further clarifications and thoughts; corrected spelling
 
1 members found this post helpful.
Old 10-03-2013, 02:08 AM   #12
NoStressHQ
Member
 
Registered: Apr 2010
Location: Lausanne - Switzerland ( Bordeaux - France / Montreal - QC - Canada)
Distribution: Slackware Leet - 32/64bit
Posts: 271

Rep: Reputation: 87
Quote:
Originally Posted by ruario View Post
I think you meant "recipe".

Additionally, I would also argue that all source code (*.SlackBuild files included) are receipes, rather than ingredients. I don't think you can call source code ingredients because most people do not modify raw ingredients prior to starting the cooking process. This is possible with source code.

The ingredients that the recipe (source code) uses to produce an application are a little harder to define (at least for me, right now). Perhaps the ingredients are libraries that you link to, or maybe the analogy just falls down.

P.S. Other applications involved in the build process (e.g. patch, make, gcc etc.) are tools like knives, mixing bowls, ovens etc.
If you go into this kind of comparisons, I think the best choice is music...
- source code is the "music score"
- the compiler is the musician's "solfčge" knowledge, transcription ability
- the execution is the musician's instrument playing, is it while reading the score (interpreter) or in his memory (brain cache ) as compiled/byte code.
- the application, processing is the music/sound emit by the musician and his instrument(s).

Well it's always a shortcut so it's hard to do an exact comparison.

BTW, you also misspelled "are receipes" .

Cheers.
 
2 members found this post helpful.
Old 10-03-2013, 02:11 AM   #13
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,724

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
I think you meant "recipe". Some languages use the same word for what in English becomes both receipt and recipe. German and Spanish are examples.
 
2 members found this post helpful.
Old 10-03-2013, 02:16 AM   #14
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 1,636

Rep: Reputation: 730Reputation: 730Reputation: 730Reputation: 730Reputation: 730Reputation: 730Reputation: 730
Quote:
Originally Posted by NoStressHQ View Post
If you go into this kind of comparisons, I think the best choice is music...
- source code is the "music score"
- the compiler is the musician's "solfčge" knowledge, transcription ability
- the execution is the musician's instrument playing, is it while reading the score (interpreter) or in his memory (brain cache ) as compiled/byte code.
- the application, processing is the music/sound emit by the musician and his instrument(s).

Well it's always a shortcut so it's hard to do an exact comparison.
Yep, I like this better!

Quote:
Originally Posted by NoStressHQ View Post
BTW, you also misspelled "are receipes"
Always a problem for me when I try and correct spelling. I am bound to make a mistake myself as I am a terrible speller!

Quote:
Originally Posted by gnashley View Post
Some languages use the same word for what in English becomes both receipt and recipe. German and Spanish are examples.
Interesting, thanks for the insight!
 
Old 10-03-2013, 05:49 AM   #15
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: Slackware®
Posts: 10,882
Blog Entries: 1

Rep: Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307Reputation: 1307
Member Response

Hi,

I will add from Gnu perspective;
Quote:
What is Free software;
The Free Software Definition
The free software definition presents the criteria for whether a particular software program qualifies as free software. From time to time we revise this definition, to clarify it or to resolve questions about subtle issues. See the History section below for a list of changes that affect the definition of free software.
“Free software” means software that respects users' freedom and community. Roughly, the users have the freedom to run, copy, distribute, study, change and improve the software. With these freedoms, the users (both individually and collectively) control the program and what it does for them.
When users don't control the program, the program controls the users. The developer controls the program, and through it controls the users. This nonfree or “proprietary” program is therefore an instrument of unjust power.
Thus, “free software” is a matter of liberty, not price. To understand the concept, you should think of “free” as in “free speech,” not as in “free beer”.
A program is free software if the program's users have the four essential freedoms:
  • The freedom to run the program, for any purpose (freedom 0).
  • The freedom to study how the program works, and change it so it does your computing as you wish (freedom 1). Access to the source code is a precondition for this.
  • The freedom to redistribute copies so you can help your neighbor (freedom 2).
  • The freedom to distribute copies of your modified versions to others (freedom 3). By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this.
A program is free software if users have all of these freedoms. Thus, you should be free to redistribute copies, either with or without modifications, either gratis or charging a fee for distribution, to anyone anywhere. Being free to do these things means (among other things) that you do not have to ask or pay for permission to do so.
You should also have the freedom to make modifications and use them privately in your own work or play, without even mentioning that they exist. If you do publish your changes, you should not be required to notify anyone in particular, or in any particular way.
The freedom to run the program means the freedom for any kind of person or organization to use it on any kind of computer system, for any kind of overall job and purpose, without being required to communicate about it with the developer or any other specific entity. In this freedom, it is the user's purpose that matters, not the developer's purpose; you as a user are free to run the program for your purposes, and if you distribute it to someone else, she is then free to run it for her purposes, but you are not entitled to impose your purposes on her.
The freedom to redistribute copies must include binary or executable forms of the program, as well as source code, for both modified and unmodified versions. (Distributing programs in runnable form is necessary for conveniently installable free operating systems.) It is OK if there is no way to produce a binary or executable form for a certain program (since some languages don't support that feature), but you must have the freedom to redistribute such forms should you find or develop a way to make them.
In order for freedoms 1 and 3 (the freedom to make changes and the freedom to publish the changed versions) to be meaningful, you must have access to the source code of the program. Therefore, accessibility of source code is a necessary condition for free software. Obfuscated “source code” is not real source code and does not count as source code.
Freedom 1 includes the freedom to use your changed version in place of the original. If the program is delivered in a product designed to run someone else's modified versions but refuse to run yours — a practice known as “tivoization” or “lockdown”, or (in its practitioners' perverse terminology) as “secure boot” — freedom 1 becomes a theoretical fiction rather than a practical freedom. This is not sufficient. In other words, these binaries are not free software even if the source code they are compiled from is free.
One important way to modify a program is by merging in available free subroutines and modules. If the program's license says that you cannot merge in a suitably licensed existing module — for instance, if it requires you to be the copyright holder of any code you add — then the license is too restrictive to qualify as free.
I suggest you also look at these links from Slackware®-Links;
Quote:
[GNU - Information/GPL - Information]
Hope this helps.
 
2 members found this post helpful.
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GPL code vs my private source code???? DennisC31 Linux - General 7 03-08-2011 10:24 AM
Where in the source code do I find the source for the Cisco FCoE HBA Drvr? madcowtricks Slackware 6 01-27-2011 03:00 PM
LXer: Source code released for Diaspora, an open source, distributed alternative to Facebook LXer Syndicated Linux News 1 09-17-2010 04:53 AM
[SOLVED] make use of gcc source code to parse c++ source file famsinyi Programming 14 10-19-2009 06:47 PM
[SOLVED] why I couldn't find the source code of printf function in glibc source? famsinyi Programming 5 09-21-2009 09:06 AM


All times are GMT -5. The time now is 07:03 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration