Creating your apt listing
First, you have to tell Debian where to
get packages from. They can come from the Debian CD-ROM, a directory
on your hard drive, or from an ftp or http site. Depending on what
you have active, Debian will determine the newest version to install
on your system.
To tell Debian where you
want to find packages, you can run the "apt-setup" command.
This brings up a curses-based front end that quickly leads you
through how to tell Debian where to find packages. If you need to
find packages on a Debian packaged CD, simply insert the CD and press
Enter and that's all Debian needs from you.
Debian CDs have a
certain directory structure and certain files in order for Debian to
understand the CD as a correct apt source. I mention this so
you don't get frustrated as to why apt-setup doesn't like your CD-ROM
filled with DEBs. You can install an individual DEB file, but you'd
use dpkg (Debian packaging program that works underneath apt) instead
of apt to do this.
To add ftp or http sites, I find it easier
to just add these entries into the file myself instead of going thru
apt-setup. The file you'll need to edit is called:
/etc/apt/sources.list.
Here's an example sources.list file:
# Installation CD-ROM
deb-src cdrom:[Progeny Debian 1.0 Newton - Official Source-2 (20010404)]/ stable contrib main non-free
deb-src cdrom:[Progeny Debian 1.0 Newton - Official Source-1 (20010404)]/ stable contrib main non-free
deb cdrom:[Progeny Debian 1.0 Newton - Official i386 Binary-2 (20010404)]/ stable contrib main non-free
deb cdrom:[Progeny Debian 1.0 Newton - Official i386 Binary-1 (20010404)]/ stable contrib main non-free
The deb-src lines refer to where you
can find source code. The deb lines are where binary .deb files can
be found. Judging by the cryptic cdrom labels, hopefully you can see
why I let apt-setup do these lines (if they haven't been added
already by the install process).
# $Id: sources.list.dist,v 1.7 2001/04/04 23:10:08 jlicquia Exp $
# Default sources.list for Progeny Debian 1.0.
# This file is documented in the standard manual; type
# "man 5 sources.list" for more information.
# Progeny's standard archive. "Newton" is the code name for Progeny
# 1.0.
deb http://archive.progeny.com/progeny newton main contrib non-free
deb-src http://archive.progeny.com/progeny newton main contrib non-free
# Progeny's updates archive. This will contain useful updates
# to the system, as well as bleeding-edge security fixes (which
# should also be included in the main archive very soon after).
deb http://archive.progeny.com/progeny updates/newton/
deb-src http://archive.progeny.com/progeny updates/newton/
The above lines are an example of a non-Debian site
where Debian packages can be found. As you've probably figured out by
now, I run Progeny Debian (just a user, not an employee :) ).
# Debian's "stable" distribution. This contains the software that
# makes up the current version of Debian. Most of this software
# should work fine with Progeny Debian. Uncomment the lines if
# you want to install packages from here.
#deb http://http.us.debian.org/debian stable main contrib non-free
#deb-src http://http.us.debian.org/debian stable main contrib non-free
# Debian's stable security updates repostitory. If you install
# packages from Debian's stable archive, we recommend you keep up
# with this as well.
#deb http://security.debian.org stable/updates main contrib non-free
#deb-src http://security.debian.org stable/updates main contrib non-free
# Debian's "testing" distribution. This is the distribution that
# will form the next stable version of Debian. Packages from this
# distribution may work with Progeny Debian, but others may not,
# and it's possible that certain packages from here will override
# Progeny's versions and break your system. Use with caution.
deb http://http.us.debian.org/debian testing main contrib non-free
deb-src http://http.us.debian.org/debian testing main contrib non-free
# Debian's "unstable" distribution. This represents the very latest
# packages Debian has to offer. These packages are very raw, and
# may have serious bugs; no guarantee can be offered that any package
# from here won't break your system in very terrible ways. Use
# at your own risk.
#deb http://http.us.debian.org/debian unstable main contrib non-free
#deb-src http://http.us.debian.org/debian unstable main contrib non-free
You comment out lines in this file when you don't want
Debian to try to find packages from that place. I normally leave
unstable commented out unless I have a good reason to find a package
there.
# Debian's Non-US packages. This tends to be for crypto stuff.
#deb http://non-us.debian.org/debian-non-US sid/non-US main non-free
Yes, sadly, the Debian crypto stuff is held outside the
US. That was probably going to change, but after Sept. 11 (and all of
the crypto legislation that's being thought about right now), that's
unlikely to happen. I have to point Debian here when I need the
crypto portions of KDE which allows Konqueror to access https:
sites.
You'll notice the words: main, contrib, and non-free on
most of the lines in this file. All apt sources are separated into
directories and these are normally the directory names. Main is for
the basic .deb files. Contrib is for contributed packages that aren't
supported in main. Non-free is for those packages that aren't "free
software" (GPL licensed). Debian takes the idea of the GPL very
seriously. For a long time, KDE wasn't included because the
underlying QT toolkit wasn't GPL licensed. Non-free tends to be the
Debian place for items they think people will want, but they don't
want to infect the rest of their distribution. :)
Next