LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (http://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   Source Code-installation-Slackware 9.1 (http://www.linuxquestions.org/questions/slackware-installation-40/source-code-installation-slackware-9-1-a-135896/)

lmellen 01-17-2004 09:59 PM

Source Code-installation-Slackware 9.1
 
:confused: Very pleased with Slackware-good installation. Purchased 4 cd set for the source code cd's.How do you install the source code, and once installed how do you find it? Basically a newbie question, but I could use the help. Thanks-- lmellen

hypexr 01-18-2004 12:43 AM

So, some of the packages from the cd you want to install from source?
I can't remember the directory structure for slack but for example, say we want to install ispell
the source file will be someplace like /somedir/source/ap/ispell
copy the ispell-*.tar.gz file into your home directory: cp ispell-*.tar.gz ~
then you can go to your home directory: cd~
extract the archive: tar zxvf ispell-*.tar.gz
move to that directory and there will usually be an INSTALL or other text file with some instructions. It will probably say to execute the commands:
./configure
make
make install

This will detect your system setting, compile the program, and make install will copy the files to the appropriate place on your system. It will probably put the executables in a directory that is you PATH so you executing it will be done by typing in the name from any directory. Ex. ispell would start up ispell. If want to know where it puts the files at you can pipe the make install text into a file and view it later to see where it copied files to: make install > ispell.ins.log
You can also use the find command to find where it puts stuff.. knowing that the package is called ispell you could run:
find / -name 'ispell*' -print
and that will list the files starting with ispell.

lmellen 01-18-2004 08:57 AM

Thanks for the reply hypeXR, but that's not the problem. I installed Slackware on a IBM t22 Thinkpad about a week ago. The installation seems to be good installation.-- Is not Linux supposed to be "open source"? When I purchased the 4 cd set from Slackware 2 cds were for installing the OS, and the other 2 were for the source code. I thought that meant you could see the code that actually built the OS. I might be wrong, but the last 2 cds are the ones I can't seem to install. Again, I'm still basically a newbie and might not know exactly what I'm talking about! Thanks for the help--lmellen

hypexr 01-18-2004 01:42 PM

I am still not sure about your question, but I will give one more try at an answer. :)
Slackware does not let you do an install where it takes the source code and compiles it all to make the system (distributions like Gentoo let you do this). This can only be done if you install the base system and then take each package off of the cd that you want and compile it like I mentioned in the last post.
The source code on the 2 cds is the source code for linux and all of the packages that Slackware distributes with it. If you wanted to get the source code to see it, change it, or compile it just grab the .tar.gz file extract it and you are good to go. :)

lmellen 01-18-2004 09:33 PM

Greetings HypeXR, thanks for the reply. Apparently my assesment was correct, I don't know what I'm talking about. I thought the source code cd was for viewing the code. You're saying it's for installing packages from source. Again, my mistake. I thought there was a way to access the code on the OS from command line.I thought you had to downloaded the code from the cd's first. Anyway, I don't know how to extract the .tar files. I assume their on the Source Code CD? If you have the time and you don't mind walking me through this I'd appreciate it. Thanks again, lmellen

Aussie 01-19-2004 06:33 AM

The source code cd's certanly do contain the source code, the source code used to build the slackware version that they came with - however - the source code is contained in compressed archives, just as they were downloaded from the net, along with every thing else you need to customise the way they were built into slackware packages, have a look at file:/mnt/cdrom/source/a/cups in konqueror as an example, we have 5 files,
1) cups-1.1.19-source.tar.bz2
2) cups-samba-1.1.18.tar.gz
3) cups.SlackBuild
4) doinst.sh.gz
5) slack-desc
The first file, cups-1.1.19-source.tar.bz2, is the cups source code v1.1.19 as it is when it was downloaded - a 'vanilla' source as it were. Next we have some cups samba windows drivers in cups-samba-1.1.18.tar.gz, the third file is the slackware build script, open this in a text editor to see how it does what it does, you can even customise them - I sometimes modify them to build for a specific processor. The fourth file, doinst.sh.gz, is a gzipped script of things that have to be done when the slackware package is installed, you'd see this file (and the next) if you opened a slackware .tgz package from the first or second disk. The last file, slack-desc, is simply a text file that contains the description of the completed slackware package as seen during the install....breifly :-)

So, to view the source code for cups-1.1.19 you need to extract the files contained in cups-1.1.19-source.tar.bz2 to your home directory and look at them in the editor of your choice.

lmellen 01-19-2004 09:51 PM

Thanks Bern, but I couldn't find the files you mention. I cd to /mnt/cdrom, use ls -a and all I get is the 2 hidden files? How do you get to cups? Sorry, but I am a newbie. Thanks--Larry

hypexr 01-20-2004 02:31 AM

Quote:

Originally posted by lmellen
Thanks Bern, but I couldn't find the files you mention. I cd to /mnt/cdrom, use ls -a and all I get is the 2 hidden files? How do you get to cups? Sorry, but I am a newbie. Thanks--Larry
I think that your cdrom many not have been mounted.
When you are in /mnt type
Code:

mount ./cdrom
Then the directories described should now appear in cdrom.

To extract the cups-1.1.19-source.tar.bz2 like Aussie described you need to run two programs one to uncompress and one to extract:
uncompress: bunzip2 cups-1.1.19-source.tar.bz2
extract: tar xvf cups-1.1.19-source.tar

or the tar command also has an option to uncompress before it extracts. This will do the same thing:
tar jxvf cups-1.1.19-source.tar.bz2

This will create a new directory probably called cups-1.1.19 or something. You can go to that directory and the source files will be in there or in a different directory from there for you to get a look at. :)
Best of luck!

lmellen 01-20-2004 08:10 PM

Thanks again HypeXR but I think I'm too much of a newbie. I understand the uncompress and extraction code, but I still can't get to the source code on the cd. If I start from my home directory and cd to /mnt/cdrom, then type mount ./cdrom & enter I get " can't find ./cdrom in /etc/fstab or /etc/mtab. Again, I'm a newbie, so please keep it basic, and again I do appreciate the help.--Thank you Larry

Berhanie 01-20-2004 09:48 PM

Imellen, please do this:

1. log in as root (you should see "#" as your prompt).

2. run the following command (the "#" represents your prompt and is not part of the command):

# cd

(this will put you in /root in case you're not already there and keep
you away from /mnt for the moment).

3. run the following command:

# mount /mnt/cdrom

(this should mount your cdrom).

4. now cd to /mnt/cdrom and do your thing.

lmellen 01-21-2004 08:23 PM

Berhanie- Thank you, that worked well. That's what I needed to know!
As far as Aussies instructions I get as far as /mnt/cdrom/source and cannot find the "a" directory? I tried to open a man file-"man-1.51.tar.bz2" using tar jxvf and it would'nt let me do it. So how do I get to cups?
Also,(dumb newbie question)- How do you unmount the cdrom?

Thank You- Larry

Aussie 01-21-2004 09:02 PM

First we open the cdrom,
Code:

bern@beast bern$ eject /dev/cdrom
Then we close it after placing slackware disk three in,
Code:

bern@beast bern$ eject -t /dev/cdrom
Next we mount the disk,
Code:

bern@beast bern$ mount /dev/cdrom
Then we cd to the mounted disk,
Code:

bern@beast bern$ cd /mnt/cdrom/
Now we look at the contents,
Code:

bern@beast cdrom$ ls -al
total 9
drwxr-xr-x    4 root    root        2048 Sep 25 23:53 .
drwxr-xr-x  10 root    root          240 Jan 19 20:23 ..
-rw-r--r--    1 root    root        1961 Sep 25 23:07 README.TXT
drwxr-xr-x    3 root    root        2048 Jun 17  2002 slackware-book
drwxr-xr-x  10 root    root        2048 Sep 26 00:20 source

we want the source, se we cd to source/
Code:

bern@beast cdrom$ cd source/
and we have a look
Code:

bern@beast source$ ls -al
total 2158
drwxr-xr-x  10 root    root        2048 Sep 26 00:20 .
drwxr-xr-x    4 root    root        2048 Sep 25 23:53 ..
-rw-r--r--    1 root    root        74302 Sep 26 00:20 CHECKSUMS.md5
-rw-r--r--    1 root    root          189 Sep 26 00:20 CHECKSUMS.md5.asc
-rw-r--r--    1 root    root      113053 Sep 26 00:19 FILE_LIST
-rw-r--r--    1 root    root      1974711 Sep 26 00:19 MANIFEST.bz2
-rw-r--r--    1 root    root        1282 Sep 25 23:51 README.TXT
drwxr-xr-x  61 root    root        8192 Sep 25 13:14 a
drwxr-xr-x  32 root    root        4096 Sep  8 14:37 d
drwxr-xr-x    2 root    root        2048 May 23  2003 e
drwxr-xr-x    2 root    root        2048 Sep  8 11:18 f
drwxr-xr-x  74 root    root        10240 Sep 23 12:30 gnome
drwxr-xr-x    3 root    root        2048 Sep  3 14:34 k
drwxr-xr-x  22 root    root        4096 Sep 15 13:56 kde
drwxr-xr-x    4 root    root        8192 Sep 15 14:03 kdei

Now we cd to a/
Code:

bern@beast source$ cd a/
and we list the contents,
Code:

bern@beast a$ ls -al
total 136
drwxr-xr-x  61 root    root        8192 Sep 25 13:14 .
drwxr-xr-x  10 root    root        2048 Sep 26 00:20 ..
drwxr-xr-x    2 root    root        2048 Sep 18 15:16 aaa_base
drwxr-xr-x    2 root    root        2048 Aug 28 16:56 acpid
drwxr-xr-x    2 root    root        2048 Oct 22  2002 apmd
drwxr-xr-x    3 root    root        2048 Sep 23  2002 bash
drwxr-xr-x    2 root    root        8192 Mar  5  2003 bin
drwxr-xr-x    2 root    root        2048 Aug 30  2002 bzip2
drwxr-xr-x    2 root    root        2048 May 21  2003 coreutils
drwxr-xr-x    2 root    root        2048 Aug 28  2002 cpio
drwxr-xr-x    2 root    root        2048 Aug 26 09:40 cups
drwxr-xr-x    2 root    root        2048 Feb 21  2002 cxxlibs
drwxr-xr-x    2 root    root        2048 Apr 16  2002 dcron
drwxr-xr-x    2 root    root        2048 May 15  2002 devfsd
drwxr-xr-x    2 root    root        2048 Sep 11 11:41 devs
drwxr-xr-x    2 root    root        2048 Aug 13 04:44 e2fsprogs
drwxr-xr-x    2 root    root        2048 Mar 15  2002 elflibs
drwxr-xr-x    2 root    root        2048 Feb 19  2002 elvis
drwxr-xr-x    2 root    root        2048 Sep 12 16:14 etc
drwxr-xr-x    2 root    root        2048 Apr  7  2002 findutils
drwxr-xr-x    2 root    root        2048 May  1  2002 floppy
drwxr-xr-x    2 root    root        2048 Jul 29 07:21 gawk
drwxr-xr-x    2 root    root        2048 Sep 21 11:25 genpower
drwxr-xr-x    2 root    root        2048 Feb  3  2003 gettext
drwxr-xr-x    2 root    root        2048 Feb 21  2003 getty-ps
drwxr-xr-x    2 root    root        2048 Sep 14 07:42 gpm
drwxr-xr-x    2 root    root        2048 Apr  8  2002 grep
drwxr-xr-x    2 root    root        2048 Mar  6  2003 gzip
drwxr-xr-x    2 root    root        2048 Feb 21  2003 hdparm
drwxr-xr-x    2 root    root        2048 Sep 12 07:22 hotplug
drwxr-xr-x    2 root    root        2048 Aug 26 08:17 infozip
drwxr-xr-x    2 root    root        2048 Feb 22  2002 isapnptools
drwxr-xr-x    2 root    root        2048 Sep  8 09:46 jfsutils
drwxr-xr-x    2 root    root        2048 Feb 27  2003 kbd
drwxr-xr-x    2 root    root        2048 Sep  3 13:54 kernel-ide
drwxr-xr-x    3 root    root        2048 Aug 29 07:03 kernel-modules
drwxr-xr-x    2 root    root        2048 Feb 14  2003 less
drwxr-xr-x    2 root    root        2048 Aug 26 12:20 lilo
drwxr-xr-x    5 root    root        2048 Apr 17  2002 loadlin
drwxr-xr-x    2 root    root        2048 Jun  8  2003 logrotate
drwxr-xr-x    2 root    root        2048 Sep 12 10:14 lprng
drwxr-xr-x    2 root    root        2048 Feb 25  2002 minicom
drwxr-xr-x    2 root    root        2048 Sep 13 06:33 module-init-tools
drwxr-xr-x    2 root    root        2048 Feb 22  2003 pciutils
drwxr-xr-x    2 root    root        2048 Sep 19 08:03 pcmcia-cs
drwxr-xr-x    2 root    root        2048 Sep 22 17:01 pkgtools
drwxr-xr-x    2 root    root        2048 Sep 22 13:52 procps
drwxr-xr-x    2 root    root        2048 Sep  8 09:52 reiserfsprogs
drwxr-xr-x    2 root    root        2048 Sep  2 07:40 sed
drwxr-xr-x    2 root    root        2048 Jun  1  2003 shadow
drwxr-xr-x    2 root    root        2048 Sep 25 16:37 slocate
drwxr-xr-x    2 root    root        2048 Sep 17 17:11 smartmontools
drwxr-xr-x    2 root    root        2048 Jun  8  2003 sysklogd
drwxr-xr-x    2 root    root        2048 Sep  3 06:31 syslinux
drwxr-xr-x    2 root    root        2048 Sep 25 13:15 sysvinit
drwxr-xr-x    2 root    root        2048 Feb 22  2002 tar
drwxr-xr-x    2 root    root        2048 Feb 14  2003 tcsh
drwxr-xr-x    2 root    root        2048 Feb 21  2002 umsdos-progs
drwxr-xr-x    2 root    root        2048 Aug 30  2002 usbutils
drwxr-xr-x    2 root    root        4096 Aug 26 10:05 util-linux
drwxr-xr-x    2 root    root        2048 Sep  2 16:44 xfsprogs

Now we cd to cups/
Code:

bern@beast a$ cd cups/
and we list the contents,
Code:

bern@beast cups$ ll
total 3814
drwxr-xr-x    2 root    root        2048 Aug 26 09:40 .
drwxr-xr-x  61 root    root        8192 Sep 25 13:14 ..
-rw-r--r--    1 root    root      3691376 May 28  2003 cups-1.1.19-source.tar.bz2
-rw-r--r--    1 root    root      197341 Dec 27  2002 cups-samba-1.1.18.tar.gz
-rwxr-xr-x    1 root    root        3817 Sep 14 17:28 cups.SlackBuild
-rw-r--r--    1 root    root          287 Aug 26 09:40 doinst.sh.gz
-rw-r--r--    1 root    root        1099 Feb  2  2002 slack-desc

we copy the cups source tarball to our home directory (~)
Code:

bern@beast cups$ cp cups-1.1.19-source.tar.bz2 ~/
we cd home,
Code:

bern@beast cups$ cd ~
we extract the source core,
Code:

bern@beast bern$ tar -xjf cups-1.1.19-source.tar.bz2
Now we can look at the source code,
Code:

bern@beast bern$ ll cups*
-rw-r--r--    1 bern    users    3691376 Jan 22 12:47 cups-1.1.19-source.tar.bz2
cups-1.1.19:
total 664
drwxr-xr-x  23 bern    users        1328 May 28  2003 .
drwx--x--x  57 bern    users        3584 Jan 22 12:48 ..
-rw-r--r--    1 bern    users        3120 May 28  2003 CGI.txt
-rw-r--r--    1 bern    users      130311 May 28  2003 CHANGES.txt
-rw-r--r--    1 bern    users        1520 Apr 27  2003 CREDITS.txt
-rw-r--r--    1 bern    users        4884 May 28  2003 ENCRYPTION.txt
-rw-r--r--    1 bern    users        6046 May 28  2003 INSTALL.txt
-rw-r--r--    1 bern    users        614 Apr  8  2003 INSTALL_fr.txt
-rw-r--r--    1 bern    users      44663 Dec 18  2002 LICENSE.html
-rw-r--r--    1 bern    users      43855 Dec 18  2002 LICENSE.txt
-rw-r--r--    1 bern    users        4449 Apr 18  2003 Makedefs.in
-rw-r--r--    1 bern    users        4281 Mar  7  2003 Makefile
-rw-r--r--    1 bern    users        9449 May 28  2003 README.txt
-rw-r--r--    1 bern    users        612 Apr  8  2003 README_fr.txt
drwxr-xr-x    2 bern    users        368 May 28  2003 backend
drwxr-xr-x    2 bern    users        200 May 28  2003 berkeley
drwxr-xr-x    2 bern    users        384 May 28  2003 cgi-bin
drwxr-xr-x    2 bern    users        344 May 28  2003 conf
drwxr-xr-x    2 bern    users        488 May 28  2003 config-scripts
-rw-r--r--    1 bern    users        4089 Apr 19  2003 config.h.in
-rwxr-xr-x    1 bern    users      293170 May 28  2003 configure
-rw-r--r--    1 bern    users        1629 Mar 15  2003 configure.in
drwxr-xr-x    2 bern    users        1120 May 28  2003 cups
-rwxr-xr-x    1 bern    users        2865 Apr 15  2003 cups-config.in
-rw-r--r--    1 bern    users        2386 Oct 25  2002 cups.dsw
-rw-r--r--    1 bern    users      21070 May 16  2003 cups.list.in
-rw-r--r--    1 bern    users        700 Mar  7  2003 cups.osx
-rw-r--r--    1 bern    users        187 Mar  7  2003 cups.plist
-rwxr-xr-x    1 bern    users        3955 Dec 18  2002 cups.sh.in
-rw-r--r--    1 bern    users        5189 May 15  2003 cups.spec
-rw-r--r--    1 bern    users        250 Mar  9  2002 cups.strings
drwxr-xr-x    2 bern    users        1144 May 28  2003 data
drwxr-xr-x    5 bern    users        1528 May 28  2003 doc
drwxr-xr-x    2 bern    users        1552 May 28  2003 filter
drwxr-xr-x    2 bern    users        224 May 28  2003 fonts
-rwxr-xr-x    1 bern    users        5561 Jul 21  2001 install-sh
drwxr-xr-x  20 bern    users        592 May 28  2003 locale
drwxr-xr-x    3 bern    users        928 May 28  2003 man
drwxr-xr-x    2 bern    users        3192 May 28  2003 pdftops
drwxr-xr-x    2 bern    users        448 May 28  2003 ppd
drwxr-xr-x    2 bern    users        280 May 28  2003 pstoraster
drwxr-xr-x    2 bern    users        1200 May 28  2003 scheduler
drwxr-xr-x    6 bern    users        144 May 28  2003 scripting
drwxr-xr-x    2 bern    users        408 May 28  2003 systemv
drwxr-xr-x    4 bern    users        1808 May 28  2003 templates
drwxr-xr-x    2 bern    users        1288 May 28  2003 test
drwxr-xr-x    2 bern    users        152 May 28  2003 visualc

All the changing directories to get to the cups source can be done in one command,
Code:

bern@beast bern$ cd /mnt/cdrom/source/a/cups/
bern@beast cups$ ls -al
total 3814
drwxr-xr-x    2 root    root        2048 Aug 26 09:40 .
drwxr-xr-x  61 root    root        8192 Sep 25 13:14 ..
-rw-r--r--    1 root    root      3691376 May 28  2003 cups-1.1.19-source.tar.bz2
-rw-r--r--    1 root    root      197341 Dec 27  2002 cups-samba-1.1.18.tar.gz
-rwxr-xr-x    1 root    root        3817 Sep 14 17:28 cups.SlackBuild
-rw-r--r--    1 root    root          287 Aug 26 09:40 doinst.sh.gz
-rw-r--r--    1 root    root        1099 Feb  2  2002 slack-desc
bern@beast cups$


Aussie 01-21-2004 09:06 PM

Quote:

Originally posted by lmellen
Also,(dumb newbie question)- How do you unmount the cdrom?

bern@beast bern$ umount /dev/cdrom <----unmounts the cdrom
bern@beast bern$ eject /dev/cdrom <----opens the cdrom
bern@beast bern$ eject -t /dev/cdrom <----closes the cdrom
bern@beast bern$

You'll need to be root to do the open/close and mount/umount commands unless you tinker with your device permissions first.

lmellen 01-25-2004 12:53 PM

Thanks Aussie, that is what I needed to know! I can now view the source code. I do appreciate the help. One quick question if you have the time. What do the different directory or file colors signify? I believe directories are blue, nornal files are white, but some are red-orange and some are lime green. What are they? Also, I'm pretty much finished with this thread, am I supposed to unsubscribe from it?

Aussie 01-25-2004 04:20 PM

Have a look at file:/etc/DIR_COLORS to see exactly what colors represent, you can edit this file to specify your own colors if you want. You can unsubscribe from a thread in your User CP (Control Panel), there is a button at the top of the page ^^^.


All times are GMT -5. The time now is 02:46 AM.