Raspberry Pi_Eng_17.1.4 Source List of Package Repository


Published Book on Amazon


All of IOT Starting with the Latest Raspberry Pi from Beginner to Advanced – Volume 1
All of IOT Starting with the Latest Raspberry Pi from Beginner to Advanced – Volume 2

출판된 한글판 도서


최신 라즈베리파이(Raspberry Pi)로 시작하는 사물인터넷(IOT)의 모든 것 – 초보에서 고급까지 (상)
최신 라즈베리파이(Raspberry Pi)로 시작하는 사물인터넷(IOT)의 모든 것 – 초보에서 고급까지 (하)

Original Book Contents


17.1.4  Source List of Package Repository

 

The place to specify where the package manager should download information about the package is called the source list. The APT tool in Debian determines the source list to download the package from "/etc/apt/sources.list" file. CD-ROM, HTTP server, FTP server, and hard disk can all be sources.

 

The source list is designed to supports multiple active sources and support a variety of source media. It is designed in this file so that one line is used for one source and the most preferred source is described first.

 

The source list is specified in the following format.

deb        http://site.example.com/debian distribution component1 component2 component3

deb-src   http://site.example.com/debian distribution component1 component2 component3

 

One line that describes a particular source is in the following format:

   Archive type

The first means archive type. "deb" means that archive include binary packages (deb), which is a precompiled package we normally use. "deb-src" means the source package type, which contains original program sources and the information about the Debian control file (.dsc) and diff.gz that are needed to make their program soruce into package

 

   URL to the repository

This part is the URL to the repository where you need to download the package. The major list of mirror servers that distribute the Debian repository is included here.

 

The types of URLs that can be used are as follows:

    file       -- Means the directory in the file system.

    cdrom   -- Refers to the local CDROM drive. Use "apt-cdrom" command to define the source list.

    http      -- Means HTTP server.

    ftp       -- Refers to the FTP server.

 

 

   Distribution

Distribution may be release code name/alias (wheezy, jessie, stretch, sid) or release class (oldstable, stable, testing, unstable).

 

   Component

    main     -- It contains the packages of DFSG format. It is not restricted by external software for operating it. This is the only one package when considering a Debian distribution.

    contrib  -- It contains the software of DFSG format. It has dependencies on something other than Debian's main package.

    non-free           -- It includes software that does not follow DFSG.

 

The following is a source list example for Debian 8 "Jessie".

 

deb      http://httpredir.debian.org/debian jessie               main

deb-src http://httpredir.debian.org/debian jessie               main

 

deb      http://httpredir.debian.org/debian  jessie-updates   main

deb-src http://httpredir.debian.org/debian  jessie-updates   main

 

deb      http://security.debian.org/           jessie/updates    main

deb-src http://security.debian.org/           jessie/updates    main

 

You can see that the sources file is as follows just after installing the system on Raspberry Pi,

 

pi@raspberrypi3:~ $ cat /etc/apt/sources.list

deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi

# Uncomment line below then 'apt-get update' to enable 'apt-get source'

#deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi