/etc/apt/sources.list
سوف يدرج المستودعات المختلفة التي تنشر حزم دبيان. ثم تستورد APT قائمة الطرود التي ينشرها كل من هذه المصادر. يتم تحقيق هذه العملية عن طريق تحميل ملفات Packages.xz
أو متغير مثل حزم.gz
أو . bz2
(باستخدام أسلوب ضغط مختلف) في حالة وجود مصدر للحزم الثنائية وبتحليل محتوياتها. في حالة مصدر الحزم المصدر، APT التنزيلات Sources.xz
الملفات أو متغير باستخدام أسلوب ضغط مختلفة. عندما تكون نسخة قديمة من هذه الملفات موجودة بالفعل ، يمكن لـ APT تحديثها عن طريق تنزيل الاختلافات فقط (انظر الشريط الجانبي TIP Incremental updates).
/etc/apt/sources.list
مصدر حُزْمَة (مستودع) ويتكون من ثلاث أجزاء على الأقل مفصولة بمسافات. للحصول على وصف كامل لتنسيق الملف وتركيبات الإدخال المقبولة ، راجع sources.list ( 5 ).
مثال 6.1. Example entry format in /etc/apt/sources.list
deb url distribution component1 component2 component3 [..] componentX deb-src url distribution component1 component2 component3 [..] componentX
deb
deb-src
Packages.xz
files, it must give a full and valid URL. This can consist in a Debian mirror or in any other package archive set up by a third party. The URL can start with file://
to indicate a local source installed in the system's file hierarchy, with http://
or https://
to indicate a source accessible from a web server, or with ftp://
or ftps://
for a source available on an FTP server. The URL can also start with cdrom:
for CD-ROM/DVD/Blu-ray disc based installations, although this is less frequent, since network-based installation methods are eventually more common. More methods like ssh://
or tor+http(s)://
are supported and are either described in sources.list(5) or their respective apt-transport-method package documentation.
./
” which refers to the absence of a subdirectory. The packages are then directly at the specified URL. But in the most common case, the repositories will be structured like a Debian mirror, with multiple distributions, each having multiple components. In those cases, name the chosen distribution by its “codename” — see the list in sidebar مجتمع بروس بيرنز، قائد مثير للجدل — or by the corresponding “suite” (oldoldstable
, oldstable
, stable
, testing
, unstable
) and then the components to enable. A typical Debian mirror provides the components main
, contrib
, and non-free
.
cdrom
أقراص CD أو DVD. أقراص CD-ROM غير متوفرة دوماً بخلاف المدخلات الأخرى، لأنه يجب وضعها في السواقة التي لا تستطيع سوى قراءة قرص واحد في كل مرة. لهذا السبب، تدار هذه المصادر بطريقة مختلفة قليلاً، ويجب إضافتها باستخدام البرنامج apt-cdrom
، باستخدام البارامتر add
عادة. عندها سيطلب البرنامج إدخال القرص في السواقة ويتصفح محتوياته بحثاً عن ملفات Packages
. ثم يستخدم هذه الملفات لتحديث قاعدة بيانات الحزم المتوفرة التي يديرها (تنفذ هذه العملية عادة بالأمر apt update
). بعد ذلك، تستطيع APT أن تطلب إدخال القرص إذا احتاجت إحدى الحزم المخزنة عليه.
sources.list
قياسي لنظام يعمل بالنسخة المستقرة من دبيان:
مثال 6.2. ملف /etc/apt/sources.list
لمستخدمي دبيان المستقرة
# Security updates deb http://security.debian.org/ bullseye-security main contrib non-free deb-src http://security.debian.org/ bullseye-security main contrib non-free ## Debian mirror # Base repository deb https://deb.debian.org/debian bullseye main contrib non-free deb-src https://deb.debian.org/debian bullseye main contrib non-free # Stable updates deb https://deb.debian.org/debian bullseye-updates main contrib non-free deb-src https://deb.debian.org/debian bullseye-updates main contrib non-free # Stable backports deb https://deb.debian.org/debian bullseye-backports main contrib non-free deb-src https://deb.debian.org/debian bullseye-backports main contrib non-free
stable
, stable-updates
, stable-backports
) because we don't want to have the underlying distribution changed outside of our control when the next stable release comes out.
sources.list
. لذلك تضاف المصادر غير الرسمية عادة إلى نهاية الملف.
security.debian.org
, a small set of machines maintained by the Debian System Administrators. This archive contains security updates prepared by the Debian Security Team and/or by package maintainers for the Stable and Oldstable distribution.
Debian Security Advisory
(DSA) and announces it together with the security update on the [email protected]
mailing list (archive).
proposed-updates
repository, carefully selected by the Stable Release Managers. All updates are announced on the [email protected]
mailing list (archive) and will be included in the next Stable point release anyway.
proposed-updates
هو المكان الذي يتم فيه تحضير التحديثات المنتظرة (تحت إشراف مديري الإصدارة المستقرة).
bullseye-proposed-updates
alias which is both more explicit and more consistent since buster-proposed-updates
also exists (for the Oldstable updates):
deb https://deb.debian.org/debian bullseye-proposed-updates main contrib non-free
stable-backports
”الحزم المنقولة خلفاً package backports“. يشير هذا المصطلح إلى حزم لبرمجيات حديثة أعيدت ترجمتها لتوزيعة قديمة (نقلت إلى الخلف)، وعادة ما يكون النقل إلى التوزيعة المستقرة.
stable-backports
are only created from packages available in Testing. This ensures that all installed backports will be upgradable to the corresponding stable version once the next stable release of Debian is available.
APT
will not install them unless you give explicit instructions to do so (or unless you have already done so with a former version of the given backport):
$
sudo apt-get install package/bullseye-backports
$
sudo apt-get install -t bullseye-backports package
sources.list
قياسي لنظام يعمل بالنسخة الاختبارية أو غير المستقرة من دبيان:
مثال 6.3. ملف /etc/apt/sources.list
لمستخدمي دبيان الاختبارية/غير المستقرة
# Unstable deb https://deb.debian.org/debian unstable main contrib non-free deb-src https://deb.debian.org/debian unstable main contrib non-free # Testing deb https://deb.debian.org/debian testing main contrib non-free deb-src https://deb.debian.org/debian testing main contrib non-free # Testing security updates deb http://security.debian.org/ testing-security main contrib non-free deb-src http://security.debian.org/ testing-security main contrib non-free # Stable deb https://deb.debian.org/debian stable main contrib non-free deb-src https://deb.debian.org/debian stable main contrib non-free # Stable security updates deb http://security.debian.org/ stable-security main contrib non-free deb-src http://security.debian.org/ stable-security main contrib non-free
sources.list
file APT will install packages from the Unstable suite. If that is not desired, use the APT::Default-Release
setting (see قسم 6.2.3, “تحديث النظام”) to instruct APT to pick packages from another suite (most likely Testing in this case).
sources.list
لا تؤدي إلى استخدام حزمها آلياً. السطر الذي تجب إضافته هو:
deb https://deb.debian.org/debian experimental main contrib non-free
sources.list
examples in this chapter refer to package repositories hosted on deb.debian.org
. Those URLs will redirect you to servers which are close to you and which are managed by Content Delivery Networks (CDN) whose main role is to store multiple copies of the files across the world, and to deliver them as fast as possible to users. The CDN companies that Debian is working with are Debian partners who are offering their services freely to Debian. While none of those servers are under direct control of Debian, the fact that the whole archive is sealed by GPG signatures makes it a non-issue.
deb.debian.org
can try to find a better mirror in the official mirror list:
ftp.country-code.debian.org
(e.g. ftp.us.debian.org
for the USA, ftp.fr.debian.org
for France, etc.) which are covering many countries and which are pointing to one (or more) of the best mirrors available within that country.
deb.debian.org
, there used to be httpredir.debian.org
. This service would identify a mirror close to you (among the list of official mirrors, using GeoIP mainly) and would redirect APT's requests to that mirror. This service has been deprecated due to reliability concerns and now httpredir.debian.org
provides the same CDN-based service as deb.debian.org
.
mentors.debian.net
site is interesting (although it only provides source packages), since it gathers packages created by candidates to the status of official Debian developer or by volunteers who wish to create Debian packages without going through that process of integration. These packages are made available without any guarantee regarding their quality; make sure that you check their origin and integrity and then test them before you consider using them in production.
sources.list
دون تعديل، لكن تُضبَطُ APT حتى تَستَخدِم أحد البرنامجين كبروكسي للطلبات الخارجية.
/etc/approx/approx.conf
:
# <name> <repository-base-url> debian https://deb.debian.org/debian security http://security.debian.org/debian-security
sources.list
file to point to the approx server:
# Sample sources.list pointing to a local approx server deb http://localhost:9999/security bullseye-security main contrib non-free deb http://localhost:9999/debian bullseye main contrib non-free