- SourcesList
- Commonly used package sources
- Editing software sources
- Precautions
- Using a graphical program
- Using a text editor
- sources.list format
- Archive type
- Repository URL
- Distribution
- Component
- Example sources.list
- Using Tor with Apt
- CD-ROM
- Name Resolution
- Debug Symbol Packages
- More information
- Репозитории Debian 9
- Официальные репозитории
- Репозитории Debian 9 список
- Stable
- Testing
- Unstable (Sid)
- Experimental
- Security
- Old stable
- Updates
- Backports
- Полезные сторонние репозитории
- Debian multimedia
- Репозитории Google
- Репозитории Oracle
- Редактирование репозиториев
- Обновить список репозиториев
- Устанавливаем ключ репозиторий Multimedia
- Обновление списка репозиториев
- Заключение
- SourcesList
Apt downloads packages from one or more software repositories (sources) and installs them onto your computer.
A repository is generally a network server, such as the official DebianStable repository. Local directories or CD/DVD are also accepted.
The specific repositories (package sources) configured on your machine affect:
- What software packages are available for download
- What versions of packages are available
- Who packages the software
Commonly used package sources
DebianStable: official Debian repository for the current release
StableProposedUpdates: official Debian repository for upcoming point releases (security and important bug fixes every
StableUpdates: official Debian repository for changes that cannot wait for the next point release, packages are also added to StableProposedUpdates for inclusion in the next point release
DebianSecurity: official Debian repository for frequent security updates
DebianBackports: more recent versions of some packages, compatible with DebianStable.
DebianTesting: current development state of the next stable Debian distribution
DebianUnstable: rolling development version containing the latest packages
DebianExperimental: development version containing the experimental/alpha/beta/untested packages
Editing software sources
Precautions
Being able to change the repositories used by your package management system is a powerful feature but this power comes with some responsibility. Users are cautioned that it is possible to break your system (in a way that could be difficult or impossible to cleanly fix) by adding third-party repositories, or repositories for a Debian version that does not match your current version — these repository create a risk of conflicting package versions, creating what’s sometimes called a «Franken-Debian» system. The whole concept behind a Debian stable release is that the Debian developers have picked a set of software and their versions that function nicely together. While this software is patched to fix security issues, the software is frequently not the latest version. It takes some experience to know how the repos may be changed without risk of breaking your system. Users of all levels are advised to change repos cautiously.
Using a graphical program
Some programs allow configuring Apt sources through a graphical interface. For example:
Applications menu > Settings > Software and updates (software-properties-gtk package)
Using a text editor
The main Apt sources configuration file is at /etc/apt/sources.list. You can edit this files (as root) using your favorite text editor.
To add custom sources, creating separate files under /etc/apt/sources.list.d/ is preferred.
sources.list format
The entries in this file normally follow this format:
Archive type
The first word on each line, deb or deb-src, indicates the type of archive. Deb indicates that the archive contains binary packages (deb), the pre-compiled packages that we normally use. Deb-src indicates source packages, which are the original program sources plus the Debian control file (.dsc) and the diff.gz containing the changes needed for packaging the program.
Repository URL
The next entry on the line is a URL to the repository that you want to download the packages from. The main list of Debian repository mirrors is located here.
Distribution
The ‘distribution’ can be either the release code name / alias (jessie, stretch, buster, sid) or the release class (oldstable, stable, testing, unstable) respectively. If you mean to be tracking a release class then use the class name, if you want to track a Debian point release, use the code name. Avoid using stable in your sources.list as that results in nasty surprises and broken systems when the next release is made; upgrading to a new release should be a deliberate, careful action and editing a file once every two years is not a burden.
For example, if you always want to help test the testing release, use ‘testing’. If you are tracking bookworm and want to stay with it from testing to end of life, use ‘bookworm’.
Component
main consists of DFSG-compliant packages, which do not rely on software outside this area to operate. These are the only packages considered part of the Debian distribution.
contrib packages contain DFSG-compliant software, but have dependencies not in main (possibly packaged for Debian in non-free).
non-free contains software that does not comply with the DFSG.
Example sources.list
Below is an example of a sources.list for Debian 11/Bullseye.
If you also need the contrib and non-free components, add contrib non-free after main. For example, for Debian 11/Bullseye:
If you also need the Backports, contrib, and non-free components, add bullseye-backports lines. For example, for Debian 11/Bullseye:
You can instead use https://. in all of the above lines to use the repositories over encrypted HTTPS connections if the according mirror supports HTTPS. (Users of Debian 9/Stretch or older releases will need to install the apt-transport-https package first. The security.debian.org hosts currently do not have publicly verifiable SSL certificates on HTTPS and hence cannot be used with HTTPS at the moment.)
You can use a GNOME tool to edit your sources.list file. Access it through Menu → System → Administration → Software Sources.
Using Tor with Apt
Apt can retrieve and download updates through Tor. For this to work you need to install the tor and apt-transport-tor packages. You can then use the official onion services provided by Debian.
Here is an example sources.list using the onion services for Debian 11/Bullseye:
CD-ROM
If you’d rather use your CD-ROM for installing packages or updating your system automatically with APT, you can put it in your /etc/apt/sources.list. To do so, you can use the apt-cdrom program like this:
with the Debian CD-ROM in the drive.
You can use -d for the directory of the CD-ROM mount point or add a non-CD mount point (i.e. a USB keydrive).
Name Resolution
On occasion name resolution can break. For example, below is from a S/390x Port running in a QEMU Chroot:
You can temporarily work around it by obtaining the IP address from another machine, and then using the IP address rather than the URI:
Debug Symbol Packages
To debug a crash you often need the related debug symbol files. For most Debian packages these are in dbgsym packages. These are available from a separate archive.
Here is an example entry for your sources.list for Debian 11/Bullseye dbgsym packages:
The same if you running testing.
And one more example if you are using the unstable distribution.
More information
A list of UnofficialRepositories to get extra software ( Skype, Opera, Google )
DebianRepository/UseThirdParty — Instructions to use to a third-party repository
Источник
Репозитории Debian 9
Дистрибутив Debian является популярным дистрибутивом GNU/Linux, имеющим большое количество репозиториев. Первое время все репозитории были распределены на 3 ветки: stable, unstable и testing. Однако по прошествии времени были прибавлены дополнительные ветви. В настоящее время для эффективной и безопасного использования системы необходимо гораздо больше знаний.
В рамках данной статьи разбираются виды репозиториеев Debian 9, для чего они нужны, вопросы их правильного применения. Кроме того, анализируются отдельные сторонние репозитории, которые при желании можно установить в свою систему.
Официальные репозитории
Официальные версии репозиторииев Debian поделены на определенные ветки. Main является основной веткой и входит в состав любого дистрибутива. В ней находится лишь свободное ПО. Тем не менее имеется возможность редактирования sources.list и добавления ветки contrib, содержащей программы, связанные с несвободными программи. Кроме того, возможно добавление ветки non-free, включающей несвободные программы.
Основные репозитории имеют названия как у персонажей мультфильма «Toy story» («История игрушек»). Нестабильный пакет имеет наименование «Sid», а названия пакетов репозиториев Stable и Testing непрерывно меняются. Вслед за обновлдением версии дистрибутива, бывший репозиторий Testing делается текущим Stable, далее обновляется репозиторий Testing для новой версии. Имена применяются для настройки зеркал репозиториев. Проанализируем детальнее особенности всех репозиториев.
Репозитории Debian 9 список
- Stable
- Testing
- Unstable (Sid)
- Experimental
- Security
- Old stable
- Updates
- Backports
Stable
Репозиторий класса Stable включает самую новейшую стабильную версию системы. Он является проверенной, наиболее устойчивой версией Linux из имеющихся. По данному основанию Debian применяется на серверах, в которых требуется высокий уровень безопасности.
Особенностью репозитория является то, что в него включаются программы, которые уже несколько функционируют. Пользователям, желающим использовать наиболее свежие версии рекомендуется использование репозиториев Testing либо Sid. Учитывая, что их работа может быть нестабильной и приводить к некотором сложностям, они используются достаточно часто.
Репозиторий Stable может иметь актуальный характер, связанный со временем обновления версии Debian, на протяжении начальных 6-10 месяцев после того, как состоялся релиз. Пакеты программ, который он включает будут еще актуальны, однако до завершающей заморозки нового выпуска они полностью устареют. Использование пакета программ класса Stable, вероятно, позволит избежать каких-либо сложностей при работе системы.
deb http://ftp.ru.debian.org/debian stable main contrib non-free
deb-src http://ftp.ru.debian.org/debian stable main contrib non-free
Testing
Testing является репозиторием Debian, включающим пакеты тестирования, которые затем включаются в следующую версию. После перехода пакета из класса Unstable в класс Testing, он к этому времени проходит детальную проверку. Некоторые пользователи считают, что программное обеспечение класса Testing более надежно, чем репозиториев отдельных дистрибутивов. Система Ubuntu охватывает множество пакетов от Testing. Репозиторий также располагает ветками non-free, main и contrib. Для установки данного репозитория следует прописать следующие строки в текстовом файле.:
deb http://ftp.ru.debian.org/debian/ testing main non-free contrib
deb-src http://ftp.ru.debian.org/debian/ testing main non-free contrib
Unstable (Sid)
Новейшие пакеты как правило оказываются в репозитории Unstable, с помощью него можно использовать наиболее актуальные версии программ в Debian. Многие пакеты могут быть использованы, однако они могут вызывать некоторые проблемы и ошибки. Отдельные пакеты могут конфликтовать друг с другом, при этом пользователь не сможет надлежащим образом устанавливать или удалять программное обеспечение.
При обновлении данного репозитория рекомендуется применять параметр simulate. Репозиторий Unstable может быть использован для получения обновлений программ, не являющихся системными. Пакеты могут работать нестабильно, тем не менее они не нанесут ущерб установленной системе. В особенности нестабильно может работать Sid в первые несколько месяцев вслед за обновлениями, поэтому может наблюдаться большое количество ошибок.
Для установки данной ветки необходимо добавить в конец файла следующие строки:
deb http://ftp.ru.debian.org/debian/ unstable main non-free contrib
deb-src http://ftp.ru.debian.org/debian/ unstable main non-free contrib
Experimental
Следует понимать, что если нестабильный (Unstable) класс репозиториев может в отдельных случаях приводить к ошибкам, то экспериментальный (Experimental) репозиторий почти постоянно будет связан с проблемами. Он включает новейшие и до такой степени нестабильные пакеты программного обеспечения, что они не совместимы даже с репозиторием Unstable. Рекомендуется не устанавливать пакеты из него, поскольку пакеты не обладают достаточной надежностью.
Security
Debian Security включает обновления, касающиеся безопасности использования пакетов для репозиториев stable и old-stable. Его необходимо установить и поддерживать в активном состоянии.
Old stable
После выпуска новой версии Debian, репозиторий тестирования (Testing) получает класс «Стабильный». А старый репозиторий Stable получает класс «old stable». Его поддержка осуществляется какой-то период, поскольку некоторым пользователям требуется время на обновление системы, а есть и такие, которые не торопятся «обновляться».
Updates
Репозиторий security и данный репозиторий устанавливается в автоматическом режиме. При этом адрес содержит определенное кодовое имя наименования дистрибутива. Этот репозиторий позволяет возмещать постепенный процесс обновления Debian, прибавляет последние пакеты для ПО, к примеру, для антивирусных программ.
Backports
Репозиторий backports охватывает программы из Testing и Unstable. Пакеты перекомпилируются для включения в «стабильный» репозиторий исходя из минимума библиотек. По безопсаности, он нарасполагается между Testing и Stable. Рекомендуется употреблять его исключительно для кое-каких пакетов и выполнять обновление всей системы. Все-таки использование Backports надежнее, чем перемешивание Stable, Unstable и Testing.
deb http://ftp.ru.debian.org/debian/ stretch-backports main contrib non-free
Полезные сторонние репозитории
Многими проектами выпускаются сторонние репозитории Debian пакетов. Сюда относятся драйвера, имеющие закрытый код, репозитории окружений рабочего стола и др. Зачастую подобные проекты выпускают новые версии в свои репозитории. По факту таковые репозитории могут быть менее надежными, по сравнению даже с классом experimental. Отдельные из них потребуются только разработчикам.
Debian multimedia
Для установки репозитория, включающего разнообразные кодеки и программы для мультимедиа добавьте следующий код:
deb http://mirror.yandex.ru/debian-multimedia/ stable main
deb-src http://mirror.yandex.ru/debian-multimedia/ stable main
Для работы сторонних репозиториев нужно добавить набор их ключей в систему:
$ sudo apt install deb-multimedia-keyring
Репозитории Google
Корпорация Google выгружает актуальные версии своих проектов, например, Google Hangouts, Google Earth с помощью собственных репозиториев. Ключевые из которых:
deb http://dl.google.com/linux/chrome/deb/ stable main
deb http://dl.google.com/linux/earth/deb/ stable main
Репозитории Oracle
Американская корпорация Oracle использует свои репозитории Debian 9 для собственных проектов. Чтобы добавить репозиторий пропишите строку:
deb http://oss.oracle.com/debian unstable main non-free
Также допускается отдельно добавлять репозиторий VirtualBox:
deb http://download.virtualbox.org/virtualbox/debian yakkety contrib
Необходимо добавить ключи:
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add —
$ wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add —
Редактирование репозиториев
Для того, чтобы отредактировать репозитории необходимо открыть от имени суперпользователя source list, сделать это можно через текстовый редактор nano.
в sources.list вставляем:
# — Основные репозитории, безопасность, обновления, свободные или несвободные пакеты
deb http://ftp.ru.debian.org/debian stable main contrib non-free
deb-src http://ftp.ru.debian.org/debian stable main contrib non-free
deb http://ftp.debian.org/debian/ jessie-updates main contrib non-free
deb-src http://ftp.debian.org/debian/ jessie-updates main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free
Далее сохраняем и выходим
Обновить список репозиториев
Устанавливаем ключ репозиторий Multimedia
sudo apt-get install deb-multimedia-keyring
Обновление списка репозиториев
Заключение
В данном материале проанализированы главные репозитории Debian 9, а также вопросы каким образом работать с программным обеспечением, для чего применяются определенные ветки, разобраны пакеты репозиториев и установка. Кроме того, рассмотрены некоторые сторонние репозитории, которые также могут быть полезны.
Источник