Raspberry Pi_Kor_17.1.4 package repository의 source list


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  package repository source list

 

package manager package에 대한 정보를 어디서 download해야 하는지를 지정한 장소를 source list라고 하는데, Debian APT 도구는 "/etc/apt/sources.list" 파일에서 package download source list를 결정한다. CD-ROM, HTTP 서버, FTP 서버, 하드디스크 모두 소스가 될 수 있다.

 

source list는 복수의 활동 source를 지원하고, 다양한 source 매체를 지원하도록 설계되어 있다. 이 파일은 하나의 source에 한 줄을 사용하고, 가장 선호하는 source를 먼저 기술하도록 되어 있다.

 

source list는 다음과 같은 형식으로 지정되어 있다.

 

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

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

 

특정 source를 기술하는 한 줄은 다음과 같은 세부 형식으로 되어 있다.  

    archive 유형

처음은 archive 유형을 의미한다. "deb"archive에 우리가 통상 사용하는 사전 compile packagebinary packages (deb)가 포함되어 있는 것을 의미한다. "deb-src"source package 형태임을 의미하는데, 이것은 원래의 program sources와 해당 프로그램 sourcepackage로 만들 때 필요한 Debian control file (.dsc)diff.gz에 대한 정보를 가지고 있다.

 

    repository에 대한 URL

이 부분은 package download해야 할 repository에 대한 URL이다. Debian repository를 배포하는 mirror server에 대한 주요한 목록들이 여기에 포함된다.  

 

사용할 수 있는 URL의 종류는 다음과 같다.

    file        -- 파일 시스템에 있는 directory를 의미한다.

    cdrom   -- local CDROM drive를 의미한다. source list를 정의할 때는 "apt-cdrom" 명령을 사용한다.  

    http      -- HTTP server를 의미한다

    ftp       -- FTP server를 의미한다.

 

    배포판(distribution)

distributionrelease code name / alias (wheezy, jessie, stretch, sid) 이거나 release class (oldstable, stable, testing, unstable) 일수도 있다.

 

    Component

    main     --DFSG 형식의 packages를 포함하고 있다. 이것을 운영하는데는 외부 소프트웨어의 제한을 받지 않는다. 이것은 Debian 배포판에서는 하나만 있는 유일한 package이다.

    contrib  --DFSG 형식 software를 포함하고 있다. 이것은 Debian main package가 아닌 다른 것과 서로 의존적인 관계를 가지고 있다.  

    non-free           --DFSG를 따르지 않는 소프트웨어를 포함하고 있다.

 

다음은 Debian 8 "Jessie"에 대한 source list의 사례이다.

 

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

 

Raspberry Pi에서 시스템을 설치한 직후 sources 파일은 다음과 같이 되어 있는 것을 확인할 수 있다.  

 

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

 

 

 


 

Leave a Reply