Как убедиться, что опция [trusted=yes] в /etc/apt/sources.list действительно работает?

Knoppix

Модераторы: Warderer, Модераторы разделов

Ответить
Аватара пользователя
жучара
Сообщения: 950
ОС: астралинукс

Как убедиться, что опция [trusted=yes] в /etc/apt/sources.list действительно работает?

Сообщение жучара »

Друзья!
man 5 sources.list
...
Trusted (trusted) is a tri-state value which defaults to APT deciding if a source is considered trusted or if warnings should be raised before e.g. packages are installed from this source. This option can be used to override that decision. The value yes tells APT always to consider this source as trusted, even if it doesn't pass authentication checks. It disables parts of apt-secure(8), and should therefore only be used in a local and trusted context (if at all) as otherwise security is breached. The value no does the opposite, causing the source to be handled as untrusted even if the authentication checks passed successfully. The default value can't be set explicitly.
Ну то есть понятно, да? Пишем [trusted=yes] и забываем про всякие дурацкие публичные ключи и иже с ними. Поехали. debian, который jessie, нулёвый, даже без пользователя. Только root, настолько нулёвый.

Shell

# cat /etc/apt/sources.list

deb [trusted=yes] http://archive.debian.org/debian squeeze main contrib non-free
deb-src [trusted=yes] http://archive.debian.org/debian squeeze main contrib non-free

#
То есть, будучи в jessie мне нужно посмотреть squeeze, безо всяких дурацких предупреждений.

Shell

# apt-get update
Ign http://archive.debian.org squeeze InRelease
Get:1 http://archive.debian.org squeeze Release.gpg [1655 B]
Hit http://archive.debian.org squeeze Release
Ign http://archive.debian.org squeeze Release
Ign http://archive.debian.org squeeze/main Sources/DiffIndex
Ign http://archive.debian.org squeeze/contrib Sources/DiffIndex
Ign http://archive.debian.org squeeze/non-free Sources/DiffIndex
Ign http://archive.debian.org squeeze/main amd64 Packages/DiffIndex
Ign http://archive.debian.org squeeze/contrib amd64 Packages/DiffIndex
Ign http://archive.debian.org squeeze/non-free amd64 Packages/DiffIndex
Hit http://archive.debian.org squeeze/main Sources
Hit http://archive.debian.org squeeze/contrib Sources
Hit http://archive.debian.org squeeze/non-free Sources
Hit http://archive.debian.org squeeze/main amd64 Packages
Hit http://archive.debian.org squeeze/contrib amd64 Packages
Hit http://archive.debian.org squeeze/non-free amd64 Packages
Ign http://archive.debian.org squeeze/contrib Translation-en
Ign http://archive.debian.org squeeze/main Translation-en
Ign http://archive.debian.org squeeze/non-free Translation-en
Fetched 1655 B in 2s (582 B/s)
Reading package lists... Done
W: GPG error: http://archive.debian.org squeeze Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AED4B06F473041FA NO_PUBKEY 64481591B98321F9
#
Грустно. И без [trusted=yes] всё то же самое:

Shell

# cat /etc/apt/sources.list

deb http://archive.debian.org/debian squeeze main contrib non-free
deb-src http://archive.debian.org/debian squeeze main contrib non-free

#

# apt-get update
Ign http://archive.debian.org squeeze InRelease
Get:1 http://archive.debian.org squeeze Release.gpg [1655 B]
Hit http://archive.debian.org squeeze Release
Ign http://archive.debian.org squeeze Release
Ign http://archive.debian.org squeeze/main Sources/DiffIndex
Ign http://archive.debian.org squeeze/contrib Sources/DiffIndex
Ign http://archive.debian.org squeeze/non-free Sources/DiffIndex
Ign http://archive.debian.org squeeze/main amd64 Packages/DiffIndex
Ign http://archive.debian.org squeeze/contrib amd64 Packages/DiffIndex
Ign http://archive.debian.org squeeze/non-free amd64 Packages/DiffIndex
Hit http://archive.debian.org squeeze/main Sources
Hit http://archive.debian.org squeeze/contrib Sources
Hit http://archive.debian.org squeeze/non-free Sources
Hit http://archive.debian.org squeeze/main amd64 Packages
Hit http://archive.debian.org squeeze/contrib amd64 Packages
Hit http://archive.debian.org squeeze/non-free amd64 Packages
Ign http://archive.debian.org squeeze/contrib Translation-en
Ign http://archive.debian.org squeeze/main Translation-en
Ign http://archive.debian.org squeeze/non-free Translation-en
Fetched 1655 B in 2s (617 B/s)
Reading package lists... Done
W: GPG error: http://archive.debian.org squeeze Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AED4B06F473041FA NO_PUBKEY 64481591B98321F9
#
Вот, думаю, зачем опция [trusted=yes] нужна тогда, если что с ней, что без неё, один... Может, есть какой-нибудь способ убедиться в её эффективности? Спасибо, кто отклинется.
Я просто читаю маны.
Спасибо сказали:
Аватара пользователя
UnixNoob
Сообщения: 1379
ОС: Slackware

Re: Как убедиться, что опция [trusted=yes] в /etc/apt/sources.list действительно работает?

Сообщение UnixNoob »

Note: this was added in apt 0.8.16~exp3. So it's in wheezy (and of course jessie), but not squeeze.
Это вам поможет?
"Однажды один очень мудрый человек… ничего не сказал. Времена были опасные, да и собеседники ненадёжные"
Спасибо сказали:
Аватара пользователя
Bizdelnick
Модератор
Сообщения: 20793
Статус: nulla salus bello
ОС: Debian GNU/Linux

Re: Как убедиться, что опция [trusted=yes] в /etc/apt/sources.list действительно работает?

Сообщение Bizdelnick »

жучара писал(а):
02.11.2021 10:12
будучи в jessie мне нужно посмотреть squeeze, безо всяких дурацких предупреждений
apt-get install debian-archive-keyring
Пишите правильно:
в консоли
вку́пе (с чем-либо)
в общем
вообще
в течение (часа)
новичок
нюанс
по умолчанию
приемлемо
проблема
пробовать
трафик
Спасибо сказали:
Аватара пользователя
жучара
Сообщения: 950
ОС: астралинукс

Re: Как убедиться, что опция [trusted=yes] в /etc/apt/sources.list действительно работает?

Сообщение жучара »

Bizdelnick писал:
02.11.2021 12:44
жучара писал(а):
02.11.2021 10:12
будучи в jessie мне нужно посмотреть squeeze, безо всяких дурацких предупреждений
apt-get install debian-archive-keyring
если именно на этот вопрос отвечать, то везде-превезде написано, что пакет debian-archive-keyring должен стоять, вот прямо везде превезде. Я и забыл проверить, есть он у меня или нет. А он есть.

Shell

# dpkg -l | grep debian-archive-keyring
ii debian-archive-keyring 2017.5~deb8u1 all GnuPG archive keys of the Debian archive
#
И всё равно ругань, как на чужой репозиторий, так и на свой родной. Даже.

Shell

# cat /etc/apt/sources.list
deb [trusted=yes] http://archive.debian.org/debian jessie main
#
#
# apt-get update
Ign http://archive.debian.org jessie InRelease
Get:1 http://archive.debian.org jessie Release.gpg [2420 B]
Hit http://archive.debian.org jessie Release
Ign http://archive.debian.org jessie Release
Ign http://archive.debian.org jessie/main amd64 Packages/DiffIndex
Hit http://archive.debian.org jessie/main Translation-en
Err http://archive.debian.org jessie/main amd64 Packages

Hit http://archive.debian.org jessie/main amd64 Packages
Fetched 2420 B in 1s (1314 B/s)
Reading package lists... Done
W: GPG error: http://archive.debian.org jessie Release: The following signatures were invalid: KEYEXPIRED 1587841717
/#
Я просто читаю маны.
Спасибо сказали:
IMB
Сообщения: 2561
ОС: Debian

Re: Как убедиться, что опция [trusted=yes] в /etc/apt/sources.list действительно работает?

Сообщение IMB »

Вы прочитали всю указанныую документацию?

Shell

APT-SECURE(8) APT APT-SECURE(8)

NAME
apt-secure - Archive authentication support for APT
................
You can force all APT clients to raise only warnings by setting the
configuration option Acquire::AllowInsecureRepositories to true.
Individual repositories can also be allowed to be insecure via the
sources.list(5) option allow-insecure=yes. Note that insecure
repositories are strongly discouraged and all options to force apt to
continue supporting them will eventually be removed. Users also have
the Trusted option available to disable even the warnings, but be sure
to understand the implications as detailed in sources.list(5).
............
Спасибо сказали:
Ответить