diff --git a/documentation/content/ru/articles/hubs/_index.adoc b/documentation/content/ru/articles/hubs/_index.adoc index b0fdea6fd4..dd51367d2f 100644 --- a/documentation/content/ru/articles/hubs/_index.adoc +++ b/documentation/content/ru/articles/hubs/_index.adoc @@ -1,336 +1,336 @@ --- authors: - author: 'Jun Kuriyama' email: kuriyama@FreeBSD.org - author: 'Valentino Vaschetto' email: logo@FreeBSD.org - author: 'Daniel Lang' email: dl@leo.org - author: 'Ken Smith' email: kensmith@FreeBSD.org description: 'Полное руководство по зеркалированию веб-сайта FreeBSD, FTP-серверов и многого другого' tags: ["Mirroring", "FreeBSD", "Hub"] title: 'Поддержка зеркал FreeBSD' trademarks: ["freebsd", "general"] --- = Поддержка зеркал FreeBSD :doctype: article :toc: macro :toclevels: 1 :icons: font :sectnums: :sectnumlevels: 6 :source-highlighter: rouge :experimental: :images-path: articles/hubs/ ifdef::env-beastie[] ifdef::backend-html5[] include::shared/authors.adoc[] include::shared/mirrors.adoc[] include::shared/releases.adoc[] include::shared/attributes/attributes-{{% lang %}}.adoc[] include::shared/{{% lang %}}/teams.adoc[] include::shared/{{% lang %}}/mailing-lists.adoc[] include::shared/{{% lang %}}/urls.adoc[] :imagesdir: ../../../images/{images-path} endif::[] ifdef::backend-pdf,backend-epub3[] include::../../../../shared/asciidoctor.adoc[] endif::[] endif::[] ifndef::env-beastie[] include::../../../../../shared/asciidoctor.adoc[] endif::[] [.abstract-title] Аннотация Рабочий вариант статьи, описывающей процесс создания и поддержки зеркала FreeBSD и адресованной администраторам зеркал. ''' toc::[] [NOTE] ==== На текущий момент заявки на подключение новых зеркал не принимаются. ==== [[mirror-contact]] == Контактная информация Координаторы системы зеркал доступны по электронной почте по адресу mailto:mirror-admin@FreeBSD.org[mirror-admin@FreeBSD.org]. Помимо этого, существует {freebsd-hubs}. [[mirror-requirements]] == Требования к зеркалам FreeBSD [[mirror-diskspace]] === Дисковое пространство -Одним из наиболее важных требований является дисковое пространство. В зависимости от набора релизов, архитектур и степени полноты зеркала вам может потребоваться огромный объем диска. Не лишним будет помнить, что _официальное_ зеркало, скорее всего, должно быть полным. Веб-страницы всегда должны зеркалироваться полностью. Кроме того, учтите, что приводимые оценки объема относятся к состоянию на момент последнего редактирования данной статьи ({rel120-current}-RELEASE/{rel113-current}-RELEASE). Дальнейший процесс разработки и последующие релизы только увеличат требуемый объем. Кроме того, разумно будет зарезервировать некоторое (10-20%) дополнительное пространство спокойствия ради. Вот некоторые оценки объема: +Одним из наиболее важных требований является дисковое пространство. В зависимости от набора релизов, архитектур и степени полноты зеркала вам может потребоваться огромный объём диска. Не лишним будет помнить, что _официальное_ зеркало, скорее всего, должно быть полным. Веб-страницы всегда должны зеркалироваться полностью. Кроме того, учтите, что приводимые оценки объёма относятся к состоянию на момент последнего редактирования данной статьи ({rel120-current}-RELEASE/{rel113-current}-RELEASE). Дальнейший процесс разработки и последующие релизы только увеличат требуемый объём. Кроме того, разумно будет зарезервировать некоторое (10-20%) дополнительное пространство спокойствия ради. Вот некоторые оценки объёма: * Полное зеркало FTP: 1.4 TB * Комплект изменений CTM: 10 GB * Веб-страницы: 1 GB Текущее использование диска зеркалом FTP можно посмотреть на link:ftp://ftp.FreeBSD.org/pub/FreeBSD/dir.sizes[ftp://ftp.FreeBSD.org/pub/FreeBSD/dir.sizes]. [[mirror-bandwidth]] === Требования к сетевой связности и пропускной способности -Разумеется, у вас должно быть подключение к интернет. Требуемая пропускная способность ваших каналов зависит от предполагаемого профиля использования вашего зеркала. Если вы собираетесь копировать некоторые части FreeBSD для локального использования на вашей машине или в интранете, требования могут быть много мягче, чем для публичного зеркала. Для официального зеркала необходимая пропускная способность увеличивается еще больше. Мы можем дать лишь очень грубые оценки: +Разумеется, у вас должно быть подключение к интернет. Требуемая пропускная способность ваших каналов зависит от предполагаемого профиля использования вашего зеркала. Если вы собираетесь копировать некоторые части FreeBSD для локального использования на вашей машине или в интранете, требования могут быть много мягче, чем для публичного зеркала. Для официального зеркала необходимая пропускная способность увеличивается ещё больше. Мы можем дать лишь очень грубые оценки: * Зеркало для локального доступа: фактически минимум не определен, но канал шириной менее 2 Mbps может сделать процесс обновления мучительно медленным. * Неофициальное публичное зеркало: 34 Mbps выглядит неплохо для начала. * Официальное зеркало: рекомендуется канал шириной более 100 Mbps; кроме того, ваша машина должна стоять как можно ближе к граничным маршрутизаторам вашей сети. [[mirror-system]] === Системные требования, процессор и память Эти требования в первую очередь определяются максимальным ожидаемым количеством клиентов (устанавливается администратором сервера). Также, на требуемые ресурсы влияет список сервисов, которые вы будете предоставлять. Зеркала FTP и/или HTTP не требуют особенно много ресурсов. Будьте на чеку, если планируете предоставлять rsync. Выбор rsync может иметь огромное влияние на требования к аппаратным ресурсам, поскольку rsync признан "прожорливым" по памяти. Вот некоторые советы по конфигурации аппаратной части сервера. Для умеренно посещаемого сайта, предоставляющего rsync, можно использовать процессор с частотой 800MHz - 1 GHz и по крайней мере 512MB памяти. Скорее всего, данная конфигурация может считаться минимальной для _официального_ зеркала. Для регулярно посещаемого сайта вам потребуется больше памяти (хорошим стартом будет 2GB) и больше процессорной мощности, что может означать требование многопроцессорной (SMP) платформы. Кроме того, вам потребуется быстрая дисковая подсистема, в первую очередь, для работы с репозиторием SVN (крайне рекомендуем RAID). Контроллер SCSI, оборудованный собственной памятью, также может ощутимо ускорить процесс, поскольку большая часть сервисов связана с большим количеством дисковых запросов небольшого размера. [[mirror-services]] === Предоставляемые сервисы Всякое зеркало должно предоставлять набор основных сервисов. Помимо требуемого минимального набора, существуют дополнительные сервисы, которые администратор сервера может пожелать предоставлять. Этот раздел описывает, какие сервисы вы можете предоставлять, и какие действия для этого потребуются от вас. [[mirror-serv-ftp]] ==== FTP (требуется для FTP зеркала) -Это один из наиболее базовых сервисов; его предоставление требуется для каждого зеркала, распространяющего файлы FreeBSD по FTP. Доступ по FTP должен быть анонимным, и не должны применяться какие-либо ограничения по соотношению объема передано/принято (что вообще является, на наш взгляд, странным подходом). Закачка (upload) файлов на сервер не требуется (и _должна_ быть запрещена в разделе FreeBSD). Кроме того, архив файлов FreeBSD должен быть доступен с путем [.filename]#/pub/FreeBSD#. +Это один из наиболее базовых сервисов; его предоставление требуется для каждого зеркала, распространяющего файлы FreeBSD по FTP. Доступ по FTP должен быть анонимным, и не должны применяться какие-либо ограничения по соотношению объёма передано/принято (что вообще является, на наш взгляд, странным подходом). Закачка (upload) файлов на сервер не требуется (и _должна_ быть запрещена в разделе FreeBSD). Кроме того, архив файлов FreeBSD должен быть доступен с путем [.filename]#/pub/FreeBSD#. Для предоставления анонимного FTP доступа может быть использован целый ряд программ (перечислены в алфавитном порядке). * `/usr/libexec/ftpd`: базовый FTP-даемон FreeBSD. Не забудьте прочитать man:ftpd[8]. * package:ftp/ncftpd[]: коммерческий пакет, свободен для использования в учебных целях. * package:ftp/oftpd[]: FTP-даемон, написанный в основном с точки зрения защищенности. * package:ftp/proftpd[]: Модульный и очень гибкий FTP-даемон. * package:ftp/pure-ftpd[]: Еще один FTP-даемон, разработанный с позиций защищенности. * package:ftp/twoftpd[]: См. предыдущий пункт. * package:ftp/vsftpd[]: "очень защищенный" ("very secure") ftpd. ftpd, proftpd и, возможно, ncftpd являются наиболее часто встречающимися FTP серверами. Прочие распространены среди существующих зеркал в существенно меньшей степени. Дополнительным поводом для рассмотрения может являться возможность гибко ограничивать количество одновременных соединений, что поможет вам удержать в нужных рамках потребление пропускной способности ваших каналов и машинные ресурсы. [[mirror-serv-rsync]] ==== Rsync (необязательный сервис для FTP зеркала) -rsync часто используется для предоставления доступа к FTP-области FreeBSD, чтобы другие зеркала могли синхронизироваться по вашему. Протокол rsync во многом отличается от FTP, в частности, он гораздо гуманнее с точки зрения пропускной способности каналов, поскольку не требует передачи измененного файла целиком (передаются лишь различия). Взамен rsync требует значительных объемов памяти. Размер каждого процесса зависит от размера синхронизируемого модуля (в основном от количества каталогов и файлов). rsync может использовать в качестве транспортного протокола `rsh` или `ssh` (по умолчанию); также, может использоваться внутренний протокол rsync (этот метод предпочтителен для публичных rsync-серверов). Поддерживается авторизация клиентов и различные ограничения. Для протокола rsync существует единственный пакет: +rsync часто используется для предоставления доступа к FTP-области FreeBSD, чтобы другие зеркала могли синхронизироваться по вашему. Протокол rsync во многом отличается от FTP, в частности, он гораздо гуманнее с точки зрения пропускной способности каналов, поскольку не требует передачи измененного файла целиком (передаются лишь различия). Взамен rsync требует значительных объёмов памяти. Размер каждого процесса зависит от размера синхронизируемого модуля (в основном от количества каталогов и файлов). rsync может использовать в качестве транспортного протокола `rsh` или `ssh` (по умолчанию); также, может использоваться внутренний протокол rsync (этот метод предпочтителен для публичных rsync-серверов). Поддерживается авторизация клиентов и различные ограничения. Для протокола rsync существует единственный пакет: * package:net/rsync[] [[mirror-serv-http]] ==== HTTP (требуется для веб-страниц, дополнителен для FTP зеркал) -Если вы хотите поддерживать зеркало веб-страниц FreeBSD, вам потребуется установить веб-сервер. Дополнительно, вы можете предоставлять HTTP доступ к FTP-набору файлов FreeBSD. Выбор веб-сервера остается на усмотрение администратора зеркала. Некоторые из наиболее популярных веб-серверов перечислены ниже: +Если вы хотите поддерживать зеркало веб-страниц FreeBSD, вам потребуется установить веб-сервер. Дополнительно, вы можете предоставлять HTTP доступ к FTP-набору файлов FreeBSD. Выбор веб-сервера остаётся на усмотрение администратора зеркала. Некоторые из наиболее популярных веб-серверов перечислены ниже: * package:www/apache24[]: Apache - самый широко распространённый в Интернете веб-сервер, активно используемый проектом FreeBSD. * package:www/boa[]: Boa - это однозадачный HTTP-сервер. В отличие от традиционных веб-серверов, он не создает отдельные процессы для каждого входящего соединения и не запускает множество копий самого себя для обработки множества соединений. Тем не менее, он должен обеспечивать значительно более высокую производительность для чисто статического контента. * package:www/cherokee[]: Cherokee — это очень быстрый, гибкий и простой в настройке веб-сервер. Он поддерживает распространённые современные технологии: FastCGI, SCGI, PHP, CGI, SSL/TLS-шифрование соединений, виртуальные хосты, аутентификацию пользователей, динамическое кодирование и балансировку нагрузки. Также он генерирует журналы, совместимые с Apache. * package:www/lighttpd[]: lighttpd — это безопасный, быстрый, совместимый и очень гибкий веб-сервер, оптимизированный для высокопроизводительных сред. По сравнению с другими веб-серверами, он имеет очень низкое потребление памяти и эффективно распределяет нагрузку на процессор. * package:www/nginx[]: nginx — это высокопроизводительный веб-сервер с низким потреблением памяти и ключевыми функциями для построения современной и эффективной веб-инфраструктуры. Возможности включают HTTP-сервер, обратный прокси для HTTP и почты, кэширование, балансировку нагрузки, сжатие, ограничение запросов, мультиплексирование и повторное использование соединений, выгрузку SSL и потоковую передачу HTTP-медиа. * package:www/thttpd[]: Если вам необходимо обслуживать большое количество статического контента, вы можете обнаружить, что использование приложения, такого как thttpd, более эффективно по сравнению с другими. Оно также оптимизировано для отличной производительности в FreeBSD. [[mirror-howto]] == Как вести зеркало FreeBSD Теперь вам известно, какая потребуется машина и как предоставлять сервисы, но не как получить их самому. :-) В этом разделе описывается процесс ведения зеркала и поддержания его в актуальном состоянии, в том числе какие инструменты использовать и какие сайты выбирать в качестве источников для синхронизации. [[mirror-ftp-rsync]] === Зеркалирование FTP-области Файлы, доступные по FTP, составляют большую часть зеркала. Они включают __дистрибутивные наборы__, необходимые для установки по сети, __ветви (branches)__, в которых отражено текущее состояние исходных текстов, _образы ISO_ для записи компакт-дисков с дистрибутивами для установки, образами "живых" файловых систем и пакетами, дерево портов, исходные дистрибутивы для сборки портов и кучу готовых пакетов. И, разумеется, все вышеописанное - для разных версий FreeBSD и различных архитектур. Наиболее эффективным будет синхронизация FTP-области при помощи rsync. Для этого следует установить пакет package:net/rsync[], который был описан в разделе <>. Поскольку доступ по протоколу rsync не является обязательным, выбранный вами сайт может его не поддерживать. Возможно, вам придется немного поискать в сетевой окрестности зеркало, поддерживающее rsync. [NOTE] ==== Поскольку от количества клиентов rsync ощутимо зависит загрузка сервера, большинство администраторов вводят ограничения доступа. Для поддержания зеркала вам следует связаться с администратором сайта, с которым вы будете синхронизироваться, для уточнения локальных правил и, возможно, для внесения в них исключения для вас (поскольку вы также поддерживаете зеркало). ==== Строка для синхронизации FreeBSD по rsync выглядит примерно так: [source, shell] .... % rsync -vaHz --delete rsync://ftp4.de.FreeBSD.org/FreeBSD/ /pub/FreeBSD/ .... Загляните в документацию по rsync, также доступную по адресу http://rsync.samba.org/[http://rsync.samba.org/] за дополнительной информацией по различным опциям rsync. Обратите внимание, что в случае синхронизации модуля целиком (а не отдельного каталога) необходимо явно указать результирующий каталог, потому что каталог с именем модуля (в данном случае "FreeBSD") не создается. Для поддержания актуальности вам потребуется создать скрипт для запуска подобной команды из man:cron[8]. [[mirror-www]] === Зеркалирование страниц WWW [WARNING] ==== После перевода документации на Hugo/Asciidoctor 2021-01-25, зеркалирование веб-сайта с помощью rsync больше не работает. ==== Ведутся исследования по реализации зеркала веб-сайта с использованием extref:{handbook}mirrors/[официальной инфраструктуры]. Для прежних зеркал веб-сайтов способ достичь зеркалирования сегодня — это собрать веб-сайт локально с соответствующим адресом, на котором он будет размещён. [source, shell] .... % cd website && env HUGO_baseURL="https://www.XX.freebsd.org/" make .... Проверьте дополнительные сведения о инструментах сборки в extref:{fdp-primer}overview/[Проект документации FreeBSD: введение для новых участников, overview-quick-start]. //// [source,shell] .... % rsync -vaHz --delete rsync://bit0.us-west.freebsd.org/FreeBSD-www-data/ /usr/local/www/ .... //// [NOTE] ==== Обратите внимание, что сайт был разделён на www.FreeBSD.org и docs.FreeBSD.org, и между ними есть ссылки; кроме того, на данный момент переменная `HUGO_baseURL` не охватывает все ссылки, поэтому зеркалирование сайта не рекомендуется. ==== [[mirror-pkgs]] === Зеркалирование пакетов Из-за очень высоких требований к пропускной способности, хранилищу и администрированию проект FreeBSD принял решение не разрешать публичные зеркала пакетов. Для сайтов с большим количеством машин может быть выгодно запустить кэширующий HTTP-прокси для процесса man:pkg[8]. Или конкретные пакеты и их зависимости можно загрузить, выполнив что-то вроде следующего: [source, shell] .... % pkg fetch -d -o /usr/local/mirror vim .... После загрузки этих пакетов необходимо сгенерировать метаданные репозитория, выполнив: [source, shell] .... % pkg repo /usr/local/mirror .... После загрузки пакетов и генерации метаданных репозитория предоставьте пакеты клиентским машинам через HTTP. Дополнительную информацию можно найти на man-страницах man:pkg[8], в частности на странице man:pkg-repo[8]. [[mirror-how-often]] === Как часто синхронизироваться? Каждое зеркало должно обновляться как минимум раз в день. Конечно, потребуется скрипт с блокировкой, чтобы предотвратить одновременный запуск нескольких копий, который будет запускаться из man:cron[8]. Поскольку почти каждый администратор делает это по-своему, конкретные инструкции предоставить невозможно. Это может работать примерно так: [.procedure] ==== . Создайте скрипт с командой, которая запустит нужное приложение для обновления зеркала. Рекомендуем использовать скрипт на языке обычного `/bin/sh`. . Добавьте команд перенаправления вывода, чтобы записать диагностику работы в файл. . Попробуйте, как ваш скрипт работает. По завершении проверьте журналы. . При помощи утилиты man:crontab[1] добавьте ваш скрипт в таблицу регулярных заданий man:crontab[5] соответствующего пользователя. Это должен быть пользователь, отличный от пользователя FTP-даемона, чтобы файлы в FTP-области без атрибута "чтение для всех" не были доступны анонимным FTP-пользователям. Данное свойство используется для тестирования перед выходом новых релизов, для того чтобы удостовериться, что все официальные зеркала содержат все необходимые файлы к моменту официального объявления релиза. ==== Некоторые рекомендуемые установки частоты обновления: * FTP-набор: раз в сутки * WWW-страницы: раз в сутки [[mirror-where]] == С какого сервера синхронизироваться -Это важный вопрос, так что мы попытаемся пояснить, откуда берутся ответы. Для начала повторим еще несколько раз: _никогда не синхронизируйтесь с ftp.FreeBSD.org_. +Это важный вопрос, так что мы попытаемся пояснить, откуда берутся ответы. Для начала повторим ещё несколько раз: _никогда не синхронизируйтесь с ftp.FreeBSD.org_. [[mirror-where-organization]] === Организация системы зеркал Зеркала организуются по странам. Имена хостов всех официальных зеркал построены по принципу `ftpN.CC.FreeBSD.org`, где _CC_ (country code) - домен верхнего уровня страны, где расположено зеркало, _N_ - номер зеркала в данной стране. Этот же принцип применим к именам хостов `wwwN.CC.FreeBSD.org` и т.п. Кроме того, есть зеркала без доменной части, обозначающей страну. Все они имеют очень хорошие внешние каналы и обслуживают большое число одновременных соединений. Имя `ftp.FreeBSD.org` на самом деле указывает на две машины, одна из которых в настоящее время находится в Дании, а другая в США. Ни одна из этих машин _НЕ_ является основным сайтом, и потому не должна использоваться для синхронизации. Масса документации для "живых" пользователей указывает на `ftp.FreeBSD.org`, так что автоматическим системам ведения зеркал следует выбирать другие источники синхронизации. Кроме того, существует иерархия зеркал в терминах их удаленности от центра, или __слоях__. Основные сайты могут быть описаны как __Зеркала нулевого слоя__. Зеркала, синхронизирующиеся по ним, считаются __слоем 1__, следующие - _слоем 2_ и т.д. Официальные сайты приглашаются на низкие слои, однако следует помнить, что чем меньше номер слоя, тем выше требования к зеркалу, как было описано в <>. Помимо того, доступ к зеркалам 1 слоя может быть ограничен; безусловно ограничен доступ к основным сайтам. Иерархия _слоев_ не отражается в DNS и, вообще говоря, нигде (кроме мастер-сайтов) не документирована. Тем не менее, официальные зеркала с малыми (1-4, как правило) номерами обычно представляют первый слой. (Это грубая оценка, и ни в коем случае не правило). [[mirror-where-where]] === Так откуда же мне синхронизироваться? Главное - НЕ с `ftp.FreeBSD.org`. Короткий ответ: с зеркала, которое расположено недалеко от вас в терминах Интернет, и/или доступ к которому наилучший. [[mirror-where-simple]] ==== Я хочу получить копию зеркала хоть откуда-нибудь! Если у вас нет особых намерений или требований, применимо утверждение в crossref:hubs[mirror-where-where, Так откуда же мне синхронизироваться?]. Это означает: [.procedure] ==== . Выберите те из них, с которыми вам работать быстрее всего (меньшее число промежуточных узлов и время отклика), и которые предоставляют нужные вам сервисы (такие как rsync). . Свяжитесь с администраторами выбранного сервера, опишите ваши запросы и уточните их правила. . Сконфигурируйте ваше зеркало, как описывалось выше. ==== [[mirror-where-official]] ==== Я поддерживаю официальное зеркало, какой сайт мне выбрать? В основном, правила, описанные в crossref:hubs[mirror-where-simple, Я хочу получить копию зеркала хоть откуда-нибудь!], применимы. Дополнительно можно убедиться, что выбранный сайт принадлежит низкому слою. Другие соображения относительно _официальных_ зеркал описаны в <>. [[mirror-where-master]] ==== Мне нужен доступ к основным сайтам! -При наличии достаточных причин вы можете получить доступ к одному из основных сайтов. Доступ к ним ограничен; существуют специальные правила их использования. Наличие у вас статуса _официального_ зеркала, безусловно, является хорошим подспорьем. В противном случае убедитесь, что ваша страна действительно нуждается еще в одном зеркале. Если их уже три или более, сначала свяжитесь с администратором соответствующей зоны DNS (mailto:hostmaster@CC.FreeBSD.org[hostmaster@CC.FreeBSD.org]) или напишите в {freebsd-hubs}. +При наличии достаточных причин вы можете получить доступ к одному из основных сайтов. Доступ к ним ограничен; существуют специальные правила их использования. Наличие у вас статуса _официального_ зеркала, безусловно, является хорошим подспорьем. В противном случае убедитесь, что ваша страна действительно нуждается ещё в одном зеркале. Если их уже три или более, сначала свяжитесь с администратором соответствующей зоны DNS (mailto:hostmaster@CC.FreeBSD.org[hostmaster@CC.FreeBSD.org]) или напишите в {freebsd-hubs}. Тот, кто помог вам стать _официальным_ зеркалом, должен был помочь вам получить доступ к соответствующему вышестоящему хосту — либо к одному из основных сайтов, либо к подходящему сайту уровня Tier-1. Если этого не произошло, вы можете отправить письмо по адресу mailto:mirror-admin@FreeBSD.org[mirror-admin@FreeBSD.org], чтобы запросить помощь в этом вопросе. Существует один основной сайт для синхронизации набора файлов FTP. [[mirror-where-master-ftp]] ===== ftp-master.FreeBSD.org Это основной сервер для синхронизации FTP набора. В дополнение к FTP, `ftp-master.FreeBSD.org` поддерживает доступ по rsync. Использование этих протоколов описано в crossref:hubs[mirror-ftp-rsync, Mirroring the FTP Site]. Приветствуется предоставление зеркалами _1 уровня_ доступа к FTP-области по протоколу rsync. [[mirror-official]] == Официальные зеркала Официальные зеркала обладают следующим свойствами * a) имеют запись в домене `FreeBSD.org` (обычно типа CNAME). * b) присутствуют в списке официальных зеркал в Руководстве по FreeBSD и другой документации. На настоящий момент это все, что отличает их от прочих зеркал. Официальные зеркала не обязательно принадлежат к __Первому уровню__, однако, вряд ли можно найти зеркало __уровня 1__, не являющееся официальным. [[mirror-official-requirements]] === Отдельные требования к официальным зеркалам 1 уровня Описать требования для всех официальных зеркал не так просто, поскольку проект FreeBSD достаточно мягок в этом отношении. Несколько проще указать, что требуется от __официальных зеркал уровня 1__. Прочие официальные зеркала должны рассматривать этот список как __настойчивые пожелания__. Зеркала 1 уровня должны: * поддерживать полный список файлов * предоставлять доступ для других зеркал * обеспечивать доступ по протоколам ftp и rsync Кроме того, администратор такого зеркала должен быть подписан на {freebsd-hubs}. См. extref:{handbook}eresources[здесь, eresources-mail] для дополнительной информации о подписке. [IMPORTANT] ==== Очень важно для администратора хаба, особенно администраторов хаба уровня Tier-1, проверять https://www.FreeBSD.org/releng/[график выпусков] следующего релиза FreeBSD. Это важно, потому что это позволит вам узнать, когда запланирован выход следующего релиза, и, таким образом, даст вам время подготовиться к большому всплеску трафика, который последует за ним. Кроме того, важно поддерживать актуальность зеркал (в особенности зеркал уровня 1). Если Зеркало1 не синхронизировалось в течение длительного времени, то зеркала следующего уровня будут синхронизироваться по устаревшей информации и т.д. Поддерживайте актуальность ваших зеркал! ==== [[mirror-official-become]] === Как стать официальным зеркалом? Обратитесь к администраторам кластера, как указано в документации по адресу https://www.FreeBSD.org/administration/#t-clusteradm. [[mirror-statpages]] == Статистика некоторых зеркал Вот ссылки на страницы статистики ваших любимых зеркал (иначе говоря, единственных, кто предоставляет такую статистику). [[mirror-statpagesftp]] === Статистика FTP сайтов * ftp.is.FreeBSD.org - mailto:hostmaster@is.FreeBSD.org[hostmaster@is.FreeBSD.org] - http://www.rhnet.is/status/draupnir/draupnir.html[ (Bandwidth)] http://www.rhnet.is/status/ftp/ftp-notendur.html[(FTP processes)] http://www.rhnet.is/status/ftp/http-notendur.html[(HTTP processes)] * ftp2.ru.FreeBSD.org - mailto:mirror@macomnet.ru[mirror@macomnet.ru] - http://mirror.macomnet.net/mrtg/mirror.macomnet.net_195.128.64.25.html[(Bandwidth)] http://mirror.macomnet.net/mrtg/mirror.macomnet.net_proc.html[(HTTP and FTP users)] diff --git a/documentation/content/ru/articles/hubs/_index.po b/documentation/content/ru/articles/hubs/_index.po index 5f2d7b4fe1..1f10a1e8f4 100644 --- a/documentation/content/ru/articles/hubs/_index.po +++ b/documentation/content/ru/articles/hubs/_index.po @@ -1,1209 +1,1209 @@ # SOME DESCRIPTIVE TITLE # Copyright (C) YEAR The FreeBSD Project # This file is distributed under the same license as the FreeBSD Documentation package. -# Vladlen Popolitov , 2025. +# Vladlen Popolitov , 2025, 2026. msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" "POT-Creation-Date: 2025-11-08 16:17+0000\n" -"PO-Revision-Date: 2025-11-12 04:45+0000\n" +"PO-Revision-Date: 2026-03-04 20:01+0000\n" "Last-Translator: Vladlen Popolitov \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 4.17\n" #. type: YAML Front Matter: description #: documentation/content/en/articles/hubs/_index.adoc:1 #, no-wrap msgid "The all in one guide for mirroring the FreeBSD website, FTP servers, and more" msgstr "Полное руководство по зеркалированию веб-сайта FreeBSD, FTP-серверов и многого другого" #. type: Title = #: documentation/content/en/articles/hubs/_index.adoc:1 #: documentation/content/en/articles/hubs/_index.adoc:17 #, no-wrap msgid "Mirroring FreeBSD" msgstr "Поддержка зеркал FreeBSD" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:50 msgid "Abstract" msgstr "Аннотация" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:52 msgid "" "An in-progress article on how to mirror FreeBSD, aimed at hub administrators." msgstr "" "Рабочий вариант статьи, описывающей процесс создания и поддержки зеркала " "FreeBSD и адресованной администраторам зеркал." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:54 msgid "'''" msgstr "'''" #. type: delimited block = 4 #: documentation/content/en/articles/hubs/_index.adoc:60 msgid "We are not accepting new community mirrors at this time." msgstr "На текущий момент заявки на подключение новых зеркал не принимаются." #. type: Title == #: documentation/content/en/articles/hubs/_index.adoc:63 #, no-wrap msgid "Contact Information" msgstr "Контактная информация" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:67 msgid "" "The Mirror System Coordinators can be reached through email at mailto:mirror-" "admin@FreeBSD.org[mirror-admin@FreeBSD.org]. There is also a {freebsd-hubs}." msgstr "" "Координаторы системы зеркал доступны по электронной почте по адресу mailto:" "mirror-admin@FreeBSD.org[mirror-admin@FreeBSD.org]. Помимо этого, существует " "{freebsd-hubs}." #. type: Title == #: documentation/content/en/articles/hubs/_index.adoc:69 #, no-wrap msgid "Requirements for FreeBSD Mirrors" msgstr "Требования к зеркалам FreeBSD" #. type: Title === #: documentation/content/en/articles/hubs/_index.adoc:72 #, no-wrap msgid "Disk Space" msgstr "Дисковое пространство" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:82 msgid "" "Disk space is one of the most important requirements. Depending on the set " "of releases, architectures, and degree of completeness you want to mirror, a " "huge amount of disk space may be consumed. Also keep in mind that " "_official_ mirrors are probably required to be complete. The web pages " "should always be mirrored completely. Also note that the numbers stated " "here are reflecting the current state (at {rel120-current}-RELEASE/{rel113-" "current}-RELEASE). Further development and releases will only increase the " "required amount. Also make sure to keep some (ca. 10-20%) extra space " "around just to be sure. Here are some approximate figures:" msgstr "" "Одним из наиболее важных требований является дисковое пространство. В " "зависимости от набора релизов, архитектур и степени полноты зеркала вам " -"может потребоваться огромный объем диска. Не лишним будет помнить, что " +"может потребоваться огромный объём диска. Не лишним будет помнить, что " "_официальное_ зеркало, скорее всего, должно быть полным. Веб-страницы всегда " "должны зеркалироваться полностью. Кроме того, учтите, что приводимые оценки " -"объема относятся к состоянию на момент последнего редактирования данной " +"объёма относятся к состоянию на момент последнего редактирования данной " "статьи ({rel120-current}-RELEASE/{rel113-current}-RELEASE). Дальнейший " -"процесс разработки и последующие релизы только увеличат требуемый объем. " +"процесс разработки и последующие релизы только увеличат требуемый объём. " "Кроме того, разумно будет зарезервировать некоторое (10-20%) дополнительное " -"пространство спокойствия ради. Вот некоторые оценки объема:" +"пространство спокойствия ради. Вот некоторые оценки объёма:" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:84 msgid "Full FTP Distribution: 1.4 TB" msgstr "Полное зеркало FTP: 1.4 TB" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:85 msgid "CTM deltas: 10 GB" msgstr "Комплект изменений CTM: 10 GB" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:86 msgid "Web pages: 1GB" msgstr "Веб-страницы: 1 GB" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:88 msgid "" "The current disk usage of FTP Distribution can be found at link:ftp://ftp." "FreeBSD.org/pub/FreeBSD/dir.sizes[ftp://ftp.FreeBSD.org/pub/FreeBSD/dir." "sizes]." msgstr "" "Текущее использование диска зеркалом FTP можно посмотреть на link:ftp://ftp." "FreeBSD.org/pub/FreeBSD/dir.sizes[ftp://ftp.FreeBSD.org/pub/FreeBSD/dir." "sizes]." #. type: Title === #: documentation/content/en/articles/hubs/_index.adoc:90 #, no-wrap msgid "Network Connection/Bandwidth" msgstr "Требования к сетевой связности и пропускной способности" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:97 msgid "" "Of course, you need to be connected to the Internet. The required bandwidth " "depends on your intended use of the mirror. If you just want to mirror some " "parts of FreeBSD for local use at your site/intranet, the demand may be much " "smaller than if you want to make the files publicly available. If you " "intend to become an official mirror, the bandwidth required will be even " "higher. We can only give rough estimates here:" msgstr "" "Разумеется, у вас должно быть подключение к интернет. Требуемая пропускная " "способность ваших каналов зависит от предполагаемого профиля использования " "вашего зеркала. Если вы собираетесь копировать некоторые части FreeBSD для " "локального использования на вашей машине или в интранете, требования могут " "быть много мягче, чем для публичного зеркала. Для официального зеркала " -"необходимая пропускная способность увеличивается еще больше. Мы можем дать " +"необходимая пропускная способность увеличивается ещё больше. Мы можем дать " "лишь очень грубые оценки:" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:99 msgid "" "Local site, no public access: basically no minimum, but < 2 Mbps could make " "syncing too slow." msgstr "" "Зеркало для локального доступа: фактически минимум не определен, но канал " "шириной менее 2 Mbps может сделать процесс обновления мучительно медленным." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:100 msgid "Unofficial public site: 34 Mbps is probably a good start." msgstr "Неофициальное публичное зеркало: 34 Mbps выглядит неплохо для начала." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:101 msgid "" "Official site: > 100 Mbps is recommended, and your host should be connected " "as close as possible to your border router." msgstr "" "Официальное зеркало: рекомендуется канал шириной более 100 Mbps; кроме того, " "ваша машина должна стоять как можно ближе к граничным маршрутизаторам вашей " "сети." #. type: Title === #: documentation/content/en/articles/hubs/_index.adoc:103 #, no-wrap msgid "System Requirements, CPU, RAM" msgstr "Системные требования, процессор и память" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:111 msgid "" "One thing this depends on the expected number of clients, which is " "determined by the server's policy. It is also affected by the types of " "services you want to offer. Plain FTP or HTTP services may not require a " "huge amount of resources. Watch out if you provide rsync. This can have a " "huge impact on CPU and memory requirements as it is considered a memory " "hog. The following are just examples to give you a very rough hint." msgstr "" "Эти требования в первую очередь определяются максимальным ожидаемым " "количеством клиентов (устанавливается администратором сервера). Также, на " "требуемые ресурсы влияет список сервисов, которые вы будете предоставлять. " "Зеркала FTP и/или HTTP не требуют особенно много ресурсов. Будьте на чеку, " "если планируете предоставлять rsync. Выбор rsync может иметь огромное " "влияние на требования к аппаратным ресурсам, поскольку rsync признан " "\"прожорливым\" по памяти. Вот некоторые советы по конфигурации аппаратной " "части сервера." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:114 msgid "" "For a moderately visited site that offers rsync, you might consider a " "current CPU with around 800MHz - 1 GHz, and at least 512MB RAM. This is " "probably the minimum you want for an _official_ site." msgstr "" "Для умеренно посещаемого сайта, предоставляющего rsync, можно использовать " "процессор с частотой 800MHz - 1 GHz и по крайней мере 512MB памяти. Скорее " "всего, данная конфигурация может считаться минимальной для _официального_ " "зеркала." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:116 msgid "" "For a frequently used site you definitely need more RAM (consider 2GB as a " "good start) and possibly more CPU, which could also mean that you need to go " "for a SMP system." msgstr "" "Для регулярно посещаемого сайта вам потребуется больше памяти (хорошим " "стартом будет 2GB) и больше процессорной мощности, что может означать " "требование многопроцессорной (SMP) платформы." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:120 msgid "" "You also want to consider a fast disk subsystem. Operations on the SVN " "repository require a fast disk subsystem (RAID is highly advised). A SCSI " "controller that has a cache of its own can also speed up things since most " "of these services incur a large number of small modifications to the disk." msgstr "" "Кроме того, вам потребуется быстрая дисковая подсистема, в первую очередь, " "для работы с репозиторием SVN (крайне рекомендуем RAID). Контроллер SCSI, " "оборудованный собственной памятью, также может ощутимо ускорить процесс, " "поскольку большая часть сервисов связана с большим количеством дисковых " "запросов небольшого размера." #. type: Title === #: documentation/content/en/articles/hubs/_index.adoc:122 #, no-wrap msgid "Services to Offer" msgstr "Предоставляемые сервисы" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:127 msgid "" "Every mirror site is required to have a set of core services available. In " "addition to these required services, there are a number of optional services " "that server administrators may choose to offer. This section explains which " "services you can provide and how to go about implementing them." msgstr "" "Всякое зеркало должно предоставлять набор основных сервисов. Помимо " "требуемого минимального набора, существуют дополнительные сервисы, которые " "администратор сервера может пожелать предоставлять. Этот раздел описывает, " "какие сервисы вы можете предоставлять, и какие действия для этого " "потребуются от вас." #. type: Title ==== #: documentation/content/en/articles/hubs/_index.adoc:129 #, no-wrap msgid "FTP (required for FTP Fileset)" msgstr "FTP (требуется для FTP зеркала)" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:135 msgid "" "This is one of the most basic services, and it is required for each mirror " "offering public FTP distributions. FTP access must be anonymous, and no " "upload/download ratios are allowed (a ridiculous thing anyway). Upload " "capability is not required (and _must_ never be allowed for the FreeBSD file " "space). Also the FreeBSD archive should be available under the path [." "filename]#/pub/FreeBSD#." msgstr "" "Это один из наиболее базовых сервисов; его предоставление требуется для " "каждого зеркала, распространяющего файлы FreeBSD по FTP. Доступ по FTP " "должен быть анонимным, и не должны применяться какие-либо ограничения по " -"соотношению объема передано/принято (что вообще является, на наш взгляд, " +"соотношению объёма передано/принято (что вообще является, на наш взгляд, " "странным подходом). Закачка (upload) файлов на сервер не требуется (и " "_должна_ быть запрещена в разделе FreeBSD). Кроме того, архив файлов FreeBSD " "должен быть доступен с путем [.filename]#/pub/FreeBSD#." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:137 msgid "" "There is a lot of software available which can be set up to allow anonymous " "FTP (in alphabetical order)." msgstr "" "Для предоставления анонимного FTP доступа может быть использован целый ряд " "программ (перечислены в алфавитном порядке)." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:139 msgid "" "`/usr/libexec/ftpd`: FreeBSD's own ftpd can be used. Be sure to read man:" "ftpd[8]." msgstr "" "`/usr/libexec/ftpd`: базовый FTP-даемон FreeBSD. Не забудьте прочитать man:" "ftpd[8]." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:140 msgid "package:ftp/ncftpd[]: A commercial package, free for educational use." msgstr "" "package:ftp/ncftpd[]: коммерческий пакет, свободен для использования в " "учебных целях." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:141 msgid "package:ftp/oftpd[]: An ftpd designed with security as a main focus." msgstr "" "package:ftp/oftpd[]: FTP-даемон, написанный в основном с точки зрения " "защищенности." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:142 msgid "package:ftp/proftpd[]: A modular and very flexible ftpd." msgstr "package:ftp/proftpd[]: Модульный и очень гибкий FTP-даемон." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:143 msgid "package:ftp/pure-ftpd[]: Another ftpd developed with security in mind." msgstr "" "package:ftp/pure-ftpd[]: Еще один FTP-даемон, разработанный с позиций " "защищенности." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:144 msgid "package:ftp/twoftpd[]: As above." msgstr "package:ftp/twoftpd[]: См. предыдущий пункт." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:145 msgid "package:ftp/vsftpd[]: The \"very secure\" ftpd." msgstr "package:ftp/vsftpd[]: \"очень защищенный\" (\"very secure\") ftpd." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:149 msgid "" "FreeBSD's `ftpd`, `proftpd` and maybe `ncftpd` are among the most commonly " "used FTPds. The others do not have a large userbase among mirror sites. " "One thing to consider is that you may need flexibility in limiting how many " "simultaneous connections are allowed, thus limiting how much network " "bandwidth and system resources are consumed." msgstr "" "ftpd, proftpd и, возможно, ncftpd являются наиболее часто встречающимися FTP " "серверами. Прочие распространены среди существующих зеркал в существенно " "меньшей степени. Дополнительным поводом для рассмотрения может являться " "возможность гибко ограничивать количество одновременных соединений, что " "поможет вам удержать в нужных рамках потребление пропускной способности " "ваших каналов и машинные ресурсы." #. type: Title ==== #: documentation/content/en/articles/hubs/_index.adoc:151 #, no-wrap msgid "Rsync (optional for FTP Fileset)" msgstr "Rsync (необязательный сервис для FTP зеркала)" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:161 msgid "" "Rsync is often offered for access to the contents of the FTP area of " "FreeBSD, so other mirror sites can use your system as their source. The " "protocol is different from FTP in many ways. It is much more bandwidth " "friendly, as only differences between files are transferred instead of whole " "files when they change. Rsync does require a significant amount of memory " "for each instance. The size depends on the size of the synced module in " "terms of the number of directories and files. Rsync can use `rsh` and `ssh` " "(now default) as a transport, or use its own protocol for stand-alone access " "(this is the preferred method for public rsync servers). Authentication, " "connection limits, and other restrictions may be applied. There is just one " "software package available:" msgstr "" "rsync часто используется для предоставления доступа к FTP-области FreeBSD, " "чтобы другие зеркала могли синхронизироваться по вашему. Протокол rsync во " "многом отличается от FTP, в частности, он гораздо гуманнее с точки зрения " "пропускной способности каналов, поскольку не требует передачи измененного " "файла целиком (передаются лишь различия). Взамен rsync требует значительных " -"объемов памяти. Размер каждого процесса зависит от размера синхронизируемого " +"объёмов памяти. Размер каждого процесса зависит от размера синхронизируемого " "модуля (в основном от количества каталогов и файлов). rsync может " "использовать в качестве транспортного протокола `rsh` или `ssh` (по " "умолчанию); также, может использоваться внутренний протокол rsync (этот " "метод предпочтителен для публичных rsync-серверов). Поддерживается " "авторизация клиентов и различные ограничения. Для протокола rsync существует " "единственный пакет:" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:163 msgid "package:net/rsync[]" msgstr "package:net/rsync[]" #. type: Title ==== #: documentation/content/en/articles/hubs/_index.adoc:165 #, no-wrap msgid "HTTP (required for Web Pages, Optional for FTP Fileset)" msgstr "HTTP (требуется для веб-страниц, дополнителен для FTP зеркал)" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:171 msgid "" "If you want to offer the FreeBSD web pages, you will need to install a web " "server. You may optionally offer the FTP fileset via HTTP. The choice of " "web server software is left up to the mirror administrator. Some of the " "most popular choices are:" msgstr "" "Если вы хотите поддерживать зеркало веб-страниц FreeBSD, вам потребуется " "установить веб-сервер. Дополнительно, вы можете предоставлять HTTP доступ к " -"FTP-набору файлов FreeBSD. Выбор веб-сервера остается на усмотрение " +"FTP-набору файлов FreeBSD. Выбор веб-сервера остаётся на усмотрение " "администратора зеркала. Некоторые из наиболее популярных веб-серверов " "перечислены ниже:" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:173 msgid "" "package:www/apache24[]: Apache is still one of the most widely deployed web " "servers on the Internet. It is used extensively by the FreeBSD Project." msgstr "" "package:www/apache24[]: Apache - самый широко распространённый в Интернете " "веб-сервер, активно используемый проектом FreeBSD." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:174 msgid "" "package:www/boa[]: Boa is a single-tasking HTTP server. Unlike traditional " "web servers, it does not fork for each incoming connection, nor does it fork " "many copies of itself to handle multiple connections. Although, it should " "provide considerably great performance for purely static content." msgstr "" "package:www/boa[]: Boa - это однозадачный HTTP-сервер. В отличие от " "традиционных веб-серверов, он не создает отдельные процессы для каждого " "входящего соединения и не запускает множество копий самого себя для " "обработки множества соединений. Тем не менее, он должен обеспечивать " "значительно более высокую производительность для чисто статического контента." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:175 msgid "" "package:www/cherokee[]: Cherokee is a very fast, flexible and easy to " "configure web server. It supports the widespread technologies nowadays: " "FastCGI, SCGI, PHP, CGI, SSL/TLS encrypted connections, vhosts, users " "authentication, on the fly encoding and load balancing. It also generates " "Apache compatible log files." msgstr "" "package:www/cherokee[]: Cherokee — это очень быстрый, гибкий и простой в " "настройке веб-сервер. Он поддерживает распространённые современные " "технологии: FastCGI, SCGI, PHP, CGI, SSL/TLS-шифрование соединений, " "виртуальные хосты, аутентификацию пользователей, динамическое кодирование и " "балансировку нагрузки. Также он генерирует журналы, совместимые с Apache." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:176 msgid "" "package:www/lighttpd[]: lighttpd is a secure, fast, compliant and very " "flexible web server which has been optimized for high-performance " "environments. It has a very low memory footprint compared to other web " "servers and takes care of cpu-load." msgstr "" "package:www/lighttpd[]: lighttpd — это безопасный, быстрый, совместимый и " "очень гибкий веб-сервер, оптимизированный для высокопроизводительных сред. " "По сравнению с другими веб-серверами, он имеет очень низкое потребление " "памяти и эффективно распределяет нагрузку на процессор." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:177 msgid "" "package:www/nginx[]: nginx is a high performance edge web server with a low " "memory footprint and key features to build a modern and efficient web " "infrastructure. Features include a HTTP server, HTTP and mail reverse proxy, " "caching, load balancing, compression, request throttling, connection " "multiplexing and reuse, SSL offload and HTTP media streaming." msgstr "" "package:www/nginx[]: nginx — это высокопроизводительный веб-сервер с низким " "потреблением памяти и ключевыми функциями для построения современной и " "эффективной веб-инфраструктуры. Возможности включают HTTP-сервер, обратный " "прокси для HTTP и почты, кэширование, балансировку нагрузки, сжатие, " "ограничение запросов, мультиплексирование и повторное использование " "соединений, выгрузку SSL и потоковую передачу HTTP-медиа." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:178 msgid "" "package:www/thttpd[]: If you are going to be serving a large amount of " "static content you may find that using an application such as thttpd is more " "efficient than others. It is also optimized for excellent performance on " "FreeBSD." msgstr "" "package:www/thttpd[]: Если вам необходимо обслуживать большое количество " "статического контента, вы можете обнаружить, что использование приложения, " "такого как thttpd, более эффективно по сравнению с другими. Оно также " "оптимизировано для отличной производительности в FreeBSD." #. type: Title == #: documentation/content/en/articles/hubs/_index.adoc:180 #, no-wrap msgid "How to Mirror FreeBSD" msgstr "Как вести зеркало FreeBSD" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:184 msgid "" "Ok, now you know the requirements and how to offer the services, but not how " "to get it. :-) This section explains how to actually mirror the various " "parts of FreeBSD, what tools to use, and where to mirror from." msgstr "" "Теперь вам известно, какая потребуется машина и как предоставлять сервисы, " "но не как получить их самому. :-) В этом разделе описывается процесс ведения " "зеркала и поддержания его в актуальном состоянии, в том числе какие " "инструменты использовать и какие сайты выбирать в качестве источников для " "синхронизации." #. type: Title === #: documentation/content/en/articles/hubs/_index.adoc:186 #, no-wrap msgid "Mirroring the FTP Site" msgstr "Зеркалирование FTP-области" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:191 msgid "" "The FTP area is the largest amount of data that needs to be mirrored. It " "includes the _distribution sets_ required for network installation, the " "_branches_ which are actually snapshots of checked-out source trees, the " "_ISO Images_ to write CD-ROMs with the installation distribution, a live " "file system, and a snapshot of the ports tree. All of course for various " "FreeBSD versions, and various architectures." msgstr "" "Файлы, доступные по FTP, составляют большую часть зеркала. Они включают " "__дистрибутивные наборы__, необходимые для установки по сети, __ветви " "(branches)__, в которых отражено текущее состояние исходных текстов, _образы " "ISO_ для записи компакт-дисков с дистрибутивами для установки, образами " "\"живых\" файловых систем и пакетами, дерево портов, исходные дистрибутивы " "для сборки портов и кучу готовых пакетов. И, разумеется, все вышеописанное - " "для разных версий FreeBSD и различных архитектур." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:197 msgid "" "The best way to mirror the FTP area is rsync. You can install the port " "package:net/rsync[] and then use rsync to sync with your upstream host. " "rsync is already mentioned in crossref:hubs[mirror-serv-rsync, Rsync " "(optional for FTP Fileset)]. Since rsync access is not required, your " "preferred upstream site may not allow it. You may need to hunt around a " "little bit to find a site that allows rsync access." msgstr "" "Наиболее эффективным будет синхронизация FTP-области при помощи rsync. Для " "этого следует установить пакет package:net/rsync[], который был описан в " "разделе <>. Поскольку доступ по протоколу rsync не " "является обязательным, выбранный вами сайт может его не поддерживать. " "Возможно, вам придется немного поискать в сетевой окрестности зеркало, " "поддерживающее rsync." #. type: delimited block = 4 #: documentation/content/en/articles/hubs/_index.adoc:202 msgid "" "Since the number of rsync clients will have a significant impact on the " "server machine, most admins impose limitations on their server. For a " "mirror, you should ask the site maintainer you are syncing from about their " "policy, and maybe an exception for your host (since you are a mirror)." msgstr "" "Поскольку от количества клиентов rsync ощутимо зависит загрузка сервера, " "большинство администраторов вводят ограничения доступа. Для поддержания " "зеркала вам следует связаться с администратором сайта, с которым вы будете " "синхронизироваться, для уточнения локальных правил и, возможно, для внесения " "в них исключения для вас (поскольку вы также поддерживаете зеркало)." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:205 msgid "A command line to mirror FreeBSD might look like:" msgstr "Строка для синхронизации FreeBSD по rsync выглядит примерно так:" #. type: delimited block . 4 #: documentation/content/en/articles/hubs/_index.adoc:209 #, no-wrap msgid "% rsync -vaHz --delete rsync://ftp4.de.FreeBSD.org/FreeBSD/ /pub/FreeBSD/\n" msgstr "% rsync -vaHz --delete rsync://ftp4.de.FreeBSD.org/FreeBSD/ /pub/FreeBSD/\n" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:213 msgid "" "Consult the documentation for rsync, which is also available at http://rsync." "samba.org/[http://rsync.samba.org/], about the various options to be used " "with rsync. If you sync the whole module (unlike subdirectories), be aware " "that the module-directory (here \"FreeBSD\") will not be created, so you " "cannot omit the target directory. Also you might want to set up a script " "framework that calls such a command via man:cron[8]." msgstr "" "Загляните в документацию по rsync, также доступную по адресу http://rsync." "samba.org/[http://rsync.samba.org/] за дополнительной информацией по " "различным опциям rsync. Обратите внимание, что в случае синхронизации модуля " "целиком (а не отдельного каталога) необходимо явно указать результирующий " "каталог, потому что каталог с именем модуля (в данном случае \"FreeBSD\") не " "создается. Для поддержания актуальности вам потребуется создать скрипт для " "запуска подобной команды из man:cron[8]." #. type: Title === #: documentation/content/en/articles/hubs/_index.adoc:215 #, no-wrap msgid "Mirroring the WWW Pages" msgstr "Зеркалирование страниц WWW" #. type: delimited block = 4 #: documentation/content/en/articles/hubs/_index.adoc:220 msgid "" "Since doc migration to Hugo/Asciidoctor on 2021-01-25, mirroring the website " "with rsync no longer works." msgstr "" "После перевода документации на Hugo/Asciidoctor 2021-01-25, зеркалирование " "веб-сайта с помощью rsync больше не работает." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:223 msgid "" "There are ongoing studies to implement a website mirror with the extref:" "{handbook}mirrors/[official infrastructure]." msgstr "" "Ведутся исследования по реализации зеркала веб-сайта с использованием extref:" "{handbook}mirrors/[официальной инфраструктуры]." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:225 msgid "" "For the former website mirrors, a way to achieve mirroring the website today " "is building the website locally with the corresponding address it will be " "hosted." msgstr "" "Для прежних зеркал веб-сайтов способ достичь зеркалирования сегодня — это " "собрать веб-сайт локально с соответствующим адресом, на котором он будет " "размещён." #. type: delimited block . 4 #: documentation/content/en/articles/hubs/_index.adoc:229 #, no-wrap msgid "% cd website && env HUGO_baseURL=\"https://www.XX.freebsd.org/\" make\n" msgstr "% cd website && env HUGO_baseURL=\"https://www.XX.freebsd.org/\" make\n" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:232 msgid "" "Check for more details about the build tools on extref:{fdp-primer}overview/" "[FreeBSD Documentation Project Primer for New Contributors, overview-quick-" "start] book." msgstr "" "Проверьте дополнительные сведения о инструментах сборки в extref:{fdp-primer}" "overview/[Проект документации FreeBSD: введение для новых участников, " "overview-quick-start]." #. [source,shell] #. .... #. % rsync -vaHz --delete rsync://bit0.us-west.freebsd.org/FreeBSD-www-data/ /usr/local/www/ #. .... #. type: delimited block = 4 #: documentation/content/en/articles/hubs/_index.adoc:243 msgid "" "Notice the website was split into www.FreeBSD.org and docs.FreeBSD.org, and " "there are links between them; plus, at this moment, `HUGO_baseURL` variable " "won't cover all links, this way, mirroring the website is discouraged." msgstr "" "Обратите внимание, что сайт был разделён на www.FreeBSD.org и docs.FreeBSD." "org, и между ними есть ссылки; кроме того, на данный момент переменная " "`HUGO_baseURL` не охватывает все ссылки, поэтому зеркалирование сайта не " "рекомендуется." #. type: Title === #: documentation/content/en/articles/hubs/_index.adoc:246 #, no-wrap msgid "Mirroring Packages" msgstr "Зеркалирование пакетов" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:251 msgid "" "Due to very high requirements of bandwidth, storage and administration the " "FreeBSD Project has decided not to allow public mirrors of packages. For " "sites with lots of machines, it might be advantagous to run a caching HTTP " "proxy for the man:pkg[8] process. Alternatively specific packages and their " "dependencies can be fetched by running something like the following:" msgstr "" "Из-за очень высоких требований к пропускной способности, хранилищу и " "администрированию проект FreeBSD принял решение не разрешать публичные " "зеркала пакетов. Для сайтов с большим количеством машин может быть выгодно " "запустить кэширующий HTTP-прокси для процесса man:pkg[8]. Или конкретные " "пакеты и их зависимости можно загрузить, выполнив что-то вроде следующего:" #. type: delimited block . 4 #: documentation/content/en/articles/hubs/_index.adoc:255 #, no-wrap msgid "% pkg fetch -d -o /usr/local/mirror vim\n" msgstr "% pkg fetch -d -o /usr/local/mirror vim\n" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:258 msgid "" "Once those packages have been fetched, the repository metadata must be " "generated by running:" msgstr "" "После загрузки этих пакетов необходимо сгенерировать метаданные репозитория, " "выполнив:" #. type: delimited block . 4 #: documentation/content/en/articles/hubs/_index.adoc:262 #, no-wrap msgid "% pkg repo /usr/local/mirror\n" msgstr "% pkg repo /usr/local/mirror\n" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:266 msgid "" "Once the packages have been fetched and the metadata for the repository has " "been generated, serve the packages up to the client machines via HTTP. For " "additional information see the man pages for man:pkg[8], specifically the " "man:pkg-repo[8] page." msgstr "" "После загрузки пакетов и генерации метаданных репозитория предоставьте " "пакеты клиентским машинам через HTTP. Дополнительную информацию можно найти " "на man-страницах man:pkg[8], в частности на странице man:pkg-repo[8]." #. type: Title === #: documentation/content/en/articles/hubs/_index.adoc:268 #, no-wrap msgid "How Often Should I Mirror?" msgstr "Как часто синхронизироваться?" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:274 msgid "" "Every mirror should be updated at a minimum of once per day. Certainly a " "script with locking to prevent multiple runs happening at the same time will " "be needed to run from man:cron[8]. Since nearly every admin does this in " "their own way, specific instructions cannot be provided. It could work " "something like this:" msgstr "" "Каждое зеркало должно обновляться как минимум раз в день. Конечно, " "потребуется скрипт с блокировкой, чтобы предотвратить одновременный запуск " "нескольких копий, который будет запускаться из man:cron[8]. Поскольку почти " "каждый администратор делает это по-своему, конкретные инструкции " "предоставить невозможно. Это может работать примерно так:" #. type: delimited block = 4 #: documentation/content/en/articles/hubs/_index.adoc:278 msgid "" "Put the command to run your mirroring application in a script. Use of a " "plain `/bin/sh` script is recommended." msgstr "" "Создайте скрипт с командой, которая запустит нужное приложение для " "обновления зеркала. Рекомендуем использовать скрипт на языке обычного `/bin/" "sh`." #. type: delimited block = 4 #: documentation/content/en/articles/hubs/_index.adoc:279 msgid "" "Add some output redirections so diagnostic messages are logged to a file." msgstr "" "Добавьте команд перенаправления вывода, чтобы записать диагностику работы в " "файл." #. type: delimited block = 4 #: documentation/content/en/articles/hubs/_index.adoc:280 msgid "Test if your script works. Check the logs." msgstr "Попробуйте, как ваш скрипт работает. По завершении проверьте журналы." #. type: delimited block = 4 #: documentation/content/en/articles/hubs/_index.adoc:281 msgid "" "Use man:crontab[1] to add the script to the appropriate user's man:" "crontab[5]. This should be a different user than what your FTP daemon runs " "as so that if file permissions inside your FTP area are not world-readable " "those files cannot be accessed by anonymous FTP. This is used to \"stage\" " "releases - making sure all of the official mirror sites have all of the " "necessary release files on release day." msgstr "" "При помощи утилиты man:crontab[1] добавьте ваш скрипт в таблицу регулярных " "заданий man:crontab[5] соответствующего пользователя. Это должен быть " "пользователь, отличный от пользователя FTP-даемона, чтобы файлы в FTP-" "области без атрибута \"чтение для всех\" не были доступны анонимным FTP-" "пользователям. Данное свойство используется для тестирования перед выходом " "новых релизов, для того чтобы удостовериться, что все официальные зеркала " "содержат все необходимые файлы к моменту официального объявления релиза." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:284 msgid "Here are some recommended schedules:" msgstr "Некоторые рекомендуемые установки частоты обновления:" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:286 msgid "FTP fileset: daily" msgstr "FTP-набор: раз в сутки" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:287 msgid "WWW pages: daily" msgstr "WWW-страницы: раз в сутки" #. type: Title == #: documentation/content/en/articles/hubs/_index.adoc:289 #, no-wrap msgid "Where to Mirror From" msgstr "С какого сервера синхронизироваться" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:294 msgid "" "This is an important issue. So this section will spend some effort to " "explain the backgrounds. We will say this several times: under no " "circumstances should you mirror from `ftp.FreeBSD.org`." msgstr "" "Это важный вопрос, так что мы попытаемся пояснить, откуда берутся ответы. " -"Для начала повторим еще несколько раз: _никогда не синхронизируйтесь с ftp." +"Для начала повторим ещё несколько раз: _никогда не синхронизируйтесь с ftp." "FreeBSD.org_." #. type: Title === #: documentation/content/en/articles/hubs/_index.adoc:296 #, no-wrap msgid "A few Words About the Organization" msgstr "Организация системы зеркал" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:307 msgid "" "Mirrors are organized by country. All official mirrors have a DNS entry of " "the form `ftpN.CC.FreeBSD.org`. _CC_ (i.e., country code) is the _top level " "domain_ (TLD) of the country where this mirror is located. _N_ is a number, " "telling that the host would be the _Nth_ mirror in that country. (Same " "applies to `wwwN.CC.FreeBSD.org`, etc.) There are mirrors with no _CC_ " "part. These are the mirror sites that are very well connected and allow a " "large number of concurrent users. `ftp.FreeBSD.org` is actually two " "machines, one currently located in Denmark and the other in the United " "States. It is _NOT_ a master site and should never be used to mirror from. " "Lots of online documentation leads \"interactive\"users to `ftp.FreeBSD.org` " "so automated mirroring systems should find a different machine to mirror " "from." msgstr "" "Зеркала организуются по странам. Имена хостов всех официальных зеркал " "построены по принципу `ftpN.CC.FreeBSD.org`, где _CC_ (country code) - домен " "верхнего уровня страны, где расположено зеркало, _N_ - номер зеркала в " "данной стране. Этот же принцип применим к именам хостов `wwwN.CC.FreeBSD." "org` и т.п. Кроме того, есть зеркала без доменной части, обозначающей " "страну. Все они имеют очень хорошие внешние каналы и обслуживают большое " "число одновременных соединений. Имя `ftp.FreeBSD.org` на самом деле " "указывает на две машины, одна из которых в настоящее время находится в " "Дании, а другая в США. Ни одна из этих машин _НЕ_ является основным сайтом, " "и потому не должна использоваться для синхронизации. Масса документации для " "\"живых\" пользователей указывает на `ftp.FreeBSD.org`, так что " "автоматическим системам ведения зеркал следует выбирать другие источники " "синхронизации." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:317 msgid "" "Additionally there exists a hierarchy of mirrors, which is described in " "terms of __tiers__. The master sites are not referred to but can be " "described as __Tier-0__. Mirrors that mirror from these sites can be " "considered __Tier-1__, mirrors of __Tier-1__-mirrors, are __Tier-2__, etc. " "Official sites are encouraged to be of a low __tier__, but the lower the " "tier the higher the requirements in terms as described in crossref:" "hubs[mirror-requirements, Requirements for FreeBSD Mirrors]. Also access to " "low-tier-mirrors may be restricted, and access to master sites is definitely " "restricted. The __tier__-hierarchy is not reflected by DNS and generally " "not documented anywhere except for the master sites. However, official " "mirrors with low numbers like 1-4, are usually _Tier-1_ (this is just a " "rough hint, and there is no rule)." msgstr "" "Кроме того, существует иерархия зеркал в терминах их удаленности от центра, " "или __слоях__. Основные сайты могут быть описаны как __Зеркала нулевого " "слоя__. Зеркала, синхронизирующиеся по ним, считаются __слоем 1__, следующие " "- _слоем 2_ и т.д. Официальные сайты приглашаются на низкие слои, однако " "следует помнить, что чем меньше номер слоя, тем выше требования к зеркалу, " "как было описано в <>. Помимо того, доступ к зеркалам 1 " "слоя может быть ограничен; безусловно ограничен доступ к основным сайтам. " "Иерархия _слоев_ не отражается в DNS и, вообще говоря, нигде (кроме мастер-" "сайтов) не документирована. Тем не менее, официальные зеркала с малыми (1-4, " "как правило) номерами обычно представляют первый слой. (Это грубая оценка, и " "ни в коем случае не правило)." #. type: Title === #: documentation/content/en/articles/hubs/_index.adoc:319 #, no-wrap msgid "Ok, but Where Should I get the Stuff Now?" msgstr "Так откуда же мне синхронизироваться?" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:323 msgid "" "Under no circumstances should you mirror from `ftp.FreeBSD.org`. The short " "answer is: from the site that is closest to you in Internet terms, or gives " "you the fastest access." msgstr "" "Главное - НЕ с `ftp.FreeBSD.org`. Короткий ответ: с зеркала, которое " "расположено недалеко от вас в терминах Интернет, и/или доступ к которому " "наилучший." #. type: Title ==== #: documentation/content/en/articles/hubs/_index.adoc:325 #, no-wrap msgid "I Just Want to Mirror from Somewhere!" msgstr "Я хочу получить копию зеркала хоть откуда-нибудь!" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:330 msgid "" "If you have no special intentions or requirements, the statement in crossref:" "hubs[mirror-where-where, Ok, but Where Should I get the Stuff Now?] " "applies. This means:" msgstr "" "Если у вас нет особых намерений или требований, применимо утверждение в " "crossref:hubs[mirror-where-where, Так откуда же мне синхронизироваться?]. " "Это означает:" #. type: delimited block = 4 #: documentation/content/en/articles/hubs/_index.adoc:334 msgid "" "Check for those which provide fastest access (number of hops, round-trip-" "times) and offer the services you intend to use (like rsync)." msgstr "" "Выберите те из них, с которыми вам работать быстрее всего (меньшее число " "промежуточных узлов и время отклика), и которые предоставляют нужные вам " "сервисы (такие как rsync)." #. type: delimited block = 4 #: documentation/content/en/articles/hubs/_index.adoc:335 msgid "" "Contact the administrators of your chosen site stating your request, and " "asking about their terms and policies." msgstr "" "Свяжитесь с администраторами выбранного сервера, опишите ваши запросы и " "уточните их правила." #. type: delimited block = 4 #: documentation/content/en/articles/hubs/_index.adoc:336 msgid "Set up your mirror as described above." msgstr "Сконфигурируйте ваше зеркало, как описывалось выше." #. type: Title ==== #: documentation/content/en/articles/hubs/_index.adoc:339 #, no-wrap msgid "I am an Official Mirror, What is the Right Site for Me?" msgstr "Я поддерживаю официальное зеркало, какой сайт мне выбрать?" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:345 msgid "" "In general the description in crossref:hubs[mirror-where-simple, I Just Want " "to Mirror from Somewhere!] still applies. Of course you may want to put " "some weight on the fact that your upstream should be of a low tier. There " "are some other considerations about _official_ mirrors that are described in " "crossref:hubs[mirror-official, Official Mirrors]." msgstr "" "В основном, правила, описанные в crossref:hubs[mirror-where-simple, Я хочу " "получить копию зеркала хоть откуда-нибудь!], применимы. Дополнительно можно " "убедиться, что выбранный сайт принадлежит низкому слою. Другие соображения " "относительно _официальных_ зеркал описаны в <>." #. type: Title ==== #: documentation/content/en/articles/hubs/_index.adoc:347 #, no-wrap msgid "I Want to Access the Master Sites!" msgstr "Мне нужен доступ к основным сайтам!" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:354 msgid "" "If you have good reasons and good prerequisites, you may want and get access " "to one of the master sites. Access to these sites is generally restricted, " "and there are special policies for access. If you are already an _official_ " "mirror, this certainly helps you getting access. In any other case make " "sure your country really needs another mirror. If it already has three or " "more, ask the \"zone administrator\" (mailto:hostmaster@CC.FreeBSD." "org[hostmaster@CC.FreeBSD.org]) or {freebsd-hubs} first." msgstr "" "При наличии достаточных причин вы можете получить доступ к одному из " "основных сайтов. Доступ к ним ограничен; существуют специальные правила их " "использования. Наличие у вас статуса _официального_ зеркала, безусловно, " "является хорошим подспорьем. В противном случае убедитесь, что ваша страна " -"действительно нуждается еще в одном зеркале. Если их уже три или более, " -"сначала свяжитесь с администратором соответствующей зоны DNS (mailto:" -"hostmaster@CC.FreeBSD.org[hostmaster@CC.FreeBSD.org]) или напишите в " +"действительно нуждается ещё в одном зеркале. Если их уже три или более, " +"сначала свяжитесь с администратором соответствующей зоны DNS " +"(mailto:hostmaster@CC.FreeBSD.org[hostmaster@CC.FreeBSD.org]) или напишите в " "{freebsd-hubs}." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:357 msgid "" "Whoever helped you become, an _official_ should have helped you gain access " "to an appropriate upstream host, either one of the master sites or a " "suitable Tier-1 site. If not, you can send email to mailto:mirror-" "admin@FreeBSD.org[mirror-admin@FreeBSD.org] to request help with that." msgstr "" "Тот, кто помог вам стать _официальным_ зеркалом, должен был помочь вам " "получить доступ к соответствующему вышестоящему хосту — либо к одному из " "основных сайтов, либо к подходящему сайту уровня Tier-1. Если этого не " "произошло, вы можете отправить письмо по адресу mailto:mirror-admin@FreeBSD." "org[mirror-admin@FreeBSD.org], чтобы запросить помощь в этом вопросе." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:359 msgid "There is one master site for the FTP fileset." msgstr "Существует один основной сайт для синхронизации набора файлов FTP." #. type: Title ===== #: documentation/content/en/articles/hubs/_index.adoc:361 #, no-wrap msgid "ftp-master.FreeBSD.org" msgstr "ftp-master.FreeBSD.org" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:364 msgid "This is the master site for the FTP fileset." msgstr "Это основной сервер для синхронизации FTP набора." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:367 msgid "" "`ftp-master.FreeBSD.org` provides rsync access, in addition to FTP. Refer " "to crossref:hubs[mirror-ftp-rsync, Mirroring the FTP Site]." msgstr "" "В дополнение к FTP, `ftp-master.FreeBSD.org` поддерживает доступ по rsync. " "Использование этих протоколов описано в crossref:hubs[mirror-ftp-rsync, " "Mirroring the FTP Site]." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:369 msgid "" "Mirrors are also encouraged to allow rsync access for the FTP contents, " "since they are __Tier-1__-mirrors." msgstr "" "Приветствуется предоставление зеркалами _1 уровня_ доступа к FTP-области по " "протоколу rsync." #. type: Title == #: documentation/content/en/articles/hubs/_index.adoc:371 #, no-wrap msgid "Official Mirrors" msgstr "Официальные зеркала" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:374 msgid "Official mirrors are mirrors that" msgstr "Официальные зеркала обладают следующим свойствами" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:376 msgid "a) have a `FreeBSD.org` DNS entry (usually a CNAME)." msgstr "a) имеют запись в домене `FreeBSD.org` (обычно типа CNAME)." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:377 msgid "" "b) are listed as an official mirror in the FreeBSD documentation (like " "handbook)." msgstr "" "b) присутствуют в списке официальных зеркал в Руководстве по FreeBSD и " "другой документации." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:380 msgid "" "So far to distinguish official mirrors. Official mirrors are not necessarily " "__Tier-1__-mirrors. However you probably will not find a __Tier-1__-mirror, " "that is not also official." msgstr "" "На настоящий момент это все, что отличает их от прочих зеркал. Официальные " "зеркала не обязательно принадлежат к __Первому уровню__, однако, вряд ли " "можно найти зеркало __уровня 1__, не являющееся официальным." #. type: Title === #: documentation/content/en/articles/hubs/_index.adoc:382 #, no-wrap msgid "Special Requirements for Official (tier-1) Mirrors" msgstr "Отдельные требования к официальным зеркалам 1 уровня" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:387 msgid "" "It is not so easy to state requirements for all official mirrors, since the " "project is sort of tolerant here. It is more easy to say, what _official " "tier-1 mirrors_ are required to. All other official mirrors can consider " "this a big __should__." msgstr "" "Описать требования для всех официальных зеркал не так просто, поскольку " "проект FreeBSD достаточно мягок в этом отношении. Несколько проще указать, " "что требуется от __официальных зеркал уровня 1__. Прочие официальные зеркала " "должны рассматривать этот список как __настойчивые пожелания__." #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:389 msgid "Tier-1 mirrors are required to:" msgstr "Зеркала 1 уровня должны:" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:391 msgid "carry the complete fileset" msgstr "поддерживать полный список файлов" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:392 msgid "allow access to other mirror sites" msgstr "предоставлять доступ для других зеркал" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:393 msgid "provide FTP and rsync access" msgstr "обеспечивать доступ по протоколам ftp и rsync" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:396 msgid "" "Furthermore, admins should be subscribed to the {freebsd-hubs}. See extref:" "{handbook}eresources[this link, eresources-mail] for details, how to " "subscribe." msgstr "" "Кроме того, администратор такого зеркала должен быть подписан на {freebsd-" "hubs}. См. extref:{handbook}eresources[здесь, eresources-mail] для " "дополнительной информации о подписке." #. type: delimited block = 4 #: documentation/content/en/articles/hubs/_index.adoc:401 msgid "" "It is _very_ important for a hub administrator, especially Tier-1 hub " "admins, to check the https://www.FreeBSD.org/releng/[release schedule] for " "the next FreeBSD release. This is important because it will tell you when " "the next release is scheduled to come out, and thus giving you time to " "prepare for the big spike of traffic which follows it." msgstr "" "Очень важно для администратора хаба, особенно администраторов хаба уровня " "Tier-1, проверять https://www.FreeBSD.org/releng/[график выпусков] " "следующего релиза FreeBSD. Это важно, потому что это позволит вам узнать, " "когда запланирован выход следующего релиза, и, таким образом, даст вам время " "подготовиться к большому всплеску трафика, который последует за ним." #. type: delimited block = 4 #: documentation/content/en/articles/hubs/_index.adoc:404 msgid "" "It is also important that hub administrators try to keep their mirrors as up-" "to-date as possible (again, even more crucial for Tier-1 mirrors). If " "Mirror1 does not update for a while, lower tier mirrors will begin to mirror " "old data from Mirror1 and thus begins a downward spiral... Keep your mirrors " "up to date!" msgstr "" "Кроме того, важно поддерживать актуальность зеркал (в особенности зеркал " "уровня 1). Если Зеркало1 не синхронизировалось в течение длительного " "времени, то зеркала следующего уровня будут синхронизироваться по устаревшей " "информации и т.д. Поддерживайте актуальность ваших зеркал!" #. type: Title === #: documentation/content/en/articles/hubs/_index.adoc:407 #, no-wrap msgid "How to Become Official Then?" msgstr "Как стать официальным зеркалом?" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:410 msgid "" "Please contact the Cluster Administrators as documented at https://www." "FreeBSD.org/administration/#t-clusteradm." msgstr "" "Обратитесь к администраторам кластера, как указано в документации по адресу " "https://www.FreeBSD.org/administration/#t-clusteradm." #. type: Title == #: documentation/content/en/articles/hubs/_index.adoc:412 #, no-wrap msgid "Some Statistics from Mirror Sites" msgstr "Статистика некоторых зеркал" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:415 msgid "" "Here are links to the stat pages of your favorite mirrors (aka the only ones " "who feel like providing stats)." msgstr "" "Вот ссылки на страницы статистики ваших любимых зеркал (иначе говоря, " "единственных, кто предоставляет такую статистику)." #. type: Title === #: documentation/content/en/articles/hubs/_index.adoc:417 #, no-wrap msgid "FTP Site Statistics" msgstr "Статистика FTP сайтов" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:420 msgid "" "ftp.is.FreeBSD.org - mailto:hostmaster@is.FreeBSD.org[hostmaster@is.FreeBSD." "org] - http://www.rhnet.is/status/draupnir/draupnir.html[ (Bandwidth)] " "http://www.rhnet.is/status/ftp/ftp-notendur.html[(FTP processes)] http://www." "rhnet.is/status/ftp/http-notendur.html[(HTTP processes)]" msgstr "" "ftp.is.FreeBSD.org - mailto:hostmaster@is.FreeBSD.org[hostmaster@is.FreeBSD." "org] - http://www.rhnet.is/status/draupnir/draupnir.html[ (Bandwidth)] " "http://www.rhnet.is/status/ftp/ftp-notendur.html[(FTP processes)] http://www." "rhnet.is/status/ftp/http-notendur.html[(HTTP processes)]" #. type: Plain text #: documentation/content/en/articles/hubs/_index.adoc:420 msgid "" "ftp2.ru.FreeBSD.org - mailto:mirror@macomnet.ru[mirror@macomnet.ru] - http://" "mirror.macomnet.net/mrtg/mirror.macomnet.net_195.128.64.25.html[(Bandwidth)] " "http://mirror.macomnet.net/mrtg/mirror.macomnet.net_proc.html[(HTTP and FTP " "users)]" msgstr "" "ftp2.ru.FreeBSD.org - mailto:mirror@macomnet.ru[mirror@macomnet.ru] - http://" "mirror.macomnet.net/mrtg/mirror.macomnet.net_195.128.64.25.html[(Bandwidth)] " "http://mirror.macomnet.net/mrtg/mirror.macomnet.net_proc.html[(HTTP and FTP " "users)]" diff --git a/documentation/content/ru/articles/ldap-auth/_index.adoc b/documentation/content/ru/articles/ldap-auth/_index.adoc index 694021f0da..85ed9ae6a3 100644 --- a/documentation/content/ru/articles/ldap-auth/_index.adoc +++ b/documentation/content/ru/articles/ldap-auth/_index.adoc @@ -1,703 +1,703 @@ --- authors: - author: 'Toby Burress' email: kurin@causa-sui.net copyright: '2007-2008 The FreeBSD Documentation Project' description: 'Руководство по настройке сервера LDAP для аутентификации в FreeBSD' tags: ["LDAP", "Authentication", "OpenLDAP", "configuration", "guide", "tutorial", "FreeBSD"] title: 'Аутентификация LDAP' trademarks: ["freebsd", "general"] --- = Аутентификация LDAP :doctype: article :toc: macro :toclevels: 1 :icons: font :sectnums: :sectnumlevels: 6 :source-highlighter: rouge :experimental: :images-path: articles/ldap-auth/ ifdef::env-beastie[] ifdef::backend-html5[] include::shared/authors.adoc[] include::shared/mirrors.adoc[] include::shared/releases.adoc[] include::shared/attributes/attributes-{{% lang %}}.adoc[] include::shared/{{% lang %}}/teams.adoc[] include::shared/{{% lang %}}/mailing-lists.adoc[] include::shared/{{% lang %}}/urls.adoc[] :imagesdir: ../../../images/{images-path} endif::[] ifdef::backend-pdf,backend-epub3[] include::../../../../shared/asciidoctor.adoc[] endif::[] endif::[] ifndef::env-beastie[] include::../../../../../shared/asciidoctor.adoc[] endif::[] [.abstract-title] Аннотация Этот документ является руководством по настройке сервера LDAP (в основном сервера OpenLDAP) для аутентификации в FreeBSD. Это полезно в ситуациях, когда множество серверов требуют одинаковых учётных записей пользователей, например, в качестве замены NIS. ''' toc::[] [[preface]] == Предисловие Этот документ предназначен для того, чтобы дать читателю достаточно знаний о LDAP для настройки сервера LDAP. В документе будет предпринята попытка объяснить использование package:net/nss_ldap[] и package:security/pam_ldap[] для клиентских машин, работающих с сервером LDAP. По завершении читатель должен уметь настроить и развернуть сервер FreeBSD, способный размещать каталог LDAP, а также настроить и развернуть сервер FreeBSD, который может проходить аутентификацию с использованием каталога LDAP. Эта статья не претендует на исчерпывающее описание вопросов безопасности, надёжности или лучших практик настройки LDAP и других обсуждаемых здесь сервисов. Хотя автор старается делать всё правильно, вопросы безопасности рассматриваются лишь в общих чертах. Данная статья должна рассматриваться только как теоретическая основа, а любая реальная реализация должна сопровождаться тщательным анализом требований. [[ldap]] == Настройка LDAP LDAP означает "Lightweight Directory Access Protocol" (облегчённый протокол доступа к каталогам) и является подмножеством X.500 Directory Access Protocol. Последние спецификации можно найти в http://www.ietf.org/rfc/rfc4510.txt[RFC4510] и связанных документах. По сути, это база данных, которая предполагает более частые операции чтения, чем записи. В примерах в этом документе будет использоваться LDAP-сервер http://www.openldap.org/[OpenLDAP]; хотя принципы, изложенные здесь, должны быть применимы к различным серверам, большая часть конкретных административных действий специфична для OpenLDAP. В портах доступно несколько версий сервера, например package:net/openldap26-server[]. Клиентские серверы потребуют соответствующие библиотеки package:net/openldap26-client[]. Существуют (в основном) две области службы LDAP, которые требуют настройки. Первая — настройка сервера для правильного приёма соединений, а вторая — добавление записей в каталог сервера, чтобы инструменты FreeBSD знали, как с ним взаимодействовать. [[ldap-connect]] === Настройка сервера для подключений [NOTE] ==== Этот раздел относится конкретно к OpenLDAP. Если вы используете другой сервер, вам необходимо обратиться к документации этого сервера. ==== [[ldap-connect-install]] ==== Установка OpenLDAP Сначала установите OpenLDAP: [[oldap-install]] .Установка OpenLDAP [example] ==== [source, shell] .... # cd /usr/ports/net/openldap26-server # make install clean .... ==== Это устанавливает бинарные файлы `slapd` и `slurpd`, а также необходимые библиотеки OpenLDAP. [[ldap-connect-config]] ==== Настройка OpenLDAP Далее мы должны настроить OpenLDAP. Вам следует требовать шифрование соединений с сервером LDAP; в противном случае пароли ваших пользователей будут передаваться в открытом виде, что считается небезопасным. Инструменты, которые мы будем использовать, поддерживают два очень похожих типа шифрования: SSL и TLS. TLS означает "Transportation Layer Security". Службы, использующие TLS, обычно подключаются к тем же портам, что и аналогичные службы без TLS; таким образом, SMTP-сервер с поддержкой TLS будет ожидать подключений на порту 25, а LDAP-сервер — на порту 389. SSL означает «Secure Sockets Layer», и службы, реализующие SSL, _не_ работают на тех же портах, что и их аналоги без SSL. Таким образом, SMTPS использует порт 465 (а не 25), HTTPS — порт 443, а LDAPS — порт 636. Причина, по которой SSL использует другой порт, чем TLS, заключается в том, что соединение TLS начинается как обычный текст и переключается на зашифрованный трафик после директивы `STARTTLS`. Соединения SSL зашифрованы с самого начала. Кроме этого, существенных различий между ними нет. [NOTE] ==== Мы настроим OpenLDAP для использования TLS, так как SSL считается устаревшим. ==== После установки OpenLDAP через порты следующие параметры конфигурации в [.filename]#/usr/local/etc/openldap/slapd.conf# включат TLS: [.programlisting] .... security ssf=128 TLSCertificateFile /path/to/your/cert.crt TLSCertificateKeyFile /path/to/your/cert.key TLSCACertificateFile /path/to/your/cacert.crt .... В этом примере `ssf=128` указывает OpenLDAP требовать 128-битное шифрование для всех соединений, как для поиска, так и для обновления. Этот параметр может быть настроен в соответствии с требованиями безопасности вашего сайта, но ослаблять его требуется редко, так как большинство библиотек LDAP-клиентов поддерживают стойкое шифрование. Файлы [.filename]#cert.crt#, [.filename]#cert.key# и [.filename]#cacert.crt# необходимы для аутентификации клиентами _вас_ как действительного LDAP-сервера. Если вам просто нужен работающий сервер, вы можете создать самоподписанный сертификат с помощью OpenSSL: [[genrsa]] .Генерация RSA-ключа [example] ==== [source, shell] .... % openssl genrsa -out cert.key 1024 Generating RSA private key, 1024 bit long modulus ....................++++++ ...++++++ e is 65537 (0x10001) % openssl req -new -key cert.key -out cert.csr .... ==== На этом этапе вам будет предложено ввести некоторые значения. Вы можете ввести любые значения, какие пожелаете; однако важно, чтобы значение "Common Name" (Общее имя) было полным доменным именем сервера OpenLDAP. В нашем случае и в приведённых примерах сервер называется _server.example.org_. Неправильное указание этого значения может привести к сбоям при подключении клиентов. Это может стать причиной серьёзных проблем, поэтому внимательно следуйте этим шагам. Наконец, запрос на подпись сертификата должен быть подписан: [[self-sign]] .Самостоятельная подпись сертификата [example] ==== [source, shell] .... % openssl x509 -req -in cert.csr -days 365 -signkey cert.key -out cert.crt Signature ok subject=/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd Getting Private key .... ==== Это создаст самоподписанный сертификат, который можно использовать для директив в [.filename]#slapd.conf#, где [.filename]#cert.crt# и [.filename]#cacert.crt# представляют собой один и тот же файл. Если вы планируете использовать множество серверов OpenLDAP (для репликации через `slurpd`), рекомендуется ознакомиться с разделом crossref:ldap-auth[ssl-ca, Сертификаты OpenSSL для LDAP], чтобы сгенерировать ключ центра сертификации (CA) и использовать его для подписи индивидуальных сертификатов серверов. После этого добавьте следующее в [.filename]#/etc/rc.conf#: [.programlisting] .... slapd_enable="YES" .... Затем выполните `/usr/local/etc/rc.d/slapd start`. Это должно запустить OpenLDAP. Убедитесь, что он слушает порт 389 с помощью [source, shell] .... % sockstat -4 -p 389 ldap slapd 3261 7 tcp4 *:389 *:* .... [[ldap-connect-client]] ==== Настройка клиента Установите порт package:net/openldap26-client[] для библиотек OpenLDAP. Клиентские машины всегда будут иметь библиотеки OpenLDAP, так как они содержатся в пакетах package:security/pam_ldap[] и package:net/nss_ldap[], по крайней мере, на данный момент. Файл конфигурации для библиотек OpenLDAP — это [.filename]#/usr/local/etc/openldap/ldap.conf#. Отредактируйте этот файл, указав следующие значения: [.programlisting] .... base dc=example,dc=org uri ldap://server.example.org/ ssl start_tls tls_cacert /path/to/your/cacert.crt .... [NOTE] ==== Важно, чтобы у ваших клиентов был доступ к [.filename]#cacert.crt#, иначе они не смогут подключиться. ==== [NOTE] ==== Существует два файла с именем [.filename]#ldap.conf#. Первый — это данный файл, предназначенный для библиотек OpenLDAP и определяющий, как взаимодействовать с сервером. Второй — [.filename]#/usr/local/etc/ldap.conf#, используется pam_ldap. ==== На этом этапе вы должны быть в состоянии выполнить `ldapsearch -Z` на клиентской машине; `-Z` означает "использовать TLS". Если вы столкнётесь с ошибкой, значит что-то настроено неправильно; скорее всего, проблема в ваших сертификатах. Используйте `s_client` и `s_server` из man:openssl[1], чтобы убедиться, что они правильно настроены и подписаны. [[ldap-database]] === Записи в базе данных Аутентификация в каталоге LDAP обычно выполняется путем попытки привязаться к каталогу как подключающийся пользователь. Это делается путем установки "простой" привязки к каталогу с предоставленным именем пользователя. Если существует запись с `uid`, равным имени пользователя, и атрибут `userPassword` этой записи совпадает с предоставленным паролем, то привязка проходит успешно. Первое, что нам нужно сделать, — это определить, где в каталоге будут находиться наши пользователи. Базовой записью для нашей базы данных является `dc=example,dc=org`. Стандартное расположение пользователей, которое ожидает большинство клиентов, выглядит примерно как `ou=people,_base_`, поэтому здесь будет использоваться именно это. Однако следует помнить, что это настраивается. Таким образом, запись ldif для организационного подразделения `people` будет выглядеть следующим образом: [.programlisting] .... dn: ou=people,dc=example,dc=org objectClass: top objectClass: organizationalUnit ou: people .... Все пользователи будут созданы как подразделы этой организационной единицы. Некоторые размышления стоит посвятить классу объектов, к которому будут принадлежать ваши пользователи. Большинство инструментов по умолчанию используют `people`, что подходит, если вам просто нужно предоставить записи для аутентификации. Однако, если вы также собираетесь хранить информацию о пользователях в базе данных LDAP, вам, вероятно, стоит использовать `inetOrgPerson`, который имеет множество полезных атрибутов. В любом случае, соответствующие схемы должны быть загружены в [.filename]#slapd.conf#. Для этого примера мы будем использовать класс объекта `person`. Если вы используете `inetOrgPerson`, шаги практически идентичны, за исключением того, что атрибут `sn` является обязательным. Чтобы добавить тестового пользователя с именем `tuser`, ldif-файл должен выглядеть так: [.programlisting] .... dn: uid=tuser,ou=people,dc=example,dc=org objectClass: person objectClass: posixAccount objectClass: shadowAccount objectClass: top uidNumber: 10000 gidNumber: 10000 homeDirectory: /home/tuser loginShell: /bin/csh uid: tuser cn: tuser .... Я начинаю UID пользователей LDAP с 10000, чтобы избежать конфликтов с системными учётными записями; вы можете настроить любое число здесь, при условии что оно меньше 65536. Также необходимы записи групп. Они настраиваются так же, как записи пользователей, но мы будем использовать стандартные значения, приведённые ниже: [.programlisting] .... dn: ou=groups,dc=example,dc=org objectClass: top objectClass: organizationalUnit ou: groups dn: cn=tuser,ou=groups,dc=example,dc=org objectClass: posixGroup objectClass: top gidNumber: 10000 cn: tuser .... -Чтобы добавить их в вашу базу данных, вы можете использовать `slapadd` или `ldapadd` для файла, содержащего эти записи. Альтернативно, вы можете использовать package:sysutils/ldapvi[]. +Чтобы добавить их в вашу базу данных, вы можете использовать `slapadd` или `ldapadd` для файла, содержащего эти записи. Или вы можете использовать package:sysutils/ldapvi[]. Утилита `ldapsearch` на клиентской машине теперь должна возвращать эти записи. Если это так, ваша база данных правильно настроена для использования в качестве сервера аутентификации LDAP. [[client]] == Конфигурация клиента Клиент уже должен иметь библиотеки OpenLDAP из crossref:ldap-auth[ldap-connect-client,Настройка клиента], но если вы устанавливаете несколько клиентских машин, вам потребуется установить package:net/openldap26-client[] на каждой из них. Для аутентификации на сервере LDAP в FreeBSD необходимо установить два порта: package:security/pam_ldap[] и package:net/nss_ldap[]. [[client-auth]] === Аутентификация package:security/pam_ldap[] настраивается через [.filename]#/usr/local/etc/ldap.conf#. [NOTE] ==== Это _другой файл_, отличный от файла конфигурации библиотечных функций OpenLDAP, [.filename]#/usr/local/etc/openldap/ldap.conf#; однако он принимает многие из тех же параметров; фактически он является надмножеством этого файла. В оставшейся части этого раздела ссылки на [.filename]#ldap.conf# будут означать [.filename]#/usr/local/etc/ldap.conf#. ==== Таким образом, мы захотим скопировать все исходные параметры конфигурации из [.filename]#openldap/ldap.conf# в новый [.filename]#ldap.conf#. После этого нам нужно указать package:security/pam_ldap[], что искать на сервере каталогов. Мы идентифицируем наших пользователей с помощью атрибута `uid`. Чтобы настроить это (хотя это значение по умолчанию), укажите директиву `pam_login_attribute` в [.filename]#ldap.conf#: [[set-pam-login-attr]] .Установка `pam_login_attribute` [example] ==== [.programlisting] .... pam_login_attribute uid .... ==== С таким набором, package:security/pam_ldap[] будет искать во всей LDAP-директории под `base` значение `uid=_имя_пользователя_`. Если оно найдёт одну и только одну запись, будет предпринята попытка привязаться к этой записи с использованием предоставленного пароля. Если привязка произойдёт успешно, доступ будет разрешён. В противном случае доступ будет запрещён. Пользователи, чья оболочка не указана в [.filename]#/etc/shells#, не смогут войти в систему. Это особенно важно, когда Bash установлен как оболочка пользователя на сервере LDAP. Bash не входит в стандартную установку FreeBSD. При установке из пакета или порта, он располагается в [.filename]#/usr/local/bin/bash#. Убедитесь, что путь к оболочке на сервере указан правильно: [source, shell] .... % getent passwd username .... Если в последнем столбце вывода указан `/bin/bash`, есть два варианта действий. Первый — изменить запись пользователя на сервере LDAP на [.filename]#/usr/local/bin/bash#. Второй вариант — создать символическую ссылку на клиентском компьютере LDAP, чтобы Bash находился в правильном месте: [source, shell] .... # ln -s /usr/local/bin/bash /bin/bash .... Убедитесь, что файл [.filename]#/etc/shells# содержит записи для `/usr/local/bin/bash` и `/bin/bash`. После этого пользователь сможет входить в систему с Bash в качестве оболочки. [[client-auth-pam]] ==== PAM PAM, что означает "Pluggable Authentication Modules" (подключаемые модули аутентификации), является методом, с помощью которого FreeBSD аутентифицирует большинство своих сеансов. Чтобы указать FreeBSD, что мы хотим использовать LDAP-сервер, нам необходимо добавить строку в соответствующий файл PAM. В большинстве случаев подходящий файл PAM — это [.filename]#/etc/pam.d/sshd#, если вы хотите использовать SSH (не забудьте установить соответствующие параметры в [.filename]#/etc/ssh/sshd_config#, иначе SSH не будет использовать PAM). Чтобы использовать PAM для аутентификации, добавьте строку [.programlisting] .... auth sufficient /usr/local/lib/pam_ldap.so no_warn .... Строгое место, где эта строка появляется в файле, и какие опции указаны в четвертом столбце, определяют точное поведение механизма аутентификации; см. man:pam[d] -С такой конфигурацией вы сможете аутентифицировать пользователя в LDAP-каталоге. PAM выполнит привязку с вашими учетными данными, и в случае успеха сообщит SSH разрешить доступ. +С такой конфигурацией вы сможете аутентифицировать пользователя в LDAP-каталоге. PAM выполнит привязку с вашими учётными данными, и в случае успеха сообщит SSH разрешить доступ. Однако разрешать _каждому_ пользователю в каталоге доступ к _каждой_ клиентской машине — не лучшая идея. При текущей конфигурации пользователю для входа на машину достаточно наличия записи в LDAP. К счастью, есть несколько способов ограничить доступ пользователей. [.filename]#ldap.conf# поддерживает директиву `pam_groupdn`; каждая учётная запись, подключающаяся к этой машине, должна быть членом группы, указанной здесь. Например, если у вас есть [.programlisting] .... pam_groupdn cn=servername,ou=accessgroups,dc=example,dc=org .... в [.filename]#ldap.conf#, тогда только члены этой группы смогут войти в систему. Однако есть несколько моментов, которые следует учитывать. Участники этой группы указываются в одном или нескольких атрибутах `memberUid`, и каждый атрибут должен содержать полное отличающееся имя участника. Таким образом, `memberUid: someuser` не сработает; необходимо указать: [.programlisting] .... memberUid: uid=someuser,ou=people,dc=example,dc=org .... Кроме того, эта директива не проверяется в PAM во время аутентификации, она проверяется во время управления учётными записями, поэтому вам понадобится вторая строка в ваших PAM-файлах в разделе `account`. Это, в свою очередь, потребует, чтобы _каждый_ пользователь был указан в группе, что не обязательно соответствует нашим желаниям. Чтобы избежать блокировки пользователей, не находящихся в LDAP, следует включить атрибут `ignore_unknown_user`. Наконец, следует установить опцию `ignore_authinfo_unavail`, чтобы не оказаться заблокированным на каждом компьютере при недоступности LDAP-сервера. Ваш файл [.filename]#pam.d/sshd# может в итоге выглядеть так: [[pam]] .Пример [.filename]#pam.d/sshd# [example] ==== [.programlisting] .... auth required pam_nologin.so no_warn auth sufficient pam_opie.so no_warn no_fake_prompts auth requisite pam_opieaccess.so no_warn allow_local auth sufficient /usr/local/lib/pam_ldap.so no_warn auth required pam_unix.so no_warn try_first_pass account required pam_login_access.so account required /usr/local/lib/pam_ldap.so no_warn ignore_authinfo_unavail ignore_unknown_user .... ==== [NOTE] ==== Поскольку мы добавляем эти строки конкретно в [.filename]#pam.d/sshd#, это повлияет только на SSH-сеансы. Пользователи LDAP не смогут войти через консоль. Чтобы изменить это поведение, изучите остальные файлы в [.filename]#/etc/pam.d# и измените их соответствующим образом. ==== [[client-nss]] === Name Service Switch NSS — это служба, которая сопоставляет атрибуты с именами. Например, если файл принадлежит пользователю `1001`, приложение запросит у NSS имя для `1001` и может получить `bob`, `ted` или любое другое имя пользователя. Теперь, когда информация о пользователях хранится в LDAP, необходимо указать NSS обращаться туда при запросах. Порт package:net/nss_ldap[] выполняет это. Он использует тот же конфигурационный файл, что и package:security/pam_ldap[], и после установки не должен требовать дополнительных параметров. Вместо этого остаётся просто отредактировать [.filename]#/etc/nsswitch.conf#, чтобы воспользоваться преимуществами каталога. Просто замените следующие строки: [.programlisting] .... group: compat passwd: compat .... строкой [.programlisting] .... group: files ldap passwd: files ldap .... Это позволит сопоставлять имена пользователей с UID и UID с именами пользователей. Поздравляем! Теперь у вас должна работать аутентификация через LDAP. [[caveats]] === Предостережения К сожалению, на момент написания этой документации FreeBSD не поддерживал изменение паролей пользователей с помощью man:passwd[1]. В результате большинству администраторов приходится самостоятельно реализовывать решение. Здесь я привожу несколько примеров. Обратите внимание, что если вы пишете собственный скрипт для смены пароля, вам следует учитывать некоторые проблемы безопасности; см. crossref:ldap-auth[security-passwd, Хранение паролей] [[chpw-shell]] .Скрипт оболочки для изменения паролей [example] ==== [.programlisting] .... #!/bin/sh stty -echo read -p "Old Password: " oldp; echo read -p "New Password: " np1; echo read -p "Retype New Password: " np2; echo stty echo if [ "$np1" != "$np2" ]; then echo "Passwords do not match." exit 1 fi ldappasswd -D uid="$USER",ou=people,dc=example,dc=org \ -w "$oldp" \ -a "$oldp" \ -s "$np1" .... ==== [CAUTION] ==== Этот скрипт почти не проверяет ошибки, что более важно, он очень беспечен в том, как хранит ваши пароли. Если вы делаете что-то подобное, по крайней мере измените значение sysctl `security.bsd.see_other_uids`: [source, shell] .... # sysctl security.bsd.see_other_uids=0 .... ==== Более гибкий (и, вероятно, более безопасный) подход может быть реализован путем написания собственной программы или даже веб-интерфейса. Ниже приведена часть библиотеки на Ruby, которая позволяет изменять пароли в LDAP. Она используется как в командной строке, так и в вебе. [[chpw-ruby]] .Ruby-скрипт для изменения паролей [example] ==== [.programlisting] .... require 'ldap' require 'base64' require 'digest' require 'password' # ruby-password ldap_server = "ldap.example.org" luser = "uid=#{ENV['USER']},ou=people,dc=example,dc=org" # get the new password, check it, and create a salted hash from it def get_password pwd1 = Password.get("New Password: ") pwd2 = Password.get("Retype New Password: ") raise if pwd1 != pwd2 pwd1.check # check password strength salt = rand.to_s.gsub(/0\./, '') pass = pwd1.to_s hash = "{SSHA}"+Base64.encode64(Digest::SHA1.digest("#{pass}#{salt}")+salt).chomp! return hash end oldp = Password.get("Old Password: ") newp = get_password # We'll just replace it. That we can bind proves that we either know # the old password or are an admin. replace = LDAP::Mod.new(LDAP::LDAP_MOD_REPLACE | LDAP::LDAP_MOD_BVALUES, "userPassword", [newp]) conn = LDAP::SSLConn.new(ldap_server, 389, true) conn.set_option(LDAP::LDAP_OPT_PROTOCOL_VERSION, 3) conn.bind(luser, oldp) conn.modify(luser, [replace]) .... ==== Хотя это не гарантирует отсутствия уязвимостей (например, пароль хранится в памяти), данный подход чище и гибче, чем простой скрипт на `sh`. [[secure]] == Безопасность Теперь, когда ваши машины (и, возможно, другие службы) проходят аутентификацию через ваш LDAP-сервер, этот сервер необходимо защитить как минимум так же, как [.filename]#/etc/master.passwd# на обычном сервере, а возможно, и лучше, поскольку сломанный или взломанный LDAP-сервер нарушит работу всех клиентских служб. Помните, что этот раздел не является исчерпывающим. Вам следует постоянно пересматривать свою конфигурацию и процедуры для улучшений. [[secure-readonly]] === Установка атрибутов только для чтения Некоторые атрибуты в LDAP должны быть доступны только для чтения. Если оставить их доступными для записи пользователем, например, пользователь может изменить свой атрибут `uidNumber` на `0` и получить доступ `root`! Для начала атрибут `userPassword` не должен быть доступен для чтения всем. По умолчанию любой, кто может подключиться к LDAP-серверу, может читать этот атрибут. Чтобы отключить это, добавьте следующее в [.filename]#slapd.conf#: [[hide-userpass]] .Скрыть пароли [example] ==== [.programlisting] .... access to dn.subtree="ou=people,dc=example,dc=org" attrs=userPassword by self write by anonymous auth by * none access to * by self write by * read .... ==== Это запретит чтение атрибута `userPassword`, но позволит пользователям изменять свои собственные пароли. Кроме того, следует запретить пользователям изменять некоторые из своих атрибутов. По умолчанию пользователи могут изменять любые атрибуты (за исключением тех, которые сами схемы LDAP запрещают изменять), такие как `uidNumber`. Чтобы устранить эту уязвимость, измените приведённое выше на [[attrib-readonly]] .Атрибуты только для чтения [example] ==== [.programlisting] .... access to dn.subtree="ou=people,dc=example,dc=org" attrs=userPassword by self write by anonymous auth by * none access to attrs=homeDirectory,uidNumber,gidNumber by * read access to * by self write by * read .... ==== Это предотвратит возможность пользователей маскироваться под других пользователей. [[secure-root]] -=== Определение учетной записи `root` +=== Определение учётной записи `root` -Часто учетная запись `root` или администратора для службы LDAP будет определена в файле конфигурации. Например, OpenLDAP поддерживает это, и это работает, но может привести к проблемам, если файл [.filename]#slapd.conf# будет скомпрометирован. Возможно, лучше использовать это только для первоначальной настройки доступа к LDAP, а затем определить учетную запись `root` там. +Часто учётная запись `root` или администратора для службы LDAP будет определена в файле конфигурации. Например, OpenLDAP поддерживает это, и это работает, но может привести к проблемам, если файл [.filename]#slapd.conf# будет скомпрометирован. Возможно, лучше использовать это только для первоначальной настройки доступа к LDAP, а затем определить учётную запись `root` там. -Еще лучше определить учетные записи с ограниченными правами и полностью исключить учетную запись `root`. Например, пользователи, которые могут добавлять или удалять учетные записи, добавляются в одну группу, но сами не могут изменять состав этой группы. Такая политика безопасности поможет снизить последствия утечки пароля. +Еще лучше определить учётные записи с ограниченными правами и полностью исключить учётную запись `root`. Например, пользователи, которые могут добавлять или удалять учётные записи, добавляются в одну группу, но сами не могут изменять состав этой группы. Такая политика безопасности поможет снизить последствия утечки пароля. [[manager-acct]] ==== Создание группы управления Предположим, вы хотите, чтобы ваш IT-отдел мог изменять домашние каталоги пользователей, но не хотите, чтобы все они могли добавлять или удалять пользователей. Способ сделать это — добавить группу для этих администраторов: [[manager-acct-dn]] .Создание группы управления [example] ==== [.programlisting] .... dn: cn=homemanagement,dc=example,dc=org objectClass: top objectClass: posixGroup cn: homemanagement gidNumber: 121 # required for posixGroup memberUid: uid=tuser,ou=people,dc=example,dc=org memberUid: uid=user2,ou=people,dc=example,dc=org .... ==== И затем измените атрибуты прав в [.filename]#slapd.conf#: [[management-acct-acl]] .ACL для группы управления домашним каталогом [example] ==== [.programlisting] .... access to dn.subtree="ou=people,dc=example,dc=org" attr=homeDirectory by dn="cn=homemanagement,dc=example,dc=org" dnattr=memberUid write .... ==== Теперь `tuser` и `user2` могут изменять домашние каталоги других пользователей. В этом примере мы предоставили подмножество административных полномочий определённым пользователям, не давая им власти в других областях. Идея заключается в том, чтобы вскоре ни одна учётная запись пользователя не обладала полномочиями учётной записи `root`, но каждое полномочие, которое имел root, было бы у хотя бы одного пользователя. Учётная запись `root` тогда становится ненужной и может быть удалена. [[security-passwd]] === Хранение паролей По умолчанию OpenLDAP сохраняет значение атрибута `userPassword` так же, как и любые другие данные: в открытом виде. В большинстве случаев оно кодируется в base64, что обеспечивает достаточную защиту, чтобы честный администратор не узнал ваш пароль, но не более того. Хорошей идеей является хранение паролей в более безопасном формате, таком как SSHA (солёный SHA). Это выполняется любой программой, которую вы используете для изменения паролей пользователей. :sectnums!: [appendix] [[useful]] == Полезные инструменты Вот несколько других программ, которые могут быть полезны, особенно если у вас много пользователей и вы не хотите настраивать всё вручную. package:security/pam_mkhomedir[] — это модуль PAM, который всегда завершается успешно; его назначение — создавать домашние каталоги для пользователей, у которых их нет. Если у вас есть десятки серверов-клиентов и сотни пользователей, гораздо удобнее использовать этот модуль и настроить скелетные каталоги, чем подготавливать каждый домашний каталог вручную. package:sysutils/ldapvi[] — это отличная утилита для редактирования значений LDAP в синтаксисе, подобном LDIF. Каталог (или его подраздел) отображается в редакторе, выбранном переменной окружения `EDITOR`. Это позволяет легко вносить масштабные изменения в каталог без необходимости написания собственного инструмента. package:security/openssh-portable[] обладает возможностью обращаться к серверу LDAP для проверки SSH-ключей. Это очень удобно, если у вас много серверов и вы не хотите копировать свои открытые ключи на все из них. :sectnums!: [appendix] [[ssl-ca]] == Сертификаты OpenSSL для LDAP Если вы размещаете два или более LDAP-серверов, вам, вероятно, не захочется использовать самоподписанные сертификаты, так как каждый клиент придется настраивать для работы с каждым сертификатом. Хотя это возможно, это не так просто, как создать собственный центр сертификации и подписать сертификаты ваших серверов с его помощью. Шаги здесь представлены как есть, без попыток объяснить происходящее — дополнительные пояснения можно найти в man:openssl[1] и связанных справочных страницах. Для создания центра сертификации нам просто нужны самоподписанный сертификат и ключ. Шаги для этого следующие [[make-cert]] .Создание сертификата [example] ==== [source, shell] .... % openssl genrsa -out root.key 1024 % openssl req -new -key root.key -out root.csr % openssl x509 -req -days 1024 -in root.csr -signkey root.key -out root.crt .... ==== Это будут корневой ключ и сертификат ЦС. Возможно, вы захотите зашифровать ключ и хранить его в прохладном, сухом месте; любой, кто получит к нему доступ, сможет выдавать себя за один из ваших LDAP-серверов. Затем, используя первые два шага, описанные выше, создайте ключ [.filename]#ldap-server-one.key# и запрос на подпись сертификата [.filename]#ldap-server-one.csr#. После подписания запроса с помощью [.filename]#root.key# вы сможете использовать [.filename]#ldap-server-one.*# на своих LDAP-серверах. [NOTE] ==== Не забудьте использовать полное доменное имя для атрибута "common name" при создании запроса на подпись сертификата; в противном случае клиенты будут отклонять соединение с вами, и диагностика этой проблемы может быть очень сложной. ==== Для подписи ключа используйте `-CA` и `-CAkey` вместо `-signkey`: [[ca-sign]] .Подписывать как Центр Сертификации [example] ==== [source, shell] .... % openssl x509 -req -days 1024 \ -in ldap-server-one.csr -CA root.crt -CAkey root.key \ -out ldap-server-one.crt .... ==== Результирующий файл будет представлять собой сертификат, который можно использовать на ваших LDAP-серверах. Наконец, чтобы клиенты доверяли всем вашим серверам, распространите файл [.filename]#root.crt# (__сертификат__, а не ключ!) на каждом клиенте и укажите его в директиве `TLSCACertificateFile` в файле [.filename]#ldap.conf#. diff --git a/documentation/content/ru/articles/ldap-auth/_index.po b/documentation/content/ru/articles/ldap-auth/_index.po index 8ee6820d6e..097d4fbdd6 100644 --- a/documentation/content/ru/articles/ldap-auth/_index.po +++ b/documentation/content/ru/articles/ldap-auth/_index.po @@ -1,1888 +1,1888 @@ # SOME DESCRIPTIVE TITLE # Copyright (C) YEAR The FreeBSD Project # This file is distributed under the same license as the FreeBSD Documentation package. -# Vladlen Popolitov , 2025. +# Vladlen Popolitov , 2025, 2026. msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" "POT-Creation-Date: 2024-12-29 08:30-0500\n" -"PO-Revision-Date: 2025-11-12 04:45+0000\n" +"PO-Revision-Date: 2026-03-09 04:45+0000\n" "Last-Translator: Vladlen Popolitov \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 4.17\n" #. type: YAML Front Matter: description #: documentation/content/en/articles/ldap-auth/_index.adoc:1 #, no-wrap msgid "Guide for the configuration of an LDAP server for authentication on FreeBSD" msgstr "Руководство по настройке сервера LDAP для аутентификации в FreeBSD" #. type: Title = #: documentation/content/en/articles/ldap-auth/_index.adoc:1 #: documentation/content/en/articles/ldap-auth/_index.adoc:12 #, no-wrap msgid "LDAP Authentication" msgstr "Аутентификация LDAP" #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:45 msgid "Abstract" msgstr "Аннотация" #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:48 msgid "" "This document is intended as a guide for the configuration of an LDAP server " "(principally an OpenLDAP server) for authentication on FreeBSD. This is " "useful for situations where many servers need the same user accounts, for " "example as a replacement for NIS." msgstr "" "Этот документ является руководством по настройке сервера LDAP (в основном " "сервера OpenLDAP) для аутентификации в FreeBSD. Это полезно в ситуациях, " "когда множество серверов требуют одинаковых учётных записей пользователей, " "например, в качестве замены NIS." #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:50 msgid "'''" msgstr "'''" #. type: Title == #: documentation/content/en/articles/ldap-auth/_index.adoc:54 #, no-wrap msgid "Preface" msgstr "Предисловие" #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:58 msgid "" "This document is intended to give the reader enough of an understanding of " "LDAP to configure an LDAP server. This document will attempt to provide an " "explanation of package:net/nss_ldap[] and package:security/pam_ldap[] for " "use with client machines services for use with the LDAP server." msgstr "" "Этот документ предназначен для того, чтобы дать читателю достаточно знаний о " "LDAP для настройки сервера LDAP. В документе будет предпринята попытка " "объяснить использование package:net/nss_ldap[] и package:security/pam_ldap[] " "для клиентских машин, работающих с сервером LDAP." #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:60 msgid "" "When finished, the reader should be able to configure and deploy a FreeBSD " "server that can host an LDAP directory, and to configure and deploy a " "FreeBSD server which can authenticate against an LDAP directory." msgstr "" "По завершении читатель должен уметь настроить и развернуть сервер FreeBSD, " "способный размещать каталог LDAP, а также настроить и развернуть сервер " "FreeBSD, который может проходить аутентификацию с использованием каталога " "LDAP." #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:64 msgid "" "This article is not intended to be an exhaustive account of the security, " "robustness, or best practice considerations for configuring LDAP or the " "other services discussed herein. While the author takes care to do " "everything correctly, they do not address security issues beyond a general " "scope. This article should be considered to lay the theoretical groundwork " "only, and any actual implementation should be accompanied by careful " "requirement analysis." msgstr "" "Эта статья не претендует на исчерпывающее описание вопросов безопасности, " "надёжности или лучших практик настройки LDAP и других обсуждаемых здесь " "сервисов. Хотя автор старается делать всё правильно, вопросы безопасности " "рассматриваются лишь в общих чертах. Данная статья должна рассматриваться " "только как теоретическая основа, а любая реальная реализация должна " "сопровождаться тщательным анализом требований." #. type: Title == #: documentation/content/en/articles/ldap-auth/_index.adoc:66 #, no-wrap msgid "Configuring LDAP" msgstr "Настройка LDAP" #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:71 msgid "" "LDAP stands for \"Lightweight Directory Access Protocol\" and is a subset of " "the X.500 Directory Access Protocol. Its most recent specifications are in " "http://www.ietf.org/rfc/rfc4510.txt[RFC4510] and friends. Essentially it is " "a database that expects to be read from more often than it is written to." msgstr "" "LDAP означает \"Lightweight Directory Access Protocol\" (облегчённый " "протокол доступа к каталогам) и является подмножеством X.500 Directory " "Access Protocol. Последние спецификации можно найти в http://www.ietf.org/" "rfc/rfc4510.txt[RFC4510] и связанных документах. По сути, это база данных, " "которая предполагает более частые операции чтения, чем записи." #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:75 msgid "" "The LDAP server http://www.openldap.org/[OpenLDAP] will be used in the " "examples in this document; while the principles here should be generally " "applicable to many different servers, most of the concrete administration is " "OpenLDAP-specific. There are several server versions in ports, for example " "package:net/openldap26-server[]. Client servers will need the corresponding " "package:net/openldap26-client[] libraries." msgstr "" "В примерах в этом документе будет использоваться LDAP-сервер http://www." "openldap.org/[OpenLDAP]; хотя принципы, изложенные здесь, должны быть " "применимы к различным серверам, большая часть конкретных административных " "действий специфична для OpenLDAP. В портах доступно несколько версий " "сервера, например package:net/openldap26-server[]. Клиентские серверы " "потребуют соответствующие библиотеки package:net/openldap26-client[]." #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:78 msgid "" "There are (basically) two areas of the LDAP service which need " "configuration. The first is setting up a server to receive connections " "properly, and the second is adding entries to the server's directory so that " "FreeBSD tools know how to interact with it." msgstr "" "Существуют (в основном) две области службы LDAP, которые требуют настройки. " "Первая — настройка сервера для правильного приёма соединений, а вторая — " "добавление записей в каталог сервера, чтобы инструменты FreeBSD знали, как с " "ним взаимодействовать." #. type: Title === #: documentation/content/en/articles/ldap-auth/_index.adoc:80 #, no-wrap msgid "Setting Up the Server for Connections" msgstr "Настройка сервера для подключений" #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:86 msgid "" "This section is specific to OpenLDAP. If you are using another server, you " "will need to consult that server's documentation." msgstr "" "Этот раздел относится конкретно к OpenLDAP. Если вы используете другой " "сервер, вам необходимо обратиться к документации этого сервера." #. type: Block title #: documentation/content/en/articles/ldap-auth/_index.adoc:89 #: documentation/content/en/articles/ldap-auth/_index.adoc:94 #, no-wrap msgid "Installing OpenLDAP" msgstr "Установка OpenLDAP" #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:92 msgid "First, install OpenLDAP:" msgstr "Сначала установите OpenLDAP:" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:102 #, no-wrap msgid "" "# cd /usr/ports/net/openldap26-server\n" "# make install clean\n" msgstr "" "# cd /usr/ports/net/openldap26-server\n" "# make install clean\n" #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:107 msgid "" "This installs the `slapd` and `slurpd` binaries, along with the required " "OpenLDAP libraries." msgstr "" "Это устанавливает бинарные файлы `slapd` и `slurpd`, а также необходимые " "библиотеки OpenLDAP." #. type: Title ==== #: documentation/content/en/articles/ldap-auth/_index.adoc:109 #, no-wrap msgid "Configuring OpenLDAP" msgstr "Настройка OpenLDAP" #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:112 msgid "Next we must configure OpenLDAP." msgstr "Далее мы должны настроить OpenLDAP." #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:115 msgid "" "You will want to require encryption in your connections to the LDAP server; " "otherwise your users' passwords will be transferred in plain text, which is " "considered insecure. The tools we will be using support two very similar " "kinds of encryption, SSL and TLS." msgstr "" "Вам следует требовать шифрование соединений с сервером LDAP; в противном " "случае пароли ваших пользователей будут передаваться в открытом виде, что " "считается небезопасным. Инструменты, которые мы будем использовать, " "поддерживают два очень похожих типа шифрования: SSL и TLS." #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:118 msgid "" "TLS stands for \"Transportation Layer Security\". Services that employ TLS " "tend to connect on the _same_ ports as the same services without TLS; thus " "an SMTP server which supports TLS will listen for connections on port 25, " "and an LDAP server will listen on 389." msgstr "" "TLS означает \"Transportation Layer Security\". Службы, использующие TLS, " "обычно подключаются к тем же портам, что и аналогичные службы без TLS; таким " "образом, SMTP-сервер с поддержкой TLS будет ожидать подключений на порту 25, " "а LDAP-сервер — на порту 389." #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:121 msgid "" "SSL stands for \"Secure Sockets Layer\", and services that implement SSL do " "_not_ listen on the same ports as their non-SSL counterparts. Thus SMTPS " "listens on port 465 (not 25), HTTPS listens on 443, and LDAPS on 636." msgstr "" "SSL означает «Secure Sockets Layer», и службы, реализующие SSL, _не_ " "работают на тех же портах, что и их аналоги без SSL. Таким образом, SMTPS " "использует порт 465 (а не 25), HTTPS — порт 443, а LDAPS — порт 636." #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:125 msgid "" "The reason SSL uses a different port than TLS is because a TLS connection " "begins as plain text, and switches to encrypted traffic after the `STARTTLS` " "directive. SSL connections are encrypted from the beginning. Other than " "that there are no substantial differences between the two." msgstr "" "Причина, по которой SSL использует другой порт, чем TLS, заключается в том, " "что соединение TLS начинается как обычный текст и переключается на " "зашифрованный трафик после директивы `STARTTLS`. Соединения SSL зашифрованы " "с самого начала. Кроме этого, существенных различий между ними нет." #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:129 msgid "We will adjust OpenLDAP to use TLS, as SSL is considered deprecated." msgstr "" "Мы настроим OpenLDAP для использования TLS, так как SSL считается устаревшим." #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:132 msgid "" "Once OpenLDAP is installed via ports, the following configuration parameters " "in [.filename]#/usr/local/etc/openldap/slapd.conf# will enable TLS:" msgstr "" "После установки OpenLDAP через порты следующие параметры конфигурации в [." "filename]#/usr/local/etc/openldap/slapd.conf# включат TLS:" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:136 #, no-wrap msgid "security ssf=128\n" msgstr "security ssf=128\n" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:140 #, no-wrap msgid "" "TLSCertificateFile /path/to/your/cert.crt\n" "TLSCertificateKeyFile /path/to/your/cert.key\n" "TLSCACertificateFile /path/to/your/cacert.crt\n" msgstr "" "TLSCertificateFile /path/to/your/cert.crt\n" "TLSCertificateKeyFile /path/to/your/cert.key\n" "TLSCACertificateFile /path/to/your/cacert.crt\n" #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:144 msgid "" "Here, `ssf=128` tells OpenLDAP to require 128-bit encryption for all " "connections, both search and update. This parameter may be configured based " "on the security needs of your site, but rarely you need to weaken it, as " "most LDAP client libraries support strong encryption." msgstr "" "В этом примере `ssf=128` указывает OpenLDAP требовать 128-битное шифрование " "для всех соединений, как для поиска, так и для обновления. Этот параметр " "может быть настроен в соответствии с требованиями безопасности вашего сайта, " "но ослаблять его требуется редко, так как большинство библиотек LDAP-" "клиентов поддерживают стойкое шифрование." #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:147 msgid "" "The [.filename]#cert.crt#, [.filename]#cert.key#, and [.filename]#cacert." "crt# files are necessary for clients to authenticate _you_ as the valid LDAP " "server. If you simply want a server that runs, you can create a self-signed " "certificate with OpenSSL:" msgstr "" "Файлы [.filename]#cert.crt#, [.filename]#cert.key# и [.filename]#cacert.crt# " "необходимы для аутентификации клиентами _вас_ как действительного LDAP-" "сервера. Если вам просто нужен работающий сервер, вы можете создать " "самоподписанный сертификат с помощью OpenSSL:" #. type: Block title #: documentation/content/en/articles/ldap-auth/_index.adoc:149 #, no-wrap msgid "Generating an RSA Key" msgstr "Генерация RSA-ключа" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:160 #, no-wrap msgid "" "% openssl genrsa -out cert.key 1024\n" "Generating RSA private key, 1024 bit long modulus\n" "....................++++++\n" "...++++++\n" "e is 65537 (0x10001)\n" msgstr "" "% openssl genrsa -out cert.key 1024\n" "Generating RSA private key, 1024 bit long modulus\n" "....................++++++\n" "...++++++\n" "e is 65537 (0x10001)\n" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:162 #, no-wrap msgid "% openssl req -new -key cert.key -out cert.csr\n" msgstr "% openssl req -new -key cert.key -out cert.csr\n" #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:171 msgid "" "At this point you should be prompted for some values. You may enter " "whatever values you like; however, it is important the \"Common Name\" value " "be the fully qualified domain name of the OpenLDAP server. In our case, and " "the examples here, the server is _server.example.org_. Incorrectly setting " "this value will cause clients to fail when making connections. This can the " "cause of great frustration, so ensure that you follow these steps closely." msgstr "" "На этом этапе вам будет предложено ввести некоторые значения. Вы можете " "ввести любые значения, какие пожелаете; однако важно, чтобы значение \"Common" " Name\" (Общее имя) было полным доменным именем сервера OpenLDAP. В нашем " "случае и в приведённых примерах сервер называется _server.example.org_. " "Неправильное указание этого значения может привести к сбоям при подключении " "клиентов. Это может стать причиной серьёзных проблем, поэтому внимательно " "следуйте этим шагам." #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:173 msgid "Finally, the certificate signing request needs to be signed:" msgstr "Наконец, запрос на подпись сертификата должен быть подписан:" #. type: Block title #: documentation/content/en/articles/ldap-auth/_index.adoc:175 #, no-wrap msgid "Self-signing the Certificate" msgstr "Самостоятельная подпись сертификата" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:185 #, no-wrap msgid "" "% openssl x509 -req -in cert.csr -days 365 -signkey cert.key -out cert.crt\n" "Signature ok\n" "subject=/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd\n" "Getting Private key\n" msgstr "" "% openssl x509 -req -in cert.csr -days 365 -signkey cert.key -out cert.crt\n" "Signature ok\n" "subject=/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd\n" "Getting Private key\n" #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:192 msgid "" "This will create a self-signed certificate that can be used for the " "directives in [.filename]#slapd.conf#, where [.filename]#cert.crt# and [." "filename]#cacert.crt# are the same file. If you are going to use many " "OpenLDAP servers (for replication via `slurpd`) you will want to see " "crossref:ldap-auth[ssl-ca, OpenSSL Certificates for LDAP] to generate a CA " "key and use it to sign individual server certificates." msgstr "" "Это создаст самоподписанный сертификат, который можно использовать для " "директив в [.filename]#slapd.conf#, где [.filename]#cert.crt# и [." "filename]#cacert.crt# представляют собой один и тот же файл. Если вы " "планируете использовать множество серверов OpenLDAP (для репликации через " "`slurpd`), рекомендуется ознакомиться с разделом crossref:ldap-auth[ssl-ca, " "Сертификаты OpenSSL для LDAP], чтобы сгенерировать ключ центра сертификации " "(CA) и использовать его для подписи индивидуальных сертификатов серверов." #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:194 msgid "Once this is done, put the following in [.filename]#/etc/rc.conf#:" msgstr "После этого добавьте следующее в [.filename]#/etc/rc.conf#:" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:198 #, no-wrap msgid "slapd_enable=\"YES\"\n" msgstr "slapd_enable=\"YES\"\n" #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:203 msgid "" "Then run `/usr/local/etc/rc.d/slapd start`. This should start OpenLDAP. " "Confirm that it is listening on 389 with" msgstr "" "Затем выполните `/usr/local/etc/rc.d/slapd start`. Это должно запустить " "OpenLDAP. Убедитесь, что он слушает порт 389 с помощью" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:208 #, no-wrap msgid "" "% sockstat -4 -p 389\n" "ldap slapd 3261 7 tcp4 *:389 *:*\n" msgstr "" "% sockstat -4 -p 389\n" "ldap slapd 3261 7 tcp4 *:389 *:*\n" #. type: Title ==== #: documentation/content/en/articles/ldap-auth/_index.adoc:211 #, no-wrap msgid "Configuring the Client" msgstr "Настройка клиента" #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:215 msgid "" "Install the package:net/openldap26-client[] port for the OpenLDAP " "libraries. The client machines will always have OpenLDAP libraries since " "that is all package:security/pam_ldap[] and package:net/nss_ldap[] support, " "at least for the moment." msgstr "" "Установите порт package:net/openldap26-client[] для библиотек OpenLDAP. " "Клиентские машины всегда будут иметь библиотеки OpenLDAP, так как они " "содержатся в пакетах package:security/pam_ldap[] и package:net/nss_ldap[], " "по крайней мере, на данный момент." #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:218 msgid "" "The configuration file for the OpenLDAP libraries is [.filename]#/usr/local/" "etc/openldap/ldap.conf#. Edit this file to contain the following values:" msgstr "" "Файл конфигурации для библиотек OpenLDAP — это [.filename]#/usr/local/etc/" "openldap/ldap.conf#. Отредактируйте этот файл, указав следующие значения:" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:225 #, no-wrap msgid "" "base dc=example,dc=org\n" "uri ldap://server.example.org/\n" "ssl start_tls\n" "tls_cacert /path/to/your/cacert.crt\n" msgstr "" "base dc=example,dc=org\n" "uri ldap://server.example.org/\n" "ssl start_tls\n" "tls_cacert /path/to/your/cacert.crt\n" #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:230 msgid "" "It is important that your clients have access to [.filename]#cacert.crt#, " "otherwise they will not be able to connect." msgstr "" "Важно, чтобы у ваших клиентов был доступ к [.filename]#cacert.crt#, иначе " "они не смогут подключиться." #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:237 msgid "" "There are two files called [.filename]#ldap.conf#. The first is this file, " "which is for the OpenLDAP libraries and defines how to talk to the server. " "The second is [.filename]#/usr/local/etc/ldap.conf#, and is for pam_ldap." msgstr "" "Существует два файла с именем [.filename]#ldap.conf#. Первый — это данный " "файл, предназначенный для библиотек OpenLDAP и определяющий, как " "взаимодействовать с сервером. Второй — [.filename]#/usr/local/etc/ldap.conf#" ", используется pam_ldap." #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:242 msgid "" "At this point you should be able to run `ldapsearch -Z` on the client " "machine; `-Z` means \"use TLS\". If you encounter an error, then something " "is configured wrong; most likely it is your certificates. Use man:" "openssl[1]'s `s_client` and `s_server` to ensure you have them configured " "and signed properly." msgstr "" "На этом этапе вы должны быть в состоянии выполнить `ldapsearch -Z` на " "клиентской машине; `-Z` означает \"использовать TLS\". Если вы столкнётесь с " "ошибкой, значит что-то настроено неправильно; скорее всего, проблема в ваших " "сертификатах. Используйте `s_client` и `s_server` из man:openssl[1], чтобы " "убедиться, что они правильно настроены и подписаны." #. type: Title === #: documentation/content/en/articles/ldap-auth/_index.adoc:244 #, no-wrap msgid "Entries in the Database" msgstr "Записи в базе данных" #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:249 msgid "" "Authentication against an LDAP directory is generally accomplished by " "attempting to bind to the directory as the connecting user. This is done by " "establishing a \"simple\" bind on the directory with the user name " "supplied. If there is an entry with the `uid` equal to the user name and " "that entry's `userPassword` attribute matches the password supplied, then " "the bind is successful." msgstr "" "Аутентификация в каталоге LDAP обычно выполняется путем попытки привязаться " "к каталогу как подключающийся пользователь. Это делается путем установки " "\"простой\" привязки к каталогу с предоставленным именем пользователя. Если " "существует запись с `uid`, равным имени пользователя, и атрибут " "`userPassword` этой записи совпадает с предоставленным паролем, то привязка " "проходит успешно." #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:251 msgid "" "The first thing we have to do is figure out is where in the directory our " "users will live." msgstr "" "Первое, что нам нужно сделать, — это определить, где в каталоге будут " "находиться наши пользователи." #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:255 msgid "" "The base entry for our database is `dc=example,dc=org`. The default " "location for users that most clients seem to expect is something like " "`ou=people,_base_`, so that is what will be used here. However keep in mind " "that this is configurable." msgstr "" "Базовой записью для нашей базы данных является `dc=example,dc=org`. " "Стандартное расположение пользователей, которое ожидает большинство " "клиентов, выглядит примерно как `ou=people,_base_`, поэтому здесь будет " "использоваться именно это. Однако следует помнить, что это настраивается." #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:257 msgid "So the ldif entry for the `people` organizational unit will look like:" msgstr "" "Таким образом, запись ldif для организационного подразделения `people` будет " "выглядеть следующим образом:" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:264 #, no-wrap msgid "" "dn: ou=people,dc=example,dc=org\n" "objectClass: top\n" "objectClass: organizationalUnit\n" "ou: people\n" msgstr "" "dn: ou=people,dc=example,dc=org\n" "objectClass: top\n" "objectClass: organizationalUnit\n" "ou: people\n" #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:267 msgid "All users will be created as subentries of this organizational unit." msgstr "" "Все пользователи будут созданы как подразделы этой организационной единицы." #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:272 msgid "" "Some thought might be given to the object class your users will belong to. " "Most tools by default will use `people`, which is fine if you simply want to " "provide entries against which to authenticate. However, if you are going to " "store user information in the LDAP database as well, you will probably want " "to use `inetOrgPerson`, which has many useful attributes. In either case, " "the relevant schemas need to be loaded in [.filename]#slapd.conf#." msgstr "" "Некоторые размышления стоит посвятить классу объектов, к которому будут " "принадлежать ваши пользователи. Большинство инструментов по умолчанию " "используют `people`, что подходит, если вам просто нужно предоставить записи " "для аутентификации. Однако, если вы также собираетесь хранить информацию о " "пользователях в базе данных LDAP, вам, вероятно, стоит использовать " "`inetOrgPerson`, который имеет множество полезных атрибутов. В любом случае, " "соответствующие схемы должны быть загружены в [.filename]#slapd.conf#." #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:275 msgid "" "For this example we will use the `person` object class. If you are using " "`inetOrgPerson`, the steps are basically identical, except that the `sn` " "attribute is required." msgstr "" "Для этого примера мы будем использовать класс объекта `person`. Если вы " "используете `inetOrgPerson`, шаги практически идентичны, за исключением " "того, что атрибут `sn` является обязательным." #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:277 msgid "To add a test-user named `tuser`, the ldif would be:" msgstr "" "Чтобы добавить тестового пользователя с именем `tuser`, ldif-файл должен " "выглядеть так:" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:291 #, no-wrap msgid "" "dn: uid=tuser,ou=people,dc=example,dc=org\n" "objectClass: person\n" "objectClass: posixAccount\n" "objectClass: shadowAccount\n" "objectClass: top\n" "uidNumber: 10000\n" "gidNumber: 10000\n" "homeDirectory: /home/tuser\n" "loginShell: /bin/csh\n" "uid: tuser\n" "cn: tuser\n" msgstr "" "dn: uid=tuser,ou=people,dc=example,dc=org\n" "objectClass: person\n" "objectClass: posixAccount\n" "objectClass: shadowAccount\n" "objectClass: top\n" "uidNumber: 10000\n" "gidNumber: 10000\n" "homeDirectory: /home/tuser\n" "loginShell: /bin/csh\n" "uid: tuser\n" "cn: tuser\n" #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:294 msgid "" "I start my LDAP users' UIDs at 10000 to avoid collisions with system " "accounts; you can configure whatever number you wish here, as long as it is " "less than 65536." msgstr "" "Я начинаю UID пользователей LDAP с 10000, чтобы избежать конфликтов с " "системными учётными записями; вы можете настроить любое число здесь, при " "условии что оно меньше 65536." #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:297 msgid "" "We also need group entries. They are as configurable as user entries, but " "we will use the defaults below:" msgstr "" "Также необходимы записи групп. Они настраиваются так же, как записи " "пользователей, но мы будем использовать стандартные значения, приведённые " "ниже:" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:304 #, no-wrap msgid "" "dn: ou=groups,dc=example,dc=org\n" "objectClass: top\n" "objectClass: organizationalUnit\n" "ou: groups\n" msgstr "" "dn: ou=groups,dc=example,dc=org\n" "objectClass: top\n" "objectClass: organizationalUnit\n" "ou: groups\n" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:310 #, no-wrap msgid "" "dn: cn=tuser,ou=groups,dc=example,dc=org\n" "objectClass: posixGroup\n" "objectClass: top\n" "gidNumber: 10000\n" "cn: tuser\n" msgstr "" "dn: cn=tuser,ou=groups,dc=example,dc=org\n" "objectClass: posixGroup\n" "objectClass: top\n" "gidNumber: 10000\n" "cn: tuser\n" #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:314 msgid "" "To enter these into your database, you can use `slapadd` or `ldapadd` on a " "file containing these entries. Alternatively, you can use package:sysutils/" "ldapvi[]." msgstr "" "Чтобы добавить их в вашу базу данных, вы можете использовать `slapadd` или " -"`ldapadd` для файла, содержащего эти записи. Альтернативно, вы можете " -"использовать package:sysutils/ldapvi[]." +"`ldapadd` для файла, содержащего эти записи. Или вы можете использовать " +"package:sysutils/ldapvi[]." #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:317 msgid "" "The `ldapsearch` utility on the client machine should now return these " "entries. If it does, your database is properly configured to be used as an " "LDAP authentication server." msgstr "" "Утилита `ldapsearch` на клиентской машине теперь должна возвращать эти " "записи. Если это так, ваша база данных правильно настроена для использования " "в качестве сервера аутентификации LDAP." #. type: Title == #: documentation/content/en/articles/ldap-auth/_index.adoc:319 #, no-wrap msgid "Client Configuration" msgstr "Конфигурация клиента" #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:323 msgid "" "The client should already have OpenLDAP libraries from crossref:ldap-" "auth[ldap-connect-client,Configuring the Client], but if you are installing " "several client machines you will need to install package:net/openldap26-" "client[] on each of them." msgstr "" "Клиент уже должен иметь библиотеки OpenLDAP из crossref:ldap-auth[ldap-" "connect-client,Настройка клиента], но если вы устанавливаете несколько " "клиентских машин, вам потребуется установить package:net/openldap26-client[] " "на каждой из них." #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:325 msgid "" "FreeBSD requires two ports to be installed to authenticate against an LDAP " "server, package:security/pam_ldap[] and package:net/nss_ldap[]." msgstr "" "Для аутентификации на сервере LDAP в FreeBSD необходимо установить два порта:" " package:security/pam_ldap[] и package:net/nss_ldap[]." #. type: Title === #: documentation/content/en/articles/ldap-auth/_index.adoc:327 #, no-wrap msgid "Authentication" msgstr "Аутентификация" #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:330 msgid "" "package:security/pam_ldap[] is configured via [.filename]#/usr/local/etc/" "ldap.conf#." msgstr "" "package:security/pam_ldap[] настраивается через [.filename]#/usr/local/etc/" "ldap.conf#." #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:335 msgid "" "This is a _different file_ than the OpenLDAP library functions' " "configuration file, [.filename]#/usr/local/etc/openldap/ldap.conf#; however, " "it takes many of the same options; in fact it is a superset of that file. " "For the rest of this section, references to [.filename]#ldap.conf# will mean " "[.filename]#/usr/local/etc/ldap.conf#." msgstr "" "Это _другой файл_, отличный от файла конфигурации библиотечных функций " "OpenLDAP, [.filename]#/usr/local/etc/openldap/ldap.conf#; однако он " "принимает многие из тех же параметров; фактически он является надмножеством " "этого файла. В оставшейся части этого раздела ссылки на [.filename]#ldap." "conf# будут означать [.filename]#/usr/local/etc/ldap.conf#." #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:339 msgid "" "Thus, we will want to copy all of our original configuration parameters from " "[.filename]#openldap/ldap.conf# to the new [.filename]#ldap.conf#. Once " "this is done, we want to tell package:security/pam_ldap[] what to look for " "on the directory server." msgstr "" "Таким образом, мы захотим скопировать все исходные параметры конфигурации из " "[.filename]#openldap/ldap.conf# в новый [.filename]#ldap.conf#. После этого " "нам нужно указать package:security/pam_ldap[], что искать на сервере " "каталогов." #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:342 msgid "" "We are identifying our users with the `uid` attribute. To configure this " "(though it is the default), set the `pam_login_attribute` directive in [." "filename]#ldap.conf#:" msgstr "" "Мы идентифицируем наших пользователей с помощью атрибута `uid`. Чтобы " "настроить это (хотя это значение по умолчанию), укажите директиву " "`pam_login_attribute` в [.filename]#ldap.conf#:" #. type: Block title #: documentation/content/en/articles/ldap-auth/_index.adoc:344 #, no-wrap msgid "Setting `pam_login_attribute`" msgstr "Установка `pam_login_attribute`" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:351 #, no-wrap msgid "pam_login_attribute uid\n" msgstr "pam_login_attribute uid\n" #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:359 msgid "" "With this set, package:security/pam_ldap[] will search the entire LDAP " "directory under `base` for the value `uid=_username_`. If it finds one and " "only one entry, it will attempt to bind as that user with the password it " "was given. If it binds correctly, then it will allow access. Otherwise it " "will fail." msgstr "" "С таким набором, package:security/pam_ldap[] будет искать во всей LDAP-" "директории под `base` значение `uid=_имя_пользователя_`. Если оно найдёт " "одну и только одну запись, будет предпринята попытка привязаться к этой " "записи с использованием предоставленного пароля. Если привязка произойдёт " "успешно, доступ будет разрешён. В противном случае доступ будет запрещён." #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:365 msgid "" "Users whose shell is not in [.filename]#/etc/shells# will not be able to log " "in. This is particularly important when Bash is set as the user shell on " "the LDAP server. Bash is not included with a default installation of " "FreeBSD. When installed from a package or port, it is located at [." "filename]#/usr/local/bin/bash#. Verify that the path to the shell on the " "server is set correctly:" msgstr "" "Пользователи, чья оболочка не указана в [.filename]#/etc/shells#, не смогут " "войти в систему. Это особенно важно, когда Bash установлен как оболочка " "пользователя на сервере LDAP. Bash не входит в стандартную установку " "FreeBSD. При установке из пакета или порта, он располагается в [.filename]#/" "usr/local/bin/bash#. Убедитесь, что путь к оболочке на сервере указан " "правильно:" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:369 #, no-wrap msgid "% getent passwd username\n" msgstr "% getent passwd username\n" #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:374 msgid "" "There are two choices when the output shows `/bin/bash` in the last column. " "The first is to change the user's entry on the LDAP server to [.filename]#/" "usr/local/bin/bash#. The second option is to create a symlink on the LDAP " "client computer so Bash is found at the correct location:" msgstr "" "Если в последнем столбце вывода указан `/bin/bash`, есть два варианта " "действий. Первый — изменить запись пользователя на сервере LDAP на [." "filename]#/usr/local/bin/bash#. Второй вариант — создать символическую " "ссылку на клиентском компьютере LDAP, чтобы Bash находился в правильном " "месте:" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:378 #, no-wrap msgid "# ln -s /usr/local/bin/bash /bin/bash\n" msgstr "# ln -s /usr/local/bin/bash /bin/bash\n" #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:382 msgid "" "Make sure that [.filename]#/etc/shells# contains entries for both `/usr/" "local/bin/bash` and `/bin/bash`. The user will then be able to log in to " "the system with Bash as their shell." msgstr "" "Убедитесь, что файл [.filename]#/etc/shells# содержит записи для `/usr/local/" "bin/bash` и `/bin/bash`. После этого пользователь сможет входить в систему с " "Bash в качестве оболочки." #. type: Title ==== #: documentation/content/en/articles/ldap-auth/_index.adoc:384 #, no-wrap msgid "PAM" msgstr "PAM" #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:388 msgid "" "PAM, which stands for \"Pluggable Authentication Modules\", is the method by " "which FreeBSD authenticates most of its sessions. To tell FreeBSD we wish " "to use an LDAP server, we will have to add a line to the appropriate PAM " "file." msgstr "" "PAM, что означает \"Pluggable Authentication Modules\" (подключаемые модули " "аутентификации), является методом, с помощью которого FreeBSD " "аутентифицирует большинство своих сеансов. Чтобы указать FreeBSD, что мы " "хотим использовать LDAP-сервер, нам необходимо добавить строку в " "соответствующий файл PAM." #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:390 msgid "" "Most of the time the appropriate PAM file is [.filename]#/etc/pam.d/sshd#, " "if you want to use SSH (remember to set the relevant options in [.filename]#/" "etc/ssh/sshd_config#, otherwise SSH will not use PAM)." msgstr "" "В большинстве случаев подходящий файл PAM — это [.filename]#/etc/pam.d/sshd#" ", если вы хотите использовать SSH (не забудьте установить соответствующие " "параметры в [.filename]#/etc/ssh/sshd_config#, иначе SSH не будет " "использовать PAM)." #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:392 msgid "To use PAM for authentication, add the line" msgstr "Чтобы использовать PAM для аутентификации, добавьте строку" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:396 #, no-wrap msgid "auth sufficient /usr/local/lib/pam_ldap.so no_warn\n" msgstr "auth sufficient /usr/local/lib/pam_ldap.so no_warn\n" #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:399 msgid "" "Exactly where this line shows up in the file and which options appear in the " "fourth column determine the exact behavior of the authentication mechanism; " "see man:pam[d]" msgstr "" "Строгое место, где эта строка появляется в файле, и какие опции указаны в " "четвертом столбце, определяют точное поведение механизма аутентификации; см. " "man:pam[d]" #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:402 msgid "" "With this configuration you should be able to authenticate a user against an " "LDAP directory. PAM will perform a bind with your credentials, and if " "successful will tell SSH to allow access." msgstr "" "С такой конфигурацией вы сможете аутентифицировать пользователя в LDAP-" -"каталоге. PAM выполнит привязку с вашими учетными данными, и в случае успеха " +"каталоге. PAM выполнит привязку с вашими учётными данными, и в случае успеха " "сообщит SSH разрешить доступ." #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:406 msgid "" "However it is not a good idea to allow _every_ user in the directory into " "_every_ client machine. With the current configuration, all that a user " "needs to log into a machine is an LDAP entry. Fortunately there are a few " "ways to restrict user access." msgstr "" "Однако разрешать _каждому_ пользователю в каталоге доступ к _каждой_ " "клиентской машине — не лучшая идея. При текущей конфигурации пользователю " "для входа на машину достаточно наличия записи в LDAP. К счастью, есть " "несколько способов ограничить доступ пользователей." #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:409 msgid "" "[.filename]#ldap.conf# supports a `pam_groupdn` directive; every account " "that connects to this machine needs to be a member of the group specified " "here. For example, if you have" msgstr "" "[.filename]#ldap.conf# поддерживает директиву `pam_groupdn`; каждая учётная " "запись, подключающаяся к этой машине, должна быть членом группы, указанной " "здесь. Например, если у вас есть" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:413 #, no-wrap msgid "pam_groupdn cn=servername,ou=accessgroups,dc=example,dc=org\n" msgstr "pam_groupdn cn=servername,ou=accessgroups,dc=example,dc=org\n" #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:417 msgid "" "in [.filename]#ldap.conf#, then only members of that group will be able to " "log in. There are a few things to bear in mind, however." msgstr "" "в [.filename]#ldap.conf#, тогда только члены этой группы смогут войти в " "систему. Однако есть несколько моментов, которые следует учитывать." #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:420 msgid "" "Members of this group are specified in one or more `memberUid` attributes, " "and each attribute must have the full distinguished name of the member. So " "`memberUid: someuser` will not work; it must be:" msgstr "" "Участники этой группы указываются в одном или нескольких атрибутах " "`memberUid`, и каждый атрибут должен содержать полное отличающееся имя " "участника. Таким образом, `memberUid: someuser` не сработает; необходимо " "указать:" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:424 #, no-wrap msgid "memberUid: uid=someuser,ou=people,dc=example,dc=org\n" msgstr "memberUid: uid=someuser,ou=people,dc=example,dc=org\n" #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:430 msgid "" "Additionally, this directive is not checked in PAM during authentication, it " "is checked during account management, so you will need a second line in your " "PAM files under `account`. This will require, in turn, _every_ user to be " "listed in the group, which is not necessarily what we want. To avoid " "blocking users that are not in LDAP, you should enable the " "`ignore_unknown_user` attribute. Finally, you should set the " "`ignore_authinfo_unavail` option so that you are not locked out of every " "computer when the LDAP server is unavailable." msgstr "" "Кроме того, эта директива не проверяется в PAM во время аутентификации, она " "проверяется во время управления учётными записями, поэтому вам понадобится " "вторая строка в ваших PAM-файлах в разделе `account`. Это, в свою очередь, " "потребует, чтобы _каждый_ пользователь был указан в группе, что не " "обязательно соответствует нашим желаниям. Чтобы избежать блокировки " "пользователей, не находящихся в LDAP, следует включить атрибут " "`ignore_unknown_user`. Наконец, следует установить опцию " "`ignore_authinfo_unavail`, чтобы не оказаться заблокированным на каждом " "компьютере при недоступности LDAP-сервера." #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:432 msgid "Your [.filename]#pam.d/sshd# might then end up looking like this:" msgstr "Ваш файл [.filename]#pam.d/sshd# может в итоге выглядеть так:" #. type: Block title #: documentation/content/en/articles/ldap-auth/_index.adoc:434 #, no-wrap msgid "Sample [.filename]#pam.d/sshd#" msgstr "Пример [.filename]#pam.d/sshd#" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:445 #, no-wrap msgid "" "auth required pam_nologin.so no_warn\n" "auth sufficient pam_opie.so no_warn no_fake_prompts\n" "auth requisite pam_opieaccess.so no_warn allow_local\n" "auth sufficient /usr/local/lib/pam_ldap.so no_warn\n" "auth required pam_unix.so no_warn try_first_pass\n" msgstr "" "auth required pam_nologin.so no_warn\n" "auth sufficient pam_opie.so no_warn " "no_fake_prompts\n" "auth requisite pam_opieaccess.so no_warn allow_local\n" "auth sufficient /usr/local/lib/pam_ldap.so no_warn\n" "auth required pam_unix.so no_warn " "try_first_pass\n" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:448 #, no-wrap msgid "" "account required pam_login_access.so\n" "account required /usr/local/lib/pam_ldap.so no_warn ignore_authinfo_unavail ignore_unknown_user\n" msgstr "" "account required pam_login_access.so\n" "account required /usr/local/lib/pam_ldap.so no_warn " "ignore_authinfo_unavail ignore_unknown_user\n" #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:457 msgid "" "Since we are adding these lines specifically to [.filename]#pam.d/sshd#, " "this will only have an effect on SSH sessions. LDAP users will be unable to " "log in at the console. To change this behavior, examine the other files in " "[.filename]#/etc/pam.d# and modify them accordingly." msgstr "" "Поскольку мы добавляем эти строки конкретно в [.filename]#pam.d/sshd#, это " "повлияет только на SSH-сеансы. Пользователи LDAP не смогут войти через " "консоль. Чтобы изменить это поведение, изучите остальные файлы в [." "filename]#/etc/pam.d# и измените их соответствующим образом." #. type: Title === #: documentation/content/en/articles/ldap-auth/_index.adoc:460 #, no-wrap msgid "Name Service Switch" msgstr "Name Service Switch" #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:464 msgid "" "NSS is the service that maps attributes to names. So, for example, if a " "file is owned by user `1001`, an application will query NSS for the name of " "`1001`, and it might get `bob` or `ted` or whatever the user's name is." msgstr "" "NSS — это служба, которая сопоставляет атрибуты с именами. Например, если " "файл принадлежит пользователю `1001`, приложение запросит у NSS имя для " "`1001` и может получить `bob`, `ted` или любое другое имя пользователя." #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:466 msgid "" "Now that our user information is kept in LDAP, we need to tell NSS to look " "there when queried." msgstr "" "Теперь, когда информация о пользователях хранится в LDAP, необходимо указать " "NSS обращаться туда при запросах." #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:471 msgid "" "The package:net/nss_ldap[] port does this. It uses the same configuration " "file as package:security/pam_ldap[], and should not need any extra " "parameters once it is installed. Instead, what is left is simply to edit [." "filename]#/etc/nsswitch.conf# to take advantage of the directory. Simply " "replace the following lines:" msgstr "" "Порт package:net/nss_ldap[] выполняет это. Он использует тот же " "конфигурационный файл, что и package:security/pam_ldap[], и после установки " "не должен требовать дополнительных параметров. Вместо этого остаётся просто " "отредактировать [.filename]#/etc/nsswitch.conf#, чтобы воспользоваться " "преимуществами каталога. Просто замените следующие строки:" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:476 #, no-wrap msgid "" "group: compat\n" "passwd: compat\n" msgstr "" "group: compat\n" "passwd: compat\n" #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:479 msgid "with" msgstr "строкой" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:484 #, no-wrap msgid "" "group: files ldap\n" "passwd: files ldap\n" msgstr "" "group: files ldap\n" "passwd: files ldap\n" #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:487 msgid "This will allow you to map usernames to UIDs and UIDs to usernames." msgstr "" "Это позволит сопоставлять имена пользователей с UID и UID с именами " "пользователей." #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:489 msgid "Congratulations! You should now have working LDAP authentication." msgstr "Поздравляем! Теперь у вас должна работать аутентификация через LDAP." #. type: Title === #: documentation/content/en/articles/ldap-auth/_index.adoc:491 #, no-wrap msgid "Caveats" msgstr "Предостережения" #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:498 msgid "" "Unfortunately, as of the time this was written FreeBSD did not support " "changing user passwords with man:passwd[1]. As a result of this, most " "administrators are left to implement a solution themselves. I provide some " "examples here. Note that if you write your own password change script, " "there are some security issues you should be made aware of; see crossref:" "ldap-auth[security-passwd, Password Storage]" msgstr "" "К сожалению, на момент написания этой документации FreeBSD не поддерживал " "изменение паролей пользователей с помощью man:passwd[1]. В результате " "большинству администраторов приходится самостоятельно реализовывать решение. " "Здесь я привожу несколько примеров. Обратите внимание, что если вы пишете " "собственный скрипт для смены пароля, вам следует учитывать некоторые " "проблемы безопасности; см. crossref:ldap-auth[security-passwd, Хранение " "паролей]" #. type: Block title #: documentation/content/en/articles/ldap-auth/_index.adoc:500 #, no-wrap msgid "Shell Script for Changing Passwords" msgstr "Скрипт оболочки для изменения паролей" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:507 #, no-wrap msgid "#!/bin/sh\n" msgstr "#!/bin/sh\n" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:513 #, no-wrap msgid "" "stty -echo\n" "read -p \"Old Password: \" oldp; echo\n" "read -p \"New Password: \" np1; echo\n" "read -p \"Retype New Password: \" np2; echo\n" "stty echo\n" msgstr "" "stty -echo\n" "read -p \"Old Password: \" oldp; echo\n" "read -p \"New Password: \" np1; echo\n" "read -p \"Retype New Password: \" np2; echo\n" "stty echo\n" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:518 #, no-wrap msgid "" "if [ \"$np1\" != \"$np2\" ]; then\n" " echo \"Passwords do not match.\"\n" " exit 1\n" "fi\n" msgstr "" "if [ \"$np1\" != \"$np2\" ]; then\n" " echo \"Passwords do not match.\"\n" " exit 1\n" "fi\n" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:523 #, no-wrap msgid "" "ldappasswd -D uid=\"$USER\",ou=people,dc=example,dc=org \\\n" " -w \"$oldp\" \\\n" " -a \"$oldp\" \\\n" " -s \"$np1\"\n" msgstr "" "ldappasswd -D uid=\"$USER\",ou=people,dc=example,dc=org \\\n" " -w \"$oldp\" \\\n" " -a \"$oldp\" \\\n" " -s \"$np1\"\n" #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:532 msgid "" "This script does hardly any error checking, but more important it is very " "cavalier about how it stores your passwords. If you do anything like this, " "at least adjust the `security.bsd.see_other_uids` sysctl value:" msgstr "" "Этот скрипт почти не проверяет ошибки, что более важно, он очень беспечен в " "том, как хранит ваши пароли. Если вы делаете что-то подобное, по крайней " "мере измените значение sysctl `security.bsd.see_other_uids`:" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:536 #, no-wrap msgid "# sysctl security.bsd.see_other_uids=0\n" msgstr "# sysctl security.bsd.see_other_uids=0\n" #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:543 msgid "" "A more flexible (and probably more secure) approach can be used by writing a " "custom program, or even a web interface. The following is part of a Ruby " "library that can change LDAP passwords. It sees use both on the command " "line, and on the web." msgstr "" "Более гибкий (и, вероятно, более безопасный) подход может быть реализован " "путем написания собственной программы или даже веб-интерфейса. Ниже " "приведена часть библиотеки на Ruby, которая позволяет изменять пароли в " "LDAP. Она используется как в командной строке, так и в вебе." #. type: Block title #: documentation/content/en/articles/ldap-auth/_index.adoc:545 #, no-wrap msgid "Ruby Script for Changing Passwords" msgstr "Ruby-скрипт для изменения паролей" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:555 #, no-wrap msgid "" "require 'ldap'\n" "require 'base64'\n" "require 'digest'\n" "require 'password' # ruby-password\n" msgstr "" "require 'ldap'\n" "require 'base64'\n" "require 'digest'\n" "require 'password' # ruby-password\n" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:558 #, no-wrap msgid "" "ldap_server = \"ldap.example.org\"\n" "luser = \"uid=#{ENV['USER']},ou=people,dc=example,dc=org\"\n" msgstr "" "ldap_server = \"ldap.example.org\"\n" "luser = \"uid=#{ENV['USER']},ou=people,dc=example,dc=org\"\n" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:563 #, no-wrap msgid "" "# get the new password, check it, and create a salted hash from it\n" "def get_password\n" " pwd1 = Password.get(\"New Password: \")\n" " pwd2 = Password.get(\"Retype New Password: \")\n" msgstr "" "# get the new password, check it, and create a salted hash from it\n" "def get_password\n" " pwd1 = Password.get(\"New Password: \")\n" " pwd2 = Password.get(\"Retype New Password: \")\n" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:566 #, no-wrap msgid "" " raise if pwd1 != pwd2\n" " pwd1.check # check password strength\n" msgstr "" " raise if pwd1 != pwd2\n" " pwd1.check # check password strength\n" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:572 #, no-wrap msgid "" " salt = rand.to_s.gsub(/0\\./, '')\n" " pass = pwd1.to_s\n" " hash = \"{SSHA}\"+Base64.encode64(Digest::SHA1.digest(\"#{pass}#{salt}\")+salt).chomp!\n" " return hash\n" "end\n" msgstr "" " salt = rand.to_s.gsub(/0\\./, '')\n" " pass = pwd1.to_s\n" " hash = \"{SSHA}\"+Base64.encode64(Digest::SHA1.digest(\"#{pass}#{salt}\"" ")+salt).chomp!\n" " return hash\n" "end\n" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:575 #, no-wrap msgid "" "oldp = Password.get(\"Old Password: \")\n" "newp = get_password\n" msgstr "" "oldp = Password.get(\"Old Password: \")\n" "newp = get_password\n" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:578 #, no-wrap msgid "" "# We'll just replace it. That we can bind proves that we either know\n" "# the old password or are an admin.\n" msgstr "" "# We'll just replace it. That we can bind proves that we either know\n" "# the old password or are an admin.\n" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:582 #, no-wrap msgid "" "replace = LDAP::Mod.new(LDAP::LDAP_MOD_REPLACE | LDAP::LDAP_MOD_BVALUES,\n" " \"userPassword\",\n" " [newp])\n" msgstr "" "replace = LDAP::Mod.new(LDAP::LDAP_MOD_REPLACE | LDAP::LDAP_MOD_BVALUES,\n" " \"userPassword\",\n" " [newp])\n" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:587 #, no-wrap msgid "" "conn = LDAP::SSLConn.new(ldap_server, 389, true)\n" "conn.set_option(LDAP::LDAP_OPT_PROTOCOL_VERSION, 3)\n" "conn.bind(luser, oldp)\n" "conn.modify(luser, [replace])\n" msgstr "" "conn = LDAP::SSLConn.new(ldap_server, 389, true)\n" "conn.set_option(LDAP::LDAP_OPT_PROTOCOL_VERSION, 3)\n" "conn.bind(luser, oldp)\n" "conn.modify(luser, [replace])\n" #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:592 msgid "" "Although not guaranteed to be free of security holes (the password is kept " "in memory, for example) this is cleaner and more flexible than a simple `sh` " "script." msgstr "" "Хотя это не гарантирует отсутствия уязвимостей (например, пароль хранится в " "памяти), данный подход чище и гибче, чем простой скрипт на `sh`." #. type: Title == #: documentation/content/en/articles/ldap-auth/_index.adoc:594 #, no-wrap msgid "Security Considerations" msgstr "Безопасность" #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:597 msgid "" "Now that your machines (and possibly other services) are authenticating " "against your LDAP server, this server needs to be protected at least as well " "as [.filename]#/etc/master.passwd# would be on a regular server, and " "possibly even more so since a broken or cracked LDAP server would break " "every client service." msgstr "" "Теперь, когда ваши машины (и, возможно, другие службы) проходят " "аутентификацию через ваш LDAP-сервер, этот сервер необходимо защитить как " "минимум так же, как [.filename]#/etc/master.passwd# на обычном сервере, а " "возможно, и лучше, поскольку сломанный или взломанный LDAP-сервер нарушит " "работу всех клиентских служб." #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:600 msgid "" "Remember, this section is not exhaustive. You should continually review " "your configuration and procedures for improvements." msgstr "" "Помните, что этот раздел не является исчерпывающим. Вам следует постоянно " "пересматривать свою конфигурацию и процедуры для улучшений." #. type: Title === #: documentation/content/en/articles/ldap-auth/_index.adoc:602 #, no-wrap msgid "Setting Attributes Read-only" msgstr "Установка атрибутов только для чтения" #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:606 msgid "" "Several attributes in LDAP should be read-only. If left writable by the " "user, for example, a user could change his `uidNumber` attribute to `0` and " "get `root` access!" msgstr "" "Некоторые атрибуты в LDAP должны быть доступны только для чтения. Если " "оставить их доступными для записи пользователем, например, пользователь " "может изменить свой атрибут `uidNumber` на `0` и получить доступ `root`!" #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:610 msgid "" "To begin with, the `userPassword` attribute should not be world-readable. " "By default, anyone who can connect to the LDAP server can read this " "attribute. To disable this, put the following in [.filename]#slapd.conf#:" msgstr "" "Для начала атрибут `userPassword` не должен быть доступен для чтения всем. " "По умолчанию любой, кто может подключиться к LDAP-серверу, может читать этот " "атрибут. Чтобы отключить это, добавьте следующее в [.filename]#slapd.conf#:" #. type: Block title #: documentation/content/en/articles/ldap-auth/_index.adoc:612 #, no-wrap msgid "Hide Passwords" msgstr "Скрыть пароли" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:623 #: documentation/content/en/articles/ldap-auth/_index.adoc:649 #, no-wrap msgid "" "access to dn.subtree=\"ou=people,dc=example,dc=org\"\n" " attrs=userPassword\n" " by self write\n" " by anonymous auth\n" " by * none\n" msgstr "" "access to dn.subtree=\"ou=people,dc=example,dc=org\"\n" " attrs=userPassword\n" " by self write\n" " by anonymous auth\n" " by * none\n" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:627 #: documentation/content/en/articles/ldap-auth/_index.adoc:656 #, no-wrap msgid "" "access to *\n" " by self write\n" " by * read\n" msgstr "" "access to *\n" " by self write\n" " by * read\n" #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:632 msgid "" "This will disallow reading of the `userPassword` attribute, while still " "allowing users to change their own passwords." msgstr "" "Это запретит чтение атрибута `userPassword`, но позволит пользователям " "изменять свои собственные пароли." #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:636 msgid "" "Additionally, you'll want to keep users from changing some of their own " "attributes. By default, users can change any attribute (except for those " "which the LDAP schemas themselves deny changes), such as `uidNumber`. To " "close this hole, modify the above to" msgstr "" "Кроме того, следует запретить пользователям изменять некоторые из своих " "атрибутов. По умолчанию пользователи могут изменять любые атрибуты (за " "исключением тех, которые сами схемы LDAP запрещают изменять), такие как " "`uidNumber`. Чтобы устранить эту уязвимость, измените приведённое выше на" #. type: Block title #: documentation/content/en/articles/ldap-auth/_index.adoc:638 #, no-wrap msgid "Read-only Attributes" msgstr "Атрибуты только для чтения" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:652 #, no-wrap msgid "" "access to attrs=homeDirectory,uidNumber,gidNumber\n" " by * read\n" msgstr "" "access to attrs=homeDirectory,uidNumber,gidNumber\n" " by * read\n" #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:661 msgid "This will stop users from being able to masquerade as other users." msgstr "" "Это предотвратит возможность пользователей маскироваться под других " "пользователей." #. type: Title === #: documentation/content/en/articles/ldap-auth/_index.adoc:663 #, no-wrap msgid "`root` Account Definition" -msgstr "Определение учетной записи `root`" +msgstr "Определение учётной записи `root`" #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:668 msgid "" "Often the `root` or manager account for the LDAP service will be defined in " "the configuration file. OpenLDAP supports this, for example, and it works, " "but it can lead to trouble if [.filename]#slapd.conf# is compromised. It " "may be better to use this only to bootstrap yourself into LDAP, and then " "define a `root` account there." msgstr "" -"Часто учетная запись `root` или администратора для службы LDAP будет " +"Часто учётная запись `root` или администратора для службы LDAP будет " "определена в файле конфигурации. Например, OpenLDAP поддерживает это, и это " "работает, но может привести к проблемам, если файл [.filename]#slapd.conf# " "будет скомпрометирован. Возможно, лучше использовать это только для " -"первоначальной настройки доступа к LDAP, а затем определить учетную запись " +"первоначальной настройки доступа к LDAP, а затем определить учётную запись " "`root` там." #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:672 msgid "" "Even better is to define accounts that have limited permissions, and omit a " "`root` account entirely. For example, users that can add or remove user " "accounts are added to one group, but they cannot themselves change the " "membership of this group. Such a security policy would help mitigate the " "effects of a leaked password." msgstr "" -"Еще лучше определить учетные записи с ограниченными правами и полностью " -"исключить учетную запись `root`. Например, пользователи, которые могут " -"добавлять или удалять учетные записи, добавляются в одну группу, но сами не " +"Еще лучше определить учётные записи с ограниченными правами и полностью " +"исключить учётную запись `root`. Например, пользователи, которые могут " +"добавлять или удалять учётные записи, добавляются в одну группу, но сами не " "могут изменять состав этой группы. Такая политика безопасности поможет " "снизить последствия утечки пароля." #. type: Block title #: documentation/content/en/articles/ldap-auth/_index.adoc:674 #: documentation/content/en/articles/ldap-auth/_index.adoc:680 #, no-wrap msgid "Creating a Management Group" msgstr "Создание группы управления" #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:678 msgid "" "Say you want your IT department to be able to change home directories for " "users, but you do not want all of them to be able to add or remove users. " "The way to do this is to add a group for these admins:" msgstr "" "Предположим, вы хотите, чтобы ваш IT-отдел мог изменять домашние каталоги " "пользователей, но не хотите, чтобы все они могли добавлять или удалять " "пользователей. Способ сделать это — добавить группу для этих администраторов:" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:693 #, no-wrap msgid "" "dn: cn=homemanagement,dc=example,dc=org\n" "objectClass: top\n" "objectClass: posixGroup\n" "cn: homemanagement\n" "gidNumber: 121 # required for posixGroup\n" "memberUid: uid=tuser,ou=people,dc=example,dc=org\n" "memberUid: uid=user2,ou=people,dc=example,dc=org\n" msgstr "" "dn: cn=homemanagement,dc=example,dc=org\n" "objectClass: top\n" "objectClass: posixGroup\n" "cn: homemanagement\n" "gidNumber: 121 # required for posixGroup\n" "memberUid: uid=tuser,ou=people,dc=example,dc=org\n" "memberUid: uid=user2,ou=people,dc=example,dc=org\n" #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:698 msgid "And then change the permissions attributes in [.filename]#slapd.conf#:" msgstr "И затем измените атрибуты прав в [.filename]#slapd.conf#:" #. type: Block title #: documentation/content/en/articles/ldap-auth/_index.adoc:700 #, no-wrap msgid "ACLs for a Home Directory Management Group" msgstr "ACL для группы управления домашним каталогом" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:710 #, no-wrap msgid "" "access to dn.subtree=\"ou=people,dc=example,dc=org\"\n" " attr=homeDirectory\n" " by dn=\"cn=homemanagement,dc=example,dc=org\"\n" " dnattr=memberUid write\n" msgstr "" "access to dn.subtree=\"ou=people,dc=example,dc=org\"\n" " attr=homeDirectory\n" " by dn=\"cn=homemanagement,dc=example,dc=org\"\n" " dnattr=memberUid write\n" #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:715 msgid "Now `tuser` and `user2` can change other users' home directories." msgstr "" "Теперь `tuser` и `user2` могут изменять домашние каталоги других " "пользователей." #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:719 msgid "" "In this example we have given a subset of administrative power to certain " "users without giving them power in other domains. The idea is that soon no " "single user account has the power of a `root` account, but every power root " "had is had by at least one user. The `root` account then becomes " "unnecessary and can be removed." msgstr "" "В этом примере мы предоставили подмножество административных полномочий " "определённым пользователям, не давая им власти в других областях. Идея " "заключается в том, чтобы вскоре ни одна учётная запись пользователя не " "обладала полномочиями учётной записи `root`, но каждое полномочие, которое " "имел root, было бы у хотя бы одного пользователя. Учётная запись `root` " "тогда становится ненужной и может быть удалена." #. type: Title === #: documentation/content/en/articles/ldap-auth/_index.adoc:721 #, no-wrap msgid "Password Storage" msgstr "Хранение паролей" #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:725 msgid "" "By default OpenLDAP will store the value of the `userPassword` attribute as " "it stores any other data: in the clear. Most of the time it is base 64 " "encoded, which provides enough protection to keep an honest administrator " "from knowing your password, but little else." msgstr "" "По умолчанию OpenLDAP сохраняет значение атрибута `userPassword` так же, как " "и любые другие данные: в открытом виде. В большинстве случаев оно кодируется " "в base64, что обеспечивает достаточную защиту, чтобы честный администратор " "не узнал ваш пароль, но не более того." #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:728 msgid "" "It is a good idea, then, to store passwords in a more secure format, such as " "SSHA (salted SHA). This is done by whatever program you use to change " "users' passwords." msgstr "" "Хорошей идеей является хранение паролей в более безопасном формате, таком " "как SSHA (солёный SHA). Это выполняется любой программой, которую вы " "используете для изменения паролей пользователей." #. type: Title == #: documentation/content/en/articles/ldap-auth/_index.adoc:733 #, no-wrap msgid "Useful Aids" msgstr "Полезные инструменты" #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:736 msgid "" "There are a few other programs that might be useful, particularly if you " "have many users and do not want to configure everything manually." msgstr "" "Вот несколько других программ, которые могут быть полезны, особенно если у " "вас много пользователей и вы не хотите настраивать всё вручную." #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:739 msgid "" "package:security/pam_mkhomedir[] is a PAM module that always succeeds; its " "purpose is to create home directories for users which do not have them. If " "you have dozens of client servers and hundreds of users, it is much easier " "to use this and set up skeleton directories than to prepare every home " "directory." msgstr "" "package:security/pam_mkhomedir[] — это модуль PAM, который всегда " "завершается успешно; его назначение — создавать домашние каталоги для " "пользователей, у которых их нет. Если у вас есть десятки серверов-клиентов и " "сотни пользователей, гораздо удобнее использовать этот модуль и настроить " "скелетные каталоги, чем подготавливать каждый домашний каталог вручную." #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:743 msgid "" "package:sysutils/ldapvi[] is a great utility for editing LDAP values in an " "LDIF-like syntax. The directory (or subsection of the directory) is " "presented in the editor chosen by the `EDITOR` environment variable. This " "makes it easy to enable large-scale changes in the directory without having " "to write a custom tool." msgstr "" "package:sysutils/ldapvi[] — это отличная утилита для редактирования значений " "LDAP в синтаксисе, подобном LDIF. Каталог (или его подраздел) отображается в " "редакторе, выбранном переменной окружения `EDITOR`. Это позволяет легко " "вносить масштабные изменения в каталог без необходимости написания " "собственного инструмента." #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:746 msgid "" "package:security/openssh-portable[] has the ability to contact an LDAP " "server to verify SSH keys. This is extremely nice if you have many servers " "and do not want to copy your public keys across all of them." msgstr "" "package:security/openssh-portable[] обладает возможностью обращаться к " "серверу LDAP для проверки SSH-ключей. Это очень удобно, если у вас много " "серверов и вы не хотите копировать свои открытые ключи на все из них." #. type: Title == #: documentation/content/en/articles/ldap-auth/_index.adoc:751 #, no-wrap msgid "OpenSSL Certificates for LDAP" msgstr "Сертификаты OpenSSL для LDAP" #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:755 msgid "" "If you are hosting two or more LDAP servers, you will probably not want to " "use self-signed certificates, since each client will have to be configured " "to work with each certificate. While this is possible, it is not nearly as " "simple as creating your own certificate authority, and signing your servers' " "certificates with that." msgstr "" "Если вы размещаете два или более LDAP-серверов, вам, вероятно, не захочется " "использовать самоподписанные сертификаты, так как каждый клиент придется " "настраивать для работы с каждым сертификатом. Хотя это возможно, это не так " "просто, как создать собственный центр сертификации и подписать сертификаты " "ваших серверов с его помощью." #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:757 msgid "" "The steps here are presented as they are with very little attempt at " "explaining what is going on-further explanation can be found in man:" "openssl[1] and its friends." msgstr "" "Шаги здесь представлены как есть, без попыток объяснить происходящее — " "дополнительные пояснения можно найти в man:openssl[1] и связанных справочных " "страницах." #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:760 msgid "" "To create a certificate authority, we simply need a self-signed certificate " "and key. The steps for this again are" msgstr "" "Для создания центра сертификации нам просто нужны самоподписанный сертификат " "и ключ. Шаги для этого следующие" #. type: Block title #: documentation/content/en/articles/ldap-auth/_index.adoc:762 #, no-wrap msgid "Creating a Certificate" msgstr "Создание сертификата" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:771 #, no-wrap msgid "" "% openssl genrsa -out root.key 1024\n" "% openssl req -new -key root.key -out root.csr\n" "% openssl x509 -req -days 1024 -in root.csr -signkey root.key -out root.crt\n" msgstr "" "% openssl genrsa -out root.key 1024\n" "% openssl req -new -key root.key -out root.csr\n" "% openssl x509 -req -days 1024 -in root.csr -signkey root.key -out root.crt\n" #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:777 msgid "" "These will be your root CA key and certificate. You will probably want to " "encrypt the key and store it in a cool, dry place; anyone with access to it " "can masquerade as one of your LDAP servers." msgstr "" "Это будут корневой ключ и сертификат ЦС. Возможно, вы захотите зашифровать " "ключ и хранить его в прохладном, сухом месте; любой, кто получит к нему " "доступ, сможет выдавать себя за один из ваших LDAP-серверов." #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:780 msgid "" "Next, using the first two steps above create a key [.filename]#ldap-server-" "one.key# and certificate signing request [.filename]#ldap-server-one.csr#. " "Once you sign the signing request with [.filename]#root.key#, you will be " "able to use [.filename]#ldap-server-one.*# on your LDAP servers." msgstr "" "Затем, используя первые два шага, описанные выше, создайте ключ [.filename" "]#ldap-server-one.key# и запрос на подпись сертификата [.filename]#ldap-" "server-one.csr#. После подписания запроса с помощью [.filename]#root.key# вы " "сможете использовать [.filename]#ldap-server-one.*# на своих LDAP-серверах." #. type: Plain text #: documentation/content/en/articles/ldap-auth/_index.adoc:784 msgid "" "Do not forget to use the fully qualified domain name for the \"common name\" " "attribute when generating the certificate signing request; otherwise clients " "will reject a connection with you, and it can be very tricky to diagnose." msgstr "" "Не забудьте использовать полное доменное имя для атрибута \"common name\" " "при создании запроса на подпись сертификата; в противном случае клиенты " "будут отклонять соединение с вами, и диагностика этой проблемы может быть " "очень сложной." #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:787 msgid "To sign the key, use `-CA` and `-CAkey` instead of `-signkey`:" msgstr "Для подписи ключа используйте `-CA` и `-CAkey` вместо `-signkey`:" #. type: Block title #: documentation/content/en/articles/ldap-auth/_index.adoc:789 #, no-wrap msgid "Signing as a Certificate Authority" msgstr "Подписывать как Центр Сертификации" #. type: delimited block . 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:798 #, no-wrap msgid "" "% openssl x509 -req -days 1024 \\\n" "-in ldap-server-one.csr -CA root.crt -CAkey root.key \\\n" "-out ldap-server-one.crt\n" msgstr "" "% openssl x509 -req -days 1024 \\\n" "-in ldap-server-one.csr -CA root.crt -CAkey root.key \\\n" "-out ldap-server-one.crt\n" #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:803 msgid "" "The resulting file will be the certificate that you can use on your LDAP " "servers." msgstr "" "Результирующий файл будет представлять собой сертификат, который можно " "использовать на ваших LDAP-серверах." #. type: delimited block = 4 #: documentation/content/en/articles/ldap-auth/_index.adoc:804 msgid "" "Finally, for clients to trust all your servers, distribute [.filename]#root." "crt# (the __certificate__, not the key!) to each client, and specify it in " "the `TLSCACertificateFile` directive in [.filename]#ldap.conf#." msgstr "" "Наконец, чтобы клиенты доверяли всем вашим серверам, распространите файл [." "filename]#root.crt# (__сертификат__, а не ключ!) на каждом клиенте и укажите " "его в директиве `TLSCACertificateFile` в файле [.filename]#ldap.conf#." diff --git a/documentation/content/ru/articles/leap-seconds/_index.po b/documentation/content/ru/articles/leap-seconds/_index.po index 334f428bf0..4b30fb1892 100644 --- a/documentation/content/ru/articles/leap-seconds/_index.po +++ b/documentation/content/ru/articles/leap-seconds/_index.po @@ -1,255 +1,255 @@ # SOME DESCRIPTIVE TITLE # Copyright (C) YEAR The FreeBSD Project # This file is distributed under the same license as the FreeBSD Documentation package. -# Vladlen Popolitov , 2025. +# Vladlen Popolitov , 2025, 2026. msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" "POT-Creation-Date: 2025-11-08 16:17+0000\n" -"PO-Revision-Date: 2025-11-10 04:45+0000\n" +"PO-Revision-Date: 2026-03-08 09:11+0000\n" "Last-Translator: Vladlen Popolitov \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 4.17\n" #. type: YAML Front Matter: description #: documentation/content/en/articles/leap-seconds/_index.adoc:1 #, no-wrap msgid "A short description of how leap seconds are handled on FreeBSD" msgstr "Краткое описание обработки високосных секунд (секунд координации) в FreeBSD" #. type: Title = #: documentation/content/en/articles/leap-seconds/_index.adoc:1 #: documentation/content/en/articles/leap-seconds/_index.adoc:7 #, no-wrap msgid "FreeBSD Support for Leap Seconds" msgstr "Поддержка високосных секунд в FreeBSD" #. type: Plain text #: documentation/content/en/articles/leap-seconds/_index.adoc:39 msgid "'''" msgstr "'''" #. type: Title == #: documentation/content/en/articles/leap-seconds/_index.adoc:43 #, no-wrap msgid "Introduction" msgstr "Введение" #. type: Plain text #: documentation/content/en/articles/leap-seconds/_index.adoc:47 msgid "" "A _leap second_ is an one second adjustment made at specific times of year " "to UTC to synchronize atomic time scales with variations in the rotation of " "the Earth. This article describes how FreeBSD interacts with leap seconds." msgstr "" "_Секунда координации_ (високосная секунда) — это односекундная " "корректировка, вносимая в определённые моменты года в UTC для синхронизации " "атомных шкал времени с вариациями вращения Земли. В этой статье описано, как " "FreeBSD взаимодействует с секундами координации." #. type: Plain text #: documentation/content/en/articles/leap-seconds/_index.adoc:50 msgid "" "As of this writing, the next leap second will occur at 2015-Jun-30 23:59:60 " "UTC. This leap second will occur during a business day for North and South " "America and the Asia/Pacific region." msgstr "" "На момент написания следующая високосная секунда будет добавлена 2015-Jun-30 " "23:59:60 UTC. Эта високосная секунда выпадет на рабочий день для Северной и " "Южной Америки, а также для региона Азии/Тихоокеанского региона." #. type: Plain text #: documentation/content/en/articles/leap-seconds/_index.adoc:52 msgid "" "Leap seconds are announced by https://www.iers.org/IERS/EN/Home/home_node." "html[IERS] on https://datacenter.iers.org/data/latestVersion/16_BULLETIN_C16." "txt[Bulletin C]." msgstr "" "Секунды координации объявляются https://www.iers.org/IERS/EN/Home/home_node." "html[IERS] в https://datacenter.iers.org/data/latestVersion/16_BULLETIN_C16." "txt[Бюллетене C]." #. type: Plain text #: documentation/content/en/articles/leap-seconds/_index.adoc:55 msgid "" "Standard leap second behavior is described in https://datatracker.ietf.org/" "doc/html/rfc7164#section-3[RFC 7164]. Also see man:time2posix[3]." msgstr "" "Стандартное поведение високосной секунды описано в https://datatracker.ietf." "org/doc/html/rfc7164#section-3[RFC 7164]. Также см. man:time2posix[3]." #. type: Title == #: documentation/content/en/articles/leap-seconds/_index.adoc:57 #, no-wrap msgid "Default Leap Second Handling on FreeBSD" msgstr "Обработка високосных секунд по умолчанию в FreeBSD" #. type: Plain text #: documentation/content/en/articles/leap-seconds/_index.adoc:62 msgid "" "The easiest way to handle leap seconds is with the POSIX time rules FreeBSD " "uses by default, combined with extref:{handbook}network-servers[NTP, network-" "ntp]. When man:ntpd[8] is running and the time is synchronized with " "upstream NTP servers that handle leap seconds correctly, the leap second " "will cause the system time to automatically repeat the last second of the " "day. No other adjustments are necessary." msgstr "" "Самый простой способ обработки високосных секунд — использование правил " "времени POSIX, которые FreeBSD использует по умолчанию, в сочетании с " "extref:{handbook}network-servers[NTP, network-ntp]. Когда man:ntpd[8] " "работает и время синхронизировано с вышестоящими серверами NTP, которые " "корректно обрабатывают високосные секунды, високосная секунда приведёт к " "автоматическому повтору последней секунды дня в системном времени. Другие " "корректировки не требуются." #. type: Plain text #: documentation/content/en/articles/leap-seconds/_index.adoc:64 msgid "" "If the upstream NTP servers do not handle leap seconds correctly, man:" "ntpd[8] will step the time by one second after the errant upstream server " "has noticed and stepped itself." msgstr "" "Если вышестоящие серверы NTP не обрабатывают високосные секунды корректно, " "man:ntpd[8] изменит время на одну секунду после того, как ошибочный " "вышестоящий сервер заметит это и изменит своё время." #. type: Plain text #: documentation/content/en/articles/leap-seconds/_index.adoc:66 msgid "" "If NTP is not being used, manual adjustment of the system clock will be " "required after the leap second has passed." msgstr "" "Если NTP не используется, после високосной секунды потребуется ручная " "корректировка системных часов." #. type: Title == #: documentation/content/en/articles/leap-seconds/_index.adoc:68 #, no-wrap msgid "Cautions" msgstr "Предупреждения" #. type: Plain text #: documentation/content/en/articles/leap-seconds/_index.adoc:72 msgid "" "Leap seconds are inserted at the same instant all over the world: UTC " "midnight. In Japan that is mid-morning, in the Pacific mid-day, in the " "Americas late afternoon, and in Europe at night." msgstr "" "Високосные секунды добавляются одновременно по всему миру: в полночь по UTC. " "В Японии это середина утра, в Тихоокеанском регионе — середина дня, в " "Америке — поздний вечер, а в Европе — ночь." #. type: Plain text #: documentation/content/en/articles/leap-seconds/_index.adoc:74 msgid "" "We believe and expect that FreeBSD, if provided correct and stable NTP " "service, will work as designed during this leap second, as it did during the " "previous ones." msgstr "" "Мы полагаем и ожидаем, что FreeBSD, при условии предоставления корректного и " "стабильного сервиса NTP, будет работать как задумано во время этой секунды " "координации, как это происходило во время предыдущих." #. type: Plain text #: documentation/content/en/articles/leap-seconds/_index.adoc:77 msgid "" "However, we caution that practically no applications have ever asked the " "kernel about leap seconds. Our experience is that, as designed, leap " "seconds are essentially a replay of the second before the leap second, and " "this is a surprise to most application programmers." msgstr "" "Однако мы предупреждаем, что практически ни одно приложение никогда не " "запрашивало у ядра информацию о високосных секундах. Наш опыт показывает, " "что, как и задумано, високосные секунды по сути являются повторением " "секунды, предшествующей високосной, и это становится неожиданностью для " "большинства программистов." #. type: Plain text #: documentation/content/en/articles/leap-seconds/_index.adoc:79 msgid "" "Other operating systems and other computers may or may not handle the leap-" "second the same way as FreeBSD, and systems without correct and stable NTP " "service will not know anything about leap seconds at all." msgstr "" "Другие операционные системы и компьютеры могут обрабатывать високосную " "секунду иначе, чем FreeBSD, а системы без корректной и стабильной службы NTP " "вообще не будут знать о високосных секундах." #. type: Plain text #: documentation/content/en/articles/leap-seconds/_index.adoc:81 msgid "" "It is not unheard of for computers to crash because of leap seconds, and " "experience has shown that a large fraction of all public NTP servers might " "handle and announce the leap second incorrectly." msgstr "" "Нередко компьютеры выходят из строя из-за високосных секунд, и опыт показал, " "что значительная часть всех публичных NTP-серверов может обрабатывать и " "объявлять високосную секунду неправильно." #. type: Plain text #: documentation/content/en/articles/leap-seconds/_index.adoc:83 msgid "" "Please try to make sure nothing horrible happens because of the leap second." msgstr "" "Пожалуйста, постарайтесь убедиться, что из-за секунды координации не " "произойдет ничего ужасного." #. type: Title == #: documentation/content/en/articles/leap-seconds/_index.adoc:85 #, no-wrap msgid "Testing" msgstr "Тестирование" #. type: Plain text #: documentation/content/en/articles/leap-seconds/_index.adoc:91 msgid "" "It is possible to test whether a leap second will be used. Due to the " "nature of NTP, the test might work up to 24 hours before the leap second. " "Some major reference clock sources only announce leap seconds one hour ahead " "of the event. Query the NTP daemon:" msgstr "" "Возможно проверить, будет ли использована секунда координации. Из-за " "особенностей NTP, проверка может работать до 24 часов до введения секунды " "координации. Некоторые крупные источники эталонных часов объявляют о " "секундах координации всего за час до события. Запрос к демону NTP:" #. type: delimited block . 4 #: documentation/content/en/articles/leap-seconds/_index.adoc:95 #, no-wrap msgid "% ntpq -c 'rv 0 leap'\n" msgstr "% ntpq -c 'rv 0 leap'\n" #. type: Plain text #: documentation/content/en/articles/leap-seconds/_index.adoc:99 msgid "" "Output that includes `leap_add_sec` indicates proper support of the leap " "second. Before the 24 hours leading up to the leap second, or after the " "leap second has passed, `leap_none` will be shown." msgstr "" "Вывод, включающий `leap_add_sec`, указывает на корректную поддержку секунды " "координации. До 24 часов перед наступлением секунды координации или после её " "прохождения будет отображаться `leap_none`." #. type: Title == #: documentation/content/en/articles/leap-seconds/_index.adoc:101 #, no-wrap msgid "Conclusion" msgstr "Заключение" #. type: Plain text #: documentation/content/en/articles/leap-seconds/_index.adoc:104 msgid "" "In practice, leap seconds are usually not a problem on FreeBSD. We hope " "that this overview helps clarify what to expect and how to make the leap " "second event proceed more smoothly." msgstr "" "На практике секунды координации обычно не представляют проблемы в FreeBSD. " "Мы надеемся, что этот обзор поможет прояснить, чего ожидать и как сделать " "обработку секунды координации более гладкой." diff --git a/documentation/content/ru/articles/license-guide/_index.adoc b/documentation/content/ru/articles/license-guide/_index.adoc index 920a7fccfb..e3588f2f4f 100644 --- a/documentation/content/ru/articles/license-guide/_index.adoc +++ b/documentation/content/ru/articles/license-guide/_index.adoc @@ -1,253 +1,253 @@ --- authors: - author: 'Warner Losh' email: imp@FreeBSD.org title: 'Политика лицензирования FreeBSD' trademarks: ["freebsd", "general"] --- = Политики лицензирования FreeBSD :doctype: article :toc: macro :toclevels: 1 :icons: font :sectnums: :sectnumlevels: 6 :source-highlighter: rouge :experimental: ifdef::env-beastie[] ifdef::backend-html5[] include::shared/authors.adoc[] include::shared/mirrors.adoc[] include::shared/releases.adoc[] include::shared/attributes/attributes-{{% lang %}}.adoc[] include::shared/{{% lang %}}/teams.adoc[] include::shared/{{% lang %}}/mailing-lists.adoc[] include::shared/{{% lang %}}/urls.adoc[] :imagesdir: ../../../images/{images-path} endif::[] ifdef::backend-pdf,backend-epub3[] include::../../../../shared/asciidoctor.adoc[] endif::[] endif::[] ifndef::env-beastie[] include::../../../../../shared/asciidoctor.adoc[] endif::[] ''' toc::[] [[intro]] [[pref-license]] == Предпочтительная лицензия для новых файлов Оставшаяся часть этого раздела предназначена для того, чтобы помочь вам разобраться. Как правило, если сомневаетесь, спрашивайте. Получить совет гораздо проще, чем исправлять дерево исходного кода. Проект FreeBSD использует как явные лицензии (где дословный текст лицензии воспроизводится в каждом файле), так и отделённые лицензии (где тег в файле указывает лицензию, как описано в этом документе). Проект FreeBSD использует следующий текст в качестве предпочтительной лицензии: [.programlisting] .... /* * Copyright (c) [year] [your name] * * SPDX-License-Identifier: BSD-2-Clause */ .... Проект FreeBSD не разрешает использование «рекламного условия»footnote:[прим перев: требование указания первоначального автора при всех изменениях кода] в новом коде. Из-за большого числа участников проекта FreeBSD соблюдение этого условия стало затруднительным для многих коммерческих поставщиков. Если у вас есть код в дереве с рекламным условием, пожалуйста, рассмотрите возможность перехода на лицензию без него. Новые вклады в FreeBSD должны использовать лицензию BSD-2-Clause. Проект FreeBSD не поощряет полностью новые лицензии и вариации стандартных лицензий. Новые лицензии требуют одобрения {core-email} для размещения в основном репозитории. В прошлом нестандартные лицензии вызывали больше проблем, чем стандартные. Плохая проработка нестандартных лицензий часто приводит к непредвиденным последствиям, поэтому они вряд ли будут одобрены {core-email}. Проект FreeBSD стандартизируется на лицензии BSD-2-Clause, как опубликовано SPDX. В дополнение, политика проекта требует, чтобы код, лицензированный под некоторыми не-BSD лицензиями, размещался в определённых разделах репозитория. Для некоторых лицензий компиляция должна быть условной или отключена по умолчанию. Например, код в статической части ядра GENERIC должен быть лицензирован под BSD или аналогичными лицензиями. Программное обеспечение под лицензиями GPL, APSL, CDDL и т.п. не должно компилироваться в статическое ядро GENERIC. Однако код с такими лицензиями может использоваться в предварительно скомпилированных модулях. Разработчикам напоминают, что в открытом исходном коде правильное понимание «открытости» так же важно, как и правильное понимание «исходного кода». Неправильное обращение с интеллектуальной собственностью имеет серьёзные последствия. Любые вопросы или опасения следует немедленно направлять по адресу {core-email}. [[license-policy]] == Политика лицензирования программного обеспечения В следующих разделах подробно изложены политики лицензирования программного обеспечения проекта. В основном мы ожидаем, что разработчики прочитают, поймут и будут использовать разделы выше, чтобы применять соответствующие лицензии к своим вкладам. Остальная часть этого документа подробно описывает философскую основу политик, а также сами политики. Как всегда, если текст ниже вызывает затруднения или вам нужна помощь в применении этих политик, пожалуйста, обратитесь к {core-email}. === Руководящие принципы Проект FreeBSD ставит своей целью создание полноценной операционной системы под лицензией BSD, позволяющей пользователям системы создавать производные продукты без ограничений или дополнительных лицензионных обязательств. Мы приветствуем и высоко ценим вклад в виде изменений и дополнений под лицензией BSD с двумя пунктами, а также призываем другие проекты с открытым исходным кодом принимать эту лицензию. Использование лицензии BSD является ключевым для поощрения внедрения передовых технологий операционных систем и во многих значимых случаях играло решающую роль в широком распространении новых технологий. Мы, однако, признаем, что существуют веские причины для включения в исходное дерево FreeBSD программного обеспечения с другими лицензиями. Мы требуем, чтобы программное обеспечение, лицензированное под некоторыми не-BSD лицензиями, было тщательно изолировано в дереве исходного кода, чтобы оно не могло загрязнять компоненты, доступные только под BSD. Такое осторожное управление способствует ясности лицензирования и облегчает создание производных продуктов, доступных только под BSD. Если не сделано специального исключения, существующие компоненты с лицензией BSD не могут быть заменены на программное обеспечение с более ограничительной лицензией. Мы призываем разработчиков FreeBSD и сторонних разработчиков стремиться к перелицензированию, двойному лицензированию или перереализации критических компонентов под лицензией BSD. Это облегчит их более полную интеграцию в операционную систему FreeBSD. === Политика -* Импорт нового программного обеспечения, лицензированного под любыми лицензиями, кроме лицензии BSD и подобных лицензий BSD (как определено ниже), требует предварительного одобрения от FreeBSD Core Team. Запросы на импорт должны включать: +* Импорт нового программного обеспечения, лицензированного под любыми лицензиями, кроме лицензии BSD и подобных лицензий BSD (как определено ниже), требует предварительного одобрения от Основной команды FreeBSD. Запросы на импорт должны включать: ** Список новых возможностей или исправлений ошибок, которые содержит новая версия или патчи, вместе с доказательствами того, что эти возможности нужны нашим пользователям. Идеальными формами доказательств являются PR (запросы на включение изменений) или ссылки на обсуждения в почтовых рассылках. -** Этот процесс должен использоваться для всех импортов программного обеспечения, а не только для тех, которые требуют проверки Core Team. Сам факт существования новой версии не является оправданием для импорта программного обеспечения в исходные коды или порты. +** Этот процесс должен использоваться для всех импортов программного обеспечения, а не только для тех, которые требуют проверки Основной команды (Core Team). Сам факт существования новой версии не является оправданием для импорта программного обеспечения в исходные коды или порты. ** Список ветвей FreeBSD, которые могут быть затронуты. Расширение области применения требует нового запроса и одобрения от основной команды FreeBSD. * Лицензия Apache 2.0 допустима для использования в некоторых случаях. Основная команда должна одобрить импорт новых компонентов, лицензированных по лицензии Apache, или изменение лицензии существующих компонентов на лицензию Apache. ** Данная лицензия одобрена для следующих компонентов: *** Инструментарий LLVM и (с исключениями LLVM) компоненты времени выполнения. * Лицензия BSD+Patent License допустима для использования в некоторых случаях. Основная команда (Core Team) должна одобрить импорт новых компонентов, лицензированных по BSD+Patent License, или изменение лицензии существующих компонентов на BSD+Patent License. ** Данная лицензия одобрена для следующих компонентов: *** Код, основанный на EDK2, связанный с функциональностью UEFI * Общая лицензия на разработку и распространение (CDDL) допустима для использования в некоторых случаях. Основная команда должна одобрить импорт новых компонентов с лицензией CDDL или изменение лицензии существующих компонентов на CDDL. ** Данная лицензия одобрена для следующих компонентов: *** DTrace *** Файловая система ZFS, включая поддержку в ядре и пользовательские утилиты * Исторически фраза "All Rights Reserved." включалась во все уведомления об авторских правах. Все релизы BSD содержали её, чтобы соответствовать требованиям https://en.wikipedia.org/wiki/Buenos_Aires_Convention[Буэнос-Айресской конвенции 1910 года] в Америке. После ратификации https://en.wikipedia.org/wiki/Berne_Convention[Бернской конвенции] в 2000 году Никарагуа, Буэнос-Айресская конвенция — и эта фраза — устарели. В связи с этим проект FreeBSD рекомендует опускать эту фразу в новом коде и призывает текущих правообладателей удалить её. В 2018 году проект обновил свои шаблоны, убрав её. * Изначально многие элементы в дереве FreeBSD были помечены лицензией BSD-2-Clause-FreeBSD. Однако SPDX объявил эту лицензию устаревшей как вариант, и текст устаревшего тега в SPDX отличается от стандартной лицензии FreeBSD настолько, что его не следует использовать. Проводится проверка его текущего использования. ==== Допустимые лицензии Следующие лицензии считаются допустимыми лицензиями в стиле BSD для целей данной Политики. Отклонения или использование любых других лицензий должны быть согласованы с основной командой (Core Team) FreeBSD: * Версия лицензии BSD с 2 пунктами [.programlisting] .... /* * Copyright (c) [year] [your name] * * SPDX-License-Identifier: BSD-2-Clause */ .... * Версия лицензии BSD с 3 пунктами [.programlisting] .... /* * Copyright (c) [year] [your name] * * SPDX-License-Identifier: BSD-3-Clause */ .... * Лицензия ISC [.programlisting] .... /* * Copyright (c) [year] [copyright holder] * * SPDX-License-Identifier: ISC */ .... * Лицензия MIT [.programlisting] .... /* * Copyright (c) [year] [copyright holders] * * SPDX-License-Identifier: MIT */ .... == Лицензия набора программного обеспечения (Software Collection License) Проект FreeBSD лицензирует свою подборку программного обеспечения, как описано в [.filename]#COPYRIGHT#, по лицензии BSD-2-Clause. Данная лицензия не заменяет лицензии отдельных файлов, которые описаны ниже. Файлы, не имеющие явной лицензии, распространяются по лицензии BSD-2-Clause. == Расположение файла лицензии Для соответствия стандарту https://reuse.software/[REUSE Software] насколько это возможно, все файлы лицензий будут храниться в каталоге [.filename]#LICENSES/# репозитория. В этом корневом каталоге есть три подкаталога. Подкаталог [.filename]#LICENSES/text/# содержит в отдельном виде тексты всех лицензий, разрешённых в комплекте программного обеспечения FreeBSD. Эти файлы сохраняются с использованием идентификатора SPDX-License-Identifier с добавлением .txt. Подкаталог [.filename]#LICENSES/exceptions/# содержит тексты всех исключений, разрешённых в отдельном виде в комплекте программного обеспечения FreeBSD. Эти файлы сохраняются с использованием идентификатора исключения с добавлением .txt. Подкаталог [.filename]#LICENSES/other/# содержит в отдельном виде файлы лицензий, упомянутые в выражениях SPDX-License-Identifier, но не разрешённые в качестве отдельных лицензий. Все такие файлы должны присутствовать в комплекте программного обеспечения FreeBSD хотя бы один раз и должны быть удалены, когда удаляется последний файл, ссылающийся на них. Лицензии, для которых нет подходящего соответствия в SPDX, должны находиться в [.filename]#LICENSES/other/# и иметь имя файла, начинающееся с LicenseRef-, за которым следует уникальная строка идентификатора. В настоящее время такие файлы не выявлены, но если они появятся, их полный список будет приведён здесь. Проект FreeBSD в настоящее время не использует файлы `DEP5`, описанные в стандарте `REUSE Software`. Проект FreeBSD ещё не пометил все файлы в дереве в соответствии с этим стандартом, как описано далее в этом документе. Проект FreeBSD пока не включил эти файлы в свои репозитории, поскольку данная политика ещё находится в процессе разработки. [[individual-files]] == Лицензии индивидуальных файлов Каждый отдельный файл в комплекте программного обеспечения FreeBSD имеет собственное авторское право и лицензию. Способ их обозначения варьируется и описан в этом разделе. Уведомление об авторских правах указывает, кто заявляет о законных авторских правах на файл. Они предоставляются проектом по принципу наилучших усилий. Поскольку авторские права могут быть юридически переданы, текущий правообладатель может отличаться от указанного в файле. Лицензия — это юридический документ между автором и пользователями программного обеспечения, который предоставляет разрешение на использование защищённых авторским правом частей программного обеспечения на определённых условиях, изложенных в лицензии. В коллекции программного обеспечения FreeBSD лицензии могут быть выражены одним из двух способов. Лицензии могут быть явно указаны в файле. Когда лицензионное разрешение явно указано в файле, этот файл может использоваться, копироваться и изменяться в соответствии с данной лицензией. Лицензии также могут быть выражены косвенно, когда текст лицензии находится в другом месте. Для этой цели проект использует идентификаторы лицензий Software Package Data Exchange (SPDX), как описано в следующих подразделах. Идентификаторы лицензий SPDX управляются рабочей группой SPDX в Linux Foundation и были согласованы партнёрами по отрасли, поставщиками инструментов и юридическими командами. Для получения дополнительной информации см. https://spdx.org/ и следующие разделы о том, как проект FreeBSD их использует. Сущности, которые вносят исправления и улучшения в комплект программного обеспечения без явного лицензирования, соглашаются лицензировать эти изменения на условиях, применимых к изменённым файлам. Политика проекта, в соответствии с отраслевой практикой, включает уведомление об авторских правах только от значительных участников для файлов в коллекции. В комплекте программного обеспечения FreeBSD существует четыре типа файлов: . Файлы, содержащие только явное уведомление об авторских правах и лицензию. . Файлы, содержащие как явное уведомление об авторских правах и лицензии, так и тег SPDX-License-Identifier. . Файлы, содержащие только уведомление об авторских правах и тег SPDX-License-Identifier, но без явного указания лицензии. . Файлы, в которых отсутствует какое-либо указание на авторские права или лицензию. === Только авторские права и лицензия Многие файлы в коллекции программного обеспечения FreeBSD содержат как уведомление об авторских правах, так и явную лицензию в самом файле. В таких случаях применяется лицензия, указанная в файле. === Авторские права и лицензия с выражением SPDX-License-Identifier Некоторые файлы в коллекции программного обеспечения FreeBSD содержат заявление об авторских правах, тег SPDX-License-Identifier и явную лицензию. Явная лицензия имеет приоритет над тегом SPDX-License-Identifier. Тег SPDX-License-Identifier представляет собой наилучшую попытку проекта охарактеризовать лицензию, но является лишь информационным полем для автоматизированных инструментов. См. crossref:license-guide[expressions,Выражения SPDX-License-Identifier] для интерпретации выражения. === Только уведомление об авторских правах и выражение SPDX-License-Identifier. -Некоторые файлы в дереве содержат отдельные лицензии. Эти файлы содержат только уведомление об авторских правах и выражение SPDX-License-Identifier, но не содержат явной лицензии. См. crossref:license-guide[expressions, Выражения SPDX-License-Identifier] для интерпретации выражения. Примечание: выражения, разрешенные для отдельных лицензий проектом, являются подмножеством выражений, используемых в информационных целях или определенных стандартом. +Некоторые файлы в дереве содержат отдельные лицензии. Эти файлы содержат только уведомление об авторских правах и выражение SPDX-License-Identifier, но не содержат явной лицензии. См. crossref:license-guide[expressions, Выражения SPDX-License-Identifier] для интерпретации выражения. Примечание: выражения, разрешенные для отдельных лицензий проектом, являются подмножеством выражений, используемых в информационных целях или определённых стандартом. Лицензия для файлов, содержащих только SPDX-License-Identifier, должна толковаться как . Начните лицензию с уведомления об авторских правах из файла. Включите всех правообладателей. . Для каждого подвыражения скопируйте текст лицензии из [.filename]#LICENSE/text/`id`.txt#. Если присутствуют исключения, добавьте их из [.filename]#src/share/license/exceptions/`id`.txt#. Выражения SPDX-License-Identifier должны интерпретироваться в соответствии со стандартом SPDX. Где `id` — это короткий идентификатор лицензии SPDX из столбца `Identifier` на страницах https://spdx.org/licenses/[Идентификаторы SPDX] или https://spdx.org/licenses/exceptions-index.html[исключения лицензий]. Если в каталоге [.filename]#LICENSE/# нет файла, то такая лицензия или исключение не могут быть указаны как отдельная лицензия в этом разделе. При чтении текста лицензии, отделенного от файла, необходимо учитывать ряд аспектов, чтобы отделенная лицензия имела смысл. . Любая ссылка на уведомление об авторских правах должна относиться к уведомлению, составленному из лицензированного файла, а не из любого уведомления об авторских правах в самом тексте файла лицензии. Многие файлы SPDX содержат примеры уведомлений об авторских правах, которые понимаются исключительно как образцы. . Когда в тексте лицензии упоминаются названия организаций, они должны интерпретироваться как относящиеся к списку всех правообладателей, указанных в уведомлениях об авторских правах лицензированного файла. Например, лицензия BSD-4-clause содержит фразу "Этот продукт включает программное обеспечение, разработанное организацией". Фраза 'организацией' должна быть заменена на правообладателей. . Когда SPDX предлагает варианты лицензии, подразумевается, что лицензия в файле [.filename]#LICENSE/# представляет точную версию выбранной лицензии. Стандарт SPDX существует для сопоставления семейств лицензий, и эти варианты помогают сопоставлять похожие лицензии, которые организация SPDX считает юридически идентичными. Для лицензий с небольшими вариациями в тексте SPDX предоставляет рекомендации по их сопоставлению. Эти рекомендации здесь не актуальны. Участники, желающие использовать вариант лицензии SPDX, который не содержится дословно в [.filename]#LICENSE/#, не могут использовать отдельный вариант и должны явно указать лицензию. === Файлы без указания авторских прав или любой лицензионной отметки Некоторые файлы не могут содержать подходящих комментариев. В таких случаях лицензия может быть найдена в [.filename]#file.ext.license#. Например, файл с именем [.filename]#foo.jpg# может иметь лицензию в [.filename]#foo.jpg.license#, следуя соглашениям REUSE Software. Файлы, созданные проектом, в которых отсутствует уведомление об авторских правах, считаются подпадающими под общие положения об авторских правах и лицензировании в файле [.filename]#COPYRIGHT#. Это означает, что либо файл представляет собой простое изложение фактов, не охраняемых законом об авторских правах, либо его содержание настолько тривиально, что не требует оформления явной лицензии. Файлы, которые не имеют маркировки и содержат значительное количество материала, защищенного авторским правом, или которые автор считает неправильно промаркированными, должны быть доведены до сведения основной команды (Core Team) FreeBSD. Проект FreeBSD строго придерживается политики соблюдения всех соответствующих лицензий. В будущем все подобные файлы будут явно помечены или следовать соглашению REUSE Software о файлах с расширением [.filename]#.license#. [[expressions]] === Выражения SPDX-License-Identifier 'SPDX License expression' используется в двух контекстах в коллекции программного обеспечения FreeBSD. Во-первых, его полная форма применяется для файлов, которые содержат явные заявления о лицензии внутри файла, а также обобщающее выражение SPDX-License-Identifier. В этом контексте может быть использована вся мощь этих выражений. Во-вторых, в ограниченной форме, описанной выше, оно используется для обозначения фактической лицензии для данного файла. Во втором контексте проектом разрешено только подмножество этого выражения. `Лицензионные под-выражения SPDX` — это либо короткий идентификатор лицензии из https://spdx.org/licenses/[Список лицензий SPDX], либо комбинация двух таких идентификаторов, разделённых "WITH", если применяется https://spdx.org/licenses/exceptions-index.html[исключение из лицензии]. Если применяются несколько лицензий, выражение состоит из подвыражений, разделённых ключевыми словами "AND", "OR" и окружённых символами "(", ")". Полное описание выражений доступно в https://spdx.github.io/spdx-spec/appendix-IV-SPDX-license-expressions/[спецификации] и имеет приоритет в случае противоречий с упрощённым изложением этого раздела. Некоторые идентификаторы лицензий, такие как [L]GPL, предоставляют возможность использовать только указанную версию или любую более позднюю версию. SPDX определяет суффикс `-or-later` для обозначения этой версии лицензии или более поздней версии. Суффикс `-only` означает только указанную версию файла. Существует старая конвенция, согласно которой отсутствие суффикса (что означает то же, что и новый суффикс '-only', но люди путают это с `-or-later`). Кроме того, добавление суффикса `+` подразумевало значение `-or-later`. В новых файлах FreeBSD не следует использовать эти две конвенции. Старые файлы, использующие эту конвенцию, следует преобразовать соответствующим образом. [.programlisting] .... // SPDX-License-Identifier: GPL-2.0-only // SPDX-License-Identifier: LGPL-2.1-or-later .... `WITH` следует использовать, когда требуется модификатор лицензии. В проекте FreeBSD ряд файлов из LLVM имеют исключение из лицензии Apache 2.0: [.programlisting] .... // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception .... https://spdx.org/licenses/exceptions-index.html[Теги исключений] управляются SPDX. Исключения лицензий могут применяться только к определённым лицензиям, как указано в исключении. `OR` следует использовать, если файл предлагает выбор лицензии и одна лицензия выбрана. Например, некоторые файлы `dtsi` доступны под двойными лицензиями: [.programlisting] .... // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause .... `AND` следует использовать, если файл имеет несколько лицензий, условия которых применяются к использованию файла. Например, если код был заимствован из нескольких проектов, каждый со своей собственной лицензией: [.programlisting] .... // SPDX-License-Identifier: BSD-2-Clause AND MIT .... diff --git a/documentation/content/ru/articles/license-guide/_index.po b/documentation/content/ru/articles/license-guide/_index.po index 94b548d4e6..c150cbe0a6 100644 --- a/documentation/content/ru/articles/license-guide/_index.po +++ b/documentation/content/ru/articles/license-guide/_index.po @@ -1,1067 +1,1067 @@ # SOME DESCRIPTIVE TITLE # Copyright (C) YEAR The FreeBSD Project # This file is distributed under the same license as the FreeBSD Documentation package. # Vladlen Popolitov , 2025. msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" "POT-Creation-Date: 2025-05-01 19:56-0300\n" -"PO-Revision-Date: 2025-08-05 04:45+0000\n" +"PO-Revision-Date: 2025-11-25 04:45+0000\n" "Last-Translator: Vladlen Popolitov \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 4.17\n" #. type: YAML Front Matter: title #: documentation/content/en/articles/license-guide/_index.adoc:1 #, no-wrap msgid "FreeBSD Licensing Policy" msgstr "Политика лицензирования FreeBSD" #. type: Title = #: documentation/content/en/articles/license-guide/_index.adoc:9 #, no-wrap msgid "FreeBSD License Policies" msgstr "Политики лицензирования FreeBSD" #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:40 msgid "'''" msgstr "'''" #. type: Title == #: documentation/content/en/articles/license-guide/_index.adoc:46 #, no-wrap msgid "Preferred License for New Files" msgstr "Предпочтительная лицензия для новых файлов" #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:52 msgid "" "The rest of this section is intended to help you get started. As a rule, " "when in doubt, ask. It is much easier to receive advice than to fix the " "source tree. The FreeBSD Project makes use of both explicit licenses (where " "the verbatim text of the license is reproduced in each file) and detached " "licenses (where a tag in the file specifies the license, as described in " "this document)." msgstr "" "Оставшаяся часть этого раздела предназначена для того, чтобы помочь вам " "разобраться. Как правило, если сомневаетесь, спрашивайте. Получить совет " "гораздо проще, чем исправлять дерево исходного кода. Проект FreeBSD " "использует как явные лицензии (где дословный текст лицензии воспроизводится " "в каждом файле), так и отделённые лицензии (где тег в файле указывает " "лицензию, как описано в этом документе)." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:54 msgid "The FreeBSD Project uses this text as the preferred license:" msgstr "" "Проект FreeBSD использует следующий текст в качестве предпочтительной " "лицензии:" #. type: delimited block . 4 #: documentation/content/en/articles/license-guide/_index.adoc:62 #: documentation/content/en/articles/license-guide/_index.adoc:158 #, no-wrap msgid "" "/*\n" " * Copyright (c) [year] [your name]\n" " *\n" " * SPDX-License-Identifier: BSD-2-Clause\n" " */\n" msgstr "" "/*\n" " * Copyright (c) [year] [your name]\n" " *\n" " * SPDX-License-Identifier: BSD-2-Clause\n" " */\n" #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:68 msgid "" "The FreeBSD project does not allow using the \"advertising clause\" in new " "code. Due to the large number of contributors to the FreeBSD project, " "complying with this clause for many commercial vendors has become " "difficult. If you have code in the tree with the advertising clause, please " "consider switching to a license without it. New contributions to FreeBSD " "should use the BSD-2-Clause license." msgstr "" "Проект FreeBSD не разрешает использование «рекламного условия»footnote:[прим " "перев: требование указания первоначального автора при всех изменениях кода] " "в новом коде. Из-за большого числа участников проекта FreeBSD соблюдение " "этого условия стало затруднительным для многих коммерческих поставщиков. " "Если у вас есть код в дереве с рекламным условием, пожалуйста, рассмотрите " "возможность перехода на лицензию без него. Новые вклады в FreeBSD должны " "использовать лицензию BSD-2-Clause." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:74 msgid "" "The FreeBSD project discourages completely new licenses and variations on " "the standard licenses. New licenses require the approval of {core-email} to " "reside in the main repository. In the past, non-standard licenses have " "generated more problems than standard ones. Poor drafting of non-standard " "licenses often causes more unintended consequences, so they are unlikely to " "be approved by {core-email}. The FreeBSD project is standardizing on the " "BSD-2-Clause license, as published by SPDX." msgstr "" "Проект FreeBSD не поощряет полностью новые лицензии и вариации стандартных " "лицензий. Новые лицензии требуют одобрения {core-email} для размещения в " "основном репозитории. В прошлом нестандартные лицензии вызывали больше " "проблем, чем стандартные. Плохая проработка нестандартных лицензий часто " "приводит к непредвиденным последствиям, поэтому они вряд ли будут одобрены " "{core-email}. Проект FreeBSD стандартизируется на лицензии BSD-2-Clause, как " "опубликовано SPDX." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:80 msgid "" "In addition, project policy requires that code licensed under some non-BSD " "licenses must be placed in specific sections of the repository. For some " "licenses, compilation must be conditional or disabled by default. For " "example, code in the static part of the GENERIC kernel must be licensed " "under the BSD or substantially similar licenses. GPL, APSL, CDDL, etc, " "licensed software must not be compiled into the static GENERIC kernel. Code " "with these licenses may be used in pre-compiled modules, however." msgstr "" "В дополнение, политика проекта требует, чтобы код, лицензированный под " "некоторыми не-BSD лицензиями, размещался в определённых разделах " "репозитория. Для некоторых лицензий компиляция должна быть условной или " "отключена по умолчанию. Например, код в статической части ядра GENERIC " "должен быть лицензирован под BSD или аналогичными лицензиями. Программное " "обеспечение под лицензиями GPL, APSL, CDDL и т.п. не должно компилироваться " "в статическое ядро GENERIC. Однако код с такими лицензиями может " "использоваться в предварительно скомпилированных модулях." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:84 msgid "" "Developers are reminded that, in open source, getting \"open\" correct is " "just as important as getting \"source\" correct. Improper handling of " "intellectual property has serious consequences. Any questions or concerns " "should immediately be brought to the attention of {core-email}." msgstr "" "Разработчикам напоминают, что в открытом исходном коде правильное понимание " "«открытости» так же важно, как и правильное понимание «исходного кода». " "Неправильное обращение с интеллектуальной собственностью имеет серьёзные " "последствия. Любые вопросы или опасения следует немедленно направлять по " "адресу {core-email}." #. type: Title == #: documentation/content/en/articles/license-guide/_index.adoc:86 #, no-wrap msgid "Software License Policy" msgstr "Политика лицензирования программного обеспечения" #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:92 msgid "" "The following sections outline the project's Software License Policies in " "detail. For the most part we expect developers to read, understand and " "utilize the sections above this one to apply appropriate licenses to their " "contributions. The rest of this document details the philosophical " "background to the policies as well as the policies in great detail. As " "always, if the text below is confusing or you need help with applying these " "policies, please reach out to {core-email}." msgstr "" "В следующих разделах подробно изложены политики лицензирования программного " "обеспечения проекта. В основном мы ожидаем, что разработчики прочитают, " "поймут и будут использовать разделы выше, чтобы применять соответствующие " "лицензии к своим вкладам. Остальная часть этого документа подробно описывает " "философскую основу политик, а также сами политики. Как всегда, если текст " "ниже вызывает затруднения или вам нужна помощь в применении этих политик, " "пожалуйста, обратитесь к {core-email}." #. type: Title === #: documentation/content/en/articles/license-guide/_index.adoc:93 #, no-wrap msgid "Guiding Principles" msgstr "Руководящие принципы" #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:98 msgid "" "The FreeBSD Project aims to produce a complete, BSD-licensed operating " "system allowing consumers of the system to produce derivative products " "without constraint or further license obligations. We invite and greatly " "appreciate the contribution of both changes and additions under the two-" "clause BSD license, and encourage the adoption of this license by other open " "source projects. Use of the BSD license is key to encouraging the adoption " "of advanced operating system technology, and on many notable occasions has " "been pivotal to widespread use of new technology." msgstr "" "Проект FreeBSD ставит своей целью создание полноценной операционной системы " "под лицензией BSD, позволяющей пользователям системы создавать производные " "продукты без ограничений или дополнительных лицензионных обязательств. Мы " "приветствуем и высоко ценим вклад в виде изменений и дополнений под " "лицензией BSD с двумя пунктами, а также призываем другие проекты с открытым " "исходным кодом принимать эту лицензию. Использование лицензии BSD является " "ключевым для поощрения внедрения передовых технологий операционных систем и " "во многих значимых случаях играло решающую роль в широком распространении " "новых технологий." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:100 msgid "" "We accept however that compelling reasons exist to allow differently-" "licensed software to be included in the FreeBSD source tree." msgstr "" "Мы, однако, признаем, что существуют веские причины для включения в исходное " "дерево FreeBSD программного обеспечения с другими лицензиями." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:103 msgid "" "We require software licensed under some non-BSD licenses to be carefully " "isolated in the source tree so that it cannot contaminate BSD-only " "components. Such cautious management encourages licensing clarity and " "facilitates the production of BSD-only derivative products." msgstr "" "Мы требуем, чтобы программное обеспечение, лицензированное под некоторыми не-" "BSD лицензиями, было тщательно изолировано в дереве исходного кода, чтобы " "оно не могло загрязнять компоненты, доступные только под BSD. Такое " "осторожное управление способствует ясности лицензирования и облегчает " "создание производных продуктов, доступных только под BSD." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:107 msgid "" "Unless a special exception is made, no existing BSD-licensed components may " "be replaced with more restrictively licensed software. We encourage FreeBSD " "and third party developers to seek the relicensing, dual-licensing, or " "reimplementing of critical components under the BSD license instead. Such " "would ease their more integral adoption into the FreeBSD operating system." msgstr "" "Если не сделано специального исключения, существующие компоненты с лицензией " "BSD не могут быть заменены на программное обеспечение с более " "ограничительной лицензией. Мы призываем разработчиков FreeBSD и сторонних " "разработчиков стремиться к перелицензированию, двойному лицензированию или " "перереализации критических компонентов под лицензией BSD. Это облегчит их " "более полную интеграцию в операционную систему FreeBSD." #. type: Title === #: documentation/content/en/articles/license-guide/_index.adoc:108 #, no-wrap msgid "Policy" msgstr "Политика" #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:112 msgid "" "The import of new software licensed under any licenses other than the BSD " "license and BSD-Like Licenses (as defined below) requires the prior approval " "of the FreeBSD Core Team. Requests for import must include:" msgstr "" "Импорт нового программного обеспечения, лицензированного под любыми " "лицензиями, кроме лицензии BSD и подобных лицензий BSD (как определено ниже)" -", требует предварительного одобрения от FreeBSD Core Team. Запросы на импорт " -"должны включать:" +", требует предварительного одобрения от Основной команды FreeBSD. Запросы на " +"импорт должны включать:" #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:114 msgid "" "A list of features or bug fixes that the new version or patches contain, " "along with evidence that our users need those features. PRs or references " "to mailing list discussions are ideal forms of evidence." msgstr "" "Список новых возможностей или исправлений ошибок, которые содержит новая " "версия или патчи, вместе с доказательствами того, что эти возможности нужны " "нашим пользователям. Идеальными формами доказательств являются PR (запросы " "на включение изменений) или ссылки на обсуждения в почтовых рассылках." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:116 msgid "" "This process should be used for all software imports, not just those that " "require Core Team review. The mere existence of a new version does not " "justify an import of software to source or ports." msgstr "" "Этот процесс должен использоваться для всех импортов программного " -"обеспечения, а не только для тех, которые требуют проверки Core Team. Сам " -"факт существования новой версии не является оправданием для импорта " -"программного обеспечения в исходные коды или порты." +"обеспечения, а не только для тех, которые требуют проверки Основной команды (" +"Core Team). Сам факт существования новой версии не является оправданием для " +"импорта программного обеспечения в исходные коды или порты." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:118 msgid "" "A list of FreeBSD branches that may be affected. Expansions of scope " "require a new request to and approval from the FreeBSD Core Team." msgstr "" "Список ветвей FreeBSD, которые могут быть затронуты. Расширение области " "применения требует нового запроса и одобрения от основной команды FreeBSD." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:121 msgid "" "The Apache License 2.0 is acceptable for use in some cases. The Core Team " "must approve the import of new Apache License licensed components or the " "change of license of existing components to the Apache License." msgstr "" "Лицензия Apache 2.0 допустима для использования в некоторых случаях. " "Основная команда должна одобрить импорт новых компонентов, лицензированных " "по лицензии Apache, или изменение лицензии существующих компонентов на " "лицензию Apache." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:122 #: documentation/content/en/articles/license-guide/_index.adoc:127 #: documentation/content/en/articles/license-guide/_index.adoc:132 msgid "This license is approved for the following components:" msgstr "Данная лицензия одобрена для следующих компонентов:" #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:123 msgid "LLVM toolchain and (with LLVM Exceptions) runtime components." msgstr "" "Инструментарий LLVM и (с исключениями LLVM) компоненты времени выполнения." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:126 msgid "" "The BSD+Patent License is acceptable for use in some cases. The Core Team " "must approve the import of new BSD+Patent License licensed components or the " "change of license of existing components to the BSD+Patent License." msgstr "" "Лицензия BSD+Patent License допустима для использования в некоторых случаях. " "Основная команда (Core Team) должна одобрить импорт новых компонентов, " "лицензированных по BSD+Patent License, или изменение лицензии существующих " "компонентов на BSD+Patent License." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:128 msgid "EDK2 derived code related to UEFI functionality" msgstr "Код, основанный на EDK2, связанный с функциональностью UEFI" #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:131 msgid "" "The Common Development and Distribution License (CDDL) is acceptable for use " "in some cases. The Core Team must approve the import of new CDDL licensed " "components or the change of license of existing components to the CDDL." msgstr "" "Общая лицензия на разработку и распространение (CDDL) допустима для " "использования в некоторых случаях. Основная команда должна одобрить импорт " "новых компонентов с лицензией CDDL или изменение лицензии существующих " "компонентов на CDDL." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:133 msgid "DTrace" msgstr "DTrace" #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:134 msgid "ZFS filesystem, including kernel support and userland utilities" msgstr "" "Файловая система ZFS, включая поддержку в ядре и пользовательские утилиты" #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:140 msgid "" "Historically, the phrase 'All Rights Reserved.' was included in all " "copyright notices. All the BSD releases had it, to comply with the https://" "en.wikipedia.org/wiki/Buenos_Aires_Convention[Buenos Aires Convention of " "1910] in the Americas. With the ratification of the https://" "en.wikipedia.org/wiki/Berne_Convention[Berne Convention] in 2000 by " "Nicaragua, the Buenos Aires Convention -- and the phrase -- became " "obsolete. As such, the FreeBSD project recommends that new code omit the " "phrase and encourages existing copyright holders to remove it. In 2018, the " "project updated its templates to remove it." msgstr "" "Исторически фраза \"All Rights Reserved.\" включалась во все уведомления об " "авторских правах. Все релизы BSD содержали её, чтобы соответствовать " "требованиям https://en.wikipedia.org/wiki/Buenos_Aires_Convention[Буэнос-" "Айресской конвенции 1910 года] в Америке. После ратификации https://en." "wikipedia.org/wiki/Berne_Convention[Бернской конвенции] в 2000 году " "Никарагуа, Буэнос-Айресская конвенция — и эта фраза — устарели. В связи с " "этим проект FreeBSD рекомендует опускать эту фразу в новом коде и призывает " "текущих правообладателей удалить её. В 2018 году проект обновил свои " "шаблоны, убрав её." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:143 msgid "" "Initially, many items in the FreeBSD tree were marked with BSD-2-Clause-" "FreeBSD. However, SPDX has obsoleted the license as a variant; and the SPDX " "text of the obsolete tag differs enough from the standard FreeBSD license " "that it shouldn't be used. A review of its current use is ongoing." msgstr "" "Изначально многие элементы в дереве FreeBSD были помечены лицензией BSD-2" "-Clause-FreeBSD. Однако SPDX объявил эту лицензию устаревшей как вариант, и " "текст устаревшего тега в SPDX отличается от стандартной лицензии FreeBSD " "настолько, что его не следует использовать. Проводится проверка его текущего " "использования." #. type: Title ==== #: documentation/content/en/articles/license-guide/_index.adoc:144 #, no-wrap msgid "Acceptable licenses" msgstr "Допустимые лицензии" #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:148 msgid "" "The following licenses are considered to be acceptable BSD-Like Licenses for " "the purpose of this Policy. Deviations or the use of any other license must " "be approved by the FreeBSD Core Team:" msgstr "" "Следующие лицензии считаются допустимыми лицензиями в стиле BSD для целей " "данной Политики. Отклонения или использование любых других лицензий должны " "быть согласованы с основной командой (Core Team) FreeBSD:" #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:150 msgid "The 2 clause version of the BSD license" msgstr "Версия лицензии BSD с 2 пунктами" #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:160 msgid "The 3 clause version of the BSD license" msgstr "Версия лицензии BSD с 3 пунктами" #. type: delimited block . 4 #: documentation/content/en/articles/license-guide/_index.adoc:168 #, no-wrap msgid "" "/*\n" " * Copyright (c) [year] [your name]\n" " *\n" " * SPDX-License-Identifier: BSD-3-Clause\n" " */\n" msgstr "" "/*\n" " * Copyright (c) [year] [your name]\n" " *\n" " * SPDX-License-Identifier: BSD-3-Clause\n" " */\n" #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:170 msgid "The ISC License" msgstr "Лицензия ISC" #. type: delimited block . 4 #: documentation/content/en/articles/license-guide/_index.adoc:178 #, no-wrap msgid "" "/*\n" " * Copyright (c) [year] [copyright holder]\n" " *\n" " * SPDX-License-Identifier: ISC\n" " */\n" msgstr "" "/*\n" " * Copyright (c) [year] [copyright holder]\n" " *\n" " * SPDX-License-Identifier: ISC\n" " */\n" #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:180 msgid "The MIT License" msgstr "Лицензия MIT" #. type: delimited block . 4 #: documentation/content/en/articles/license-guide/_index.adoc:188 #, no-wrap msgid "" "/*\n" " * Copyright (c) [year] [copyright holders]\n" " *\n" " * SPDX-License-Identifier: MIT\n" " */\n" msgstr "" "/*\n" " * Copyright (c) [year] [copyright holders]\n" " *\n" " * SPDX-License-Identifier: MIT\n" " */\n" #. type: Title == #: documentation/content/en/articles/license-guide/_index.adoc:189 #, no-wrap msgid "Software Collection License" msgstr "Лицензия набора программного обеспечения (Software Collection License)" #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:194 msgid "" "The FreeBSD Project licenses its compilation of software as described in " "[.filename]#COPYRIGHT# under the BSD-2-Clause license. This license does " "not supersede the license of individual files, which is described below. " "Files that do not have an explicit license are licensed under the BSD-2-" "Clause license." msgstr "" "Проект FreeBSD лицензирует свою подборку программного обеспечения, как " "описано в [.filename]#COPYRIGHT#, по лицензии BSD-2-Clause. Данная лицензия " "не заменяет лицензии отдельных файлов, которые описаны ниже. Файлы, не " "имеющие явной лицензии, распространяются по лицензии BSD-2-Clause." #. type: Title == #: documentation/content/en/articles/license-guide/_index.adoc:195 #, no-wrap msgid "License File Location" msgstr "Расположение файла лицензии" #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:207 msgid "" "To comply with the https://reuse.software/[REUSE Software] standard as much " "as possible, all license files will be stored in the [.filename]#LICENSES/# " "directory of the repository. There are three subdirectories under this top " "level directory. The [.filename]#LICENSES/text/# subdirectory contains, in " "detached form, the text of all the licenses that are allowed in the FreeBSD " "software collection. These files are stored using the SPDX-License-" "Identifier name followed by .txt. The [.filename]#LICENSES/exceptions/# " "subdirectory has the text of all exceptions that are allowed in detached " "form in the FreeBSD software collection. These files are stored using the " "exception identifier name followed by .txt. The [.filename]#LICENSES/other/" "# contains, in detached form, the license files references in SPDX-License-" "Identifier expressions, but aren't otherwise allowed as detached licenses. " "All such files must appear at least once in the FreeBSD software collection, " "and should be removed when the last file that references them is removed. " "Licenses that have no adequate SPDX matching license must be in " "[.filename]#LICENSES/other/# and have a filename that starts with " "LicenseRef- followed by a unique idstring. No such files have currently " "been identified, but if they are, a full list will appear here." msgstr "" "Для соответствия стандарту https://reuse.software/[REUSE Software] насколько " "это возможно, все файлы лицензий будут храниться в каталоге [.filename]#" "LICENSES/# репозитория. В этом корневом каталоге есть три подкаталога. " "Подкаталог [.filename]#LICENSES/text/# содержит в отдельном виде тексты всех " "лицензий, разрешённых в комплекте программного обеспечения FreeBSD. Эти " "файлы сохраняются с использованием идентификатора SPDX-License-Identifier с " "добавлением .txt. Подкаталог [.filename]#LICENSES/exceptions/# содержит " "тексты всех исключений, разрешённых в отдельном виде в комплекте " "программного обеспечения FreeBSD. Эти файлы сохраняются с использованием " "идентификатора исключения с добавлением .txt. Подкаталог [.filename]#" "LICENSES/other/# содержит в отдельном виде файлы лицензий, упомянутые в " "выражениях SPDX-License-Identifier, но не разрешённые в качестве отдельных " "лицензий. Все такие файлы должны присутствовать в комплекте программного " "обеспечения FreeBSD хотя бы один раз и должны быть удалены, когда удаляется " "последний файл, ссылающийся на них. Лицензии, для которых нет подходящего " "соответствия в SPDX, должны находиться в [.filename]#LICENSES/other/# и " "иметь имя файла, начинающееся с LicenseRef-, за которым следует уникальная " "строка идентификатора. В настоящее время такие файлы не выявлены, но если " "они появятся, их полный список будет приведён здесь." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:211 msgid "" "The FreeBSD Project currently does not make use of the `DEP5` files " "described in the `REUSE Software` standard. The FreeBSD Project has not " "marked all the files in the tree yet in accordance with this standard, as " "described later in this document. The FreeBSD Project has not yet included " "these files in its repositories since this policy is still evolving." msgstr "" "Проект FreeBSD в настоящее время не использует файлы `DEP5`, описанные в " "стандарте `REUSE Software`. Проект FreeBSD ещё не пометил все файлы в дереве " "в соответствии с этим стандартом, как описано далее в этом документе. Проект " "FreeBSD пока не включил эти файлы в свои репозитории, поскольку данная " "политика ещё находится в процессе разработки." #. type: Title == #: documentation/content/en/articles/license-guide/_index.adoc:213 #, no-wrap msgid "Individual Files License" msgstr "Лицензии индивидуальных файлов" #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:217 msgid "" "Each individual file in the FreeBSD software collection has its own " "copyright and license. How they are marked varies and is described in this " "section." msgstr "" "Каждый отдельный файл в комплекте программного обеспечения FreeBSD имеет " "собственное авторское право и лицензию. Способ их обозначения варьируется и " "описан в этом разделе." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:221 msgid "" "A copyright notice identifies who claims the legal copyright to a file. " "These are provided on a best effort basis by the project. Because " "copyrights may be legally transferred, the current copyright holder may " "differ from what is listed in the file." msgstr "" "Уведомление об авторских правах указывает, кто заявляет о законных авторских " "правах на файл. Они предоставляются проектом по принципу наилучших усилий. " "Поскольку авторские права могут быть юридически переданы, текущий " "правообладатель может отличаться от указанного в файле." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:230 msgid "" "A license is a legal document between the contributor and the users of the " "software granting permission to use the copyrighted portions of the " "software, subject to certain terms and conditions set forth in the license. " "Licenses can be expressed in one of two ways in the FreeBSD software " "collection. Licenses can be explicit in a file. When a license grant is " "explicit in the file, that file may be used, copied, and modified in " "accordance with that license. Licenses can also be expressed indirectly, " "where the text of the license is elsewhere. The project uses the Software " "Package Data Exchange (SPDX) license identifiers for this purpose, as " "described in the following subsections. SPDX license identifiers are " "managed by the SPDX Workgroup at the Linux Foundation, and have been agreed " "on by partners throughout the industry, tool vendors, and legal teams. For " "further information see https://spdx.org/ and the following sections for how " "the FreeBSD Project uses them." msgstr "" "Лицензия — это юридический документ между автором и пользователями " "программного обеспечения, который предоставляет разрешение на использование " "защищённых авторским правом частей программного обеспечения на определённых " "условиях, изложенных в лицензии. В коллекции программного обеспечения " "FreeBSD лицензии могут быть выражены одним из двух способов. Лицензии могут " "быть явно указаны в файле. Когда лицензионное разрешение явно указано в " "файле, этот файл может использоваться, копироваться и изменяться в " "соответствии с данной лицензией. Лицензии также могут быть выражены " "косвенно, когда текст лицензии находится в другом месте. Для этой цели " "проект использует идентификаторы лицензий Software Package Data Exchange " "(SPDX), как описано в следующих подразделах. Идентификаторы лицензий SPDX " "управляются рабочей группой SPDX в Linux Foundation и были согласованы " "партнёрами по отрасли, поставщиками инструментов и юридическими командами. " "Для получения дополнительной информации см. https://spdx.org/ и следующие " "разделы о том, как проект FreeBSD их использует." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:233 msgid "" "Entities that contribute fixes and enhancements to the software collection " "without an explicit license agree to license those changes under the terms " "that apply to the modified file(s). Project policy, in line with industry " "practice, only includes a copyright notice from significant contributors to " "the files in the collection." msgstr "" "Сущности, которые вносят исправления и улучшения в комплект программного " "обеспечения без явного лицензирования, соглашаются лицензировать эти " "изменения на условиях, применимых к изменённым файлам. Политика проекта, в " "соответствии с отраслевой практикой, включает уведомление об авторских " "правах только от значительных участников для файлов в коллекции." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:235 msgid "There are four types of files in the FreeBSD software collection:" msgstr "" "В комплекте программного обеспечения FreeBSD существует четыре типа файлов:" #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:237 msgid "Files that have only an explicit copyright notice and license." msgstr "" "Файлы, содержащие только явное уведомление об авторских правах и лицензию." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:238 msgid "" "Files that have both an explicit copyright notice and license, and a SPDX-" "License-Identifier tag." msgstr "" "Файлы, содержащие как явное уведомление об авторских правах и лицензии, так " "и тег SPDX-License-Identifier." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:239 msgid "" "Files that have only a copyright notice and an SPDX-License-Identifier tag, " "but no explicit license." msgstr "" "Файлы, содержащие только уведомление об авторских правах и тег SPDX-License-" "Identifier, но без явного указания лицензии." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:240 msgid "Files that lack any copyright or license at all." msgstr "" "Файлы, в которых отсутствует какое-либо указание на авторские права или " "лицензию." #. type: Title === #: documentation/content/en/articles/license-guide/_index.adoc:241 #, no-wrap msgid "Only Copyright and License" msgstr "Только авторские права и лицензия" #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:245 msgid "" "Many files in the FreeBSD software collection have both a copyright notice " "and an explicit license contained in the file. In these cases, the license " "contained in the file governs." msgstr "" "Многие файлы в коллекции программного обеспечения FreeBSD содержат как " "уведомление об авторских правах, так и явную лицензию в самом файле. В таких " "случаях применяется лицензия, указанная в файле." #. type: Title === #: documentation/content/en/articles/license-guide/_index.adoc:246 #, no-wrap msgid "Copyright and License with SPDX-License-Identifier expression" msgstr "Авторские права и лицензия с выражением SPDX-License-Identifier" #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:252 msgid "" "Some files in the FreeBSD software collection contain a copyright statement, " "an SPDX-License-Identifier tag and an explicit license. The explicit " "license takes precedence over the SPDX-License-Identifier tag. The SPDX-" "License-Identifier tag is the project's best effort attempt to characterize " "the license, but is only informative for automated tools. See " "crossref:license-guide[expressions,SPDX-License-Identifier Expressions] for " "how to interpret the expression." msgstr "" "Некоторые файлы в коллекции программного обеспечения FreeBSD содержат " "заявление об авторских правах, тег SPDX-License-Identifier и явную лицензию. " "Явная лицензия имеет приоритет над тегом SPDX-License-Identifier. Тег SPDX-" "License-Identifier представляет собой наилучшую попытку проекта " "охарактеризовать лицензию, но является лишь информационным полем для " "автоматизированных инструментов. См. crossref:license-guide[" "expressions,Выражения SPDX-License-Identifier] для интерпретации выражения." #. type: Title === #: documentation/content/en/articles/license-guide/_index.adoc:253 #, no-wrap msgid "Only Copyright and SPDX-License-Identifier expression." msgstr "" "Только уведомление об авторских правах и выражение SPDX-License-Identifier." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:259 msgid "" "Some files in the tree contain detached licenses. These files contain only " "a copyright notice and an SPDX-License-Identifier expression, but no " "explicit license. See crossref:license-guide[expressions,SPDX-License-" "Identifier Expressions] for how to interpret the expression. Note: the " "expressions allowed for detached licenses by the project are a subset of the " "expressions used informationally or that are defined by the standard." msgstr "" "Некоторые файлы в дереве содержат отдельные лицензии. Эти файлы содержат " "только уведомление об авторских правах и выражение SPDX-License-Identifier, " "но не содержат явной лицензии. См. crossref:license-guide[expressions, " "Выражения SPDX-License-Identifier] для интерпретации выражения. Примечание: " "выражения, разрешенные для отдельных лицензий проектом, являются " "подмножеством выражений, используемых в информационных целях или " -"определенных стандартом." +"определённых стандартом." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:261 msgid "" "The license for files containing only the SPDX-License-Identifier should be " "construed to be" msgstr "" "Лицензия для файлов, содержащих только SPDX-License-Identifier, должна " "толковаться как" #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:264 msgid "" "Start the license with the copyright notice from the file. Include all the " "copyright holders." msgstr "" "Начните лицензию с уведомления об авторских правах из файла. Включите всех " "правообладателей." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:267 msgid "" "For each sub-expression, copy the license text from [.filename]#LICENSE/text/" "`id`.txt#. When exceptions are present, append them from [.filename]#src/" "share/license/exceptions/`id`.txt#. SPDX-License-Identifier expressions " "should be construed as described in the SPDX standard." msgstr "" "Для каждого подвыражения скопируйте текст лицензии из [.filename]#LICENSE/" "text/`id`.txt#. Если присутствуют исключения, добавьте их из [.filename]#src/" "share/license/exceptions/`id`.txt#. Выражения SPDX-License-Identifier должны " "интерпретироваться в соответствии со стандартом SPDX." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:270 msgid "" "Where `id` is the SPDX short license identifier from the `Identifier` column " "of https://spdx.org/licenses/[SPDX Identifiers] or https://spdx.org/licenses/" "exceptions-index.html[license exception]. If there is no file in " "[.filename]#LICENSE/#, then that license or exception cannot be specified as " "a detached license under this section." msgstr "" "Где `id` — это короткий идентификатор лицензии SPDX из столбца `Identifier` " "на страницах https://spdx.org/licenses/[Идентификаторы SPDX] или https://spdx" ".org/licenses/exceptions-index.html[исключения лицензий]. Если в каталоге [." "filename]#LICENSE/# нет файла, то такая лицензия или исключение не могут " "быть указаны как отдельная лицензия в этом разделе." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:272 msgid "" "When reading the license text that is detached from a file, a number of " "considerations must be taken to make the detached license make sense." msgstr "" "При чтении текста лицензии, отделенного от файла, необходимо учитывать ряд " "аспектов, чтобы отделенная лицензия имела смысл." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:275 msgid "" "Any reference to a copyright notice shall refer to the copyright notice " "constructed from the licensed file, not from any copyright notice in the " "license text file itself. Many SPDX files have sample copyright notices " "that are understood to be examples only." msgstr "" "Любая ссылка на уведомление об авторских правах должна относиться к " "уведомлению, составленному из лицензированного файла, а не из любого " "уведомления об авторских правах в самом тексте файла лицензии. Многие файлы " "SPDX содержат примеры уведомлений об авторских правах, которые понимаются " "исключительно как образцы." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:278 msgid "" "When names of entities are referred to in the license text, they shall be " "construed to apply to the list of all copyright holders listed in the " "copyright notices of the licensed file. For example, the BSD-4-clause " "license contains the phrase \"This product includes software developed by " "the organization\". The phrase 'the organization' should be replaced by the " "copyright holders." msgstr "" "Когда в тексте лицензии упоминаются названия организаций, они должны " "интерпретироваться как относящиеся к списку всех правообладателей, указанных " "в уведомлениях об авторских правах лицензированного файла. Например, " "лицензия BSD-4-clause содержит фразу \"Этот продукт включает программное " "обеспечение, разработанное организацией\". Фраза 'организацией' должна быть " "заменена на правообладателей." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:280 msgid "" "When the SPDX offers variations of the license, it is understood the license " "in the [.filename]#LICENSE/# file represents the exact version of the " "license selected. The SPDX standard exists to match families of licenses " "and these variations help match similar licenses that the SPDX organization " "believes to be legally identical." msgstr "" "Когда SPDX предлагает варианты лицензии, подразумевается, что лицензия в " "файле [.filename]#LICENSE/# представляет точную версию выбранной лицензии. " "Стандарт SPDX существует для сопоставления семейств лицензий, и эти варианты " "помогают сопоставлять похожие лицензии, которые организация SPDX считает " "юридически идентичными." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:284 msgid "" "For licenses that have slight variations in text, the SPDX has guidelines to " "match them. These guidelines are not relevant here. Contributors wishing " "to license under a variant of a SPDX license not contained verbatim in " "[.filename]#LICENSE/# cannot use the detached option and must specify the " "license explicitly." msgstr "" "Для лицензий с небольшими вариациями в тексте SPDX предоставляет " "рекомендации по их сопоставлению. Эти рекомендации здесь не актуальны. " "Участники, желающие использовать вариант лицензии SPDX, который не " "содержится дословно в [.filename]#LICENSE/#, не могут использовать отдельный " "вариант и должны явно указать лицензию." #. type: Title === #: documentation/content/en/articles/license-guide/_index.adoc:285 #, no-wrap msgid "Files without Copyright or any License Marking" msgstr "Файлы без указания авторских прав или любой лицензионной отметки" #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:290 msgid "" "Some files cannot have suitable comments added to them. In such cases, a " "license may be found in [.filename]#file.ext.license#. For example, a file " "named [.filename]#foo.jpg# may have a license in " "[.filename]#foo.jpg.license#, following the REUSE Software conventions." msgstr "" "Некоторые файлы не могут содержать подходящих комментариев. В таких случаях " "лицензия может быть найдена в [.filename]#file.ext.license#. Например, файл " "с именем [.filename]#foo.jpg# может иметь лицензию в [.filename]#foo.jpg." "license#, следуя соглашениям REUSE Software." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:293 msgid "" "Files created by the project that lack a copyright notice are understood to " "fall under the blanket copyright and licensing in [.filename]#COPYRIGHT#. " "Either the file is a mere recitation of facts, not protectable by Copyright " "Law, or the content is so trivial as to not warrant the overhead of an " "explicit license." msgstr "" "Файлы, созданные проектом, в которых отсутствует уведомление об авторских " "правах, считаются подпадающими под общие положения об авторских правах и " "лицензировании в файле [.filename]#COPYRIGHT#. Это означает, что либо файл " "представляет собой простое изложение фактов, не охраняемых законом об " "авторских правах, либо его содержание настолько тривиально, что не требует " "оформления явной лицензии." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:296 msgid "" "Files that lack marking and have more than a trivial amount of copyrightable " "material, or whose author believes them to be improperly marked, should be " "brought to the attention of the FreeBSD core team. It is the strong policy " "of the FreeBSD Project to comply with all appropriate licenses." msgstr "" "Файлы, которые не имеют маркировки и содержат значительное количество " "материала, защищенного авторским правом, или которые автор считает " "неправильно промаркированными, должны быть доведены до сведения основной " "команды (Core Team) FreeBSD. Проект FreeBSD строго придерживается политики " "соблюдения всех соответствующих лицензий." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:298 msgid "" "In the future, all such files will be marked explicitly, or follow the REUSE " "Software [.filename]#.license# convention." msgstr "" "В будущем все подобные файлы будут явно помечены или следовать соглашению " "REUSE Software о файлах с расширением [.filename]#.license#." #. type: Title === #: documentation/content/en/articles/license-guide/_index.adoc:300 #, no-wrap msgid "SPDX-License-Identifier Expressions" msgstr "Выражения SPDX-License-Identifier" #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:307 msgid "" "An 'SPDX License expression' is used in two contexts in the FreeBSD software " "collection. First, its full form is used for files that have explicit " "license statements contained within the file as well as a summarizing SPDX-" "License-Identifier expression. In this context, the full power of these " "expressions may be used. Second, in a restricted form described above, it " "is used to denote the actual license for a given file. In the second " "context, only a subset of this expression is allowed by the project." msgstr "" "'SPDX License expression' используется в двух контекстах в коллекции " "программного обеспечения FreeBSD. Во-первых, его полная форма применяется " "для файлов, которые содержат явные заявления о лицензии внутри файла, а " "также обобщающее выражение SPDX-License-Identifier. В этом контексте может " "быть использована вся мощь этих выражений. Во-вторых, в ограниченной форме, " "описанной выше, оно используется для обозначения фактической лицензии для " "данного файла. Во втором контексте проектом разрешено только подмножество " "этого выражения." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:311 msgid "" "An `SPDX License sub-expression` is either an SPDX short form license " "identifier from the https://spdx.org/licenses/[SPDX License List], or the " "combination of two SPDX short form license identifiers separated by \"WITH\" " "when a https://spdx.org/licenses/exceptions-index.html[license exception] " "applies. When multiple licenses apply, an expression consists of keywords " "\"AND\", \"OR\" separating sub-expressions and surrounded by \"(\", \")\" . " "The https://spdx.github.io/spdx-spec/appendix-IV-SPDX-license-expressions/" "[full specification of expressions] spells out all the details and takes " "precedence when it conflicts with the simplified treatment of this section." msgstr "" "`Лицензионные под-выражения SPDX` — это либо короткий идентификатор лицензии " "из https://spdx.org/licenses/[Список лицензий SPDX], либо комбинация двух " "таких идентификаторов, разделённых \"WITH\", если применяется https://spdx." "org/licenses/exceptions-index.html[исключение из лицензии]. Если применяются " "несколько лицензий, выражение состоит из подвыражений, разделённых ключевыми " "словами \"AND\", \"OR\" и окружённых символами \"(\", \")\". Полное описание " "выражений доступно в https://spdx.github.io/spdx-spec/" "appendix-IV-SPDX-license-expressions/[спецификации] и имеет приоритет в " "случае противоречий с упрощённым изложением этого раздела." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:319 msgid "" "Some license identifiers, like [L]GPL, have the option to use only that " "version, or any later version. SPDX defines the suffix `-or-later` to mean " "that version of the license or a later version. It defines `-only` to mean " "only that specific version of the file. There is an old convention to have " "no suffix (which means what the new '-only' suffix means, but which people " "confuse for `-or-later`). In addition, affixing a `+` suffix was meant to " "mean `-or-later`. New files in FreeBSD should not use these two " "conventions. Old files that use this convention should be converted as " "appropriate." msgstr "" "Некоторые идентификаторы лицензий, такие как [L]GPL, предоставляют " "возможность использовать только указанную версию или любую более позднюю " "версию. SPDX определяет суффикс `-or-later` для обозначения этой версии " "лицензии или более поздней версии. Суффикс `-only` означает только указанную " "версию файла. Существует старая конвенция, согласно которой отсутствие " "суффикса (что означает то же, что и новый суффикс '-only', но люди путают " "это с `-or-later`). Кроме того, добавление суффикса `+` подразумевало " "значение `-or-later`. В новых файлах FreeBSD не следует использовать эти две " "конвенции. Старые файлы, использующие эту конвенцию, следует преобразовать " "соответствующим образом." #. type: delimited block . 4 #: documentation/content/en/articles/license-guide/_index.adoc:324 #, no-wrap msgid "" " // SPDX-License-Identifier: GPL-2.0-only\n" " // SPDX-License-Identifier: LGPL-2.1-or-later\n" msgstr "" " // SPDX-License-Identifier: GPL-2.0-only\n" " // SPDX-License-Identifier: LGPL-2.1-or-later\n" #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:328 msgid "" "`WITH` should be used when a license modifier is needed. In the FreeBSD " "project, a number of files from LLVM have an exception to the Apache 2.0 " "license:" msgstr "" "`WITH` следует использовать, когда требуется модификатор лицензии. В проекте " "FreeBSD ряд файлов из LLVM имеют исключение из лицензии Apache 2.0:" #. type: delimited block . 4 #: documentation/content/en/articles/license-guide/_index.adoc:332 #, no-wrap msgid " // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception\n" msgstr " // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception\n" #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:336 msgid "" "https://spdx.org/licenses/exceptions-index.html[Exception tags] are managed " "by SPDX. License exceptions can only be applied to certain licenses, as " "specified in the exception." msgstr "" "https://spdx.org/licenses/exceptions-index.html[Теги исключений] управляются " "SPDX. Исключения лицензий могут применяться только к определённым лицензиям, " "как указано в исключении." #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:339 msgid "" "`OR` should be used if the file has a choice of license and one license is " "selected. For example, some dtsi files are available under dual licenses:" msgstr "" "`OR` следует использовать, если файл предлагает выбор лицензии и одна " "лицензия выбрана. Например, некоторые файлы `dtsi` доступны под двойными " "лицензиями:" #. type: delimited block . 4 #: documentation/content/en/articles/license-guide/_index.adoc:343 #, no-wrap msgid " // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause\n" msgstr " // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause\n" #. type: Plain text #: documentation/content/en/articles/license-guide/_index.adoc:347 msgid "" "`AND` should be used if the file has multiple licenses whose terms all apply " "to use the file. For example, if code has been incorporated by several " "projects, each with their own license:" msgstr "" "`AND` следует использовать, если файл имеет несколько лицензий, условия " "которых применяются к использованию файла. Например, если код был " "заимствован из нескольких проектов, каждый со своей собственной лицензией:" #. type: delimited block . 4 #: documentation/content/en/articles/license-guide/_index.adoc:351 #, no-wrap msgid " // SPDX-License-Identifier: BSD-2-Clause AND MIT\n" msgstr " // SPDX-License-Identifier: BSD-2-Clause AND MIT\n" diff --git a/documentation/content/ru/articles/linux-emulation/_index.adoc b/documentation/content/ru/articles/linux-emulation/_index.adoc index 1d327c3315..481ca6c3f4 100644 --- a/documentation/content/ru/articles/linux-emulation/_index.adoc +++ b/documentation/content/ru/articles/linux-emulation/_index.adoc @@ -1,973 +1,973 @@ --- authors: - author: 'Roman Divacky' email: rdivacky@FreeBSD.org description: 'Техническое описание внутреннего устройства слоя эмуляции Linux в FreeBSD' tags: ["Emulation", "Linuxulator", "kernel", "FreeBSD"] title: 'Эмуляция Linux® в FreeBSD' trademarks: ["freebsd", "ibm", "adobe", "netbsd", "realnetworks", "oracle", "linux", "sun", "general"] --- = Эмуляция Linux(R) в FreeBSD :doctype: article :toc: macro :toclevels: 1 :icons: font :sectnums: :sectnumlevels: 6 :source-highlighter: rouge :experimental: :images-path: articles/linux-emulation/ ifdef::env-beastie[] ifdef::backend-html5[] include::shared/authors.adoc[] include::shared/mirrors.adoc[] include::shared/releases.adoc[] include::shared/attributes/attributes-{{% lang %}}.adoc[] include::shared/{{% lang %}}/teams.adoc[] include::shared/{{% lang %}}/mailing-lists.adoc[] include::shared/{{% lang %}}/urls.adoc[] :imagesdir: ../../../images/{images-path} endif::[] ifdef::backend-pdf,backend-epub3[] include::../../../../shared/asciidoctor.adoc[] endif::[] endif::[] ifndef::env-beastie[] include::../../../../../shared/asciidoctor.adoc[] endif::[] [.abstract-title] Аннотация Эта магистерская диссертация посвящена обновлению слоя эмуляции Linux(R) (так называемого _Linuxulator_). Задача состояла в обновлении слоя для соответствия функциональности Linux(R) 2.6. В качестве эталонной реализации было выбрано ядро Linux(R) 2.6.16. Концепция основана на реализации NetBSD. Большая часть работы была выполнена летом 2006 года в рамках программы Google Summer of Code для студентов. Основное внимание уделялось добавлению поддержки _NPTL_ (новой библиотеки потоков POSIX(R)) в слой эмуляции, включая _TLS_ (локальное хранилище потоков), _фьютексы (futex)_ (быстрые мьютексы в пользовательском пространстве), _PID mangling_ и некоторые другие второстепенные аспекты. В процессе было выявлено и исправлено множество мелких проблем. Моя работа была интегрирована в основной репозиторий исходного кода FreeBSD и войдет в предстоящий релиз 7.0R. Мы, команда разработчиков эмуляции, работаем над тем, чтобы сделать эмуляцию Linux(R) 2.6 стандартным слоем эмуляции в FreeBSD. ''' toc::[] [[intro]] == Введение В последние несколько лет операционные системы с открытым исходным кодом на основе UNIX(R) начали широко использоваться на серверных и клиентских машинах. Среди этих операционных систем я хотел бы выделить две: FreeBSD — за наследие BSD, проверенную временем кодобазу и множество интересных возможностей, и Linux(R) — за широкую пользовательскую базу, активное сообщество разработчиков и поддержку крупных компаний. FreeBSD чаще используется на серверных машинах, выполняющих сложные сетевые задачи, и реже — на настольных компьютерах обычных пользователей. В то время как Linux(R) также применяется на серверах, он гораздо популярнее среди домашних пользователей. Это приводит к ситуации, когда для Linux(R) доступно множество проприетарных программ, которые не поддерживают FreeBSD. Естественно, возникает необходимость в возможности запуска Linux(R) бинарников в системе FreeBSD, и именно этому посвящена данная работа: эмуляции ядра Linux(R) в операционной системе FreeBSD. Летом 2006 года компания Google Inc. спонсировала проект, направленный на расширение слоя эмуляции Linux(R) (так называемого Linuxulator) в FreeBSD для включения возможностей Linux(R) 2.6. Данная диссертация написана в рамках этого проекта. [[inside]] == Взгляд изнутри... В этом разделе мы рассмотрим каждую из рассматриваемых операционных систем. Как они работают с системными вызовами, фреймами прерываний и другими низкоуровневыми аспектами. Также мы опишем, как они интерпретируют общие примитивы UNIX(R), такие как PID, потоки и т. д. В третьем подразделе мы поговорим о том, как в целом может быть реализована эмуляция UNIX(R) на UNIX(R). [[what-is-unix]] === Что такое UNIX(R) UNIX(R) — это операционная система с долгой историей, которая повлияла почти на все остальные операционные системы, используемые в настоящее время. Начиная с 1960-х годов, её разработка продолжается и по сей день (хотя в разных проектах). Вскоре развитие UNIX(R) разделилось на два основных направления: семейства BSD и System III/V. Они взаимно влияли друг на друга, формируя общий стандарт UNIX(R). Среди вклада, возникшего в BSD, можно назвать виртуальную память, сетевой стек TCP/IP, FFS и многие другие. Ветка System V внесла свой вклад в примитивы межпроцессного взаимодействия SysV, копирование при записи и т. д. Самого UNIX(R) больше не существует, но его идеи были использованы многими другими операционными системами по всему миру, образовав так называемые UNIX(R)-подобные операционные системы. В наши дни наиболее влиятельными из них являются Linux(R), Solaris и, возможно (в некоторой степени), FreeBSD. Существуют корпоративные производные UNIX(R) (AIX, HP-UX и т. д.), но они всё больше мигрируют на упомянутые системы. Давайте подведём итог типичным характеристикам UNIX(R). [[tech-details]] === Технические детали Каждая запущенная программа представляет собой процесс, который отражает состояние вычислений. Выполняющийся процесс разделяется между пространством ядра и пользовательским пространством. Некоторые операции могут выполняться только из пространства ядра (например, работа с оборудованием), но процесс должен проводить большую часть своего времени в пользовательском пространстве. Ядро — это место, где происходит управление процессами, оборудованием и низкоуровневыми деталями. Ядро предоставляет стандартный унифицированный UNIX(R) API для пользовательского пространства. Наиболее важные из них рассмотрены ниже. [[kern-proc-comm]] ==== Обмен данными между ядром и пользовательским процессом Общий API UNIX(R) определяет системный вызов как способ передачи команд из пользовательского процесса ядру. Наиболее распространённая реализация использует либо прерывание, либо специализированную инструкцию (например, инструкции `SYSENTER`/`SYSCALL` для ia32). Системные вызовы определяются по номеру. Например, в FreeBSD системный вызов номер 85 — это man:swapon[2], а номер 132 — man:mkfifo[2]. Некоторые системные вызовы требуют параметров, которые передаются из пользовательского пространства в пространство ядра различными способами (зависит от реализации). Системные вызовы являются синхронными. -Еще один возможный способ взаимодействия — использование _прерывания_. Прерывания происходят асинхронно после возникновения определенного события (деление на ноль, ошибка страницы и т.д.). Прерывание может быть прозрачным для процесса (ошибка страницы) или привести к реакции, например, отправке _сигнала_ (деление на ноль). +Еще один возможный способ взаимодействия — использование _прерывания_. Прерывания происходят асинхронно после возникновения определённого события (деление на ноль, ошибка страницы и т.д.). Прерывание может быть прозрачным для процесса (ошибка страницы) или привести к реакции, например, отправке _сигнала_ (деление на ноль). [[proc-proc-comm]] ==== Обмен данными между процессами Существуют другие API (System V IPC, разделяемая память и т.д.), но наиболее важным API являются сигналы. Сигналы отправляются процессами или ядром и принимаются процессами. Некоторые сигналы могут быть проигнорированы или обработаны пользовательской процедурой, другие приводят к предопределённому действию, которое нельзя изменить или игнорировать. [[proc-mgmt]] ==== Управление процессами Процессы ядра обрабатываются первыми в системе (так называемый init). Каждый запущенный процесс может создать свою идентичную копию, используя системный вызов man:fork[2]. Были введены некоторые немного изменённые версии этого системного вызова, но базовая семантика остаётся той же. Каждый запущенный процесс может превратиться в другой процесс, используя системный вызов man:exec[3]. Были введены некоторые модификации этого системного вызова, но все они служат одной и той же базовой цели. Процессы завершают своё существование, вызывая системный вызов man:exit[2]. Каждый процесс идентифицируется уникальным номером, называемым PID. У каждого процесса есть определённый родитель (идентифицируемый его PID). [[thread-mgmt]] ==== Управление потоками -Традиционный UNIX(R) не определяет никакого API или реализации для потоков, в то время как POSIX(R) определяет свой API для потоков, но реализация остается неопределенной. Традиционно существовало два способа реализации потоков: обработка их как отдельных процессов (потоки 1:1) или обертывание всей группы потоков в один процесс с управлением потоками в пользовательском пространстве (потоки 1:N). Сравнение основных особенностей каждого подхода: +Традиционный UNIX(R) не определяет никакого API или реализации для потоков, в то время как POSIX(R) определяет свой API для потоков, но реализация остаётся неопределённой. Традиционно существовало два способа реализации потоков: обработка их как отдельных процессов (потоки 1:1) или обёртывание всей группы потоков в один процесс с управлением потоками в пользовательском пространстве (потоки 1:N). Сравнение основных особенностей каждого подхода: Потоки 1:1 - тяжеловесные потоки - планирование не может быть изменено пользователем (частично смягчено благодаря POSIX(R) API) + нет необходимости в обёртке системных вызовов + может использовать несколько процессоров Потоки 1:N + легковесные потоки + планирование может быть легко изменено пользователем - Системные вызовы должны быть обернуты - не может использовать более одного CPU [[what-is-freebsd]] === Что такое FreeBSD? Проект FreeBSD — одна из старейших операционных систем с открытым исходным кодом, доступных для повседневного использования. Она является прямым потомком оригинальной UNIX(R), поэтому можно утверждать, что это настоящая UNIX(R), хотя проблемы с лицензированием не позволяют этого сделать. Начало проекта относится к началу 1990-х годов, когда группа пользователей BSD создала набор исправлений для операционной системы 386BSD. На основе этого набора возникла новая операционная система под названием FreeBSD, получившая своё имя благодаря либеральной лицензии. Другая группа создала операционную систему NetBSD с другими целями. Мы сосредоточимся на FreeBSD. FreeBSD — это современная операционная система на основе UNIX(R), обладающая всеми возможностями UNIX(R). Вытесняющая многозадачность, многопользовательские функции, сетевые возможности TCP/IP, защита памяти, поддержка симметричной многопроцессорности, виртуальная память с объединёнными VM и кэшем буфера — всё это присутствует. Одной из интересных и чрезвычайно полезных особенностей является возможность эмуляции других UNIX(R)-подобных операционных систем. По состоянию на декабрь 2006 года и разработку 7-CURRENT поддерживаются следующие функции эмуляции: * Совместимость FreeBSD/i386 на FreeBSD/amd64 * FreeBSD/i386 эмуляция на FreeBSD/ia64 * Эмуляция Linux(R) операционной системы Linux(R) на FreeBSD * NDIS-эмуляция интерфейса сетевых драйверов Windows * NetBSD-эмуляция операционной системы NetBSD * Поддержка PECoff для исполняемых файлов FreeBSD в формате PECoff * Эмуляция SVR4 System V revision 4 UNIX(R) Активно разрабатываемые эмуляции — это слой Linux(R) и различные слои FreeBSD-on-FreeBSD. Остальные в настоящее время не должны работать корректно или быть пригодными к использованию. [[freebsd-tech-details]] ==== Технические детали FreeBSD — это традиционный вариант UNIX(R) в смысле разделения выполнения процессов на две части: выполнение в пространстве ядра и выполнение в пространстве пользователя. Существует два типа входа процесса в ядро: системный вызов (syscall) и ловушка (trap). Возврат только один. В последующих разделах мы опишем три входа/выхода в/из ядра. Всё описание относится к архитектуре i386, так как Linuxulator существует только там, но концепция схожа на других архитектурах. Информация была взята из [1] и исходного кода. [[freebsd-sys-entries]] ===== Системные записи В FreeBSD существует абстракция, называемая загрузчиком классов исполнения, которая является прослойкой в системном вызове man:execve[2]. Она использует структуру `sysentvec`, описывающую ABI исполняемого файла. Эта структура содержит такие элементы, как таблицу преобразования errno, таблицу преобразования сигналов, различные функции для обработки системных вызовов (исправление стека, создание дампов памяти и т.д.). Каждый ABI, который ядро FreeBSD поддерживает, должен определять эту структуру, так как она используется в дальнейшем в коде обработки системных вызовов и в некоторых других местах. Системные вызовы обрабатываются обработчиками прерываний, где можно одновременно получить доступ как к пространству ядра, так и к пользовательскому пространству. [[freebsd-syscalls]] ===== Системные вызовы Системные вызовы в FreeBSD выполняются путем прерывания `0x80` с установленным в регистре `%eax` номером нужного системного вызова и аргументами, переданными через стек. Когда процесс вызывает прерывание `0x80`, срабатывает обработчик системного вызова `int0x80` (определённый в [.filename]#sys/i386/i386/exception.s#), который подготавливает аргументы (т.е. копирует их в стек) для вызова функции на языке C man:syscall[2] (определённой в [.filename]#sys/i386/i386/trap.c#), обрабатывающей переданный фрейм прерывания. Обработка включает подготовку системного вызова (в зависимости от записи `sysvec`), определение разрядности системного вызова (32-битный или 64-битный, что влияет на размер параметров), после чего параметры копируются, включая сам системный вызов. Затем выполняется фактическая функция системного вызова с обработкой кода возврата (особые случаи для ошибок `ERESTART` и `EJUSTRETURN`). В завершение планируется вызов `userret()`, возвращающий процесс в пользовательское пространство. Параметры для фактического обработчика системного вызова передаются в виде аргументов `struct thread *td`, `struct syscall args *`, где второй параметр является указателем на скопированную структуру параметров. [[freebsd-traps]] ===== Ловушки (trap) Обработка ловушек в FreeBSD аналогична обработке системных вызовов. При возникновении ловушки вызывается обработчик на ассемблере. Он выбирается между `alltraps`, `alltraps` с сохранением регистров или `calltrap` в зависимости от типа ловушки. Этот обработчик подготавливает аргументы для вызова функции на языке C `trap()` (определена в [.filename]#sys/i386/i386/trap.c#), которая затем обрабатывает произошедшую ловушку. После обработки она может отправить сигнал процессу и/или вернуться в пользовательское пространство с помощью `userret()`. [[freebsd-exits]] ===== Выходы Выход из ядра в пользовательское пространство происходит с использованием ассемблерной процедуры `doreti`, независимо от того, было ли ядро вызвано через ловушку или через системный вызов. Это восстанавливает состояние программы из стека и возвращает управление в пользовательское пространство. [[freebsd-unix-primitives]] ===== Примитивы UNIX(R) Операционная система FreeBSD придерживается традиционной схемы UNIX(R), где каждый процесс имеет уникальный идентификационный номер, так называемый _PID_ (Идентификатор Процесса). Номера PID выделяются либо линейно, либо случайным образом в диапазоне от `0` до `PID_MAX`. Распределение номеров PID осуществляется с помощью линейного поиска в пространстве PID. Каждый поток в процессе получает тот же номер PID в результате вызова man:getpid[2]. В настоящее время в FreeBSD существует два способа реализации потоков. Первый способ — это M:N потоки, за которым следует модель потоков 1:1. По умолчанию используется библиотека M:N (`libpthread`), но во время выполнения можно переключиться на потоки 1:1 (`libthr`). Планируется в ближайшее время перейти на библиотеку 1:1 по умолчанию. Хотя обе библиотеки используют одни и те же примитивы ядра, доступ к ним осуществляется через разные API. Библиотека M:N использует семейство системных вызовов `kse_*`, тогда как библиотека 1:1 использует семейство `thr_*`. Из-за этого отсутствует общая концепция идентификатора потока, разделяемая между ядром и пользовательским пространством. Конечно, обе библиотеки реализуют API идентификатора потока pthread. У каждого потока ядра (как описано в `struct thread`) есть идентификатор td tid, но он недоступен напрямую из пользовательского пространства и служит исключительно нуждам ядра. Он также используется в библиотеке потоков 1:1 в качестве идентификатора потока pthread, но обработка этого идентификатора внутренняя для библиотеки и не может быть использована напрямую. Как упоминалось ранее, в FreeBSD существуют две реализации потоков. Библиотека M:N разделяет работу между пространством ядра и пользовательским пространством. Поток — это сущность, которая планируется в ядре, но может представлять различное количество пользовательских потоков. M пользовательских потоков отображаются на N потоков ядра, что позволяет экономить ресурсы, сохраняя при этом возможность использовать преимущества многопроцессорного параллелизма. Дополнительную информацию о реализации можно получить из man-страницы или [1]. Библиотека 1:1 напрямую отображает пользовательский поток на поток ядра, что значительно упрощает схему. Ни одна из этих реализаций не включает механизм справедливости (такой механизм был реализован, но недавно удалён, поскольку вызывал серьёзное замедление и усложнял работу с кодом). [[what-is-linux]] === Что такое Linux(R) Linux(R) — это UNIX(R)-подобное ядро, изначально разработанное Линусом Торвальдсом, а сейчас развиваемое множеством программистов по всему миру. От своих скромных начал до сегодняшнего дня, при широкой поддержке таких компаний, как IBM или Google, Linux(R) ассоциируется с быстрым темпом разработки, полной поддержкой оборудования и моделью организации по принципу "доброжелательного диктатора". Разработка Linux(R) началась в 1991 году как любительский проект в Университете Хельсинки, Финляндия. С тех пор она приобрела все черты современной ОС, подобной UNIX(R): многопроцессорность, поддержка многопользовательского режима, виртуальная память, сетевое взаимодействие — в общем, всё необходимое. Также присутствуют высокоуровневые функции, такие как виртуализация и т. д. В 2006 году Linux(R), похоже, был наиболее широко используемой открытой операционной системой с поддержкой независимых поставщиков программного обеспечения, таких как Oracle, RealNetworks, Adobe и других. Большая часть коммерческого программного обеспечения, распространяемого для Linux(R), доступна только в бинарном виде, поэтому перекомпиляция для других операционных систем невозможна. Большая часть разработки Linux(R) происходит в системе контроля версий Git. Git — это распределённая система, поэтому нет централизованного источника кода Linux(R), но некоторые ветви считаются основными и официальными. Схема нумерации версий, используемая в Linux(R), состоит из четырёх чисел: A.B.C.D. В настоящее время разработка ведётся в ветке 2.6.C.D, где C обозначает мажорную версию, в которую добавляются или изменяются функции, а D — минорную версию, предназначенную только для исправления ошибок. Дополнительную информацию можно получить из [3]. [[linux-tech-details]] ==== Технические детали Linux(R) следует традиционной схеме UNIX(R), разделяя выполнение процесса на две части: ядро и пользовательское пространство. Ядро может быть вызвано двумя способами: через ловушку (trap) или через системный вызов. Возврат осуществляется только одним способом. Далее описание относится к Linux(R) 2.6 на архитектуре i386(TM). Эта информация взята из [2]. [[linux-syscalls]] ===== Системные вызовы Системные вызовы в Linux(R) выполняются (в пользовательском пространстве) с использованием макросов `syscallX`, где X заменяется числом, представляющим количество параметров данного системного вызова. Этот макрос преобразуется в код, который загружает регистр `%eax` номером системного вызова и выполняет прерывание `0x80`. После этого вызывается возврат из системного вызова, который преобразует отрицательные значения возврата в положительные значения `errno` и устанавливает `res` в `-1` в случае ошибки. При вызове прерывания `0x80` процесс переходит в ядро в обработчик ловушки системного вызова. Эта процедура сохраняет все регистры в стеке и вызывает выбранную точку входа системного вызова. Обратите внимание, что соглашение о вызовах Linux(R) предполагает передачу параметров системного вызова через регистры, как показано здесь: . параметр -> `%ebx` . параметр -> `%ecx` . параметр -> `%edx` . параметр -> `%esi` . параметр -> `%edi` . параметр -> `%ebp` Существуют некоторые исключения из этого правила, где Linux(R) использует другие соглашения о вызовах (наиболее примечателен системный вызов `clone`). [[linux-traps]] ===== Ловушки (trap) Обработчики ловушек представлены в файле [.filename]#arch/i386/kernel/traps.c#, а большинство этих обработчиков находятся в [.filename]#arch/i386/kernel/entry.S#, где происходит обработка ловушек. [[linux-exits]] ===== Выходы Возврат из системного вызова обрабатывается функцией `syscall man:exit[3]`, которая проверяет, есть ли у процесса незавершённые задачи, затем проверяет, использовались ли селекторы, предоставленные пользователем. Если это произошло, применяется исправление стека, и, наконец, регистры восстанавливаются из стека, а процесс возвращается в пользовательское пространство. [[linux-unix-primitives]] ===== Примитивы UNIX(R) В версии 2.6 операционная система Linux(R) переопределила некоторые традиционные примитивы UNIX(R), в частности PID, TID и поток. PID определяется не как уникальный для каждого процесса, поэтому для некоторых процессов (потоков) man:getppid[2] возвращает одинаковое значение. Уникальная идентификация процесса обеспечивается TID. Это связано с тем, что _NPTL_ (New POSIX(R) Thread Library) определяет потоки как обычные процессы (так называемая модель 1:1). Создание нового процесса в Linux(R) 2.6 происходит с использованием системного вызова `clone` (варианты fork перереализованы с его использованием). Этот системный вызов clone определяет набор флагов, которые влияют на поведение процесса клонирования в отношении реализации потоков. Семантика немного размыта, так как нет единого флага, указывающего системному вызову создать поток. Реализованные флаги клонирования: * `CLONE_VM` - процессы разделяют общее адресное пространство * `CLONE_FS` — совместно использовать umask, текущий рабочий каталог и пространство имён * `CLONE_FILES` - совместно использовать открытые файлы * `CLONE_SIGHAND` - разделять обработчики сигналов и заблокированные сигналы * `CLONE_PARENT` - использовать один процесс к качестве родительского * `CLONE_THREAD` — быть потоком (дальнейшие пояснения ниже) * `CLONE_NEWNS` - новое пространство имен * `CLONE_SYSVSEM` - совместное использование структур отмены SysV * `CLONE_SETTLS` - настройка TLS по указанному адресу * `CLONE_PARENT_SETTID` - установить TID в родителе * `CLONE_CHILD_CLEARTID` - очистить TID в дочернем процессе * `CLONE_CHILD_SETTID` - установить TID в дочернем процессе `CLONE_PARENT` устанавливает реального родителя в родителя вызывающего процесса. Это полезно для потоков, потому что если поток A создаёт поток B, мы хотим, чтобы поток B был привязан к родителю всей группы потоков. `CLONE_THREAD` делает то же самое, что `CLONE_PARENT`, `CLONE_VM` и `CLONE_SIGHAND`, перезаписывает PID, чтобы он совпадал с PID вызывающего процесса, устанавливает сигнал завершения в "нет" и входит в группу потоков. `CLONE_SETTLS` настраивает записи GDT для обработки TLS. Набор флагов `CLONE_*_*TID` устанавливает/сбрасывает предоставленный пользователем адрес в TID или 0. Как видно, `CLONE_THREAD` выполняет большую часть работы и не очень хорошо вписывается в схему. Первоначальный замысел неясен (даже для авторов, согласно комментариям в коде), но я думаю, изначально был один флаг для потоков, который затем был разделён на множество других флагов, но это разделение так и не было завершено. Также непонятно, для чего нужно это разделение, так как glibc не использует его, и только ручное использование clone позволяет программисту получить доступ к этим возможностям. Для непоточных программ PID и TID совпадают. Для поточных программ первый поток имеет одинаковые PID и TID, а каждый созданный поток разделяет тот же PID и получает уникальный TID (поскольку передаётся `CLONE_THREAD`), также родительский процесс общий для всех процессов, образующих эту поточную программу. Код, реализующий man:pthread_create[3] в NPTL, определяет флаги clone следующим образом: [.programlisting] .... int clone_flags = (CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGNAL | CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID | CLONE_SYSVSEM #if __ASSUME_NO_CLONE_DETACHED == 0 | CLONE_DETACHED #endif | 0); .... `CLONE_SIGNAL` определен как [.programlisting] .... #define CLONE_SIGNAL (CLONE_SIGHAND | CLONE_THREAD) .... последний 0 означает, что сигнал не отправляется при завершении любого из потоков. [[what-is-emu]] === Что такое эмуляция Согласно словарному определению, эмуляция — это способность программы или устройства имитировать другую программу или устройство. Это достигается за счёт предоставления той же реакции на заданный стимул, что и у эмулируемого объекта. На практике в мире программного обеспечения в основном встречаются три типа эмуляции — программа, используемая для эмуляции машины (QEMU, различные эмуляторы игровых консолей и т.д.), программная эмуляция аппаратного обеспечения (эмуляторы OpenGL, эмуляция блоков плавающей запятой и т.д.) и эмуляция операционной системы (либо в ядре операционной системы, либо в виде программы пользовательского пространства). Эмуляция обычно используется в тех случаях, когда применение оригинального компонента невозможно или нецелесообразно. Например, может возникнуть необходимость использовать программу, разработанную для другой операционной системы. В такой ситуации на помощь приходит эмуляция. Иногда эмуляция — единственный возможный вариант, например, когда необходимое аппаратное устройство ещё не существует или уже не выпускается. Такое часто происходит при переносе операционной системы на новую (ещё не существующую) платформу. Иногда эмуляция просто экономически выгоднее. С точки зрения реализации, существует два основных подхода к эмуляции. Вы можете либо эмулировать всё целиком — принимать возможные входные данные исходного объекта, поддерживать внутреннее состояние и выдавать корректные выходные данные на основе состояния и/или входных данных. Такой вид эмуляции не требует каких-либо специальных условий и, в принципе, может быть реализован где угодно для любого устройства/программы. Недостаток в том, что реализация такой эмуляции довольно сложна, трудоёмка и подвержена ошибкам. В некоторых случаях можно использовать более простой подход. Представьте, что вы хотите эмулировать принтер, печатающий слева направо, на принтере, который печатает справа налево. Очевидно, что нет необходимости в сложном слое эмуляции — достаточно просто перевернуть печатаемый текст. Иногда эмулирующая среда очень похожа на эмулируемую, и тогда достаточно тонкого слоя преобразования для обеспечения полностью рабочей эмуляции! Как видите, такой подход гораздо менее требователен к реализации, а значит, менее трудоёмок и подвержен ошибкам, чем предыдущий. Однако необходимое условие — две среды должны быть достаточно схожи. Третий подход сочетает в себе два предыдущих. Чаще всего объекты не предоставляют одинаковые возможности, поэтому в случае эмуляции более мощного объекта на менее мощном приходится эмулировать отсутствующие функции с помощью полной эмуляции, описанной выше. Эта магистерская диссертация посвящена эмуляции UNIX(R) на UNIX(R), что является именно тем случаем, когда достаточно тонкого слоя трансляции для обеспечения полной эмуляции. API UNIX(R) состоит из набора системных вызовов, которые обычно самодостаточны и не влияют на глобальное состояние ядра. Существует несколько системных вызовов, которые влияют на внутреннее состояние, но это можно решить, предоставив некоторые структуры, поддерживающие дополнительное состояние. Эмуляция не бывает идеальной, и в эмуляторах часто чего-то не хватает, но обычно это не вызывает серьёзных проблем. Представьте эмулятор игровой приставки, который эмулирует всё, кроме звука. Без сомнения, игры остаются играбельными, и эмулятором можно пользоваться. Возможно, это не так комфортно, как оригинальная приставка, но это приемлемый компромисс между ценой и удобством. То же самое касается UNIX(R) API. Большинство программ могут работать с очень ограниченным набором системных вызовов. Эти вызовы, как правило, являются самыми старыми (man:read[2]/man:write[2], семейство man:fork[2], обработка man:signal[3], man:exit[3], API man:socket[2]), поэтому их легко эмулировать, поскольку их семантика одинакова во всех современных UNIX(R)-подобных системах. [[freebsd-emulation]] == Эмуляция === Как работает эмуляция в FreeBSD Как упоминалось ранее, FreeBSD поддерживает выполнение бинарных файлов из нескольких других UNIX(R)-подобных систем. Это возможно благодаря наличию в FreeBSD абстракции, называемой загрузчик классов исполнения. Он интегрируется в системный вызов man:execve[2], поэтому когда man:execve[2] собирается выполнить бинарный файл, он анализирует его тип. В FreeBSD существуют два основных типа исполняемых файлов. Текстовые скрипты, подобные shell-скриптам, которые идентифицируются по первым двум символам `#!`, и обычные (как правило, _ELF_) бинарные файлы, представляющие собой скомпилированные исполняемые объекты. Подавляющее большинство (можно сказать, все) исполняемых файлов в FreeBSD относятся к типу ELF. Файлы ELF содержат заголовок, который определяет ABI операционной системы для данного ELF-файла. Считывая эту информацию, операционная система может точно определить, к какому типу относится данный исполняемый файл. Каждый ABI ОС должен быть зарегистрирован в ядре FreeBSD. Это относится и к родному ABI ОС FreeBSD. Таким образом, когда man:execve[2] выполняет двоичный файл, он перебирает список зарегистрированных API, и когда находит подходящий, начинает использовать информацию, содержащуюся в описании ABI ОС (его таблицу системных вызовов, таблицу преобразования `errno` и т.д.). Таким образом, каждый раз, когда процесс вызывает системный вызов, он использует свой собственный набор системных вызовов вместо какого-либо глобального. Это обеспечивает очень элегантный и простой способ поддержки выполнения различных двоичных форматов. Природа эмуляции различных ОС (а также некоторых других подсистем) привела разработчиков к внедрению механизма обработчиков событий. В ядре существует множество мест, где вызывается список обработчиков событий. Каждая подсистема может зарегистрировать обработчик событий, и они вызываются соответствующим образом. Например, при завершении процесса вызывается обработчик, который может выполнить необходимую очистку для подсистемы. Те простые средства предоставляют практически всё необходимое для инфраструктуры эмуляции, и, по сути, это единственное, что требуется для реализации слоя эмуляции Linux(R). [[freebsd-common-primitives]] === Общие примитивы в ядре FreeBSD Для работы слоев эмуляции требуется некоторая поддержка со стороны операционной системы. Я расскажу о некоторых поддерживаемых примитивах в операционной системе FreeBSD. [[freebsd-locking-primitives]] ==== Примитивы синхронизации Добавил: `{attilio}` Примитивы синхронизации FreeBSD основаны на идее предоставления достаточно большого количества различных примитивов таким образом, чтобы для каждой конкретной подходящей ситуации можно было использовать наилучший. На высоком уровне можно выделить три вида примитивов синхронизации в ядре FreeBSD: * атомарные операции и барьеры памяти * блокировки * барьеры планирования Ниже приведены описания для 3 семейств. Для каждой блокировки рекомендуется ознакомиться с соответствующей справочной страницей (где это возможно), чтобы получить более подробные объяснения. [[freebsd-atomic-op]] ===== Атомарные операции и барьеры памяти -Атомарные операции реализуются через набор функций, выполняющих простые арифметические действия над операндами в памяти атомарным образом по отношению к внешним событиям (прерываниям, вытеснению и т. д.). Атомарные операции могут гарантировать атомарность только для небольших типов данных (порядка величины типа `.long` в архитектуре C), поэтому их следует редко использовать напрямую в конечном коде, разве что для очень простых операций (например, установки флага в битовой карте). На самом деле довольно просто и часто можно допустить семантическую ошибку, полагаясь только на атомарные операции (обычно называемые lock-less). Ядро FreeBSD предоставляет способ выполнения атомарных операций в сочетании с барьерами памяти. Барьеры памяти гарантируют, что атомарная операция произойдет в определенном порядке относительно других обращений к памяти. Например, если нам нужно, чтобы атомарная операция выполнилась только после завершения всех ожидающих операций записи (с точки зрения переупорядочивания буферов инструкций), нам необходимо явно использовать барьер памяти вместе с этой атомарной операцией. Таким образом, легко понять, почему барьеры памяти играют ключевую роль в построении высокоуровневых блокировок (таких как refcounts, мьютексы и т. д.). Для подробного объяснения атомарных операций обратитесь к man:atomic[9]. Однако важно отметить, что атомарные операции (и барьеры памяти тоже) в идеале должны использоваться только для построения фронтенд-блокировок (например, мьютексов). +Атомарные операции реализуются через набор функций, выполняющих простые арифметические действия над операндами в памяти атомарным образом по отношению к внешним событиям (прерываниям, вытеснению и т. д.). Атомарные операции могут гарантировать атомарность только для небольших типов данных (порядка величины типа `.long` в архитектуре C), поэтому их следует редко использовать напрямую в конечном коде, разве что для очень простых операций (например, установки флага в битовой карте). На самом деле довольно просто и часто можно допустить семантическую ошибку, полагаясь только на атомарные операции (обычно называемые lock-less). Ядро FreeBSD предоставляет способ выполнения атомарных операций в сочетании с барьерами памяти. Барьеры памяти гарантируют, что атомарная операция произойдет в определённом порядке относительно других обращений к памяти. Например, если нам нужно, чтобы атомарная операция выполнилась только после завершения всех ожидающих операций записи (с точки зрения переупорядочивания буферов инструкций), нам необходимо явно использовать барьер памяти вместе с этой атомарной операцией. Таким образом, легко понять, почему барьеры памяти играют ключевую роль в построении высокоуровневых блокировок (таких как refcounts, мьютексы и т. д.). Для подробного объяснения атомарных операций обратитесь к man:atomic[9]. Однако важно отметить, что атомарные операции (и барьеры памяти тоже) в идеале должны использоваться только для построения фронтенд-блокировок (например, мьютексов). [[freebsd-refcounts]] ===== Счетчики ссылок (refcount) Счетчики ссылок (refcounts) — это интерфейсы для работы с подсчетом ссылок. Они реализованы с использованием атомарных операций и предназначены для случаев, когда счетчик ссылок — это единственное, что требует защиты, поэтому даже такие механизмы, как спин-мьютекс, не рекомендуются. Использование интерфейса refcount для структур, где уже применяется мьютекс, часто является ошибкой, так как, вероятно, следует защитить счетчик ссылок в рамках уже существующих защищенных участков кода. В настоящее время man-страница, посвященная refcount, отсутствует; для обзора существующего API обратитесь к [.filename]#sys/refcount.h#. [[freebsd-locks]] ===== Блокировки Ядро FreeBSD имеет множество классов блокировок. Каждая блокировка определяется некоторыми уникальными свойствами, но, вероятно, наиболее важным является событие, связанное с конкурирующими владельцами (или, другими словами, поведение потоков, неспособных захватить блокировку). Схема блокировок FreeBSD предлагает три различных поведения для конкурирующих потоков: . вращающиеся . блокирующие . спящие [NOTE] ==== номера приведены не случайно ==== [[freebsd-spinlocks]] ===== Вращающиеся блокировки Спин-блокировки позволяют ожидающим потокам продолжать работу (вращаться), пока они не смогут захватить блокировку. Важным аспектом является ситуация, когда поток соревнуется за спин-блокировку и не вытесняется. Поскольку ядро FreeBSD является вытесняющим, это подвергает спин-блокировки риску взаимоблокировок, которые можно устранить только отключением прерываний на время их удержания. По этой и другим причинам (таким как отсутствие поддержки распространения приоритетов, неэффективность схем балансировки нагрузки между CPU и т.д.), спин-блокировки предназначены для защиты очень небольших участков кода или, в идеале, не должны использоваться вовсе, если это не требуется явно (об этом далее). [[freebsd-blocking]] ===== Блокирующие Блокирующие блокировки позволяют ожидающим потокам быть выгруженными и заблокированными до тех пор, пока владелец блокировки не освободит её и не разбудит один или несколько конкурентов. Чтобы избежать проблем с голоданием, блокирующие блокировки передают приоритет от ожидающих к владельцу. Блокирующие блокировки должны быть реализованы через интерфейс турникета и предназначены для наиболее частого использования в ядре, если нет особых условий. [[freebsd-sleeping]] ===== Спящие Спящие блокировки (с ожиданием) позволяют ожидающим потокам быть вытесненными и заснуть до тех пор, пока держатель блокировки не освободит её и не разбудит один или несколько ожидающих. Поскольку блокировки с ожиданием предназначены для защиты больших участков кода и обработки асинхронных событий, они не поддерживают распространение приоритетов. Они должны быть реализованы через интерфейс man:sleepqueue[9]. Порядок захвата блокировок очень важен, не только из-за возможности взаимоблокировки при обратном порядке захвата, но и потому, что захват блокировок должен следовать определённым правилам, связанным с их природой. Если взглянуть на таблицу выше, практическое правило заключается в том, что если поток удерживает блокировку уровня n (где уровень — это число, указанное рядом с типом блокировки), ему запрещено захватывать блокировки более высоких уровней, так как это нарушит заданную семантику пути. Например, если поток удерживает блокирующую блокировку (уровень 2), ему разрешено захватывать спин-блокировку (уровень 1), но не спящую блокировку (уровень 3), поскольку блокирующие блокировки предназначены для защиты более коротких путей, чем спящие блокировки (однако эти правила не касаются атомарных операций или барьеров планирования). Вот список блокировок с соответствующими типами поведения: * spin mutex – вращающийся режим – man:mutex[9] * sleep mutex – блокирующий режим – man:mutex[9] * pool mutex – блокирующий режим – man:mtx[pool] * Семейство функций sleep – спящий режим – man:sleep[9] pause tsleep msleep msleep_spin msleep_rw msleep_sx * condvar – спящий режим – man:condvar[9] * rwlock – блокирующий режим – man:rwlock[9] * sxlock – спящий режим – man:sx[9] * lockmgr – спящий режим – man:lockmgr[9] * семафоры – спящий режим – man:sema[9] Среди этих блокировок только мьютексы, sxlock, rwlock и lockmgr предназначены для обработки рекурсии, но в настоящее время рекурсия поддерживается только мьютексами и lockmgr. [[freebsd-scheduling]] ===== Барьеры планирования -Барьеры планирования предназначены для управления планированием потоков. Они в основном состоят из трех различных заглушек: +Барьеры планирования предназначены для управления планированием потоков. Они в основном состоят из трёх различных заглушек: * критические секции (и вытеснение) * sched_bind * sched_pin Как правило, их следует использовать только в определённом контексте, и даже если они часто могут заменять блокировки, их следует избегать, поскольку они не позволяют диагностировать простые потенциальные проблемы с помощью инструментов отладки блокировок (например, man:witness[4]). [[freebsd-critical]] ===== Критические секции В ядре FreeBSD была реализована вытесняющая многозадачность в основном для работы с потоками обработки прерываний. Фактически, чтобы избежать высокой задержки прерываний, потоки с приоритетом разделения времени могут быть вытеснены потоками обработки прерываний (таким образом, им не нужно ждать планирования, как это предусмотрено в обычном случае). Однако вытеснение также вводит новые точки гонки, которые необходимо обрабатывать. Часто для борьбы с вытеснением проще всего полностью отключить его. Критическая секция определяет участок кода (ограниченный парой функций man:critical_enter[9] и man:critical_exit[9]), где гарантируется отсутствие вытеснения (пока защищённый код не будет полностью выполнен). Это часто может эффективно заменить блокировку, но должно использоваться осторожно, чтобы не потерять все преимущества, которые даёт вытеснение. [[freebsd-schedpin]] ===== sched_pin/sched_unpin -Еще один способ работы с вытеснением — это интерфейс `sched_pin()`. Если участок кода заключен между функциями `sched_pin()` и `sched_unpin()`, гарантируется, что соответствующий поток, даже если он может быть вытеснен, всегда будет выполняться на том же CPU. Закрепление очень эффективно в частном случае, когда нам необходимо обращаться к данным, привязанным к определенным CPU, и мы предполагаем, что другие потоки не изменят эти данные. Последнее условие делает критическую секцию избыточно строгим условием для нашего кода. +Еще один способ работы с вытеснением — это интерфейс `sched_pin()`. Если участок кода заключен между функциями `sched_pin()` и `sched_unpin()`, гарантируется, что соответствующий поток, даже если он может быть вытеснен, всегда будет выполняться на том же CPU. Закрепление очень эффективно в частном случае, когда нам необходимо обращаться к данным, привязанным к определённым CPU, и мы предполагаем, что другие потоки не изменят эти данные. Последнее условие делает критическую секцию избыточно строгим условием для нашего кода. [[freebsd-schedbind]] ===== sched_bind/sched_unbind `sched_bind` — это API, используемый для привязки потока к определённому CPU на всё время выполнения кода, пока вызов функции `sched_unbind` не отменит эту привязку. Эта функция играет ключевую роль в ситуациях, когда нельзя доверять текущему состоянию CPU (например, на самых ранних этапах загрузки), так как требуется избежать миграции потока на неактивные CPU. Поскольку `sched_bind` и `sched_unbind` работают с внутренними структурами планировщика, их использование должно быть заключено в захват/освобождение `sched_lock`. [[freebsd-proc]] ==== Структура proc Различные уровни эмуляции иногда требуют дополнительных данных для каждого процесса. Можно управлять отдельными структурами (списком, деревом и т.д.), содержащими эти данные для каждого процесса, но это может быть медленно и потреблять много памяти. Чтобы решить эту проблему, структура `proc` в FreeBSD содержит `p_emuldata` — указатель типа void на данные, специфичные для уровня эмуляции. Эта запись `proc` защищена мьютексом proc. Структура `proc` в FreeBSD содержит элемент `p_sysent`, который идентифицирует, под какой ABI работает данный процесс. Фактически, это указатель на упомянутый выше `sysentvec`. Таким образом, сравнивая этот указатель с адресом, по которому хранится структура `sysentvec` для данной ABI, мы можем эффективно определить, принадлежит ли процесс нашему эмуляционному слою. Код обычно выглядит следующим образом: [.programlisting] .... if (__predict_true(p->p_sysent != &elf_Linux(R)_sysvec)) return; .... Как видите, мы эффективно используем модификатор `__predict_true`, чтобы свести наиболее распространённый случай (процесс FreeBSD) к простой операции возврата, сохраняя высокую производительность. Этот код следует преобразовать в макрос, поскольку в настоящее время он не очень гибкий, например, мы не поддерживаем эмуляцию Linux(R)64, а также процессы Linux(R) в формате A.OUT на архитектуре i386. [[freebsd-vfs]] ==== VFS Подсистема VFS в FreeBSD очень сложна, но слой эмуляции Linux(R) использует лишь небольшую её часть через чётко определённый API. Она может работать как с vnode, так и с файловыми дескрипторами. Vnode представляет собой виртуальный vnode, то есть представление узла в VFS. Другое представление — это файловый дескриптор, который представляет открытый файл с точки зрения процесса. Файловый дескриптор может представлять сокет или обычный файл. Файловый дескриптор содержит указатель на свой vnode. Более одного файлового дескриптора могут указывать на один и тот же vnode. [[freebsd-namei]] ===== namei Функция man:namei[9] является центральной точкой входа для поиска и преобразования путей. Она проходит по пути шаг за шагом от начальной до конечной точки, используя функцию поиска, которая является внутренней для VFS. Системный вызов man:namei[9] может обрабатывать символьные ссылки, абсолютные и относительные пути. Когда путь ищется с помощью man:namei[9], он заносится в кэш имён. Это поведение можно отключить. Данная функция используется повсеместно в ядре, и её производительность крайне важна. [[freebsd-vn]] ===== vn_fullpath Функция man:vn_fullpath[9] предпринимает максимальные усилия для обхода кэша имён VFS и возвращает путь для заданного (заблокированного) vnode. Этот процесс ненадёжен, но в большинстве типичных случаев работает корректно. Ненадёжность обусловлена тем, что функция опирается на кэш VFS (она не обходит структуры на носителе), не работает с жёсткими ссылками и т.д. Данная процедура используется в нескольких местах Linuxulator. [[freebsd-vnode]] ===== Операции с vnode * `fgetvp` - по заданным потоку и номеру файлового дескриптора возвращает связанный vnode * man:vn_lock[9] - блокирует vnode * `vn_unlock` - разблокирует vnode * man:VOP_READDIR[9] - читает каталог, на который ссылается vnode * man:VOP_GETATTR[9] - получает атрибуты файла или каталога, на который ссылается vnode * man:VOP_LOOKUP[9] - выполняет поиск пути к заданному каталогу * man:VOP_OPEN[9] - открывает файл, на который ссылается vnode * man:VOP_CLOSE[9] - закрывает файл, на который ссылается vnode * man:vput[9] - уменьшает счетчик использования для vnode и разблокирует его * man:vrele[9] - уменьшает счетчик использования для vnode * man:vref[9] - увеличивает счетчик использования для vnode [[freebsd-file-handler]] ===== Операции обработчика файлов (handler) * `fget` - для заданного потока и номера файлового дескриптора возвращает связанный обработчик файла и делает на него ссылку * `fdrop` - освобождает ссылку на обработчик файлов * `fhold` - ссылается на обработчик файла [[md]] == Слой эмуляции Linux(R) - машинозависимая часть В этом разделе рассматривается реализация слоя эмуляции Linux(R) в операционной системе FreeBSD. Сначала описывается машинозависимая часть, рассказывающая о том, как и где реализовано взаимодействие между пользовательским пространством и ядром. Рассматриваются системные вызовы, сигналы, ptrace, ловушки и исправление стека. Эта часть посвящена архитектуре i386, но написана в общем виде, поэтому другие архитектуры не должны сильно отличаться. Следующая часть — машинонезависимая часть Linuxulator. Этот раздел охватывает только i386 и обработку ELF. A.OUT устарел и не поддерживается. [[syscall-handling]] === Обработка системных вызовов Обработка системных вызовов в основном реализована в файле [.filename]#linux_sysvec.c#, который покрывает большинство процедур, указанных в структуре `sysentvec`. Когда процесс Linux(R), выполняющийся на FreeBSD, делает системный вызов, общая процедура обработки системных вызовов вызывает linux prepsyscall для ABI Linux(R). [[linux-prepsyscall]] ==== Linux(R) prepsyscall Linux(R) передаёт аргументы системных вызовов через регистры (поэтому на i386 ограничено 6 параметрами), тогда как FreeBSD использует стек. Подпрограмма Linux(R) `prepsyscall` должна копировать параметры из регистров в стек. Порядок регистров следующий: `%ebx`, `%ecx`, `%edx`, `%esi`, `%edi`, `%ebp`. Однако это верно только для _большинства_ системных вызовов. Некоторые (особенно `clone`) используют другой порядок, но это, к счастью, легко исправить, добавив фиктивный параметр в прототип `linux_clone`. [[syscall-writing]] ==== Как писать системные вызовы Каждый системный вызов, реализованный в Linuxulator, должен иметь свой прототип с различными флагами в [.filename]#syscalls.master#. Формат файла следующий: [.programlisting] .... ... AUE_FORK STD { int linux_fork(void); } ... AUE_CLOSE NOPROTO { int close(int fd); } ... .... Первый столбец представляет номер системного вызова. Второй столбец предназначен для поддержки аудита. Третий столбец обозначает тип системного вызова. Он может быть `STD`, `OBSOL`, `NOPROTO` или `UNIMPL`. `STD` — это стандартный системный вызов с полным прототипом и реализацией. `OBSOL` означает устаревший вызов и определяет только прототип. `NOPROTO` означает, что системный вызов реализован в другом месте, поэтому не требует добавления префикса ABI и т.д. `UNIMPL` означает, что системный вызов будет заменён на `nosys` (системный вызов, который просто выводит сообщение о том, что вызов не реализован, и возвращает `ENOSYS`). -Из файла [.filename]#syscalls.master# скрипт генерирует три файла: [.filename]#linux_syscall.h#, [.filename]#linux_proto.h# и [.filename]#linux_sysent.c#. Файл [.filename]#linux_syscall.h# содержит определения имен системных вызовов и их числовых значений, например: +Из файла [.filename]#syscalls.master# скрипт генерирует три файла: [.filename]#linux_syscall.h#, [.filename]#linux_proto.h# и [.filename]#linux_sysent.c#. Файл [.filename]#linux_syscall.h# содержит определения имён системных вызовов и их числовых значений, например: [.programlisting] .... ... #define LINUX_SYS_linux_fork 2 ... #define LINUX_SYS_close 6 ... .... [.filename]#linux_proto.h# содержит определения структур аргументов для каждого системного вызова, например: [.programlisting] .... struct linux_fork_args { register_t dummy; }; .... И, наконец, [.filename]#linux_sysent.c# содержит структуру, описывающую таблицу системных вызовов, используемую для фактической диспетчеризации системного вызова, например: [.programlisting] .... { 0, (sy_call_t *)linux_fork, AUE_FORK, NULL, 0, 0 }, /* 2 = linux_fork */ { AS(close_args), (sy_call_t *)close, AUE_CLOSE, NULL, 0, 0 }, /* 6 = close */ .... Как видно, `linux_fork` реализован в самом Linuxulator, поэтому определение имеет тип `STD` и не имеет аргументов, что демонстрируется структурой-заглушкой. С другой стороны, `close` — это просто псевдоним для настоящего FreeBSD man:close[2], поэтому у него нет связанной структуры аргументов Linux, и в системной таблице вызовов он не имеет префикса linux, так как вызывает настоящий man:close[2] в ядре. [[dummy-syscalls]] ==== Нереализованные системные вызовы Слой эмуляции Linux(R) не является полным, так как некоторые системные вызовы реализованы неправильно, а некоторые не реализованы вовсе. В слое эмуляции используется механизм для пометки нереализованных системных вызовов с помощью макроса `DUMMY`. Эти заглушки находятся в файле [.filename]#linux_dummy.c# в форме `DUMMY(syscall);`, которые затем преобразуются в различные вспомогательные файлы системных вызовов, а их реализация сводится к выводу сообщения о том, что данный системный вызов не реализован. Прототип `UNIMPL` не используется, потому что мы хотим иметь возможность идентифицировать имя вызванного системного вызова, чтобы понимать, какие системные вызовы более важны для реализации. [[signal-handling]] === Обработка сигналов Обработка сигналов обычно выполняется в ядре FreeBSD для всех вариантов бинарной совместимости с помощью вызова уровня, зависящего от совместимости. Слой совместимости Linux(R) определяет для этой цели процедуру `linux_sendsig`. [[linux-sendsig]] ==== Linux(R) sendsig Эта процедура сначала проверяет, установлен ли сигнал с флагом `SA_SIGINFO`, в таком случае она вызывает процедуру `linux_rt_sendsig` вместо текущей. Далее она выделяет (или повторно использует уже существующий) контекст обработчика сигнала, затем формирует список аргументов для обработчика сигнала. Она преобразует номер сигнала на основе таблицы преобразования сигналов, назначает обработчик, преобразует sigset. Затем она сохраняет контекст для процедуры `sigreturn` (различные регистры, преобразованный номер trap и маску сигналов). Наконец, она копирует контекст сигнала в пользовательское пространство и подготавливает контекст для фактического выполнения обработчика сигнала. [[linux-rt-sendsig]] ==== linux_rt_sendsig Эта процедура аналогична `linux_sendsig`, только подготовка контекста сигнала отличается. Она добавляет `siginfo`, `ucontext` и некоторые части POSIX(R). Стоит рассмотреть возможность объединения этих двух функций с выгодой в виде меньшего дублирования кода и, возможно, даже более быстрого выполнения. [[linux-sigreturn]] ==== linux_sigreturn Этот системный вызов используется для возврата из обработчика сигнала. Он выполняет некоторые проверки безопасности и восстанавливает исходный контекст процесса. Также он разблокирует сигнал в маске сигналов процесса. [[ptrace]] === Ptrace Многие производные UNIX(R) реализуют системный вызов man:ptrace[2] для обеспечения различных функций отслеживания и отладки. Этот механизм позволяет трассирующему процессу получать различную информацию о трассируемом процессе, такую как дампы регистров, любую память из адресного пространства процесса и т.д., а также трассировать процесс, например, пошагово выполнять инструкции или между системными вызовами (сисколлами и ловушками). man:ptrace[2] также позволяет устанавливать различную информацию в трассируемом процессе (регистры и т.д.). man:ptrace[2] является стандартом для UNIX(R), реализованным в большинстве UNIX(R)-систем по всему миру. Эмуляция Linux(R) в FreeBSD реализует механизм man:ptrace[2] в файле [.filename]#linux_ptrace.c#. Функции для преобразования регистров между Linux(R) и FreeBSD и фактический системный вызов эмуляции man:ptrace[2]. Системный вызов представляет собой длинный блок switch, который реализует свой аналог в FreeBSD для каждой команды man:ptrace[2]. Команды man:ptrace[2] в основном одинаковы между Linux(R) и FreeBSD, поэтому обычно требуется лишь небольшая модификация. Например, `PT_GETREGS` в Linux(R) работает с непосредственными данными, в то время как FreeBSD использует указатель на данные, поэтому после выполнения (нативного) системного вызова man:ptrace[2] необходимо выполнить copyout для сохранения семантики Linux(R). Реализация man:ptrace[2] в Linuxulator имеет известные недостатки. Наблюдались паники при использовании `strace` (который является потребителем man:ptrace[2]) в среде Linuxulator. Также `PT_SYSCALL` не реализован. [[traps]] === Ловушки (trap) Всякий раз, когда процесс Linux(R), выполняющийся в слое эмуляции, вызывает прерывание (trap), само прерывание обрабатывается прозрачно, за исключением преобразования прерывания. Linux(R) и FreeBSD расходятся во мнениях относительно того, что является прерыванием, поэтому этот вопрос решается здесь. Код на самом деле очень короткий: [.programlisting] .... static int translate_traps(int signal, int trap_code) { if (signal != SIGBUS) return signal; switch (trap_code) { case T_PROTFLT: case T_TSSFLT: case T_DOUBLEFLT: case T_PAGEFLT: return SIGSEGV; default: return signal; } } .... [[stack-fixup]] === Исправление стека Динамический редактор связей RTLD ожидает так называемые AUX-теги на стеке во время выполнения `execve`, поэтому необходимо выполнить исправление, чтобы это обеспечить. Конечно, каждая система RTLD отличается, поэтому уровень эмуляции должен предоставлять собственную процедуру исправления стека. Linuxulator делает именно это. Функция `elf_linux_fixup` просто копирует AUX-теги на стек и корректирует стек пользовательского процесса, чтобы он указывал сразу после этих тегов. Таким образом, RTLD работает умным способом. [[aout-support]] === Поддержка A.OUT Эмуляционный слой Linux(R) на i386 также поддерживает бинарные файлы Linux(R) в формате A.OUT. Почти всё, что описано в предыдущих разделах, должно быть реализовано для поддержки A.OUT (кроме перевода ловушек и отправки сигналов). Поддержка бинарных файлов A.OUT больше не поддерживается, в частности, эмуляция 2.6 с ними не работает, но это не вызывает никаких проблем, так как linux-base в портах, вероятно, вообще не поддерживает бинарные файлы A.OUT. Эта поддержка, скорее всего, будет удалена в будущем. Большая часть кода, необходимого для загрузки бинарных файлов Linux(R) A.OUT, находится в файле [.filename]#imgact_linux.c#. [[mi]] == Слой эмуляции Linux(R) - машинонезависимая часть В этом разделе рассматривается машинонезависимая часть Linuxulator. Он охватывает инфраструктуру эмуляции, необходимую для эмуляции Linux(R) 2.6, реализацию thread local storage (TLS) (на i386) и фьютексы. Затем мы кратко обсуждаем некоторые системные вызовы. [[nptl-desc]] === Описание NPTL Одним из основных направлений прогресса в разработке Linux(R) 2.6 стала поддержка потоков. До версии 2.6 поддержка потоков в Linux(R) реализовывалась в библиотеке linuxthreads. Эта библиотека представляла собой частичную реализацию потоков POSIX(R). Потоки создавались как отдельные процессы с использованием системного вызова `clone`, что позволяло им разделять адресное пространство (и другие ресурсы). Основными недостатками такого подхода были разные PID для каждого потока, некорректная обработка сигналов (с точки зрения pthreads) и т.д. Кроме того, производительность оставляла желать лучшего (использование сигналов `SIGUSR` для синхронизации потоков, потребление ресурсов ядра и т.п.), поэтому для решения этих проблем была разработана новая система потоков под названием NPTL. Библиотека NPTL была сосредоточена на двух вещах, но появилась третья, поэтому её обычно считают частью NPTL. Этими двумя вещами были встраивание потоков в структуру процесса и фьютекс. Дополнительной третьей вещью стал TLS, который не требуется напрямую NPTL, но вся пользовательская библиотека NPTL зависит от него. Эти улучшения привели к значительному росту производительности и соответствию стандартам. В настоящее время NPTL является стандартной библиотекой потоков в системах Linux(R). Реализация Linuxulator в FreeBSD подходит к NPTL в трёх основных направлениях: TLS, фьютекс и изменение PID, что предназначено для эмуляции потоков Linux(R). В следующих разделах описывается каждое из этих направлений. [[linux26-emu]] === Инфраструктура эмуляции Linux(R) 2.6 Эти разделы посвящены тому, как управляются потоки Linux(R) и как мы моделируем это в FreeBSD. [[linux26-runtime]] ==== Определение эмуляции 2.6 во время выполнения Слой эмуляции Linux(R) в FreeBSD поддерживает динамическую настройку эмулируемой версии. Это выполняется с помощью man:sysctl[8], а именно `compat.linux.osrelease`. Установка этого man:sysctl[8] влияет на поведение слоя эмуляции во время выполнения. При установке значения 2.6.x устанавливается переменная `linux_use_linux26`, а при установке другого значения она остаётся сброшенной. Эта переменная (а также аналогичные переменные для каждой клетки) определяет, используется ли в коде инфраструктура 2.6 (в основном, преобразование PID). Настройка версии применяется глобально для всей системы и влияет на все процессы Linux(R). Не следует изменять man:sysctl[8] во время выполнения любого бинарного файла Linux(R), так как это может привести к проблемам. [[linux-proc-thread]] ==== Идентификаторы процессов и потоков Linux(R) Семантика потоков в Linux(R) немного запутанная и использует совершенно другую терминологию по сравнению с FreeBSD. Процесс в Linux(R) состоит из `struct task`, включающей два поля идентификаторов — PID и TGID. PID — это _не_ идентификатор процесса, а идентификатор потока. TGID идентифицирует группу потоков, другими словами, процесс. Для однопоточного процесса PID равен TGID. Поток в NPTL — это обычный процесс, у которого TGID не равен PID и есть групповой лидер, отличный от него самого (и, конечно, общая виртуальная память и т.д.). Все остальное происходит так же, как и с обычным процессом. Нет разделения общего состояния на внешнюю структуру, как в FreeBSD. Это создает некоторое дублирование информации и возможную несогласованность данных. Ядро Linux(R), похоже, использует информацию о задаче -> группе в одних местах и информацию о задаче в других, что не очень последовательно и выглядит небезопасно с точки зрения возможных ошибок. -Каждый поток NPTL создается вызовом системного вызова `clone` с определенным набором флагов (подробнее в следующем подразделе). NPTL реализует строгую модель потоков 1:1. +Каждый поток NPTL создается вызовом системного вызова `clone` с определённым набором флагов (подробнее в следующем подразделе). NPTL реализует строгую модель потоков 1:1. В FreeBSD мы эмулируем потоки NPTL с помощью обычных процессов FreeBSD, которые разделяют виртуальную память и т.д., а гимнастика с PID просто имитируется в специфической для эмуляции структуре, прикреплённой к процессу. Структура, прикреплённая к процессу, выглядит следующим образом: [.programlisting] .... struct linux_emuldata { pid_t pid; int *child_set_tid; /* in clone(): Child.s TID to set on clone */ int *child_clear_tid;/* in clone(): Child.s TID to clear on exit */ struct linux_emuldata_shared *shared; int pdeath_signal; /* parent death signal */ LIST_ENTRY(linux_emuldata) threads; /* list of linux threads */ }; .... PID используется для идентификации процесса FreeBSD, к которому присоединена эта структура. `child_se_tid` и `child_clear_tid` используются для копирования адреса TID при завершении и создании процесса. Указатель `shared` указывает на структуру, разделяемую между потоками. Переменная `pdeath_signal` определяет сигнал завершения родительского процесса, а указатель `threads` используется для связывания этой структуры со списком потоков. Структура `linux_emuldata_shared` выглядит следующим образом: [.programlisting] .... struct linux_emuldata_shared { int refs; pid_t group_pid; LIST_HEAD(, linux_emuldata) threads; /* head of list of linux threads */ }; .... `refs` — это счётчик ссылок, используемый для определения момента, когда можно освободить структуру, чтобы избежать утечек памяти. `group_pid` служит для идентификации PID (= TGID) всего процесса (= группы потоков). Указатель `threads` является головой списка потоков в процессе. Структуру `linux_emuldata` можно получить из процесса с помощью `em_find`. Прототип функции выглядит следующим образом: [.programlisting] .... struct linux_emuldata *em_find(struct proc *, int locked); .... Здесь `proc` — это процесс, из которого мы хотим получить структуру `emuldata`, а параметр `locked` определяет, нужно ли блокировать. Допустимые значения — `EMUL_DOLOCK` и `EMUL_DOUNLOCK`. Подробнее о блокировке позже. [[pid-mangling]] ==== Преобразование PID Поскольку между FreeBSD и Linux(R) существуют различия в представлении идентификатора процесса (PID) и идентификатора потока (TID), нам необходимо преобразовывать эти понятия. Это достигается за счёт модификации PID. Это означает, что мы изменяем представление о PID (=TGID) и TID (=PID) между ядром и пользовательским пространством. Основное правило заключается в следующем: в ядре (в Linuxulator) `PID = PID`, а `TGID = shared -> group_pid`; для пользовательского пространства мы представляем `PID = shared -> group_pid` и `TID = proc -> p_pid`. Член `PID` в структуре `linux_emuldata` является FreeBSD PID. Вышесказанное в основном влияет на системные вызовы getpid, getppid, gettid. В случаях, где мы используем PID/TGID соответственно. При копировании TID в `child_clear_tid` и `child_set_tid` мы копируем FreeBSD PID. [[clone-syscall]] ==== Системный вызов clone `clone` — это системный вызов, с помощью которого создаются потоки в Linux(R). Прототип системного вызова выглядит следующим образом: [.programlisting] .... int linux_clone(l_int flags, void *stack, void *parent_tidptr, int dummy, void * child_tidptr); .... Параметр `flags` указывает системному вызову, как именно процессы должны быть клонированы. Как описано выше, Linux(R) может создавать процессы, разделяющие различные ресурсы независимо, например, два процесса могут разделять файловые дескрипторы, но не виртуальную память и т.д. Последний байт параметра `flags` является сигналом завершения для вновь созданного процесса. Параметр `stack`, если он не `NULL`, указывает, где находится стек потока, а если он `NULL`, предполагается копирование при записи стека вызывающего процесса (т.е. делать то же, что делает обычная функция man:fork[2]). Параметр `parent_tidptr` используется как адрес для копирования PID процесса (т.е. идентификатора потока) после того, как процесс достаточно инициализирован, но ещё не готов к выполнению. Параметр `dummy` присутствует из-за очень странного соглашения о вызовах этого системного вызова на i386. Он использует регистры напрямую и не позволяет компилятору делать это, что приводит к необходимости использования фиктивного системного вызова. Параметр `child_tidptr` используется как адрес для копирования PID после завершения ветвления процесса и при его завершении. Системный вызов продолжает выполнение, устанавливая соответствующие флаги в зависимости от переданных аргументов. Например, `CLONE_VM` преобразуется в RFMEM (общее адресное пространство) и т.д. Единственная тонкость здесь — это `CLONE_FS` и `CLONE_FILES`, поскольку FreeBSD не позволяет устанавливать их отдельно, поэтому мы эмулируем это, не устанавливая RFFDG (копирование таблицы файловых дескрипторов и другой информации о файловой системе), если задан любой из этих флагов. Это не вызывает проблем, так как эти флаги всегда устанавливаются вместе. После установки флагов процесс создаётся с помощью внутренней процедуры `fork1`, при этом процесс настраивается так, чтобы не помещаться в очередь выполнения (т.е. не становиться исполняемым). После завершения ветвления мы, при необходимости, изменяем родителя для нового процесса, чтобы эмулировать семантику `CLONE_PARENT`. Следующий шаг — создание данных эмуляции. Потоки в Linux(R) не отправляют сигналы своим родителям, поэтому мы устанавливаем сигнал завершения в 0, чтобы отключить эту возможность. Затем выполняется настройка `child_set_tid` и `child_clear_tid`, что активирует соответствующую функциональность далее в коде. На этом этапе мы копируем PID по адресу, указанному в `parent_tidptr`. Установка стека процесса выполняется простой перезаписью регистра `%esp` (`%rsp` на amd64) в кадре потока. Далее настраивается TLS для нового процесса. После этого может быть эмулирована семантика man:vfork[2], и, наконец, новый процесс помещается в очередь выполнения, а его PID возвращается родительскому процессу через возвращаемое значение `clone`. Системный вызов `clone` способен и фактически используется для эмуляции классических системных вызовов man:fork[2] и man:vfork[2]. Более новые версии glibc в случае ядра 2.6 используют `clone` для реализации системных вызовов man:fork[2] и man:vfork[2]. [[locking]] ==== Блокировка Блокировка реализована на уровне подсистем, поскольку не ожидается высокой конкуренции за эти ресурсы. Существует две блокировки: `emul_lock`, используемая для защиты манипуляций с `linux_emuldata`, и `emul_shared_lock`, используемая для манипуляций с `linux_emuldata_shared`. `emul_lock` представляет собой неспящий блокирующий мьютекс, в то время как `emul_shared_lock` — это спящий блокирующий `sx_lock`. Благодаря блокировке на уровне подсистем мы можем объединять некоторые блокировки, поэтому em_find предлагает доступ без блокировки. [[tls]] === TLS Этот раздел посвящён TLS, также известному как локальное хранилище потока. [[trheading-intro]] ==== Введение в многопоточность В компьютерных науках потоки (threads) — это сущности внутри процесса, которые могут планироваться независимо друг от друга. Потоки в процессе разделяют общие данные процесса (например, файловые дескрипторы), но также имеют свой собственный стек для своих данных. Иногда возникает необходимость в данных, специфичных для конкретного потока, но доступных на уровне процесса. Например, имя выполняемого потока или что-то подобное. Традиционный API для работы с потоками в UNIX® — pthreads — предоставляет способ сделать это через функции `man:pthread_key_create[3]`, `man:pthread_setspecific[3]` и `man:pthread_getspecific[3]`, где поток может создать ключ к локальным данным потока и использовать `man:pthread_getspecific[3]` или `man:pthread_getspecific[3]` для управления этими данными. Легко заметить, что это не самый удобный способ. Поэтому различные разработчики компиляторов C/C++ предложили более удобный метод. Они ввели новое ключевое слово `thread`, которое указывает, что переменная является специфичной для потока. Также был разработан новый метод доступа к таким переменным (по крайней мере, на архитектуре i386). Метод pthreads обычно реализуется в пользовательском пространстве в виде простой таблицы поиска. Производительность такого решения не очень высока. Новый метод использует (на i386) сегментные регистры для адресации области, где хранится TLS (Thread-Local Storage), так что фактический доступ к переменной потока сводится к добавлению сегментного регистра к адресу, таким образом обращаясь через него. Сегментные регистры, обычно `%gs` и `%fs`, действуют как селекторы сегментов. Каждый поток имеет свою собственную область, где хранятся локальные данные потока, и сегмент должен загружаться при каждом переключении контекста. Этот метод очень быстрый и используется практически повсеместно в мире UNIX® на архитектуре i386. И FreeBSD, и Linux® реализуют этот подход, и он даёт очень хорошие результаты. Единственный недостаток — необходимость перезагружать сегмент при каждом переключении контекста, что может замедлять переключения. FreeBSD пытается минимизировать эти накладные расходы, используя только 1 дескриптор сегмента, в то время как Linux® использует 3. Интересно, что почти ничто не использует больше 1 дескриптора (только Wine, кажется, использует 2), поэтому Linux® платит эту необязательную цену при переключении контекстов. [[i386-segs]] ==== Сегменты на i386 Архитектура i386 реализует так называемые сегменты. Сегмент — это описание области памяти. Он включает базовый адрес (начало) области памяти, её конец (границу), тип, защиту и т.д. Доступ к памяти, описываемой сегментом, может осуществляться с использованием регистров селекторов сегментов (`%cs`, `%ds`, `%ss`, `%es`, `%fs`, `%gs`). Например, предположим, что у нас есть сегмент с базовым адресом 0x1234 и длиной, а также следующий код: [.programlisting] .... mov %edx,%gs:0x10 .... Это загрузит содержимое регистра `%edx` в ячейку памяти по адресу 0x1244. Некоторые сегментные регистры имеют специальное назначение, например, `%cs` используется для сегмента кода, а `%ss` — для сегмента стека, но `%fs` и `%gs` обычно не используются. Сегменты хранятся либо в глобальной таблице GDT, либо в локальной таблице LDT. Доступ к LDT осуществляется через запись в GDT. LDT может хранить больше типов сегментов. LDT может быть отдельной для каждого процесса. Обе таблицы определяют до 8191 записей. [[linux-i386]] ==== Реализация на Linux(R) i386 Существует два основных способа настройки TLS в Linux(R). Он может быть настроен при клонировании процесса с использованием системного вызова `clone` или с помощью вызова `set_thread_area`. Когда процесс передаёт флаг `CLONE_SETTLS` в `clone`, ядро ожидает, что память, на которую указывает регистр `%esi`, будет содержать пользовательское представление сегмента в Linux(R), которое преобразуется в машинное представление сегмента и загружается в слот GDT. Слот GDT может быть указан номером или можно использовать -1, что означает, что система сама должна выбрать первый свободный слот. На практике подавляющее большинство программ используют только одну запись TLS и не заботятся о номере записи. Мы используем это в эмуляции и фактически зависим от этого. [[tls-emu]] ==== Эмуляция Linux(R) TLS [[tls-i386]] ===== i386 -Загрузка TLS для текущего потока происходит путем вызова `set_thread_area`, тогда как загрузка TLS для второго процесса в `clone` выполняется в отдельном блоке в `clone`. Эти две функции очень похожи. Единственное различие заключается в фактической загрузке сегмента GDT, которая происходит при следующем переключении контекста для вновь созданного процесса, в то время как `set_thread_area` должен загрузить его напрямую. Код в основном делает следующее. Он копирует дескриптор сегмента в формате Linux(R) из пользовательского пространства. Код проверяет номер дескриптора, но поскольку он различается между FreeBSD и Linux(R), мы немного имитируем его. Мы поддерживаем только индексы 6, 3 и -1. Число 6 — это оригинальный номер Linux(R), 3 — оригинальный номер FreeBSD, а -1 означает авто-выбор. Затем мы устанавливаем номер дескриптора на константу 3 и копируем его обратно в пользовательское пространство. Мы полагаемся на то, что процесс в пользовательском пространстве использует номер из дескриптора, но это работает в большинстве случаев (никогда не встречалось ситуации, когда это не срабатывало), так как процесс в пользовательском пространстве обычно передаёт 1. Затем мы преобразуем дескриптор из формата Linux(R) в машинозависимую форму (т.е. независимую от операционной системы) и копируем его в дескриптор сегмента, определенный FreeBSD. Наконец, мы можем загрузить его. Мы назначаем дескриптор PCB потока (блок управления процессом) и загружаем сегмент `%gs` с помощью `load_gs`. Эта загрузка должна выполняться в критической секции, чтобы ничто не могло нас прервать. Случай `CLONE_SETTLS` работает точно так же, только загрузка с помощью `load_gs` не выполняется. Сегмент, используемый для этого (сегмент номер 3), разделяется между процессами FreeBSD и Linux(R), поэтому слой эмуляции Linux(R) не добавляет накладных расходов по сравнению с обычным FreeBSD. +Загрузка TLS для текущего потока происходит путем вызова `set_thread_area`, тогда как загрузка TLS для второго процесса в `clone` выполняется в отдельном блоке в `clone`. Эти две функции очень похожи. Единственное различие заключается в фактической загрузке сегмента GDT, которая происходит при следующем переключении контекста для вновь созданного процесса, в то время как `set_thread_area` должен загрузить его напрямую. Код в основном делает следующее. Он копирует дескриптор сегмента в формате Linux(R) из пользовательского пространства. Код проверяет номер дескриптора, но поскольку он различается между FreeBSD и Linux(R), мы немного имитируем его. Мы поддерживаем только индексы 6, 3 и -1. Число 6 — это оригинальный номер Linux(R), 3 — оригинальный номер FreeBSD, а -1 означает авто-выбор. Затем мы устанавливаем номер дескриптора на константу 3 и копируем его обратно в пользовательское пространство. Мы полагаемся на то, что процесс в пользовательском пространстве использует номер из дескриптора, но это работает в большинстве случаев (никогда не встречалось ситуации, когда это не срабатывало), так как процесс в пользовательском пространстве обычно передаёт 1. Затем мы преобразуем дескриптор из формата Linux(R) в машинозависимую форму (т.е. независимую от операционной системы) и копируем его в дескриптор сегмента, определённый FreeBSD. Наконец, мы можем загрузить его. Мы назначаем дескриптор PCB потока (блок управления процессом) и загружаем сегмент `%gs` с помощью `load_gs`. Эта загрузка должна выполняться в критической секции, чтобы ничто не могло нас прервать. Случай `CLONE_SETTLS` работает точно так же, только загрузка с помощью `load_gs` не выполняется. Сегмент, используемый для этого (сегмент номер 3), разделяется между процессами FreeBSD и Linux(R), поэтому слой эмуляции Linux(R) не добавляет накладных расходов по сравнению с обычным FreeBSD. [[tls-amd64]] ===== amd64 Реализация amd64 аналогична реализации i386, но изначально не использовался 32-битный дескриптор сегмента для этой цели (поэтому даже нативные пользователи 32-битного TLS не работали), поэтому нам пришлось добавить такой сегмент и реализовать его загрузку при каждом переключении контекста (когда установлен флаг, сигнализирующий о использовании 32-битного режима). Кроме этого, загрузка TLS точно такая же, только номера сегментов отличаются, а формат дескриптора и загрузка немного различаются. [[futexes]] === Фьютексы [[sync-intro]] ==== Введение в синхронизацию Потокам требуется некоторая синхронизация, и POSIX(R) предоставляет несколько её видов: мьютексы для взаимного исключения, блокировки чтения-записи для взаимного исключения с преобладанием операций чтения над записями и условные переменные для сигнализации об изменении состояния. Интересно отметить, что в API потоков POSIX(R) отсутствует поддержка семафоров. Реализации этих механизмов синхронизации сильно зависят от типа поддержки потоков, которая у нас есть. В чистой модели 1:M (пользовательское пространство) реализация может быть выполнена исключительно в пользовательском пространстве и, следовательно, быть очень быстрой (условные переменные, вероятно, будут реализованы с использованием сигналов, т.е. не быстро) и простой. В модели 1:1 ситуация также довольно ясна — потоки должны синхронизироваться с использованием средств ядра (что очень медленно, поскольку требуется выполнение системного вызова). Смешанный сценарий M:N просто комбинирует первый и второй подходы или полагается исключительно на ядро. Синхронизация потоков является важной частью программирования с использованием потоков, и её производительность может значительно влиять на итоговую программу. Недавние тесты в операционной системе FreeBSD показали, что улучшенная реализация `sx_lock` дала 40% прироста скорости в _ZFS_ (где активно используются блокировки sx), это внутренние механизмы ядра, но это наглядно демонстрирует, насколько важна производительность примитивов синхронизации. Многопоточные программы должны быть написаны с минимальной конкуренцией за блокировки. В противном случае, вместо выполнения полезной работы поток просто ожидает блокировку. В результате, наиболее хорошо написанные многопоточные программы демонстрируют низкую конкуренцию за блокировки. [[futex-intro]] ==== Введение в фьютексы Linux(R) реализует 1:1 потоковую модель, то есть использует примитивы синхронизации в ядре. Как упоминалось ранее, хорошо написанные многопоточные программы имеют низкую конкуренцию за блокировки. Таким образом, типичная последовательность может выполняться как два атомарных увеличения/уменьшения счётчика ссылок мьютекса, что очень быстро, как показано в следующем примере: [.programlisting] .... pthread_mutex_lock(&mutex); ... pthread_mutex_unlock(&mutex); .... 1:1 threading вынуждает нас выполнять два системных вызова для этих вызовов мьютекса, что очень медленно. Решение, реализованное в Linux(R) 2.6, называется фьютексы. Фьютексы выполняют проверку на конкуренцию в пользовательском пространстве и вызывают примитивы ядра только в случае конкуренции. Таким образом, типичный случай обходится без вмешательства ядра. Это обеспечивает достаточно быструю и гибкую реализацию примитивов синхронизации. [[futex-api]] ==== API фьютексов Системный вызов futex выглядит следующим образом: [.programlisting] .... int futex(void *uaddr, int op, int val, struct timespec *timeout, void *uaddr2, int val3); .... В этом примере `uaddr` — это адрес мьютекса в пользовательском пространстве, `op` — операция, которую мы собираемся выполнить, а остальные параметры имеют значение, зависящее от конкретной операции. Фьютексы реализуют следующие операции: * `FUTEX_WAIT` * `FUTEX_WAKE` * `FUTEX_FD` * `FUTEX_REQUEUE` * `FUTEX_CMP_REQUEUE` * `FUTEX_WAKE_OP` [[futex-wait]] ===== FUTEX_WAIT Эта операция проверяет, что по адресу `uaddr` записано значение `val`. Если нет, возвращается `EWOULDBLOCK`, в противном случае поток ставится в очередь на фьютекс и приостанавливается. Если аргумент `timeout` не равен нулю, он задает максимальное время ожидания, в противном случае ожидание бесконечно. [[futex-wake]] ===== FUTEX_WAKE Эта операция захватывает фьютекс по адресу `uaddr` и пробуждает первые `val` фьютексов, ожидающих в очереди на этом фьютексе. [[futex-fd]] ===== FUTEX_FD Эта операция связывает файловый дескриптор с заданным фьютексом. [[futex-requeue]] ===== FUTEX_REQUEUE Эта операция берет `val` потоков, ожидающих на фьютексе по адресу `uaddr`, пробуждает их и берет следующие `val2` потоков, перемещая их в очередь фьютекса по адресу `uaddr2`. [[futex-cmp-requeue]] ===== FUTEX_CMP_REQUEUE Эта операция делает то же самое, что и `FUTEX_REQUEUE`, но сначала проверяет, что `val3` равно `val`. [[futex-wake-op]] ===== FUTEX_WAKE_OP Эта операция выполняет атомарную операцию над `val3` (которая содержит закодированное другое значение) и `uaddr`. Затем она пробуждает `val` потоков на фьютексе по адресу `uaddr`, и если атомарная операция вернула положительное число, пробуждает `val2` потоков на фьютексе по адресу `uaddr2`. Операции, реализованные в `FUTEX_WAKE_OP`: * `FUTEX_OP_SET` * `FUTEX_OP_ADD` * `FUTEX_OP_OR` * `FUTEX_OP_AND` * `FUTEX_OP_XOR` [NOTE] ==== В прототипе системного вызова futex отсутствует параметр `val2`. Значение `val2` берётся из параметра `struct timespec *timeout` для операций `FUTEX_REQUEUE`, `FUTEX_CMP_REQUEUE` и `FUTEX_WAKE_OP`. ==== [[futex-emu]] ==== Эмуляция фьютексов в FreeBSD Эмуляция futex в FreeBSD взята из NetBSD и дополнительно расширена нами. Она размещена в файлах `linux_futex.c` и [.filename]#linux_futex.h#. Структура `futex` выглядит следующим образом: [.programlisting] .... struct futex { void *f_uaddr; int f_refcount; LIST_ENTRY(futex) f_list; TAILQ_HEAD(lf_waiting_paroc, waiting_proc) f_waiting_proc; }; .... И структура `waiting_proc` выглядит следующим образом: [.programlisting] .... struct waiting_proc { struct thread *wp_t; struct futex *wp_new_futex; TAILQ_ENTRY(waiting_proc) wp_list; }; .... [[futex-get]] ===== futex_get / futex_put Фьютекс получается с помощью функции `futex_get`, которая выполняет поиск в линейном списке фьютексов и возвращает найденный или создает новый. При освобождении фьютекса после использования вызывается функция `futex_put`, которая уменьшает счетчик ссылок фьютекса, и если счетчик достигает нуля, фьютекс освобождается. [[futex-sleep]] ===== futex_sleep -Когда фьютекс ставит поток в очередь на ожидание, он создает структуру `working_proc` и помещает эту структуру в список внутри структуры futex, после чего просто выполняет man:tsleep[9] для приостановки потока. Ожидание может быть ограничено по времени. После возврата из man:tsleep[9] (поток был разбужен или истекло время ожидания) структура `working_proc` удаляется из списка и уничтожается. Все это выполняется в функции `futex_sleep`. Если мы были разбужены с помощью `futex_wake`, у нас установлен `wp_new_futex`, поэтому мы ожидаем на нем. Таким образом, фактическое перемещение выполняется в этой функции. +Когда фьютекс ставит поток в очередь на ожидание, он создает структуру `working_proc` и помещает эту структуру в список внутри структуры futex, после чего просто выполняет man:tsleep[9] для приостановки потока. Ожидание может быть ограничено по времени. После возврата из man:tsleep[9] (поток был разбужен или истекло время ожидания) структура `working_proc` удаляется из списка и уничтожается. Все это выполняется в функции `futex_sleep`. Если мы были разбужены с помощью `futex_wake`, у нас установлен `wp_new_futex`, поэтому мы ожидаем на нём. Таким образом, фактическое перемещение выполняется в этой функции. [[futex-wake-2]] ===== futex_wake Пробуждение потока, ожидающего на фьютексе, выполняется в функции `futex_wake`. Сначала в этой функции мы имитируем странное поведение Linux(R), где пробуждаются N потоков для всех операций, за исключением того, что операции REQUEUE выполняются на N+1 потоках. Однако обычно это не имеет значения, так как мы пробуждаем все потоки. Далее в функции в цикле мы пробуждаем n потоков, после чего проверяем, есть ли новый фьютекс для перестановки. Если есть, мы переставляем до n2 потоков на новый futex. Это взаимодействует с `futex_sleep`. [[futex-wake-op-2]] ===== futex_wake_op Операция `FUTEX_WAKE_OP` довольно сложна. Сначала мы получаем два фьютекса по адресам `uaddr` и `uaddr2`, затем выполняем атомарную операцию с использованием `val3` и `uaddr2`. После этого пробуждаются `val` ожидающих на первом фьютексе, и если условие атомарной операции выполняется, мы пробуждаем `val2` (т.е. `timeout`) ожидающих на втором фьютексе. [[futex-atomic-op]] ===== Атомарная операция на фьютексе Атомарная операция принимает два параметра `encoded_op` и `uaddr`. Закодированная операция включает саму операцию, сравниваемое значение, аргумент операции и аргумент сравнения. Псевдокод операции выглядит следующим образом: [.programlisting] .... oldval = *uaddr2 *uaddr2 = oldval OP oparg .... И это выполняется атомарно. Сначала происходит копирование числа по адресу `uaddr`, а затем выполняется операция. Код обрабатывает ошибки страниц, и если ошибки не происходит, `oldval` сравнивается с аргументом `cmparg` с помощью компаратора cmp. [[futex-locking]] ===== Блокировка фьютекса Реализация фьютексов использует два списка блокировок для защиты `sx_lock` и глобальных блокировок (либо Giant, либо другой `sx_lock`). Каждая операция выполняется заблокированной от начала до самого конца. [[syscall-impl]] === Реализация различных системных вызовов В этом разделе я опишу несколько менее значимых системных вызовов, которые стоит упомянуть, потому что их реализация неочевидна или эти вызовы представляют интерес с другой точки зрения. [[syscall-at]] ==== *семейство системных вызовов at Во время разработки ядра Linux(R) 2.6.16 были добавлены *at-системные вызовы. Эти системные вызовы (например, `openat`) работают точно так же, как их аналоги без at, за исключением параметра `dirfd`. Этот параметр определяет местоположение файла, над которым выполняется системный вызов. Если параметр `filename` является абсолютным, `dirfd` игнорируется, но если путь к файлу относительный, `dirfd` вступает в игру. Параметр `dirfd` представляет собой каталог, относительно которого проверяется относительный путь. Параметр `dirfd` является файловым дескриптором некоторого каталога или `AT_FDCWD`. Например, системный вызов `openat` может выглядеть следующим образом: [.programlisting] .... file descriptor 123 = /tmp/foo/, current working directory = /tmp/ openat(123, /tmp/bah\, flags, mode) /* opens /tmp/bah */ openat(123, bah\, flags, mode) /* opens /tmp/foo/bah */ openat(AT_FDWCWD, bah\, flags, mode) /* opens /tmp/bah */ openat(stdio, bah\, flags, mode) /* returns error because stdio is not a directory */ .... Эта инфраструктура необходима для избежания состояний гонки при открытии файлов вне рабочего каталога. Представьте, что процесс состоит из двух потоков, потока A и потока B. Поток A выполняет `open(./tmp/foo/bah., flags, mode)`, и перед возвратом управления он вытесняется, и начинает выполняться поток B. Поток B не учитывает потребности потока A и переименовывает или удаляет [.filename]#/tmp/foo/#. Возникает состояние гонки. Чтобы избежать этого, мы можем открыть [.filename]#/tmp/foo# и использовать его как `dirfd` для системного вызова `openat`. Это также позволяет пользователю реализовать рабочие каталоги для каждого потока. Семейство *at системных вызовов Linux(R) включает: `linux_openat`, `linux_mkdirat`, `linux_mknodat`, `linux_fchownat`, `linux_futimesat`, `linux_fstatat64`, `linux_unlinkat`, `linux_renameat`, `linux_linkat`, `linux_symlinkat`, `linux_readlinkat`, `linux_fchmodat` и `linux_faccessat`. Все они реализованы с использованием модифицированной функции man:namei[9] и простого слоя обёртки. [[implementation]] ===== Реализация Реализация выполнена путем изменения функции man:namei[9] (описанной выше) для приема дополнительного параметра `dirfd` в структуре `nameidata`, который указывает начальную точку для поиска пути вместо использования текущего рабочего каталога каждый раз. Преобразование `dirfd` из номера файлового дескриптора в vnode выполняется в нативных *at-системных вызовах. Когда `dirfd` равен `AT_FDCWD`, запись `dvp` в структуре `nameidata` имеет значение `NULL`, но если `dirfd` представляет другой номер, мы получаем файл по этому дескриптору, проверяем его валидность и, если к нему прикреплен vnode, получаем этот vnode. Затем проверяем, является ли этот vnode каталогом. В самой функции man:namei[9] мы просто заменяем vnode `dvp` на переменную `dp` в функции man:namei[9], которая определяет начальную точку. Функция man:namei[9] используется не напрямую, а через цепочку различных функций на разных уровнях. Например, `openat` работает следующим образом: [.programlisting] .... openat() --> kern_openat() --> vn_open() -> namei() .... По этой причине `kern_open` и `vn_open` должны быть изменены для включения дополнительного параметра `dirfd`. Слой совместимости для них не создаётся, так как пользователей этих функций немного и их можно легко адаптировать. Данная общая реализация позволяет FreeBSD реализовать свои собственные *at-системные вызовы. Это обсуждается в настоящее время. [[ioctl]] ==== Ioctl Интерфейс ioctl довольно хрупок из-за своей обобщённости. Необходимо учитывать, что устройства в Linux(R) и FreeBSD различаются, поэтому требуется особая осторожность для корректной работы эмуляции ioctl. Обработка ioctl реализована в файле [.filename]#linux_ioctl.c#, где определена функция `linux_ioctl`. Эта функция просто перебирает наборы обработчиков ioctl, чтобы найти обработчик, реализующий данную команду. Системный вызов ioctl имеет три параметра: файловый дескриптор, команду и аргумент. Команда представляет собой 16-битное число, которое теоретически делится на старшие 8 бит, определяющие класс команды ioctl, и младшие 8 бит, которые являются конкретной командой в данном наборе. Эмуляция использует это разделение. Реализованы обработчики для каждого набора, такие как `sound_handler` или `disk_handler`. Каждый обработчик имеет определённые максимальную и минимальную команды, которые используются для выбора нужного обработчика. Существуют небольшие проблемы с этим подходом, поскольку Linux(R) не всегда последовательно использует разделение на наборы, поэтому иногда ioctls для другого набора оказываются внутри набора, к которому они не должны принадлежать (например, SCSI generic ioctls внутри набора cdrom и т.д.). В настоящее время FreeBSD реализует не так много ioctls Linux(R) (по сравнению с NetBSD, например), но планируется перенести их из NetBSD. Тенденция такова, что ioctls Linux(R) используются даже в родных драйверах FreeBSD для упрощения портирования приложений. [[debugging]] ==== Отладка Каждый системный вызов должен поддерживать отладку. Для этой цели мы вводим небольшую инфраструктуру. У нас есть механизм `ldebug`, который определяет, нужно ли отлаживать данный системный вызов (настраивается через `sysctl`). Для вывода сообщений используются макросы `LMSG` и `ARGS`. Они применяются для форматирования строк вывода с целью создания единообразных отладочных сообщений. [[conclusion]] == Заключение [[results]] === Результаты По состоянию на апрель 2007 года уровень эмуляции Linux(R) способен достаточно хорошо эмулировать ядро Linux(R) 2.6.16. Оставшиеся проблемы касаются фьютексов, незавершённого семейства системных вызовов *at, проблематичной доставки сигналов, отсутствия `epoll` и `inotify`, а также, вероятно, некоторых ошибок, которые мы ещё не обнаружили. Несмотря на это, мы способны запускать практически все программы Linux(R), включённые в Коллекцию портов FreeBSD, с Fedora Core 4 на ядре 2.6.16, а также есть некоторые предварительные сообщения об успешной работе с Fedora Core 6 на ядре 2.6.16. Недавно был добавлен linux_base Fedora Core 6, что позволило провести дополнительные тестирования уровня эмуляции и дало нам больше подсказок, куда следует направить усилия для реализации недостающих функций. Мы можем запускать наиболее популярные приложения, такие как package:www/linux-firefox[], package:net-im/skype[], и некоторые игры из Коллекции портов. Некоторые программы демонстрируют некорректное поведение при эмуляции 2.6, но это в настоящее время исследуется, и, надеемся, скоро будет исправлено. Единственное крупное приложение, которое, как известно, не работает, — это Linux(R) Java(TM) Development Kit, и это связано с требованием функции `epoll`, которая не имеет прямого отношения к ядру Linux(R) 2.6. Мы надеемся включить эмуляцию 2.6.16 по умолчанию через некоторое время после выхода FreeBSD 7.0, по крайней мере, чтобы открыть части эмуляции 2.6 для более широкого тестирования. Как только это будет сделано, мы сможем перейти на Fedora Core 6 linux_base, что является конечной целью. [[future-work]] === Будущие работы Будущая работа должна быть сосредоточена на исправлении оставшихся проблем с фьютексами, реализации оставшихся системных вызовов семейства *at, исправлении доставки сигналов и, возможно, реализации механизмов `epoll` и `inotify`. Мы надеемся вскоре добиться безупречной работы наиболее важных программ, чтобы можно было по умолчанию переключиться на эмуляцию 2.6 и сделать Fedora Core 6 базовой версией linux_base, поскольку используемая в настоящее время Fedora Core 4 больше не поддерживается. Другая возможная цель — поделиться нашим кодом с NetBSD и DragonflyBSD. NetBSD имеет некоторую поддержку эмуляции 2.6, но она далека от завершения и не была должным образом протестирована. DragonflyBSD выразила некоторую заинтересованность в переносе улучшений версии 2.6. В целом, по мере развития Linux(R) мы хотели бы идти в ногу с их разработкой, реализуя новые системные вызовы. В первую очередь на ум приходит `splice`. Некоторые уже реализованные системные вызовы также неоптимальны, например `mremap` и другие. Также можно внести некоторые улучшения производительности, такие как более детальная блокировка и другие. [[team]] === Команда Я сотрудничал в этом проекте с (в алфавитном порядке): * `{jhb}` * `{kib}` * Emmanuel Dreyfus * Scot Hetzel * `{jkim}` * `{netchild}` * `{ssouhlal}` * Li Xiao * `{davidxu}` Я хотел бы поблагодарить всех этих людей за их советы, рецензирование кода и общую поддержку. [[literatures]] == Литература . Marshall Kirk McKusick - George V. Neville-Neil. Design and Implementation of the FreeBSD operating system. Addison-Wesley, 2005 год. . https://tldp.org[https://tldp.org] . https://www.kernel.org[https://www.kernel.org] diff --git a/documentation/content/ru/articles/linux-emulation/_index.po b/documentation/content/ru/articles/linux-emulation/_index.po index 3dcc5aa8b9..43546c6861 100644 --- a/documentation/content/ru/articles/linux-emulation/_index.po +++ b/documentation/content/ru/articles/linux-emulation/_index.po @@ -1,4414 +1,4414 @@ # SOME DESCRIPTIVE TITLE # Copyright (C) YEAR The FreeBSD Project # This file is distributed under the same license as the FreeBSD Documentation package. -# Vladlen Popolitov , 2025. +# Vladlen Popolitov , 2025, 2026. msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" "POT-Creation-Date: 2025-11-08 16:17+0000\n" -"PO-Revision-Date: 2025-11-12 04:45+0000\n" +"PO-Revision-Date: 2026-03-08 09:11+0000\n" "Last-Translator: Vladlen Popolitov \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 4.17\n" #. type: YAML Front Matter: description #: documentation/content/en/articles/linux-emulation/_index.adoc:1 #, no-wrap msgid "A technical description about the internals of the Linux emulation layer in FreeBSD" msgstr "Техническое описание внутреннего устройства слоя эмуляции Linux в FreeBSD" #. type: YAML Front Matter: title #: documentation/content/en/articles/linux-emulation/_index.adoc:1 #, no-wrap msgid "Linux® emulation in FreeBSD" msgstr "Эмуляция Linux® в FreeBSD" #. type: Title = #: documentation/content/en/articles/linux-emulation/_index.adoc:11 #, no-wrap msgid "Linux(R) emulation in FreeBSD" msgstr "Эмуляция Linux(R) в FreeBSD" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:44 msgid "Abstract" msgstr "Аннотация" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:54 msgid "" "This masters thesis deals with updating the Linux(R) emulation layer (the so " "called _Linuxulator_). The task was to update the layer to match the " "functionality of Linux(R) 2.6. As a reference implementation, the Linux(R) " "2.6.16 kernel was chosen. The concept is loosely based on the NetBSD " "implementation. Most of the work was done in the summer of 2006 as a part " "of the Google Summer of Code students program. The focus was on bringing " "the _NPTL_ (new POSIX(R) thread library) support into the emulation layer, " "including _TLS_ (thread local storage), _futexes_ (fast user space mutexes), " "_PID mangling_, and some other minor things. Many small problems were " "identified and fixed in the process. My work was integrated into the main " "FreeBSD source repository and will be shipped in the upcoming 7.0R release. " "We, the emulation development team, are working on making the Linux(R) 2.6 " "emulation the default emulation layer in FreeBSD." msgstr "" "Эта магистерская диссертация посвящена обновлению слоя эмуляции Linux(R) " "(так называемого _Linuxulator_). Задача состояла в обновлении слоя для " "соответствия функциональности Linux(R) 2.6. В качестве эталонной реализации " "было выбрано ядро Linux(R) 2.6.16. Концепция основана на реализации NetBSD. " "Большая часть работы была выполнена летом 2006 года в рамках программы " "Google Summer of Code для студентов. Основное внимание уделялось добавлению " "поддержки _NPTL_ (новой библиотеки потоков POSIX(R)) в слой эмуляции, " "включая _TLS_ (локальное хранилище потоков), _фьютексы (futex)_ (быстрые " "мьютексы в пользовательском пространстве), _PID mangling_ и некоторые другие " "второстепенные аспекты. В процессе было выявлено и исправлено множество " "мелких проблем. Моя работа была интегрирована в основной репозиторий " "исходного кода FreeBSD и войдет в предстоящий релиз 7.0R. Мы, команда " "разработчиков эмуляции, работаем над тем, чтобы сделать эмуляцию Linux(R) " "2.6 стандартным слоем эмуляции в FreeBSD." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:56 msgid "'''" msgstr "'''" #. type: Title == #: documentation/content/en/articles/linux-emulation/_index.adoc:60 #, no-wrap msgid "Introduction" msgstr "Введение" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:67 msgid "" "In the last few years the open source UNIX(R) based operating systems " "started to be widely deployed on server and client machines. Among these " "operating systems I would like to point out two: FreeBSD, for its BSD " "heritage, time proven code base and many interesting features and Linux(R) " "for its wide user base, enthusiastic open developer community and support " "from large companies. FreeBSD tends to be used on server class machines " "serving heavy duty networking tasks with less usage on desktop class " "machines for ordinary users. While Linux(R) has the same usage on servers, " "but it is used much more by home based users. This leads to a situation " "where there are many binary only programs available for Linux(R) that lack " "support for FreeBSD." msgstr "" "В последние несколько лет операционные системы с открытым исходным кодом на " "основе UNIX(R) начали широко использоваться на серверных и клиентских " "машинах. Среди этих операционных систем я хотел бы выделить две: FreeBSD — " "за наследие BSD, проверенную временем кодобазу и множество интересных " "возможностей, и Linux(R) — за широкую пользовательскую базу, активное " "сообщество разработчиков и поддержку крупных компаний. FreeBSD чаще " "используется на серверных машинах, выполняющих сложные сетевые задачи, и " "реже — на настольных компьютерах обычных пользователей. В то время как " "Linux(R) также применяется на серверах, он гораздо популярнее среди домашних " "пользователей. Это приводит к ситуации, когда для Linux(R) доступно " "множество проприетарных программ, которые не поддерживают FreeBSD." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:69 msgid "" "Naturally, a need for the ability to run Linux(R) binaries on a FreeBSD " "system arises and this is what this thesis deals with: the emulation of the " "Linux(R) kernel in the FreeBSD operating system." msgstr "" "Естественно, возникает необходимость в возможности запуска Linux(R) " "бинарников в системе FreeBSD, и именно этому посвящена данная работа: " "эмуляции ядра Linux(R) в операционной системе FreeBSD." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:72 msgid "" "During the Summer of 2006 Google Inc. sponsored a project which focused on " "extending the Linux(R) emulation layer (the so called Linuxulator) in " "FreeBSD to include Linux(R) 2.6 facilities. This thesis is written as a " "part of this project." msgstr "" "Летом 2006 года компания Google Inc. спонсировала проект, направленный на " "расширение слоя эмуляции Linux(R) (так называемого Linuxulator) в FreeBSD " "для включения возможностей Linux(R) 2.6. Данная диссертация написана в " "рамках этого проекта." #. type: Title == #: documentation/content/en/articles/linux-emulation/_index.adoc:74 #, no-wrap msgid "A look inside..." msgstr "Взгляд изнутри..." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:80 msgid "" "In this section we are going to describe every operating system in " "question. How they deal with syscalls, trapframes etc., all the low-level " "stuff. We also describe the way they understand common UNIX(R) primitives " "like what a PID is, what a thread is, etc. In the third subsection we talk " "about how UNIX(R) on UNIX(R) emulation could be done in general." msgstr "" "В этом разделе мы рассмотрим каждую из рассматриваемых операционных систем. " "Как они работают с системными вызовами, фреймами прерываний и другими " "низкоуровневыми аспектами. Также мы опишем, как они интерпретируют общие " "примитивы UNIX(R), такие как PID, потоки и т. д. В третьем подразделе мы " "поговорим о том, как в целом может быть реализована эмуляция UNIX(R) на " "UNIX(R)." #. type: Title === #: documentation/content/en/articles/linux-emulation/_index.adoc:82 #, no-wrap msgid "What is UNIX(R)" msgstr "Что такое UNIX(R)" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:94 msgid "" "UNIX(R) is an operating system with a long history that has influenced " "almost every other operating system currently in use. Starting in the " "1960s, its development continues to this day (although in different " "projects). UNIX(R) development soon forked into two main ways: the BSDs and " "System III/V families. They mutually influenced themselves by growing a " "common UNIX(R) standard. Among the contributions originated in BSD we can " "name virtual memory, TCP/IP networking, FFS, and many others. The System V " "branch contributed to SysV interprocess communication primitives, copy-on-" "write, etc. UNIX(R) itself does not exist any more but its ideas have been " "used by many other operating systems world wide thus forming the so called " "UNIX(R)-like operating systems. These days the most influential ones are " "Linux(R), Solaris, and possibly (to some extent) FreeBSD. There are in-" "company UNIX(R) derivatives (AIX, HP-UX etc.), but these have been more and " "more migrated to the aforementioned systems. Let us summarize typical " "UNIX(R) characteristics." msgstr "" "UNIX(R) — это операционная система с долгой историей, которая повлияла почти " "на все остальные операционные системы, используемые в настоящее время. " "Начиная с 1960-х годов, её разработка продолжается и по сей день (хотя в " "разных проектах). Вскоре развитие UNIX(R) разделилось на два основных " "направления: семейства BSD и System III/V. Они взаимно влияли друг на друга, " "формируя общий стандарт UNIX(R). Среди вклада, возникшего в BSD, можно " "назвать виртуальную память, сетевой стек TCP/IP, FFS и многие другие. Ветка " "System V внесла свой вклад в примитивы межпроцессного взаимодействия SysV, " "копирование при записи и т. д. Самого UNIX(R) больше не существует, но его " "идеи были использованы многими другими операционными системами по всему " "миру, образовав так называемые UNIX(R)-подобные операционные системы. В наши " "дни наиболее влиятельными из них являются Linux(R), Solaris и, возможно (в " "некоторой степени), FreeBSD. Существуют корпоративные производные UNIX(R) " "(AIX, HP-UX и т. д.), но они всё больше мигрируют на упомянутые системы. " "Давайте подведём итог типичным характеристикам UNIX(R)." #. type: Title ==== #: documentation/content/en/articles/linux-emulation/_index.adoc:96 #: documentation/content/en/articles/linux-emulation/_index.adoc:187 #: documentation/content/en/articles/linux-emulation/_index.adoc:279 #, no-wrap msgid "Technical details" msgstr "Технические детали" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:104 msgid "" "Every running program constitutes a process that represents a state of the " "computation. Running process is divided between kernel-space and user-" "space. Some operations can be done only from kernel space (dealing with " "hardware etc.), but the process should spend most of its lifetime in the " "user space. The kernel is where the management of the processes, hardware, " "and low-level details take place. The kernel provides a standard unified " "UNIX(R) API to the user space. The most important ones are covered below." msgstr "" "Каждая запущенная программа представляет собой процесс, который отражает " "состояние вычислений. Выполняющийся процесс разделяется между пространством " "ядра и пользовательским пространством. Некоторые операции могут выполняться " "только из пространства ядра (например, работа с оборудованием), но процесс " "должен проводить большую часть своего времени в пользовательском " "пространстве. Ядро — это место, где происходит управление процессами, " "оборудованием и низкоуровневыми деталями. Ядро предоставляет стандартный " "унифицированный UNIX(R) API для пользовательского пространства. Наиболее " "важные из них рассмотрены ниже." #. type: Title ==== #: documentation/content/en/articles/linux-emulation/_index.adoc:106 #, no-wrap msgid "Communication between kernel and user space process" msgstr "Обмен данными между ядром и пользовательским процессом" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:114 msgid "" "Common UNIX(R) API defines a syscall as a way to issue commands from a user " "space process to the kernel. The most common implementation is either by " "using an interrupt or specialized instruction (think of `SYSENTER`/`SYSCALL` " "instructions for ia32). Syscalls are defined by a number. For example in " "FreeBSD, the syscall number 85 is the man:swapon[2] syscall and the syscall " "number 132 is man:mkfifo[2]. Some syscalls need parameters, which are " "passed from the user-space to the kernel-space in various ways " "(implementation dependent). Syscalls are synchronous." msgstr "" "Общий API UNIX(R) определяет системный вызов как способ передачи команд из " "пользовательского процесса ядру. Наиболее распространённая реализация " "использует либо прерывание, либо специализированную инструкцию (например, " "инструкции `SYSENTER`/`SYSCALL` для ia32). Системные вызовы определяются по " "номеру. Например, в FreeBSD системный вызов номер 85 — это man:swapon[2], а " "номер 132 — man:mkfifo[2]. Некоторые системные вызовы требуют параметров, " "которые передаются из пользовательского пространства в пространство ядра " "различными способами (зависит от реализации). Системные вызовы являются " "синхронными." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:118 msgid "" "Another possible way to communicate is by using a _trap_. Traps occur " "asynchronously after some event occurs (division by zero, page fault etc.). " "A trap can be transparent for a process (page fault) or can result in a " "reaction like sending a _signal_ (division by zero)." msgstr "" "Еще один возможный способ взаимодействия — использование _прерывания_. " -"Прерывания происходят асинхронно после возникновения определенного события " -"(деление на ноль, ошибка страницы и т.д.). Прерывание может быть прозрачным " +"Прерывания происходят асинхронно после возникновения определённого события (" +"деление на ноль, ошибка страницы и т.д.). Прерывание может быть прозрачным " "для процесса (ошибка страницы) или привести к реакции, например, отправке " "_сигнала_ (деление на ноль)." #. type: Title ==== #: documentation/content/en/articles/linux-emulation/_index.adoc:120 #, no-wrap msgid "Communication between processes" msgstr "Обмен данными между процессами" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:125 msgid "" "There are other APIs (System V IPC, shared memory etc.) but the single most " "important API is signal. Signals are sent by processes or by the kernel and " "received by processes. Some signals can be ignored or handled by a user " "supplied routine, some result in a predefined action that cannot be altered " "or ignored." msgstr "" "Существуют другие API (System V IPC, разделяемая память и т.д.), но наиболее " "важным API являются сигналы. Сигналы отправляются процессами или ядром и " "принимаются процессами. Некоторые сигналы могут быть проигнорированы или " "обработаны пользовательской процедурой, другие приводят к предопределённому " "действию, которое нельзя изменить или игнорировать." #. type: Title ==== #: documentation/content/en/articles/linux-emulation/_index.adoc:127 #, no-wrap msgid "Process management" msgstr "Управление процессами" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:137 msgid "" "Kernel instances are processed first in the system (so called init). Every " "running process can create its identical copy using the man:fork[2] " "syscall. Some slightly modified versions of this syscall were introduced " "but the basic semantic is the same. Every running process can morph into " "some other process using the man:exec[3] syscall. Some modifications of " "this syscall were introduced but all serve the same basic purpose. " "Processes end their lives by calling the man:exit[2] syscall. Every process " "is identified by a unique number called PID. Every process has a defined " "parent (identified by its PID)." msgstr "" "Процессы ядра обрабатываются первыми в системе (так называемый init). Каждый " "запущенный процесс может создать свою идентичную копию, используя системный " "вызов man:fork[2]. Были введены некоторые немного изменённые версии этого " "системного вызова, но базовая семантика остаётся той же. Каждый запущенный " "процесс может превратиться в другой процесс, используя системный вызов man:" "exec[3]. Были введены некоторые модификации этого системного вызова, но все " "они служат одной и той же базовой цели. Процессы завершают своё " "существование, вызывая системный вызов man:exit[2]. Каждый процесс " "идентифицируется уникальным номером, называемым PID. У каждого процесса есть " "определённый родитель (идентифицируемый его PID)." #. type: Title ==== #: documentation/content/en/articles/linux-emulation/_index.adoc:139 #, no-wrap msgid "Thread management" msgstr "Управление потоками" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:145 msgid "" "Traditional UNIX(R) does not define any API nor implementation for " "threading, while POSIX(R) defines its threading API but the implementation " "is undefined. Traditionally there were two ways of implementing threads. " "Handling them as separate processes (1:1 threading) or envelope the whole " "thread group in one process and managing the threading in userspace (1:N " "threading). Comparing main features of each approach:" msgstr "" "Традиционный UNIX(R) не определяет никакого API или реализации для потоков, " "в то время как POSIX(R) определяет свой API для потоков, но реализация " -"остается неопределенной. Традиционно существовало два способа реализации " -"потоков: обработка их как отдельных процессов (потоки 1:1) или обертывание " +"остаётся неопределённой. Традиционно существовало два способа реализации " +"потоков: обработка их как отдельных процессов (потоки 1:1) или обёртывание " "всей группы потоков в один процесс с управлением потоками в пользовательском " "пространстве (потоки 1:N). Сравнение основных особенностей каждого подхода:" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:147 msgid "1:1 threading" msgstr "Потоки 1:1" #. type: Bullet: '- ' #: documentation/content/en/articles/linux-emulation/_index.adoc:149 msgid "heavyweight threads" msgstr "тяжеловесные потоки" #. type: Bullet: '- ' #: documentation/content/en/articles/linux-emulation/_index.adoc:150 msgid "" "the scheduling cannot be altered by the user (slightly mitigated by the " "POSIX(R) API)" msgstr "" "планирование не может быть изменено пользователем (частично смягчено " "благодаря POSIX(R) API)" #. type: Bullet: '+ ' #: documentation/content/en/articles/linux-emulation/_index.adoc:151 msgid "no syscall wrapping necessary" msgstr "нет необходимости в обёртке системных вызовов" #. type: Bullet: '+ ' #: documentation/content/en/articles/linux-emulation/_index.adoc:152 msgid "can utilize multiple CPUs" msgstr "может использовать несколько процессоров" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:154 msgid "1:N threading" msgstr "Потоки 1:N" #. type: Bullet: '+ ' #: documentation/content/en/articles/linux-emulation/_index.adoc:156 msgid "lightweight threads" msgstr "легковесные потоки" #. type: Bullet: '+ ' #: documentation/content/en/articles/linux-emulation/_index.adoc:157 msgid "scheduling can be easily altered by the user" msgstr "планирование может быть легко изменено пользователем" #. type: Bullet: '- ' #: documentation/content/en/articles/linux-emulation/_index.adoc:158 msgid "syscalls must be wrapped" msgstr "Системные вызовы должны быть обернуты" #. type: Bullet: '- ' #: documentation/content/en/articles/linux-emulation/_index.adoc:159 msgid "cannot utilize more than one CPU" msgstr "не может использовать более одного CPU" #. type: Title === #: documentation/content/en/articles/linux-emulation/_index.adoc:161 #, no-wrap msgid "What is FreeBSD?" msgstr "Что такое FreeBSD?" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:169 msgid "" "The FreeBSD project is one of the oldest open source operating systems " "currently available for daily use. It is a direct descendant of the genuine " "UNIX(R) so it could be claimed that it is a true UNIX(R) although licensing " "issues do not permit that. The start of the project dates back to the early " "1990's when a crew of fellow BSD users patched the 386BSD operating system. " "Based on this patchkit a new operating system arose named FreeBSD for its " "liberal license. Another group created the NetBSD operating system with " "different goals in mind. We will focus on FreeBSD." msgstr "" "Проект FreeBSD — одна из старейших операционных систем с открытым исходным " "кодом, доступных для повседневного использования. Она является прямым " "потомком оригинальной UNIX(R), поэтому можно утверждать, что это настоящая " "UNIX(R), хотя проблемы с лицензированием не позволяют этого сделать. Начало " "проекта относится к началу 1990-х годов, когда группа пользователей BSD " "создала набор исправлений для операционной системы 386BSD. На основе этого " "набора возникла новая операционная система под названием FreeBSD, получившая " "своё имя благодаря либеральной лицензии. Другая группа создала операционную " "систему NetBSD с другими целями. Мы сосредоточимся на FreeBSD." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:174 msgid "" "FreeBSD is a modern UNIX(R)-based operating system with all the features of " "UNIX(R). Preemptive multitasking, multiuser facilities, TCP/IP networking, " "memory protection, symmetric multiprocessing support, virtual memory with " "merged VM and buffer cache, they are all there. One of the interesting and " "extremely useful features is the ability to emulate other UNIX(R)-like " "operating systems. As of December 2006 and 7-CURRENT development, the " "following emulation functionalities are supported:" msgstr "" "FreeBSD — это современная операционная система на основе UNIX(R), обладающая " "всеми возможностями UNIX(R). Вытесняющая многозадачность, " "многопользовательские функции, сетевые возможности TCP/IP, защита памяти, " "поддержка симметричной многопроцессорности, виртуальная память с " "объединёнными VM и кэшем буфера — всё это присутствует. Одной из интересных " "и чрезвычайно полезных особенностей является возможность эмуляции других " "UNIX(R)-подобных операционных систем. По состоянию на декабрь 2006 года и " "разработку 7-CURRENT поддерживаются следующие функции эмуляции:" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:176 msgid "FreeBSD/i386 emulation on FreeBSD/amd64" msgstr "Совместимость FreeBSD/i386 на FreeBSD/amd64" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:177 msgid "FreeBSD/i386 emulation on FreeBSD/ia64" msgstr "FreeBSD/i386 эмуляция на FreeBSD/ia64" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:178 msgid "Linux(R)-emulation of Linux(R) operating system on FreeBSD" msgstr "Эмуляция Linux(R) операционной системы Linux(R) на FreeBSD" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:179 msgid "NDIS-emulation of Windows networking drivers interface" msgstr "NDIS-эмуляция интерфейса сетевых драйверов Windows" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:180 msgid "NetBSD-emulation of NetBSD operating system" msgstr "NetBSD-эмуляция операционной системы NetBSD" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:181 msgid "PECoff-support for PECoff FreeBSD executables" msgstr "Поддержка PECoff для исполняемых файлов FreeBSD в формате PECoff" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:182 msgid "SVR4-emulation of System V revision 4 UNIX(R)" msgstr "Эмуляция SVR4 System V revision 4 UNIX(R)" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:185 msgid "" "Actively developed emulations are the Linux(R) layer and various FreeBSD-on-" "FreeBSD layers. Others are not supposed to work properly nor be usable " "these days." msgstr "" "Активно разрабатываемые эмуляции — это слой Linux(R) и различные слои " "FreeBSD-on-FreeBSD. Остальные в настоящее время не должны работать корректно " "или быть пригодными к использованию." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:195 msgid "" "FreeBSD is traditional flavor of UNIX(R) in the sense of dividing the run of " "processes into two halves: kernel space and user space run. There are two " "types of process entry to the kernel: a syscall and a trap. There is only " "one way to return. In the subsequent sections we will describe the three " "gates to/from the kernel. The whole description applies to the i386 " "architecture as the Linuxulator only exists there but the concept is similar " "on other architectures. The information was taken from [1] and the source " "code." msgstr "" "FreeBSD — это традиционный вариант UNIX(R) в смысле разделения выполнения " "процессов на две части: выполнение в пространстве ядра и выполнение в " "пространстве пользователя. Существует два типа входа процесса в ядро: " "системный вызов (syscall) и ловушка (trap). Возврат только один. В " "последующих разделах мы опишем три входа/выхода в/из ядра. Всё описание " "относится к архитектуре i386, так как Linuxulator существует только там, но " "концепция схожа на других архитектурах. Информация была взята из [1] и " "исходного кода." #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:197 #, no-wrap msgid "System entries" msgstr "Системные записи" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:204 msgid "" "FreeBSD has an abstraction called an execution class loader, which is a " "wedge into the man:execve[2] syscall. This employs a structure `sysentvec`, " "which describes an executable ABI. It contains things like errno " "translation table, signal translation table, various functions to serve " "syscall needs (stack fixup, coredumping, etc.). Every ABI the FreeBSD " "kernel wants to support must define this structure, as it is used later in " "the syscall processing code and at some other places. System entries are " "handled by trap handlers, where we can access both the kernel-space and the " "user-space at once." msgstr "" "В FreeBSD существует абстракция, называемая загрузчиком классов исполнения, " "которая является прослойкой в системном вызове man:execve[2]. Она использует " "структуру `sysentvec`, описывающую ABI исполняемого файла. Эта структура " "содержит такие элементы, как таблицу преобразования errno, таблицу " "преобразования сигналов, различные функции для обработки системных вызовов " "(исправление стека, создание дампов памяти и т.д.). Каждый ABI, который ядро " "FreeBSD поддерживает, должен определять эту структуру, так как она " "используется в дальнейшем в коде обработки системных вызовов и в некоторых " "других местах. Системные вызовы обрабатываются обработчиками прерываний, где " "можно одновременно получить доступ как к пространству ядра, так и к " "пользовательскому пространству." #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:206 #: documentation/content/en/articles/linux-emulation/_index.adoc:288 #, no-wrap msgid "Syscalls" msgstr "Системные вызовы" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:209 msgid "" "Syscalls on FreeBSD are issued by executing interrupt `0x80` with register `" "%eax` set to a desired syscall number with arguments passed on the stack." msgstr "" "Системные вызовы в FreeBSD выполняются путем прерывания `0x80` с " "установленным в регистре `%eax` номером нужного системного вызова и " "аргументами, переданными через стек." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:215 msgid "" "When a process issues an interrupt `0x80`, the `int0x80` syscall trap " "handler is issued (defined in [.filename]#sys/i386/i386/exception.s#), which " "prepares arguments (i.e. copies them on to the stack) for a call to a C " "function man:syscall[2] (defined in [.filename]#sys/i386/i386/trap.c#), " "which processes the passed in trapframe. The processing consists of " "preparing the syscall (depending on the `sysvec` entry), determining if the " "syscall is 32-bit or 64-bit one (changes size of the parameters), then the " "parameters are copied, including the syscall. Next, the actual syscall " "function is executed with processing of the return code (special cases for " "`ERESTART` and `EJUSTRETURN` errors). Finally an `userret()` is scheduled, " "switching the process back to the users-pace. The parameters to the actual " "syscall handler are passed in the form of `struct thread *td`, `struct " "syscall args *` arguments where the second parameter is a pointer to the " "copied in structure of parameters." msgstr "" "Когда процесс вызывает прерывание `0x80`, срабатывает обработчик системного " "вызова `int0x80` (определённый в [.filename]#sys/i386/i386/exception.s#), " "который подготавливает аргументы (т.е. копирует их в стек) для вызова " "функции на языке C man:syscall[2] (определённой в [.filename]#sys/i386/i386/" "trap.c#), обрабатывающей переданный фрейм прерывания. Обработка включает " "подготовку системного вызова (в зависимости от записи `sysvec`), определение " "разрядности системного вызова (32-битный или 64-битный, что влияет на размер " "параметров), после чего параметры копируются, включая сам системный вызов. " "Затем выполняется фактическая функция системного вызова с обработкой кода " "возврата (особые случаи для ошибок `ERESTART` и `EJUSTRETURN`). В завершение " "планируется вызов `userret()`, возвращающий процесс в пользовательское " "пространство. Параметры для фактического обработчика системного вызова " "передаются в виде аргументов `struct thread *td`, `struct syscall args *`, " "где второй параметр является указателем на скопированную структуру " "параметров." #. type: Title === #: documentation/content/en/articles/linux-emulation/_index.adoc:217 #: documentation/content/en/articles/linux-emulation/_index.adoc:307 #: documentation/content/en/articles/linux-emulation/_index.adoc:794 #, no-wrap msgid "Traps" msgstr "Ловушки (trap)" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:224 msgid "" "Handling of traps in FreeBSD is similar to the handling of syscalls. " "Whenever a trap occurs, an assembler handler is called. It is chosen " "between alltraps, alltraps with regs pushed or calltrap depending on the " "type of the trap. This handler prepares arguments for a call to a C " "function `trap()` (defined in [.filename]#sys/i386/i386/trap.c#), which then " "processes the occurred trap. After the processing it might send a signal to " "the process and/or exit to userland using `userret()`." msgstr "" "Обработка ловушек в FreeBSD аналогична обработке системных вызовов. При " "возникновении ловушки вызывается обработчик на ассемблере. Он выбирается " "между `alltraps`, `alltraps` с сохранением регистров или `calltrap` в " "зависимости от типа ловушки. Этот обработчик подготавливает аргументы для " "вызова функции на языке C `trap()` (определена в [.filename]#sys/i386/i386/" "trap.c#), которая затем обрабатывает произошедшую ловушку. После обработки " "она может отправить сигнал процессу и/или вернуться в пользовательское " "пространство с помощью `userret()`." #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:226 #: documentation/content/en/articles/linux-emulation/_index.adoc:312 #, no-wrap msgid "Exits" msgstr "Выходы" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:230 msgid "" "Exits from kernel to userspace happen using the assembler routine `doreti` " "regardless of whether the kernel was entered via a trap or via a syscall. " "This restores the program status from the stack and returns to the userspace." msgstr "" "Выход из ядра в пользовательское пространство происходит с использованием " "ассемблерной процедуры `doreti`, независимо от того, было ли ядро вызвано " "через ловушку или через системный вызов. Это восстанавливает состояние " "программы из стека и возвращает управление в пользовательское пространство." #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:232 #: documentation/content/en/articles/linux-emulation/_index.adoc:318 #, no-wrap msgid "UNIX(R) primitives" msgstr "Примитивы UNIX(R)" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:238 msgid "" "FreeBSD operating system adheres to the traditional UNIX(R) scheme, where " "every process has a unique identification number, the so called _PID_ " "(Process ID). PID numbers are allocated either linearly or randomly ranging " "from `0` to `PID_MAX`. The allocation of PID numbers is done using linear " "searching of PID space. Every thread in a process receives the same PID " "number as result of the man:getpid[2] call." msgstr "" "Операционная система FreeBSD придерживается традиционной схемы UNIX(R), где " "каждый процесс имеет уникальный идентификационный номер, так называемый " "_PID_ (Идентификатор Процесса). Номера PID выделяются либо линейно, либо " "случайным образом в диапазоне от `0` до `PID_MAX`. Распределение номеров PID " "осуществляется с помощью линейного поиска в пространстве PID. Каждый поток в " "процессе получает тот же номер PID в результате вызова man:getpid[2]." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:249 msgid "" "There are currently two ways to implement threading in FreeBSD. The first " "way is M:N threading followed by the 1:1 threading model. The default " "library used is M:N threading (`libpthread`) and you can switch at runtime " "to 1:1 threading (`libthr`). The plan is to switch to 1:1 library by " "default soon. Although those two libraries use the same kernel primitives, " "they are accessed through different API(es). The M:N library uses the " "`kse_*` family of syscalls while the 1:1 library uses the `thr_*` family of " "syscalls. Due to this, there is no general concept of thread ID shared " "between kernel and userspace. Of course, both threading libraries implement " "the pthread thread ID API. Every kernel thread (as described by `struct " "thread`) has td tid identifier but this is not directly accessible from " "userland and solely serves the kernel's needs. It is also used for 1:1 " "threading library as pthread's thread ID but handling of this is internal to " "the library and cannot be relied on." msgstr "" "В настоящее время в FreeBSD существует два способа реализации потоков. " "Первый способ — это M:N потоки, за которым следует модель потоков 1:1. По " "умолчанию используется библиотека M:N (`libpthread`), но во время выполнения " "можно переключиться на потоки 1:1 (`libthr`). Планируется в ближайшее время " "перейти на библиотеку 1:1 по умолчанию. Хотя обе библиотеки используют одни " "и те же примитивы ядра, доступ к ним осуществляется через разные API. " "Библиотека M:N использует семейство системных вызовов `kse_*`, тогда как " "библиотека 1:1 использует семейство `thr_*`. Из-за этого отсутствует общая " "концепция идентификатора потока, разделяемая между ядром и пользовательским " "пространством. Конечно, обе библиотеки реализуют API идентификатора потока " "pthread. У каждого потока ядра (как описано в `struct thread`) есть " "идентификатор td tid, но он недоступен напрямую из пользовательского " "пространства и служит исключительно нуждам ядра. Он также используется в " "библиотеке потоков 1:1 в качестве идентификатора потока pthread, но " "обработка этого идентификатора внутренняя для библиотеки и не может быть " "использована напрямую." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:257 msgid "" "As stated previously there are two implementations of threading in FreeBSD. " "The M:N library divides the work between kernel space and userspace. Thread " "is an entity that gets scheduled in the kernel but it can represent various " "number of userspace threads. M userspace threads get mapped to N kernel " "threads thus saving resources while keeping the ability to exploit " "multiprocessor parallelism. Further information about the implementation " "can be obtained from the man page or [1]. The 1:1 library directly maps a " "userland thread to a kernel thread thus greatly simplifying the scheme. " "None of these designs implement a fairness mechanism (such a mechanism was " "implemented but it was removed recently because it caused serious slowdown " "and made the code more difficult to deal with)." msgstr "" "Как упоминалось ранее, в FreeBSD существуют две реализации потоков. " "Библиотека M:N разделяет работу между пространством ядра и пользовательским " "пространством. Поток — это сущность, которая планируется в ядре, но может " "представлять различное количество пользовательских потоков. M " "пользовательских потоков отображаются на N потоков ядра, что позволяет " "экономить ресурсы, сохраняя при этом возможность использовать преимущества " "многопроцессорного параллелизма. Дополнительную информацию о реализации " "можно получить из man-страницы или [1]. Библиотека 1:1 напрямую отображает " "пользовательский поток на поток ядра, что значительно упрощает схему. Ни " "одна из этих реализаций не включает механизм справедливости (такой механизм " "был реализован, но недавно удалён, поскольку вызывал серьёзное замедление и " "усложнял работу с кодом)." #. type: Title === #: documentation/content/en/articles/linux-emulation/_index.adoc:259 #, no-wrap msgid "What is Linux(R)" msgstr "Что такое Linux(R)" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:263 msgid "" "Linux(R) is a UNIX(R)-like kernel originally developed by Linus Torvalds, " "and now being contributed to by a massive crowd of programmers all around " "the world. From its mere beginnings to today, with wide support from " "companies such as IBM or Google, Linux(R) is being associated with its fast " "development pace, full hardware support and benevolent dictator model of " "organization." msgstr "" "Linux(R) — это UNIX(R)-подобное ядро, изначально разработанное Линусом " "Торвальдсом, а сейчас развиваемое множеством программистов по всему миру. От " "своих скромных начал до сегодняшнего дня, при широкой поддержке таких " "компаний, как IBM или Google, Linux(R) ассоциируется с быстрым темпом " "разработки, полной поддержкой оборудования и моделью организации по принципу " "\"доброжелательного диктатора\"." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:267 msgid "" "Linux(R) development started in 1991 as a hobbyist project at University of " "Helsinki in Finland. Since then it has obtained all the features of a " "modern UNIX(R)-like OS: multiprocessing, multiuser support, virtual memory, " "networking, basically everything is there. There are also highly advanced " "features like virtualization etc." msgstr "" "Разработка Linux(R) началась в 1991 году как любительский проект в " "Университете Хельсинки, Финляндия. С тех пор она приобрела все черты " "современной ОС, подобной UNIX(R): многопроцессорность, поддержка " "многопользовательского режима, виртуальная память, сетевое взаимодействие — " "в общем, всё необходимое. Также присутствуют высокоуровневые функции, такие " "как виртуализация и т. д." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:270 msgid "" "As of 2006 Linux(R) seems to be the most widely used open source operating " "system with support from independent software vendors like Oracle, " "RealNetworks, Adobe, etc. Most of the commercial software distributed for " "Linux(R) can only be obtained in a binary form so recompilation for other " "operating systems is impossible." msgstr "" "В 2006 году Linux(R), похоже, был наиболее широко используемой открытой " "операционной системой с поддержкой независимых поставщиков программного " "обеспечения, таких как Oracle, RealNetworks, Adobe и других. Большая часть " "коммерческого программного обеспечения, распространяемого для Linux(R), " "доступна только в бинарном виде, поэтому перекомпиляция для других " "операционных систем невозможна." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:275 msgid "" "Most of the Linux(R) development happens in a Git version control system. " "Git is a distributed system so there is no central source of the Linux(R) " "code, but some branches are considered prominent and official. The version " "number scheme implemented by Linux(R) consists of four numbers A.B.C.D. " "Currently development happens in 2.6.C.D, where C represents major version, " "where new features are added or changed while D is a minor version for " "bugfixes only." msgstr "" "Большая часть разработки Linux(R) происходит в системе контроля версий Git. " "Git — это распределённая система, поэтому нет централизованного источника " "кода Linux(R), но некоторые ветви считаются основными и официальными. Схема " "нумерации версий, используемая в Linux(R), состоит из четырёх чисел: A.B.C." "D. В настоящее время разработка ведётся в ветке 2.6.C.D, где C обозначает " "мажорную версию, в которую добавляются или изменяются функции, а D — " "минорную версию, предназначенную только для исправления ошибок." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:277 msgid "More information can be obtained from [3]." msgstr "Дополнительную информацию можно получить из [3]." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:286 msgid "" "Linux(R) follows the traditional UNIX(R) scheme of dividing the run of a " "process in two halves: the kernel and user space. The kernel can be entered " "in two ways: via a trap or via a syscall. The return is handled only in one " "way. The further description applies to Linux(R) 2.6 on the i386(TM) " "architecture. This information was taken from [2]." msgstr "" "Linux(R) следует традиционной схеме UNIX(R), разделяя выполнение процесса на " "две части: ядро и пользовательское пространство. Ядро может быть вызвано " "двумя способами: через ловушку (trap) или через системный вызов. Возврат " "осуществляется только одним способом. Далее описание относится к Linux(R) " "2.6 на архитектуре i386(TM). Эта информация взята из [2]." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:296 msgid "" "Syscalls in Linux(R) are performed (in userspace) using `syscallX` macros " "where X substitutes a number representing the number of parameters of the " "given syscall. This macro translates to a code that loads `%eax` register " "with a number of the syscall and executes interrupt `0x80`. After this " "syscall return is called, which translates negative return values to " "positive `errno` values and sets `res` to `-1` in case of an error. " "Whenever the interrupt `0x80` is called the process enters the kernel in " "system call trap handler. This routine saves all registers on the stack and " "calls the selected syscall entry. Note that the Linux(R) calling convention " "expects parameters to the syscall to be passed via registers as shown here:" msgstr "" "Системные вызовы в Linux(R) выполняются (в пользовательском пространстве) с " "использованием макросов `syscallX`, где X заменяется числом, представляющим " "количество параметров данного системного вызова. Этот макрос преобразуется в " "код, который загружает регистр `%eax` номером системного вызова и выполняет " "прерывание `0x80`. После этого вызывается возврат из системного вызова, " "который преобразует отрицательные значения возврата в положительные значения " "`errno` и устанавливает `res` в `-1` в случае ошибки. При вызове прерывания " "`0x80` процесс переходит в ядро в обработчик ловушки системного вызова. Эта " "процедура сохраняет все регистры в стеке и вызывает выбранную точку входа " "системного вызова. Обратите внимание, что соглашение о вызовах Linux(R) " "предполагает передачу параметров системного вызова через регистры, как " "показано здесь:" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:298 msgid "parameter -> `%ebx`" msgstr "параметр -> `%ebx`" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:299 msgid "parameter -> `%ecx`" msgstr "параметр -> `%ecx`" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:300 msgid "parameter -> `%edx`" msgstr "параметр -> `%edx`" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:301 msgid "parameter -> `%esi`" msgstr "параметр -> `%esi`" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:302 msgid "parameter -> `%edi`" msgstr "параметр -> `%edi`" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:303 msgid "parameter -> `%ebp`" msgstr "параметр -> `%ebp`" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:305 msgid "" "There are some exceptions to this, where Linux(R) uses different calling " "convention (most notably the `clone` syscall)." msgstr "" "Существуют некоторые исключения из этого правила, где Linux(R) использует " "другие соглашения о вызовах (наиболее примечателен системный вызов `clone`)." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:310 msgid "" "The trap handlers are introduced in [.filename]#arch/i386/kernel/traps.c# " "and most of these handlers live in [.filename]#arch/i386/kernel/entry.S#, " "where handling of the traps happens." msgstr "" "Обработчики ловушек представлены в файле [.filename]#arch/i386/kernel/traps." "c#, а большинство этих обработчиков находятся в [.filename]#arch/i386/kernel/" "entry.S#, где происходит обработка ловушек." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:316 msgid "" "Return from the syscall is managed by syscall man:exit[3], which checks for " "the process having unfinished work, then checks whether we used user-" "supplied selectors. If this happens stack fixing is applied and finally the " "registers are restored from the stack and the process returns to the " "userspace." msgstr "" "Возврат из системного вызова обрабатывается функцией `syscall man:exit[3]`, " "которая проверяет, есть ли у процесса незавершённые задачи, затем проверяет, " "использовались ли селекторы, предоставленные пользователем. Если это " "произошло, применяется исправление стека, и, наконец, регистры " "восстанавливаются из стека, а процесс возвращается в пользовательское " "пространство." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:327 msgid "" "In the 2.6 version, the Linux(R) operating system redefined some of the " "traditional UNIX(R) primitives, notably PID, TID and thread. PID is defined " "not to be unique for every process, so for some processes (threads) man:" "getppid[2] returns the same value. Unique identification of process is " "provided by TID. This is because _NPTL_ (New POSIX(R) Thread Library) " "defines threads to be normal processes (so called 1:1 threading). Spawning " "a new process in Linux(R) 2.6 happens using the `clone` syscall (fork " "variants are reimplemented using it). This clone syscall defines a set of " "flags that affect behavior of the cloning process regarding thread " "implementation. The semantic is a bit fuzzy as there is no single flag " "telling the syscall to create a thread." msgstr "" "В версии 2.6 операционная система Linux(R) переопределила некоторые " "традиционные примитивы UNIX(R), в частности PID, TID и поток. PID " "определяется не как уникальный для каждого процесса, поэтому для некоторых " "процессов (потоков) man:getppid[2] возвращает одинаковое значение. " "Уникальная идентификация процесса обеспечивается TID. Это связано с тем, что " "_NPTL_ (New POSIX(R) Thread Library) определяет потоки как обычные процессы " "(так называемая модель 1:1). Создание нового процесса в Linux(R) 2.6 " "происходит с использованием системного вызова `clone` (варианты fork " "перереализованы с его использованием). Этот системный вызов clone определяет " "набор флагов, которые влияют на поведение процесса клонирования в отношении " "реализации потоков. Семантика немного размыта, так как нет единого флага, " "указывающего системному вызову создать поток." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:329 msgid "Implemented clone flags are:" msgstr "Реализованные флаги клонирования:" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:331 msgid "`CLONE_VM` - processes share their memory space" msgstr "`CLONE_VM` - процессы разделяют общее адресное пространство" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:332 msgid "`CLONE_FS` - share umask, cwd and namespace" msgstr "" "`CLONE_FS` — совместно использовать umask, текущий рабочий каталог и " "пространство имён" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:333 msgid "`CLONE_FILES` - share open files" msgstr "`CLONE_FILES` - совместно использовать открытые файлы" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:334 msgid "`CLONE_SIGHAND` - share signal handlers and blocked signals" msgstr "" "`CLONE_SIGHAND` - разделять обработчики сигналов и заблокированные сигналы" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:335 msgid "`CLONE_PARENT` - share parent" msgstr "`CLONE_PARENT` - использовать один процесс к качестве родительского" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:336 msgid "`CLONE_THREAD` - be thread (further explanation below)" msgstr "`CLONE_THREAD` — быть потоком (дальнейшие пояснения ниже)" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:337 msgid "`CLONE_NEWNS` - new namespace" msgstr "`CLONE_NEWNS` - новое пространство имен" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:338 msgid "`CLONE_SYSVSEM` - share SysV undo structures" msgstr "`CLONE_SYSVSEM` - совместное использование структур отмены SysV" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:339 msgid "`CLONE_SETTLS` - setup TLS at supplied address" msgstr "`CLONE_SETTLS` - настройка TLS по указанному адресу" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:340 msgid "`CLONE_PARENT_SETTID` - set TID in the parent" msgstr "`CLONE_PARENT_SETTID` - установить TID в родителе" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:341 msgid "`CLONE_CHILD_CLEARTID` - clear TID in the child" msgstr "`CLONE_CHILD_CLEARTID` - очистить TID в дочернем процессе" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:342 msgid "`CLONE_CHILD_SETTID` - set TID in the child" msgstr "`CLONE_CHILD_SETTID` - установить TID в дочернем процессе" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:348 msgid "" "`CLONE_PARENT` sets the real parent to the parent of the caller. This is " "useful for threads because if thread A creates thread B we want thread B to " "be parented to the parent of the whole thread group. `CLONE_THREAD` does " "exactly the same thing as `CLONE_PARENT`, `CLONE_VM` and `CLONE_SIGHAND`, " "rewrites PID to be the same as PID of the caller, sets exit signal to be " "none and enters the thread group. `CLONE_SETTLS` sets up GDT entries for " "TLS handling. The `CLONE_*_*TID` set of flags sets/clears user supplied " "address to TID or 0." msgstr "" "`CLONE_PARENT` устанавливает реального родителя в родителя вызывающего " "процесса. Это полезно для потоков, потому что если поток A создаёт поток B, " "мы хотим, чтобы поток B был привязан к родителю всей группы потоков. " "`CLONE_THREAD` делает то же самое, что `CLONE_PARENT`, `CLONE_VM` и " "`CLONE_SIGHAND`, перезаписывает PID, чтобы он совпадал с PID вызывающего " "процесса, устанавливает сигнал завершения в \"нет\" и входит в группу " "потоков. `CLONE_SETTLS` настраивает записи GDT для обработки TLS. Набор " "флагов `CLONE_*_*TID` устанавливает/сбрасывает предоставленный пользователем " "адрес в TID или 0." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:352 msgid "" "As you can see the `CLONE_THREAD` does most of the work and does not seem to " "fit the scheme very well. The original intention is unclear (even for " "authors, according to comments in the code) but I think originally there was " "one threading flag, which was then parcelled among many other flags but this " "separation was never fully finished. It is also unclear what this partition " "is good for as glibc does not use that so only hand-written use of the clone " "permits a programmer to access this features." msgstr "" "Как видно, `CLONE_THREAD` выполняет большую часть работы и не очень хорошо " "вписывается в схему. Первоначальный замысел неясен (даже для авторов, " "согласно комментариям в коде), но я думаю, изначально был один флаг для " "потоков, который затем был разделён на множество других флагов, но это " "разделение так и не было завершено. Также непонятно, для чего нужно это " "разделение, так как glibc не использует его, и только ручное использование " "clone позволяет программисту получить доступ к этим возможностям." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:355 msgid "" "For non-threaded programs the PID and TID are the same. For threaded " "programs the first thread PID and TID are the same and every created thread " "shares the same PID and gets assigned a unique TID (because `CLONE_THREAD` " "is passed in) also parent is shared for all processes forming this threaded " "program." msgstr "" "Для непоточных программ PID и TID совпадают. Для поточных программ первый " "поток имеет одинаковые PID и TID, а каждый созданный поток разделяет тот же " "PID и получает уникальный TID (поскольку передаётся `CLONE_THREAD`), также " "родительский процесс общий для всех процессов, образующих эту поточную " "программу." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:357 msgid "" "The code that implements man:pthread_create[3] in NPTL defines the clone " "flags like this:" msgstr "" "Код, реализующий man:pthread_create[3] в NPTL, определяет флаги clone " "следующим образом:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:361 #, no-wrap msgid "int clone_flags = (CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGNAL\n" msgstr "int clone_flags = (CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGNAL\n" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:363 #, no-wrap msgid " | CLONE_SETTLS | CLONE_PARENT_SETTID\n" msgstr " | CLONE_SETTLS | CLONE_PARENT_SETTID\n" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:366 #, no-wrap msgid "" "| CLONE_CHILD_CLEARTID | CLONE_SYSVSEM\n" "#if __ASSUME_NO_CLONE_DETACHED == 0\n" msgstr "" "| CLONE_CHILD_CLEARTID | CLONE_SYSVSEM\n" "#if __ASSUME_NO_CLONE_DETACHED == 0\n" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:369 #, no-wrap msgid "" "| CLONE_DETACHED\n" "#endif\n" msgstr "" "| CLONE_DETACHED\n" "#endif\n" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:371 #, no-wrap msgid "| 0);\n" msgstr "| 0);\n" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:374 msgid "The `CLONE_SIGNAL` is defined like" msgstr "`CLONE_SIGNAL` определен как" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:378 #, no-wrap msgid "#define CLONE_SIGNAL (CLONE_SIGHAND | CLONE_THREAD)\n" msgstr "#define CLONE_SIGNAL (CLONE_SIGHAND | CLONE_THREAD)\n" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:381 msgid "the last 0 means no signal is sent when any of the threads exits." msgstr "" "последний 0 означает, что сигнал не отправляется при завершении любого из " "потоков." #. type: Title === #: documentation/content/en/articles/linux-emulation/_index.adoc:383 #, no-wrap msgid "What is emulation" msgstr "Что такое эмуляция" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:388 msgid "" "According to a dictionary definition, emulation is the ability of a program " "or device to imitate another program or device. This is achieved by " "providing the same reaction to a given stimulus as the emulated object. In " "practice, the software world mostly sees three types of emulation - a " "program used to emulate a machine (QEMU, various game console emulators " "etc.), software emulation of a hardware facility (OpenGL emulators, floating " "point units emulation etc.) and operating system emulation (either in kernel " "of the operating system or as a userspace program)." msgstr "" "Согласно словарному определению, эмуляция — это способность программы или " "устройства имитировать другую программу или устройство. Это достигается за " "счёт предоставления той же реакции на заданный стимул, что и у эмулируемого " "объекта. На практике в мире программного обеспечения в основном встречаются " "три типа эмуляции — программа, используемая для эмуляции машины (QEMU, " "различные эмуляторы игровых консолей и т.д.), программная эмуляция " "аппаратного обеспечения (эмуляторы OpenGL, эмуляция блоков плавающей запятой " "и т.д.) и эмуляция операционной системы (либо в ядре операционной системы, " "либо в виде программы пользовательского пространства)." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:395 msgid "" "Emulation is usually used in a place, where using the original component is " "not feasible nor possible at all. For example someone might want to use a " "program developed for a different operating system than they use. Then " "emulation comes in handy. Sometimes there is no other way but to use " "emulation - e.g. when the hardware device you try to use does not exist (yet/" "anymore) then there is no other way but emulation. This happens often when " "porting an operating system to a new (non-existent) platform. Sometimes it " "is just cheaper to emulate." msgstr "" "Эмуляция обычно используется в тех случаях, когда применение оригинального " "компонента невозможно или нецелесообразно. Например, может возникнуть " "необходимость использовать программу, разработанную для другой операционной " "системы. В такой ситуации на помощь приходит эмуляция. Иногда эмуляция — " "единственный возможный вариант, например, когда необходимое аппаратное " "устройство ещё не существует или уже не выпускается. Такое часто происходит " "при переносе операционной системы на новую (ещё не существующую) платформу. " "Иногда эмуляция просто экономически выгоднее." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:407 msgid "" "Looking from an implementation point of view, there are two main approaches " "to the implementation of emulation. You can either emulate the whole thing " "- accepting possible inputs of the original object, maintaining inner state " "and emitting correct output based on the state and/or input. This kind of " "emulation does not require any special conditions and basically can be " "implemented anywhere for any device/program. The drawback is that " "implementing such emulation is quite difficult, time-consuming and error-" "prone. In some cases we can use a simpler approach. Imagine you want to " "emulate a printer that prints from left to right on a printer that prints " "from right to left. It is obvious that there is no need for a complex " "emulation layer but simply reversing of the printed text is sufficient. " "Sometimes the emulating environment is very similar to the emulated one so " "just a thin layer of some translation is necessary to provide fully working " "emulation! As you can see this is much less demanding to implement, so less " "time-consuming and error-prone than the previous approach. But the " "necessary condition is that the two environments must be similar enough. " "The third approach combines the two previous. Most of the time the objects " "do not provide the same capabilities so in a case of emulating the more " "powerful one on the less powerful we have to emulate the missing features " "with full emulation described above." msgstr "" "С точки зрения реализации, существует два основных подхода к эмуляции. Вы " "можете либо эмулировать всё целиком — принимать возможные входные данные " "исходного объекта, поддерживать внутреннее состояние и выдавать корректные " "выходные данные на основе состояния и/или входных данных. Такой вид эмуляции " "не требует каких-либо специальных условий и, в принципе, может быть " "реализован где угодно для любого устройства/программы. Недостаток в том, что " "реализация такой эмуляции довольно сложна, трудоёмка и подвержена ошибкам. В " "некоторых случаях можно использовать более простой подход. Представьте, что " "вы хотите эмулировать принтер, печатающий слева направо, на принтере, " "который печатает справа налево. Очевидно, что нет необходимости в сложном " "слое эмуляции — достаточно просто перевернуть печатаемый текст. Иногда " "эмулирующая среда очень похожа на эмулируемую, и тогда достаточно тонкого " "слоя преобразования для обеспечения полностью рабочей эмуляции! Как видите, " "такой подход гораздо менее требователен к реализации, а значит, менее " "трудоёмок и подвержен ошибкам, чем предыдущий. Однако необходимое условие — " "две среды должны быть достаточно схожи. Третий подход сочетает в себе два " "предыдущих. Чаще всего объекты не предоставляют одинаковые возможности, " "поэтому в случае эмуляции более мощного объекта на менее мощном приходится " "эмулировать отсутствующие функции с помощью полной эмуляции, описанной выше." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:410 msgid "" "This master thesis deals with emulation of UNIX(R) on UNIX(R), which is " "exactly the case, where only a thin layer of translation is sufficient to " "provide full emulation. The UNIX(R) API consists of a set of syscalls, " "which are usually self contained and do not affect some global kernel state." msgstr "" "Эта магистерская диссертация посвящена эмуляции UNIX(R) на UNIX(R), что " "является именно тем случаем, когда достаточно тонкого слоя трансляции для " "обеспечения полной эмуляции. API UNIX(R) состоит из набора системных " "вызовов, которые обычно самодостаточны и не влияют на глобальное состояние " "ядра." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:412 msgid "" "There are a few syscalls that affect inner state but this can be dealt with " "by providing some structures that maintain the extra state." msgstr "" "Существует несколько системных вызовов, которые влияют на внутреннее " "состояние, но это можно решить, предоставив некоторые структуры, " "поддерживающие дополнительное состояние." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:416 msgid "" "No emulation is perfect and emulations tend to lack some parts but this " "usually does not cause any serious drawbacks. Imagine a game console " "emulator that emulates everything but music output. No doubt that the games " "are playable and one can use the emulator. It might not be that comfortable " "as the original game console but its an acceptable compromise between price " "and comfort." msgstr "" "Эмуляция не бывает идеальной, и в эмуляторах часто чего-то не хватает, но " "обычно это не вызывает серьёзных проблем. Представьте эмулятор игровой " "приставки, который эмулирует всё, кроме звука. Без сомнения, игры остаются " "играбельными, и эмулятором можно пользоваться. Возможно, это не так " "комфортно, как оригинальная приставка, но это приемлемый компромисс между " "ценой и удобством." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:420 msgid "" "The same goes with the UNIX(R) API. Most programs can live with a very " "limited set of syscalls working. Those syscalls tend to be the oldest ones " "(man:read[2]/man:write[2], man:fork[2] family, man:signal[3] handling, man:" "exit[3], man:socket[2] API) hence it is easy to emulate because their " "semantics is shared among all UNIX(R)es, which exist todays." msgstr "" "То же самое касается UNIX(R) API. Большинство программ могут работать с " "очень ограниченным набором системных вызовов. Эти вызовы, как правило, " "являются самыми старыми (man:read[2]/man:write[2], семейство man:fork[2], " "обработка man:signal[3], man:exit[3], API man:socket[2]), поэтому их легко " "эмулировать, поскольку их семантика одинакова во всех современных UNIX(R)-" "подобных системах." #. type: Title == #: documentation/content/en/articles/linux-emulation/_index.adoc:422 #, no-wrap msgid "Emulation" msgstr "Эмуляция" #. type: Title === #: documentation/content/en/articles/linux-emulation/_index.adoc:424 #, no-wrap msgid "How emulation works in FreeBSD" msgstr "Как работает эмуляция в FreeBSD" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:429 msgid "" "As stated earlier, FreeBSD supports running binaries from several other " "UNIX(R)es. This works because FreeBSD has an abstraction called the " "execution class loader. This wedges into the man:execve[2] syscall, so when " "man:execve[2] is about to execute a binary it examines its type." msgstr "" "Как упоминалось ранее, FreeBSD поддерживает выполнение бинарных файлов из " "нескольких других UNIX(R)-подобных систем. Это возможно благодаря наличию в " "FreeBSD абстракции, называемой загрузчик классов исполнения. Он " "интегрируется в системный вызов man:execve[2], поэтому когда man:execve[2] " "собирается выполнить бинарный файл, он анализирует его тип." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:435 msgid "" "There are basically two types of binaries in FreeBSD. Shell-like text " "scripts which are identified by `#!` as their first two characters and " "normal (typically _ELF_) binaries, which are a representation of a compiled " "executable object. The vast majority (one could say all of them) of " "binaries in FreeBSD are from type ELF. ELF files contain a header, which " "specifies the OS ABI for this ELF file. By reading this information, the " "operating system can accurately determine what type of binary the given file " "is." msgstr "" "В FreeBSD существуют два основных типа исполняемых файлов. Текстовые " "скрипты, подобные shell-скриптам, которые идентифицируются по первым двум " "символам `#!`, и обычные (как правило, _ELF_) бинарные файлы, представляющие " "собой скомпилированные исполняемые объекты. Подавляющее большинство (можно " "сказать, все) исполняемых файлов в FreeBSD относятся к типу ELF. Файлы ELF " "содержат заголовок, который определяет ABI операционной системы для данного " "ELF-файла. Считывая эту информацию, операционная система может точно " "определить, к какому типу относится данный исполняемый файл." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:441 msgid "" "Every OS ABI must be registered in the FreeBSD kernel. This applies to the " "FreeBSD native OS ABI, as well. So when man:execve[2] executes a binary it " "iterates through the list of registered APIs and when it finds the right one " "it starts to use the information contained in the OS ABI description (its " "syscall table, `errno` translation table, etc.). So every time the process " "calls a syscall, it uses its own set of syscalls instead of some global " "one. This effectively provides a very elegant and easy way of supporting " "execution of various binary formats." msgstr "" "Каждый ABI ОС должен быть зарегистрирован в ядре FreeBSD. Это относится и к " "родному ABI ОС FreeBSD. Таким образом, когда man:execve[2] выполняет " "двоичный файл, он перебирает список зарегистрированных API, и когда находит " "подходящий, начинает использовать информацию, содержащуюся в описании ABI ОС " "(его таблицу системных вызовов, таблицу преобразования `errno` и т.д.). " "Таким образом, каждый раз, когда процесс вызывает системный вызов, он " "использует свой собственный набор системных вызовов вместо какого-либо " "глобального. Это обеспечивает очень элегантный и простой способ поддержки " "выполнения различных двоичных форматов." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:446 msgid "" "The nature of emulation of different OSes (and also some other subsystems) " "led developers to invite a handler event mechanism. There are various " "places in the kernel, where a list of event handlers are called. Every " "subsystem can register an event handler and they are called accordingly. " "For example, when a process exits there is a handler called that possibly " "cleans up whatever the subsystem needs to be cleaned." msgstr "" "Природа эмуляции различных ОС (а также некоторых других подсистем) привела " "разработчиков к внедрению механизма обработчиков событий. В ядре существует " "множество мест, где вызывается список обработчиков событий. Каждая " "подсистема может зарегистрировать обработчик событий, и они вызываются " "соответствующим образом. Например, при завершении процесса вызывается " "обработчик, который может выполнить необходимую очистку для подсистемы." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:448 msgid "" "Those simple facilities provide basically everything that is needed for the " "emulation infrastructure and in fact these are basically the only things " "necessary to implement the Linux(R) emulation layer." msgstr "" "Те простые средства предоставляют практически всё необходимое для " "инфраструктуры эмуляции, и, по сути, это единственное, что требуется для " "реализации слоя эмуляции Linux(R)." #. type: Title === #: documentation/content/en/articles/linux-emulation/_index.adoc:450 #, no-wrap msgid "Common primitives in the FreeBSD kernel" msgstr "Общие примитивы в ядре FreeBSD" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:454 msgid "" "Emulation layers need some support from the operating system. I am going to " "describe some of the supported primitives in the FreeBSD operating system." msgstr "" "Для работы слоев эмуляции требуется некоторая поддержка со стороны " "операционной системы. Я расскажу о некоторых поддерживаемых примитивах в " "операционной системе FreeBSD." #. type: Title ==== #: documentation/content/en/articles/linux-emulation/_index.adoc:456 #, no-wrap msgid "Locking primitives" msgstr "Примитивы синхронизации" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:459 msgid "Contributed by: `{attilio}`" msgstr "Добавил: `{attilio}`" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:461 msgid "" "The FreeBSD synchronization primitive set is based on the idea to supply a " "rather huge number of different primitives in a way that the better one can " "be used for every particular, appropriate situation." msgstr "" "Примитивы синхронизации FreeBSD основаны на идее предоставления достаточно " "большого количества различных примитивов таким образом, чтобы для каждой " "конкретной подходящей ситуации можно было использовать наилучший." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:463 msgid "" "To a high level point of view you can consider three kinds of " "synchronization primitives in the FreeBSD kernel:" msgstr "" "На высоком уровне можно выделить три вида примитивов синхронизации в ядре " "FreeBSD:" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:465 msgid "atomic operations and memory barriers" msgstr "атомарные операции и барьеры памяти" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:466 msgid "locks" msgstr "блокировки" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:467 msgid "scheduling barriers" msgstr "барьеры планирования" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:470 msgid "" "Below there are descriptions for the 3 families. For every lock, you should " "really check the linked manpage (where possible) for more detailed " "explanations." msgstr "" "Ниже приведены описания для 3 семейств. Для каждой блокировки рекомендуется " "ознакомиться с соответствующей справочной страницей (где это возможно), " "чтобы получить более подробные объяснения." #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:472 #, no-wrap msgid "Atomic operations and memory barriers" msgstr "Атомарные операции и барьеры памяти" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:483 msgid "" "Atomic operations are implemented through a set of functions performing " "simple arithmetics on memory operands in an atomic way with respect to " "external events (interrupts, preemption, etc.). Atomic operations can " "guarantee atomicity just on small data types (in the magnitude order of the " "`.long.` architecture C data type), so should be rarely used directly in the " "end-level code, if not only for very simple operations (like flag setting in " "a bitmap, for example). In fact, it is rather simple and common to write " "down a wrong semantic based on just atomic operations (usually referred as " "lock-less). The FreeBSD kernel offers a way to perform atomic operations in " "conjunction with a memory barrier. The memory barriers will guarantee that " "an atomic operation will happen following some specified ordering with " "respect to other memory accesses. For example, if we need that an atomic " "operation happen just after all other pending writes (in terms of " "instructions reordering buffers activities) are completed, we need to " "explicitly use a memory barrier in conjunction to this atomic operation. So " "it is simple to understand why memory barriers play a key role for higher-" "level locks building (just as refcounts, mutexes, etc.). For a detailed " "explanatory on atomic operations, please refer to man:atomic[9]. It is far, " "however, noting that atomic operations (and memory barriers as well) should " "ideally only be used for building front-ending locks (as mutexes)." msgstr "" "Атомарные операции реализуются через набор функций, выполняющих простые " "арифметические действия над операндами в памяти атомарным образом по " "отношению к внешним событиям (прерываниям, вытеснению и т. д.). Атомарные " -"операции могут гарантировать атомарность только для небольших типов данных " -"(порядка величины типа `.long` в архитектуре C), поэтому их следует редко " -"использовать напрямую в конечном коде, разве что для очень простых операций " -"(например, установки флага в битовой карте). На самом деле довольно просто и " +"операции могут гарантировать атомарность только для небольших типов данных (" +"порядка величины типа `.long` в архитектуре C), поэтому их следует редко " +"использовать напрямую в конечном коде, разве что для очень простых операций (" +"например, установки флага в битовой карте). На самом деле довольно просто и " "часто можно допустить семантическую ошибку, полагаясь только на атомарные " "операции (обычно называемые lock-less). Ядро FreeBSD предоставляет способ " "выполнения атомарных операций в сочетании с барьерами памяти. Барьеры памяти " -"гарантируют, что атомарная операция произойдет в определенном порядке " +"гарантируют, что атомарная операция произойдет в определённом порядке " "относительно других обращений к памяти. Например, если нам нужно, чтобы " "атомарная операция выполнилась только после завершения всех ожидающих " "операций записи (с точки зрения переупорядочивания буферов инструкций), нам " "необходимо явно использовать барьер памяти вместе с этой атомарной " "операцией. Таким образом, легко понять, почему барьеры памяти играют " "ключевую роль в построении высокоуровневых блокировок (таких как refcounts, " "мьютексы и т. д.). Для подробного объяснения атомарных операций обратитесь к " "man:atomic[9]. Однако важно отметить, что атомарные операции (и барьеры " "памяти тоже) в идеале должны использоваться только для построения фронтенд-" "блокировок (например, мьютексов)." #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:485 #, no-wrap msgid "Refcounts" msgstr "Счетчики ссылок (refcount)" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:491 msgid "" "Refcounts are interfaces for handling reference counters. They are " "implemented through atomic operations and are intended to be used just for " "cases, where the reference counter is the only one thing to be protected, so " "even something like a spin-mutex is deprecated. Using the refcount " "interface for structures, where a mutex is already used is often wrong since " "we should probably close the reference counter in some already protected " "paths. A manpage discussing refcount does not exist currently, just check [." "filename]#sys/refcount.h# for an overview of the existing API." msgstr "" "Счетчики ссылок (refcounts) — это интерфейсы для работы с подсчетом ссылок. " "Они реализованы с использованием атомарных операций и предназначены для " "случаев, когда счетчик ссылок — это единственное, что требует защиты, " "поэтому даже такие механизмы, как спин-мьютекс, не рекомендуются. " "Использование интерфейса refcount для структур, где уже применяется мьютекс, " "часто является ошибкой, так как, вероятно, следует защитить счетчик ссылок в " "рамках уже существующих защищенных участков кода. В настоящее время man-" "страница, посвященная refcount, отсутствует; для обзора существующего API " "обратитесь к [.filename]#sys/refcount.h#." #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:493 #, no-wrap msgid "Locks" msgstr "Блокировки" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:498 msgid "" "FreeBSD kernel has huge classes of locks. Every lock is defined by some " "peculiar properties, but probably the most important is the event linked to " "contesting holders (or in other terms, the behavior of threads unable to " "acquire the lock). FreeBSD's locking scheme presents three different " "behaviors for contenders:" msgstr "" "Ядро FreeBSD имеет множество классов блокировок. Каждая блокировка " "определяется некоторыми уникальными свойствами, но, вероятно, наиболее " "важным является событие, связанное с конкурирующими владельцами (или, " "другими словами, поведение потоков, неспособных захватить блокировку). Схема " "блокировок FreeBSD предлагает три различных поведения для конкурирующих " "потоков:" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:500 msgid "spinning" msgstr "вращающиеся" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:501 msgid "blocking" msgstr "блокирующие" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:502 msgid "sleeping" msgstr "спящие" #. type: delimited block = 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:506 msgid "numbers are not casual" msgstr "номера приведены не случайно" #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:509 #, no-wrap msgid "Spinning locks" msgstr "Вращающиеся блокировки" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:515 msgid "" "Spin locks let waiters to spin until they cannot acquire the lock. An " "important matter do deal with is when a thread contests on a spin lock if it " "is not descheduled. Since the FreeBSD kernel is preemptive, this exposes " "spin lock at the risk of deadlocks that can be solved just disabling " "interrupts while they are acquired. For this and other reasons (like lack " "of priority propagation support, poorness in load balancing schemes between " "CPUs, etc.), spin locks are intended to protect very small paths of code, or " "ideally not to be used at all if not explicitly requested (explained later)." msgstr "" "Спин-блокировки позволяют ожидающим потокам продолжать работу (вращаться), " "пока они не смогут захватить блокировку. Важным аспектом является ситуация, " "когда поток соревнуется за спин-блокировку и не вытесняется. Поскольку ядро " "FreeBSD является вытесняющим, это подвергает спин-блокировки риску " "взаимоблокировок, которые можно устранить только отключением прерываний на " "время их удержания. По этой и другим причинам (таким как отсутствие " "поддержки распространения приоритетов, неэффективность схем балансировки " "нагрузки между CPU и т.д.), спин-блокировки предназначены для защиты очень " "небольших участков кода или, в идеале, не должны использоваться вовсе, если " "это не требуется явно (об этом далее)." #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:517 #, no-wrap msgid "Blocking" msgstr "Блокирующие" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:522 msgid "" "Block locks let waiters to be descheduled and blocked until the lock owner " "does not drop it and wakes up one or more contenders. To avoid starvation " "issues, blocking locks do priority propagation from the waiters to the " "owner. Block locks must be implemented through the turnstile interface and " "are intended to be the most used kind of locks in the kernel, if no " "particular conditions are met." msgstr "" "Блокирующие блокировки позволяют ожидающим потокам быть выгруженными и " "заблокированными до тех пор, пока владелец блокировки не освободит её и не " "разбудит один или несколько конкурентов. Чтобы избежать проблем с " "голоданием, блокирующие блокировки передают приоритет от ожидающих к " "владельцу. Блокирующие блокировки должны быть реализованы через интерфейс " "турникета и предназначены для наиболее частого использования в ядре, если " "нет особых условий." #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:524 #, no-wrap msgid "Sleeping" msgstr "Спящие" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:529 msgid "" "Sleep locks let waiters to be descheduled and fall asleep until the lock " "holder does not drop it and wakes up one or more waiters. Since sleep locks " "are intended to protect large paths of code and to cater asynchronous " "events, they do not do any form of priority propagation. They must be " "implemented through the man:sleepqueue[9] interface." msgstr "" "Спящие блокировки (с ожиданием) позволяют ожидающим потокам быть " "вытесненными и заснуть до тех пор, пока держатель блокировки не освободит её " "и не разбудит один или несколько ожидающих. Поскольку блокировки с ожиданием " "предназначены для защиты больших участков кода и обработки асинхронных " "событий, они не поддерживают распространение приоритетов. Они должны быть " "реализованы через интерфейс man:sleepqueue[9]." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:533 msgid "" "The order used to acquire locks is very important, not only for the " "possibility to deadlock due at lock order reversals, but even because lock " "acquisition should follow specific rules linked to locks natures. If you " "give a look at the table above, the practical rule is that if a thread holds " "a lock of level n (where the level is the number listed close to the kind of " "lock) it is not allowed to acquire a lock of superior levels, since this " "would break the specified semantic for a path. For example, if a thread " "holds a block lock (level 2), it is allowed to acquire a spin lock (level 1) " "but not a sleep lock (level 3), since block locks are intended to protect " "smaller paths than sleep lock (these rules are not about atomic operations " "or scheduling barriers, however)." msgstr "" "Порядок захвата блокировок очень важен, не только из-за возможности " "взаимоблокировки при обратном порядке захвата, но и потому, что захват " "блокировок должен следовать определённым правилам, связанным с их природой. " "Если взглянуть на таблицу выше, практическое правило заключается в том, что " "если поток удерживает блокировку уровня n (где уровень — это число, " "указанное рядом с типом блокировки), ему запрещено захватывать блокировки " "более высоких уровней, так как это нарушит заданную семантику пути. " "Например, если поток удерживает блокирующую блокировку (уровень 2), ему " "разрешено захватывать спин-блокировку (уровень 1), но не спящую блокировку " "(уровень 3), поскольку блокирующие блокировки предназначены для защиты более " "коротких путей, чем спящие блокировки (однако эти правила не касаются " "атомарных операций или барьеров планирования)." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:535 msgid "This is a list of lock with their respective behaviors:" msgstr "Вот список блокировок с соответствующими типами поведения:" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:537 msgid "spin mutex - spinning - man:mutex[9]" msgstr "spin mutex – вращающийся режим – man:mutex[9]" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:538 msgid "sleep mutex - blocking - man:mutex[9]" msgstr "sleep mutex – блокирующий режим – man:mutex[9]" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:539 msgid "pool mutex - blocking - man:mtx[pool]" msgstr "pool mutex – блокирующий режим – man:mtx[pool]" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:540 msgid "" "sleep family - sleeping - man:sleep[9] pause tsleep msleep msleep spin " "msleep rw msleep sx" msgstr "" "Семейство функций sleep – спящий режим – man:sleep[9] pause tsleep msleep " "msleep_spin msleep_rw msleep_sx" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:541 msgid "condvar - sleeping - man:condvar[9]" msgstr "condvar – спящий режим – man:condvar[9]" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:542 msgid "rwlock - blocking - man:rwlock[9]" msgstr "rwlock – блокирующий режим – man:rwlock[9]" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:543 msgid "sxlock - sleeping - man:sx[9]" msgstr "sxlock – спящий режим – man:sx[9]" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:544 msgid "lockmgr - sleeping - man:lockmgr[9]" msgstr "lockmgr – спящий режим – man:lockmgr[9]" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:545 msgid "semaphores - sleeping - man:sema[9]" msgstr "семафоры – спящий режим – man:sema[9]" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:547 msgid "" "Among these locks only mutexes, sxlocks, rwlocks and lockmgrs are intended " "to handle recursion, but currently recursion is only supported by mutexes " "and lockmgrs." msgstr "" "Среди этих блокировок только мьютексы, sxlock, rwlock и lockmgr " "предназначены для обработки рекурсии, но в настоящее время рекурсия " "поддерживается только мьютексами и lockmgr." #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:549 #, no-wrap msgid "Scheduling barriers" msgstr "Барьеры планирования" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:553 msgid "" "Scheduling barriers are intended to be used to drive scheduling of " "threading. They consist mainly of three different stubs:" msgstr "" "Барьеры планирования предназначены для управления планированием потоков. Они " -"в основном состоят из трех различных заглушек:" +"в основном состоят из трёх различных заглушек:" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:555 msgid "critical sections (and preemption)" msgstr "критические секции (и вытеснение)" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:556 msgid "sched_bind" msgstr "sched_bind" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:557 msgid "sched_pin" msgstr "sched_pin" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:559 msgid "" "Generally, these should be used only in a particular context and even if " "they can often replace locks, they should be avoided because they do not let " "the diagnose of simple eventual problems with locking debugging tools (as " "man:witness[4])." msgstr "" "Как правило, их следует использовать только в определённом контексте, и даже " "если они часто могут заменять блокировки, их следует избегать, поскольку они " "не позволяют диагностировать простые потенциальные проблемы с помощью " "инструментов отладки блокировок (например, man:witness[4])." #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:561 #, no-wrap msgid "Critical sections" msgstr "Критические секции" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:569 msgid "" "The FreeBSD kernel has been made preemptive basically to deal with interrupt " "threads. In fact, to avoid high interrupt latency, time-sharing priority " "threads can be preempted by interrupt threads (in this way, they do not need " "to wait to be scheduled as the normal path previews). Preemption, however, " "introduces new racing points that need to be handled, as well. Often, to " "deal with preemption, the simplest thing to do is to completely disable it. " "A critical section defines a piece of code (borderlined by the pair of " "functions man:critical_enter[9] and man:critical_exit[9], where preemption " "is guaranteed to not happen (until the protected code is fully executed). " "This can often replace a lock effectively but should be used carefully to " "not lose the whole advantage that preemption brings." msgstr "" "В ядре FreeBSD была реализована вытесняющая многозадачность в основном для " "работы с потоками обработки прерываний. Фактически, чтобы избежать высокой " "задержки прерываний, потоки с приоритетом разделения времени могут быть " "вытеснены потоками обработки прерываний (таким образом, им не нужно ждать " "планирования, как это предусмотрено в обычном случае). Однако вытеснение " "также вводит новые точки гонки, которые необходимо обрабатывать. Часто для " "борьбы с вытеснением проще всего полностью отключить его. Критическая секция " "определяет участок кода (ограниченный парой функций man:critical_enter[9] и " "man:critical_exit[9]), где гарантируется отсутствие вытеснения (пока " "защищённый код не будет полностью выполнен). Это часто может эффективно " "заменить блокировку, но должно использоваться осторожно, чтобы не потерять " "все преимущества, которые даёт вытеснение." #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:571 #, no-wrap msgid "sched_pin/sched_unpin" msgstr "sched_pin/sched_unpin" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:577 msgid "" "Another way to deal with preemption is the `sched_pin()` interface. If a " "piece of code is closed in the `sched_pin()` and `sched_unpin()` pair of " "functions it is guaranteed that the respective thread, even if it can be " "preempted, it will always be executed on the same CPU. Pinning is very " "effective in the particular case when we have to access at per-cpu datas and " "we assume other threads will not change those data. The latter condition " "will determine a critical section as a too strong condition for our code." msgstr "" "Еще один способ работы с вытеснением — это интерфейс `sched_pin()`. Если " "участок кода заключен между функциями `sched_pin()` и `sched_unpin()`, " "гарантируется, что соответствующий поток, даже если он может быть вытеснен, " "всегда будет выполняться на том же CPU. Закрепление очень эффективно в " "частном случае, когда нам необходимо обращаться к данным, привязанным к " -"определенным CPU, и мы предполагаем, что другие потоки не изменят эти " +"определённым CPU, и мы предполагаем, что другие потоки не изменят эти " "данные. Последнее условие делает критическую секцию избыточно строгим " "условием для нашего кода." #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:579 #, no-wrap msgid "sched_bind/sched_unbind" msgstr "sched_bind/sched_unbind" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:584 msgid "" "`sched_bind` is an API used to bind a thread to a particular CPU for all the " "time it executes the code, until a `sched_unbind` function call does not " "unbind it. This feature has a key role in situations where you cannot trust " "the current state of CPUs (for example, at very early stages of boot), as " "you want to avoid your thread to migrate on inactive CPUs. Since " "`sched_bind` and `sched_unbind` manipulate internal scheduler structures, " "they need to be enclosed in `sched_lock` acquisition/releasing when used." msgstr "" "`sched_bind` — это API, используемый для привязки потока к определённому CPU " "на всё время выполнения кода, пока вызов функции `sched_unbind` не отменит " "эту привязку. Эта функция играет ключевую роль в ситуациях, когда нельзя " "доверять текущему состоянию CPU (например, на самых ранних этапах загрузки), " "так как требуется избежать миграции потока на неактивные CPU. Поскольку " "`sched_bind` и `sched_unbind` работают с внутренними структурами " "планировщика, их использование должно быть заключено в захват/освобождение " "`sched_lock`." #. type: Title ==== #: documentation/content/en/articles/linux-emulation/_index.adoc:586 #, no-wrap msgid "Proc structure" msgstr "Структура proc" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:592 msgid "" "Various emulation layers sometimes require some additional per-process " "data. It can manage separate structures (a list, a tree etc.) containing " "these data for every process but this tends to be slow and memory " "consuming. To solve this problem the FreeBSD `proc` structure contains " "`p_emuldata`, which is a void pointer to some emulation layer specific " "data. This `proc` entry is protected by the proc mutex." msgstr "" "Различные уровни эмуляции иногда требуют дополнительных данных для каждого " "процесса. Можно управлять отдельными структурами (списком, деревом и т.д.), " "содержащими эти данные для каждого процесса, но это может быть медленно и " "потреблять много памяти. Чтобы решить эту проблему, структура `proc` в " "FreeBSD содержит `p_emuldata` — указатель типа void на данные, специфичные " "для уровня эмуляции. Эта запись `proc` защищена мьютексом proc." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:597 msgid "" "The FreeBSD `proc` structure contains a `p_sysent` entry that identifies, " "which ABI this process is running. In fact, it is a pointer to the " "`sysentvec` described above. So by comparing this pointer to the address " "where the `sysentvec` structure for the given ABI is stored we can " "effectively determine whether the process belongs to our emulation layer. " "The code typically looks like:" msgstr "" "Структура `proc` в FreeBSD содержит элемент `p_sysent`, который " "идентифицирует, под какой ABI работает данный процесс. Фактически, это " "указатель на упомянутый выше `sysentvec`. Таким образом, сравнивая этот " "указатель с адресом, по которому хранится структура `sysentvec` для данной " "ABI, мы можем эффективно определить, принадлежит ли процесс нашему " "эмуляционному слою. Код обычно выглядит следующим образом:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:602 #, no-wrap msgid "" "if (__predict_true(p->p_sysent != &elf_Linux(R)_sysvec))\n" "\t return;\n" msgstr "" "if (__predict_true(p->p_sysent != &elf_Linux(R)_sysvec))\n" "\t return;\n" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:606 msgid "" "As you can see, we effectively use the `__predict_true` modifier to collapse " "the most common case (FreeBSD process) to a simple return operation thus " "preserving high performance. This code should be turned into a macro " "because currently it is not very flexible, i.e. we do not support Linux(R)64 " "emulation nor A.OUT Linux(R) processes on i386." msgstr "" "Как видите, мы эффективно используем модификатор `__predict_true`, чтобы " "свести наиболее распространённый случай (процесс FreeBSD) к простой операции " "возврата, сохраняя высокую производительность. Этот код следует " "преобразовать в макрос, поскольку в настоящее время он не очень гибкий, " "например, мы не поддерживаем эмуляцию Linux(R)64, а также процессы Linux(R) " "в формате A.OUT на архитектуре i386." #. type: Title ==== #: documentation/content/en/articles/linux-emulation/_index.adoc:608 #, no-wrap msgid "VFS" msgstr "VFS" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:617 msgid "" "The FreeBSD VFS subsystem is very complex but the Linux(R) emulation layer " "uses just a small subset via a well defined API. It can either operate on " "vnodes or file handlers. Vnode represents a virtual vnode, i.e. " "representation of a node in VFS. Another representation is a file handler, " "which represents an opened file from the perspective of a process. A file " "handler can represent a socket or an ordinary file. A file handler contains " "a pointer to its vnode. More then one file handler can point to the same " "vnode." msgstr "" "Подсистема VFS в FreeBSD очень сложна, но слой эмуляции Linux(R) использует " "лишь небольшую её часть через чётко определённый API. Она может работать как " "с vnode, так и с файловыми дескрипторами. Vnode представляет собой " "виртуальный vnode, то есть представление узла в VFS. Другое представление — " "это файловый дескриптор, который представляет открытый файл с точки зрения " "процесса. Файловый дескриптор может представлять сокет или обычный файл. " "Файловый дескриптор содержит указатель на свой vnode. Более одного файлового " "дескриптора могут указывать на один и тот же vnode." #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:619 #, no-wrap msgid "namei" msgstr "namei" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:626 msgid "" "The man:namei[9] routine is a central entry point to pathname lookup and " "translation. It traverses the path point by point from the starting point " "to the end point using lookup function, which is internal to VFS. The man:" "namei[9] syscall can cope with symlinks, absolute and relative paths. When " "a path is looked up using man:namei[9] it is inputed to the name cache. This " "behavior can be suppressed. This routine is used all over the kernel and " "its performance is very critical." msgstr "" "Функция man:namei[9] является центральной точкой входа для поиска и " "преобразования путей. Она проходит по пути шаг за шагом от начальной до " "конечной точки, используя функцию поиска, которая является внутренней для " "VFS. Системный вызов man:namei[9] может обрабатывать символьные ссылки, " "абсолютные и относительные пути. Когда путь ищется с помощью man:namei[9], " "он заносится в кэш имён. Это поведение можно отключить. Данная функция " "используется повсеместно в ядре, и её производительность крайне важна." #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:628 #, no-wrap msgid "vn_fullpath" msgstr "vn_fullpath" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:634 msgid "" "The man:vn_fullpath[9] function takes the best effort to traverse VFS name " "cache and returns a path for a given (locked) vnode. This process is " "unreliable but works just fine for the most common cases. The unreliability " "is because it relies on VFS cache (it does not traverse the on medium " "structures), it does not work with hardlinks, etc. This routine is used in " "several places in the Linuxulator." msgstr "" "Функция man:vn_fullpath[9] предпринимает максимальные усилия для обхода кэша " "имён VFS и возвращает путь для заданного (заблокированного) vnode. Этот " "процесс ненадёжен, но в большинстве типичных случаев работает корректно. " "Ненадёжность обусловлена тем, что функция опирается на кэш VFS (она не " "обходит структуры на носителе), не работает с жёсткими ссылками и т.д. " "Данная процедура используется в нескольких местах Linuxulator." #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:636 #, no-wrap msgid "Vnode operations" msgstr "Операции с vnode" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:639 msgid "" "`fgetvp` - given a thread and a file descriptor number it returns the " "associated vnode" msgstr "" "`fgetvp` - по заданным потоку и номеру файлового дескриптора возвращает " "связанный vnode" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:640 msgid "man:vn_lock[9] - locks a vnode" msgstr "man:vn_lock[9] - блокирует vnode" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:641 msgid "`vn_unlock` - unlocks a vnode" msgstr "`vn_unlock` - разблокирует vnode" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:642 msgid "man:VOP_READDIR[9] - reads a directory referenced by a vnode" msgstr "man:VOP_READDIR[9] - читает каталог, на который ссылается vnode" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:643 msgid "" "man:VOP_GETATTR[9] - gets attributes of a file or a directory referenced by " "a vnode" msgstr "" "man:VOP_GETATTR[9] - получает атрибуты файла или каталога, на который " "ссылается vnode" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:644 msgid "man:VOP_LOOKUP[9] - looks up a path to a given directory" msgstr "man:VOP_LOOKUP[9] - выполняет поиск пути к заданному каталогу" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:645 msgid "man:VOP_OPEN[9] - opens a file referenced by a vnode" msgstr "man:VOP_OPEN[9] - открывает файл, на который ссылается vnode" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:646 msgid "man:VOP_CLOSE[9] - closes a file referenced by a vnode" msgstr "man:VOP_CLOSE[9] - закрывает файл, на который ссылается vnode" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:647 msgid "man:vput[9] - decrements the use count for a vnode and unlocks it" msgstr "" "man:vput[9] - уменьшает счетчик использования для vnode и разблокирует его" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:648 msgid "man:vrele[9] - decrements the use count for a vnode" msgstr "man:vrele[9] - уменьшает счетчик использования для vnode" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:649 msgid "man:vref[9] - increments the use count for a vnode" msgstr "man:vref[9] - увеличивает счетчик использования для vnode" #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:651 #, no-wrap msgid "File handler operations" msgstr "Операции обработчика файлов (handler)" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:654 msgid "" "`fget` - given a thread and a file descriptor number it returns associated " "file handler and references it" msgstr "" "`fget` - для заданного потока и номера файлового дескриптора возвращает " "связанный обработчик файла и делает на него ссылку" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:655 msgid "`fdrop` - drops a reference to a file handler" msgstr "`fdrop` - освобождает ссылку на обработчик файлов" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:656 msgid "`fhold` - references a file handler" msgstr "`fhold` - ссылается на обработчик файла" #. type: Title == #: documentation/content/en/articles/linux-emulation/_index.adoc:658 #, no-wrap msgid "Linux(R) emulation layer -MD part" msgstr "Слой эмуляции Linux(R) - машинозависимая часть" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:666 msgid "" "This section deals with implementation of Linux(R) emulation layer in " "FreeBSD operating system. It first describes the machine dependent part " "talking about how and where interaction between userland and kernel is " "implemented. It talks about syscalls, signals, ptrace, traps, stack fixup. " "This part discusses i386 but it is written generally so other architectures " "should not differ very much. The next part is the machine independent part " "of the Linuxulator. This section only covers i386 and ELF handling. A.OUT " "is obsolete and untested." msgstr "" "В этом разделе рассматривается реализация слоя эмуляции Linux(R) в " "операционной системе FreeBSD. Сначала описывается машинозависимая часть, " "рассказывающая о том, как и где реализовано взаимодействие между " "пользовательским пространством и ядром. Рассматриваются системные вызовы, " "сигналы, ptrace, ловушки и исправление стека. Эта часть посвящена " "архитектуре i386, но написана в общем виде, поэтому другие архитектуры не " "должны сильно отличаться. Следующая часть — машинонезависимая часть " "Linuxulator. Этот раздел охватывает только i386 и обработку ELF. A.OUT " "устарел и не поддерживается." #. type: Title === #: documentation/content/en/articles/linux-emulation/_index.adoc:668 #, no-wrap msgid "Syscall handling" msgstr "Обработка системных вызовов" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:672 msgid "" "Syscall handling is mostly written in [.filename]#linux_sysvec.c#, which " "covers most of the routines pointed out in the `sysentvec` structure. When " "a Linux(R) process running on FreeBSD issues a syscall, the general syscall " "routine calls linux prepsyscall routine for the Linux(R) ABI." msgstr "" "Обработка системных вызовов в основном реализована в файле [." "filename]#linux_sysvec.c#, который покрывает большинство процедур, указанных " "в структуре `sysentvec`. Когда процесс Linux(R), выполняющийся на FreeBSD, " "делает системный вызов, общая процедура обработки системных вызовов вызывает " "linux prepsyscall для ABI Linux(R)." #. type: Title ==== #: documentation/content/en/articles/linux-emulation/_index.adoc:674 #, no-wrap msgid "Linux(R) prepsyscall" msgstr "Linux(R) prepsyscall" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:681 msgid "" "Linux(R) passes arguments to syscalls via registers (that is why it is " "limited to 6 parameters on i386) while FreeBSD uses the stack. The Linux(R) " "prepsyscall routine must copy parameters from registers to the stack. The " "order of the registers is: `%ebx`, `%ecx`, `%edx`, `%esi`, `%edi`, `%ebp`. " "The catch is that this is true for only _most_ of the syscalls. Some (most " "notably `clone`) uses a different order but it is luckily easy to fix by " "inserting a dummy parameter in the `linux_clone` prototype." msgstr "" "Linux(R) передаёт аргументы системных вызовов через регистры (поэтому на " "i386 ограничено 6 параметрами), тогда как FreeBSD использует стек. " "Подпрограмма Linux(R) `prepsyscall` должна копировать параметры из регистров " "в стек. Порядок регистров следующий: `%ebx`, `%ecx`, `%edx`, `%esi`, `%edi`" ", `%ebp`. Однако это верно только для _большинства_ системных вызовов. " "Некоторые (особенно `clone`) используют другой порядок, но это, к счастью, " "легко исправить, добавив фиктивный параметр в прототип `linux_clone`." #. type: Title ==== #: documentation/content/en/articles/linux-emulation/_index.adoc:683 #, no-wrap msgid "Syscall writing" msgstr "Как писать системные вызовы" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:687 msgid "" "Every syscall implemented in the Linuxulator must have its prototype with " "various flags in [.filename]#syscalls.master#. The form of the file is:" msgstr "" "Каждый системный вызов, реализованный в Linuxulator, должен иметь свой " "прототип с различными флагами в [.filename]#syscalls.master#. Формат файла " "следующий:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:695 #, no-wrap msgid "" "...\n" "\tAUE_FORK STD\t\t{ int linux_fork(void); }\n" "...\n" "\tAUE_CLOSE NOPROTO\t{ int close(int fd); }\n" "...\n" msgstr "" "...\n" "\tAUE_FORK STD\t\t{ int linux_fork(void); }\n" "...\n" "\tAUE_CLOSE NOPROTO\t{ int close(int fd); }\n" "...\n" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:705 msgid "" "The first column represents the syscall number. The second column is for " "auditing support. The third column represents the syscall type. It is " "either `STD`, `OBSOL`, `NOPROTO` and `UNIMPL`. `STD` is a standard syscall " "with full prototype and implementation. `OBSOL` is obsolete and defines " "just the prototype. `NOPROTO` means that the syscall is implemented " "elsewhere so do not prepend ABI prefix, etc. `UNIMPL` means that the " "syscall will be substituted with the `nosys` syscall (a syscall just " "printing out a message about the syscall not being implemented and returning " "`ENOSYS`)." msgstr "" "Первый столбец представляет номер системного вызова. Второй столбец " "предназначен для поддержки аудита. Третий столбец обозначает тип системного " "вызова. Он может быть `STD`, `OBSOL`, `NOPROTO` или `UNIMPL`. `STD` — это " "стандартный системный вызов с полным прототипом и реализацией. `OBSOL` " "означает устаревший вызов и определяет только прототип. `NOPROTO` означает, " "что системный вызов реализован в другом месте, поэтому не требует добавления " "префикса ABI и т.д. `UNIMPL` означает, что системный вызов будет заменён на " "`nosys` (системный вызов, который просто выводит сообщение о том, что вызов " "не реализован, и возвращает `ENOSYS`)." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:708 msgid "" "From [.filename]#syscalls.master# a script generates three files: [." "filename]#linux_syscall.h#, [.filename]#linux_proto.h# and [." "filename]#linux_sysent.c#. The [.filename]#linux_syscall.h# contains " "definitions of syscall names and their numerical value, e.g.:" msgstr "" "Из файла [.filename]#syscalls.master# скрипт генерирует три файла: [." "filename]#linux_syscall.h#, [.filename]#linux_proto.h# и [." "filename]#linux_sysent.c#. Файл [.filename]#linux_syscall.h# содержит " -"определения имен системных вызовов и их числовых значений, например:" +"определения имён системных вызовов и их числовых значений, например:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:716 #, no-wrap msgid "" "...\n" "#define LINUX_SYS_linux_fork 2\n" "...\n" "#define LINUX_SYS_close 6\n" "...\n" msgstr "" "...\n" "#define LINUX_SYS_linux_fork 2\n" "...\n" "#define LINUX_SYS_close 6\n" "...\n" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:719 msgid "" "The [.filename]#linux_proto.h# contains structure definitions of arguments " "to every syscall, e.g.:" msgstr "" "[.filename]#linux_proto.h# содержит определения структур аргументов для " "каждого системного вызова, например:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:725 #, no-wrap msgid "" "struct linux_fork_args {\n" " register_t dummy;\n" "};\n" msgstr "" "struct linux_fork_args {\n" " register_t dummy;\n" "};\n" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:728 msgid "" "And finally, [.filename]#linux_sysent.c# contains structure describing the " "system entry table, used to actually dispatch a syscall, e.g.:" msgstr "" "И, наконец, [.filename]#linux_sysent.c# содержит структуру, описывающую " "таблицу системных вызовов, используемую для фактической диспетчеризации " "системного вызова, например:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:733 #, no-wrap msgid "" "{ 0, (sy_call_t *)linux_fork, AUE_FORK, NULL, 0, 0 }, /* 2 = linux_fork */\n" "{ AS(close_args), (sy_call_t *)close, AUE_CLOSE, NULL, 0, 0 }, /* 6 = close */\n" msgstr "" "{ 0, (sy_call_t *)linux_fork, AUE_FORK, NULL, 0, 0 }, /* 2 = linux_fork */\n" "{ AS(close_args), (sy_call_t *)close, AUE_CLOSE, NULL, 0, 0 }, /* 6 = close */\n" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:737 msgid "" "As you can see `linux_fork` is implemented in Linuxulator itself so the " "definition is of `STD` type and has no argument, which is exhibited by the " "dummy argument structure. On the other hand `close` is just an alias for " "real FreeBSD man:close[2] so it has no linux arguments structure associated " "and in the system entry table it is not prefixed with linux as it calls the " "real man:close[2] in the kernel." msgstr "" "Как видно, `linux_fork` реализован в самом Linuxulator, поэтому определение " "имеет тип `STD` и не имеет аргументов, что демонстрируется структурой-" "заглушкой. С другой стороны, `close` — это просто псевдоним для настоящего " "FreeBSD man:close[2], поэтому у него нет связанной структуры аргументов " "Linux, и в системной таблице вызовов он не имеет префикса linux, так как " "вызывает настоящий man:close[2] в ядре." #. type: Title ==== #: documentation/content/en/articles/linux-emulation/_index.adoc:739 #, no-wrap msgid "Dummy syscalls" msgstr "Нереализованные системные вызовы" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:745 msgid "" "The Linux(R) emulation layer is not complete, as some syscalls are not " "implemented properly and some are not implemented at all. The emulation " "layer employs a facility to mark unimplemented syscalls with the `DUMMY` " "macro. These dummy definitions reside in [.filename]#linux_dummy.c# in a " "form of `DUMMY(syscall);`, which is then translated to various syscall " "auxiliary files and the implementation consists of printing a message saying " "that this syscall is not implemented. The `UNIMPL` prototype is not used " "because we want to be able to identify the name of the syscall that was " "called to know what syscalls are more important to implement." msgstr "" "Слой эмуляции Linux(R) не является полным, так как некоторые системные " "вызовы реализованы неправильно, а некоторые не реализованы вовсе. В слое " "эмуляции используется механизм для пометки нереализованных системных вызовов " "с помощью макроса `DUMMY`. Эти заглушки находятся в файле [." "filename]#linux_dummy.c# в форме `DUMMY(syscall);`, которые затем " "преобразуются в различные вспомогательные файлы системных вызовов, а их " "реализация сводится к выводу сообщения о том, что данный системный вызов не " "реализован. Прототип `UNIMPL` не используется, потому что мы хотим иметь " "возможность идентифицировать имя вызванного системного вызова, чтобы " "понимать, какие системные вызовы более важны для реализации." #. type: Title === #: documentation/content/en/articles/linux-emulation/_index.adoc:747 #, no-wrap msgid "Signal handling" msgstr "Обработка сигналов" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:751 msgid "" "Signal handling is done generally in the FreeBSD kernel for all binary " "compatibilities with a call to a compat-dependent layer. Linux(R) " "compatibility layer defines `linux_sendsig` routine for this purpose." msgstr "" "Обработка сигналов обычно выполняется в ядре FreeBSD для всех вариантов " "бинарной совместимости с помощью вызова уровня, зависящего от совместимости. " "Слой совместимости Linux(R) определяет для этой цели процедуру " "`linux_sendsig`." #. type: Title ==== #: documentation/content/en/articles/linux-emulation/_index.adoc:753 #, no-wrap msgid "Linux(R) sendsig" msgstr "Linux(R) sendsig" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:760 msgid "" "This routine first checks whether the signal has been installed with a " "`SA_SIGINFO` in which case it calls `linux_rt_sendsig` routine instead. " "Furthermore, it allocates (or reuses an already existing) signal handle " "context, then it builds a list of arguments for the signal handler. It " "translates the signal number based on the signal translation table, assigns " "a handler, translates sigset. Then it saves context for the `sigreturn` " "routine (various registers, translated trap number and signal mask). " "Finally, it copies out the signal context to the userspace and prepares " "context for the actual signal handler to run." msgstr "" "Эта процедура сначала проверяет, установлен ли сигнал с флагом `SA_SIGINFO`, " "в таком случае она вызывает процедуру `linux_rt_sendsig` вместо текущей. " "Далее она выделяет (или повторно использует уже существующий) контекст " "обработчика сигнала, затем формирует список аргументов для обработчика " "сигнала. Она преобразует номер сигнала на основе таблицы преобразования " "сигналов, назначает обработчик, преобразует sigset. Затем она сохраняет " "контекст для процедуры `sigreturn` (различные регистры, преобразованный " "номер trap и маску сигналов). Наконец, она копирует контекст сигнала в " "пользовательское пространство и подготавливает контекст для фактического " "выполнения обработчика сигнала." #. type: Title ==== #: documentation/content/en/articles/linux-emulation/_index.adoc:762 #, no-wrap msgid "linux_rt_sendsig" msgstr "linux_rt_sendsig" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:767 msgid "" "This routine is similar to `linux_sendsig` just the signal context " "preparation is different. It adds `siginfo`, `ucontext`, and some POSIX(R) " "parts. It might be worth considering whether those two functions could not " "be merged with a benefit of less code duplication and possibly even faster " "execution." msgstr "" "Эта процедура аналогична `linux_sendsig`, только подготовка контекста " "сигнала отличается. Она добавляет `siginfo`, `ucontext` и некоторые части " "POSIX(R). Стоит рассмотреть возможность объединения этих двух функций с " "выгодой в виде меньшего дублирования кода и, возможно, даже более быстрого " "выполнения." #. type: Title ==== #: documentation/content/en/articles/linux-emulation/_index.adoc:769 #, no-wrap msgid "linux_sigreturn" msgstr "linux_sigreturn" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:774 msgid "" "This syscall is used for return from the signal handler. It does some " "security checks and restores the original process context. It also unmasks " "the signal in process signal mask." msgstr "" "Этот системный вызов используется для возврата из обработчика сигнала. Он " "выполняет некоторые проверки безопасности и восстанавливает исходный " "контекст процесса. Также он разблокирует сигнал в маске сигналов процесса." #. type: Title === #: documentation/content/en/articles/linux-emulation/_index.adoc:776 #, no-wrap msgid "Ptrace" msgstr "Ptrace" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:782 msgid "" "Many UNIX(R) derivates implement the man:ptrace[2] syscall to allow various " "tracking and debugging features. This facility enables the tracing process " "to obtain various information about the traced process, like register dumps, " "any memory from the process address space, etc. and also to trace the " "process like in stepping an instruction or between system entries (syscalls " "and traps). man:ptrace[2] also lets you set various information in the " "traced process (registers etc.). man:ptrace[2] is a UNIX(R)-wide standard " "implemented in most UNIX(R)es around the world." msgstr "" "Многие производные UNIX(R) реализуют системный вызов man:ptrace[2] для " "обеспечения различных функций отслеживания и отладки. Этот механизм " "позволяет трассирующему процессу получать различную информацию о " "трассируемом процессе, такую как дампы регистров, любую память из адресного " "пространства процесса и т.д., а также трассировать процесс, например, " "пошагово выполнять инструкции или между системными вызовами (сисколлами и " "ловушками). man:ptrace[2] также позволяет устанавливать различную информацию " "в трассируемом процессе (регистры и т.д.). man:ptrace[2] является стандартом " "для UNIX(R), реализованным в большинстве UNIX(R)-систем по всему миру." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:788 msgid "" "Linux(R) emulation in FreeBSD implements the man:ptrace[2] facility in [." "filename]#linux_ptrace.c#. The routines for converting registers between " "Linux(R) and FreeBSD and the actual man:ptrace[2] syscall emulation " "syscall. The syscall is a long switch block that implements its counterpart " "in FreeBSD for every man:ptrace[2] command. The man:ptrace[2] commands are " "mostly equal between Linux(R) and FreeBSD so usually just a small " "modification is needed. For example, `PT_GETREGS` in Linux(R) operates on " "direct data while FreeBSD uses a pointer to the data so after performing a " "(native) man:ptrace[2] syscall, a copyout must be done to preserve Linux(R) " "semantics." msgstr "" "Эмуляция Linux(R) в FreeBSD реализует механизм man:ptrace[2] в файле [." "filename]#linux_ptrace.c#. Функции для преобразования регистров между " "Linux(R) и FreeBSD и фактический системный вызов эмуляции man:ptrace[2]. " "Системный вызов представляет собой длинный блок switch, который реализует " "свой аналог в FreeBSD для каждой команды man:ptrace[2]. Команды man:" "ptrace[2] в основном одинаковы между Linux(R) и FreeBSD, поэтому обычно " "требуется лишь небольшая модификация. Например, `PT_GETREGS` в Linux(R) " "работает с непосредственными данными, в то время как FreeBSD использует " "указатель на данные, поэтому после выполнения (нативного) системного вызова " "man:ptrace[2] необходимо выполнить copyout для сохранения семантики Linux(R)." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:792 msgid "" "The man:ptrace[2] implementation in Linuxulator has some known weaknesses. " "There have been panics seen when using `strace` (which is a man:ptrace[2] " "consumer) in the Linuxulator environment. Also `PT_SYSCALL` is not " "implemented." msgstr "" "Реализация man:ptrace[2] в Linuxulator имеет известные недостатки. " "Наблюдались паники при использовании `strace` (который является потребителем " "man:ptrace[2]) в среде Linuxulator. Также `PT_SYSCALL` не реализован." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:799 msgid "" "Whenever a Linux(R) process running in the emulation layer traps the trap " "itself is handled transparently with the only exception of the trap " "translation. Linux(R) and FreeBSD differs in opinion on what a trap is so " "this is dealt with here. The code is actually very short:" msgstr "" "Всякий раз, когда процесс Linux(R), выполняющийся в слое эмуляции, вызывает " "прерывание (trap), само прерывание обрабатывается прозрачно, за исключением " "преобразования прерывания. Linux(R) и FreeBSD расходятся во мнениях " "относительно того, что является прерыванием, поэтому этот вопрос решается " "здесь. Код на самом деле очень короткий:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:805 #, no-wrap msgid "" "static int\n" "translate_traps(int signal, int trap_code)\n" "{\n" msgstr "" "static int\n" "translate_traps(int signal, int trap_code)\n" "{\n" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:808 #, no-wrap msgid "" " if (signal != SIGBUS)\n" " return signal;\n" msgstr "" " if (signal != SIGBUS)\n" " return signal;\n" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:810 #, no-wrap msgid " switch (trap_code) {\n" msgstr " switch (trap_code) {\n" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:816 #, no-wrap msgid "" " case T_PROTFLT:\n" " case T_TSSFLT:\n" " case T_DOUBLEFLT:\n" " case T_PAGEFLT:\n" " return SIGSEGV;\n" msgstr "" " case T_PROTFLT:\n" " case T_TSSFLT:\n" " case T_DOUBLEFLT:\n" " case T_PAGEFLT:\n" " return SIGSEGV;\n" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:821 #, no-wrap msgid "" " default:\n" " return signal;\n" " }\n" "}\n" msgstr "" " default:\n" " return signal;\n" " }\n" "}\n" #. type: Title === #: documentation/content/en/articles/linux-emulation/_index.adoc:824 #, no-wrap msgid "Stack fixup" msgstr "Исправление стека" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:831 msgid "" "The RTLD run-time link-editor expects so called AUX tags on stack during an " "`execve` so a fixup must be done to ensure this. Of course, every RTLD " "system is different so the emulation layer must provide its own stack fixup " "routine to do this. So does Linuxulator. The `elf_linux_fixup` simply " "copies out AUX tags to the stack and adjusts the stack of the user space " "process to point right after those tags. So RTLD works in a smart way." msgstr "" "Динамический редактор связей RTLD ожидает так называемые AUX-теги на стеке " "во время выполнения `execve`, поэтому необходимо выполнить исправление, " "чтобы это обеспечить. Конечно, каждая система RTLD отличается, поэтому " "уровень эмуляции должен предоставлять собственную процедуру исправления " "стека. Linuxulator делает именно это. Функция `elf_linux_fixup` просто " "копирует AUX-теги на стек и корректирует стек пользовательского процесса, " "чтобы он указывал сразу после этих тегов. Таким образом, RTLD работает умным " "способом." #. type: Title === #: documentation/content/en/articles/linux-emulation/_index.adoc:833 #, no-wrap msgid "A.OUT support" msgstr "Поддержка A.OUT" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:840 msgid "" "The Linux(R) emulation layer on i386 also supports Linux(R) A.OUT binaries. " "Pretty much everything described in the previous sections must be " "implemented for A.OUT support (beside traps translation and signals " "sending). The support for A.OUT binaries is no longer maintained, " "especially the 2.6 emulation does not work with it but this does not cause " "any problem, as the linux-base in ports probably do not support A.OUT " "binaries at all. This support will probably be removed in future. Most of " "the stuff necessary for loading Linux(R) A.OUT binaries is in [." "filename]#imgact_linux.c# file." msgstr "" "Эмуляционный слой Linux(R) на i386 также поддерживает бинарные файлы " "Linux(R) в формате A.OUT. Почти всё, что описано в предыдущих разделах, " "должно быть реализовано для поддержки A.OUT (кроме перевода ловушек и " "отправки сигналов). Поддержка бинарных файлов A.OUT больше не " "поддерживается, в частности, эмуляция 2.6 с ними не работает, но это не " "вызывает никаких проблем, так как linux-base в портах, вероятно, вообще не " "поддерживает бинарные файлы A.OUT. Эта поддержка, скорее всего, будет " "удалена в будущем. Большая часть кода, необходимого для загрузки бинарных " "файлов Linux(R) A.OUT, находится в файле [.filename]#imgact_linux.c#." #. type: Title == #: documentation/content/en/articles/linux-emulation/_index.adoc:842 #, no-wrap msgid "Linux(R) emulation layer -MI part" msgstr "Слой эмуляции Linux(R) - машинонезависимая часть" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:847 msgid "" "This section talks about machine independent part of the Linuxulator. It " "covers the emulation infrastructure needed for Linux(R) 2.6 emulation, the " "thread local storage (TLS) implementation (on i386) and futexes. Then we " "talk briefly about some syscalls." msgstr "" "В этом разделе рассматривается машинонезависимая часть Linuxulator. Он " "охватывает инфраструктуру эмуляции, необходимую для эмуляции Linux(R) 2.6, " "реализацию thread local storage (TLS) (на i386) и фьютексы. Затем мы кратко " "обсуждаем некоторые системные вызовы." #. type: Title === #: documentation/content/en/articles/linux-emulation/_index.adoc:849 #, no-wrap msgid "Description of NPTL" msgstr "Описание NPTL" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:857 msgid "" "One of the major areas of progress in development of Linux(R) 2.6 was " "threading. Prior to 2.6, the Linux(R) threading support was implemented in " "the linuxthreads library. The library was a partial implementation of " "POSIX(R) threading. The threading was implemented using separate processes " "for each thread using the `clone` syscall to let them share the address " "space (and other things). The main weaknesses of this approach was that " "every thread had a different PID, signal handling was broken (from the " "pthreads perspective), etc. Also the performance was not very good (use of " "`SIGUSR` signals for threads synchronization, kernel resource consumption, " "etc.) so to overcome these problems a new threading system was developed and " "named NPTL." msgstr "" "Одним из основных направлений прогресса в разработке Linux(R) 2.6 стала " "поддержка потоков. До версии 2.6 поддержка потоков в Linux(R) " "реализовывалась в библиотеке linuxthreads. Эта библиотека представляла собой " "частичную реализацию потоков POSIX(R). Потоки создавались как отдельные " "процессы с использованием системного вызова `clone`, что позволяло им " "разделять адресное пространство (и другие ресурсы). Основными недостатками " "такого подхода были разные PID для каждого потока, некорректная обработка " "сигналов (с точки зрения pthreads) и т.д. Кроме того, производительность " "оставляла желать лучшего (использование сигналов `SIGUSR` для синхронизации " "потоков, потребление ресурсов ядра и т.п.), поэтому для решения этих проблем " "была разработана новая система потоков под названием NPTL." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:863 msgid "" "The NPTL library focused on two things but a third thing came along so it is " "usually considered a part of NPTL. Those two things were embedding of " "threads into a process structure and futexes. The additional third thing " "was TLS, which is not directly required by NPTL but the whole NPTL userland " "library depends on it. Those improvements yielded in much improved " "performance and standards conformance. NPTL is a standard threading library " "in Linux(R) systems these days." msgstr "" "Библиотека NPTL была сосредоточена на двух вещах, но появилась третья, " "поэтому её обычно считают частью NPTL. Этими двумя вещами были встраивание " "потоков в структуру процесса и фьютекс. Дополнительной третьей вещью стал " "TLS, который не требуется напрямую NPTL, но вся пользовательская библиотека " "NPTL зависит от него. Эти улучшения привели к значительному росту " "производительности и соответствию стандартам. В настоящее время NPTL " "является стандартной библиотекой потоков в системах Linux(R)." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:867 msgid "" "The FreeBSD Linuxulator implementation approaches the NPTL in three main " "areas. The TLS, futexes and PID mangling, which is meant to simulate the " "Linux(R) threads. Further sections describe each of these areas." msgstr "" "Реализация Linuxulator в FreeBSD подходит к NPTL в трёх основных " "направлениях: TLS, фьютекс и изменение PID, что предназначено для эмуляции " "потоков Linux(R). В следующих разделах описывается каждое из этих " "направлений." #. type: Title === #: documentation/content/en/articles/linux-emulation/_index.adoc:869 #, no-wrap msgid "Linux(R) 2.6 emulation infrastructure" msgstr "Инфраструктура эмуляции Linux(R) 2.6" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:872 msgid "" "These sections deal with the way Linux(R) threads are managed and how we " "simulate that in FreeBSD." msgstr "" "Эти разделы посвящены тому, как управляются потоки Linux(R) и как мы " "моделируем это в FreeBSD." #. type: Title ==== #: documentation/content/en/articles/linux-emulation/_index.adoc:874 #, no-wrap msgid "Runtime determining of 2.6 emulation" msgstr "Определение эмуляции 2.6 во время выполнения" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:883 msgid "" "The Linux(R) emulation layer in FreeBSD supports runtime setting of the " "emulated version. This is done via man:sysctl[8], namely `compat.linux." "osrelease`. Setting this man:sysctl[8] affects runtime behavior of the " "emulation layer. When set to 2.6.x it sets the value of `linux_use_linux26` " "while setting to something else keeps it unset. This variable (plus per-" "prison variables of the very same kind) determines whether 2.6 " "infrastructure (mainly PID mangling) is used in the code or not. The " "version setting is done system-wide and this affects all Linux(R) " "processes. The man:sysctl[8] should not be changed when running any " "Linux(R) binary as it might harm things." msgstr "" "Слой эмуляции Linux(R) в FreeBSD поддерживает динамическую настройку " "эмулируемой версии. Это выполняется с помощью man:sysctl[8], а именно " "`compat.linux.osrelease`. Установка этого man:sysctl[8] влияет на поведение " "слоя эмуляции во время выполнения. При установке значения 2.6.x " "устанавливается переменная `linux_use_linux26`, а при установке другого " "значения она остаётся сброшенной. Эта переменная (а также аналогичные " "переменные для каждой клетки) определяет, используется ли в коде " "инфраструктура 2.6 (в основном, преобразование PID). Настройка версии " "применяется глобально для всей системы и влияет на все процессы Linux(R). Не " "следует изменять man:sysctl[8] во время выполнения любого бинарного файла " "Linux(R), так как это может привести к проблемам." #. type: Title ==== #: documentation/content/en/articles/linux-emulation/_index.adoc:885 #, no-wrap msgid "Linux(R) processes and thread identifiers" msgstr "Идентификаторы процессов и потоков Linux(R)" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:892 msgid "" "The semantics of Linux(R) threading are a little confusing and uses entirely " "different nomenclature to FreeBSD. A process in Linux(R) consists of a " "`struct task` embedding two identifier fields - PID and TGID. PID is _not_ " "a process ID but it is a thread ID. The TGID identifies a thread group in " "other words a process. For single-threaded process the PID equals the TGID." msgstr "" "Семантика потоков в Linux(R) немного запутанная и использует совершенно " "другую терминологию по сравнению с FreeBSD. Процесс в Linux(R) состоит из " "`struct task`, включающей два поля идентификаторов — PID и TGID. PID — это " "_не_ идентификатор процесса, а идентификатор потока. TGID идентифицирует " "группу потоков, другими словами, процесс. Для однопоточного процесса PID " "равен TGID." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:898 msgid "" "The thread in NPTL is just an ordinary process that happens to have TGID not " "equal to PID and have a group leader not equal to itself (and shared VM etc. " "of course). Everything else happens in the same way as to an ordinary " "process. There is no separation of a shared status to some external " "structure like in FreeBSD. This creates some duplication of information and " "possible data inconsistency. The Linux(R) kernel seems to use task -> group " "information in some places and task information elsewhere and it is really " "not very consistent and looks error-prone." msgstr "" "Поток в NPTL — это обычный процесс, у которого TGID не равен PID и есть " "групповой лидер, отличный от него самого (и, конечно, общая виртуальная " "память и т.д.). Все остальное происходит так же, как и с обычным процессом. " "Нет разделения общего состояния на внешнюю структуру, как в FreeBSD. Это " "создает некоторое дублирование информации и возможную несогласованность " "данных. Ядро Linux(R), похоже, использует информацию о задаче -> группе в " "одних местах и информацию о задаче в других, что не очень последовательно и " "выглядит небезопасно с точки зрения возможных ошибок." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:901 msgid "" "Every NPTL thread is created by a call to the `clone` syscall with a " "specific set of flags (more in the next subsection). The NPTL implements " "strict 1:1 threading." msgstr "" -"Каждый поток NPTL создается вызовом системного вызова `clone` с определенным " +"Каждый поток NPTL создается вызовом системного вызова `clone` с определённым " "набором флагов (подробнее в следующем подразделе). NPTL реализует строгую " "модель потоков 1:1." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:903 msgid "" "In FreeBSD we emulate NPTL threads with ordinary FreeBSD processes that " "share VM space, etc. and the PID gymnastic is just mimicked in the emulation " "specific structure attached to the process. The structure attached to the " "process looks like:" msgstr "" "В FreeBSD мы эмулируем потоки NPTL с помощью обычных процессов FreeBSD, " "которые разделяют виртуальную память и т.д., а гимнастика с PID просто " "имитируется в специфической для эмуляции структуре, прикреплённой к " "процессу. Структура, прикреплённая к процессу, выглядит следующим образом:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:908 #, no-wrap msgid "" "struct linux_emuldata {\n" " pid_t pid;\n" msgstr "" "struct linux_emuldata {\n" " pid_t pid;\n" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:911 #, no-wrap msgid "" " int *child_set_tid; /* in clone(): Child.s TID to set on clone */\n" " int *child_clear_tid;/* in clone(): Child.s TID to clear on exit */\n" msgstr "" " int *child_set_tid; /* in clone(): Child.s TID to set on clone */\n" " int *child_clear_tid;/* in clone(): Child.s TID to clear on exit */\n" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:913 #, no-wrap msgid " struct linux_emuldata_shared *shared;\n" msgstr " struct linux_emuldata_shared *shared;\n" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:915 #, no-wrap msgid " int pdeath_signal; /* parent death signal */\n" msgstr " int pdeath_signal; /* parent death signal */\n" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:918 #, no-wrap msgid "" " LIST_ENTRY(linux_emuldata) threads; /* list of linux threads */\n" "};\n" msgstr "" " LIST_ENTRY(linux_emuldata) threads; /* list of linux threads */\n" "};\n" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:925 msgid "" "The PID is used to identify the FreeBSD process that attaches this " "structure. The `child_se_tid` and `child_clear_tid` are used for TID " "address copyout when a process exits and is created. The `shared` pointer " "points to a structure shared among threads. The `pdeath_signal` variable " "identifies the parent death signal and the `threads` pointer is used to link " "this structure to the list of threads. The `linux_emuldata_shared` " "structure looks like:" msgstr "" "PID используется для идентификации процесса FreeBSD, к которому присоединена " "эта структура. `child_se_tid` и `child_clear_tid` используются для " "копирования адреса TID при завершении и создании процесса. Указатель " "`shared` указывает на структуру, разделяемую между потоками. Переменная " "`pdeath_signal` определяет сигнал завершения родительского процесса, а " "указатель `threads` используется для связывания этой структуры со списком " "потоков. Структура `linux_emuldata_shared` выглядит следующим образом:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:929 #, no-wrap msgid "struct linux_emuldata_shared {\n" msgstr "struct linux_emuldata_shared {\n" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:931 #, no-wrap msgid " int refs;\n" msgstr " int refs;\n" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:933 #, no-wrap msgid " pid_t group_pid;\n" msgstr " pid_t group_pid;\n" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:936 #, no-wrap msgid "" " LIST_HEAD(, linux_emuldata) threads; /* head of list of linux threads */\n" "};\n" msgstr "" " LIST_HEAD(, linux_emuldata) threads; /* head of list of linux threads */\n" "};\n" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:941 msgid "" "The `refs` is a reference counter being used to determine when we can free " "the structure to avoid memory leaks. The `group_pid` is to identify PID ( = " "TGID) of the whole process ( = thread group). The `threads` pointer is the " "head of the list of threads in the process." msgstr "" "`refs` — это счётчик ссылок, используемый для определения момента, когда " "можно освободить структуру, чтобы избежать утечек памяти. `group_pid` служит " "для идентификации PID (= TGID) всего процесса (= группы потоков). Указатель " "`threads` является головой списка потоков в процессе." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:944 msgid "" "The `linux_emuldata` structure can be obtained from the process using " "`em_find`. The prototype of the function is:" msgstr "" "Структуру `linux_emuldata` можно получить из процесса с помощью `em_find`. " "Прототип функции выглядит следующим образом:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:948 #, no-wrap msgid "struct linux_emuldata *em_find(struct proc *, int locked);\n" msgstr "struct linux_emuldata *em_find(struct proc *, int locked);\n" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:953 msgid "" "Here, `proc` is the process we want the emuldata structure from and the " "locked parameter determines whether we want to lock or not. The accepted " "values are `EMUL_DOLOCK` and `EMUL_DOUNLOCK`. More about locking later." msgstr "" "Здесь `proc` — это процесс, из которого мы хотим получить структуру " "`emuldata`, а параметр `locked` определяет, нужно ли блокировать. Допустимые " "значения — `EMUL_DOLOCK` и `EMUL_DOUNLOCK`. Подробнее о блокировке позже." #. type: Title ==== #: documentation/content/en/articles/linux-emulation/_index.adoc:955 #, no-wrap msgid "PID mangling" msgstr "Преобразование PID" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:962 msgid "" "As there is a difference in view as what to the idea of a process ID and " "thread ID is between FreeBSD and Linux(R) we have to translate the view " "somehow. We do it by PID mangling. This means that we fake what a PID " "(=TGID) and TID (=PID) is between kernel and userland. The rule of thumb is " "that in kernel (in Linuxulator) PID = PID and TGID = shared -> group pid and " "to userland we present `PID = shared -> group_pid` and `TID = proc -> " "p_pid`. The PID member of `linux_emuldata structure` is a FreeBSD PID." msgstr "" "Поскольку между FreeBSD и Linux(R) существуют различия в представлении " "идентификатора процесса (PID) и идентификатора потока (TID), нам необходимо " "преобразовывать эти понятия. Это достигается за счёт модификации PID. Это " "означает, что мы изменяем представление о PID (=TGID) и TID (=PID) между " "ядром и пользовательским пространством. Основное правило заключается в " "следующем: в ядре (в Linuxulator) `PID = PID`, а `TGID = shared -> " "group_pid`; для пользовательского пространства мы представляем `PID = shared " "-> group_pid` и `TID = proc -> p_pid`. Член `PID` в структуре " "`linux_emuldata` является FreeBSD PID." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:966 msgid "" "The above affects mainly getpid, getppid, gettid syscalls. Where we use PID/" "TGID respectively. In copyout of TIDs in `child_clear_tid` and " "`child_set_tid` we copy out FreeBSD PID." msgstr "" "Вышесказанное в основном влияет на системные вызовы getpid, getppid, gettid. " "В случаях, где мы используем PID/TGID соответственно. При копировании TID в " "`child_clear_tid` и `child_set_tid` мы копируем FreeBSD PID." #. type: Title ==== #: documentation/content/en/articles/linux-emulation/_index.adoc:968 #, no-wrap msgid "Clone syscall" msgstr "Системный вызов clone" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:972 msgid "" "The `clone` syscall is the way threads are created in Linux(R). The syscall " "prototype looks like this:" msgstr "" "`clone` — это системный вызов, с помощью которого создаются потоки в " "Linux(R). Прототип системного вызова выглядит следующим образом:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:977 #, no-wrap msgid "" "int linux_clone(l_int flags, void *stack, void *parent_tidptr, int dummy,\n" "void * child_tidptr);\n" msgstr "" "int linux_clone(l_int flags, void *stack, void *parent_tidptr, int dummy,\n" "void * child_tidptr);\n" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:987 msgid "" "The `flags` parameter tells the syscall how exactly the processes should be " "cloned. As described above, Linux(R) can create processes sharing various " "things independently, for example two processes can share file descriptors " "but not VM, etc. Last byte of the `flags` parameter is the exit signal of " "the newly created process. The `stack` parameter if non-`NULL` tells, where " "the thread stack is and if it is `NULL` we are supposed to copy-on-write the " "calling process stack (i.e. do what normal man:fork[2] routine does). The " "`parent_tidptr` parameter is used as an address for copying out process PID " "(i.e. thread id) once the process is sufficiently instantiated but is not " "runnable yet. The `dummy` parameter is here because of the very strange " "calling convention of this syscall on i386. It uses the registers directly " "and does not let the compiler do it what results in the need of a dummy " "syscall. The `child_tidptr` parameter is used as an address for copying out " "PID once the process has finished forking and when the process exits." msgstr "" "Параметр `flags` указывает системному вызову, как именно процессы должны " "быть клонированы. Как описано выше, Linux(R) может создавать процессы, " "разделяющие различные ресурсы независимо, например, два процесса могут " "разделять файловые дескрипторы, но не виртуальную память и т.д. Последний " "байт параметра `flags` является сигналом завершения для вновь созданного " "процесса. Параметр `stack`, если он не `NULL`, указывает, где находится стек " "потока, а если он `NULL`, предполагается копирование при записи стека " "вызывающего процесса (т.е. делать то же, что делает обычная функция man:" "fork[2]). Параметр `parent_tidptr` используется как адрес для копирования " "PID процесса (т.е. идентификатора потока) после того, как процесс достаточно " "инициализирован, но ещё не готов к выполнению. Параметр `dummy` присутствует " "из-за очень странного соглашения о вызовах этого системного вызова на i386. " "Он использует регистры напрямую и не позволяет компилятору делать это, что " "приводит к необходимости использования фиктивного системного вызова. " "Параметр `child_tidptr` используется как адрес для копирования PID после " "завершения ветвления процесса и при его завершении." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1001 msgid "" "The syscall itself proceeds by setting corresponding flags depending on the " "flags passed in. For example, `CLONE_VM` maps to RFMEM (sharing of VM), " "etc. The only nit here is `CLONE_FS` and `CLONE_FILES` because FreeBSD does " "not allow setting this separately so we fake it by not setting RFFDG " "(copying of fd table and other fs information) if either of these is " "defined. This does not cause any problems, because those flags are always " "set together. After setting the flags the process is forked using the " "internal `fork1` routine, the process is instrumented not to be put on a run " "queue, i.e. not to be set runnable. After the forking is done we possibly " "reparent the newly created process to emulate `CLONE_PARENT` semantics. " "Next part is creating the emulation data. Threads in Linux(R) does not " "signal their parents so we set exit signal to be 0 to disable this. After " "that setting of `child_set_tid` and `child_clear_tid` is performed enabling " "the functionality later in the code. At this point we copy out the PID to " "the address specified by `parent_tidptr`. The setting of process stack is " "done by simply rewriting thread frame `%esp` register (`%rsp` on amd64). " "Next part is setting up TLS for the newly created process. After this man:" "vfork[2] semantics might be emulated and finally the newly created process " "is put on a run queue and copying out its PID to the parent process via " "`clone` return value is done." msgstr "" "Системный вызов продолжает выполнение, устанавливая соответствующие флаги в " "зависимости от переданных аргументов. Например, `CLONE_VM` преобразуется в " "RFMEM (общее адресное пространство) и т.д. Единственная тонкость здесь — это " "`CLONE_FS` и `CLONE_FILES`, поскольку FreeBSD не позволяет устанавливать их " "отдельно, поэтому мы эмулируем это, не устанавливая RFFDG (копирование " "таблицы файловых дескрипторов и другой информации о файловой системе), если " "задан любой из этих флагов. Это не вызывает проблем, так как эти флаги " "всегда устанавливаются вместе. После установки флагов процесс создаётся с " "помощью внутренней процедуры `fork1`, при этом процесс настраивается так, " "чтобы не помещаться в очередь выполнения (т.е. не становиться исполняемым). " "После завершения ветвления мы, при необходимости, изменяем родителя для " "нового процесса, чтобы эмулировать семантику `CLONE_PARENT`. Следующий шаг — " "создание данных эмуляции. Потоки в Linux(R) не отправляют сигналы своим " "родителям, поэтому мы устанавливаем сигнал завершения в 0, чтобы отключить " "эту возможность. Затем выполняется настройка `child_set_tid` и " "`child_clear_tid`, что активирует соответствующую функциональность далее в " "коде. На этом этапе мы копируем PID по адресу, указанному в `parent_tidptr`. " "Установка стека процесса выполняется простой перезаписью регистра `%esp` (`" "%rsp` на amd64) в кадре потока. Далее настраивается TLS для нового процесса. " "После этого может быть эмулирована семантика man:vfork[2], и, наконец, новый " "процесс помещается в очередь выполнения, а его PID возвращается " "родительскому процессу через возвращаемое значение `clone`." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1004 msgid "" "The `clone` syscall is able and in fact is used for emulating classic man:" "fork[2] and man:vfork[2] syscalls. Newer glibc in a case of 2.6 kernel uses " "`clone` to implement man:fork[2] and man:vfork[2] syscalls." msgstr "" "Системный вызов `clone` способен и фактически используется для эмуляции " "классических системных вызовов man:fork[2] и man:vfork[2]. Более новые " "версии glibc в случае ядра 2.6 используют `clone` для реализации системных " "вызовов man:fork[2] и man:vfork[2]." #. type: Title ==== #: documentation/content/en/articles/linux-emulation/_index.adoc:1006 #, no-wrap msgid "Locking" msgstr "Блокировка" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1012 msgid "" "The locking is implemented to be per-subsystem because we do not expect a " "lot of contention on these. There are two locks: `emul_lock` used to " "protect manipulating of `linux_emuldata` and `emul_shared_lock` used to " "manipulate `linux_emuldata_shared`. The `emul_lock` is a nonsleepable " "blocking mutex while `emul_shared_lock` is a sleepable blocking `sx_lock`. " "Due to of the per-subsystem locking we can coalesce some locks and that is " "why the em_find offers the non-locking access." msgstr "" "Блокировка реализована на уровне подсистем, поскольку не ожидается высокой " "конкуренции за эти ресурсы. Существует две блокировки: `emul_lock`, " "используемая для защиты манипуляций с `linux_emuldata`, и `emul_shared_lock`" ", используемая для манипуляций с `linux_emuldata_shared`. `emul_lock` " "представляет собой неспящий блокирующий мьютекс, в то время как " "`emul_shared_lock` — это спящий блокирующий `sx_lock`. Благодаря блокировке " "на уровне подсистем мы можем объединять некоторые блокировки, поэтому " "em_find предлагает доступ без блокировки." #. type: Title === #: documentation/content/en/articles/linux-emulation/_index.adoc:1014 #, no-wrap msgid "TLS" msgstr "TLS" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1017 msgid "This section deals with TLS also known as thread local storage." msgstr "" "Этот раздел посвящён TLS, также известному как локальное хранилище потока." #. type: Title ==== #: documentation/content/en/articles/linux-emulation/_index.adoc:1019 #, no-wrap msgid "Introduction to threading" msgstr "Введение в многопоточность" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1040 msgid "" "Threads in computer science are entities within a process that can be " "scheduled independently from each other. The threads in the process share " "process wide data (file descriptors, etc.) but also have their own stack for " "their own data. Sometimes there is a need for process-wide data specific to " "a given thread. Imagine a name of the thread in execution or something like " "that. The traditional UNIX(R) threading API, pthreads provides a way to do " "it via man:pthread_key_create[3], man:pthread_setspecific[3] and man:" "pthread_getspecific[3] where a thread can create a key to the thread local " "data and using man:pthread_getspecific[3] or man:pthread_getspecific[3] to " "manipulate those data. You can easily see that this is not the most " "comfortable way this could be accomplished. So various producers of C/C++ " "compilers introduced a better way. They defined a new modifier keyword " "thread that specifies that a variable is thread specific. A new method of " "accessing such variables was developed as well (at least on i386). The " "pthreads method tends to be implemented in userspace as a trivial lookup " "table. The performance of such a solution is not very good. So the new " "method uses (on i386) segment registers to address a segment, where TLS area " "is stored so the actual accessing of a thread variable is just appending the " "segment register to the address thus addressing via it. The segment " "registers are usually `%gs` and `%fs` acting like segment selectors. Every " "thread has its own area where the thread local data are stored and the " "segment must be loaded on every context switch. This method is very fast " "and used almost exclusively in the whole i386 UNIX(R) world. Both FreeBSD " "and Linux(R) implement this approach and it yields very good results. The " "only drawback is the need to reload the segment on every context switch " "which can slowdown context switches. FreeBSD tries to avoid this overhead " "by using only 1 segment descriptor for this while Linux(R) uses 3. " "Interesting thing is that almost nothing uses more than 1 descriptor (only " "Wine seems to use 2) so Linux(R) pays this unnecessary price for context " "switches." msgstr "" "В компьютерных науках потоки (threads) — это сущности внутри процесса, " "которые могут планироваться независимо друг от друга. Потоки в процессе " "разделяют общие данные процесса (например, файловые дескрипторы), но также " "имеют свой собственный стек для своих данных. Иногда возникает необходимость " "в данных, специфичных для конкретного потока, но доступных на уровне " "процесса. Например, имя выполняемого потока или что-то подобное. " "Традиционный API для работы с потоками в UNIX® — pthreads — предоставляет " "способ сделать это через функции `man:pthread_key_create[3]`, `man:" "pthread_setspecific[3]` и `man:pthread_getspecific[3]`, где поток может " "создать ключ к локальным данным потока и использовать `man:" "pthread_getspecific[3]` или `man:pthread_getspecific[3]` для управления " "этими данными. Легко заметить, что это не самый удобный способ. Поэтому " "различные разработчики компиляторов C/C++ предложили более удобный метод. " "Они ввели новое ключевое слово `thread`, которое указывает, что переменная " "является специфичной для потока. Также был разработан новый метод доступа к " "таким переменным (по крайней мере, на архитектуре i386). Метод pthreads " "обычно реализуется в пользовательском пространстве в виде простой таблицы " "поиска. Производительность такого решения не очень высока. Новый метод " "использует (на i386) сегментные регистры для адресации области, где хранится " "TLS (Thread-Local Storage), так что фактический доступ к переменной потока " "сводится к добавлению сегментного регистра к адресу, таким образом обращаясь " "через него. Сегментные регистры, обычно `%gs` и `%fs`, действуют как " "селекторы сегментов. Каждый поток имеет свою собственную область, где " "хранятся локальные данные потока, и сегмент должен загружаться при каждом " "переключении контекста. Этот метод очень быстрый и используется практически " "повсеместно в мире UNIX® на архитектуре i386. И FreeBSD, и Linux® реализуют " "этот подход, и он даёт очень хорошие результаты. Единственный недостаток — " "необходимость перезагружать сегмент при каждом переключении контекста, что " "может замедлять переключения. FreeBSD пытается минимизировать эти накладные " "расходы, используя только 1 дескриптор сегмента, в то время как Linux® " "использует 3. Интересно, что почти ничто не использует больше 1 дескриптора " "(только Wine, кажется, использует 2), поэтому Linux® платит эту " "необязательную цену при переключении контекстов." #. type: Title ==== #: documentation/content/en/articles/linux-emulation/_index.adoc:1042 #, no-wrap msgid "Segments on i386" msgstr "Сегменты на i386" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1049 msgid "" "The i386 architecture implements the so called segments. A segment is a " "description of an area of memory. The base address (bottom) of the memory " "area, the end of it (ceiling), type, protection, etc. The memory described " "by a segment can be accessed using segment selector registers (`%cs`, `%ds`, " "`%ss`, `%es`, `%fs`, `%gs`). For example let us suppose we have a segment " "which base address is 0x1234 and length and this code:" msgstr "" "Архитектура i386 реализует так называемые сегменты. Сегмент — это описание " "области памяти. Он включает базовый адрес (начало) области памяти, её конец " "(границу), тип, защиту и т.д. Доступ к памяти, описываемой сегментом, может " "осуществляться с использованием регистров селекторов сегментов (`%cs`, `" "%ds`, `%ss`, `%es`, `%fs`, `%gs`). Например, предположим, что у нас есть " "сегмент с базовым адресом 0x1234 и длиной, а также следующий код:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:1053 #, no-wrap msgid "mov %edx,%gs:0x10\n" msgstr "mov %edx,%gs:0x10\n" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1062 msgid "" "This will load the content of the `%edx` register into memory location " "0x1244. Some segment registers have a special use, for example `%cs` is " "used for code segment and `%ss` is used for stack segment but `%fs` and `" "%gs` are generally unused. Segments are either stored in a global GDT table " "or in a local LDT table. LDT is accessed via an entry in the GDT. The LDT " "can store more types of segments. LDT can be per process. Both tables " "define up to 8191 entries." msgstr "" "Это загрузит содержимое регистра `%edx` в ячейку памяти по адресу 0x1244. " "Некоторые сегментные регистры имеют специальное назначение, например, `%cs` " "используется для сегмента кода, а `%ss` — для сегмента стека, но `%fs` и `" "%gs` обычно не используются. Сегменты хранятся либо в глобальной таблице " "GDT, либо в локальной таблице LDT. Доступ к LDT осуществляется через запись " "в GDT. LDT может хранить больше типов сегментов. LDT может быть отдельной " "для каждого процесса. Обе таблицы определяют до 8191 записей." #. type: Title ==== #: documentation/content/en/articles/linux-emulation/_index.adoc:1064 #, no-wrap msgid "Implementation on Linux(R) i386" msgstr "Реализация на Linux(R) i386" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1072 msgid "" "There are two main ways of setting up TLS in Linux(R). It can be set when " "cloning a process using the `clone` syscall or it can call " "`set_thread_area`. When a process passes `CLONE_SETTLS` flag to `clone`, " "the kernel expects the memory pointed to by the `%esi` register a Linux(R) " "user space representation of a segment, which gets translated to the machine " "representation of a segment and loaded into a GDT slot. The GDT slot can be " "specified with a number or -1 can be used meaning that the system itself " "should choose the first free slot. In practice, the vast majority of " "programs use only one TLS entry and does not care about the number of the " "entry. We exploit this in the emulation and in fact depend on it." msgstr "" "Существует два основных способа настройки TLS в Linux(R). Он может быть " "настроен при клонировании процесса с использованием системного вызова `clone`" " или с помощью вызова `set_thread_area`. Когда процесс передаёт флаг " "`CLONE_SETTLS` в `clone`, ядро ожидает, что память, на которую указывает " "регистр `%esi`, будет содержать пользовательское представление сегмента в " "Linux(R), которое преобразуется в машинное представление сегмента и " "загружается в слот GDT. Слот GDT может быть указан номером или можно " "использовать -1, что означает, что система сама должна выбрать первый " "свободный слот. На практике подавляющее большинство программ используют " "только одну запись TLS и не заботятся о номере записи. Мы используем это в " "эмуляции и фактически зависим от этого." #. type: Title ==== #: documentation/content/en/articles/linux-emulation/_index.adoc:1074 #, no-wrap msgid "Emulation of Linux(R) TLS" msgstr "Эмуляция Linux(R) TLS" #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:1077 #, no-wrap msgid "i386" msgstr "i386" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1095 msgid "" "Loading of TLS for the current thread happens by calling `set_thread_area` " "while loading TLS for a second process in `clone` is done in the separate " "block in `clone`. Those two functions are very similar. The only " "difference being the actual loading of the GDT segment, which happens on the " "next context switch for the newly created process while `set_thread_area` " "must load this directly. The code basically does this. It copies the " "Linux(R) form segment descriptor from the userland. The code checks for the " "number of the descriptor but because this differs between FreeBSD and " "Linux(R) we fake it a little. We only support indexes of 6, 3 and -1. The " "6 is genuine Linux(R) number, 3 is genuine FreeBSD one and -1 means " "autoselection. Then we set the descriptor number to constant 3 and copy out " "this to the userspace. We rely on the userspace process using the number " "from the descriptor but this works most of the time (have never seen a case " "where this did not work) as the userspace process typically passes in 1. " "Then we convert the descriptor from the Linux(R) form to a machine dependant " "form (i.e. operating system independent form) and copy this to the FreeBSD " "defined segment descriptor. Finally we can load it. We assign the " "descriptor to threads PCB (process control block) and load the `%gs` segment " "using `load_gs`. This loading must be done in a critical section so that " "nothing can interrupt us. The `CLONE_SETTLS` case works exactly like this " "just the loading using `load_gs` is not performed. The segment used for " "this (segment number 3) is shared for this use between FreeBSD processes and " "Linux(R) processes so the Linux(R) emulation layer does not add any overhead " "over plain FreeBSD." msgstr "" "Загрузка TLS для текущего потока происходит путем вызова `set_thread_area`, " "тогда как загрузка TLS для второго процесса в `clone` выполняется в " "отдельном блоке в `clone`. Эти две функции очень похожи. Единственное " "различие заключается в фактической загрузке сегмента GDT, которая происходит " "при следующем переключении контекста для вновь созданного процесса, в то " "время как `set_thread_area` должен загрузить его напрямую. Код в основном " "делает следующее. Он копирует дескриптор сегмента в формате Linux(R) из " "пользовательского пространства. Код проверяет номер дескриптора, но " "поскольку он различается между FreeBSD и Linux(R), мы немного имитируем его. " "Мы поддерживаем только индексы 6, 3 и -1. Число 6 — это оригинальный номер " "Linux(R), 3 — оригинальный номер FreeBSD, а -1 означает авто-выбор. Затем мы " "устанавливаем номер дескриптора на константу 3 и копируем его обратно в " "пользовательское пространство. Мы полагаемся на то, что процесс в " "пользовательском пространстве использует номер из дескриптора, но это " "работает в большинстве случаев (никогда не встречалось ситуации, когда это " "не срабатывало), так как процесс в пользовательском пространстве обычно " "передаёт 1. Затем мы преобразуем дескриптор из формата Linux(R) в " "машинозависимую форму (т.е. независимую от операционной системы) и копируем " -"его в дескриптор сегмента, определенный FreeBSD. Наконец, мы можем загрузить " +"его в дескриптор сегмента, определённый FreeBSD. Наконец, мы можем загрузить " "его. Мы назначаем дескриптор PCB потока (блок управления процессом) и " "загружаем сегмент `%gs` с помощью `load_gs`. Эта загрузка должна выполняться " "в критической секции, чтобы ничто не могло нас прервать. Случай " "`CLONE_SETTLS` работает точно так же, только загрузка с помощью `load_gs` не " "выполняется. Сегмент, используемый для этого (сегмент номер 3), разделяется " "между процессами FreeBSD и Linux(R), поэтому слой эмуляции Linux(R) не " "добавляет накладных расходов по сравнению с обычным FreeBSD." #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:1097 #, no-wrap msgid "amd64" msgstr "amd64" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1101 msgid "" "The amd64 implementation is similar to the i386 one but there was initially " "no 32bit segment descriptor used for this purpose (hence not even native " "32bit TLS users worked) so we had to add such a segment and implement its " "loading on every context switch (when a flag signaling use of 32bit is " "set). Apart from this the TLS loading is exactly the same just the segment " "numbers are different and the descriptor format and the loading differs " "slightly." msgstr "" "Реализация amd64 аналогична реализации i386, но изначально не использовался " "32-битный дескриптор сегмента для этой цели (поэтому даже нативные " "пользователи 32-битного TLS не работали), поэтому нам пришлось добавить " "такой сегмент и реализовать его загрузку при каждом переключении контекста " "(когда установлен флаг, сигнализирующий о использовании 32-битного режима). " "Кроме этого, загрузка TLS точно такая же, только номера сегментов " "отличаются, а формат дескриптора и загрузка немного различаются." #. type: Title === #: documentation/content/en/articles/linux-emulation/_index.adoc:1103 #, no-wrap msgid "Futexes" msgstr "Фьютексы" #. type: Title ==== #: documentation/content/en/articles/linux-emulation/_index.adoc:1106 #, no-wrap msgid "Introduction to synchronization" msgstr "Введение в синхронизацию" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1116 msgid "" "Threads need some kind of synchronization and POSIX(R) provides some of " "them: mutexes for mutual exclusion, read-write locks for mutual exclusion " "with biased ratio of reads and writes and condition variables for signaling " "a status change. It is interesting to note that POSIX(R) threading API " "lacks support for semaphores. Those synchronization routines " "implementations are heavily dependant on the type threading support we " "have. In pure 1:M (userspace) model the implementation can be solely done " "in userspace and thus be very fast (the condition variables will probably " "end up being implemented using signals, i.e. not fast) and simple. In 1:1 " "model, the situation is also quite clear - the threads must be synchronized " "using kernel facilities (which is very slow because a syscall must be " "performed). The mixed M:N scenario just combines the first and second " "approach or rely solely on kernel. Threads synchronization is a vital part " "of thread-enabled programming and its performance can affect resulting " "program a lot. Recent benchmarks on FreeBSD operating system showed that an " "improved sx_lock implementation yielded 40% speedup in _ZFS_ (a heavy sx " "user), this is in-kernel stuff but it shows clearly how important the " "performance of synchronization primitives is." msgstr "" "Потокам требуется некоторая синхронизация, и POSIX(R) предоставляет " "несколько её видов: мьютексы для взаимного исключения, блокировки чтения-" "записи для взаимного исключения с преобладанием операций чтения над записями " "и условные переменные для сигнализации об изменении состояния. Интересно " "отметить, что в API потоков POSIX(R) отсутствует поддержка семафоров. " "Реализации этих механизмов синхронизации сильно зависят от типа поддержки " "потоков, которая у нас есть. В чистой модели 1:M (пользовательское " "пространство) реализация может быть выполнена исключительно в " "пользовательском пространстве и, следовательно, быть очень быстрой (условные " "переменные, вероятно, будут реализованы с использованием сигналов, т.е. не " "быстро) и простой. В модели 1:1 ситуация также довольно ясна — потоки должны " "синхронизироваться с использованием средств ядра (что очень медленно, " "поскольку требуется выполнение системного вызова). Смешанный сценарий M:N " "просто комбинирует первый и второй подходы или полагается исключительно на " "ядро. Синхронизация потоков является важной частью программирования с " "использованием потоков, и её производительность может значительно влиять на " "итоговую программу. Недавние тесты в операционной системе FreeBSD показали, " "что улучшенная реализация `sx_lock` дала 40% прироста скорости в _ZFS_ (где " "активно используются блокировки sx), это внутренние механизмы ядра, но это " "наглядно демонстрирует, насколько важна производительность примитивов " "синхронизации." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1120 msgid "" "Threaded programs should be written with as little contention on locks as " "possible. Otherwise, instead of doing useful work the thread just waits on " "a lock. As a result of this, the most well written threaded programs show " "little locks contention." msgstr "" "Многопоточные программы должны быть написаны с минимальной конкуренцией за " "блокировки. В противном случае, вместо выполнения полезной работы поток " "просто ожидает блокировку. В результате, наиболее хорошо написанные " "многопоточные программы демонстрируют низкую конкуренцию за блокировки." #. type: Title ==== #: documentation/content/en/articles/linux-emulation/_index.adoc:1122 #, no-wrap msgid "Futexes introduction" msgstr "Введение в фьютексы" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1127 msgid "" "Linux(R) implements 1:1 threading, i.e. it has to use in-kernel " "synchronization primitives. As stated earlier, well written threaded " "programs have little lock contention. So a typical sequence could be " "performed as two atomic increase/decrease mutex reference counter, which is " "very fast, as presented by the following example:" msgstr "" "Linux(R) реализует 1:1 потоковую модель, то есть использует примитивы " "синхронизации в ядре. Как упоминалось ранее, хорошо написанные многопоточные " "программы имеют низкую конкуренцию за блокировки. Таким образом, типичная " "последовательность может выполняться как два атомарных увеличения/уменьшения " "счётчика ссылок мьютекса, что очень быстро, как показано в следующем примере:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:1133 #, no-wrap msgid "" "pthread_mutex_lock(&mutex);\n" "...\n" "pthread_mutex_unlock(&mutex);\n" msgstr "" "pthread_mutex_lock(&mutex);\n" "...\n" "pthread_mutex_unlock(&mutex);\n" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1136 msgid "" "1:1 threading forces us to perform two syscalls for those mutex calls, which " "is very slow." msgstr "" "1:1 threading вынуждает нас выполнять два системных вызова для этих вызовов " "мьютекса, что очень медленно." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1141 msgid "" "The solution Linux(R) 2.6 implements is called futexes. Futexes implement " "the check for contention in userspace and call kernel primitives only in a " "case of contention. Thus the typical case takes place without any kernel " "intervention. This yields reasonably fast and flexible synchronization " "primitives implementation." msgstr "" "Решение, реализованное в Linux(R) 2.6, называется фьютексы. Фьютексы " "выполняют проверку на конкуренцию в пользовательском пространстве и вызывают " "примитивы ядра только в случае конкуренции. Таким образом, типичный случай " "обходится без вмешательства ядра. Это обеспечивает достаточно быструю и " "гибкую реализацию примитивов синхронизации." #. type: Title ==== #: documentation/content/en/articles/linux-emulation/_index.adoc:1143 #, no-wrap msgid "Futex API" msgstr "API фьютексов" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1146 msgid "The futex syscall looks like this:" msgstr "Системный вызов futex выглядит следующим образом:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:1150 #, no-wrap msgid "int futex(void *uaddr, int op, int val, struct timespec *timeout, void *uaddr2, int val3);\n" msgstr "int futex(void *uaddr, int op, int val, struct timespec *timeout, void *uaddr2, int val3);\n" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1153 msgid "" "In this example `uaddr` is an address of the mutex in userspace, `op` is an " "operation we are about to perform and the other parameters have per-" "operation meaning." msgstr "" "В этом примере `uaddr` — это адрес мьютекса в пользовательском пространстве, " "`op` — операция, которую мы собираемся выполнить, а остальные параметры " "имеют значение, зависящее от конкретной операции." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1155 msgid "Futexes implement the following operations:" msgstr "Фьютексы реализуют следующие операции:" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1157 msgid "`FUTEX_WAIT`" msgstr "`FUTEX_WAIT`" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1158 msgid "`FUTEX_WAKE`" msgstr "`FUTEX_WAKE`" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1159 msgid "`FUTEX_FD`" msgstr "`FUTEX_FD`" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1160 msgid "`FUTEX_REQUEUE`" msgstr "`FUTEX_REQUEUE`" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1161 msgid "`FUTEX_CMP_REQUEUE`" msgstr "`FUTEX_CMP_REQUEUE`" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1162 msgid "`FUTEX_WAKE_OP`" msgstr "`FUTEX_WAKE_OP`" #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:1164 #, no-wrap msgid "FUTEX_WAIT" msgstr "FUTEX_WAIT" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1169 msgid "" "This operation verifies that on address `uaddr` the value `val` is written. " "If not, `EWOULDBLOCK` is returned, otherwise the thread is queued on the " "futex and gets suspended. If the argument `timeout` is non-zero it " "specifies the maximum time for the sleeping, otherwise the sleeping is " "infinite." msgstr "" "Эта операция проверяет, что по адресу `uaddr` записано значение `val`. Если " "нет, возвращается `EWOULDBLOCK`, в противном случае поток ставится в очередь " "на фьютекс и приостанавливается. Если аргумент `timeout` не равен нулю, он " "задает максимальное время ожидания, в противном случае ожидание бесконечно." #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:1171 #, no-wrap msgid "FUTEX_WAKE" msgstr "FUTEX_WAKE" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1174 msgid "" "This operation takes a futex at `uaddr` and wakes up `val` first futexes " "queued on this futex." msgstr "" "Эта операция захватывает фьютекс по адресу `uaddr` и пробуждает первые `val` " "фьютексов, ожидающих в очереди на этом фьютексе." #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:1176 #, no-wrap msgid "FUTEX_FD" msgstr "FUTEX_FD" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1179 msgid "This operations associates a file descriptor with a given futex." msgstr "Эта операция связывает файловый дескриптор с заданным фьютексом." #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:1181 #, no-wrap msgid "FUTEX_REQUEUE" msgstr "FUTEX_REQUEUE" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1184 msgid "" "This operation takes `val` threads queued on futex at `uaddr`, wakes them " "up, and takes `val2` next threads and requeues them on futex at `uaddr2`." msgstr "" "Эта операция берет `val` потоков, ожидающих на фьютексе по адресу `uaddr`, " "пробуждает их и берет следующие `val2` потоков, перемещая их в очередь " "фьютекса по адресу `uaddr2`." #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:1186 #, no-wrap msgid "FUTEX_CMP_REQUEUE" msgstr "FUTEX_CMP_REQUEUE" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1189 msgid "" "This operation does the same as `FUTEX_REQUEUE` but it checks that `val3` " "equals to `val` first." msgstr "" "Эта операция делает то же самое, что и `FUTEX_REQUEUE`, но сначала " "проверяет, что `val3` равно `val`." #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:1191 #, no-wrap msgid "FUTEX_WAKE_OP" msgstr "FUTEX_WAKE_OP" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1195 msgid "" "This operation performs an atomic operation on `val3` (which contains coded " "some other value) and `uaddr`. Then it wakes up `val` threads on futex at " "`uaddr` and if the atomic operation returned a positive number it wakes up " "`val2` threads on futex at `uaddr2`." msgstr "" "Эта операция выполняет атомарную операцию над `val3` (которая содержит " "закодированное другое значение) и `uaddr`. Затем она пробуждает `val` " "потоков на фьютексе по адресу `uaddr`, и если атомарная операция вернула " "положительное число, пробуждает `val2` потоков на фьютексе по адресу " "`uaddr2`." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1197 msgid "The operations implemented in `FUTEX_WAKE_OP`:" msgstr "Операции, реализованные в `FUTEX_WAKE_OP`:" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1199 msgid "`FUTEX_OP_SET`" msgstr "`FUTEX_OP_SET`" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1200 msgid "`FUTEX_OP_ADD`" msgstr "`FUTEX_OP_ADD`" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1201 msgid "`FUTEX_OP_OR`" msgstr "`FUTEX_OP_OR`" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1202 msgid "`FUTEX_OP_AND`" msgstr "`FUTEX_OP_AND`" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1203 msgid "`FUTEX_OP_XOR`" msgstr "`FUTEX_OP_XOR`" #. type: delimited block = 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:1208 msgid "" "There is no `val2` parameter in the futex prototype. The `val2` is taken " "from the `struct timespec *timeout` parameter for operations " "`FUTEX_REQUEUE`, `FUTEX_CMP_REQUEUE` and `FUTEX_WAKE_OP`." msgstr "" "В прототипе системного вызова futex отсутствует параметр `val2`. Значение " "`val2` берётся из параметра `struct timespec *timeout` для операций " "`FUTEX_REQUEUE`, `FUTEX_CMP_REQUEUE` и `FUTEX_WAKE_OP`." #. type: Title ==== #: documentation/content/en/articles/linux-emulation/_index.adoc:1211 #, no-wrap msgid "Futex emulation in FreeBSD" msgstr "Эмуляция фьютексов в FreeBSD" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1216 msgid "" "The futex emulation in FreeBSD is taken from NetBSD and further extended by " "us. It is placed in `linux_futex.c` and [.filename]#linux_futex.h# files. " "The `futex` structure looks like:" msgstr "" "Эмуляция futex в FreeBSD взята из NetBSD и дополнительно расширена нами. Она " "размещена в файлах `linux_futex.c` и [.filename]#linux_futex.h#. Структура " "`futex` выглядит следующим образом:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:1222 #, no-wrap msgid "" "struct futex {\n" " void *f_uaddr;\n" " int f_refcount;\n" msgstr "" "struct futex {\n" " void *f_uaddr;\n" " int f_refcount;\n" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:1224 #, no-wrap msgid " LIST_ENTRY(futex) f_list;\n" msgstr " LIST_ENTRY(futex) f_list;\n" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:1227 #, no-wrap msgid "" " TAILQ_HEAD(lf_waiting_paroc, waiting_proc) f_waiting_proc;\n" "};\n" msgstr "" " TAILQ_HEAD(lf_waiting_paroc, waiting_proc) f_waiting_proc;\n" "};\n" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1230 msgid "And the structure `waiting_proc` is:" msgstr "И структура `waiting_proc` выглядит следующим образом:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:1234 #, no-wrap msgid "struct waiting_proc {\n" msgstr "struct waiting_proc {\n" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:1236 #, no-wrap msgid " struct thread *wp_t;\n" msgstr " struct thread *wp_t;\n" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:1238 #, no-wrap msgid " struct futex *wp_new_futex;\n" msgstr " struct futex *wp_new_futex;\n" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:1241 #, no-wrap msgid "" " TAILQ_ENTRY(waiting_proc) wp_list;\n" "};\n" msgstr "" " TAILQ_ENTRY(waiting_proc) wp_list;\n" "};\n" #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:1244 #, no-wrap msgid "futex_get / futex_put" msgstr "futex_get / futex_put" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1248 msgid "" "A futex is obtained using the `futex_get` function, which searches a linear " "list of futexes and returns the found one or creates a new futex. When " "releasing a futex from the use we call the `futex_put` function, which " "decreases a reference counter of the futex and if the refcount reaches zero " "it is released." msgstr "" "Фьютекс получается с помощью функции `futex_get`, которая выполняет поиск в " "линейном списке фьютексов и возвращает найденный или создает новый. При " "освобождении фьютекса после использования вызывается функция `futex_put`, " "которая уменьшает счетчик ссылок фьютекса, и если счетчик достигает нуля, " "фьютекс освобождается." #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:1250 #, no-wrap msgid "futex_sleep" msgstr "futex_sleep" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1258 msgid "" "When a futex queues a thread for sleeping it creates a `working_proc` " "structure and puts this structure to the list inside the futex structure " "then it just performs a man:tsleep[9] to suspend the thread. The sleep can " "be timed out. After man:tsleep[9] returns (the thread was woken up or it " "timed out) the `working_proc` structure is removed from the list and is " "destroyed. All this is done in the `futex_sleep` function. If we got woken " "up from `futex_wake` we have `wp_new_futex` set so we sleep on it. This way " "the actual requeueing is done in this function." msgstr "" "Когда фьютекс ставит поток в очередь на ожидание, он создает структуру " "`working_proc` и помещает эту структуру в список внутри структуры futex, " "после чего просто выполняет man:tsleep[9] для приостановки потока. Ожидание " "может быть ограничено по времени. После возврата из man:tsleep[9] (поток был " "разбужен или истекло время ожидания) структура `working_proc` удаляется из " "списка и уничтожается. Все это выполняется в функции `futex_sleep`. Если мы " "были разбужены с помощью `futex_wake`, у нас установлен `wp_new_futex`, " -"поэтому мы ожидаем на нем. Таким образом, фактическое перемещение " +"поэтому мы ожидаем на нём. Таким образом, фактическое перемещение " "выполняется в этой функции." #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:1260 #, no-wrap msgid "futex_wake" msgstr "futex_wake" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1268 msgid "" "Waking up a thread sleeping on a futex is performed in the `futex_wake` " "function. First in this function we mimic the strange Linux(R) behavior, " "where it wakes up N threads for all operations, the only exception is that " "the REQUEUE operations are performed on N+1 threads. But this usually does " "not make any difference as we are waking up all threads. Next in the " "function in the loop we wake up n threads, after this we check if there is a " "new futex for requeueing. If so, we requeue up to n2 threads on the new " "futex. This cooperates with `futex_sleep`." msgstr "" "Пробуждение потока, ожидающего на фьютексе, выполняется в функции " "`futex_wake`. Сначала в этой функции мы имитируем странное поведение " "Linux(R), где пробуждаются N потоков для всех операций, за исключением того, " "что операции REQUEUE выполняются на N+1 потоках. Однако обычно это не имеет " "значения, так как мы пробуждаем все потоки. Далее в функции в цикле мы " "пробуждаем n потоков, после чего проверяем, есть ли новый фьютекс для " "перестановки. Если есть, мы переставляем до n2 потоков на новый futex. Это " "взаимодействует с `futex_sleep`." #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:1270 #, no-wrap msgid "futex_wake_op" msgstr "futex_wake_op" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1275 msgid "" "The `FUTEX_WAKE_OP` operation is quite complicated. First we obtain two " "futexes at addresses `uaddr` and `uaddr2` then we perform the atomic " "operation using `val3` and `uaddr2`. Then `val` waiters on the first futex " "is woken up and if the atomic operation condition holds we wake up `val2` (i." "e. `timeout`) waiter on the second futex." msgstr "" "Операция `FUTEX_WAKE_OP` довольно сложна. Сначала мы получаем два фьютекса " "по адресам `uaddr` и `uaddr2`, затем выполняем атомарную операцию с " "использованием `val3` и `uaddr2`. После этого пробуждаются `val` ожидающих " "на первом фьютексе, и если условие атомарной операции выполняется, мы " "пробуждаем `val2` (т.е. `timeout`) ожидающих на втором фьютексе." #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:1277 #, no-wrap msgid "futex atomic operation" msgstr "Атомарная операция на фьютексе" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1282 msgid "" "The atomic operation takes two parameters `encoded_op` and `uaddr`. The " "encoded operation encodes the operation itself, comparing value, operation " "argument, and comparing argument. The pseudocode for the operation is like " "this one:" msgstr "" "Атомарная операция принимает два параметра `encoded_op` и `uaddr`. " "Закодированная операция включает саму операцию, сравниваемое значение, " "аргумент операции и аргумент сравнения. Псевдокод операции выглядит " "следующим образом:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:1287 #, no-wrap msgid "" "oldval = *uaddr2\n" "*uaddr2 = oldval OP oparg\n" msgstr "" "oldval = *uaddr2\n" "*uaddr2 = oldval OP oparg\n" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1291 msgid "" "And this is done atomically. First a copying in of the number at `uaddr` is " "performed and the operation is done. The code handles page faults and if no " "page fault occurs `oldval` is compared to `cmparg` argument with cmp " "comparator." msgstr "" "И это выполняется атомарно. Сначала происходит копирование числа по адресу " "`uaddr`, а затем выполняется операция. Код обрабатывает ошибки страниц, и " "если ошибки не происходит, `oldval` сравнивается с аргументом `cmparg` с " "помощью компаратора cmp." #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:1293 #, no-wrap msgid "Futex locking" msgstr "Блокировка фьютекса" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1297 msgid "" "Futex implementation uses two lock lists protecting `sx_lock` and global " "locks (either Giant or another `sx_lock`). Every operation is performed " "locked from the start to the very end." msgstr "" "Реализация фьютексов использует два списка блокировок для защиты `sx_lock` и " "глобальных блокировок (либо Giant, либо другой `sx_lock`). Каждая операция " "выполняется заблокированной от начала до самого конца." #. type: Title === #: documentation/content/en/articles/linux-emulation/_index.adoc:1299 #, no-wrap msgid "Various syscalls implementation" msgstr "Реализация различных системных вызовов" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1302 msgid "" "In this section I am going to describe some smaller syscalls that are worth " "mentioning because their implementation is not obvious or those syscalls are " "interesting from other point of view." msgstr "" "В этом разделе я опишу несколько менее значимых системных вызовов, которые " "стоит упомянуть, потому что их реализация неочевидна или эти вызовы " "представляют интерес с другой точки зрения." #. type: Title ==== #: documentation/content/en/articles/linux-emulation/_index.adoc:1304 #, no-wrap msgid "*at family of syscalls" msgstr "*семейство системных вызовов at" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1313 msgid "" "During development of Linux(R) 2.6.16 kernel, the *at syscalls were added. " "Those syscalls (`openat` for example) work exactly like their at-less " "counterparts with the slight exception of the `dirfd` parameter. This " "parameter changes where the given file, on which the syscall is to be " "performed, is. When the `filename` parameter is absolute `dirfd` is ignored " "but when the path to the file is relative, it comes to the play. The " "`dirfd` parameter is a directory relative to which the relative pathname is " "checked. The `dirfd` parameter is a file descriptor of some directory or " "`AT_FDCWD`. So for example the `openat` syscall can be like this:" msgstr "" "Во время разработки ядра Linux(R) 2.6.16 были добавлены *at-системные " "вызовы. Эти системные вызовы (например, `openat`) работают точно так же, как " "их аналоги без at, за исключением параметра `dirfd`. Этот параметр " "определяет местоположение файла, над которым выполняется системный вызов. " "Если параметр `filename` является абсолютным, `dirfd` игнорируется, но если " "путь к файлу относительный, `dirfd` вступает в игру. Параметр `dirfd` " "представляет собой каталог, относительно которого проверяется относительный " "путь. Параметр `dirfd` является файловым дескриптором некоторого каталога " "или `AT_FDCWD`. Например, системный вызов `openat` может выглядеть следующим " "образом:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:1317 #, no-wrap msgid "file descriptor 123 = /tmp/foo/, current working directory = /tmp/\n" msgstr "file descriptor 123 = /tmp/foo/, current working directory = /tmp/\n" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:1322 #, no-wrap msgid "" "openat(123, /tmp/bah\\, flags, mode)\t/* opens /tmp/bah */\n" "openat(123, bah\\, flags, mode)\t\t/* opens /tmp/foo/bah */\n" "openat(AT_FDWCWD, bah\\, flags, mode)\t/* opens /tmp/bah */\n" "openat(stdio, bah\\, flags, mode)\t/* returns error because stdio is not a directory */\n" msgstr "" "openat(123, /tmp/bah\\, flags, mode)\t/* opens /tmp/bah */\n" "openat(123, bah\\, flags, mode)\t\t/* opens /tmp/foo/bah */\n" "openat(AT_FDWCWD, bah\\, flags, mode)\t/* opens /tmp/bah */\n" "openat(stdio, bah\\, flags, mode)\t/* returns error because stdio is not a directory */\n" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1331 msgid "" "This infrastructure is necessary to avoid races when opening files outside " "the working directory. Imagine that a process consists of two threads, " "thread A and thread B. Thread A issues `open(./tmp/foo/bah., flags, mode)` " "and before returning it gets preempted and thread B runs. Thread B does not " "care about the needs of thread A and renames or removes [.filename]#/tmp/foo/" "#. We got a race. To avoid this we can open [.filename]#/tmp/foo# and use " "it as `dirfd` for `openat` syscall. This also enables user to implement per-" "thread working directories." msgstr "" "Эта инфраструктура необходима для избежания состояний гонки при открытии " "файлов вне рабочего каталога. Представьте, что процесс состоит из двух " "потоков, потока A и потока B. Поток A выполняет `open(./tmp/foo/bah., flags, " "mode)`, и перед возвратом управления он вытесняется, и начинает выполняться " "поток B. Поток B не учитывает потребности потока A и переименовывает или " "удаляет [.filename]#/tmp/foo/#. Возникает состояние гонки. Чтобы избежать " "этого, мы можем открыть [.filename]#/tmp/foo# и использовать его как `dirfd` " "для системного вызова `openat`. Это также позволяет пользователю реализовать " "рабочие каталоги для каждого потока." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1334 msgid "" "Linux(R) family of *at syscalls contains: `linux_openat`, `linux_mkdirat`, " "`linux_mknodat`, `linux_fchownat`, `linux_futimesat`, `linux_fstatat64`, " "`linux_unlinkat`, `linux_renameat`, `linux_linkat`, `linux_symlinkat`, " "`linux_readlinkat`, `linux_fchmodat` and `linux_faccessat`. All these are " "implemented using the modified man:namei[9] routine and simple wrapping " "layer." msgstr "" "Семейство *at системных вызовов Linux(R) включает: `linux_openat`, " "`linux_mkdirat`, `linux_mknodat`, `linux_fchownat`, `linux_futimesat`, " "`linux_fstatat64`, `linux_unlinkat`, `linux_renameat`, `linux_linkat`, " "`linux_symlinkat`, `linux_readlinkat`, `linux_fchmodat` и `linux_faccessat`. " "Все они реализованы с использованием модифицированной функции man:namei[9] и " "простого слоя обёртки." #. type: Title ===== #: documentation/content/en/articles/linux-emulation/_index.adoc:1336 #, no-wrap msgid "Implementation" msgstr "Реализация" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1344 msgid "" "The implementation is done by altering the man:namei[9] routine (described " "above) to take additional parameter `dirfd` in its `nameidata` structure, " "which specifies the starting point of the pathname lookup instead of using " "the current working directory every time. The resolution of `dirfd` from " "file descriptor number to a vnode is done in native *at syscalls. When " "`dirfd` is `AT_FDCWD` the `dvp` entry in `nameidata` structure is `NULL` but " "when `dirfd` is a different number we obtain a file for this file " "descriptor, check whether this file is valid and if there is vnode attached " "to it then we get a vnode. Then we check this vnode for being a directory. " "In the actual man:namei[9] routine we simply substitute the `dvp` vnode for " "`dp` variable in the man:namei[9] function, which determines the starting " "point. The man:namei[9] is not used directly but via a trace of different " "functions on various levels. For example the `openat` goes like this:" msgstr "" "Реализация выполнена путем изменения функции man:namei[9] (описанной выше) " "для приема дополнительного параметра `dirfd` в структуре `nameidata`, " "который указывает начальную точку для поиска пути вместо использования " "текущего рабочего каталога каждый раз. Преобразование `dirfd` из номера " "файлового дескриптора в vnode выполняется в нативных *at-системных вызовах. " "Когда `dirfd` равен `AT_FDCWD`, запись `dvp` в структуре `nameidata` имеет " "значение `NULL`, но если `dirfd` представляет другой номер, мы получаем файл " "по этому дескриптору, проверяем его валидность и, если к нему прикреплен " "vnode, получаем этот vnode. Затем проверяем, является ли этот vnode " "каталогом. В самой функции man:namei[9] мы просто заменяем vnode `dvp` на " "переменную `dp` в функции man:namei[9], которая определяет начальную точку. " "Функция man:namei[9] используется не напрямую, а через цепочку различных " "функций на разных уровнях. Например, `openat` работает следующим образом:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-emulation/_index.adoc:1348 #, no-wrap msgid "openat() --> kern_openat() --> vn_open() -> namei()\n" msgstr "openat() --> kern_openat() --> vn_open() -> namei()\n" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1354 msgid "" "For this reason `kern_open` and `vn_open` must be altered to incorporate the " "additional `dirfd` parameter. No compat layer is created for those because " "there are not many users of this and the users can be easily converted. " "This general implementation enables FreeBSD to implement their own *at " "syscalls. This is being discussed right now." msgstr "" "По этой причине `kern_open` и `vn_open` должны быть изменены для включения " "дополнительного параметра `dirfd`. Слой совместимости для них не создаётся, " "так как пользователей этих функций немного и их можно легко адаптировать. " "Данная общая реализация позволяет FreeBSD реализовать свои собственные *at-" "системные вызовы. Это обсуждается в настоящее время." #. type: Title ==== #: documentation/content/en/articles/linux-emulation/_index.adoc:1356 #, no-wrap msgid "Ioctl" msgstr "Ioctl" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1370 msgid "" "The ioctl interface is quite fragile due to its generality. We have to bear " "in mind that devices differ between Linux(R) and FreeBSD so some care must " "be applied to do ioctl emulation work right. The ioctl handling is " "implemented in [.filename]#linux_ioctl.c#, where `linux_ioctl` function is " "defined. This function simply iterates over sets of ioctl handlers to find " "a handler that implements a given command. The ioctl syscall has three " "parameters, the file descriptor, command and an argument. The command is a " "16-bit number, which in theory is divided into high 8 bits determining class " "of the ioctl command and low 8 bits, which are the actual command within the " "given set. The emulation takes advantage of this division. We implement " "handlers for each set, like `sound_handler` or `disk_handler`. Each handler " "has a maximum command and a minimum command defined, which is used for " "determining what handler is used. There are slight problems with this " "approach because Linux(R) does not use the set division consistently so " "sometimes ioctls for a different set are inside a set they should not belong " "to (SCSI generic ioctls inside cdrom set, etc.). FreeBSD currently does not " "implement many Linux(R) ioctls (compared to NetBSD, for example) but the " "plan is to port those from NetBSD. The trend is to use Linux(R) ioctls even " "in the native FreeBSD drivers because of the easy porting of applications." msgstr "" "Интерфейс ioctl довольно хрупок из-за своей обобщённости. Необходимо " "учитывать, что устройства в Linux(R) и FreeBSD различаются, поэтому " "требуется особая осторожность для корректной работы эмуляции ioctl. " "Обработка ioctl реализована в файле [.filename]#linux_ioctl.c#, где " "определена функция `linux_ioctl`. Эта функция просто перебирает наборы " "обработчиков ioctl, чтобы найти обработчик, реализующий данную команду. " "Системный вызов ioctl имеет три параметра: файловый дескриптор, команду и " "аргумент. Команда представляет собой 16-битное число, которое теоретически " "делится на старшие 8 бит, определяющие класс команды ioctl, и младшие 8 бит, " "которые являются конкретной командой в данном наборе. Эмуляция использует " "это разделение. Реализованы обработчики для каждого набора, такие как " "`sound_handler` или `disk_handler`. Каждый обработчик имеет определённые " "максимальную и минимальную команды, которые используются для выбора нужного " "обработчика. Существуют небольшие проблемы с этим подходом, поскольку " "Linux(R) не всегда последовательно использует разделение на наборы, поэтому " "иногда ioctls для другого набора оказываются внутри набора, к которому они " "не должны принадлежать (например, SCSI generic ioctls внутри набора cdrom и " "т.д.). В настоящее время FreeBSD реализует не так много ioctls Linux(R) (по " "сравнению с NetBSD, например), но планируется перенести их из NetBSD. " "Тенденция такова, что ioctls Linux(R) используются даже в родных драйверах " "FreeBSD для упрощения портирования приложений." #. type: Title ==== #: documentation/content/en/articles/linux-emulation/_index.adoc:1372 #, no-wrap msgid "Debugging" msgstr "Отладка" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1379 msgid "" "Every syscall should be debuggable. For this purpose we introduce a small " "infrastructure. We have the ldebug facility, which tells whether a given " "syscall should be debugged (settable via a sysctl). For printing we have " "LMSG and ARGS macros. Those are used for altering a printable string for " "uniform debugging messages." msgstr "" "Каждый системный вызов должен поддерживать отладку. Для этой цели мы вводим " "небольшую инфраструктуру. У нас есть механизм `ldebug`, который определяет, " "нужно ли отлаживать данный системный вызов (настраивается через `sysctl`). " "Для вывода сообщений используются макросы `LMSG` и `ARGS`. Они применяются " "для форматирования строк вывода с целью создания единообразных отладочных " "сообщений." #. type: Title == #: documentation/content/en/articles/linux-emulation/_index.adoc:1381 #, no-wrap msgid "Conclusion" msgstr "Заключение" #. type: Title === #: documentation/content/en/articles/linux-emulation/_index.adoc:1384 #, no-wrap msgid "Results" msgstr "Результаты" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1390 msgid "" "As of April 2007 the Linux(R) emulation layer is capable of emulating the " "Linux(R) 2.6.16 kernel quite well. The remaining problems concern futexes, " "unfinished *at family of syscalls, problematic signals delivery, missing " "`epoll` and `inotify` and probably some bugs we have not discovered yet. " "Despite this we are capable of running basically all the Linux(R) programs " "included in FreeBSD Ports Collection with Fedora Core 4 at 2.6.16 and there " "are some rudimentary reports of success with Fedora Core 6 at 2.6.16. The " "Fedora Core 6 linux_base was recently committed enabling some further " "testing of the emulation layer and giving us some more hints where we should " "put our effort in implementing missing stuff." msgstr "" "По состоянию на апрель 2007 года уровень эмуляции Linux(R) способен " "достаточно хорошо эмулировать ядро Linux(R) 2.6.16. Оставшиеся проблемы " "касаются фьютексов, незавершённого семейства системных вызовов *at, " "проблематичной доставки сигналов, отсутствия `epoll` и `inotify`, а также, " "вероятно, некоторых ошибок, которые мы ещё не обнаружили. Несмотря на это, " "мы способны запускать практически все программы Linux(R), включённые в " "Коллекцию портов FreeBSD, с Fedora Core 4 на ядре 2.6.16, а также есть " "некоторые предварительные сообщения об успешной работе с Fedora Core 6 на " "ядре 2.6.16. Недавно был добавлен linux_base Fedora Core 6, что позволило " "провести дополнительные тестирования уровня эмуляции и дало нам больше " "подсказок, куда следует направить усилия для реализации недостающих функций." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1394 msgid "" "We are able to run the most used applications like package:www/linux-" "firefox[], package:net-im/skype[] and some games from the Ports Collection. " "Some of the programs exhibit bad behavior under 2.6 emulation but this is " "currently under investigation and hopefully will be fixed soon. The only " "big application that is known not to work is the Linux(R) Java(TM) " "Development Kit and this is because of the requirement of `epoll` facility " "which is not directly related to the Linux(R) kernel 2.6." msgstr "" "Мы можем запускать наиболее популярные приложения, такие как package:www/" "linux-firefox[], package:net-im/skype[], и некоторые игры из Коллекции " "портов. Некоторые программы демонстрируют некорректное поведение при " "эмуляции 2.6, но это в настоящее время исследуется, и, надеемся, скоро будет " "исправлено. Единственное крупное приложение, которое, как известно, не " "работает, — это Linux(R) Java(TM) Development Kit, и это связано с " "требованием функции `epoll`, которая не имеет прямого отношения к ядру " "Linux(R) 2.6." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1397 msgid "" "We hope to enable 2.6.16 emulation by default some time after FreeBSD 7.0 is " "released at least to expose the 2.6 emulation parts for some wider testing. " "Once this is done we can switch to Fedora Core 6 linux_base, which is the " "ultimate plan." msgstr "" "Мы надеемся включить эмуляцию 2.6.16 по умолчанию через некоторое время " "после выхода FreeBSD 7.0, по крайней мере, чтобы открыть части эмуляции 2.6 " "для более широкого тестирования. Как только это будет сделано, мы сможем " "перейти на Fedora Core 6 linux_base, что является конечной целью." #. type: Title === #: documentation/content/en/articles/linux-emulation/_index.adoc:1399 #, no-wrap msgid "Future work" msgstr "Будущие работы" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1402 msgid "" "Future work should focus on fixing the remaining issues with futexes, " "implement the rest of the *at family of syscalls, fix the signal delivery " "and possibly implement the `epoll` and `inotify` facilities." msgstr "" "Будущая работа должна быть сосредоточена на исправлении оставшихся проблем с " "фьютексами, реализации оставшихся системных вызовов семейства *at, " "исправлении доставки сигналов и, возможно, реализации механизмов `epoll` и " "`inotify`." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1404 msgid "" "We hope to be able to run the most important programs flawlessly soon, so we " "will be able to switch to the 2.6 emulation by default and make the Fedora " "Core 6 the default linux_base because our currently used Fedora Core 4 is " "not supported any more." msgstr "" "Мы надеемся вскоре добиться безупречной работы наиболее важных программ, " "чтобы можно было по умолчанию переключиться на эмуляцию 2.6 и сделать Fedora " "Core 6 базовой версией linux_base, поскольку используемая в настоящее время " "Fedora Core 4 больше не поддерживается." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1408 msgid "" "The other possible goal is to share our code with NetBSD and DragonflyBSD. " "NetBSD has some support for 2.6 emulation but its far from finished and not " "really tested. DragonflyBSD has expressed some interest in porting the 2.6 " "improvements." msgstr "" "Другая возможная цель — поделиться нашим кодом с NetBSD и DragonflyBSD. " "NetBSD имеет некоторую поддержку эмуляции 2.6, но она далека от завершения и " "не была должным образом протестирована. DragonflyBSD выразила некоторую " "заинтересованность в переносе улучшений версии 2.6." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1413 msgid "" "Generally, as Linux(R) develops we would like to keep up with their " "development, implementing newly added syscalls. Splice comes to mind " "first. Some already implemented syscalls are also suboptimal, for example " "`mremap` and others. Some performance improvements can also be made, finer " "grained locking and others." msgstr "" "В целом, по мере развития Linux(R) мы хотели бы идти в ногу с их " "разработкой, реализуя новые системные вызовы. В первую очередь на ум " "приходит `splice`. Некоторые уже реализованные системные вызовы также " "неоптимальны, например `mremap` и другие. Также можно внести некоторые " "улучшения производительности, такие как более детальная блокировка и другие." #. type: Title === #: documentation/content/en/articles/linux-emulation/_index.adoc:1415 #, no-wrap msgid "Team" msgstr "Команда" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1418 msgid "I cooperated on this project with (in alphabetical order):" msgstr "Я сотрудничал в этом проекте с (в алфавитном порядке):" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1420 msgid "`{jhb}`" msgstr "`{jhb}`" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1421 msgid "`{kib}`" msgstr "`{kib}`" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1422 msgid "Emmanuel Dreyfus" msgstr "Emmanuel Dreyfus" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1423 msgid "Scot Hetzel" msgstr "Scot Hetzel" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1424 msgid "`{jkim}`" msgstr "`{jkim}`" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1425 msgid "`{netchild}`" msgstr "`{netchild}`" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1426 msgid "`{ssouhlal}`" msgstr "`{ssouhlal}`" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1427 msgid "Li Xiao" msgstr "Li Xiao" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1428 msgid "`{davidxu}`" msgstr "`{davidxu}`" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1430 msgid "" "I would like to thank all those people for their advice, code reviews and " "general support." msgstr "" "Я хотел бы поблагодарить всех этих людей за их советы, рецензирование кода и " "общую поддержку." #. type: Title == #: documentation/content/en/articles/linux-emulation/_index.adoc:1432 #, no-wrap msgid "Literatures" msgstr "Литература" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1435 msgid "" "Marshall Kirk McKusick - George V. Neville-Neil. Design and Implementation " "of the FreeBSD operating system. Addison-Wesley, 2005." msgstr "" "Marshall Kirk McKusick - George V. Neville-Neil. Design and Implementation " "of the FreeBSD operating system. Addison-Wesley, 2005 год." #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1436 msgid "https://tldp.org[https://tldp.org]" msgstr "https://tldp.org[https://tldp.org]" #. type: Plain text #: documentation/content/en/articles/linux-emulation/_index.adoc:1436 msgid "https://www.kernel.org[https://www.kernel.org]" msgstr "https://www.kernel.org[https://www.kernel.org]" diff --git a/documentation/content/ru/articles/linux-users/_index.po b/documentation/content/ru/articles/linux-users/_index.po index 6390a8ecc8..bb025573fa 100644 --- a/documentation/content/ru/articles/linux-users/_index.po +++ b/documentation/content/ru/articles/linux-users/_index.po @@ -1,987 +1,987 @@ # SOME DESCRIPTIVE TITLE # Copyright (C) YEAR The FreeBSD Project # This file is distributed under the same license as the FreeBSD Documentation package. -# Vladlen Popolitov , 2025. +# Vladlen Popolitov , 2025, 2026. msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" "POT-Creation-Date: 2025-11-08 16:17+0000\n" -"PO-Revision-Date: 2025-11-12 04:45+0000\n" +"PO-Revision-Date: 2026-03-08 09:11+0000\n" "Last-Translator: Vladlen Popolitov \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 4.17\n" #. type: YAML Front Matter: description #: documentation/content/en/articles/linux-users/_index.adoc:1 #, no-wrap msgid "This document is intended to quickly familiarize intermediate to advanced Linux® users with the basics of FreeBSD." msgstr "Этот документ предназначен для быстрого ознакомления с основами FreeBSD пользователей Linux® среднего и продвинутого уровня." #. type: YAML Front Matter: title #: documentation/content/en/articles/linux-users/_index.adoc:1 #, no-wrap msgid "FreeBSD Quickstart Guide for Linux® Users" msgstr "Быстрое руководство по FreeBSD для пользователей Linux®" #. type: Title = #: documentation/content/en/articles/linux-users/_index.adoc:11 #, no-wrap msgid "FreeBSD Quickstart Guide for Linux(R) Users" msgstr "Быстрое руководство по FreeBSD для пользователей Linux(R)" #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:44 msgid "Abstract" msgstr "Аннотация" #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:46 msgid "" "This document is intended to quickly familiarize intermediate to advanced " "Linux(R) users with the basics of FreeBSD." msgstr "" "Этот документ предназначен для быстрого ознакомления с основами FreeBSD " "пользователей Linux(R) среднего и продвинутого уровня." #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:48 msgid "'''" msgstr "'''" #. type: Title == #: documentation/content/en/articles/linux-users/_index.adoc:52 #, no-wrap msgid "Introduction" msgstr "Введение" #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:55 msgid "" "This document highlights some of the technical differences between FreeBSD " "and Linux(R) so that intermediate to advanced Linux(R) users can quickly " "familiarize themselves with the basics of FreeBSD." msgstr "" "В этом документе освещаются некоторые технические различия между FreeBSD и " "Linux(R), чтобы пользователи Linux(R) среднего и продвинутого уровней могли " "быстро ознакомиться с основами FreeBSD." #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:58 msgid "" "This document assumes that FreeBSD is already installed. Refer to the " "extref:{handbook}bsdinstall[Installing FreeBSD, bsdinstall] chapter of the " "FreeBSD Handbook for help with the installation process." msgstr "" "Этот документ предполагает, что FreeBSD уже установлена. Для получения " "помощи по процессу установки обратитесь к главе extref:{handbook}bsdinstall[" "Установка FreeBSD, bsdinstall] Руководства FreeBSD." #. type: Title == #: documentation/content/en/articles/linux-users/_index.adoc:60 #, no-wrap msgid "Default Shell" msgstr "Стандартная оболочка" #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:68 msgid "" "Linux(R) users are often surprised to find that Bash is not the default " "shell in FreeBSD. In fact, Bash is not included in the default " "installation. Instead, the Bourne shell-compatible man:sh[1] as the default " "user shell. The root shell is man:tcsh[1] by default on FreeBSD 13 and " "earlier and man:sh[1] on FreeBSD 14 and later. man:sh[1] is very similar to " "Bash but with a much smaller feature-set. Generally shell scripts written " "for man:sh[1] will run in Bash, but the reverse is not always true." msgstr "" "Пользователи Linux(R) часто удивляются, обнаружив, что Bash не является " "оболочкой по умолчанию в FreeBSD. На самом деле, Bash не включён в " "стандартную установку. Вместо этого используется совместимая с Bourne shell " "оболочка man:sh[1] в качестве оболочки пользователя по умолчанию. Оболочка " "root — это man:tcsh[1] по умолчанию в FreeBSD 13 и более ранних версиях и " "man:sh[1] в FreeBSD 14 и позднее. Оболочка man:sh[1] очень похожа на Bash, " "но имеет гораздо меньший набор возможностей. Как правило, скрипты, " "написанные для man:sh[1], будут работать в Bash, но обратное не всегда верно." #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:70 msgid "" "However, Bash and other shells are available for installation using the " "FreeBSD extref:{handbook}ports[Packages and Ports Collection, ports]." msgstr "" "Однако Bash и другие оболочки доступны для установки через " "extref:{handbook}ports[Коллекцию портов и пакетов FreeBSD, ports]." #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:75 msgid "" "After installing another shell, use man:chsh[1] to change a user's default " "shell. It is recommended that the `root` user's default shell remain " "unchanged since shells which are not included in the base distribution are " "installed to [.filename]#/usr/local/bin#. In the event of a problem, the " "file system where [.filename]#/usr/local/bin# is located may not be " "mounted. In this case, `root` would not have access to its default shell, " "preventing `root` from logging in and fixing the problem." msgstr "" "После установки другой оболочки используйте man:chsh[1], чтобы изменить " "оболочку пользователя по умолчанию. Рекомендуется оставить оболочку " "пользователя `root` без изменений, поскольку оболочки, не входящие в базовую " "поставку, устанавливаются в [.filename]#/usr/local/bin#. В случае " "возникновения проблемы файловая система, в которой находится [.filename]#/" "usr/local/bin#, может быть не смонтирована. В такой ситуации у `root` не " "будет доступа к своей оболочке по умолчанию, что помешает ему войти в " "систему и устранить проблему." #. type: Title == #: documentation/content/en/articles/linux-users/_index.adoc:77 #, no-wrap msgid "Packages and Ports: Adding Software in FreeBSD" msgstr "Пакеты и порты: установка программ в FreeBSD" #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:81 msgid "" "FreeBSD provides two methods for installing applications: binary packages " "and compiled ports. Each method has its own benefits:" msgstr "" "FreeBSD предоставляет два метода установки приложений: бинарные пакеты и " "скомпилированные порты. Каждый метод имеет свои преимущества:" #. type: Block title #: documentation/content/en/articles/linux-users/_index.adoc:82 #, no-wrap msgid "Binary Packages" msgstr "Бинарные пакеты" #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:84 msgid "Faster installation as compared to compiling large applications." msgstr "Быстрая установка по сравнению с компиляцией крупных приложений." #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:85 msgid "Does not require an understanding of how to compile software." msgstr "Не требует понимания того, как компилировать программное обеспечение." #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:86 msgid "No need to install a compiler." msgstr "Нет необходимости устанавливать компилятор." #. type: Title === #: documentation/content/en/articles/linux-users/_index.adoc:87 #: documentation/content/en/articles/linux-users/_index.adoc:112 #, no-wrap msgid "Ports" msgstr "Порты" #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:89 msgid "Ability to customize installation options." msgstr "Возможность настройки параметров установки." #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:90 msgid "Custom patches can be applied." msgstr "Могут быть применены пользовательские патчи." #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:94 msgid "" "If an application installation does not require any customization, " "installing the package is sufficient. Compile the port instead whenever an " "application requires customization of the default options. If needed, a " "custom package can be compiled from ports using `make package`." msgstr "" "Если установка приложения не требует дополнительной собственной настройки, " "достаточно установить пакет. Собирайте порт, если приложению требуется " "изменение параметров, заданных в пакетах по умолчанию. При необходимости " "собственный пакет можно собрать из портов с помощью `make package`." #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:96 msgid "" "A complete list of all available ports and packages can be found https://" "ports.freebsd.org[here]." msgstr "" "Полный список всех доступных портов и пакетов можно найти https://ports." "freebsd.org[здесь]." #. type: Title === #: documentation/content/en/articles/linux-users/_index.adoc:98 #, no-wrap msgid "Packages" msgstr "Пакеты" #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:103 msgid "" "Packages are pre-compiled applications, the FreeBSD equivalents of [." "filename]#.deb# files on Debian/Ubuntu based systems and [.filename]#.rpm# " "files on Red Hat/Fedora based systems. Packages are installed using `pkg`. " "For example, the following command installs Apache 2.4:" msgstr "" "Пакеты — это предварительно скомпилированные приложения, эквиваленты файлов " "[.filename]#.deb# в системах на основе Debian/Ubuntu и файлов [.filename]#." "rpm# в системах на основе Red Hat/Fedora. Пакеты устанавливаются с помощью " "`pkg`. Например, следующая команда устанавливает Apache 2.4:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-users/_index.adoc:107 #, no-wrap msgid "# pkg install apache24\n" msgstr "# pkg install apache24\n" #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:110 msgid "" "For more information on packages refer to section 4.4 of the FreeBSD " "Handbook: extref:{handbook}ports[Using pkgng for Binary Package Management, " "pkgng-intro]." msgstr "" "Для получения дополнительной информации о пакетах обратитесь к разделу 4.4 " "Руководства FreeBSD: extref:{handbook}ports[Использование pkg для управления " "бинарными пакетами, pkgng-intro]." #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:116 msgid "" "The FreeBSD Ports Collection is a framework of [.filename]#Makefiles# and " "patches specifically customized for installing applications from source on " "FreeBSD. When installing a port, the system will fetch the source code, " "apply any required patches, compile the code, and install the application " "and any required dependencies." msgstr "" "Коллекция портов FreeBSD — это набор [.filename]#Makefile# и патчей, " "специально адаптированных для установки приложений из исходного кода в " "FreeBSD. При установке порта система загрузит исходный код, применит " "необходимые патчи, скомпилирует код и установит приложение вместе с " "требуемыми зависимостями." #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:119 msgid "" "The Ports Collection, sometimes referred to as the ports tree, can be " "installed to [.filename]#/usr/ports# using link:{handbook}mirrors/" "#git[Git]. Detailed instructions for installing the Ports Collection can be " "found in extref:{handbook}ports[section 4.5.1, ports-using-installation-" "methods] of the FreeBSD Handbook." msgstr "" "Коллекция портов, иногда называемая деревом портов, может быть установлена в " "[.filename]#/usr/ports# с помощью link:{handbook}mirrors/#git[Git]. " "Подробные инструкции по установке Коллекции портов можно найти в " "extref:{handbook}ports[разделе 4.5.1, ports-using-installation-methods] " "Руководства FreeBSD." #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:121 msgid "" "To compile a port, change to the port's directory and start the build " "process. The following example installs Apache 2.4 from the Ports Collection:" msgstr "" "Для сборки порта перейдите в его каталог и запустите процесс сборки. В " "следующем примере устанавливается Apache 2.4 из коллекции портов:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-users/_index.adoc:126 #, no-wrap msgid "" "# cd /usr/ports/www/apache24\n" "# make install clean\n" msgstr "" "# cd /usr/ports/www/apache24\n" "# make install clean\n" #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:130 msgid "" "A benefit of using ports to install software is the ability to customize the " "installation options. This example specifies that the mod_ldap module " "should also be installed:" msgstr "" "Преимущество использования портов для установки программного обеспечения " "заключается в возможности настройки параметров установки. В этом примере " "указано, что также должен быть установлен модуль mod_ldap:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-users/_index.adoc:135 #, no-wrap msgid "" "# cd /usr/ports/www/apache24\n" "# make WITH_LDAP=\"YES\" install clean\n" msgstr "" "# cd /usr/ports/www/apache24\n" "# make WITH_LDAP=\"YES\" install clean\n" #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:138 msgid "" "Refer to extref:{handbook}ports[Using the Ports Collection, ports-using] for " "more information." msgstr "" "Обратитесь к разделу extref:{handbook}ports[Использование коллекции портов, " "ports-using] для получения дополнительной информации." #. type: Title == #: documentation/content/en/articles/linux-users/_index.adoc:140 #, no-wrap msgid "System Startup" msgstr "Загрузка системы" #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:147 msgid "" "Many Linux(R) distributions use the SysV init system, whereas FreeBSD uses " "the traditional BSD-style man:init[8]. Under the BSD-style man:init[8], " "there are no run-levels and [.filename]#/etc/inittab# does not exist. " "Instead, startup is controlled by man:rc[8] scripts. At system boot, [." "filename]#/etc/rc# reads [.filename]#/etc/rc.conf# and [.filename]#/etc/" "defaults/rc.conf# to determine which services are to be started. The " "specified services are then started by running the corresponding service " "initialization scripts located in [.filename]#/etc/rc.d/# and [.filename]#/" "usr/local/etc/rc.d/#. These scripts are similar to the scripts located in [." "filename]#/etc/init.d/# on Linux(R) systems." msgstr "" "Многие дистрибутивы Linux(R) используют систему инициализации SysV, тогда " "как FreeBSD использует традиционный BSD-стиль man:init[8]. В BSD-стиле man:" "init[8] нет уровней запуска (run-levels), и файл [.filename]#/etc/inittab# " "отсутствует. Вместо этого запуск системы управляется сценариями man:rc[8]. " "При загрузке системы [.filename]#/etc/rc# читает [.filename]#/etc/rc.conf# и " "[.filename]#/etc/defaults/rc.conf#, чтобы определить, какие службы должны " "быть запущены. Указанные службы затем запускаются путем выполнения " "соответствующих сценариев инициализации, расположенных в [.filename]#/etc/rc." "d/# и [.filename]#/usr/local/etc/rc.d/#. Эти сценарии аналогичны сценариям, " "расположенным в [.filename]#/etc/init.d/# в системах Linux(R)." #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:150 msgid "" "The scripts found in [.filename]#/etc/rc.d/# are for applications that are " "part of the \"base\" system, such as man:cron[8], man:sshd[8], and man:" "syslog[3]. The scripts in [.filename]#/usr/local/etc/rc.d/# are for user-" "installed applications such as Apache and Squid." msgstr "" "Скрипты, расположенные в [.filename]#/etc/rc.d/#, предназначены для " "приложений, входящих в \"базовую\" систему, таких как man:cron[8], man:" "sshd[8] и man:syslog[3]. Скрипты в [.filename]#/usr/local/etc/rc.d/# " "предназначены для пользовательских приложений, таких как Apache и Squid." #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:155 msgid "" "Since FreeBSD is developed as a complete operating system, user-installed " "applications are not considered to be part of the \"base\" system. User-" "installed applications are generally installed using extref:{handbook}" "ports[Packages or Ports, ports-using]. In order to keep them separate from " "the base system, user-installed applications are installed under [." "filename]#/usr/local/#. Therefore, user-installed binaries reside in [." "filename]#/usr/local/bin/#, configuration files are in [.filename]#/usr/" "local/etc/#, and so on." msgstr "" "Поскольку FreeBSD разрабатывается как полноценная операционная система, " "пользовательские приложения не считаются частью «базовой» системы. " "Пользовательские приложения обычно устанавливаются с помощью " "extref:{handbook}ports[Пакетов или Портов, ports-using]. Чтобы отделить их " "от базовой системы, пользовательские приложения устанавливаются в [." "filename]#/usr/local/#. Таким образом, исполняемые файлы пользовательских " "приложений находятся в [.filename]#/usr/local/bin/#, конфигурационные файлы —" " в [.filename]#/usr/local/etc/# и так далее." #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:160 msgid "" "Services are enabled by adding an entry for the service in [.filename]#/etc/" "rc.conf#. The system defaults are found in [.filename]#/etc/defaults/rc." "conf# and these default settings are overridden by settings in [.filename]#/" "etc/rc.conf#. Refer to man:rc.conf[5] for more information about the " "available entries. When installing additional applications, review the " "application's install message to determine how to enable any associated " "services." msgstr "" "Сервисы включаются путем добавления соответствующей записи в файл [." "filename]#/etc/rc.conf#. Системные параметры по умолчанию находятся в файле " "[.filename]#/etc/defaults/rc.conf#, а настройки по умолчанию " "переопределяются параметрами из файла [.filename]#/etc/rc.conf#. Подробнее о " "доступных параметрах можно узнать в man:rc.conf[5]. При установке " "дополнительных приложений ознакомьтесь с сообщением установки, чтобы " "определить, как включить связанные сервисы." #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:162 msgid "" "The following entries in [.filename]#/etc/rc.conf# enable man:sshd[8], " "enable Apache 2.4, and specify that Apache should be started with SSL." msgstr "" "Следующие записи в [.filename]#/etc/rc.conf# включают man:sshd[8], " "активируют Apache 2.4 и указывают, что Apache должен запускаться с SSL." #. type: delimited block . 4 #: documentation/content/en/articles/linux-users/_index.adoc:170 #, no-wrap msgid "" "# enable SSHD\n" "sshd_enable=\"YES\"\n" "# enable Apache with SSL\n" "apache24_enable=\"YES\"\n" "apache24_flags=\"-DSSL\"\n" msgstr "" "# enable SSHD\n" "sshd_enable=\"YES\"\n" "# enable Apache with SSL\n" "apache24_enable=\"YES\"\n" "apache24_flags=\"-DSSL\"\n" #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:173 msgid "" "Once a service has been enabled in [.filename]#/etc/rc.conf#, it can be " "started without rebooting the system:" msgstr "" "После включения службы в [.filename]#/etc/rc.conf# её можно запустить без " "перезагрузки системы:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-users/_index.adoc:178 #, no-wrap msgid "" "# service sshd start\n" "# service apache24 start\n" msgstr "" "# service sshd start\n" "# service apache24 start\n" #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:181 msgid "" "If a service has not been enabled, it can be started from the command line " "using `onestart`:" msgstr "" "Если служба не была включена, её можно запустить из командной строки с " "помощью `onestart`:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-users/_index.adoc:185 #, no-wrap msgid "# service sshd onestart\n" msgstr "# service sshd onestart\n" #. type: Title == #: documentation/content/en/articles/linux-users/_index.adoc:188 #, no-wrap msgid "Network Configuration" msgstr "Настройка сети" #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:192 msgid "" "Instead of a generic _ethX_ identifier that Linux(R) uses to identify a " "network interface, FreeBSD uses the driver name followed by a number. The " "following output from man:ifconfig[8] shows two Intel(R) Pro 1000 network " "interfaces ([.filename]#em0# and [.filename]#em1#):" msgstr "" "Вместо общего идентификатора _ethX_, который используется в Linux(R) для " "обозначения сетевого интерфейса, FreeBSD использует имя драйвера с " "последующим числом. Следующий вывод из man:ifconfig[8] показывает два " "сетевых интерфейса Intel(R) Pro 1000 ([.filename]#em0# и [.filename]#em1#):" #. type: delimited block . 4 #: documentation/content/en/articles/linux-users/_index.adoc:208 #, no-wrap msgid "" "% ifconfig\n" "em0: flags=8843 mtu 1500\n" " options=b\n" " inet 10.10.10.100 netmask 0xffffff00 broadcast 10.10.10.255\n" " ether 00:50:56:a7:70:b2\n" " media: Ethernet autoselect (1000baseTX )\n" " status: active\n" "em1: flags=8843 mtu 1500\n" " options=b\n" " inet 192.168.10.222 netmask 0xffffff00 broadcast 192.168.10.255\n" " ether 00:50:56:a7:03:2b\n" " media: Ethernet autoselect (1000baseTX )\n" " status: active\n" msgstr "" "% ifconfig\n" "em0: flags=8843 mtu 1500\n" " options=b\n" " inet 10.10.10.100 netmask 0xffffff00 broadcast 10.10.10.255\n" " ether 00:50:56:a7:70:b2\n" " media: Ethernet autoselect (1000baseTX )\n" " status: active\n" "em1: flags=8843 mtu 1500\n" " options=b\n" " inet 192.168.10.222 netmask 0xffffff00 broadcast 192.168.10.255\n" " ether 00:50:56:a7:03:2b\n" " media: Ethernet autoselect (1000baseTX )\n" " status: active\n" #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:213 msgid "" "An IP address can be assigned to an interface using man:ifconfig[8]. To " "remain persistent across reboots, the IP configuration must be included in [." "filename]#/etc/rc.conf#. The following [.filename]#/etc/rc.conf# entries " "specify the hostname, IP address, and default gateway:" msgstr "" "IP-адрес может быть назначен интерфейсу с помощью man:ifconfig[8]. Чтобы " "настройки сохранялись после перезагрузки, конфигурация IP должна быть " "указана в [.filename]#/etc/rc.conf#. Следующие записи в [.filename]#/etc/rc." "conf# задают имя хоста, IP-адрес и шлюз по умолчанию:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-users/_index.adoc:219 #, no-wrap msgid "" "hostname=\"server1.example.com\"\n" "ifconfig_em0=\"inet 10.10.10.100 netmask 255.255.255.0\"\n" "defaultrouter=\"10.10.10.1\"\n" msgstr "" "hostname=\"server1.example.com\"\n" "ifconfig_em0=\"inet 10.10.10.100 netmask 255.255.255.0\"\n" "defaultrouter=\"10.10.10.1\"\n" #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:222 msgid "Use the following entries to instead configure an interface for DHCP:" msgstr "Используйте следующие записи для настройки интерфейса через DHCP:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-users/_index.adoc:227 #, no-wrap msgid "" "hostname=\"server1.example.com\"\n" "ifconfig_em0=\"DHCP\"\n" msgstr "" "hostname=\"server1.example.com\"\n" "ifconfig_em0=\"DHCP\"\n" #. type: Title == #: documentation/content/en/articles/linux-users/_index.adoc:230 #, no-wrap msgid "Firewall" msgstr "Firewall" #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:234 msgid "" "FreeBSD does not use Linux(R) IPTABLES for its firewall. Instead, FreeBSD " "offers a choice of three kernel level firewalls:" msgstr "" "FreeBSD не использует Linux(R) IPTABLES для своего межсетевого экрана. " "Вместо этого FreeBSD предлагает выбор из трёх межсетевых экранов на уровне " "ядра:" #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:236 msgid "extref:{handbook}firewalls[PF, firewalls-pf]" msgstr "extref:{handbook}firewalls[PF, firewalls-pf]" #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:237 msgid "extref:{handbook}firewalls[IPFILTER, firewalls-ipf]" msgstr "extref:{handbook}firewalls[IPFILTER, firewalls-ipf]" #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:238 msgid "extref:{handbook}firewalls[IPFW, firewalls-ipfw]" msgstr "extref:{handbook}firewalls[IPFW, firewalls-ipfw]" #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:242 msgid "" "PF is developed by the OpenBSD project and ported to FreeBSD. PF was " "created as a replacement for IPFILTER and its syntax is similar to that of " "IPFILTER. PF can be paired with man:altq[4] to provide QoS features." msgstr "" "PF разработан проектом OpenBSD и портирован в FreeBSD. PF был создан как " "замена для IPFILTER, и его синтаксис схож с синтаксисом IPFILTER. PF может " "использоваться совместно с man:altq[4] для обеспечения функций QoS." #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:244 msgid "This sample PF entry allows inbound SSH:" msgstr "Этот пример записи PF разрешает входящий SSH:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-users/_index.adoc:248 #, no-wrap msgid "pass in on $ext_if inet proto tcp from any to ($ext_if) port 22\n" msgstr "pass in on $ext_if inet proto tcp from any to ($ext_if) port 22\n" #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:252 msgid "" "IPFILTER is the firewall application developed by Darren Reed. It is not " "specific to FreeBSD and has been ported to several operating systems " "including NetBSD, OpenBSD, SunOS, HP/UX, and Solaris." msgstr "" "IPFILTER — это приложение для межсетевого экрана, разработанное Дарреном " "Ридом. Оно не является специфичным для FreeBSD и было портировано на " "несколько операционных систем, включая NetBSD, OpenBSD, SunOS, HP/UX и " "Solaris." #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:254 msgid "The IPFILTER syntax to allow inbound SSH is:" msgstr "Синтаксис IPFILTER для разрешения входящего SSH:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-users/_index.adoc:258 #, no-wrap msgid "pass in on $ext_if proto tcp from any to any port = 22\n" msgstr "pass in on $ext_if proto tcp from any to any port = 22\n" #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:262 msgid "" "IPFW is the firewall developed and maintained by FreeBSD. It can be paired " "with man:dummynet[4] to provide traffic shaping capabilities and simulate " "different types of network connections." msgstr "" "IPFW — это межсетевой экран, разработанный и поддерживаемый FreeBSD. Он " "может быть использован совместно с man:dummynet[4] для обеспечения " "возможностей управления трафиком и имитации различных типов сетевых " "соединений." #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:264 msgid "The IPFW syntax to allow inbound SSH would be:" msgstr "Синтаксис IPFW для разрешения входящего SSH будет следующим:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-users/_index.adoc:268 #, no-wrap msgid "ipfw add allow tcp from any to me 22 in via $ext_if\n" msgstr "ipfw add allow tcp from any to me 22 in via $ext_if\n" #. type: Title == #: documentation/content/en/articles/linux-users/_index.adoc:271 #, no-wrap msgid "Updating FreeBSD" msgstr "Обновление FreeBSD" #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:274 msgid "" "There are two methods for updating a FreeBSD system: from source or binary " "updates." msgstr "" "Существует два метода обновления системы FreeBSD: из исходного кода или " "бинарные обновления." #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:278 msgid "" "Updating from source is the most involved update method, but offers the " "greatest amount of flexibility. The process involves synchronizing a local " "copy of the FreeBSD source code with the FreeBSD Git repository. Once the " "local source code is up-to-date, a new version of the kernel and userland " "can be compiled." msgstr "" "Обновление из исходного кода — это наиболее сложный метод обновления, но он " "предоставляет наибольшую гибкость. Процесс включает синхронизацию локальной " "копии исходного кода FreeBSD с репозиторием FreeBSD Git. После того как " "локальный исходный код обновлён, можно скомпилировать новую версию ядра и " "пользовательского пространства." #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:282 msgid "" "Binary updates are similar to using `yum` or `apt-get` to update a Linux(R) " "system. In FreeBSD, man:freebsd-update[8] can be used fetch new binary " "updates and install them. These updates can be scheduled using man:cron[8]." msgstr "" "Двоичные обновления аналогичны использованию `yum` или `apt-get` для " "обновления системы Linux(R). В FreeBSD, man:freebsd-update[8] может быть " "использован для получения и установки новых двоичных обновлений. Эти " "обновления могут быть запланированы с помощью man:cron[8]." #. type: delimited block = 4 #: documentation/content/en/articles/linux-users/_index.adoc:286 msgid "" "When using man:cron[8] to schedule updates, use `freebsd-update cron` in the " "man:crontab[1] to reduce the possibility of a large number of machines all " "pulling updates at the same time:" msgstr "" "При использовании man:cron[8] для планирования обновлений используйте " "`freebsd-update cron` в man:crontab[1], чтобы снизить вероятность " "одновременного скачивания обновлений большим количеством машин:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-users/_index.adoc:290 #, no-wrap msgid "0 3 * * * root /usr/sbin/freebsd-update cron\n" msgstr "0 3 * * * root /usr/sbin/freebsd-update cron\n" #. type: delimited block = 4 #: documentation/content/en/articles/linux-users/_index.adoc:295 msgid "" "For more information on source and binary updates, refer to extref:{handbook}" "cutting-edge[the chapter on updating, updating-upgrading-freebsdupdate] in " "the FreeBSD Handbook." msgstr "" "Для получения дополнительной информации об обновлениях исходного кода и " "бинарных обновлениях обратитесь к extref:{handbook}cutting-edge[главе об " "обновлениях, updating-upgrading-freebsdupdate] в Руководстве FreeBSD." #. type: Title == #: documentation/content/en/articles/linux-users/_index.adoc:297 #, no-wrap msgid "procfs: Gone But Not Forgotten" msgstr "procfs: ушёл, но не забыт" #. type: delimited block = 4 #: documentation/content/en/articles/linux-users/_index.adoc:301 msgid "" "In some Linux(R) distributions, one could look at [.filename]#/proc/sys/net/" "ipv4/ip_forward# to determine if IP forwarding is enabled. In FreeBSD, man:" "sysctl[8] is instead used to view this and other system settings." msgstr "" "В некоторых дистрибутивах Linux(R) можно посмотреть файл [.filename]#/proc/" "sys/net/ipv4/ip_forward#, чтобы определить, включена ли IP-маршрутизация. В " "FreeBSD вместо этого используется man:sysctl[8] для просмотра этого и других " "системных параметров." #. type: delimited block = 4 #: documentation/content/en/articles/linux-users/_index.adoc:303 msgid "" "For example, use the following to determine if IP forwarding is enabled on a " "FreeBSD system:" msgstr "" "Например, используйте следующую команду, чтобы определить, включена ли IP-" "переадресация в системе FreeBSD:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-users/_index.adoc:308 #, no-wrap msgid "" "% sysctl net.inet.ip.forwarding\n" "net.inet.ip.forwarding: 0\n" msgstr "" "% sysctl net.inet.ip.forwarding\n" "net.inet.ip.forwarding: 0\n" #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:311 msgid "Use `-a` to list all the system settings:" msgstr "Используйте `-a` для вывода всех системных настроек:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-users/_index.adoc:315 #, no-wrap msgid "% sysctl -a | more\n" msgstr "% sysctl -a | more\n" #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:318 msgid "" "If an application requires procfs, add the following entry to [.filename]#/" "etc/fstab#:" msgstr "" "Если приложению требуется procfs, добавьте следующую запись в [.filename]#/" "etc/fstab#:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-users/_index.adoc:322 #, no-wrap msgid "proc /proc procfs rw,noauto 0 0\n" msgstr "proc /proc procfs rw,noauto 0 0\n" #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:325 msgid "" "Including `noauto` will prevent [.filename]#/proc# from being automatically " "mounted at boot." msgstr "" "Добавление `noauto` предотвратит автоматическое монтирование [.filename]#/" "proc# при загрузке." #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:327 msgid "To mount the file system without rebooting:" msgstr "Чтобы подключить файловую систему без перезагрузки:" #. type: delimited block . 4 #: documentation/content/en/articles/linux-users/_index.adoc:331 #, no-wrap msgid "# mount /proc\n" msgstr "# mount /proc\n" #. type: Title == #: documentation/content/en/articles/linux-users/_index.adoc:334 #, no-wrap msgid "Common Commands" msgstr "Распространенные команды" #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:337 msgid "Some common command equivalents are as follows:" msgstr "Некоторые эквиваленты распространённых команд приведены ниже:" #. type: Table #: documentation/content/en/articles/linux-users/_index.adoc:342 #, no-wrap msgid "Linux(R) command (Red Hat/Debian)" msgstr "Команда Linux(R) (Red Hat/Debian)" #. type: Table #: documentation/content/en/articles/linux-users/_index.adoc:343 #, no-wrap msgid "FreeBSD equivalent" msgstr "Эквивалент FreeBSD" #. type: Table #: documentation/content/en/articles/linux-users/_index.adoc:345 #, no-wrap msgid "Purpose" msgstr "Назначение" #. type: Table #: documentation/content/en/articles/linux-users/_index.adoc:346 #, no-wrap msgid "`yum install _package_` / `apt-get install _package_`" msgstr "`yum install _package_` / `apt-get install _package_`" #. type: Table #: documentation/content/en/articles/linux-users/_index.adoc:347 #, no-wrap msgid "`pkg install _package_`" msgstr "`pkg install _package_`" #. type: Table #: documentation/content/en/articles/linux-users/_index.adoc:349 #, no-wrap msgid "Install package from remote repository" msgstr "Установить пакет из удалённого репозитория" #. type: Table #: documentation/content/en/articles/linux-users/_index.adoc:350 #, no-wrap msgid "`rpm -ivh _package_` / `dpkg -i _package_`" msgstr "`rpm -ivh _package_` / `dpkg -i _package_`" #. type: Table #: documentation/content/en/articles/linux-users/_index.adoc:351 #, no-wrap msgid "`pkg add _package_`" msgstr "`pkg add _package_`" #. type: Table #: documentation/content/en/articles/linux-users/_index.adoc:353 #, no-wrap msgid "Install local package" msgstr "Установить локальный пакет" #. type: Table #: documentation/content/en/articles/linux-users/_index.adoc:354 #, no-wrap msgid "`rpm -qa` / `dpkg -l`" msgstr "`rpm -qa` / `dpkg -l`" #. type: Table #: documentation/content/en/articles/linux-users/_index.adoc:355 #, no-wrap msgid "`pkg info`" msgstr "`pkg info`" #. type: Table #: documentation/content/en/articles/linux-users/_index.adoc:357 #, no-wrap msgid "List installed packages" msgstr "Список установленных пакетов" #. type: Table #: documentation/content/en/articles/linux-users/_index.adoc:358 #, no-wrap msgid "`lspci`" msgstr "`lspci`" #. type: Table #: documentation/content/en/articles/linux-users/_index.adoc:359 #, no-wrap msgid "`pciconf`" msgstr "`pciconf`" #. type: Table #: documentation/content/en/articles/linux-users/_index.adoc:361 #, no-wrap msgid "List PCI devices" msgstr "Перечислить устройства PCI" #. type: Table #: documentation/content/en/articles/linux-users/_index.adoc:362 #, no-wrap msgid "`lsmod`" msgstr "`lsmod`" #. type: Table #: documentation/content/en/articles/linux-users/_index.adoc:363 #, no-wrap msgid "`kldstat`" msgstr "`kldstat`" #. type: Table #: documentation/content/en/articles/linux-users/_index.adoc:365 #, no-wrap msgid "List loaded kernel modules" msgstr "Перечислить загруженные модули ядра" #. type: Table #: documentation/content/en/articles/linux-users/_index.adoc:366 #, no-wrap msgid "`modprobe`" msgstr "`modprobe`" #. type: Table #: documentation/content/en/articles/linux-users/_index.adoc:367 #, no-wrap msgid "`kldload` / `kldunload`" msgstr "`kldload` / `kldunload`" #. type: Table #: documentation/content/en/articles/linux-users/_index.adoc:369 #, no-wrap msgid "Load/Unload kernel modules" msgstr "Загрузка/выгрузка модулей ядра" #. type: Table #: documentation/content/en/articles/linux-users/_index.adoc:370 #, no-wrap msgid "`strace`" msgstr "`strace`" #. type: Table #: documentation/content/en/articles/linux-users/_index.adoc:371 #, no-wrap msgid "`truss`" msgstr "`truss`" #. type: Table #: documentation/content/en/articles/linux-users/_index.adoc:372 #, no-wrap msgid "Trace system calls" msgstr "Трассировка системных вызовов" #. type: Title == #: documentation/content/en/articles/linux-users/_index.adoc:375 #, no-wrap msgid "Conclusion" msgstr "Заключение" #. type: Plain text #: documentation/content/en/articles/linux-users/_index.adoc:378 msgid "" "This document has provided an overview of FreeBSD. Refer to the extref:" "{handbook}[FreeBSD Handbook] for more in-depth coverage of these topics as " "well as the many topics not covered by this document." msgstr "" "Этот документ предоставил обзор FreeBSD. Для более детального изучения этих " "тем, а также многих других, не рассмотренных в данном документе, обратитесь " "к extref:{handbook}[Руководству FreeBSD]." diff --git a/documentation/content/ru/articles/mailing-list-faq/_index.adoc b/documentation/content/ru/articles/mailing-list-faq/_index.adoc index fb175382cc..4800ba56d2 100644 --- a/documentation/content/ru/articles/mailing-list-faq/_index.adoc +++ b/documentation/content/ru/articles/mailing-list-faq/_index.adoc @@ -1,178 +1,178 @@ --- authors: - author: 'The FreeBSD Documentation Project' copyright: '2004-2021 The FreeBSD Documentation Project' description: 'Как оптимально использовать почтовые рассылки, в том числе как избежать часто повторяющихся обсуждений' tags: ["FAQ", "Mailing Lists", "FreeBSD"] title: 'Часто задаваемые вопросы по спискам рассылки FreeBSD' --- = Часто задаваемые вопросы по спискам рассылки FreeBSD :doctype: article :toc: macro :toclevels: 1 :icons: font :sectnums: :sectnumlevels: 6 :source-highlighter: rouge :experimental: :images-path: articles/mailing-list-faq/ ifdef::env-beastie[] ifdef::backend-html5[] include::shared/authors.adoc[] include::shared/mirrors.adoc[] include::shared/releases.adoc[] include::shared/attributes/attributes-{{% lang %}}.adoc[] include::shared/{{% lang %}}/teams.adoc[] include::shared/{{% lang %}}/mailing-lists.adoc[] include::shared/{{% lang %}}/urls.adoc[] :imagesdir: ../../../images/{images-path} endif::[] ifdef::backend-pdf,backend-epub3[] include::../../../../shared/asciidoctor.adoc[] endif::[] endif::[] ifndef::env-beastie[] include::../../../../../shared/asciidoctor.adoc[] endif::[] [.abstract-title] Аннотация Эта статья посвящена часто задаваемым вопросам (FAQ) по спискам рассылки FreeBSD. Если вы хотите помочь поддерживать данный документ, напишите письмо в {freebsd-doc}. Последняя версия данного документа доступна на extref:{mailing-list-faq}[WWW сервере FreeBSD]. Вы можете получить данную статью в виде одного большого extref:{mailing-list-faq}[HTML] файла, используя HTTP протокол или в виде простого текста, форматов PostScript, PDF, и других с https://download.freebsd.org/doc/[FTP сервера FreeBSD]. Возможно вы захотите link:https://www.FreeBSD.org/search/[Найти FAQ]. ''' toc::[] [[introduction]] == Введение Цель этого документа ответить на часто задаваемые вопросы, касающиеся списков рассылки FreeBSD. Хотя FAQ задумывались для снижения количества задаваемых повторяющихся вопросов, они стали восприниматься, как ценные источники информации. Этот документ - попытка представить консенсус всего сообщества, и поэтому он не может считаться __официальным__. Если вы найдете технические неточности в данном документе или у вас есть предложения по добавлению новых пунктов, пожалуйста отправьте PR или напишите в {freebsd-doc}. Спасибо. === Зачем вообще нужны списки рассылки по FreeBSD? Списки рассылки по FreeBSD служат, как первичное средство связи FreeBSD сообщества, они покрывают множество различных тем. === Кто пользуется этими списками рассылки? Это зависит от регламента каждой конкретной рассылки. Некоторые списки больше ориентированы на разработчиков, некоторые - на всё сообщество FreeBSD в целом. Актуальную информацию смотрите по ссылке link:https://lists.FreeBSD.org/[этот список]. В списках рассылки используется английский язык, если другой язык не указан явно. === Доступны ли списки рассылки по FreeBSD для каждого? Повторюсь: это зависит от устава (правил) каждого конкретного списка рассылки. Пожалуйста, прочтите устав списка перед отправкой в него письма и соблюдайте его при каждом сообщении. Это способствует более комфортной работе со списками рассылки. Если после просмотра выше расположенного списка, вы до сих пор не знаете в какой список рассылки направить письмо, то вам наверняка подойдёт freebsd-questions (но прежде прочтите советы ниже). Обратите внимание, что для отправки сообщений в список рассылки необходимо быть его подписчиком. Вы можете оформить подписку, не получая сообщения, которые в него отправляются. === Как я могу подписаться? Вы можете использовать link:https://lists.FreeBSD.org/[web интерфейс Mlmmj] для подписки на любой из открытых списков рассылки. === Как мне отписаться? Вы можете использовать вышеупомянутый интерфейс или следовать инструкциям, находящимся в конце каждого письма, отправленного в этот список рассылки. Пожалуйста, не посылайте письма с отказом от подписки в сами публичные списки. Во-первых, вы так не отпишитесь, а во-вторых, вызовете раздражение подписчиков, и вероятно получите неприятные высказывания в свой адрес. Это классическая ошибка при работе со списками рассылки; старайтесь не повторять её. === Доступны ли архивы? Да. Архивы со всеми письмами с 1994 года доступны link:https://mail-archive.freebsd.org/mail/[здесь]. Вот ссылки на https://lists.freebsd.org/pipermail[архив mailman] и link:https://lists.freebsd.org/archives[архив mlmmj]. === Доступны ли списки рассылки в дайджест формате? Да. Посмотрите link:https://lists.FreeBSD.org/[веб интерфейс Mlmmj]. [[etiquette]] == Этикет списков рассылки Участие в любом списке рассылки, как и в любом другом сообществе требует общего базиса для общения. Пожалуйста, отправляйте только подходящие сообщения и следуйте общепринятым нормам этикета. === Что я должен сделать перед отправлением письма? Вы уже сделали важный шаг, решив прочитать эту статью. Если вы новичок во FreeBSD, то сначала ознакомьтесь с программным обеспечением и связанной с нею документацией, включающей множество extref:https://www.FreeBSD.org/docs/[книг и статьей]. Могут быть интересными: extref:{faq}[Часто задаваемые вопросы по FreeBSD (FAQ)], extref:{handbook}[Руководство по FreeBSD], и статьи extref:{freebsd-questions-article}[Как работать со списком рассылки FreeBSD-questions с максимальной отдачей], extref:{explaining-bsd}[Что такое BSD], и extref:{new-users}[Пособие для новичков во FreeBSD]. Считается дурным тоном задавать вопросы, на которые уже есть ответ в приведённых выше документах. Это не потому что добровольцы, работающие над данным проектом очень плохие люди, а после многократного ответа на одни и те же вопросы - раздражение берёт своё. Это особенно справедливо, если уже существует и доступен ответ на вопрос. Не забывайте, что вся работа по улучшению FreeBSD выполняется добровольцами, и что мы только люди. === Что считается несоответствующим письмом? * Письма должны соответствовать уставу списка рассылки. * Личные нападки недопустимы. Как ответственные участники сетевого сообщества, мы должны придерживаться высоких стандартов поведения. * Спам не разрешён. Нарушители данного правила будут забанены. === Что считается хорошим этикетом при посылке писем в списки рассылки? * Пожалуйста, составляйте строки длиной примерно в 75 символов, так как не каждый использует модную почтовую программу с графическим интерфейсом. * Пожалуйста, обращайте внимание на тот факт, что пропускная способность ограничена. Не каждый читает почту через высокоскоростное соединение. Если вы отправляете содержимое какого-нибудь файла, например [.filename]#config.log# или объёмную трассировку стека, то, пожалуйста, размещайте его на каком-нибудь веб-сайте и присылайте просто ссылку на него. Помните, что такие сообщения будут заархивированны, и это просто добавит ненужные байты к архиву. * Оформляйте ваше сообщение, чтобы оно было читабельно и ПОЖАЛУЙСТА, НЕ КРИЧИТЕ!!!!!. Не упускайте из виду эффект, которое производит плохо отформатированное письмо, причём не только в списках рассылки FreeBSD. Ваше сообщение будет просмотрено другими людьми, и если оно плохо отформатировано, имеет множество ошибок и/или восклицательных знаков, то это создаст нехорошее впечатление о вас. * Пожалуйста, используйте подходящий язык общения для конкретного списка рассылки. link:https://www.FreeBSD.org/community/mailinglists/[ Существует] много не англоязычных рассылок. + Мы понимаем, что для многих английский не родной язык и поэтому мы пытаемся сделать некие пособия. Считается плохим тоном критиковать людей не говорящих по-английски за лексические и грамматические ошибки. FreeBSD имеет отличные продвижения в этом отношении. Пожалуйста, помогайте сохранять нам эту традицию. * Пожалуйста, используйте совместимый со стандартами почтовый клиент (MUA). Много плохо отформатированных сообщений исходят от http://www.lemis.com/grog/email/email.php[неправильно работающих или плохо сконфигурированных почтовых клиентов]. Известно, что следующие почтовые программы могут посылать неправильно отформатированные сообщения без вашего ведома: ** exmh ** Microsoft(R) Exchange ** Microsoft(R) Outlook(R) + Постарайтесь не использовать MIME: многие используют программы, которые не очень хорошо работают с MIME. * Проверьте правильность настроек времени и временной зоны. Это может выглядеть немножко глупо, потому что ваши сообщения все равно будут доставляться, однако многие люди получают несколько сотен сообщений в день. Зачастую они сортируют входящие сообщения по теме и дате, и если ваше сообщение не будет предшествовать первому ответу, то они могут предположить, что оно потерялось и даже не взглянут на него. -* Основной объем информации, который вы должны предоставить, представляет собой вывод программ, таких, как man:dmesg[8], или консольные сообщения, которые обычно появляются в файле [.filename]#/var/log/messages#. Не пытайтесь скопировать эту информацию, набрав ее снова; это действительно трудно, и здесь легко сделать ошибку. Чтобы послать содержимое файлов протоколов, сделайте копию файла и воспользуйтесь редактором для того, чтобы обрезать информацию, оставив только относящуюся к делу, либо скопируйте и вставьте текст в ваше сообщение. В случае вывода программ, таких, как `dmesg`, перенаправьте вывод в файл и включите его в письмо. Например, +* Основной объём информации, который вы должны предоставить, представляет собой вывод программ, таких как man:dmesg[8], или консольные сообщения, которые обычно появляются в файле [.filename]#/var/log/messages#. Не пытайтесь скопировать эту информацию, набрав её снова; это действительно трудно, и здесь легко сделать ошибку. Чтобы послать содержимое файлов протоколов, сделайте копию файла и воспользуйтесь редактором для того, чтобы обрезать информацию, оставив только относящуюся к делу, либо скопируйте и вставьте текст в ваше сообщение. В случае вывода программ, таких как `dmesg`, перенаправьте вывод в файл и включите его в письмо. Например, + [source, shell] .... % dmesg > /tmp/dmesg.out .... + Эта команда перенаправляет информацию в файл [.filename]#/tmp/dmesg.out#. * При использовании операций копирования и вставки учтите, что некоторые такие операции отрицательно сказываются на формате строк. Особенно это стоит учесть при посылке содержимого файлов [.filename]#Makefile#, где `tab` является важным символом. Это довольно часто встречающаяся проблема в link:https://www.FreeBSD.org/support/[ базе данных сообщений об ошибках]. В [.filename]#Makefile# символы tab меняются на пробелы, или раздражающие `=3B` escape-последовательности. === Каких правил этикета стоит придерживаться при ответе на уже существующее сообщение? * Пожалуйста, включайте относящийся к теме текст из исходного письма. Сокращайте его до минимума, но не переусердствуйте. Любой, кто не читал исходное сообщение должен суметь понять о чём идёт речь. + Это особенно важно для ответов в стиле «Да, я это тоже вижу», где исходное сообщение составляло сотни строчек. * Отделяйте текст исходного сообщения от текста, добавляемого вами. Чаще всего строчки исходного сообщения предваряются "`>`" и пробелом. Отделяйте ваш текст от текста исходного сообщения пустыми строчками. Эти правила помогут сделать ваши сообщения более читабельными. * Пожалуйста, убедитесь в корректном указании авторства текста, который вы цитируйте. Люди могут обидеться, если вы приписываете им слова, которые они не писали. * Пожалуйста, не пишите `ответ в начале письма`. Это значит, что при ответе на сообщения вставляйте ваши ответы в конец, после текста, копируемого из исходного сообщения. + ** Ответ: Потому что это не соответствует логическому ходу обсуждения. ** Вопрос: Чем плох ответ в начале письма? + (Спасибо Рэнди Бушу (Randy Bush) за шутку.) [[recurring]] == Повторяющиеся темы в списках рассылки Участие в списках рассылки, как и участие в любом сообществе требует общего базиса для общения. Большое количество рассылок предполагают знание истории Проекта. В частности, существует несколько тем обсуждения, которые возникают у новичков. Обязанность каждого участника не создавать дискуссии на эти темы, тем самым помочь спискам рассылки не отрываться от обсуждаемых тем и обезопасить себя от разгорячённых бесед. Лучший способ предотвратить это - ознакомиться с http://docs.FreeBSD.org/mail/[архивами списков рассылки], чтобы понять, что происходило до этого. В этом случае, незаменимым окажется https://www.FreeBSD.org/search/#mailinglists[ интерфейс поиска по спискам рассылки]. (Если этот способ не принёс результатов, воспользуйтесь вашей любимой поисковой системой). Познакомившись с архивами, вы не только будете знать, какие темы обсуждались до этого, но также узнаете, какие тенденции общения существуют в данной рассылке, кто является участниками и какова конечная аудитория. Эти вещи довольно хорошо знать перед отправкой письма в любую рассылку, и это касается не только списков рассылки FreeBSD. Безусловно, архивы весьма обширны, и некоторые вопросы возникают чаще других, иногда в виде цепочек ответов, где заголовок письма уже не отражает содержание обсуждения. Тем не менее, ваша задача как автора — провести предварительную работу, чтобы по возможности избежать этих часто возникающих тем. [[bikeshed]] == Что такое велосипедный навес ("Bikeshed")? В буквальном смысле `bikeshed` (сарай для велосипедов) - это небольшое уличное сооружение для хранения двухколёсного транспорта. Однако в терминологии FreeBSD это понятие относится к темам, достаточно простым для того, чтобы (почти) каждый мог высказать своё мнение, и зачастую (почти) каждый это делает. Детали происхождения данного термина более подробно рассмотрены extref:{faq}[здесь, bikeshed-painting]. У вас должно иметься представление о данном понятии перед отправкой письма в любой список рассылки FreeBSD. Bikeshed - это тема разговора, которая будет иметь тенденцию порождать немедленные мета-дискуссии и флэйм. Пожалуйста, помогайте сохранять списки рассылки настолько полезными для многих людей, насколько это возможно путём предотвращения bikeshed. Спасибо. [[acknowledgments]] == Благодарности `{grog}`:: Первоначальный автор большинства материала по этикету списков рассылки, взятого из статьи extref:{freebsd-questions-article}[Как работать со списком рассылки FreeBSD-questions с максимальной отдачей]. `{linimon}`:: Создание черновой версии данного FAQ. diff --git a/documentation/content/ru/articles/mailing-list-faq/_index.po b/documentation/content/ru/articles/mailing-list-faq/_index.po index e3bde8cfbe..cef909e05b 100644 --- a/documentation/content/ru/articles/mailing-list-faq/_index.po +++ b/documentation/content/ru/articles/mailing-list-faq/_index.po @@ -1,750 +1,750 @@ # SOME DESCRIPTIVE TITLE # Copyright (C) YEAR The FreeBSD Project # This file is distributed under the same license as the FreeBSD Documentation package. -# Vladlen Popolitov , 2025. +# Vladlen Popolitov , 2025, 2026. msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" "POT-Creation-Date: 2025-11-08 16:17+0000\n" -"PO-Revision-Date: 2025-11-12 04:45+0000\n" +"PO-Revision-Date: 2026-03-08 09:11+0000\n" "Last-Translator: Vladlen Popolitov \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 4.17\n" #. type: YAML Front Matter: description #: documentation/content/en/articles/mailing-list-faq/_index.adoc:1 #, no-wrap msgid "How to best use the mailing lists, such as how to help avoid frequently-repeated discussions" msgstr "Как оптимально использовать почтовые рассылки, в том числе как избежать часто повторяющихся обсуждений" #. type: Title = #: documentation/content/en/articles/mailing-list-faq/_index.adoc:1 #: documentation/content/en/articles/mailing-list-faq/_index.adoc:10 #, no-wrap msgid "Frequently Asked Questions About The FreeBSD Mailing Lists" msgstr "Часто задаваемые вопросы по спискам рассылки FreeBSD" #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:43 msgid "Abstract" msgstr "Аннотация" #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:49 msgid "" "This is the FAQ for the FreeBSD mailing lists. If you are interested in " "helping with this project, send email to the {freebsd-doc}. The latest " "version of this document is always available from the extref:{mailing-list-" "faq}[FreeBSD World Wide Web server]. It may also be downloaded as one large " "extref:{mailing-list-faq}[HTML] file with HTTP or as plain text, PostScript, " "PDF, etc. from the https://download.freebsd.org/doc/[FreeBSD FTP server]. " "You may also want to link:https://www.FreeBSD.org/search/[Search the FAQ]." msgstr "" "Эта статья посвящена часто задаваемым вопросам (FAQ) по спискам рассылки " "FreeBSD. Если вы хотите помочь поддерживать данный документ, напишите письмо " "в {freebsd-doc}. Последняя версия данного документа доступна на extref" ":{mailing-list-faq}[WWW сервере FreeBSD]. Вы можете получить данную статью в " "виде одного большого extref:{mailing-list-faq}[HTML] файла, используя HTTP " "протокол или в виде простого текста, форматов PostScript, PDF, и других с " "https://download.freebsd.org/doc/[FTP сервера FreeBSD]. Возможно вы захотите " "link:https://www.FreeBSD.org/search/[Найти FAQ]." #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:51 msgid "'''" msgstr "'''" #. type: Title == #: documentation/content/en/articles/mailing-list-faq/_index.adoc:55 #, no-wrap msgid "Introduction" msgstr "Введение" #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:59 msgid "" "As is usual with FAQs, this document aims to cover the most frequently asked " "questions concerning the FreeBSD mailing lists (and of course answer " "them!). Although originally intended to reduce bandwidth and avoid the same " "old questions being asked over and over again, FAQs have become recognized " "as valuable information resources." msgstr "" "Цель этого документа ответить на часто задаваемые вопросы, касающиеся " "списков рассылки FreeBSD. Хотя FAQ задумывались для снижения количества " "задаваемых повторяющихся вопросов, они стали восприниматься, как ценные " "источники информации." #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:63 msgid "" "This document attempts to represent a community consensus, and as such it " "can never really be __authoritative__. However, if you find technical " "errors within this document, or have suggestions about items that should be " "added, please either submit a PR, or email the {freebsd-doc}. Thanks." msgstr "" "Этот документ - попытка представить консенсус всего сообщества, и поэтому он " "не может считаться __официальным__. Если вы найдете технические неточности в " "данном документе или у вас есть предложения по добавлению новых пунктов, " "пожалуйста отправьте PR или напишите в {freebsd-doc}. Спасибо." #. type: Title === #: documentation/content/en/articles/mailing-list-faq/_index.adoc:64 #, no-wrap msgid "What is the purpose of the FreeBSD mailing lists?" msgstr "Зачем вообще нужны списки рассылки по FreeBSD?" #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:67 msgid "" "The FreeBSD mailing lists serve as the primary communication channels for " "the FreeBSD community, covering many different topic areas and communities " "of interest." msgstr "" "Списки рассылки по FreeBSD служат, как первичное средство связи FreeBSD " "сообщества, они покрывают множество различных тем." #. type: Title === #: documentation/content/en/articles/mailing-list-faq/_index.adoc:68 #, no-wrap msgid "Who is the audience for the FreeBSD mailing lists?" msgstr "Кто пользуется этими списками рассылки?" #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:73 msgid "" "This depends on charter of each individual list. Some lists are more " "oriented to developers; some are more oriented towards the FreeBSD community " "as a whole. Please see link:https://lists.FreeBSD.org/[this list] for the " "current summary." msgstr "" "Это зависит от регламента каждой конкретной рассылки. Некоторые списки " "больше ориентированы на разработчиков, некоторые - на всё сообщество FreeBSD " "в целом. Актуальную информацию смотрите по ссылке link:https://lists.FreeBSD." "org/[этот список]." #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:75 msgid "Lists are English language, unless stated otherwise." msgstr "" "В списках рассылки используется английский язык, если другой язык не указан " "явно." #. type: Title === #: documentation/content/en/articles/mailing-list-faq/_index.adoc:76 #, no-wrap msgid "Are the FreeBSD mailing lists open for anyone to participate?" msgstr "Доступны ли списки рассылки по FreeBSD для каждого?" #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:81 msgid "" "Again, this depends on charter of each individual list. Please read the " "charter of a mailing list before you post to it, and respect it when you " "post. This will help everyone to have a better experience with the lists." msgstr "" "Повторюсь: это зависит от устава (правил) каждого конкретного списка " "рассылки. Пожалуйста, прочтите устав списка перед отправкой в него письма и " "соблюдайте его при каждом сообщении. Это способствует более комфортной " "работе со списками рассылки." #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:83 msgid "" "If after reading the above lists, you still do not know which mailing list " "to post a question to, you will probably want to post to freebsd-questions " "(but see below, first)." msgstr "" "Если после просмотра выше расположенного списка, вы до сих пор не знаете в " "какой список рассылки направить письмо, то вам наверняка подойдёт freebsd-" "questions (но прежде прочтите советы ниже)." #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:86 msgid "" "Note that you must subscribe to a mailing list before you can post. You can " "elect to subscribe without receiving messages posted to the mailing list." msgstr "" "Обратите внимание, что для отправки сообщений в список рассылки необходимо " "быть его подписчиком. Вы можете оформить подписку, не получая сообщения, " "которые в него отправляются." #. type: Title === #: documentation/content/en/articles/mailing-list-faq/_index.adoc:87 #, no-wrap msgid "How can I subscribe?" msgstr "Как я могу подписаться?" #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:90 msgid "" "You can use link:https://lists.FreeBSD.org/[the Mlmmj web interface] to " "subscribe to any of the public lists." msgstr "" "Вы можете использовать link:https://lists.FreeBSD.org/[web интерфейс Mlmmj] " "для подписки на любой из открытых списков рассылки." #. type: Title === #: documentation/content/en/articles/mailing-list-faq/_index.adoc:91 #, no-wrap msgid "How can I unsubscribe?" msgstr "Как мне отписаться?" #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:94 msgid "" "You can use the same interface as above; or, you can follow the instructions " "that are at the bottom of every mailing list message that is sent." msgstr "" "Вы можете использовать вышеупомянутый интерфейс или следовать инструкциям, " "находящимся в конце каждого письма, отправленного в этот список рассылки." #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:98 msgid "" "Please do not send unsubscribe messages directly to the public lists " "themselves. First, this will not accomplish your goal, and second, it will " "irritate the existing subscribers, and you will probably get flamed. This " "is a classical mistake when using mailing lists; please try to avoid it." msgstr "" "Пожалуйста, не посылайте письма с отказом от подписки в сами публичные " "списки. Во-первых, вы так не отпишитесь, а во-вторых, вызовете раздражение " "подписчиков, и вероятно получите неприятные высказывания в свой адрес. Это " "классическая ошибка при работе со списками рассылки; старайтесь не повторять " "её." #. type: Title === #: documentation/content/en/articles/mailing-list-faq/_index.adoc:99 #, no-wrap msgid "Are archives available?" msgstr "Доступны ли архивы?" #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:103 msgid "" "Yes. Threaded archives with all e-mails since 1994 are available link:" "https://mail-archive.freebsd.org/mail/[here]. You can also access https://" "lists.freebsd.org/pipermail[mailman archive] and link:https://lists.freebsd." "org/archives[mlmmj archive] directly." msgstr "" "Да. Архивы со всеми письмами с 1994 года доступны link:https://mail-archive." "freebsd.org/mail/[здесь]. Вот ссылки на https://lists.freebsd.org/" "pipermail[архив mailman] и link:https://lists.freebsd.org/archives[архив " "mlmmj]." #. type: Title === #: documentation/content/en/articles/mailing-list-faq/_index.adoc:104 #, no-wrap msgid "Are mailing lists available in a digest format?" msgstr "Доступны ли списки рассылки в дайджест формате?" #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:107 msgid "Yes. See link:https://lists.FreeBSD.org/[the Mlmmj web interface]." msgstr "Да. Посмотрите link:https://lists.FreeBSD.org/[веб интерфейс Mlmmj]." #. type: Title == #: documentation/content/en/articles/mailing-list-faq/_index.adoc:109 #, no-wrap msgid "Mailing List Etiquette" msgstr "Этикет списков рассылки" #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:113 msgid "" "Participation in the mailing lists, like participation in any community, " "requires a common basis for communication. Please make only appropriate " "postings, and follow common rules of etiquette." msgstr "" "Участие в любом списке рассылки, как и в любом другом сообществе требует " "общего базиса для общения. Пожалуйста, отправляйте только подходящие " "сообщения и следуйте общепринятым нормам этикета." #. type: Title === #: documentation/content/en/articles/mailing-list-faq/_index.adoc:114 #, no-wrap msgid "What should I do before I post?" msgstr "Что я должен сделать перед отправлением письма?" #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:119 msgid "" "You have already taken the most important step by reading this document. " "However, if you are new to FreeBSD, you may first need to familiarize " "yourself with the software, and all the social history around it, by reading " "the numerous link:https://www.FreeBSD.org/docs/books/[books and articles] " "that are available. Items of particular interest include the extref:{faq}" "[FreeBSD Frequently Asked Questions (FAQ)] document, the extref:{handbook}" "[FreeBSD Handbook], and the articles extref:{freebsd-questions-article}[How " "to get best results from the FreeBSD-questions mailing list], extref:" "{explaining-bsd}[Explaining BSD], and extref:{new-users}[FreeBSD First " "Steps]." msgstr "" "Вы уже сделали важный шаг, решив прочитать эту статью. Если вы новичок во " "FreeBSD, то сначала ознакомьтесь с программным обеспечением и связанной с " "нею документацией, включающей множество extref:https://www.FreeBSD.org/docs/" "[книг и статьей]. Могут быть интересными: extref:{faq}[Часто задаваемые " "вопросы по FreeBSD (FAQ)], extref:{handbook}[Руководство по FreeBSD], и " "статьи extref:{freebsd-questions-article}[Как работать со списком рассылки " "FreeBSD-questions с максимальной отдачей], extref:{explaining-bsd}[Что такое " "BSD], и extref:{new-users}[Пособие для новичков во FreeBSD]." #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:124 msgid "" "It is always considered bad form to ask a question that is already answered " "in the above documents. This is not because the volunteers who work on this " "project are particularly mean people, but after a certain number of times " "answering the same questions over and over again, frustration begins to set " "in. This is particularly true if there is an existing answer to the " "question that is already available. Always keep in mind that almost all of " "the work done on FreeBSD is done by volunteers, and that we are only human." msgstr "" "Считается дурным тоном задавать вопросы, на которые уже есть ответ в " "приведённых выше документах. Это не потому что добровольцы, работающие над " "данным проектом очень плохие люди, а после многократного ответа на одни и те " "же вопросы - раздражение берёт своё. Это особенно справедливо, если уже " "существует и доступен ответ на вопрос. Не забывайте, что вся работа по " "улучшению FreeBSD выполняется добровольцами, и что мы только люди." #. type: Title === #: documentation/content/en/articles/mailing-list-faq/_index.adoc:125 #, no-wrap msgid "What constitutes an inappropriate posting?" msgstr "Что считается несоответствующим письмом?" #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:128 msgid "Postings must be in accordance with the charter of the mailing list." msgstr "Письма должны соответствовать уставу списка рассылки." #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:129 msgid "" "Personal attacks are discouraged. As good net-citizens, we should try to " "hold ourselves to high standards of behavior." msgstr "" "Личные нападки недопустимы. Как ответственные участники сетевого сообщества, " "мы должны придерживаться высоких стандартов поведения." #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:130 msgid "" "Spam is not allowed, ever. The mailing lists are actively processed to ban " "offenders to this rule." msgstr "Спам не разрешён. Нарушители данного правила будут забанены." #. type: Title === #: documentation/content/en/articles/mailing-list-faq/_index.adoc:131 #, no-wrap msgid "What is considered proper etiquette when posting to the mailing lists?" msgstr "Что считается хорошим этикетом при посылке писем в списки рассылки?" #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:134 msgid "" "Please wrap lines at 75 characters, since not everyone uses fancy GUI mail " "reading programs." msgstr "" "Пожалуйста, составляйте строки длиной примерно в 75 символов, так как не " "каждый использует модную почтовую программу с графическим интерфейсом." #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:135 msgid "" "Please respect the fact that bandwidth is not infinite. Not everyone reads " "email through high-speed connections, so if your posting involves something " "like the content of [.filename]#config.log# or an extensive stack trace, " "please consider putting that information up on a website somewhere and just " "provide a URL to it. Remember, too, that these postings will be archived " "indefinitely, so huge postings will simply inflate the size of the archives " "long after their purpose has expired." msgstr "" "Пожалуйста, обращайте внимание на тот факт, что пропускная способность " "ограничена. Не каждый читает почту через высокоскоростное соединение. Если " "вы отправляете содержимое какого-нибудь файла, например [.filename]#config." "log# или объёмную трассировку стека, то, пожалуйста, размещайте его на каком-" "нибудь веб-сайте и присылайте просто ссылку на него. Помните, что такие " "сообщения будут заархивированны, и это просто добавит ненужные байты к " "архиву." #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:136 msgid "" "Format your message so that it is legible, and PLEASE DO NOT SHOUT!!!!!. Do " "not underestimate the effect that a poorly formatted mail message has, and " "not just on the FreeBSD mailing lists. Your mail message is all that people " "see of you, and if it is poorly formatted, badly spelled, full of errors, " "and/or has lots of exclamation points, it will give people a poor impression " "of you." msgstr "" "Оформляйте ваше сообщение, чтобы оно было читабельно и ПОЖАЛУЙСТА, НЕ " "КРИЧИТЕ!!!!!. Не упускайте из виду эффект, которое производит плохо " "отформатированное письмо, причём не только в списках рассылки FreeBSD. Ваше " "сообщение будет просмотрено другими людьми, и если оно плохо " "отформатировано, имеет множество ошибок и/или восклицательных знаков, то это " "создаст нехорошее впечатление о вас." #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:137 msgid "" "Please use an appropriate human language for a particular mailing list. Many " "non-English mailing lists are link:https://www.FreeBSD.org/community/" "mailinglists/[available]." msgstr "" "Пожалуйста, используйте подходящий язык общения для конкретного списка " "рассылки. link:https://www.FreeBSD.org/community/mailinglists/[ Существует] " "много не англоязычных рассылок." #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:141 msgid "" "For the ones that are not, we do appreciate that many people do not speak " "English as their first language, and we try to make allowances for that. It " "is considered particularly poor form to criticize non-native speakers for " "spelling or grammatical errors. FreeBSD has an excellent track record in " "this regard; please, help us to uphold that tradition." msgstr "" "Мы понимаем, что для многих английский не родной язык и поэтому мы пытаемся " "сделать некие пособия. Считается плохим тоном критиковать людей не говорящих " "по-английски за лексические и грамматические ошибки. FreeBSD имеет отличные " "продвижения в этом отношении. Пожалуйста, помогайте сохранять нам эту " "традицию." #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:142 msgid "" "Please use a standards-compliant Mail User Agent (MUA). A lot of badly " "formatted messages come from http://www.lemis.com/grog/email/email.php[bad " "mailers or badly configured mailers]. The following mailers are known to " "send out badly formatted messages without you finding out about them:" msgstr "" "Пожалуйста, используйте совместимый со стандартами почтовый клиент (MUA). " "Много плохо отформатированных сообщений исходят от http://www.lemis.com/grog/" "email/email.php[неправильно работающих или плохо сконфигурированных почтовых " "клиентов]. Известно, что следующие почтовые программы могут посылать " "неправильно отформатированные сообщения без вашего ведома:" #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:144 msgid "exmh" msgstr "exmh" #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:145 msgid "Microsoft(R) Exchange" msgstr "Microsoft(R) Exchange" #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:146 msgid "Microsoft(R) Outlook(R)" msgstr "Microsoft(R) Outlook(R)" #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:148 msgid "" "Try not to use MIME: a lot of people use mailers which do not get on very " "well with MIME." msgstr "" "Постарайтесь не использовать MIME: многие используют программы, которые не " "очень хорошо работают с MIME." #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:149 msgid "" "Make sure your time and time zone are set correctly. This may seem a little " "silly, since your message still gets there, but many of the people on these " "mailing lists get several hundred messages a day. They frequently sort the " "incoming messages by subject and by date, and if your message does not come " "before the first answer, they may assume that they missed it and not bother " "to look." msgstr "" "Проверьте правильность настроек времени и временной зоны. Это может " "выглядеть немножко глупо, потому что ваши сообщения все равно будут " "доставляться, однако многие люди получают несколько сотен сообщений в день. " "Зачастую они сортируют входящие сообщения по теме и дате, и если ваше " "сообщение не будет предшествовать первому ответу, то они могут предположить, " "что оно потерялось и даже не взглянут на него." #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:150 msgid "" "A lot of the information you need to supply is the output of programs, such " "as man:dmesg[8], or console messages, which usually appear in [.filename]#/" "var/log/messages#. Do not try to copy this information by typing it in " "again; not only it is a real pain, but you are bound to make a mistake. To " "send log file contents, either make a copy of the file and use an editor to " "trim the information to what is relevant, or cut and paste into your " "message. For the output of programs like `dmesg`, redirect the output to a " "file and include that. For example," msgstr "" -"Основной объем информации, который вы должны предоставить, представляет " -"собой вывод программ, таких, как man:dmesg[8], или консольные сообщения, " +"Основной объём информации, который вы должны предоставить, представляет " +"собой вывод программ, таких как man:dmesg[8], или консольные сообщения, " "которые обычно появляются в файле [.filename]#/var/log/messages#. Не " -"пытайтесь скопировать эту информацию, набрав ее снова; это действительно " +"пытайтесь скопировать эту информацию, набрав её снова; это действительно " "трудно, и здесь легко сделать ошибку. Чтобы послать содержимое файлов " "протоколов, сделайте копию файла и воспользуйтесь редактором для того, чтобы " "обрезать информацию, оставив только относящуюся к делу, либо скопируйте и " -"вставьте текст в ваше сообщение. В случае вывода программ, таких, как " -"`dmesg`, перенаправьте вывод в файл и включите его в письмо. Например," +"вставьте текст в ваше сообщение. В случае вывода программ, таких как `dmesg`" +", перенаправьте вывод в файл и включите его в письмо. Например," #. type: delimited block . 4 #: documentation/content/en/articles/mailing-list-faq/_index.adoc:154 #, no-wrap msgid "% dmesg > /tmp/dmesg.out\n" msgstr "% dmesg > /tmp/dmesg.out\n" #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:157 msgid "This redirects the information to the file [.filename]#/tmp/dmesg.out#." msgstr "" "Эта команда перенаправляет информацию в файл [.filename]#/tmp/dmesg.out#." #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:158 msgid "" "When using cut-and-paste, please be aware that some such operations badly " "mangle their messages. This is of particular concern when posting contents " "of [.filename]#Makefiles#, where `tab` is a significant character. This is a " "very common, and very annoying, problem with submissions to the link:https://" "www.FreeBSD.org/support/[Problem Reports database]. [.filename]#Makefiles# " "with tabs changed to either spaces, or the annoying `=3B` escape sequence, " "create a great deal of aggravation for committers." msgstr "" "При использовании операций копирования и вставки учтите, что некоторые такие " "операции отрицательно сказываются на формате строк. Особенно это стоит " "учесть при посылке содержимого файлов [.filename]#Makefile#, где `tab` " "является важным символом. Это довольно часто встречающаяся проблема в " "link:https://www.FreeBSD.org/support/[ базе данных сообщений об ошибках]. В [" ".filename]#Makefile# символы tab меняются на пробелы, или раздражающие `=3B` " "escape-последовательности." #. type: Title === #: documentation/content/en/articles/mailing-list-faq/_index.adoc:159 #, no-wrap msgid "What are the special etiquette consideration when replying to an existing posting on the mailing lists?" msgstr "Каких правил этикета стоит придерживаться при ответе на уже существующее сообщение?" #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:162 msgid "" "Please include relevant text from the original message. Trim it to the " "minimum, but do not overdo it. It should still be possible for somebody who " "did not read the original message to understand what you are talking about." msgstr "" "Пожалуйста, включайте относящийся к теме текст из исходного письма. " "Сокращайте его до минимума, но не переусердствуйте. Любой, кто не читал " "исходное сообщение должен суметь понять о чём идёт речь." #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:164 msgid "" "This is especially important for postings of the type \"yes, I see this too" "\", where the initial posting was dozens or hundreds of lines." msgstr "" "Это особенно важно для ответов в стиле «Да, я это тоже вижу», где исходное " "сообщение составляло сотни строчек." #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:165 msgid "" "Use some technique to identify which text came from the original message, " "and which text you add. A common convention is to prepend \"`>`\" to the " "original message. Leaving white space after the \"`>`\" and leaving empty " "lines between your text and the original text both make the result more " "readable." msgstr "" "Отделяйте текст исходного сообщения от текста, добавляемого вами. Чаще всего " "строчки исходного сообщения предваряются \"`>`\" и пробелом. Отделяйте ваш " "текст от текста исходного сообщения пустыми строчками. Эти правила помогут " "сделать ваши сообщения более читабельными." #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:166 msgid "" "Please ensure that the attributions of the text you are quoting is correct. " "People can become offended if you attribute words to them that they " "themselves did not write." msgstr "" "Пожалуйста, убедитесь в корректном указании авторства текста, который вы " "цитируйте. Люди могут обидеться, если вы приписываете им слова, которые они " "не писали." #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:167 msgid "" "Please do not `top post`. By this, we mean that if you are replying to a " "message, please put your replies after the text that you copy in your reply." msgstr "" "Пожалуйста, не пишите `ответ в начале письма`. Это значит, что при ответе на " "сообщения вставляйте ваши ответы в конец, после текста, копируемого из " "исходного сообщения." #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:169 msgid "A: Because it reverses the logical flow of conversation." msgstr "Ответ: Потому что это не соответствует логическому ходу обсуждения." #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:170 msgid "Q: Why is top posting frowned upon?" msgstr "Вопрос: Чем плох ответ в начале письма?" #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:172 msgid "(Thanks to Randy Bush for the joke.)" msgstr "(Спасибо Рэнди Бушу (Randy Bush) за шутку.)" #. type: Title == #: documentation/content/en/articles/mailing-list-faq/_index.adoc:174 #, no-wrap msgid "Recurring Topics On The Mailing Lists" msgstr "Повторяющиеся темы в списках рассылки" #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:181 msgid "" "Participation in the mailing lists, like participation in any community, " "requires a common basis for communication. Many of the mailing lists " "presuppose a knowledge of the Project's history. In particular, there are " "certain topics that seem to regularly occur to newcomers to the community. " "It is the responsibility of each poster to ensure that their postings do not " "fall into one of these categories. By doing so, you will help the mailing " "lists to stay on-topic, and probably save yourself being flamed in the " "process." msgstr "" "Участие в списках рассылки, как и участие в любом сообществе требует общего " "базиса для общения. Большое количество рассылок предполагают знание истории " "Проекта. В частности, существует несколько тем обсуждения, которые возникают " "у новичков. Обязанность каждого участника не создавать дискуссии на эти " "темы, тем самым помочь спискам рассылки не отрываться от обсуждаемых тем и " "обезопасить себя от разгорячённых бесед." #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:185 msgid "" "The best method to avoid this is to familiarize yourself with the http://" "docs.FreeBSD.org/mail/[mailing list archives], to help yourself understand " "the background of what has gone before. In this, the https://www.FreeBSD." "org/search/#mailinglists[mailing list search interface] is invaluable. (If " "that method does not yield useful results, please supplement it with a " "search with your favorite major search engine)." msgstr "" "Лучший способ предотвратить это - ознакомиться с http://docs.FreeBSD.org/" "mail/[архивами списков рассылки], чтобы понять, что происходило до этого. В " "этом случае, незаменимым окажется https://www.FreeBSD.org/search/" "#mailinglists[ интерфейс поиска по спискам рассылки]. (Если этот способ не " "принёс результатов, воспользуйтесь вашей любимой поисковой системой)." #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:188 msgid "" "By familiarizing yourself with the archives, not only will you learn what " "topics have been discussed before, but also how discussion tends to proceed " "on that list, who the participants are, and who the target audience is. " "These are always good things to know before you post to any mailing list, " "not just a FreeBSD mailing list." msgstr "" "Познакомившись с архивами, вы не только будете знать, какие темы обсуждались " "до этого, но также узнаете, какие тенденции общения существуют в данной " "рассылке, кто является участниками и какова конечная аудитория. Эти вещи " "довольно хорошо знать перед отправкой письма в любую рассылку, и это " "касается не только списков рассылки FreeBSD." #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:191 msgid "" "There is no doubt that the archives are quite extensive, and some questions " "recur more often than others, sometimes as followups where the subject line " "no longer accurately reflects the new content. Nevertheless, the burden is " "on you, the poster, to do your homework to help avoid these recurring topics." msgstr "" "Безусловно, архивы весьма обширны, и некоторые вопросы возникают чаще " "других, иногда в виде цепочек ответов, где заголовок письма уже не отражает " "содержание обсуждения. Тем не менее, ваша задача как автора — провести " "предварительную работу, чтобы по возможности избежать этих часто возникающих " "тем." #. type: Title == #: documentation/content/en/articles/mailing-list-faq/_index.adoc:193 #, no-wrap msgid "What Is A \"Bikeshed\"?" msgstr "Что такое велосипедный навес (\"Bikeshed\")?" #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:198 msgid "" "Literally, a `bikeshed` is a small outdoor shelter into which one may store " "one's two-wheeled form of transportation. However, in FreeBSD parlance, the " "term refers to topics that are simple enough that (nearly) anyone can offer " "an opinion about, and often (nearly) everyone does. The genesis of this term " "is explained in more detail extref:{faq}[in this document, bikeshed-" "painting]. You simply must have a working knowledge of this concept before " "posting to any FreeBSD mailing list." msgstr "" "В буквальном смысле `bikeshed` (сарай для велосипедов) - это небольшое " "уличное сооружение для хранения двухколёсного транспорта. Однако в " "терминологии FreeBSD это понятие относится к темам, достаточно простым для " "того, чтобы (почти) каждый мог высказать своё мнение, и зачастую (почти) " "каждый это делает. Детали происхождения данного термина более подробно " "рассмотрены extref:{faq}[здесь, bikeshed-painting]. У вас должно иметься " "представление о данном понятии перед отправкой письма в любой список " "рассылки FreeBSD." #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:200 msgid "" "More generally, a bikeshed is a topic that will tend to generate immediate " "meta-discussions and flames if you have not read up on their history." msgstr "" "Bikeshed - это тема разговора, которая будет иметь тенденцию порождать " "немедленные мета-дискуссии и флэйм." #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:203 msgid "" "Please help us to keep the mailing lists as useful for as many people as " "possible by avoiding bikesheds whenever you can. Thanks." msgstr "" "Пожалуйста, помогайте сохранять списки рассылки настолько полезными для " "многих людей, насколько это возможно путём предотвращения bikeshed. Спасибо." #. type: Title == #: documentation/content/en/articles/mailing-list-faq/_index.adoc:205 #, no-wrap msgid "Acknowledgments" msgstr "Благодарности" #. type: Labeled list #: documentation/content/en/articles/mailing-list-faq/_index.adoc:207 #, no-wrap msgid "`{grog}`" msgstr "`{grog}`" #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:209 msgid "" "Original author of most of the material on mailing list etiquette, taken " "from the article on extref:{freebsd-questions-article}[How to get best " "results from the FreeBSD-questions mailing list]." msgstr "" "Первоначальный автор большинства материала по этикету списков рассылки, " "взятого из статьи extref:{freebsd-questions-article}[Как работать со списком " "рассылки FreeBSD-questions с максимальной отдачей]." #. type: Labeled list #: documentation/content/en/articles/mailing-list-faq/_index.adoc:210 #, no-wrap msgid "`{linimon}`" msgstr "`{linimon}`" #. type: Plain text #: documentation/content/en/articles/mailing-list-faq/_index.adoc:211 msgid "Creation of the rough draft of this FAQ." msgstr "Создание черновой версии данного FAQ." diff --git a/documentation/content/ru/articles/new-users/_index.adoc b/documentation/content/ru/articles/new-users/_index.adoc index 5338731a98..fc786bd0f1 100644 --- a/documentation/content/ru/articles/new-users/_index.adoc +++ b/documentation/content/ru/articles/new-users/_index.adoc @@ -1,387 +1,387 @@ --- authors: - author: 'Annelise Anderson' email: andrsn@andrsn.stanford.edu description: 'Введение для пользователей, не знакомых с FreeBSD и UNIX®' tags: ["Introduction", "basics", "FreeBSD", "UNIX"] title: 'Для тех, кто новичок и в FreeBSD, и в UNIX®' trademarks: ["freebsd", "ibm", "microsoft", "opengroup", "general"] --- = Пособие для новичков во FreeBSD и UNIX(R) :doctype: article :toc: macro :toclevels: 1 :icons: font :sectnums: :sectnumlevels: 6 :source-highlighter: rouge :experimental: :images-path: articles/new-users/ ifdef::env-beastie[] ifdef::backend-html5[] include::shared/authors.adoc[] include::shared/mirrors.adoc[] include::shared/releases.adoc[] include::shared/attributes/attributes-{{% lang %}}.adoc[] include::shared/{{% lang %}}/teams.adoc[] include::shared/{{% lang %}}/mailing-lists.adoc[] include::shared/{{% lang %}}/urls.adoc[] :imagesdir: ../../../images/{images-path} endif::[] ifdef::backend-pdf,backend-epub3[] include::../../../../shared/asciidoctor.adoc[] endif::[] endif::[] ifndef::env-beastie[] include::../../../../../shared/asciidoctor.adoc[] endif::[] [.abstract-title] Аннотация Поздравляем вас с установкой FreeBSD! Это вводное пособие предназначено для тех, кто является новичком в мире FreeBSD _и_ UNIX(R)-так что оно начнётся с основ. ''' toc::[] [[in-and-out]] == Регистрация в системе и выход из неё Войдите в систему (когда увидите `login:`), используя пользователя, созданного во время установки, или как `root`. (В вашей установке FreeBSD уже будет учётная запись для `root`; этот пользователь может ходить куда угодно и делать что угодно, включая удаление важных файлов, так что будьте осторожны!) Символы % и # в дальнейшем обозначают приглашение командной строки (у вас оно может выглядеть иначе), где % означает обычного пользователя, а # — `root`. Чтобы выйти из системы (и получить новое приглашение `login:`) наберите [source, shell] .... # exit .... столько раз, сколько нужно. Да, нажимайте kbd:[enter] после набора команд, и помните, что UNIX(R) чувствителен к регистру букв-набирайте `exit`, но не `EXIT`. Для завершения работы машины наберите [source, shell] .... # /sbin/shutdown -h now .... Или, для перезагрузки нужно набрать [source, shell] .... # /sbin/shutdown -r now .... или [source, shell] .... # /sbin/reboot .... Перезагрузку можно также выполнить нажатием клавиш kbd:[Ctrl+Alt+Delete]. Подождите некоторое время, чтобы дать этой команде отработать. В последних релизах FreeBSD она эквивалента выдаче команды `/sbin/reboot` и гораздо, гораздо лучше, чем нажатие кнопки сброса. Вы ведь не хотите всё переустанавливать заново, не так ли? [[adding-a-user]] == Добавление пользователя с привилегиями root Если при установке системы вы не создали ни одного пользователя, и поэтому вошли в систему как `root`, то теперь вы должны создать пользователя по команде [source, shell] .... # adduser .... При первом использовании утилиты `adduser` она может запрашивать сохранение некоторых параметров для использования их по умолчанию. вы можете сделать оболочкой, используемой по умолчанию, командный процессор man:csh[1], а не man:sh[1], если по умолчанию вам предлагается `sh`. В противном случае просто нажимайте enter для принятия всех предлагаемых по умолчанию вариантов. Эти значения по умолчанию сохраняются в файле [.filename]#/etc/adduser.conf#, в форме, доступной для редактирования. Предположим, что вы создали пользователя `jack` с полным именем __Jack Benimble__. Назначьте пользователю `jack` пароль, если информационная безопасность имеет значение (даже если это дети, которые могут стучать по клавиатуре). Когда вам будет задан вопрос по включению пользователя `jack` в другие группы, наберите `wheel` [source, shell] .... Login group is "jack". Invite jack into other groups: wheel .... Это позволит входить в систему как пользователь `jack` и использовать команду man:su[1] для того, чтобы стать пользователем `root`. Тогда вас не будут больше обвинять в том, чтобы вы входите в систему как пользователь `root`. Вы можете прекратить работы с `adduser` в любой момент, нажав kbd:[Ctrl+C], а в завершении ввода у вас будет шанс подтвердить заведение нового пользователя или набрать kbd:[n] в качестве отрицательного ответа. Вам может захотеться создать второго нового пользователя, для того, чтобы при редактировании файлов для входа пользователя `jack` имелся горячий резерв на тот случай, если что-то пойдёт не так. После того, как вы это сделаете, воспользуйтесь командой `exit` для возврата к приглашению ко входу в систему и зарегистрируйтесь в ней как пользователь `jack`. Вообще говоря, лучше всего основную массу работы выполнять, работая как обычный пользователь, который не имеет мощь и опасность пользователя `root`. Если вы уже создали пользователя и хотите, чтобы он мог выполнять команду `su` для получения привилегий `root`, вы можете войти в систему как `root` и отредактировать файл [.filename]#/etc/group#, добавив пользователя `jack` в первую строчку (в группу `wheel`). Однако сначала вам нужно поупражняться с программой man:vi[1], текстовым редактором,-или использовать более простой редактор, man:ee[1], имеющийся в последней версии FreeBSD. Для удаления пользователя воспользуйтесь командой `rmuser`. [[looking-around]] == Просмотр окружения Войдя в систему как обычный пользователь, оглянитесь вокруг и попробуйте выполнить некоторые команды, дающие доступ к источникам информации и помощи внутри FreeBSD. Вот некоторые команды и то, что они делают: `id`:: Говорит вам, кто вы! `pwd`:: Показывает, где вы находитесь-текущий рабочий каталог. `ls`:: Выдаёт список файлов, находящихся в текущем каталоге. `ls -F`:: Выдаёт перечень файлов, находящихся в текущем каталоге, добавляя символы `\*` после выполнимых файлов, `/` после каталогов и `@` после символических ссылок. `ls -l`:: Выдаёт перечень файлов в расширенном формате-размер, дата и права доступа. `ls -a`:: Вместе со всеми выдаёт и список скрытых "dot"-файлов (начинающихся с точки). Если вы являетесь пользователем `root`, то "dot"-файлы выдаются и без указания флага `-a`. `cd`:: Смена каталогов. `cd ..` перемещает на один уровень выше; обратите внимание на промежуток после `cd`. `cd /usr/local` перейдёт в указанное место. `cd ~` перейдёт в домашний каталог человека, который вошёл в систему-к примеру, [.filename]#/usr/home/jack#. попробуйте выполнить команду `cd /cdrom`, а затем `ls` для проверки того, что ваш CDROM смонтирован и работает. `less _filename_`:: Позволяет вам просмотреть файл (с именем _filename_) без внесения в него изменений. Попробуйте выполнить команду `less /etc/fstab`. Для выхода наберите `q`. `cat _filename_`:: Выдаёт содержимое _filename_ на экран. если он слишком длинный и вы можете увидеть только его конец, нажмите kbd:[ScrollLock] и используйте клавишу kbd:[стрелка вверх] для движения назад; вы можете также использовать kbd:[ScrollLock] и со страницами справки. Нажмите kbd:[ScrollLock] снова для прекращения прокрутки. Вам может захотеться попробовать команду `cat` с некоторыми из dot-файлов в вашем домашнем каталоге-`cat .cshrc`, `cat .login`, `cat .profile`. В файле [.filename]#.cshrc# вы заметите алиасы для некоторых из команд `ls` (они очень удобны). Вы можете создать другие алиасы, отредактировав файл [.filename]#.cshrc#. Вы можете сделать эти алиасы доступными всем пользователям системы, поместив их в общесистемный конфигурационный файл для `csh`, [.filename]#/etc/csh.cshrc#. [[getting-help]] == Получение помощи и информации Вот несколько полезных источников получения помощи. Здесь _Text_ обозначает что-то по вашему выбору, что вы вводите-обычно команду или имя файла. `apropos _text_`:: Всё, что содержит строку _text_ в `базе whatis`. `man _text_`:: Страница справки по _text_. Это главный источник документации в UNIX(R)-системах. `man ls` покажет вам все способы использования команды `ls`. Нажимайте kbd:[Enter] для передвижения по тексту, kbd:[Ctrl+B] для возврата на страницу назад, kbd:[Ctrl+F] для продвижения вперёд, kbd:[q] или kbd:[Ctrl+C] для выхода. `which _text_`:: Покажет, в каком месте из маршрута поиска пользователя находится команда _text_. `locate _text_`:: Все маршруты, где находится строчка _text_. `whatis _text_`:: Описывает, что делает команда _text_ и её справочная страница. Команда `whatis *` расскажет вам обо всех двоичных файлах в текущем каталоге. `whereis _text_`:: Ищет файл _text_ и выдаёт полный путь до него. Вы можете захотеть попробовать использоваться команду `whatis` с некоторыми полезными командами типа `cat`, `more`, `grep`, `mv`, `find`, `tar`, `chmod`, `chown`, `date`, и `script`. Команда `more` позволит вам читать постранично, как и в DOS, например, `ls -l | more` или `more _filename_`. Знак `\*` работает как общий шаблон-например, `ls w*` выдаст перечень файлов, начинающихся с буквы `w`. Некоторые из этих команд работают не очень хорошо? Обе команды man:locate[1] и man:whatis[1] зависят от базы данных, которая перестраивается еженедельно. Если ваша машина будет оставаться включенной на выходные (и она работает под FreeBSD), то вы можете пожелать запускать определённые команды раз в день, неделю, месяц. Запускайте их как `root` и дайте каждой отработать, прежде чем запускать следующую. [source, shell] .... # periodic daily output omitted # periodic weekly output omitted # periodic monthly output omitted .... Если вам надоело ждать, нажмите kbd:[Alt+F2] для перехода в другую _виртуальную консоль_, и войдите в систему снова. В конце концов, это многопользовательская и многозадачная система. Тем не менее эти команды, скорее всего, в процессе работы будут выдавать сообщения вам на экран; вы можете набрать `clear` в приглашении для очистки экрана. Пока они работают, вы можете смотреть в содержимое файлов [.filename]#/var/mail/root# и [.filename]#/var/log/messages#. Выполнение таких команд является частью системного администрирования-и как единственный пользователь UNIX(R)-системы вы являетесь собственным системным администратором. Практически всё, для чего вам нужно быть пользователем `root`, это системное администрирование. Эти обязанности не описываются достаточно хорошо даже в тех больших толстых книгах по UNIX(R), в которых слишком много места отдаётся описанию работы с меню в оконных менеджерах. Вам может понадобиться одна из двух лучших книг по системному администрированию, либо автора Эви Немет UNIX System Administration Handbook (Prentice-Hall, 1995, ISBN 0-13-15051-7)-второе издание с красной обложкой; или автора Æleen Frisch Essential System Administration (O'Reilly & Associates, 2002, ISBN 0-596-00343-9). Я использую книгу Немет. [[editing-text]] == Редактирование текста Для конфигурации вашей системы вам нужно редактировать текстовые файлы. Большинство из них будут находиться в каталоге [.filename]#/etc#; и вам необходимо командой `su` получить полномочия пользователя `root`, чтобы их править. Вы можете использовать простой редактор `ee`, однако в смысле перспективности лучше изучить текстовый редактор `vi`. В каталоге [.filename]#/usr/src/contrib/nvi/docs/tutorial# есть прекрасный учебник по vi, если у вас есть исходники системы. Перед тем, как редактировать файл, наверное, вы должны сохранить резервную копию. Предположим, что вы собираетесь отредактировать файл [.filename]#/etc/rc.conf#. Вы можете воспользоваться командой `cd /etc` для перехода в каталог [.filename]#/etc# и выполнить следующее: [source, shell] .... # cp rc.conf rc.conf.orig .... При этом файл [.filename]#rc.conf# скопируется в [.filename]#rc.conf.orig#, и в последующем вы сможете скопировать [.filename]#rc.conf.orig# в файл [.filename]#rc.conf# для восстановления оригинала. Но ещё лучше его переместить (переименовать), после чего скопировать обратно: [source, shell] .... # mv rc.conf rc.conf.orig # cp rc.conf.orig rc.conf .... потому что команда `mv` сохраняет исходную информацию о дате и владельце файла. Теперь вы можете редактировать [.filename]#rc.conf#. Если вы захотите восстановить исходное состояние, то выполните `mv rc.conf rc.conf.myedit` (полагаем, что вы хотите сохранить отредактированную версию), а затем [source, shell] .... # mv rc.conf.orig rc.conf .... для возврата всего на место. Для редактирования файла наберите [source, shell] .... # vi filename .... Передвигайтесь по тексту при помощи клавиш со стрелками. kbd:[Esc] (клавиша отмены) переводит редактор `vi` в командный режим. Вот некоторые из них: `x`:: удалить символ, на котором находится курсор `dd`:: удалить целую строку (даже если на экране она не помещается в целую строку) `i`:: вставка текста в позиции курсора `a`:: вставка текста после курсора Сразу после набора `i` или `a` вы можете вводить текст. `Esc` возвратит вас обратно в командный режим, где вы можете набрать `:w`:: для записи ваших изменений на диск и продолжения редактирования `:wq`:: для записи и выхода `:q!`:: для выхода без сохранения изменений `/_text_`:: для перемещения курсора на _text_; `/` kbd:[Enter] (клавиша ввода) для поиска следующего экземпляра _text_. `G`:: для перехода в конец файла `nG`:: Для перехода к строке _n_ в файле, где _n_ является числом kbd:[Ctrl+L]:: для перерисовки экрана kbd:[Ctrl+b] and kbd:[Ctrl+f]:: -для перелистывания экрана вперед и назад, как это делается в `more` и `view`. +для перелистывания экрана вперёд и назад, как это делается в `more` и `view`. Поупражняйтесь с редактором `vi` в своём домашнем каталоге, создав новый файл по команде `vi _filename_`, добавляя и удаляя текст, сохраняя файл и вызывая его снова. Редактор `vi` преподносит некоторые сюрпризы, потому что он на самом деле достаточно сложный, и иногда вы можете неправильно вызвать команду, которая сделает нечто, чего вы не ожидали. (Некоторым людям действительно нравится `vi`-он более мощный, чем EDIT из DOS-посмотрите команду `:r`.) Для того, чтобы удостовериться, что вы находитесь в режиме команд, нажимайте kbd:[Esc] один или несколько раз, и начинайте снова с этого места, если возникли какие-то проблемы, часто сохраняйте текст командой `:w` и используйте `:q!` для того, чтобы прекратить работу и начать всё сначала (с вашей последней команды `:w`), если это нужно. Теперь вы можете выполнить `cd` для перехода в каталог [.filename]#/etc#, `su` в пользователя `root`, использовать `vi` для редактирования файла [.filename]#/etc/group# и добавлять пользователя в группу `wheel`, чтобы он имел полномочия пользователя root. Просто добавьте запятую и имя входа пользователя в конце первой строки этого файла, нажмите kbd:[Esc] и воспользуйтесь `:wq` для записи файла на диск и выхода. Работает всегда. (Вы не поставили пробел после запятой, ведь так?) [[other-useful-commands]] == Другие полезные команды `df`:: выдаёт данные о занятом файлами пространстве и смонтированных файловых системах. `ps aux`:: показывает работающие процессы. `ps ax` является частоупотребительной формой. `rm _filename_`:: удаляет _filename_. `rm -R _dir_`:: удаляет каталог _dir_ и все его подкаталоги-осторожно! `ls -R`:: выдаёт список файлов в текущем каталоге и всех его подкаталогах; я использовал вариант, `ls -AFR > where.txt`, для получения перечня всех файлов в [.filename]#/# и (отдельно) [.filename]#/usr# до того, как узнал о более эффективном способе поиска файлов. `passwd`:: для изменения пароля пользователя (или пароля `root`) `man hier`:: справочная страница по файловой структуре UNIX(R) Используйте `find` для поиска [.filename]#filename# в [.filename]#/usr# или в любом из её подкаталогов при помощи команды [source, shell] .... % find /usr -name "filename" .... Вы можете использовать `\*` в качестве шаблона внутри `"_filename_"` (это выражение должно быть в кавычках). Если вы укажете команде `find` на поиск в [.filename]#/#, а не в [.filename]#/usr#, то она будет искать файл(ы) во всех смонтированных файловых системах, включая CDROM и раздел DOS. Прекрасным пособием, описывающим команды и утилиты UNIX(R), является книга Abrahams & Larson, Unix for the Impatient (2nd ed., Addison-Wesley, 1996). Масса информации по UNIX(R) есть и в Internet. [[next-steps]] == Следующие шаги Теперь вы должны иметь инструменты, которые необходимо держать под рукой и умеете редактировать файлы, так что вы должны суметь запустить всё, что угодно. Много полезной информации содержится в Руководстве по FreeBSD (которое, скорее всего, есть на вашем жёстком диске) и link:https://www.FreeBSD.org/[Web-сайте FreeBSD]. На CDROM, а также Web-сайте находятся различные пакеты и порты. В Руководстве рассказывается более подробно о том, как их использовать (получить пакет, если он существует, командой `pkg_add /cdrom/packages/All/_packagename_`, где _packagename_ является именем файла пакета). На CDROM находится перечни пакетов и портов с их краткими описаниями в файлах [.filename]#cdrom/packages/index#, [.filename]#cdrom/packages/index.txt# и [.filename]#cdrom/ports/index#, а более полные описания можно найти в [.filename]#/cdrom/ports/\*/*/pkg/DESCR#, где знаки `*` обозначают тематические подкаталоги с программами и названиями программ, соответственно. Если вы посчитаете, что Руководство является слишком сложной книгой (что с `lndir` и всё) по установке портов с CDROM, вот рецепт, который обычно срабатывает: Найдите нужный вам порт, скажем, `kermit`. На CDROM для него должен существовать каталог. Скопируйте этот подкаталог в каталог [.filename]#/usr/local# (хорошее место для программного обеспечения, которое вы добавляете, и которое должно быть доступно всем пользователям) такой командой: [source, shell] .... # cp -R /cdrom/ports/comm/kermit /usr/local .... В результате должен образоваться подкаталог [.filename]#/usr/local/kermit#, содержащий все файлы, что есть в подкаталоге `kermit` на CDROM. Затем создайте каталог [.filename]#/usr/ports/distfiles#, если он ещё не существует, при помощи команды `mkdir`. Теперь проверьте содержимое [.filename]#/cdrom/ports/distfiles# на предмет наличия файла с именем, говорящем о том, что это тот порт, который вы хотите иметь. Скопируйте этот файл в каталог [.filename]#/usr/ports/distfiles#; в последних версиях вы можете пропустить этот шаг, и FreeBSD выполнит его за вас. В случае с `kermit`, дистрибутивного файла не существует. После этого по команде `cd` перейдите в подкаталог [.filename]#/usr/local/kermit#, в котором есть файл [.filename]#Makefile#. Наберите [source, shell] .... # make all install .... Во время выполнения порт обратится к FTP для получения всех архивных файлов, нужных ему и которых не найдено на CDROM или в каталоге [.filename]#/usr/ports/distfiles#. Если сеть у вас ещё не работает, и файла для порта в каталоге [.filename]#/cdrom/ports/distfiles# нет, вам потребуется получить дистрибутивный файл на другой машине и скопировать его в каталог [.filename]#/usr/ports/distfiles#. Прочтите [.filename]#Makefile# (при помощи команд `cat`, `more` или `view`), чтобы понять, как называется файл и куда нужно обратиться (основной сайт распространения), чтобы его получить. (Используйте двоичный тип передачи файлов!) Затем перейдите обратно в каталог [.filename]#/usr/local/kermit#, найдите каталог с [.filename]#Makefile# и наберите `make all install`. [[your-working-environment]] == Ваше рабочее окружение Ваш командный процессор является самой важной частью вашего рабочего окружения. Оболочка занимается интерпретацией команд, которые вы вводите в командной строке, и таким образом взаимодействует с остальной частью операционной системы. Вы можете также писать скрипты командного процессора, то есть последовательности команд, которые должны выполняться без вашего участия. Вместе с FreeBSD устанавливаются два командный процессора: `csh` и `sh`. `csh` хорош для работы в командной строке, однако скрипты должны писаться на языке оболочек `sh` (или `bash`). Вы можете выяснить, какой командный процессор у вас используется, набрав `echo $SHELL`. Оболочка `csh` подходящая, однако `tcsh` может всё, что умеет `csh` и ещё больше. Она позволяет вам восстанавливать прошлые команды клавишами со стрелками и редактировать их. В нём есть автозавершение имён файлов по нажатию клавиши табуляции (в `csh` используется клавиша kbd:[Esc]) и он позволяет вам переключаться в каталог, в котором вы были ранее, по команде `cd -`. Также в `tcsh` гораздо легче изменять системное приглашение. Это гораздо упрощает жизнь. Вот три шага по установке нового командного процессора: [.procedure] ==== . Установите командный процессор как порт или пакет, как вы обычно это делаете с другим портом или пакетом. . Используйте `chsh`, чтобы навсегда изменить оболочку на `tcsh`, или введите `tcsh` в командной строке, чтобы сменить оболочку без повторного входа в систему. ==== [NOTE] ==== Может быть опасно изменять оболочку `root` на что-то отличное от `sh` или `csh` в ранних версиях FreeBSD и многих других версиях UNIX(R); у вас может не оказаться рабочей оболочки, когда система переведёт вас в однопользовательский режим. Решение заключается в использовании `su -m` для получения прав `root`, что даст вам `tcsh` в качестве оболочки `root`, так как оболочка является частью окружения. Вы можете сделать это постоянным, добавив в ваш [.filename]#.tcshrc# алиас с: [.programlisting] .... alias su su -m .... ==== При запуске `tcsh` он будет считывать файлы [.filename]#/etc/csh.cshrc# и [.filename]#/etc/csh.login#, как и `csh`. Эта оболочка также читает файл [.filename]#.login# из вашего домашнего каталога, а также файл [.filename]#.cshrc#, если только вы не создали файл [.filename]#.tcshrc#. Это вы можете сделать простым копированием файла [.filename]#.cshrc# в [.filename]#.tcshrc#. Теперь, когда у вас установлен командный процессор `tcsh`, вы можете настроить приглашение командной строки. Все подробности можно найти на странице справки по `tcsh`, но всё же вот строка, которая помещается в ваш файл [.filename]#.tcshrc#, которая может показать, сколько команд вы уже набрали, сколько сейчас времени и в каком каталоге вы находитесь. Она также выдаёт `>`, если вы являетесь обычным пользователем, и #, если вы являетесь пользователем `root`, однако tsch будет делать это в любом случае: set prompt = "%h %t %~ %# " Эта строка должна быть поставлена на то же самое место, что и существующая строка установки приглашения, если она есть, либо после строки "if($?prompt) then", если её нет. Закомментируйте старую строку; вы всегда сможете вернуться к ней обратно, если предпочтёте её. Не забудьте о пробелах и кавычках. Вы можете заставить перечитать [.filename]#.tcshrc#, набрав `source .tcshrc`. Перечень других установленных переменных окружения вы можете получить, набрав `env` в приглашении командной строки. В результате, кроме всего прочего, будут показаны редактор, используемый по умолчанию, программа постраничной выдачи и тип терминала. Командой, полезной при входе в систему с удалённого места и невозможности запуска программы, потому что терминал не обладает некоторыми возможностями, является команда `setenv TERM vt100`. [[other]] == Другие Работая как пользователь `root`, вы можете отмонтировать CDROM по команде `/sbin/umount /cdrom`, вытащить его из привода, вставить другой диск и смонтировать его командой `/sbin/mount_cd9660 /dev/cd0a /cdrom`, при этом предполагается, что `cd0a` является именем устройства для вашего привода CDROM. Самые последние версии FreeBSD позволяют вам монтировать CDROM просто по команде `/sbin/mount /cdrom`. Использование живой файловой системы-она находится на втором диске FreeBSD из набора CDROM-полезно при нехватке пространства. То, что находится в этой файловой системе, меняется от релиза к релизу. Вы можете попытаться поиграть в игры с CDROM. При этом применяется команда `lndir`, которая устанавливается с X Window System, и служит для указания программам, где искать необходимые файлы, потому что они находятся в файловой системе [.filename]#/cdrom#, а не в [.filename]#/usr# и её подкаталогах, где должны находиться. Прочтите справку по команде `man lndir`. [[comments-welcome]] == Пожелания приветствуются Если вы используете это руководство, мне будет интересно знать, в каком месте оно написано непонятно и что упущено из того, что, по вашему мнению, должно быть включено ценного. Мои благодарности Eugene W. Stark, профессору информатики в SUNY-Stony Brook, и John Fieber за ценные советы. Annelise Anderson, mailto:andrsn@andrsn.stanford.edu[andrsn@andrsn.stanford.edu] diff --git a/documentation/content/ru/articles/new-users/_index.po b/documentation/content/ru/articles/new-users/_index.po index e84a4f913c..a09e305301 100644 --- a/documentation/content/ru/articles/new-users/_index.po +++ b/documentation/content/ru/articles/new-users/_index.po @@ -1,1439 +1,1439 @@ # SOME DESCRIPTIVE TITLE # Copyright (C) YEAR The FreeBSD Project # This file is distributed under the same license as the FreeBSD Documentation package. -# Vladlen Popolitov , 2025. +# Vladlen Popolitov , 2025, 2026. msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" "POT-Creation-Date: 2022-02-01 09:21-0300\n" -"PO-Revision-Date: 2025-07-05 04:45+0000\n" +"PO-Revision-Date: 2026-03-04 20:01+0000\n" "Last-Translator: Vladlen Popolitov \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 4.17\n" #. type: YAML Front Matter: description #: documentation/content/en/articles/new-users/_index.adoc:1 #, no-wrap msgid "Introduction for people new to both FreeBSD and UNIX®" msgstr "Введение для пользователей, не знакомых с FreeBSD и UNIX®" #. type: YAML Front Matter: title #: documentation/content/en/articles/new-users/_index.adoc:1 #, no-wrap msgid "For People New to Both FreeBSD and UNIX®" msgstr "Для тех, кто новичок и в FreeBSD, и в UNIX®" #. type: Title = #: documentation/content/en/articles/new-users/_index.adoc:11 #, no-wrap msgid "For People New to Both FreeBSD and UNIX(R)" msgstr "Пособие для новичков во FreeBSD и UNIX(R)" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:44 msgid "Abstract" msgstr "Аннотация" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:46 msgid "" "Congratulations on installing FreeBSD! This introduction is for people new " "to both FreeBSD _and_ UNIX(R)-so it starts with basics." msgstr "" "Поздравляем вас с установкой FreeBSD! Это вводное пособие предназначено для " "тех, кто является новичком в мире FreeBSD _и_ UNIX(R)-так что оно начнётся с " "основ." #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:48 msgid "'''" msgstr "'''" #. type: Title == #: documentation/content/en/articles/new-users/_index.adoc:52 #, no-wrap msgid "Logging in and Getting Out" msgstr "Регистрация в системе и выход из неё" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:58 msgid "" "Log in (when you see `login:`) as a user you created during installation or " "as `root`. (Your FreeBSD installation will already have an account for " "`root`; who can go anywhere and do anything, including deleting essential " "files, so be careful!) The symbols % and # in the following stand for the " "prompt (yours may be different), with % indicating an ordinary user and # " "indicating `root`." msgstr "" "Войдите в систему (когда увидите `login:`), используя пользователя, " "созданного во время установки, или как `root`. (В вашей установке FreeBSD " "уже будет учётная запись для `root`; этот пользователь может ходить куда " "угодно и делать что угодно, включая удаление важных файлов, так что будьте " "осторожны!) Символы % и # в дальнейшем обозначают приглашение командной " "строки (у вас оно может выглядеть иначе), где % означает обычного " "пользователя, а # — `root`." #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:60 msgid "To log out (and get a new `login:` prompt) type" msgstr "Чтобы выйти из системы (и получить новое приглашение `login:`) наберите" #. type: delimited block . 4 #: documentation/content/en/articles/new-users/_index.adoc:64 #, no-wrap msgid "# exit\n" msgstr "# exit\n" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:68 msgid "" "as often as necessary. Yes, press kbd:[enter] after commands, and remember " "that UNIX(R) is case-sensitive-``exit``, not `EXIT`." msgstr "" "столько раз, сколько нужно. Да, нажимайте kbd:[enter] после набора команд, и " "помните, что UNIX(R) чувствителен к регистру букв-набирайте `exit`, но не " "`EXIT`." #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:70 msgid "To shut down the machine type" msgstr "Для завершения работы машины наберите" #. type: delimited block . 4 #: documentation/content/en/articles/new-users/_index.adoc:74 #, no-wrap msgid "# /sbin/shutdown -h now\n" msgstr "# /sbin/shutdown -h now\n" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:77 msgid "Or to reboot type" msgstr "Или, для перезагрузки нужно набрать" #. type: delimited block . 4 #: documentation/content/en/articles/new-users/_index.adoc:81 #, no-wrap msgid "# /sbin/shutdown -r now\n" msgstr "# /sbin/shutdown -r now\n" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:84 msgid "or" msgstr "или" #. type: delimited block . 4 #: documentation/content/en/articles/new-users/_index.adoc:88 #, no-wrap msgid "# /sbin/reboot\n" msgstr "# /sbin/reboot\n" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:94 msgid "" "You can also reboot with kbd:[Ctrl+Alt+Delete]. Give it a little time to do " "its work. This is equivalent to `/sbin/reboot` in recent releases of " "FreeBSD and is much, much better than hitting the reset button. You do not " "want to have to reinstall this thing, do you?" msgstr "" "Перезагрузку можно также выполнить нажатием клавиш kbd:[Ctrl+Alt+Delete]. " "Подождите некоторое время, чтобы дать этой команде отработать. В последних " "релизах FreeBSD она эквивалента выдаче команды `/sbin/reboot` и гораздо, " "гораздо лучше, чем нажатие кнопки сброса. Вы ведь не хотите всё " "переустанавливать заново, не так ли?" #. type: Title == #: documentation/content/en/articles/new-users/_index.adoc:96 #, no-wrap msgid "Adding a User with Root Privileges" msgstr "Добавление пользователя с привилегиями root" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:99 msgid "" "If you did not create any users when you installed the system and are thus " "logged in as `root`, you should probably create a user now with" msgstr "" "Если при установке системы вы не создали ни одного пользователя, и поэтому " "вошли в систему как `root`, то теперь вы должны создать пользователя по " "команде" #. type: delimited block . 4 #: documentation/content/en/articles/new-users/_index.adoc:103 #, no-wrap msgid "# adduser\n" msgstr "# adduser\n" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:109 msgid "" "The first time you use `adduser`, it might ask for some defaults to save. " "You might want to make the default shell man:csh[1] instead of man:sh[1], if " "it suggests `sh` as the default. Otherwise just press enter to accept each " "default. These defaults are saved in [.filename]#/etc/adduser.conf#, an " "editable file." msgstr "" "При первом использовании утилиты `adduser` она может запрашивать сохранение " "некоторых параметров для использования их по умолчанию. вы можете сделать " "оболочкой, используемой по умолчанию, командный процессор man:csh[1], а не " "man:sh[1], если по умолчанию вам предлагается `sh`. В противном случае " "просто нажимайте enter для принятия всех предлагаемых по умолчанию " "вариантов. Эти значения по умолчанию сохраняются в файле [.filename]#/etc/" "adduser.conf#, в форме, доступной для редактирования." #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:113 msgid "" "Suppose you create a user `jack` with full name _Jack Benimble_. Give " "`jack` a password if security (even kids around who might pound on the " "keyboard) is an issue. When it asks you if you want to invite `jack` into " "other groups, type `wheel`" msgstr "" "Предположим, что вы создали пользователя `jack` с полным именем __Jack " "Benimble__. Назначьте пользователю `jack` пароль, если информационная " "безопасность имеет значение (даже если это дети, которые могут стучать по " "клавиатуре). Когда вам будет задан вопрос по включению пользователя `jack` в " "другие группы, наберите `wheel`" #. type: delimited block . 4 #: documentation/content/en/articles/new-users/_index.adoc:117 #, no-wrap msgid "Login group is \"jack\". Invite jack into other groups: wheel\n" msgstr "Login group is \"jack\". Invite jack into other groups: wheel\n" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:121 msgid "" "This will make it possible to log in as `jack` and use the man:su[1] command " "to become `root`. Then you will not get scolded any more for logging in as " "`root`." msgstr "" "Это позволит входить в систему как пользователь `jack` и использовать " "команду man:su[1] для того, чтобы стать пользователем `root`. Тогда вас не " "будут больше обвинять в том, чтобы вы входите в систему как пользователь " "`root`." #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:124 msgid "" "You can quit `adduser` any time by typing kbd:[Ctrl+C], and at the end you " "will have a chance to approve your new user or simply type kbd:[n] for no. " "You might want to create a second new user so that when you edit `jack`'s " "login files, you will have a hot spare in case something goes wrong." msgstr "" "Вы можете прекратить работы с `adduser` в любой момент, нажав kbd:[Ctrl+C], " "а в завершении ввода у вас будет шанс подтвердить заведение нового " "пользователя или набрать kbd:[n] в качестве отрицательного ответа. Вам может " "захотеться создать второго нового пользователя, для того, чтобы при " "редактировании файлов для входа пользователя `jack` имелся горячий резерв на " "тот случай, если что-то пойдёт не так." #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:127 msgid "" "Once you have done this, use `exit` to get back to a login prompt and log in " "as `jack`. In general, it is a good idea to do as much work as possible as " "an ordinary user who does not have the power-and risk-of `root`." msgstr "" "После того, как вы это сделаете, воспользуйтесь командой `exit` для возврата " "к приглашению ко входу в систему и зарегистрируйтесь в ней как пользователь " "`jack`. Вообще говоря, лучше всего основную массу работы выполнять, работая " "как обычный пользователь, который не имеет мощь и опасность пользователя " "`root`." #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:130 msgid "" "If you already created a user and you want the user to be able to `su` to " "`root`, you can log in as `root` and edit the file [.filename]#/etc/group#, " "adding `jack` to the first line (the group `wheel`). But first you need to " "practice man:vi[1], the text editor-or use the simpler text editor, man:" "ee[1], installed on recent versions of FreeBSD." msgstr "" "Если вы уже создали пользователя и хотите, чтобы он мог выполнять команду " "`su` для получения привилегий `root`, вы можете войти в систему как `root` и " "отредактировать файл [.filename]#/etc/group#, добавив пользователя `jack` в " "первую строчку (в группу `wheel`). Однако сначала вам нужно поупражняться с " "программой man:vi[1], текстовым редактором,-или использовать более простой " "редактор, man:ee[1], имеющийся в последней версии FreeBSD." #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:132 msgid "To delete a user, use `rmuser`." msgstr "Для удаления пользователя воспользуйтесь командой `rmuser`." #. type: Title == #: documentation/content/en/articles/new-users/_index.adoc:134 #, no-wrap msgid "Looking Around" msgstr "Просмотр окружения" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:137 msgid "" "Logged in as an ordinary user, look around and try out some commands that " "will access the sources of help and information within FreeBSD." msgstr "" "Войдя в систему как обычный пользователь, оглянитесь вокруг и попробуйте " "выполнить некоторые команды, дающие доступ к источникам информации и помощи " "внутри FreeBSD." #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:139 msgid "Here are some commands and what they do:" msgstr "Вот некоторые команды и то, что они делают:" #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:140 #, no-wrap msgid "`id`" msgstr "`id`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:142 msgid "Tells you who you are!" msgstr "Говорит вам, кто вы!" #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:143 #, no-wrap msgid "`pwd`" msgstr "`pwd`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:145 msgid "Shows you where you are-the current working directory." msgstr "Показывает, где вы находитесь-текущий рабочий каталог." #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:146 #, no-wrap msgid "`ls`" msgstr "`ls`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:148 msgid "Lists the files in the current directory." msgstr "Выдаёт список файлов, находящихся в текущем каталоге." #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:149 #, no-wrap msgid "`ls -F`" msgstr "`ls -F`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:151 msgid "" "Lists the files in the current directory with a * after executables, a `/` " "after directories, and an `@` after symbolic links." msgstr "" "Выдаёт перечень файлов, находящихся в текущем каталоге, добавляя символы `\\" "*` после выполнимых файлов, `/` после каталогов и `@` после символических " "ссылок." #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:152 #, no-wrap msgid "`ls -l`" msgstr "`ls -l`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:154 msgid "Lists the files in long format-size, date, permissions." msgstr "" "Выдаёт перечень файлов в расширенном формате-размер, дата и права доступа." #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:155 #, no-wrap msgid "`ls -a`" msgstr "`ls -a`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:158 msgid "" "Lists hidden \"dot\" files with the others. If you are `root`, the \"dot\" " "files show up without the `-a` switch." msgstr "" "Вместе со всеми выдаёт и список скрытых \"dot\"-файлов (начинающихся с точки)" ". Если вы являетесь пользователем `root`, то \"dot\"-файлы выдаются и без " "указания флага `-a`." #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:159 #, no-wrap msgid "`cd`" msgstr "`cd`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:163 msgid "" "Changes directories. `cd ..` backs up one level; note the space after `cd`. " "`cd /usr/local` goes there. `cd ~` goes to the home directory of the person " "logged in-e.g., [.filename]#/usr/home/jack#. Try `cd /cdrom`, and then " "`ls`, to find out if your CDROM is mounted and working." msgstr "" "Смена каталогов. `cd ..` перемещает на один уровень выше; обратите внимание " "на промежуток после `cd`. `cd /usr/local` перейдёт в указанное место. `cd ~` " "перейдёт в домашний каталог человека, который вошёл в систему-к примеру, [." "filename]#/usr/home/jack#. попробуйте выполнить команду `cd /cdrom`, а затем " "`ls` для проверки того, что ваш CDROM смонтирован и работает." #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:164 #, no-wrap msgid "`less _filename_`" msgstr "`less _filename_`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:168 msgid "" "Lets you look at a file (named _filename_) without changing it. Try `less /" "etc/fstab`. Type `q` to quit." msgstr "" "Позволяет вам просмотреть файл (с именем _filename_) без внесения в него " "изменений. Попробуйте выполнить команду `less /etc/fstab`. Для выхода " "наберите `q`." #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:169 #, no-wrap msgid "`cat _filename_`" msgstr "`cat _filename_`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:174 msgid "" "Displays _filename_ on screen. If it is too long and you can see only the " "end of it, press kbd:[ScrollLock] and use the kbd:[up-arrow] to move " "backward; you can use kbd:[ScrollLock] with manual pages too. Press kbd:" "[ScrollLock] again to quit scrolling. You might want to try `cat` on some " "of the dot files in your home directory-`cat .cshrc`, `cat .login`, `cat ." "profile`." msgstr "" "Выдаёт содержимое _filename_ на экран. если он слишком длинный и вы можете " "увидеть только его конец, нажмите kbd:[ScrollLock] и используйте клавишу " "kbd:[стрелка вверх] для движения назад; вы можете также использовать " "kbd:[ScrollLock] и со страницами справки. Нажмите kbd:[ScrollLock] снова для " "прекращения прокрутки. Вам может захотеться попробовать команду `cat` с " "некоторыми из dot-файлов в вашем домашнем каталоге-`cat .cshrc`, `cat .login`" ", `cat .profile`." #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:178 msgid "" "You will notice aliases in [.filename]#.cshrc# for some of the `ls` commands " "(they are very convenient). You can create other aliases by editing [." "filename]#.cshrc#. You can make these aliases available to all users on the " "system by putting them in the system-wide `csh` configuration file, [." "filename]#/etc/csh.cshrc#." msgstr "" "В файле [.filename]#.cshrc# вы заметите алиасы для некоторых из команд `ls` (" "они очень удобны). Вы можете создать другие алиасы, отредактировав файл [." "filename]#.cshrc#. Вы можете сделать эти алиасы доступными всем " "пользователям системы, поместив их в общесистемный конфигурационный файл для " "`csh`, [.filename]#/etc/csh.cshrc#." #. type: Title == #: documentation/content/en/articles/new-users/_index.adoc:180 #, no-wrap msgid "Getting Help and Information" msgstr "Получение помощи и информации" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:184 msgid "" "Here are some useful sources of help. _Text_ stands for something of your " "choice that you type in-usually a command or filename." msgstr "" "Вот несколько полезных источников получения помощи. Здесь _Text_ обозначает " "что-то по вашему выбору, что вы вводите-обычно команду или имя файла." #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:185 #, no-wrap msgid "`apropos _text_`" msgstr "`apropos _text_`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:187 msgid "Everything containing string _text_ in the `whatis database`." msgstr "Всё, что содержит строку _text_ в `базе whatis`." #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:188 #, no-wrap msgid "`man _text_`" msgstr "`man _text_`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:193 msgid "" "The manual page for _text_. The major source of documentation for UNIX(R) " "systems. `man ls` will tell you all the ways to use `ls`. Press kbd:" "[Enter] to move through text, kbd:[Ctrl+B] to go back a page, kbd:[Ctrl+F] " "to go forward, kbd:[q] or kbd:[Ctrl+C] to quit." msgstr "" "Страница справки по _text_. Это главный источник документации в UNIX(R)-" "системах. `man ls` покажет вам все способы использования команды `ls`. " "Нажимайте kbd:[Enter] для передвижения по тексту, kbd:[Ctrl+B] для возврата " "на страницу назад, kbd:[Ctrl+F] для продвижения вперёд, kbd:[q] или " "kbd:[Ctrl+C] для выхода." #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:194 #, no-wrap msgid "`which _text_`" msgstr "`which _text_`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:196 msgid "Tells you where in the user's path the command _text_ is found." msgstr "" "Покажет, в каком месте из маршрута поиска пользователя находится команда " "_text_." #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:197 #, no-wrap msgid "`locate _text_`" msgstr "`locate _text_`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:199 msgid "All the paths where the string _text_ is found." msgstr "Все маршруты, где находится строчка _text_." #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:200 #, no-wrap msgid "`whatis _text_`" msgstr "`whatis _text_`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:203 msgid "" "Tells you what the command _text_ does and its manual page. Typing `whatis " "*` will tell you about all the binaries in the current directory." msgstr "" "Описывает, что делает команда _text_ и её справочная страница. Команда `" "whatis *` расскажет вам обо всех двоичных файлах в текущем каталоге." #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:204 #, no-wrap msgid "`whereis _text_`" msgstr "`whereis _text_`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:206 msgid "Finds the file _text_, giving its full path." msgstr "Ищет файл _text_ и выдаёт полный путь до него." #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:210 msgid "" "You might want to try using `whatis` on some common useful commands like " "`cat`, `more`, `grep`, `mv`, `find`, `tar`, `chmod`, `chown`, `date`, and " "`script`. `more` lets you read a page at a time as it does in DOS, e.g., " "`ls -l | more` or `more _filename_`. The * works as a wildcard-e.g., `ls " "w*` will show you files beginning with `w`." msgstr "" "Вы можете захотеть попробовать использоваться команду `whatis` с некоторыми " "полезными командами типа `cat`, `more`, `grep`, `mv`, `find`, `tar`, `chmod`" ", `chown`, `date`, и `script`. Команда `more` позволит вам читать " "постранично, как и в DOS, например, `ls -l | more` или `more _filename_`. " "Знак `\\*` работает как общий шаблон-например, `ls w*` выдаст перечень " "файлов, начинающихся с буквы `w`." #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:214 msgid "" "Are some of these not working very well? Both man:locate[1] and man:" "whatis[1] depend on a database that is rebuilt weekly. If your machine is " "not going to be left on over the weekend (and running FreeBSD), you might " "want to run the commands for daily, weekly, and monthly maintenance now and " "then. Run them as `root` and, for now, give each one time to finish before " "you start the next one." msgstr "" "Некоторые из этих команд работают не очень хорошо? Обе команды man:locate[1] " "и man:whatis[1] зависят от базы данных, которая перестраивается еженедельно. " "Если ваша машина будет оставаться включенной на выходные (и она работает под " "FreeBSD), то вы можете пожелать запускать определённые команды раз в день, " "неделю, месяц. Запускайте их как `root` и дайте каждой отработать, прежде " "чем запускать следующую." #. type: delimited block . 4 #: documentation/content/en/articles/new-users/_index.adoc:223 #, no-wrap msgid "" "# periodic daily\n" "output omitted\n" "# periodic weekly\n" "output omitted\n" "# periodic monthly\n" "output omitted\n" msgstr "" "# periodic daily\n" "output omitted\n" "# periodic weekly\n" "output omitted\n" "# periodic monthly\n" "output omitted\n" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:229 msgid "" "If you get tired of waiting, press kbd:[Alt+F2] to get another _virtual " "console_, and log in again. After all, it is a multi-user, multi-tasking " "system. Nevertheless these commands will probably flash messages on your " "screen while they are running; you can type `clear` at the prompt to clear " "the screen. Once they have run, you might want to look at [.filename]#/var/" "mail/root# and [.filename]#/var/log/messages#." msgstr "" "Если вам надоело ждать, нажмите kbd:[Alt+F2] для перехода в другую " "_виртуальную консоль_, и войдите в систему снова. В конце концов, это " "многопользовательская и многозадачная система. Тем не менее эти команды, " "скорее всего, в процессе работы будут выдавать сообщения вам на экран; вы " "можете набрать `clear` в приглашении для очистки экрана. Пока они работают, " "вы можете смотреть в содержимое файлов [.filename]#/var/mail/root# и [." "filename]#/var/log/messages#." #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:235 msgid "" "Running such commands is part of system administration-and as a single user " "of a UNIX(R) system, you are your own system administrator. Virtually " "everything you need to be `root` to do is system administration. Such " "responsibilities are not covered very well even in those big fat books on " "UNIX(R), which seem to devote a lot of space to pulling down menus in " "windows managers. You might want to get one of the two leading books on " "systems administration, either Evi Nemeth et.al.'s UNIX System " "Administration Handbook (Prentice-Hall, 1995, ISBN 0-13-15051-7)-the second " "edition with the red cover; or Æleen Frisch's Essential System " "Administration (O'Reilly & Associates, 2002, ISBN 0-596-00343-9). I used " "Nemeth." msgstr "" "Выполнение таких команд является частью системного администрирования-и как " "единственный пользователь UNIX(R)-системы вы являетесь собственным системным " "администратором. Практически всё, для чего вам нужно быть пользователем " "`root`, это системное администрирование. Эти обязанности не описываются " "достаточно хорошо даже в тех больших толстых книгах по UNIX(R), в которых " "слишком много места отдаётся описанию работы с меню в оконных менеджерах. " "Вам может понадобиться одна из двух лучших книг по системному " "администрированию, либо автора Эви Немет UNIX System Administration Handbook " "(Prentice-Hall, 1995, ISBN 0-13-15051-7)-второе издание с красной обложкой; " "или автора Æleen Frisch Essential System Administration (O'Reilly & " "Associates, 2002, ISBN 0-596-00343-9). Я использую книгу Немет." #. type: Title == #: documentation/content/en/articles/new-users/_index.adoc:237 #, no-wrap msgid "Editing Text" msgstr "Редактирование текста" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:243 msgid "" "To configure your system, you need to edit text files. Most of them will be " "in the [.filename]#/etc# directory; and you will need to `su` to `root` to " "be able to change them. You can use the easy `ee`, but in the long run the " "text editor `vi` is worth learning. There is an excellent tutorial on vi in " "[.filename]#/usr/src/contrib/nvi/docs/tutorial#, if you have the system " "sources installed." msgstr "" "Для конфигурации вашей системы вам нужно редактировать текстовые файлы. " "Большинство из них будут находиться в каталоге [.filename]#/etc#; и вам " "необходимо командой `su` получить полномочия пользователя `root`, чтобы их " "править. Вы можете использовать простой редактор `ee`, однако в смысле " "перспективности лучше изучить текстовый редактор `vi`. В каталоге [." "filename]#/usr/src/contrib/nvi/docs/tutorial# есть прекрасный учебник по vi, " "если у вас есть исходники системы." #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:247 msgid "" "Before you edit a file, you should probably back it up. Suppose you want to " "edit [.filename]#/etc/rc.conf#. You could just use `cd /etc` to get to the " "[.filename]#/etc# directory and do:" msgstr "" "Перед тем, как редактировать файл, наверное, вы должны сохранить резервную " "копию. Предположим, что вы собираетесь отредактировать файл [.filename]#/etc/" "rc.conf#. Вы можете воспользоваться командой `cd /etc` для перехода в " "каталог [.filename]#/etc# и выполнить следующее:" #. type: delimited block . 4 #: documentation/content/en/articles/new-users/_index.adoc:251 #, no-wrap msgid "# cp rc.conf rc.conf.orig\n" msgstr "# cp rc.conf rc.conf.orig\n" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:255 msgid "" "This would copy [.filename]#rc.conf# to [.filename]#rc.conf.orig#, and you " "could later copy [.filename]#rc.conf.orig# to [.filename]#rc.conf# to " "recover the original. But even better would be moving (renaming) and then " "copying back:" msgstr "" "При этом файл [.filename]#rc.conf# скопируется в [.filename]#rc.conf.orig#, " "и в последующем вы сможете скопировать [.filename]#rc.conf.orig# в файл [." "filename]#rc.conf# для восстановления оригинала. Но ещё лучше его " "переместить (переименовать), после чего скопировать обратно:" #. type: delimited block . 4 #: documentation/content/en/articles/new-users/_index.adoc:260 #, no-wrap msgid "" "# mv rc.conf rc.conf.orig\n" "# cp rc.conf.orig rc.conf\n" msgstr "" "# mv rc.conf rc.conf.orig\n" "# cp rc.conf.orig rc.conf\n" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:265 msgid "" "because `mv` preserves the original date and owner of the file. You can now " "edit [.filename]#rc.conf#. If you want the original back, you would then " "`mv rc.conf rc.conf.myedit` (assuming you want to preserve your edited " "version) and then" msgstr "" "потому что команда `mv` сохраняет исходную информацию о дате и владельце " "файла. Теперь вы можете редактировать [.filename]#rc.conf#. Если вы захотите " "восстановить исходное состояние, то выполните `mv rc.conf rc.conf.myedit` (" "полагаем, что вы хотите сохранить отредактированную версию), а затем" #. type: delimited block . 4 #: documentation/content/en/articles/new-users/_index.adoc:269 #, no-wrap msgid "# mv rc.conf.orig rc.conf\n" msgstr "# mv rc.conf.orig rc.conf\n" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:272 msgid "to put things back the way they were." msgstr "для возврата всего на место." #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:274 msgid "To edit a file, type" msgstr "Для редактирования файла наберите" #. type: delimited block . 4 #: documentation/content/en/articles/new-users/_index.adoc:278 #, no-wrap msgid "# vi filename\n" msgstr "# vi filename\n" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:283 msgid "" "Move through the text with the arrow keys. kbd:[Esc] (the escape key) puts " "`vi` in command mode. Here are some commands:" msgstr "" "Передвигайтесь по тексту при помощи клавиш со стрелками. kbd:[Esc] (клавиша " "отмены) переводит редактор `vi` в командный режим. Вот некоторые из них:" #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:284 #, no-wrap msgid "`x`" msgstr "`x`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:286 msgid "delete letter the cursor is on" msgstr "удалить символ, на котором находится курсор" #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:287 #, no-wrap msgid "`dd`" msgstr "`dd`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:289 msgid "delete the entire line (even if it wraps on the screen)" msgstr "" "удалить целую строку (даже если на экране она не помещается в целую строку)" #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:290 #, no-wrap msgid "`i`" msgstr "`i`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:292 msgid "insert text at the cursor" msgstr "вставка текста в позиции курсора" #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:293 #, no-wrap msgid "`a`" msgstr "`a`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:295 msgid "insert text after the cursor" msgstr "вставка текста после курсора" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:298 msgid "" "Once you type `i` or `a`, you can enter text. `Esc` puts you back in " "command mode where you can type" msgstr "" "Сразу после набора `i` или `a` вы можете вводить текст. `Esc` возвратит вас " "обратно в командный режим, где вы можете набрать" #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:299 #, no-wrap msgid "`:w`" msgstr "`:w`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:301 msgid "to write your changes to disk and continue editing" msgstr "для записи ваших изменений на диск и продолжения редактирования" #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:302 #, no-wrap msgid "`:wq`" msgstr "`:wq`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:304 msgid "to write and quit" msgstr "для записи и выхода" #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:305 #, no-wrap msgid "`:q!`" msgstr "`:q!`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:307 msgid "to quit without saving changes" msgstr "для выхода без сохранения изменений" #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:308 #, no-wrap msgid "`/_text_`" msgstr "`/_text_`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:310 msgid "" "to move the cursor to _text_; `/` kbd:[Enter] (the enter key) to find the " "next instance of _text_." msgstr "" "для перемещения курсора на _text_; `/` kbd:[Enter] (клавиша ввода) для " "поиска следующего экземпляра _text_." #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:311 #, no-wrap msgid "`G`" msgstr "`G`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:313 msgid "to go to the end of the file" msgstr "для перехода в конец файла" #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:314 #, no-wrap msgid "`nG`" msgstr "`nG`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:316 msgid "to go to line _n_ in the file, where _n_ is a number" msgstr "Для перехода к строке _n_ в файле, где _n_ является числом" #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:317 #, no-wrap msgid "kbd:[Ctrl+L]" msgstr "kbd:[Ctrl+L]" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:319 msgid "to redraw the screen" msgstr "для перерисовки экрана" #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:320 #, no-wrap msgid "kbd:[Ctrl+b] and kbd:[Ctrl+f]" msgstr "kbd:[Ctrl+b] and kbd:[Ctrl+f]" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:322 msgid "go back and forward a screen, as they do with `more` and `view`." msgstr "" -"для перелистывания экрана вперед и назад, как это делается в `more` и `view`." +"для перелистывания экрана вперёд и назад, как это делается в `more` и `view`." #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:327 msgid "" "Practice with `vi` in your home directory by creating a new file with `vi " "_filename_` and adding and deleting text, saving the file, and calling it up " "again. `vi` delivers some surprises because it is really quite complex, and " "sometimes you will inadvertently issue a command that will do something you " "do not expect. (Some people actually like `vi`-it is more powerful than DOS " "EDIT-find out about `:r`.) Use kbd:[Esc] one or more times to be sure you " "are in command mode and proceed from there when it gives you trouble, save " "often with `:w`, and use `:q!` to get out and start over (from your last `:" "w`) when you need to." msgstr "" "Поупражняйтесь с редактором `vi` в своём домашнем каталоге, создав новый " "файл по команде `vi _filename_`, добавляя и удаляя текст, сохраняя файл и " "вызывая его снова. Редактор `vi` преподносит некоторые сюрпризы, потому что " "он на самом деле достаточно сложный, и иногда вы можете неправильно вызвать " "команду, которая сделает нечто, чего вы не ожидали. (Некоторым людям " "действительно нравится `vi`-он более мощный, чем EDIT из DOS-посмотрите " "команду `:r`.) Для того, чтобы удостовериться, что вы находитесь в режиме " "команд, нажимайте kbd:[Esc] один или несколько раз, и начинайте снова с " "этого места, если возникли какие-то проблемы, часто сохраняйте текст " "командой `:w` и используйте `:q!` для того, чтобы прекратить работу и начать " "всё сначала (с вашей последней команды `:w`), если это нужно." #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:331 msgid "" "Now you can `cd` to [.filename]#/etc#, `su` to `root`, use `vi` to edit the " "file [.filename]#/etc/group#, and add a user to `wheel` so the user has root " "privileges. Just add a comma and the user's login name to the end of the " "first line in the file, press kbd:[Esc], and use `:wq` to write the file to " "disk and quit. Instantly effective. (You did not put a space after the " "comma, did you?)" msgstr "" "Теперь вы можете выполнить `cd` для перехода в каталог [.filename]#/etc#, " "`su` в пользователя `root`, использовать `vi` для редактирования файла [." "filename]#/etc/group# и добавлять пользователя в группу `wheel`, чтобы он " "имел полномочия пользователя root. Просто добавьте запятую и имя входа " "пользователя в конце первой строки этого файла, нажмите kbd:[Esc] и " "воспользуйтесь `:wq` для записи файла на диск и выхода. Работает всегда. (Вы " "не поставили пробел после запятой, ведь так?)" #. type: Title == #: documentation/content/en/articles/new-users/_index.adoc:333 #, no-wrap msgid "Other Useful Commands" msgstr "Другие полезные команды" #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:335 #, no-wrap msgid "`df`" msgstr "`df`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:337 msgid "shows file space and mounted systems." msgstr "" "выдаёт данные о занятом файлами пространстве и смонтированных файловых " "системах." #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:338 #, no-wrap msgid "`ps aux`" msgstr "`ps aux`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:340 msgid "shows processes running. `ps ax` is a narrower form." msgstr "" "показывает работающие процессы. `ps ax` является частоупотребительной формой." #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:341 #, no-wrap msgid "`rm _filename_`" msgstr "`rm _filename_`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:343 msgid "remove _filename_." msgstr "удаляет _filename_." #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:344 #, no-wrap msgid "`rm -R _dir_`" msgstr "`rm -R _dir_`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:346 msgid "removes a directory _dir_ and all subdirectories-careful!" msgstr "удаляет каталог _dir_ и все его подкаталоги-осторожно!" #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:347 #, no-wrap msgid "`ls -R`" msgstr "`ls -R`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:349 msgid "" "lists files in the current directory and all subdirectories; I used a " "variant, `ls -AFR > where.txt`, to get a list of all the files in [." "filename]#/# and (separately) [.filename]#/usr# before I found better ways " "to find files." msgstr "" "выдаёт список файлов в текущем каталоге и всех его подкаталогах; я " "использовал вариант, `ls -AFR > where.txt`, для получения перечня всех " "файлов в [.filename]#/# и (отдельно) [.filename]#/usr# до того, как узнал о " "более эффективном способе поиска файлов." #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:350 #, no-wrap msgid "`passwd`" msgstr "`passwd`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:352 msgid "to change user's password (or ``root``'s password)" msgstr "для изменения пароля пользователя (или пароля `root`)" #. type: Labeled list #: documentation/content/en/articles/new-users/_index.adoc:353 #, no-wrap msgid "`man hier`" msgstr "`man hier`" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:355 msgid "manual page on the UNIX(R) filesystem" msgstr "справочная страница по файловой структуре UNIX(R)" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:357 msgid "" "Use `find` to locate [.filename]#filename# in [.filename]#/usr# or any of " "its subdirectories with" msgstr "" "Используйте `find` для поиска [.filename]#filename# в [.filename]#/usr# или " "в любом из её подкаталогов при помощи команды" #. type: delimited block . 4 #: documentation/content/en/articles/new-users/_index.adoc:361 #, no-wrap msgid "% find /usr -name \"filename\"\n" msgstr "% find /usr -name \"filename\"\n" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:365 msgid "" "You can use * as a wildcard in `\"_filename_\"` (which should be in " "quotes). If you tell `find` to search in [.filename]#/# instead of [." "filename]#/usr# it will look for the file(s) on all mounted filesystems, " "including the CDROM and the DOS partition." msgstr "" "Вы можете использовать `\\*` в качестве шаблона внутри `\"_filename_\"` (это " "выражение должно быть в кавычках). Если вы укажете команде `find` на поиск в " "[.filename]#/#, а не в [.filename]#/usr#, то она будет искать файл(ы) во " "всех смонтированных файловых системах, включая CDROM и раздел DOS." #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:367 msgid "" "An excellent book that explains UNIX(R) commands and utilities is Abrahams & " "Larson, Unix for the Impatient (2nd ed., Addison-Wesley, 1996). There is " "also a lot of UNIX(R) information on the Internet." msgstr "" "Прекрасным пособием, описывающим команды и утилиты UNIX(R), является книга " "Abrahams & Larson, Unix for the Impatient (2nd ed., Addison-Wesley, 1996). " "Масса информации по UNIX(R) есть и в Internet." #. type: Title == #: documentation/content/en/articles/new-users/_index.adoc:369 #, no-wrap msgid "Next Steps" msgstr "Следующие шаги" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:376 msgid "" "You should now have the tools you need to get around and edit files, so you " "can get everything up and running. There is a great deal of information in " "the FreeBSD handbook (which is probably on your hard drive) and link:https://" "www.FreeBSD.org/[FreeBSD's web site]. A wide variety of packages and ports " "are on the CDROM as well as the web site. The handbook tells you more about " "how to use them (get the package if it exists, with `pkg add _packagename_`, " "where _packagename_ is the filename of the package). The CDROM has lists of " "the packages and ports with brief descriptions in [.filename]#cdrom/packages/" "index#, [.filename]#cdrom/packages/index.txt#, and [.filename]#cdrom/ports/" "index#, with fuller descriptions in [.filename]#/cdrom/ports/\\*/*/pkg/" "DESCR#, where the *s represent subdirectories of kinds of programs and " "program names respectively." msgstr "" "Теперь вы должны иметь инструменты, которые необходимо держать под рукой и " "умеете редактировать файлы, так что вы должны суметь запустить всё, что " "угодно. Много полезной информации содержится в Руководстве по FreeBSD (" "которое, скорее всего, есть на вашем жёстком диске) и link:https://www." "FreeBSD.org/[Web-сайте FreeBSD]. На CDROM, а также Web-сайте находятся " "различные пакеты и порты. В Руководстве рассказывается более подробно о том, " "как их использовать (получить пакет, если он существует, командой `pkg_add /" "cdrom/packages/All/_packagename_`, где _packagename_ является именем файла " "пакета). На CDROM находится перечни пакетов и портов с их краткими " "описаниями в файлах [.filename]#cdrom/packages/index#, [.filename]#cdrom/" "packages/index.txt# и [.filename]#cdrom/ports/index#, а более полные " "описания можно найти в [.filename]#/cdrom/ports/\\*/*/pkg/DESCR#, где знаки " "`*` обозначают тематические подкаталоги с программами и названиями программ, " "соответственно." #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:378 msgid "" "If you find the handbook too sophisticated (what with `lndir` and all) on " "installing ports from the CDROM, here is what usually works:" msgstr "" "Если вы посчитаете, что Руководство является слишком сложной книгой (что с " "`lndir` и всё) по установке портов с CDROM, вот рецепт, который обычно " "срабатывает:" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:381 msgid "" "Find the port you want, say `kermit`. There will be a directory for it on " "the CDROM. Copy the subdirectory to [.filename]#/usr/local# (a good place " "for software you add that should be available to all users) with:" msgstr "" "Найдите нужный вам порт, скажем, `kermit`. На CDROM для него должен " "существовать каталог. Скопируйте этот подкаталог в каталог [.filename]#/usr/" "local# (хорошее место для программного обеспечения, которое вы добавляете, и " "которое должно быть доступно всем пользователям) такой командой:" #. type: delimited block . 4 #: documentation/content/en/articles/new-users/_index.adoc:385 #, no-wrap msgid "# cp -R /cdrom/ports/comm/kermit /usr/local\n" msgstr "# cp -R /cdrom/ports/comm/kermit /usr/local\n" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:388 msgid "" "This should result in a [.filename]#/usr/local/kermit# subdirectory that has " "all the files that the `kermit` subdirectory on the CDROM has." msgstr "" "В результате должен образоваться подкаталог [.filename]#/usr/local/kermit#, " "содержащий все файлы, что есть в подкаталоге `kermit` на CDROM." #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:393 msgid "" "Next, create the directory [.filename]#/usr/ports/distfiles# if it does not " "already exist using `mkdir`. Now check [.filename]#/cdrom/ports/distfiles# " "for a file with a name that indicates it is the port you want. Copy that " "file to [.filename]#/usr/ports/distfiles#; in recent versions you can skip " "this step, as FreeBSD will do it for you. In the case of `kermit`, there is " "no distfile." msgstr "" "Затем создайте каталог [.filename]#/usr/ports/distfiles#, если он ещё не " "существует, при помощи команды `mkdir`. Теперь проверьте содержимое [." "filename]#/cdrom/ports/distfiles# на предмет наличия файла с именем, " "говорящем о том, что это тот порт, который вы хотите иметь. Скопируйте этот " "файл в каталог [.filename]#/usr/ports/distfiles#; в последних версиях вы " "можете пропустить этот шаг, и FreeBSD выполнит его за вас. В случае с " "`kermit`, дистрибутивного файла не существует." #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:396 msgid "" "Then `cd` to the subdirectory of [.filename]#/usr/local/kermit# that has the " "file [.filename]#Makefile#. Type" msgstr "" "После этого по команде `cd` перейдите в подкаталог [.filename]#/usr/local/" "kermit#, в котором есть файл [.filename]#Makefile#. Наберите" #. type: delimited block . 4 #: documentation/content/en/articles/new-users/_index.adoc:400 #, no-wrap msgid "# make all install\n" msgstr "# make all install\n" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:406 msgid "" "During this process the port will FTP to get any compressed files it needs " "that it did not find on the CDROM or in [.filename]#/usr/ports/distfiles#. " "If you do not have your network running yet and there was no file for the " "port in [.filename]#/cdrom/ports/distfiles#, you will have to get the " "distfile using another machine and copy it to [.filename]#/usr/ports/" "distfiles#. Read [.filename]#Makefile# (with `cat` or `more` or `view`) to " "find out where to go (the master distribution site) to get the file and what " "its name is. (Use binary file transfers!) Then go back to [.filename]#/usr/" "local/kermit#, find the directory with [.filename]#Makefile#, and type `make " "all install`." msgstr "" "Во время выполнения порт обратится к FTP для получения всех архивных файлов, " "нужных ему и которых не найдено на CDROM или в каталоге [.filename]#/usr/" "ports/distfiles#. Если сеть у вас ещё не работает, и файла для порта в " "каталоге [.filename]#/cdrom/ports/distfiles# нет, вам потребуется получить " "дистрибутивный файл на другой машине и скопировать его в каталог [." "filename]#/usr/ports/distfiles#. Прочтите [.filename]#Makefile# (при помощи " "команд `cat`, `more` или `view`), чтобы понять, как называется файл и куда " "нужно обратиться (основной сайт распространения), чтобы его получить. (" "Используйте двоичный тип передачи файлов!) Затем перейдите обратно в каталог " "[.filename]#/usr/local/kermit#, найдите каталог с [.filename]#Makefile# и " "наберите `make all install`." #. type: Title == #: documentation/content/en/articles/new-users/_index.adoc:408 #, no-wrap msgid "Your Working Environment" msgstr "Ваше рабочее окружение" #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:413 msgid "" "Your shell is the most important part of your working environment. The " "shell is what interprets the commands you type on the command line, and thus " "communicates with the rest of the operating system. You can also write " "shell scripts a series of commands to be run without intervention." msgstr "" "Ваш командный процессор является самой важной частью вашего рабочего " "окружения. Оболочка занимается интерпретацией команд, которые вы вводите в " "командной строке, и таким образом взаимодействует с остальной частью " "операционной системы. Вы можете также писать скрипты командного процессора, " "то есть последовательности команд, которые должны выполняться без вашего " "участия." #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:417 msgid "" "Two shells come installed with FreeBSD: `csh` and `sh`. `csh` is good for " "command-line work, but scripts should be written with `sh` (or `bash`). You " "can find out what shell you have by typing `echo $SHELL`." msgstr "" "Вместе с FreeBSD устанавливаются два командный процессора: `csh` и `sh`. " "`csh` хорош для работы в командной строке, однако скрипты должны писаться на " "языке оболочек `sh` (или `bash`). Вы можете выяснить, какой командный " "процессор у вас используется, набрав `echo $SHELL`." #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:423 msgid "" "The `csh` shell is okay, but `tcsh` does everything `csh` does and more. It " "allows you to recall commands with the arrow keys and edit them. It has tab-" "key completion of filenames (`csh` uses kbd:[Esc]), and it lets you switch " "to the directory you were last in with `cd -`. It is also much easier to " "alter your prompt with `tcsh`. It makes life a lot easier." msgstr "" "Оболочка `csh` подходящая, однако `tcsh` может всё, что умеет `csh` и ещё " "больше. Она позволяет вам восстанавливать прошлые команды клавишами со " "стрелками и редактировать их. В нём есть автозавершение имён файлов по " "нажатию клавиши табуляции (в `csh` используется клавиша kbd:[Esc]) и он " "позволяет вам переключаться в каталог, в котором вы были ранее, по команде `" "cd -`. Также в `tcsh` гораздо легче изменять системное приглашение. Это " "гораздо упрощает жизнь." #. type: Plain text #: documentation/content/en/articles/new-users/_index.adoc:425 msgid "Here are the three steps for installing a new shell:" msgstr "Вот три шага по установке нового командного процессора:" #. type: delimited block = 4 #: documentation/content/en/articles/new-users/_index.adoc:429 msgid "" "Install the shell as a port or a package, just as you would any other port " "or package." msgstr "" "Установите командный процессор как порт или пакет, как вы обычно это делаете " "с другим портом или пакетом." #. type: delimited block = 4 #: documentation/content/en/articles/new-users/_index.adoc:430 msgid "" "Use `chsh` to change your shell to `tcsh` permanently, or type `tcsh` at the " "prompt to change your shell without logging in again." msgstr "" "Используйте `chsh`, чтобы навсегда изменить оболочку на `tcsh`, или введите " "`tcsh` в командной строке, чтобы сменить оболочку без повторного входа в " "систему." #. type: delimited block = 4 #: documentation/content/en/articles/new-users/_index.adoc:438 msgid "" "It can be dangerous to change `root`'s shell to something other than `sh` or " "`csh` on early versions of FreeBSD and many other versions of UNIX(R); you " "may not have a working shell when the system puts you into single user " "mode. The solution is to use `su -m` to become `root`, which will give you " "the `tcsh` as `root`, because the shell is part of the environment. You can " "make this permanent by adding it to your [.filename]#.tcshrc# as an alias " "with:" msgstr "" "Может быть опасно изменять оболочку `root` на что-то отличное от `sh` или " "`csh` в ранних версиях FreeBSD и многих других версиях UNIX(R); у вас может " "не оказаться рабочей оболочки, когда система переведёт вас в " "однопользовательский режим. Решение заключается в использовании `su -m` для " "получения прав `root`, что даст вам `tcsh` в качестве оболочки `root`, так " "как оболочка является частью окружения. Вы можете сделать это постоянным, " "добавив в ваш [.filename]#.tcshrc# алиас с:" #. type: delimited block . 4 #: documentation/content/en/articles/new-users/_index.adoc:442 #, no-wrap msgid "alias su su -m\n" msgstr "alias su su -m\n" #. type: delimited block = 4 #: documentation/content/en/articles/new-users/_index.adoc:449 msgid "" "When `tcsh` starts up, it will read the [.filename]#/etc/csh.cshrc# and [." "filename]#/etc/csh.login# files, as does `csh`. It will also read [." "filename]#.login# in your home directory and [.filename]#.cshrc# as well, " "unless you provide a [.filename]#.tcshrc#. This you can do by simply " "copying [.filename]#.cshrc# to [.filename]#.tcshrc#." msgstr "" "При запуске `tcsh` он будет считывать файлы [.filename]#/etc/csh.cshrc# и [." "filename]#/etc/csh.login#, как и `csh`. Эта оболочка также читает файл [." "filename]#.login# из вашего домашнего каталога, а также файл [.filename]#." "cshrc#, если только вы не создали файл [.filename]#.tcshrc#. Это вы можете " "сделать простым копированием файла [.filename]#.cshrc# в [.filename]#." "tcshrc#." #. type: delimited block = 4 #: documentation/content/en/articles/new-users/_index.adoc:453 msgid "" "Now that you have installed `tcsh`, you can adjust your prompt. You can " "find the details in the manual page for `tcsh`, but here is a line to put in " "your [.filename]#.tcshrc# that will tell you how many commands you have " "typed, what time it is, and what directory you are in. It also produces a " "`>` if you are an ordinary user and a # if you are `root`, but tsch will do " "that in any case:" msgstr "" "Теперь, когда у вас установлен командный процессор `tcsh`, вы можете " "настроить приглашение командной строки. Все подробности можно найти на " "странице справки по `tcsh`, но всё же вот строка, которая помещается в ваш " "файл [.filename]#.tcshrc#, которая может показать, сколько команд вы уже " "набрали, сколько сейчас времени и в каком каталоге вы находитесь. Она также " "выдаёт `>`, если вы являетесь обычным пользователем, и #, если вы являетесь " "пользователем `root`, однако tsch будет делать это в любом случае:" #. type: delimited block = 4 #: documentation/content/en/articles/new-users/_index.adoc:455 msgid "set prompt = \"%h %t %~ %# \"" msgstr "set prompt = \"%h %t %~ %# \"" #. type: delimited block = 4 #: documentation/content/en/articles/new-users/_index.adoc:460 msgid "" "This should go in the same place as the existing set prompt line if there is " "one, or under \"if($?prompt) then\" if not. Comment out the old line; you " "can always switch back to it if you prefer it. Do not forget the spaces and " "quotes. You can get the [.filename]#.tcshrc# reread by typing `source ." "tcshrc`." msgstr "" "Эта строка должна быть поставлена на то же самое место, что и существующая " "строка установки приглашения, если она есть, либо после строки \"if($?prompt)" " then\", если её нет. Закомментируйте старую строку; вы всегда сможете " "вернуться к ней обратно, если предпочтёте её. Не забудьте о пробелах и " "кавычках. Вы можете заставить перечитать [.filename]#.tcshrc#, набрав `" "source .tcshrc`." #. type: delimited block = 4 #: documentation/content/en/articles/new-users/_index.adoc:464 msgid "" "You can get a listing of other environmental variables that have been set by " "typing `env` at the prompt. The result will show you your default editor, " "pager, and terminal type, among possibly many others. A useful command if " "you log in from a remote location and cannot run a program because the " "terminal is not capable is `setenv TERM vt100`." msgstr "" "Перечень других установленных переменных окружения вы можете получить, " "набрав `env` в приглашении командной строки. В результате, кроме всего " "прочего, будут показаны редактор, используемый по умолчанию, программа " "постраничной выдачи и тип терминала. Командой, полезной при входе в систему " "с удалённого места и невозможности запуска программы, потому что терминал не " "обладает некоторыми возможностями, является команда `setenv TERM vt100`." #. type: Title == #: documentation/content/en/articles/new-users/_index.adoc:466 #, no-wrap msgid "Other" msgstr "Другие" #. type: delimited block = 4 #: documentation/content/en/articles/new-users/_index.adoc:470 msgid "" "As `root`, you can unmount the CDROM with `/sbin/umount /cdrom`, take it out " "of the drive, insert another one, and mount it with `/sbin/mount_cd9660 /dev/" "cd0a /cdrom` assuming cd0a is the device name for your CDROM drive. The " "most recent versions of FreeBSD let you mount the CDROM with just `/sbin/" "mount /cdrom`." msgstr "" "Работая как пользователь `root`, вы можете отмонтировать CDROM по команде `/" "sbin/umount /cdrom`, вытащить его из привода, вставить другой диск и " "смонтировать его командой `/sbin/mount_cd9660 /dev/cd0a /cdrom`, при этом " "предполагается, что `cd0a` является именем устройства для вашего привода " "CDROM. Самые последние версии FreeBSD позволяют вам монтировать CDROM просто " "по команде `/sbin/mount /cdrom`." #. type: delimited block = 4 #: documentation/content/en/articles/new-users/_index.adoc:476 msgid "" "Using the live filesystem-the second of FreeBSD's CDROM disks-is useful if " "you have got limited space. What is on the live filesystem varies from " "release to release. You might try playing games from the CDROM. This " "involves using `lndir`, which gets installed with the X Window System, to " "tell the program(s) where to find the necessary files, because they are in [." "filename]#/cdrom# instead of in [.filename]#/usr# and its subdirectories, " "which is where they are expected to be. Read `man lndir`." msgstr "" "Использование живой файловой системы-она находится на втором диске FreeBSD " "из набора CDROM-полезно при нехватке пространства. То, что находится в этой " "файловой системе, меняется от релиза к релизу. Вы можете попытаться поиграть " "в игры с CDROM. При этом применяется команда `lndir`, которая " "устанавливается с X Window System, и служит для указания программам, где " "искать необходимые файлы, потому что они находятся в файловой системе [." "filename]#/cdrom#, а не в [.filename]#/usr# и её подкаталогах, где должны " "находиться. Прочтите справку по команде `man lndir`." #. type: Title == #: documentation/content/en/articles/new-users/_index.adoc:478 #, no-wrap msgid "Comments Welcome" msgstr "Пожелания приветствуются" #. type: delimited block = 4 #: documentation/content/en/articles/new-users/_index.adoc:482 msgid "" "If you use this guide I would be interested in knowing where it was unclear " "and what was left out that you think should be included, and if it was " "helpful. My thanks to Eugene W. Stark, professor of computer science at " "SUNY-Stony Brook, and John Fieber for helpful comments." msgstr "" "Если вы используете это руководство, мне будет интересно знать, в каком " "месте оно написано непонятно и что упущено из того, что, по вашему мнению, " "должно быть включено ценного. Мои благодарности Eugene W. Stark, профессору " "информатики в SUNY-Stony Brook, и John Fieber за ценные советы." #. type: delimited block = 4 #: documentation/content/en/articles/new-users/_index.adoc:483 msgid "" "Annelise Anderson, mailto:andrsn@andrsn.stanford.edu[andrsn@andrsn.stanford." "edu]" msgstr "" "Annelise Anderson, mailto:andrsn@andrsn.stanford.edu[andrsn@andrsn.stanford." "edu]" diff --git a/documentation/content/ru/articles/pgpkeys/_index.adoc b/documentation/content/ru/articles/pgpkeys/_index.adoc index 42c66db2a2..6bad1ebbd5 100644 --- a/documentation/content/ru/articles/pgpkeys/_index.adoc +++ b/documentation/content/ru/articles/pgpkeys/_index.adoc @@ -1,1572 +1,1569 @@ --- description: 'Список OpenPGP-ключей, которые можно использовать для проверки подписей или отправки зашифрованной электронной почты офицерам или разработчикам FreeBSD.org.' tags: ["OpenPGP", "Developers", "Officers", "FreeBSD"] title: 'Ключи OpenPGP' --- = Ключи OpenPGP :doctype: article :toc: macro :toclevels: 1 :icons: font :sectnums: :sectnumlevels: 6 :source-highlighter: rouge :experimental: :images-path: articles/pgpkeys/ ifdef::env-beastie[] ifdef::backend-html5[] include::shared/authors.adoc[] include::shared/mirrors.adoc[] include::shared/releases.adoc[] include::shared/attributes/attributes-{{% lang %}}.adoc[] include::shared/{{% lang %}}/teams.adoc[] include::shared/{{% lang %}}/mailing-lists.adoc[] include::shared/{{% lang %}}/urls.adoc[] :imagesdir: ../../../images/{images-path} :include-path: static/pgpkeys/ endif::[] ifdef::backend-pdf,backend-epub3[] include::../../../../shared/asciidoctor.adoc[] // PGP keys are not included during the build // See 29e47423be969b7fcc7125977c1b22ddd33fc671 revision // (a wrong path is used as a workaround) :include-path: ../../../static/pgpkeys/ endif::[] endif::[] ifndef::env-beastie[] include::../../../../../shared/asciidoctor.adoc[] :include-path: ../../../static/pgpkeys/ endif::[] ''' toc::[] Эти OpenPGP-ключи можно использовать для проверки подписи или отправки зашифрованной электронной почты офицерам или разработчикам `FreeBSD.org`. Полный набор ключей можно загрузить по ссылке link:https://docs.FreeBSD.org/pgpkeys/pgpkeys.txt[pgpkeyring.txt]. //// Do not edit this file except as instructed by the addkey.sh script. See the README file in /data/pgpkeys for instructions. This article contains all the keys. The officer keys are also shown in the Handbook PGP keys chapter. //// [[pgpkeys-officers]] == Офицеры === {security-officer-name} `<{security-officer-email}>` include::{include-path}security-officer.key[] === {core-secretary-name} `<{core-secretary-email}>` include::{include-path}core-secretary.key[] === {portmgr-secretary-name} `<{portmgr-secretary-email}>` include::{include-path}portmgr-secretary.key[] === {doceng-secretary-name} `<{doceng-secretary-email}>` include::{include-path}doceng-secretary.key[] [[pgpkeys-core]] == Участники Основной команды (Core Team) === `{allanjude}` include::{include-path}allanjude.key[] === `{dch}` include::{include-path}dch.key[] === `{glebius}` include::{include-path}glebius.key[] === `{hrs}` include::{include-path}hrs.key[] === `{lwhsu}` include::{include-path}lwhsu.key[] === `{mat}` include::{include-path}mat.key[] === `{olivier}` include::{include-path}olivier.key[] === `{tcberner}` include::{include-path}tcberner.key[] [[pgpkeys-developers]] == Разработчики === `{jgh}` include::{include-path}jgh.key[] === `{ariff}` include::{include-path}ariff.key[] === `{tabthorpe}` include::{include-path}tabthorpe.key[] === `{eadler}` include::{include-path}eadler.key[] === `{pauamma}` include::{include-path}pauamma.key[] === `{shaun}` include::{include-path}shaun.key[] === `{brix}` include::{include-path}brix.key[] === `{mandree}` include::{include-path}mandree.key[] === `{will}` include::{include-path}will.key[] === `{dim}` include::{include-path}dim.key[] === `{anholt}` include::{include-path}anholt.key[] === `{fernape}` include::{include-path}fernape.key[] === `{mva}` include::{include-path}mva.key[] === `{araujo}` include::{include-path}araujo.key[] === `{mat}` include::{include-path}mat.key[] === `{syuu}` include::{include-path}syuu.key[] === `{asami}` include::{include-path}asami.key[] === `{jsa}` include::{include-path}jsa.key[] === `{jadawin}` include::{include-path}jadawin.key[] === `{jwb}` include::{include-path}jwb.key[] === `{dbaio}` include::{include-path}dbaio.key[] === `{timur}` include::{include-path}timur.key[] === `{jhb}` include::{include-path}jhb.key[] === `{gjb}` include::{include-path}gjb.key[] === `{snb}` include::{include-path}snb.key[] === `{barner}` include::{include-path}barner.key[] === `{lbartoletti}` include::{include-path}lbartoletti.key[] === `{art}` include::{include-path}art.key[] === `{tobez}` include::{include-path}tobez.key[] === `{damien}` include::{include-path}damien.key[] === `{bdragon}` include::{include-path}bdragon.key[] === `{tcberner}` include::{include-path}tcberner.key[] === `{tdb}` include::{include-path}tdb.key[] === `{mbr}` include::{include-path}mbr.key[] === `{bvs}` include::{include-path}bvs.key[] === `{jbo}` include::{include-path}jbo.key[] === `{novel}` include::{include-path}novel.key[] === `{garga}` include::{include-path}garga.key[] === `{kbowling}` include::{include-path}kbowling.key[] === `{alexbl}` include::{include-path}alexbl.key[] === `{ebrandi}` include::{include-path}ebrandi.key[] === `{harti}` include::{include-path}harti.key[] === `{obraun}` include::{include-path}obraun.key[] === `{makc}` include::{include-path}makc.key[] === `{jmb}` include::{include-path}jmb.key[] === `{dab}` include::{include-path}dab.key[] === `{antoine}` include::{include-path}antoine.key[] === `{db}` include::{include-path}db.key[] === `{brueffer}` include::{include-path}brueffer.key[] === `{markus}` include::{include-path}markus.key[] === `{br}` include::{include-path}br.key[] === `{jch}` include::{include-path}jch.key[] === `{jchandra}` include::{include-path}jchandra.key[] === `{jcamou}` include::{include-path}jcamou.key[] === `{acm}` include::{include-path}acm.key[] === `{olce}` include::{include-path}olce.key[] === `{gahr}` include::{include-path}gahr.key[] === `{dchagin}` include::{include-path}dchagin.key[] === `{perky}` include::{include-path}perky.key[] === `{jon}` include::{include-path}jon.key[] === `{jonathan}` include::{include-path}jonathan.key[] === `{loader}` include::{include-path}loader.key[] === `{luoqi}` include::{include-path}luoqi.key[] === `{ache}` include::{include-path}ache.key[] === `{melifaro}` include::{include-path}melifaro.key[] === `{cjh}` include::{include-path}cjh.key[] === `{davidch}` include::{include-path}davidch.key[] === `{milki}` include::{include-path}milki.key[] === `{cjc}` include::{include-path}cjc.key[] === `{marcus}` include::{include-path}marcus.key[] === `{fuz}` include::{include-path}fuz.key[] === `{nik}` include::{include-path}nik.key[] === `{benjsc}` include::{include-path}benjsc.key[] === `{lcook}` include::{include-path}lcook.key[] === `{ngie}` include::{include-path}ngie.key[] === `{rakuco}` include::{include-path}rakuco.key[] === `{alc}` include::{include-path}alc.key[] === `{olivier}` include::{include-path}olivier.key[] === `{dch}` include::{include-path}dch.key[] === `{bcran}` include::{include-path}bcran.key[] === `{cc}` include::{include-path}cc.key[] === `{culot}` include::{include-path}culot.key[] === `{alfredo}` include::{include-path}alfredo.key[] === `{bapt}` include::{include-path}bapt.key[] === `{ceri}` include::{include-path}ceri.key[] === `{edavis}` include::{include-path}edavis.key[] === `{alexey}` include::{include-path}alexey.key[] === `{bsd}` include::{include-path}bsd.key[] === `{carl}` include::{include-path}carl.key[] === `{carlavilla}` include::{include-path}carlavilla.key[] === `{vd}` include::{include-path}vd.key[] === `{rdivacky}` include::{include-path}rdivacky.key[] === `{danfe}` include::{include-path}danfe.key[] === `{dd}` include::{include-path}dd.key[] === `{bdrewery}` include::{include-path}bdrewery.key[] === `{gad}` include::{include-path}gad.key[] === `{kd}` include::{include-path}kd.key[] === `{olivierd}` include::{include-path}olivierd.key[] === `{bruno}` include::{include-path}bruno.key[] === `{ale}` include::{include-path}ale.key[] === `{jlduran}` include::{include-path}jlduran.key[] === `{nemysis}` include::{include-path}nemysis.key[] === `{peadar}` include::{include-path}peadar.key[] === `{deischen}` include::{include-path}deischen.key[] === `{diizzy}` include::{include-path}diizzy.key[] === `{ue}` include::{include-path}ue.key[] === `{madpilot}` include::{include-path}madpilot.key[] === `{rafan}` include::{include-path}rafan.key[] === `{kami}` include::{include-path}kami.key[] === `{farrokhi}` include::{include-path}farrokhi.key[] === `{jedgar}` include::{include-path}jedgar.key[] === `{mfechner}` include::{include-path}mfechner.key[] === `{feld}` include::{include-path}feld.key[] === `{green}` include::{include-path}green.key[] === `{fanf}` include::{include-path}fanf.key[] === `{blackend}` include::{include-path}blackend.key[] === `{petef}` include::{include-path}petef.key[] === `{decke}` include::{include-path}decke.key[] === `{landonf}` include::{include-path}landonf.key[] === `{billf}` include::{include-path}billf.key[] === `{grembo}` include::{include-path}grembo.key[] === `{sgalabov}` include::{include-path}sgalabov.key[] === `{kgalazka}` include::{include-path}kgalazka.key[] === `{avg}` include::{include-path}avg.key[] === `{tiga}` include::{include-path}tiga.key[] === `{beat}` include::{include-path}beat.key[] === `{sjg}` include::{include-path}sjg.key[] === `{gibbs}` include::{include-path}gibbs.key[] === `{pfg}` include::{include-path}pfg.key[] === `{girgen}` include::{include-path}girgen.key[] === `{eugen}` include::{include-path}eugen.key[] === `{pgollucci}` include::{include-path}pgollucci.key[] === `{trociny}` include::{include-path}trociny.key[] === `{dmgk}` include::{include-path}dmgk.key[] === `{daichi}` include::{include-path}daichi.key[] === `{grehan}` include::{include-path}grehan.key[] === `{jamie}` include::{include-path}jamie.key[] === `{adridg}` include::{include-path}adridg.key[] === `{wg}` include::{include-path}wg.key[] === `{bar}` include::{include-path}bar.key[] === `{jmg}` include::{include-path}jmg.key[] === `{mjg}` include::{include-path}mjg.key[] === `{jhale}` include::{include-path}jhale.key[] === `{jah}` include::{include-path}jah.key[] === `{dannyboy}` include::{include-path}dannyboy.key[] === `{dhartmei}` include::{include-path}dhartmei.key[] === `{ohauer}` include::{include-path}ohauer.key[] === `{ehaupt}` include::{include-path}ehaupt.key[] === `{jhay}` include::{include-path}jhay.key[] === `{bhd}` include::{include-path}bhd.key[] === `{sheldonh}` include::{include-path}sheldonh.key[] === `{mikeh}` include::{include-path}mikeh.key[] === `{mheinen}` include::{include-path}mheinen.key[] === `{niels}` include::{include-path}niels.key[] === `{ghelmer}` include::{include-path}ghelmer.key[] === `{mux}` include::{include-path}mux.key[] === `{wen}` include::{include-path}wen.key[] === `{dhn}` include::{include-path}dhn.key[] === `{jhibbits}` include::{include-path}jhibbits.key[] === `{jhixson}` include::{include-path}jhixson.key[] === `{pho}` include::{include-path}pho.key[] === `{oh}` include::{include-path}oh.key[] === `{mhorne}` include::{include-path}mhorne.key[] === `{bhughes}` include::{include-path}bhughes.key[] === `{sunpoet}` include::{include-path}sunpoet.key[] === `{lwhsu}` include::{include-path}lwhsu.key[] === `{foxfair}` include::{include-path}foxfair.key[] === `{whu}` include::{include-path}whu.key[] === `{chinsan}` include::{include-path}chinsan.key[] === `{zlei}` include::{include-path}zlei.key[] === `{davide}` include::{include-path}davide.key[] === `{jkh}` include::{include-path}jkh.key[] === `{versus}` include::{include-path}versus.key[] === `{pi}` include::{include-path}pi.key[] === `{weongyo}` include::{include-path}weongyo.key[] === `{peterj}` include::{include-path}peterj.key[] === `{jinmei}` include::{include-path}jinmei.key[] === `{ahze}` include::{include-path}ahze.key[] === `{markj}` include::{include-path}markj.key[] === `{trevor}` include::{include-path}trevor.key[] === `{erj}` include::{include-path}erj.key[] === `{allanjude}` include::{include-path}allanjude.key[] === `{bjk}` include::{include-path}bjk.key[] === `{phk}` include::{include-path}phk.key[] === `{pluknet}` include::{include-path}pluknet.key[] === `{cokane}` include::{include-path}cokane.key[] === `{karels}` include::{include-path}karels.key[] === `{kato}` include::{include-path}kato.key[] === `{vkashyap}` include::{include-path}vkashyap.key[] === `{pkubaj}` include::{include-path}pkubaj.key[] === `{kris}` include::{include-path}kris.key[] === `{keramida}` include::{include-path}keramida.key[] === `{fjoe}` include::{include-path}fjoe.key[] === `{manolis}` include::{include-path}manolis.key[] === `{stevek}` include::{include-path}stevek.key[] === `{jkim}` include::{include-path}jkim.key[] === `{zack}` include::{include-path}zack.key[] === `{akiyano}` include::{include-path}akiyano.key[] === `{jceel}` include::{include-path}jceel.key[] === `{andreas}` include::{include-path}andreas.key[] === `{kai}` include::{include-path}kai.key[] === `{corvink}` include::{include-path}corvink.key[] === `{jkois}` include::{include-path}jkois.key[] === `{sergei}` include::{include-path}sergei.key[] === `{maxim}` include::{include-path}maxim.key[] === `{taras}` include::{include-path}taras.key[] === `{tobik}` include::{include-path}tobik.key[] === `{jkoshy}` include::{include-path}jkoshy.key[] === `{wkoszek}` include::{include-path}wkoszek.key[] === `{ak}` include::{include-path}ak.key[] === `{gabor}` include::{include-path}gabor.key[] === `{anchie}` include::{include-path}anchie.key[] === `{rushani}` include::{include-path}rushani.key[] === `{kuriyama}` include::{include-path}kuriyama.key[] === `{rene}` include::{include-path}rene.key[] === `{jlaffaye}` include::{include-path}jlaffaye.key[] === `{clement}` include::{include-path}clement.key[] === `{mlaier}` include::{include-path}mlaier.key[] === `{martymac}` include::{include-path}martymac.key[] === `{glarkin}` include::{include-path}glarkin.key[] === `{dru}` include::{include-path}dru.key[] === `{lawrance}` include::{include-path}lawrance.key[] === `{njl}` include::{include-path}njl.key[] === `{jlh}` include::{include-path}jlh.key[] === `{leeym}` include::{include-path}leeym.key[] === `{sam}` include::{include-path}sam.key[] === `{jylefort}` include::{include-path}jylefort.key[] === `{grog}` include::{include-path}grog.key[] === `{oliver}` include::{include-path}oliver.key[] === `{netchild}` include::{include-path}netchild.key[] === `{leitao}` include::{include-path}leitao.key[] === `{ae}` include::{include-path}ae.key[] === `{lesi}` include::{include-path}lesi.key[] === `{achim}` include::{include-path}achim.key[] === `{cel}` include::{include-path}cel.key[] === `{glewis}` include::{include-path}glewis.key[] === `{vishwin}` include::{include-path}vishwin.key[] === `{delphij}` include::{include-path}delphij.key[] === `{avatar}` include::{include-path}avatar.key[] === `{ijliao}` include::{include-path}ijliao.key[] === `{rlibby}` include::{include-path}rlibby.key[] === `{pclin}` include::{include-path}pclin.key[] === `{yzlin}` include::{include-path}yzlin.key[] === `{linimon}` include::{include-path}linimon.key[] === `{arved}` include::{include-path}arved.key[] === `{dryice}` include::{include-path}dryice.key[] === `{nemoliu}` include::{include-path}nemoliu.key[] === `{kevlo}` include::{include-path}kevlo.key[] === `{zml}` include::{include-path}zml.key[] === `{nox}` include::{include-path}nox.key[] === `{avl}` include::{include-path}avl.key[] === `{scottl}` include::{include-path}scottl.key[] === `{rmacklem}` include::{include-path}rmacklem.key[] === `{vmaffione}` include::{include-path}vmaffione.key[] === `{bmah}` include::{include-path}bmah.key[] === `{rm}` include::{include-path}rm.key[] === `{mtm}` include::{include-path}mtm.key[] === `{dwmalone}` include::{include-path}dwmalone.key[] === `{christos}` include::{include-path}christos.key[] === `{marino}` include::{include-path}marino.key[] === `{emaste}` include::{include-path}emaste.key[] === `{cherry}` include::{include-path}cherry.key[] === `{matusita}` include::{include-path}matusita.key[] === `{mm}` include::{include-path}mm.key[] === `{sem}` include::{include-path}sem.key[] === `{rcm}` include::{include-path}rcm.key[] === `{mckusick}` include::{include-path}mckusick.key[] === `{tmclaugh}` include::{include-path}tmclaugh.key[] === `{jmelo}` include::{include-path}jmelo.key[] === `{mmel}` include::{include-path}mmel.key[] === `{jmmv}` include::{include-path}jmmv.key[] === `{kadesai}` include::{include-path}kadesai.key[] === `{ken}` include::{include-path}ken.key[] === `{markm}` include::{include-path}markm.key[] === `{dinoex}` include::{include-path}dinoex.key[] === `{sanpei}` include::{include-path}sanpei.key[] === `{rmh}` include::{include-path}rmh.key[] === `{driesm}` include::{include-path}driesm.key[] === `{jrm}` include::{include-path}jrm.key[] === `{freqlabs}` include::{include-path}freqlabs.key[] === `{mmoll}` include::{include-path}mmoll.key[] === `{cmt}` include::{include-path}cmt.key[] === `{stephen}` include::{include-path}stephen.key[] === `{marcel}` include::{include-path}marcel.key[] === `{dougm}` include::{include-path}dougm.key[] === `{kmoore}` include::{include-path}kmoore.key[] === `{marck}` include::{include-path}marck.key[] === `{mav}` include::{include-path}mav.key[] === `{rich}` include::{include-path}rich.key[] === `{knu}` include::{include-path}knu.key[] === `{tmm}` include::{include-path}tmm.key[] === `{max}` include::{include-path}max.key[] === `{maho}` include::{include-path}maho.key[] === `{yoichi}` include::{include-path}yoichi.key[] === `{bland}` include::{include-path}bland.key[] === `{gnn}` include::{include-path}gnn.key[] === `{khng}` include::{include-path}khng.key[] === `{simon}` include::{include-path}simon.key[] === `{rnoland}` include::{include-path}rnoland.key[] === `{anders}` include::{include-path}anders.key[] === `{lofi}` include::{include-path}lofi.key[] === `{obrien}` include::{include-path}obrien.key[] === `{olgeni}` include::{include-path}olgeni.key[] === `{philip}` include::{include-path}philip.key[] === `{jpaetzel}` include::{include-path}jpaetzel.key[] === `{zirias}` include::{include-path}zirias.key[] === `{hiren}` include::{include-path}hiren.key[] === `{hmp}` include::{include-path}hmp.key[] === `{fluffy}` include::{include-path}fluffy.key[] === `{sat}` include::{include-path}sat.key[] === `{np}` include::{include-path}np.key[] === `{royger}` include::{include-path}royger.key[] === `{rpaulo}` include::{include-path}rpaulo.key[] === `{misha}` include::{include-path}misha.key[] === `{dumbbell}` include::{include-path}dumbbell.key[] === `{rpokala}` include::{include-path}rpokala.key[] === `{mp}` include::{include-path}mp.key[] === `{roam}` include::{include-path}roam.key[] === `{den}` include::{include-path}den.key[] === `{csjp}` include::{include-path}csjp.key[] === `{grahamperrin}` include::{include-path}grahamperrin.key[] === `{gerald}` include::{include-path}gerald.key[] === `{scottph}` include::{include-path}scottph.key[] === `{jacula}` include::{include-path}jacula.key[] === `{0mp}` include::{include-path}0mp.key[] === `{jdp}` include::{include-path}jdp.key[] === `{krion}` include::{include-path}krion.key[] === `{vladlen}` include::{include-path}vladlen.key[] === `{sepotvin}` include::{include-path}sepotvin.key[] === `{cpm}` include::{include-path}cpm.key[] === `{markp}` include::{include-path}markp.key[] === `{alepulver}` include::{include-path}alepulver.key[] === `{kp}` include::{include-path}kp.key[] === `{thomas}` include::{include-path}thomas.key[] === `{hq}` include::{include-path}hq.key[] === `{bofh}` include::{include-path}bofh.key[] === `{fox}` include::{include-path}fox.key[] === `{lbr}` include::{include-path}lbr.key[] === `{crees}` include::{include-path}crees.key[] === `{rees}` include::{include-path}rees.key[] === `{mr}` include::{include-path}mr.key[] === `{bcr}` include::{include-path}bcr.key[] === `{trhodes}` include::{include-path}trhodes.key[] === `{benno}` include::{include-path}benno.key[] === `{beech}` include::{include-path}beech.key[] === `{roberto}` include::{include-path}roberto.key[] === `{rodrigc}` include::{include-path}rodrigc.key[] === `{michaelo}` include::{include-path}michaelo.key[] === `{igoro}` include::{include-path}igoro.key[] === `{dtxdf}` include::{include-path}dtxdf.key[] === `{ler}` include::{include-path}ler.key[] === `{leres}` include::{include-path}leres.key[] === `{robak}` include::{include-path}robak.key[] === `{guido}` include::{include-path}guido.key[] === `{rea}` include::{include-path}rea.key[] === `{ray}` include::{include-path}ray.key[] === `{niklas}` include::{include-path}niklas.key[] === `{salvadore}` include::{include-path}salvadore.key[] === `{bsam}` include::{include-path}bsam.key[] === `{marks}` include::{include-path}marks.key[] === `{bschmidt}` include::{include-path}bschmidt.key[] === `{wosch}` include::{include-path}wosch.key[] === `{cy}` include::{include-path}cy.key[] === `{das}` include::{include-path}das.key[] === `{scheidell}` include::{include-path}scheidell.key[] === `{matthew}` include::{include-path}matthew.key[] === `{tmseck}` include::{include-path}tmseck.key[] === `{johans}` include::{include-path}johans.key[] === `{bakul}` include::{include-path}bakul.key[] === `{gshapiro}` include::{include-path}gshapiro.key[] === `{wxs}` include::{include-path}wxs.key[] === `{nork}` include::{include-path}nork.key[] === `{syrinx}` include::{include-path}syrinx.key[] === `{vanilla}` include::{include-path}vanilla.key[] === `{ashafer}` include::{include-path}ashafer.key[] === `{ashish}` include::{include-path}ashish.key[] === `{asiciliano}` include::{include-path}asiciliano.key[] === `{chs}` include::{include-path}chs.key[] === `{bms}` include::{include-path}bms.key[] === `{demon}` include::{include-path}demon.key[] === `{jesper}` include::{include-path}jesper.key[] === `{scop}` include::{include-path}scop.key[] === `{anray}` include::{include-path}anray.key[] === `{flo}` include::{include-path}flo.key[] === `{glebius}` include::{include-path}glebius.key[] === `{kensmith}` include::{include-path}kensmith.key[] === `{ben}` include::{include-path}ben.key[] === `{des}` include::{include-path}des.key[] === `{sobomax}` include::{include-path}sobomax.key[] === `{asomers}` include::{include-path}asomers.key[] === `{brian}` include::{include-path}brian.key[] === `{sson}` include::{include-path}sson.key[] === `{nsouch}` include::{include-path}nsouch.key[] === `{ssouhlal}` include::{include-path}ssouhlal.key[] === `{loos}` include::{include-path}loos.key[] === `{brnrd}` include::{include-path}brnrd.key[] === `{rink}` include::{include-path}rink.key[] === `{vsevolod}` include::{include-path}vsevolod.key[] === `{pstef}` include::{include-path}pstef.key[] === `{zi}` include::{include-path}zi.key[] === `{lstewart}` include::{include-path}lstewart.key[] === `{murray}` include::{include-path}murray.key[] === `{vs}` include::{include-path}vs.key[] === `{xride}` include::{include-path}xride.key[] === `{marius}` include::{include-path}marius.key[] === `{cs}` include::{include-path}cs.key[] === `{clsung}` include::{include-path}clsung.key[] === `{gsutter}` include::{include-path}gsutter.key[] === `{metal}` include::{include-path}metal.key[] === `{ryusuke}` include::{include-path}ryusuke.key[] === `{nyan}` include::{include-path}nyan.key[] === `{sahil}` include::{include-path}sahil.key[] === `{tota}` include::{include-path}tota.key[] === `{romain}` include::{include-path}romain.key[] === `{eduardo}` include::{include-path}eduardo.key[] === `{sylvio}` include::{include-path}sylvio.key[] === `{itetcu}` include::{include-path}itetcu.key[] === `{mi}` include::{include-path}mi.key[] === `{gordon}` include::{include-path}gordon.key[] === `{lth}` include::{include-path}lth.key[] === `{fabient}` include::{include-path}fabient.key[] === `{thierry}` include::{include-path}thierry.key[] === `{thompsa}` include::{include-path}thompsa.key[] === `{flz}` include::{include-path}flz.key[] === `{jilles}` include::{include-path}jilles.key[] === `{ganbold}` include::{include-path}ganbold.key[] === `{tuexen}` include::{include-path}tuexen.key[] === `{gonzo}` include::{include-path}gonzo.key[] === `{uzsolt}` include::{include-path}uzsolt.key[] === `{ume}` include::{include-path}ume.key[] === `{ups}` include::{include-path}ups.key[] === `{fsu}` include::{include-path}fsu.key[] === `{mikael}` include::{include-path}mikael.key[] === `{manu}` include::{include-path}manu.key[] === `{ram}` include::{include-path}ram.key[] === `{bryanv}` include::{include-path}bryanv.key[] === `{nectar}` include::{include-path}nectar.key[] === `{avilla}` include::{include-path}avilla.key[] === `{nivit}` include::{include-path}nivit.key[] === `{ivoras}` include::{include-path}ivoras.key[] === `{stefan}` include::{include-path}stefan.key[] === `{kaiw}` include::{include-path}kaiw.key[] === `{adamw}` include::{include-path}adamw.key[] === `{naddy}` include::{include-path}naddy.key[] === `{peter}` include::{include-path}peter.key[] === `{nwhitehorn}` include::{include-path}nwhitehorn.key[] === `{obiwac}` include::{include-path}obiwac.key[] === `{miwi}` include::{include-path}miwi.key[] === `{nate}` include::{include-path}nate.key[] === `{twinterg}` include::{include-path}twinterg.key[] === `{def}` include::{include-path}def.key[] === `{wollman}` include::{include-path}wollman.key[] === `{joerg}` include::{include-path}joerg.key[] === `{ygy}` include::{include-path}ygy.key[] === `{emax}` include::{include-path}emax.key[] === `{oshogbo}` include::{include-path}oshogbo.key[] === `{andy}` include::{include-path}andy.key[] === `{riggs}` include::{include-path}riggs.key[] === `{egypcio}` include::{include-path}egypcio.key[] === `{bz}` include::{include-path}bz.key[] === `{dsl}` include::{include-path}dsl.key[] === `{zeising}` include::{include-path}zeising.key[] === `{phantom}` include::{include-path}phantom.key[] === `{tz}` include::{include-path}tz.key[] === `{rigoletto}` include::{include-path}rigoletto.key[] === `{kaktus}` include::{include-path}kaktus.key[] === `{samm}` include::{include-path}samm.key[] === `{arrowd}` include::{include-path}arrowd.key[] === `{ronald}` include::{include-path}ronald.key[] === `{meta}` include::{include-path}meta.key[] === `{rnagy}` include::{include-path}rnagy.key[] === `{vvd}` include::{include-path}vvd.key[] === `{gbe}` include::{include-path}gbe.key[] === `{bnovkov}` include::{include-path}bnovkov.key[] === `{ivy}` include::{include-path}ivy.key[] === `{khorben}` include::{include-path}khorben.key[] === `{vexeduxr}` include::{include-path}vexeduxr.key[] === `{alven}` include::{include-path}alven.key[] === `{pouria}` include::{include-path}pouria.key[] === `{siva}` include::{include-path}siva.key[] -=== `{nxjoseph}` -include::{include-path}nxjoseph.key[] - [[pgpkeys-other]] == Другие владельцы учётных записей === `{bk}` include::{include-path}bk.key[] === `{deb}` include::{include-path}deb.key[] === `{debdrup}` include::{include-path}debdrup.key[] === `{dutchdaemon}` include::{include-path}dutchdaemon.key[] === `{keymaster}` include::{include-path}keymaster.key[] === `{mwlucas}` include::{include-path}mwlucas.key[] === `{dhw}` include::{include-path}dhw.key[] === `{tpearson}` include::{include-path}tpearson.key[] diff --git a/documentation/content/ru/articles/pgpkeys/_index.po b/documentation/content/ru/articles/pgpkeys/_index.po index bdb214237e..3e9f5bc72e 100644 --- a/documentation/content/ru/articles/pgpkeys/_index.po +++ b/documentation/content/ru/articles/pgpkeys/_index.po @@ -1,3052 +1,3045 @@ # SOME DESCRIPTIVE TITLE # Copyright (C) YEAR The FreeBSD Project # This file is distributed under the same license as the FreeBSD Documentation package. # Vladlen Popolitov , 2025, 2026. msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" -"POT-Creation-Date: 2026-02-27 19:31+0300\n" +"POT-Creation-Date: 2026-02-22 15:58+0000\n" "PO-Revision-Date: 2026-02-25 04:45+0000\n" "Last-Translator: Vladlen Popolitov \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 4.17\n" #. type: YAML Front Matter: description #: documentation/content/en/articles/pgpkeys/_index.adoc:1 #, no-wrap msgid "List of OpenPGP keys that can be used to verify a signature or send encrypted email to FreeBSD.org officers or developers." msgstr "Список OpenPGP-ключей, которые можно использовать для проверки подписей или отправки зашифрованной электронной почты офицерам или разработчикам FreeBSD.org." #. type: Title = #: documentation/content/en/articles/pgpkeys/_index.adoc:1 #: documentation/content/en/articles/pgpkeys/_index.adoc:7 #, no-wrap msgid "OpenPGP Keys" msgstr "Ключи OpenPGP" #. type: Plain text #: documentation/content/en/articles/pgpkeys/_index.adoc:45 msgid "'''" msgstr "'''" #. type: Plain text #: documentation/content/en/articles/pgpkeys/_index.adoc:50 msgid "" "These OpenPGP keys can be used to verify a signature or send encrypted email " "to `FreeBSD.org` officers or developers. The complete keyring can be " -"downloaded at link:https://docs.FreeBSD.org/pgpkeys/" -"pgpkeys.txt[pgpkeyring.txt]." +"downloaded at link:https://docs.FreeBSD.org/pgpkeys/pgpkeys.txt[pgpkeyring." +"txt]." msgstr "" "Эти OpenPGP-ключи можно использовать для проверки подписи или отправки " "зашифрованной электронной почты офицерам или разработчикам `FreeBSD.org`. " "Полный набор ключей можно загрузить по ссылке link:https://docs.FreeBSD.org/" "pgpkeys/pgpkeys.txt[pgpkeyring.txt]." # # #. Do not edit this file except as instructed by the addkey.sh script. #. See the README file in /data/pgpkeys for instructions. #. This article contains all the keys. The officer keys are also #. shown in the Handbook PGP keys chapter. #. type: Title == #: documentation/content/en/articles/pgpkeys/_index.adoc:61 #, no-wrap msgid "Officers" msgstr "Офицеры" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:63 #, no-wrap msgid "{security-officer-name} `<{security-officer-email}>`" msgstr "{security-officer-name} `<{security-officer-email}>`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:66 #, no-wrap msgid "{core-secretary-name} `<{core-secretary-email}>`" msgstr "{core-secretary-name} `<{core-secretary-email}>`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:69 #, no-wrap msgid "{portmgr-secretary-name} `<{portmgr-secretary-email}>`" msgstr "{portmgr-secretary-name} `<{portmgr-secretary-email}>`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:72 #, no-wrap msgid "{doceng-secretary-name} `<{doceng-secretary-email}>`" msgstr "{doceng-secretary-name} `<{doceng-secretary-email}>`" #. type: Title == #: documentation/content/en/articles/pgpkeys/_index.adoc:76 #, no-wrap msgid "Core Team Members" msgstr "Участники Основной команды (Core Team)" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:78 #: documentation/content/en/articles/pgpkeys/_index.adoc:648 #, no-wrap msgid "`{allanjude}`" msgstr "`{allanjude}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:81 #: documentation/content/en/articles/pgpkeys/_index.adoc:339 #, no-wrap msgid "`{dch}`" msgstr "`{dch}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:84 #: documentation/content/en/articles/pgpkeys/_index.adoc:1257 #, no-wrap msgid "`{glebius}`" msgstr "`{glebius}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:87 #, no-wrap msgid "`{hrs}`" msgstr "`{hrs}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:90 #: documentation/content/en/articles/pgpkeys/_index.adoc:600 #, no-wrap msgid "`{lwhsu}`" msgstr "`{lwhsu}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:93 #: documentation/content/en/articles/pgpkeys/_index.adoc:147 #, no-wrap msgid "`{mat}`" msgstr "`{mat}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:96 #: documentation/content/en/articles/pgpkeys/_index.adoc:336 #, no-wrap msgid "`{olivier}`" msgstr "`{olivier}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:99 #: documentation/content/en/articles/pgpkeys/_index.adoc:198 #, no-wrap msgid "`{tcberner}`" msgstr "`{tcberner}`" #. type: Title == #: documentation/content/en/articles/pgpkeys/_index.adoc:103 #, no-wrap msgid "Developers" msgstr "Разработчики" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:105 #, no-wrap msgid "`{jgh}`" msgstr "`{jgh}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:108 #, no-wrap msgid "`{ariff}`" msgstr "`{ariff}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:111 #, no-wrap msgid "`{tabthorpe}`" msgstr "`{tabthorpe}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:114 #, no-wrap msgid "`{eadler}`" msgstr "`{eadler}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:117 #, no-wrap msgid "`{pauamma}`" msgstr "`{pauamma}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:120 #, no-wrap msgid "`{shaun}`" msgstr "`{shaun}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:123 #, no-wrap msgid "`{brix}`" msgstr "`{brix}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:126 #, no-wrap msgid "`{mandree}`" msgstr "`{mandree}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:129 #, no-wrap msgid "`{will}`" msgstr "`{will}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:132 #, no-wrap msgid "`{dim}`" msgstr "`{dim}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:135 #, no-wrap msgid "`{anholt}`" msgstr "`{anholt}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:138 #, no-wrap msgid "`{fernape}`" msgstr "`{fernape}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:141 #, no-wrap msgid "`{mva}`" msgstr "`{mva}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:144 #, no-wrap msgid "`{araujo}`" msgstr "`{araujo}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:150 #, no-wrap msgid "`{syuu}`" msgstr "`{syuu}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:153 #, no-wrap msgid "`{asami}`" msgstr "`{asami}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:156 #, no-wrap msgid "`{jsa}`" msgstr "`{jsa}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:159 #, no-wrap msgid "`{jadawin}`" msgstr "`{jadawin}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:162 #, no-wrap msgid "`{jwb}`" msgstr "`{jwb}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:165 #, no-wrap msgid "`{dbaio}`" msgstr "`{dbaio}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:168 #, no-wrap msgid "`{timur}`" msgstr "`{timur}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:171 #, no-wrap msgid "`{jhb}`" msgstr "`{jhb}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:174 #, no-wrap msgid "`{gjb}`" msgstr "`{gjb}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:177 #, no-wrap msgid "`{snb}`" msgstr "`{snb}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:180 #, no-wrap msgid "`{barner}`" msgstr "`{barner}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:183 #, no-wrap msgid "`{lbartoletti}`" msgstr "`{lbartoletti}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:186 #, no-wrap msgid "`{art}`" msgstr "`{art}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:189 #, no-wrap msgid "`{tobez}`" msgstr "`{tobez}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:192 #, no-wrap msgid "`{damien}`" msgstr "`{damien}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:195 #, no-wrap msgid "`{bdragon}`" msgstr "`{bdragon}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:201 #, no-wrap msgid "`{tdb}`" msgstr "`{tdb}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:204 #, no-wrap msgid "`{mbr}`" msgstr "`{mbr}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:207 #, no-wrap msgid "`{bvs}`" msgstr "`{bvs}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:210 #, no-wrap msgid "`{jbo}`" msgstr "`{jbo}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:213 #, no-wrap msgid "`{novel}`" msgstr "`{novel}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:216 #, no-wrap msgid "`{garga}`" msgstr "`{garga}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:219 #, no-wrap msgid "`{kbowling}`" msgstr "`{kbowling}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:222 #, no-wrap msgid "`{alexbl}`" msgstr "`{alexbl}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:225 #, no-wrap msgid "`{ebrandi}`" msgstr "`{ebrandi}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:228 #, no-wrap msgid "`{harti}`" msgstr "`{harti}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:231 #, no-wrap msgid "`{obraun}`" msgstr "`{obraun}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:234 #, no-wrap msgid "`{makc}`" msgstr "`{makc}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:237 #, no-wrap msgid "`{jmb}`" msgstr "`{jmb}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:240 #, no-wrap msgid "`{dab}`" msgstr "`{dab}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:243 #, no-wrap msgid "`{antoine}`" msgstr "`{antoine}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:246 #, no-wrap msgid "`{db}`" msgstr "`{db}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:249 #, no-wrap msgid "`{brueffer}`" msgstr "`{brueffer}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:252 #, no-wrap msgid "`{markus}`" msgstr "`{markus}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:255 #, no-wrap msgid "`{br}`" msgstr "`{br}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:258 #, no-wrap msgid "`{jch}`" msgstr "`{jch}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:261 #, no-wrap msgid "`{jchandra}`" msgstr "`{jchandra}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:264 #, no-wrap msgid "`{jcamou}`" msgstr "`{jcamou}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:267 #, no-wrap msgid "`{acm}`" msgstr "`{acm}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:270 #, no-wrap msgid "`{olce}`" msgstr "`{olce}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:273 #, no-wrap msgid "`{gahr}`" msgstr "`{gahr}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:276 #, no-wrap msgid "`{dchagin}`" msgstr "`{dchagin}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:279 #, no-wrap msgid "`{perky}`" msgstr "`{perky}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:282 #, no-wrap msgid "`{jon}`" msgstr "`{jon}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:285 #, no-wrap msgid "`{jonathan}`" msgstr "`{jonathan}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:288 #, no-wrap msgid "`{loader}`" msgstr "`{loader}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:291 #, no-wrap msgid "`{luoqi}`" msgstr "`{luoqi}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:294 #, no-wrap msgid "`{ache}`" msgstr "`{ache}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:297 #, no-wrap msgid "`{melifaro}`" msgstr "`{melifaro}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:300 #, no-wrap msgid "`{cjh}`" msgstr "`{cjh}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:303 #, no-wrap msgid "`{davidch}`" msgstr "`{davidch}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:306 #, no-wrap msgid "`{milki}`" msgstr "`{milki}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:309 #, no-wrap msgid "`{cjc}`" msgstr "`{cjc}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:312 #, no-wrap msgid "`{marcus}`" msgstr "`{marcus}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:315 #, no-wrap msgid "`{fuz}`" msgstr "`{fuz}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:318 #, no-wrap msgid "`{nik}`" msgstr "`{nik}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:321 #, no-wrap msgid "`{benjsc}`" msgstr "`{benjsc}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:324 #, no-wrap msgid "`{lcook}`" msgstr "`{lcook}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:327 #, no-wrap msgid "`{ngie}`" msgstr "`{ngie}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:330 #, no-wrap msgid "`{rakuco}`" msgstr "`{rakuco}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:333 #, no-wrap msgid "`{alc}`" msgstr "`{alc}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:342 #, no-wrap msgid "`{bcran}`" msgstr "`{bcran}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:345 #, no-wrap msgid "`{cc}`" msgstr "`{cc}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:348 #, no-wrap msgid "`{culot}`" msgstr "`{culot}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:351 #, no-wrap msgid "`{alfredo}`" msgstr "`{alfredo}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:354 #, no-wrap msgid "`{bapt}`" msgstr "`{bapt}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:357 #, no-wrap msgid "`{ceri}`" msgstr "`{ceri}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:360 #, no-wrap msgid "`{edavis}`" msgstr "`{edavis}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:363 #, no-wrap msgid "`{alexey}`" msgstr "`{alexey}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:366 #, no-wrap msgid "`{bsd}`" msgstr "`{bsd}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:369 #, no-wrap msgid "`{carl}`" msgstr "`{carl}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:372 #, no-wrap msgid "`{carlavilla}`" msgstr "`{carlavilla}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:375 #, no-wrap msgid "`{vd}`" msgstr "`{vd}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:378 #, no-wrap msgid "`{rdivacky}`" msgstr "`{rdivacky}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:381 #, no-wrap msgid "`{danfe}`" msgstr "`{danfe}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:384 #, no-wrap msgid "`{dd}`" msgstr "`{dd}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:387 #, no-wrap msgid "`{bdrewery}`" msgstr "`{bdrewery}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:390 #, no-wrap msgid "`{gad}`" msgstr "`{gad}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:393 #, no-wrap msgid "`{kd}`" msgstr "`{kd}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:396 #, no-wrap msgid "`{olivierd}`" msgstr "`{olivierd}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:399 #, no-wrap msgid "`{bruno}`" msgstr "`{bruno}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:402 #, no-wrap msgid "`{ale}`" msgstr "`{ale}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:405 #, no-wrap msgid "`{jlduran}`" msgstr "`{jlduran}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:408 #, no-wrap msgid "`{nemysis}`" msgstr "`{nemysis}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:411 #, no-wrap msgid "`{peadar}`" msgstr "`{peadar}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:414 #, no-wrap msgid "`{deischen}`" msgstr "`{deischen}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:417 #, no-wrap msgid "`{diizzy}`" msgstr "`{diizzy}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:420 #, no-wrap msgid "`{ue}`" msgstr "`{ue}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:423 #, no-wrap msgid "`{madpilot}`" msgstr "`{madpilot}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:426 #, no-wrap msgid "`{rafan}`" msgstr "`{rafan}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:429 #, no-wrap msgid "`{kami}`" msgstr "`{kami}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:432 #, no-wrap msgid "`{farrokhi}`" msgstr "`{farrokhi}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:435 #, no-wrap msgid "`{jedgar}`" msgstr "`{jedgar}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:438 #, no-wrap msgid "`{mfechner}`" msgstr "`{mfechner}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:441 #, no-wrap msgid "`{feld}`" msgstr "`{feld}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:444 #, no-wrap msgid "`{green}`" msgstr "`{green}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:447 #, no-wrap msgid "`{fanf}`" msgstr "`{fanf}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:450 #, no-wrap msgid "`{blackend}`" msgstr "`{blackend}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:453 #, no-wrap msgid "`{petef}`" msgstr "`{petef}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:456 #, no-wrap msgid "`{decke}`" msgstr "`{decke}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:459 #, no-wrap msgid "`{landonf}`" msgstr "`{landonf}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:462 #, no-wrap msgid "`{billf}`" msgstr "`{billf}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:465 #, no-wrap msgid "`{grembo}`" msgstr "`{grembo}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:468 #, no-wrap msgid "`{sgalabov}`" msgstr "`{sgalabov}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:471 #, no-wrap msgid "`{kgalazka}`" msgstr "`{kgalazka}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:474 #, no-wrap msgid "`{avg}`" msgstr "`{avg}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:477 #, no-wrap msgid "`{tiga}`" msgstr "`{tiga}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:480 #, no-wrap msgid "`{beat}`" msgstr "`{beat}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:483 #, no-wrap msgid "`{sjg}`" msgstr "`{sjg}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:486 #, no-wrap msgid "`{gibbs}`" msgstr "`{gibbs}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:489 #, no-wrap msgid "`{pfg}`" msgstr "`{pfg}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:492 #, no-wrap msgid "`{girgen}`" msgstr "`{girgen}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:495 #, no-wrap msgid "`{eugen}`" msgstr "`{eugen}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:498 #, no-wrap msgid "`{pgollucci}`" msgstr "`{pgollucci}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:501 #, no-wrap msgid "`{trociny}`" msgstr "`{trociny}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:504 #, no-wrap msgid "`{dmgk}`" msgstr "`{dmgk}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:507 #, no-wrap msgid "`{daichi}`" msgstr "`{daichi}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:510 #, no-wrap msgid "`{grehan}`" msgstr "`{grehan}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:513 #, no-wrap msgid "`{jamie}`" msgstr "`{jamie}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:516 #, no-wrap msgid "`{adridg}`" msgstr "`{adridg}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:519 #, no-wrap msgid "`{wg}`" msgstr "`{wg}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:522 #, no-wrap msgid "`{bar}`" msgstr "`{bar}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:525 #, no-wrap msgid "`{jmg}`" msgstr "`{jmg}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:528 #, no-wrap msgid "`{mjg}`" msgstr "`{mjg}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:531 #, no-wrap msgid "`{jhale}`" msgstr "`{jhale}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:534 #, no-wrap msgid "`{jah}`" msgstr "`{jah}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:537 #, no-wrap msgid "`{dannyboy}`" msgstr "`{dannyboy}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:540 #, no-wrap msgid "`{dhartmei}`" msgstr "`{dhartmei}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:543 #, no-wrap msgid "`{ohauer}`" msgstr "`{ohauer}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:546 #, no-wrap msgid "`{ehaupt}`" msgstr "`{ehaupt}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:549 #, no-wrap msgid "`{jhay}`" msgstr "`{jhay}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:552 #, no-wrap msgid "`{bhd}`" msgstr "`{bhd}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:555 #, no-wrap msgid "`{sheldonh}`" msgstr "`{sheldonh}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:558 #, no-wrap msgid "`{mikeh}`" msgstr "`{mikeh}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:561 #, no-wrap msgid "`{mheinen}`" msgstr "`{mheinen}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:564 #, no-wrap msgid "`{niels}`" msgstr "`{niels}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:567 #, no-wrap msgid "`{ghelmer}`" msgstr "`{ghelmer}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:570 #, no-wrap msgid "`{mux}`" msgstr "`{mux}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:573 #, no-wrap msgid "`{wen}`" msgstr "`{wen}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:576 #, no-wrap msgid "`{dhn}`" msgstr "`{dhn}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:579 #, no-wrap msgid "`{jhibbits}`" msgstr "`{jhibbits}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:582 #, no-wrap msgid "`{jhixson}`" msgstr "`{jhixson}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:585 #, no-wrap msgid "`{pho}`" msgstr "`{pho}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:588 #, no-wrap msgid "`{oh}`" msgstr "`{oh}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:591 #, no-wrap msgid "`{mhorne}`" msgstr "`{mhorne}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:594 #, no-wrap msgid "`{bhughes}`" msgstr "`{bhughes}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:597 #, no-wrap msgid "`{sunpoet}`" msgstr "`{sunpoet}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:603 #, no-wrap msgid "`{foxfair}`" msgstr "`{foxfair}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:606 #, no-wrap msgid "`{whu}`" msgstr "`{whu}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:609 #, no-wrap msgid "`{chinsan}`" msgstr "`{chinsan}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:612 #, no-wrap msgid "`{zlei}`" msgstr "`{zlei}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:615 #, no-wrap msgid "`{davide}`" msgstr "`{davide}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:618 #, no-wrap msgid "`{jkh}`" msgstr "`{jkh}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:621 #, no-wrap msgid "`{versus}`" msgstr "`{versus}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:624 #, no-wrap msgid "`{pi}`" msgstr "`{pi}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:627 #, no-wrap msgid "`{weongyo}`" msgstr "`{weongyo}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:630 #, no-wrap msgid "`{peterj}`" msgstr "`{peterj}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:633 #, no-wrap msgid "`{jinmei}`" msgstr "`{jinmei}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:636 #, no-wrap msgid "`{ahze}`" msgstr "`{ahze}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:639 #, no-wrap msgid "`{markj}`" msgstr "`{markj}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:642 #, no-wrap msgid "`{trevor}`" msgstr "`{trevor}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:645 #, no-wrap msgid "`{erj}`" msgstr "`{erj}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:651 #, no-wrap msgid "`{bjk}`" msgstr "`{bjk}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:654 #, no-wrap msgid "`{phk}`" msgstr "`{phk}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:657 #, no-wrap msgid "`{pluknet}`" msgstr "`{pluknet}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:660 #, no-wrap msgid "`{cokane}`" msgstr "`{cokane}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:663 #, no-wrap msgid "`{karels}`" msgstr "`{karels}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:666 #, no-wrap msgid "`{kato}`" msgstr "`{kato}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:669 #, no-wrap msgid "`{vkashyap}`" msgstr "`{vkashyap}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:672 #, no-wrap msgid "`{pkubaj}`" msgstr "`{pkubaj}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:675 #, no-wrap msgid "`{kris}`" msgstr "`{kris}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:678 #, no-wrap msgid "`{keramida}`" msgstr "`{keramida}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:681 #, no-wrap msgid "`{fjoe}`" msgstr "`{fjoe}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:684 #, no-wrap msgid "`{manolis}`" msgstr "`{manolis}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:687 #, no-wrap msgid "`{stevek}`" msgstr "`{stevek}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:690 #, no-wrap msgid "`{jkim}`" msgstr "`{jkim}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:693 #, no-wrap msgid "`{zack}`" msgstr "`{zack}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:696 #, no-wrap msgid "`{akiyano}`" msgstr "`{akiyano}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:699 #, no-wrap msgid "`{jceel}`" msgstr "`{jceel}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:702 #, no-wrap msgid "`{andreas}`" msgstr "`{andreas}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:705 #, no-wrap msgid "`{kai}`" msgstr "`{kai}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:708 #, no-wrap msgid "`{corvink}`" msgstr "`{corvink}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:711 #, no-wrap msgid "`{jkois}`" msgstr "`{jkois}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:714 #, no-wrap msgid "`{sergei}`" msgstr "`{sergei}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:717 #, no-wrap msgid "`{maxim}`" msgstr "`{maxim}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:720 #, no-wrap msgid "`{taras}`" msgstr "`{taras}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:723 #, no-wrap msgid "`{tobik}`" msgstr "`{tobik}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:726 #, no-wrap msgid "`{jkoshy}`" msgstr "`{jkoshy}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:729 #, no-wrap msgid "`{wkoszek}`" msgstr "`{wkoszek}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:732 #, no-wrap msgid "`{ak}`" msgstr "`{ak}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:735 #, no-wrap msgid "`{gabor}`" msgstr "`{gabor}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:738 #, no-wrap msgid "`{anchie}`" msgstr "`{anchie}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:741 #, no-wrap msgid "`{rushani}`" msgstr "`{rushani}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:744 #, no-wrap msgid "`{kuriyama}`" msgstr "`{kuriyama}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:747 #, no-wrap msgid "`{rene}`" msgstr "`{rene}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:750 #, no-wrap msgid "`{jlaffaye}`" msgstr "`{jlaffaye}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:753 #, no-wrap msgid "`{clement}`" msgstr "`{clement}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:756 #, no-wrap msgid "`{mlaier}`" msgstr "`{mlaier}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:759 #, no-wrap msgid "`{martymac}`" msgstr "`{martymac}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:762 #, no-wrap msgid "`{glarkin}`" msgstr "`{glarkin}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:765 #, no-wrap msgid "`{dru}`" msgstr "`{dru}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:768 #, no-wrap msgid "`{lawrance}`" msgstr "`{lawrance}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:771 #, no-wrap msgid "`{njl}`" msgstr "`{njl}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:774 #, no-wrap msgid "`{jlh}`" msgstr "`{jlh}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:777 #, no-wrap msgid "`{leeym}`" msgstr "`{leeym}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:780 #, no-wrap msgid "`{sam}`" msgstr "`{sam}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:783 #, no-wrap msgid "`{jylefort}`" msgstr "`{jylefort}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:786 #, no-wrap msgid "`{grog}`" msgstr "`{grog}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:789 #, no-wrap msgid "`{oliver}`" msgstr "`{oliver}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:792 #, no-wrap msgid "`{netchild}`" msgstr "`{netchild}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:795 #, no-wrap msgid "`{leitao}`" msgstr "`{leitao}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:798 #, no-wrap msgid "`{ae}`" msgstr "`{ae}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:801 #, no-wrap msgid "`{lesi}`" msgstr "`{lesi}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:804 #, no-wrap msgid "`{achim}`" msgstr "`{achim}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:807 #, no-wrap msgid "`{cel}`" msgstr "`{cel}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:810 #, no-wrap msgid "`{glewis}`" msgstr "`{glewis}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:813 #, no-wrap msgid "`{vishwin}`" msgstr "`{vishwin}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:816 #, no-wrap msgid "`{delphij}`" msgstr "`{delphij}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:819 #, no-wrap msgid "`{avatar}`" msgstr "`{avatar}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:822 #, no-wrap msgid "`{ijliao}`" msgstr "`{ijliao}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:825 #, no-wrap msgid "`{rlibby}`" msgstr "`{rlibby}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:828 #, no-wrap msgid "`{pclin}`" msgstr "`{pclin}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:831 #, no-wrap msgid "`{yzlin}`" msgstr "`{yzlin}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:834 #, no-wrap msgid "`{linimon}`" msgstr "`{linimon}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:837 #, no-wrap msgid "`{arved}`" msgstr "`{arved}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:840 #, no-wrap msgid "`{dryice}`" msgstr "`{dryice}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:843 #, no-wrap msgid "`{nemoliu}`" msgstr "`{nemoliu}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:846 #, no-wrap msgid "`{kevlo}`" msgstr "`{kevlo}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:849 #, no-wrap msgid "`{zml}`" msgstr "`{zml}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:852 #, no-wrap msgid "`{nox}`" msgstr "`{nox}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:855 #, no-wrap msgid "`{avl}`" msgstr "`{avl}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:858 #, no-wrap msgid "`{scottl}`" msgstr "`{scottl}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:861 #, no-wrap msgid "`{rmacklem}`" msgstr "`{rmacklem}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:864 #, no-wrap msgid "`{vmaffione}`" msgstr "`{vmaffione}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:867 #, no-wrap msgid "`{bmah}`" msgstr "`{bmah}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:870 #, no-wrap msgid "`{rm}`" msgstr "`{rm}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:873 #, no-wrap msgid "`{mtm}`" msgstr "`{mtm}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:876 #, no-wrap msgid "`{dwmalone}`" msgstr "`{dwmalone}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:879 #, no-wrap msgid "`{christos}`" msgstr "`{christos}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:882 #, no-wrap msgid "`{marino}`" msgstr "`{marino}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:885 #, no-wrap msgid "`{emaste}`" msgstr "`{emaste}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:888 #, no-wrap msgid "`{cherry}`" msgstr "`{cherry}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:891 #, no-wrap msgid "`{matusita}`" msgstr "`{matusita}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:894 #, no-wrap msgid "`{mm}`" msgstr "`{mm}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:897 #, no-wrap msgid "`{sem}`" msgstr "`{sem}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:900 #, no-wrap msgid "`{rcm}`" msgstr "`{rcm}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:903 #, no-wrap msgid "`{mckusick}`" msgstr "`{mckusick}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:906 #, no-wrap msgid "`{tmclaugh}`" msgstr "`{tmclaugh}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:909 #, no-wrap msgid "`{jmelo}`" msgstr "`{jmelo}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:912 #, no-wrap msgid "`{mmel}`" msgstr "`{mmel}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:915 #, no-wrap msgid "`{jmmv}`" msgstr "`{jmmv}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:918 #, no-wrap msgid "`{kadesai}`" msgstr "`{kadesai}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:921 #, no-wrap msgid "`{ken}`" msgstr "`{ken}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:924 #, no-wrap msgid "`{markm}`" msgstr "`{markm}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:927 #, no-wrap msgid "`{dinoex}`" msgstr "`{dinoex}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:930 #, no-wrap msgid "`{sanpei}`" msgstr "`{sanpei}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:933 #, no-wrap msgid "`{rmh}`" msgstr "`{rmh}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:936 #, no-wrap msgid "`{driesm}`" msgstr "`{driesm}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:939 #, no-wrap msgid "`{jrm}`" msgstr "`{jrm}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:942 #, no-wrap msgid "`{freqlabs}`" msgstr "`{freqlabs}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:945 #, no-wrap msgid "`{mmoll}`" msgstr "`{mmoll}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:948 #, no-wrap msgid "`{cmt}`" msgstr "`{cmt}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:951 #, no-wrap msgid "`{stephen}`" msgstr "`{stephen}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:954 #, no-wrap msgid "`{marcel}`" msgstr "`{marcel}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:957 #, no-wrap msgid "`{dougm}`" msgstr "`{dougm}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:960 #, no-wrap msgid "`{kmoore}`" msgstr "`{kmoore}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:963 #, no-wrap msgid "`{marck}`" msgstr "`{marck}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:966 #, no-wrap msgid "`{mav}`" msgstr "`{mav}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:969 #, no-wrap msgid "`{rich}`" msgstr "`{rich}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:972 #, no-wrap msgid "`{knu}`" msgstr "`{knu}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:975 #, no-wrap msgid "`{tmm}`" msgstr "`{tmm}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:978 #, no-wrap msgid "`{max}`" msgstr "`{max}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:981 #, no-wrap msgid "`{maho}`" msgstr "`{maho}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:984 #, no-wrap msgid "`{yoichi}`" msgstr "`{yoichi}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:987 #, no-wrap msgid "`{bland}`" msgstr "`{bland}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:990 #, no-wrap msgid "`{gnn}`" msgstr "`{gnn}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:993 #, no-wrap msgid "`{khng}`" msgstr "`{khng}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:996 #, no-wrap msgid "`{simon}`" msgstr "`{simon}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:999 #, no-wrap msgid "`{rnoland}`" msgstr "`{rnoland}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1002 #, no-wrap msgid "`{anders}`" msgstr "`{anders}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1005 #, no-wrap msgid "`{lofi}`" msgstr "`{lofi}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1008 #, no-wrap msgid "`{obrien}`" msgstr "`{obrien}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1011 #, no-wrap msgid "`{olgeni}`" msgstr "`{olgeni}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1014 #, no-wrap msgid "`{philip}`" msgstr "`{philip}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1017 #, no-wrap msgid "`{jpaetzel}`" msgstr "`{jpaetzel}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1020 #, no-wrap msgid "`{zirias}`" msgstr "`{zirias}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1023 #, no-wrap msgid "`{hiren}`" msgstr "`{hiren}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1026 #, no-wrap msgid "`{hmp}`" msgstr "`{hmp}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1029 #, no-wrap msgid "`{fluffy}`" msgstr "`{fluffy}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1032 #, no-wrap msgid "`{sat}`" msgstr "`{sat}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1035 #, no-wrap msgid "`{np}`" msgstr "`{np}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1038 #, no-wrap msgid "`{royger}`" msgstr "`{royger}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1041 #, no-wrap msgid "`{rpaulo}`" msgstr "`{rpaulo}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1044 #, no-wrap msgid "`{misha}`" msgstr "`{misha}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1047 #, no-wrap msgid "`{dumbbell}`" msgstr "`{dumbbell}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1050 #, no-wrap msgid "`{rpokala}`" msgstr "`{rpokala}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1053 #, no-wrap msgid "`{mp}`" msgstr "`{mp}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1056 #, no-wrap msgid "`{roam}`" msgstr "`{roam}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1059 #, no-wrap msgid "`{den}`" msgstr "`{den}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1062 #, no-wrap msgid "`{csjp}`" msgstr "`{csjp}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1065 #, no-wrap msgid "`{grahamperrin}`" msgstr "`{grahamperrin}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1068 #, no-wrap msgid "`{gerald}`" msgstr "`{gerald}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1071 #, no-wrap msgid "`{scottph}`" msgstr "`{scottph}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1074 #, no-wrap msgid "`{jacula}`" msgstr "`{jacula}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1077 #, no-wrap msgid "`{0mp}`" msgstr "`{0mp}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1080 #, no-wrap msgid "`{jdp}`" msgstr "`{jdp}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1083 #, no-wrap msgid "`{krion}`" msgstr "`{krion}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1086 #, no-wrap msgid "`{vladlen}`" msgstr "`{vladlen}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1089 #, no-wrap msgid "`{sepotvin}`" msgstr "`{sepotvin}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1092 #, no-wrap msgid "`{cpm}`" msgstr "`{cpm}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1095 #, no-wrap msgid "`{markp}`" msgstr "`{markp}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1098 #, no-wrap msgid "`{alepulver}`" msgstr "`{alepulver}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1101 #, no-wrap msgid "`{kp}`" msgstr "`{kp}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1104 #, no-wrap msgid "`{thomas}`" msgstr "`{thomas}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1107 #, no-wrap msgid "`{hq}`" msgstr "`{hq}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1110 #, no-wrap msgid "`{bofh}`" msgstr "`{bofh}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1113 #, no-wrap msgid "`{fox}`" msgstr "`{fox}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1116 #, no-wrap msgid "`{lbr}`" msgstr "`{lbr}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1119 #, no-wrap msgid "`{crees}`" msgstr "`{crees}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1122 #, no-wrap msgid "`{rees}`" msgstr "`{rees}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1125 #, no-wrap msgid "`{mr}`" msgstr "`{mr}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1128 #, no-wrap msgid "`{bcr}`" msgstr "`{bcr}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1131 #, no-wrap msgid "`{trhodes}`" msgstr "`{trhodes}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1134 #, no-wrap msgid "`{benno}`" msgstr "`{benno}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1137 #, no-wrap msgid "`{beech}`" msgstr "`{beech}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1140 #, no-wrap msgid "`{roberto}`" msgstr "`{roberto}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1143 #, no-wrap msgid "`{rodrigc}`" msgstr "`{rodrigc}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1146 #, no-wrap msgid "`{michaelo}`" msgstr "`{michaelo}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1149 #, no-wrap msgid "`{igoro}`" msgstr "`{igoro}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1152 #, no-wrap msgid "`{dtxdf}`" msgstr "`{dtxdf}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1155 #, no-wrap msgid "`{ler}`" msgstr "`{ler}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1158 #, no-wrap msgid "`{leres}`" msgstr "`{leres}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1161 #, no-wrap msgid "`{robak}`" msgstr "`{robak}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1164 #, no-wrap msgid "`{guido}`" msgstr "`{guido}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1167 #, no-wrap msgid "`{rea}`" msgstr "`{rea}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1170 #, no-wrap msgid "`{ray}`" msgstr "`{ray}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1173 #, no-wrap msgid "`{niklas}`" msgstr "`{niklas}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1176 #, no-wrap msgid "`{salvadore}`" msgstr "`{salvadore}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1179 #, no-wrap msgid "`{bsam}`" msgstr "`{bsam}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1182 #, no-wrap msgid "`{marks}`" msgstr "`{marks}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1185 #, no-wrap msgid "`{bschmidt}`" msgstr "`{bschmidt}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1188 #, no-wrap msgid "`{wosch}`" msgstr "`{wosch}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1191 #, no-wrap msgid "`{cy}`" msgstr "`{cy}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1194 #, no-wrap msgid "`{das}`" msgstr "`{das}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1197 #, no-wrap msgid "`{scheidell}`" msgstr "`{scheidell}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1200 #, no-wrap msgid "`{matthew}`" msgstr "`{matthew}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1203 #, no-wrap msgid "`{tmseck}`" msgstr "`{tmseck}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1206 #, no-wrap msgid "`{johans}`" msgstr "`{johans}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1209 #, no-wrap msgid "`{bakul}`" msgstr "`{bakul}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1212 #, no-wrap msgid "`{gshapiro}`" msgstr "`{gshapiro}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1215 #, no-wrap msgid "`{wxs}`" msgstr "`{wxs}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1218 #, no-wrap msgid "`{nork}`" msgstr "`{nork}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1221 #, no-wrap msgid "`{syrinx}`" msgstr "`{syrinx}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1224 #, no-wrap msgid "`{vanilla}`" msgstr "`{vanilla}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1227 #, no-wrap msgid "`{ashafer}`" msgstr "`{ashafer}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1230 #, no-wrap msgid "`{ashish}`" msgstr "`{ashish}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1233 #, no-wrap msgid "`{asiciliano}`" msgstr "`{asiciliano}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1236 #, no-wrap msgid "`{chs}`" msgstr "`{chs}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1239 #, no-wrap msgid "`{bms}`" msgstr "`{bms}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1242 #, no-wrap msgid "`{demon}`" msgstr "`{demon}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1245 #, no-wrap msgid "`{jesper}`" msgstr "`{jesper}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1248 #, no-wrap msgid "`{scop}`" msgstr "`{scop}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1251 #, no-wrap msgid "`{anray}`" msgstr "`{anray}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1254 #, no-wrap msgid "`{flo}`" msgstr "`{flo}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1260 #, no-wrap msgid "`{kensmith}`" msgstr "`{kensmith}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1263 #, no-wrap msgid "`{ben}`" msgstr "`{ben}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1266 #, no-wrap msgid "`{des}`" msgstr "`{des}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1269 #, no-wrap msgid "`{sobomax}`" msgstr "`{sobomax}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1272 #, no-wrap msgid "`{asomers}`" msgstr "`{asomers}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1275 #, no-wrap msgid "`{brian}`" msgstr "`{brian}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1278 #, no-wrap msgid "`{sson}`" msgstr "`{sson}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1281 #, no-wrap msgid "`{nsouch}`" msgstr "`{nsouch}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1284 #, no-wrap msgid "`{ssouhlal}`" msgstr "`{ssouhlal}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1287 #, no-wrap msgid "`{loos}`" msgstr "`{loos}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1290 #, no-wrap msgid "`{brnrd}`" msgstr "`{brnrd}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1293 #, no-wrap msgid "`{rink}`" msgstr "`{rink}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1296 #, no-wrap msgid "`{vsevolod}`" msgstr "`{vsevolod}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1299 #, no-wrap msgid "`{pstef}`" msgstr "`{pstef}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1302 #, no-wrap msgid "`{zi}`" msgstr "`{zi}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1305 #, no-wrap msgid "`{lstewart}`" msgstr "`{lstewart}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1308 #, no-wrap msgid "`{murray}`" msgstr "`{murray}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1311 #, no-wrap msgid "`{vs}`" msgstr "`{vs}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1314 #, no-wrap msgid "`{xride}`" msgstr "`{xride}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1317 #, no-wrap msgid "`{marius}`" msgstr "`{marius}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1320 #, no-wrap msgid "`{cs}`" msgstr "`{cs}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1323 #, no-wrap msgid "`{clsung}`" msgstr "`{clsung}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1326 #, no-wrap msgid "`{gsutter}`" msgstr "`{gsutter}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1329 #, no-wrap msgid "`{metal}`" msgstr "`{metal}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1332 #, no-wrap msgid "`{ryusuke}`" msgstr "`{ryusuke}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1335 #, no-wrap msgid "`{nyan}`" msgstr "`{nyan}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1338 #, no-wrap msgid "`{sahil}`" msgstr "`{sahil}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1341 #, no-wrap msgid "`{tota}`" msgstr "`{tota}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1344 #, no-wrap msgid "`{romain}`" msgstr "`{romain}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1347 #, no-wrap msgid "`{eduardo}`" msgstr "`{eduardo}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1350 #, no-wrap msgid "`{sylvio}`" msgstr "`{sylvio}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1353 #, no-wrap msgid "`{itetcu}`" msgstr "`{itetcu}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1356 #, no-wrap msgid "`{mi}`" msgstr "`{mi}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1359 #, no-wrap msgid "`{gordon}`" msgstr "`{gordon}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1362 #, no-wrap msgid "`{lth}`" msgstr "`{lth}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1365 #, no-wrap msgid "`{fabient}`" msgstr "`{fabient}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1368 #, no-wrap msgid "`{thierry}`" msgstr "`{thierry}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1371 #, no-wrap msgid "`{thompsa}`" msgstr "`{thompsa}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1374 #, no-wrap msgid "`{flz}`" msgstr "`{flz}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1377 #, no-wrap msgid "`{jilles}`" msgstr "`{jilles}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1380 #, no-wrap msgid "`{ganbold}`" msgstr "`{ganbold}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1383 #, no-wrap msgid "`{tuexen}`" msgstr "`{tuexen}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1386 #, no-wrap msgid "`{gonzo}`" msgstr "`{gonzo}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1389 #, no-wrap msgid "`{uzsolt}`" msgstr "`{uzsolt}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1392 #, no-wrap msgid "`{ume}`" msgstr "`{ume}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1395 #, no-wrap msgid "`{ups}`" msgstr "`{ups}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1398 #, no-wrap msgid "`{fsu}`" msgstr "`{fsu}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1401 #, no-wrap msgid "`{mikael}`" msgstr "`{mikael}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1404 #, no-wrap msgid "`{manu}`" msgstr "`{manu}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1407 #, no-wrap msgid "`{ram}`" msgstr "`{ram}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1410 #, no-wrap msgid "`{bryanv}`" msgstr "`{bryanv}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1413 #, no-wrap msgid "`{nectar}`" msgstr "`{nectar}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1416 #, no-wrap msgid "`{avilla}`" msgstr "`{avilla}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1419 #, no-wrap msgid "`{nivit}`" msgstr "`{nivit}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1422 #, no-wrap msgid "`{ivoras}`" msgstr "`{ivoras}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1425 #, no-wrap msgid "`{stefan}`" msgstr "`{stefan}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1428 #, no-wrap msgid "`{kaiw}`" msgstr "`{kaiw}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1431 #, no-wrap msgid "`{adamw}`" msgstr "`{adamw}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1434 #, no-wrap msgid "`{naddy}`" msgstr "`{naddy}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1437 #, no-wrap msgid "`{peter}`" msgstr "`{peter}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1440 #, no-wrap msgid "`{nwhitehorn}`" msgstr "`{nwhitehorn}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1443 #, no-wrap msgid "`{obiwac}`" msgstr "`{obiwac}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1446 #, no-wrap msgid "`{miwi}`" msgstr "`{miwi}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1449 #, no-wrap msgid "`{nate}`" msgstr "`{nate}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1452 #, no-wrap msgid "`{twinterg}`" msgstr "`{twinterg}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1455 #, no-wrap msgid "`{def}`" msgstr "`{def}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1458 #, no-wrap msgid "`{wollman}`" msgstr "`{wollman}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1461 #, no-wrap msgid "`{joerg}`" msgstr "`{joerg}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1464 #, no-wrap msgid "`{ygy}`" msgstr "`{ygy}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1467 #, no-wrap msgid "`{emax}`" msgstr "`{emax}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1470 #, no-wrap msgid "`{oshogbo}`" msgstr "`{oshogbo}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1473 #, no-wrap msgid "`{andy}`" msgstr "`{andy}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1476 #, no-wrap msgid "`{riggs}`" msgstr "`{riggs}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1479 #, no-wrap msgid "`{egypcio}`" msgstr "`{egypcio}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1482 #, no-wrap msgid "`{bz}`" msgstr "`{bz}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1485 #, no-wrap msgid "`{dsl}`" msgstr "`{dsl}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1488 #, no-wrap msgid "`{zeising}`" msgstr "`{zeising}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1491 #, no-wrap msgid "`{phantom}`" msgstr "`{phantom}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1494 #, no-wrap msgid "`{tz}`" msgstr "`{tz}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1497 #, no-wrap msgid "`{rigoletto}`" msgstr "`{rigoletto}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1500 #, no-wrap msgid "`{kaktus}`" msgstr "`{kaktus}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1503 #, no-wrap msgid "`{samm}`" msgstr "`{samm}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1506 #, no-wrap msgid "`{arrowd}`" msgstr "`{arrowd}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1509 #, no-wrap msgid "`{ronald}`" msgstr "`{ronald}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1512 #, no-wrap msgid "`{meta}`" msgstr "`{meta}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1515 #, no-wrap msgid "`{rnagy}`" msgstr "`{rnagy}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1518 #, no-wrap msgid "`{vvd}`" msgstr "`{vvd}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1521 #, no-wrap msgid "`{gbe}`" msgstr "`{gbe}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1524 #, no-wrap msgid "`{bnovkov}`" msgstr "`{bnovkov}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1527 #, no-wrap msgid "`{ivy}`" msgstr "`{ivy}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1530 #, no-wrap msgid "`{khorben}`" msgstr "`{khorben}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1533 #, no-wrap msgid "`{vexeduxr}`" msgstr "`{vexeduxr}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1536 #, no-wrap msgid "`{alven}`" msgstr "`{alven}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1539 #, no-wrap msgid "`{pouria}`" msgstr "`{pouria}`" #. type: Title === #: documentation/content/en/articles/pgpkeys/_index.adoc:1542 #, no-wrap msgid "`{siva}`" msgstr "`{siva}`" -#. type: Title === -#: documentation/content/en/articles/pgpkeys/_index.adoc:1545 -#, fuzzy, no-wrap -#| msgid "`{scottph}`" -msgid "`{nxjoseph}`" -msgstr "`{scottph}`" - #. type: Title == -#: documentation/content/en/articles/pgpkeys/_index.adoc:1549 +#: documentation/content/en/articles/pgpkeys/_index.adoc:1546 #, no-wrap msgid "Other Cluster Account Holders" msgstr "Другие владельцы учётных записей" #. type: Title === -#: documentation/content/en/articles/pgpkeys/_index.adoc:1551 +#: documentation/content/en/articles/pgpkeys/_index.adoc:1548 #, no-wrap msgid "`{bk}`" msgstr "`{bk}`" #. type: Title === -#: documentation/content/en/articles/pgpkeys/_index.adoc:1554 +#: documentation/content/en/articles/pgpkeys/_index.adoc:1551 #, no-wrap msgid "`{deb}`" msgstr "`{deb}`" #. type: Title === -#: documentation/content/en/articles/pgpkeys/_index.adoc:1557 +#: documentation/content/en/articles/pgpkeys/_index.adoc:1554 #, no-wrap msgid "`{debdrup}`" msgstr "`{debdrup}`" #. type: Title === -#: documentation/content/en/articles/pgpkeys/_index.adoc:1560 +#: documentation/content/en/articles/pgpkeys/_index.adoc:1557 #, no-wrap msgid "`{dutchdaemon}`" msgstr "`{dutchdaemon}`" #. type: Title === -#: documentation/content/en/articles/pgpkeys/_index.adoc:1563 +#: documentation/content/en/articles/pgpkeys/_index.adoc:1560 #, no-wrap msgid "`{keymaster}`" msgstr "`{keymaster}`" #. type: Title === -#: documentation/content/en/articles/pgpkeys/_index.adoc:1566 +#: documentation/content/en/articles/pgpkeys/_index.adoc:1563 #, no-wrap msgid "`{mwlucas}`" msgstr "`{mwlucas}`" #. type: Title === -#: documentation/content/en/articles/pgpkeys/_index.adoc:1569 +#: documentation/content/en/articles/pgpkeys/_index.adoc:1566 #, no-wrap msgid "`{dhw}`" msgstr "`{dhw}`" #. type: Title === -#: documentation/content/en/articles/pgpkeys/_index.adoc:1572 +#: documentation/content/en/articles/pgpkeys/_index.adoc:1569 #, no-wrap msgid "`{tpearson}`" msgstr "`{tpearson}`" diff --git a/documentation/content/ru/articles/port-mentor-guidelines/_index.adoc b/documentation/content/ru/articles/port-mentor-guidelines/_index.adoc index ea67ccf0b1..e2a2c9ccf7 100644 --- a/documentation/content/ru/articles/port-mentor-guidelines/_index.adoc +++ b/documentation/content/ru/articles/port-mentor-guidelines/_index.adoc @@ -1,118 +1,118 @@ --- copyright: '2011 Thomas Abthorpe, Chris Rees' description: 'Руководство для наставников портов FreeBSD' organizations: - organization: 'The FreeBSD Ports Management Team' tags: ["port", "mentor", "mentee", "guidelines", "FreeBSD"] title: 'Руководство для наставников портов' --- = Руководство для наставников портов :doctype: article :toc: macro :toclevels: 1 :icons: font :sectnums: :sectnumlevels: 6 :source-highlighter: rouge :experimental: :images-path: articles/port-mentor-guidelines/ ifdef::env-beastie[] ifdef::backend-html5[] include::shared/authors.adoc[] include::shared/mirrors.adoc[] include::shared/releases.adoc[] include::shared/attributes/attributes-{{% lang %}}.adoc[] include::shared/{{% lang %}}/teams.adoc[] include::shared/{{% lang %}}/mailing-lists.adoc[] include::shared/{{% lang %}}/urls.adoc[] :imagesdir: ../../../images/{images-path} endif::[] ifdef::backend-pdf,backend-epub3[] include::../../../../shared/asciidoctor.adoc[] endif::[] endif::[] ifndef::env-beastie[] include::../../../../../shared/asciidoctor.adoc[] endif::[] ''' toc::[] [[port-mentor.guidelines]] == Рекомендации по взаимоотношениям наставника и подопечного Этот раздел предназначен для того, чтобы помочь развеять таинственность процесса наставничества, а также открыто способствовать конструктивному обсуждению для адаптации и развития руководящих принципов. В нашей жизни слишком много правил; мы не государственная организация, навязывающая регулирование, а скорее коллектив единомышленников, работающих для достижения общей цели — поддержания гарантии качества продукта, который мы называем Деревом Портов. [[why.mentor]] === Почему наставник (mentor)? * У большинства из нас были наставники, и это наставничество в Проекте было важным и полезным, поэтому верните эти усилия, предложив стать наставником для кого-то другого. * У вас есть непреодолимое желание делиться знаниями с другими. * В наказание за это вы обрекаете себя на добровольную каторгу коммитить хорошую работу, сделанную другими! [[mentor.comentor]] === Наставник/Сонаставник Причины для совместного наставничества: * Значительная разница во времени. Доступные, интерактивные наставники, доступные через IM, крайне полезны! * Потенциальный языковой барьер. Да, FreeBSD, как и большинство разработок программного обеспечения, ориентирована на английский язык, однако наличие наставника, говорящего на родном языке, может быть очень полезным. * ВРЕМЕНИ НЕТ! Пока в сутках не станет 30 часов, а в неделе — 8 дней, у некоторых из нас просто не хватает времени. Разделение нагрузки с кем-то другим облегчит задачу. * Наставник для новичков может получить пользу от опыта старшего коммиттера/наставника. * Две головы лучше, чем одна. Причины индивидуального наставничества: * Вы не играете по правилам с другими. * Вы предпочитаете иметь индивидуальные отношения. * Причины для совместного наставничества к вам не относятся. [[mentor.expectations]] === Ожидания Мы ожидаем, что наставники будут проверять и тестировать все предлагаемые исправления, по крайней мере, в течение начального периода, длящегося более одной или двух недель. Мы ожидаем, что наставники должны нести ответственность за действия своих подопечных. Наставник должен отслеживать все коммиты, сделанные подопечным, как одобренные, так и неявные. Мы ожидаем, что наставники убедятся, что их подопечные прочитали extref:{porters-handbook}[Руководство портировщика], extref:{pr-guidelines}[руководство по обработке PR] и extref:{committers-guide}[Руководство коммиттера]. Хотя и не обязательно запоминать все детали, каждый коммиттер должен иметь общее представление об этих вещах, чтобы быть эффективной частью сообщества (и избежать как можно больше ошибок новичка). [[mentees]] === Выбор подопечного Не существует определённого правила, по которому кандидат считается готовым; это может быть комбинация количества поданных PR, количества поддерживаемых портов, частоты обновлений портов и/или уровня участия в определённой области интересов, такой как GNOME, KDE, Gecko или других. Кандидат должен практически не допускать тайм-аутов, оперативно реагировать на запросы и в целом оказывать помощь в поддержке своих портов. Должна быть история вовлечённости, так как общеизвестно, что обучение коммиттера требует времени и усилий. Длительное участие в проекте и наблюдение за процессами предполагают накопление знаний. Слишком часто мы видели, как сопровождающий отправляет несколько PR, появляется в IRC и спрашивает, когда ему дадут право на коммит. Подписка и активное участие в почтовых рассылках очень полезны. Нет прямой связи и ожидания быстрого результата, что отправка сообщений в списки рассылок сделает кого-то коммиттером, но это демонстрирует вовлечённость. Некоторые письма позволяют оценить знания кандидата, а также его взаимодействие с другими. Аналогично, участие в IRC может повысить заметность человека. Спросите у шести разных коммиттеров, сколько PR должен отправить сопровождающий перед тем, как его номинируют, и вы получите шесть разных ответов. Спросите у тех же людей, как долго кто-то должен участвовать, и та же дилемма. Сколько портов у него должно быть как минимум? Теперь у нас есть повод для бесконечных споров! Некоторые вещи просто трудно измерить, наставнику придется полагаться на свое лучшее суждение и надеяться, что portmgr согласится. [[mentorship.duration]] === Продолжительность наставничества По мере развития и укрепления уровня доверия, подопечному могут быть предоставлены «неявные» права на внесение изменений. Это может включать тривиальные изменения в [.filename]#Makefile#, [.filename]#pkg-descr# и т. д. Аналогично, это может включать обновления `PORTVERSION`, которые не требуют изменений в `plist`. Другие обстоятельства могут быть определены на усмотрение Наставника. Однако в период наставничества изменения версии порта, затрагивающие зависимые порты, должны проверяться наставником. Как и все мы разные личности, у каждого подопечного свои кривые обучения, временные обязательства и другие влияющие факторы, которые будут влиять на время, необходимое перед тем, как они смогут «летать самостоятельно». Эмпирически, за подопечным следует наблюдать как минимум 3 месяца. 90-100 коммитов — это ещё один ориентир, который может использовать наставник перед тем, как отпустить подопечного. Другие факторы, которые следует учитывать перед освобождением подопечного, — это количество ошибок, которые они могли совершить, полученные QAT и т.д. Если они всё ещё делают ошибки новичка, им всё ещё требуется руководство наставника. [[mentor.comentor.debate]] === Дискуссия о роли наставника/сонаставника Когда запрос поступает в portmgr, он обычно звучит так: «Я предлагаю «foo» для права коммита в порты, я буду со-наставником вместе с «bar»». Предложение получено, проголосовано и принято. Наставник является основным контактным лицом или "первым среди равных", а сонаставник — его заместитель. Один "ответственный" участник, чьё имя мы опустим, сделал https://lists.freebsd.org/pipermail/cvs-ports/2007-September/134614.html[первый зарегистрированный коммит с сонаставником]. Подобные коммиты с со-менторами также были замечены в дереве src. Делает ли это их правильными? Делает ли это их неправильными? Похоже, это часть эволюции того, как всё устроено. [[mentee.expectations]] === Ожидания -Мы ожидаем, что подопечные будут готовы к конструктивной критике от сообщества. Здесь еще много "преданий" и традиций, неписанных правил. Умение правильно реагировать на конструктивную критику — это то, на что мы обращаем внимание в первую очередь, оценивая вклад подопечных в IRC и в почтовых рассылках. +Мы ожидаем, что подопечные будут готовы к конструктивной критике от сообщества. Здесь ещё много "преданий" и традиций, неписанных правил. Умение правильно реагировать на конструктивную критику — это то, на что мы обращаем внимание в первую очередь, оценивая вклад подопечных в IRC и в почтовых рассылках. Мы предупреждаем подопечных, что часть критики может быть менее "конструктивной", чем остальная (будь то из-за проблем с языком общения или излишней придирчивости), и что умение достойно принимать такую критику — это часть участия в большом сообществе. В случае конкретных проблем с определёнными людьми или любых вопросов мы надеемся, что они обратятся к членам portmgr в IRC или по электронной почте. diff --git a/documentation/content/ru/articles/port-mentor-guidelines/_index.po b/documentation/content/ru/articles/port-mentor-guidelines/_index.po index 2d68c74b42..c2cfb68080 100644 --- a/documentation/content/ru/articles/port-mentor-guidelines/_index.po +++ b/documentation/content/ru/articles/port-mentor-guidelines/_index.po @@ -1,408 +1,408 @@ # SOME DESCRIPTIVE TITLE # Copyright (C) YEAR The FreeBSD Project # This file is distributed under the same license as the FreeBSD Documentation package. # Vladlen Popolitov , 2025. msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" "POT-Creation-Date: 2022-02-01 09:21-0300\n" -"PO-Revision-Date: 2025-10-29 04:45+0000\n" +"PO-Revision-Date: 2025-11-21 04:45+0000\n" "Last-Translator: Vladlen Popolitov \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 4.17\n" #. type: YAML Front Matter: description #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:1 #, no-wrap msgid "Port Mentor Guidelines for FreeBSD Mentors" msgstr "Руководство для наставников портов FreeBSD" #. type: Title = #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:1 #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:10 #, no-wrap msgid "Port Mentor Guidelines" msgstr "Руководство для наставников портов" #. type: Plain text #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:42 msgid "'''" msgstr "'''" #. type: Title == #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:46 #, no-wrap msgid "Guideline for Mentor/Mentee Relationships" msgstr "Рекомендации по взаимоотношениям наставника и подопечного" #. type: Plain text #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:50 msgid "" "This section is intended to help demystify the mentoring process, as well as " "a way to openly promote a constructive discussion to adapt and grow the " "guidelines. In our lives we have too many rules; we are not a government " "organization that inflicts regulation, but rather a collective of like " "minded individuals working toward a common goal, maintaining the quality " "assurance of the product we call the Ports Tree." msgstr "" "Этот раздел предназначен для того, чтобы помочь развеять таинственность " "процесса наставничества, а также открыто способствовать конструктивному " "обсуждению для адаптации и развития руководящих принципов. В нашей жизни " "слишком много правил; мы не государственная организация, навязывающая " "регулирование, а скорее коллектив единомышленников, работающих для " "достижения общей цели — поддержания гарантии качества продукта, который мы " "называем Деревом Портов." #. type: Title === #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:52 #, no-wrap msgid "Why Mentor?" msgstr "Почему наставник (mentor)?" #. type: Plain text #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:55 msgid "" "For most of us, we were mentored into the Project, so return the favor by " "offering to mentor somebody else in." msgstr "" "У большинства из нас были наставники, и это наставничество в Проекте было " "важным и полезным, поэтому верните эти усилия, предложив стать наставником " "для кого-то другого." #. type: Plain text #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:56 msgid "You have an irresistible urge to inflict knowledge on others." msgstr "У вас есть непреодолимое желание делиться знаниями с другими." #. type: Plain text #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:57 msgid "" "The usual punishment applies because you are sick and tired of committing " "somebody else's good work!" msgstr "" "В наказание за это вы обрекаете себя на добровольную каторгу коммитить " "хорошую работу, сделанную другими!" #. type: Title === #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:59 #, no-wrap msgid "Mentor/Co-Mentor" msgstr "Наставник/Сонаставник" #. type: Plain text #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:62 msgid "Reasons for a co-mentorship:" msgstr "Причины для совместного наставничества:" #. type: Plain text #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:64 msgid "" "Significant timezone differential. Accessible, interactive mentor(s) " "available via IM is extremely helpful!" msgstr "" "Значительная разница во времени. Доступные, интерактивные наставники, " "доступные через IM, крайне полезны!" #. type: Plain text #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:65 msgid "" "Potential language barrier. Yes, FreeBSD is very English oriented, as is " "most software development, however, having a mentor who can speak a native " "language can be very useful." msgstr "" "Потенциальный языковой барьер. Да, FreeBSD, как и большинство разработок " "программного обеспечения, ориентирована на английский язык, однако наличие " "наставника, говорящего на родном языке, может быть очень полезным." #. type: Plain text #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:66 msgid "" "ENOTIME! Until there is a 30 hour day, and an 8 day week, some of us only " "have so much time to give. Sharing the load with somebody else will make it " "easier." msgstr "" "ВРЕМЕНИ НЕТ! Пока в сутках не станет 30 часов, а в неделе — 8 дней, у " "некоторых из нас просто не хватает времени. Разделение нагрузки с кем-то " "другим облегчит задачу." #. type: Plain text #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:67 msgid "" "A rookie mentor can benefit from the experience of a senior committer/mentor." msgstr "" "Наставник для новичков может получить пользу от опыта старшего " "коммиттера/наставника." #. type: Plain text #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:68 msgid "Two heads are better than one." msgstr "Две головы лучше, чем одна." #. type: Plain text #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:70 msgid "Reasons for sole mentorship:" msgstr "Причины индивидуального наставничества:" #. type: Plain text #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:72 msgid "You do not play nicely with others." msgstr "Вы не играете по правилам с другими." #. type: Plain text #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:73 msgid "You prefer to have a one-on-one relationship." msgstr "Вы предпочитаете иметь индивидуальные отношения." #. type: Plain text #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:74 msgid "The reasons for co-mentorship do not apply to you." msgstr "Причины для совместного наставничества к вам не относятся." #. type: Title === #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:76 #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:134 #, no-wrap msgid "Expectations" msgstr "Ожидания" #. type: Plain text #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:79 msgid "" "We expect mentors to review and test-build all proposed patches, at least " "for an initial period lasting more than a week or two." msgstr "" "Мы ожидаем, что наставники будут проверять и тестировать все предлагаемые " "исправления, по крайней мере, в течение начального периода, длящегося более " "одной или двух недель." #. type: Plain text #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:82 msgid "" "We expect that mentors should take responsibility for the actions of their " "mentee. A mentor should follow up with all commits the mentee makes, both " "approved and implicit." msgstr "" "Мы ожидаем, что наставники должны нести ответственность за действия своих " "подопечных. Наставник должен отслеживать все коммиты, сделанные подопечным, " "как одобренные, так и неявные." #. type: Plain text #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:85 msgid "" "We expect mentors to make sure their mentees read the extref:{porters-" "handbook}[Porter's Handbook], the extref:{pr-guidelines}[PR handling guide], " "and the extref:{committers-guide}[Committer's Guide]. While it is not " "necessary to memorize all the details, every committer needs to have an " "overview of these things to be an effective part of the community (and avoid " "as many rookie mistakes as possible)." msgstr "" "Мы ожидаем, что наставники убедятся, что их подопечные прочитали extref" ":{porters-handbook}[Руководство портировщика], extref:{pr-guidelines}[" "руководство по обработке PR] и extref:{committers-guide}[Руководство " "коммиттера]. Хотя и не обязательно запоминать все детали, каждый коммиттер " "должен иметь общее представление об этих вещах, чтобы быть эффективной " "частью сообщества (и избежать как можно больше ошибок новичка)." #. type: Title === #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:87 #, no-wrap msgid "Selecting a Mentee" msgstr "Выбор подопечного" #. type: Plain text #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:90 msgid "" "There is no defined rule for what makes a candidate ready; it can be a " "combination of number of PRs they have submitted, the number of ports " "maintained, frequency of ports updates and/or level of participation in a " "particular area of interest like GNOME, KDE, Gecko or others." msgstr "" "Не существует определённого правила, по которому кандидат считается готовым; " "это может быть комбинация количества поданных PR, количества поддерживаемых " "портов, частоты обновлений портов и/или уровня участия в определённой " "области интересов, такой как GNOME, KDE, Gecko или других." #. type: Plain text #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:92 msgid "" "A candidate should have almost no timeouts, be responsive to requests, and " "generally helpful in supporting their ports." msgstr "" "Кандидат должен практически не допускать тайм-аутов, оперативно реагировать " "на запросы и в целом оказывать помощь в поддержке своих портов." #. type: Plain text #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:96 msgid "" "There must be a history of commitment, as it is widely understood that " "training a committer requires time and effort. If somebody has been around " "longer, and spent the time observing how things are done, there is some " "anticipation of accumulated knowledge. All too often we have seen a " "maintainer submit a few PRs, show up in IRC and ask when they will be given " "a commit bit." msgstr "" "Должна быть история вовлечённости, так как общеизвестно, что обучение " "коммиттера требует времени и усилий. Длительное участие в проекте и " "наблюдение за процессами предполагают накопление знаний. Слишком часто мы " "видели, как сопровождающий отправляет несколько PR, появляется в IRC и " "спрашивает, когда ему дадут право на коммит." #. type: Plain text #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:101 msgid "" "Being subscribed to, and following the mailing lists is very beneficial. " "There is no real expectation that submitting posts on the lists will make " "somebody a committer, but it demonstrates a commitment. Some mails offer " "insights into the knowledge of a candidate as well how they interact with " "others. Similarly participating in IRC can give somebody a higher profile." msgstr "" "Подписка и активное участие в почтовых рассылках очень полезны. Нет прямой " "связи и ожидания быстрого результата, что отправка сообщений в списки " "рассылок сделает кого-то коммиттером, но это демонстрирует вовлечённость. " "Некоторые письма позволяют оценить знания кандидата, а также его " "взаимодействие с другими. Аналогично, участие в IRC может повысить " "заметность человека." #. type: Plain text #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:105 msgid "" "Ask six different committers how many PRs a maintainer should submit prior " "to being nominated, and you will get six different answers. Ask those same " "individuals how long somebody should have been participating, same dilemma. " "How many ports should they have at a minimum? Now we have a bikeshed! Some " "things are just hard to quantify, a mentor will just have to use their best " "judgement, and hope that portmgr agrees." msgstr "" "Спросите у шести разных коммиттеров, сколько PR должен отправить " "сопровождающий перед тем, как его номинируют, и вы получите шесть разных " "ответов. Спросите у тех же людей, как долго кто-то должен участвовать, и та " "же дилемма. Сколько портов у него должно быть как минимум? Теперь у нас есть " "повод для бесконечных споров! Некоторые вещи просто трудно измерить, " "наставнику придется полагаться на свое лучшее суждение и надеяться, что " "portmgr согласится." #. type: Title === #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:107 #, no-wrap msgid "Mentorship Duration" msgstr "Продолжительность наставничества" #. type: Plain text #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:114 msgid "" "As the trust level develops and grows, the mentee may be granted \"implicit" "\" commit rights. This can include trivial changes to a [." "filename]#Makefile#, [.filename]#pkg-descr# etc. Similarly, it may include " "`PORTVERSION` updates that do not include `plist` changes. Other " "circumstances may be formulated at the discretion of the Mentor. However, " "during the period of mentorship, a port version bump that affects dependent " "ports should be checked by a mentor." msgstr "" "По мере развития и укрепления уровня доверия, подопечному могут быть " "предоставлены «неявные» права на внесение изменений. Это может включать " "тривиальные изменения в [.filename]#Makefile#, [.filename]#pkg-descr# и т. " "д. Аналогично, это может включать обновления `PORTVERSION`, которые не " "требуют изменений в `plist`. Другие обстоятельства могут быть определены на " "усмотрение Наставника. Однако в период наставничества изменения версии " "порта, затрагивающие зависимые порты, должны проверяться наставником." #. type: Plain text #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:120 msgid "" "Just as we are all varied individuals, each mentee has different learning " "curves, time commitments, and other influencing factors that will contribute " "to the time required before they can \"fly solo\". Empirically, a mentee " "should be observed for at least 3 months. 90-100 commits is another target " "that a mentor could use before releasing a mentee. Other factors to " "consider prior releasing a mentee are the number of mistakes they may have " "made, QATs received etc. If they are still making rookie mistakes, they " "still require mentor guidance." msgstr "" "Как и все мы разные личности, у каждого подопечного свои кривые обучения, " "временные обязательства и другие влияющие факторы, которые будут влиять на " "время, необходимое перед тем, как они смогут «летать самостоятельно». " "Эмпирически, за подопечным следует наблюдать как минимум 3 месяца. 90-100 " "коммитов — это ещё один ориентир, который может использовать наставник перед " "тем, как отпустить подопечного. Другие факторы, которые следует учитывать " "перед освобождением подопечного, — это количество ошибок, которые они могли " "совершить, полученные QAT и т.д. Если они всё ещё делают ошибки новичка, им " "всё ещё требуется руководство наставника." #. type: Title === #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:122 #, no-wrap msgid "Mentor/Co-Mentor Debate" msgstr "Дискуссия о роли наставника/сонаставника" #. type: Plain text #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:126 msgid "" "When a request gets to portmgr, it usually reads as, \"I propose 'foo' for a " "ports commit bit, I will co-mentor with 'bar'\". Proposal received, voted, " "and carried." msgstr "" "Когда запрос поступает в portmgr, он обычно звучит так: «Я предлагаю «foo» " "для права коммита в порты, я буду со-наставником вместе с «bar»». " "Предложение получено, проголосовано и принято." #. type: Plain text #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:128 msgid "" "The mentor is the primary point of contact or the \"first among equals\", " "the co-mentor is the backup." msgstr "" "Наставник является основным контактным лицом или \"первым среди равных\", а " "сонаставник — его заместитель." #. type: Plain text #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:132 msgid "" "Some reprobate, whose name shall be withheld, made the https://lists.freebsd." "org/pipermail/cvs-ports/2007-September/134614.html[first recorded co-mentor " "commit]. Similar co-mentor commits have also been spotted in the src tree. " "Does this make it right? Does this make it wrong? It seems to be part of the " "evolution of how things are done." msgstr "" "Один \"ответственный\" участник, чьё имя мы опустим, сделал https://lists." "freebsd.org/pipermail/cvs-ports/2007-September/134614.html[первый " "зарегистрированный коммит с сонаставником]. Подобные коммиты с со-менторами " "также были замечены в дереве src. Делает ли это их правильными? Делает ли " "это их неправильными? Похоже, это часть эволюции того, как всё устроено." #. type: Plain text #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:139 msgid "" "We expect mentees to be prepared for constructive criticism from the " "community. There's still a lot of \"lore\" that is not written down. " "Responding well to constructive criticism is what we hope we are selecting " "for by first reviewing their existing contributions on IRC and mailing lists." msgstr "" "Мы ожидаем, что подопечные будут готовы к конструктивной критике от " -"сообщества. Здесь еще много \"преданий\" и традиций, неписанных правил. " +"сообщества. Здесь ещё много \"преданий\" и традиций, неписанных правил. " "Умение правильно реагировать на конструктивную критику — это то, на что мы " "обращаем внимание в первую очередь, оценивая вклад подопечных в IRC и в " "почтовых рассылках." #. type: Plain text #: documentation/content/en/articles/port-mentor-guidelines/_index.adoc:141 msgid "" "We warn mentees that some of the criticism they receive may be less " "\"constructive\" than others, (whether through language communication " "problems, or excessive nit-picking), and that dealing with this gracefully " "is just part of being in a large community. In case of specific problems " "with specific people, or any questions, we hope that they will approach a " "portmgr member on IRC or by email." msgstr "" "Мы предупреждаем подопечных, что часть критики может быть менее " "\"конструктивной\", чем остальная (будь то из-за проблем с языком общения " "или излишней придирчивости), и что умение достойно принимать такую критику — " "это часть участия в большом сообществе. В случае конкретных проблем с " "определёнными людьми или любых вопросов мы надеемся, что они обратятся к " "членам portmgr в IRC или по электронной почте." diff --git a/documentation/content/ru/articles/pr-guidelines/_index.po b/documentation/content/ru/articles/pr-guidelines/_index.po index a8d991ae80..759e6822a2 100644 --- a/documentation/content/ru/articles/pr-guidelines/_index.po +++ b/documentation/content/ru/articles/pr-guidelines/_index.po @@ -1,1636 +1,1636 @@ # SOME DESCRIPTIVE TITLE # Copyright (C) YEAR The FreeBSD Project # This file is distributed under the same license as the FreeBSD Documentation package. # Vladlen Popolitov , 2025, 2026. msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" "POT-Creation-Date: 2026-02-22 15:58+0000\n" -"PO-Revision-Date: 2026-03-04 20:01+0000\n" +"PO-Revision-Date: 2026-03-08 09:11+0000\n" "Last-Translator: Vladlen Popolitov \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 4.17\n" #. type: YAML Front Matter: description #: documentation/content/en/articles/pr-guidelines/_index.adoc:1 #, no-wrap msgid "These guidelines describe recommended handling practices for FreeBSD Problem Reports (PRs)." msgstr "Эти рекомендации описывают рекомендуемые методы обработки отчётов о проблемах FreeBSD (PR — Problem Reports)." #. type: Title = #: documentation/content/en/articles/pr-guidelines/_index.adoc:1 #: documentation/content/en/articles/pr-guidelines/_index.adoc:12 #, no-wrap msgid "Problem Report Handling Guidelines With Bugzilla" msgstr "Руководство по обработке отчётов о проблемах с помощью Bugzilla" #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:45 msgid "Abstract" msgstr "Аннотация" #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:48 msgid "" "These guidelines describe recommended handling practices for FreeBSD Problem " "Reports (PRs) as submitted via Bugzilla. Whilst developed for the FreeBSD " "Bugzilla Database Maintenance Team mailto:freebsd-bugbusters@FreeBSD." "org[freebsd-bugbusters@FreeBSD.org], these guidelines should be followed by " "anyone working with FreeBSD Problem Reports." msgstr "" "Эти рекомендации описывают рекомендуемые методы работы с отчётами о " "проблемах FreeBSD (PR), отправленных в Bugzilla. Хотя они разработаны для " "команды сопровождения базы данных FreeBSD Bugzilla mailto:freebsd-" "bugbusters@FreeBSD.org[freebsd-bugbusters@FreeBSD.org], эти рекомендации " "следует соблюдать всем, кто работает с отчётами о проблемах FreeBSD." #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:50 msgid "'''" msgstr "'''" #. type: Title == #: documentation/content/en/articles/pr-guidelines/_index.adoc:54 #, no-wrap msgid "Introduction" msgstr "Введение" #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:58 msgid "" "Bugzilla is an issue management system used by the FreeBSD Project. As " "accurate tracking of outstanding software defects is important to FreeBSD's " "quality, the correct use of the software is essential to the forward " "progress of the Project." msgstr "" "Bugzilla — это система управления задачами, используемая проектом FreeBSD. " "Поскольку точный учёт неисправленных программных ошибок важен для качества " "FreeBSD, правильное использование данного ПО критически необходимо для " "развития проекта." #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:61 msgid "" "Access to Bugzilla is available to the entire FreeBSD community. In order " "to maintain consistency within the database and provide a consistent user " "experience, guidelines have been established covering common aspects of bug " "management such as presenting followup, handling close requests, and so " "forth." msgstr "" "Доступ к Bugzilla предоставлен всему сообществу FreeBSD. Для поддержания " "согласованности в базе данных и обеспечения единообразного взаимодействия с " "пользователями были установлены руководящие принципы, охватывающие общие " "аспекты управления ошибками, такие как предоставление последующих действий, " "обработка запросов на закрытие и так далее." #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:63 msgid "" "Note: in this Article, the term \"PR\" means \"Bugzilla Problem Report\"." msgstr "" "Примечание: в этой статье под термином «PR» понимается «отчёт о проблеме в " "Bugzilla» (Bugzilla Problem Report)." #. type: Title == #: documentation/content/en/articles/pr-guidelines/_index.adoc:65 #, no-wrap msgid "Problem Report Life-cycle" msgstr "Жизненный цикл отчёта о проблеме" #. type: delimited block = 4 #: documentation/content/en/articles/pr-guidelines/_index.adoc:70 #: documentation/content/en/articles/pr-guidelines/_index.adoc:91 msgid "This section is obsolete and being rewritten as of January 2026." msgstr "" "Данный раздел устарел и переписывается по состоянию на январь 2026 года." #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:72 msgid "" "The Reporter submits a bug report on the website. The bug is in the `Needs " "Triage` state." msgstr "" "Репортер отправляет отчёт об ошибке на веб-сайте. Ошибка находится в " "состоянии `Needs Triage`." #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:73 msgid "" "Jane Random BugBuster confirms that the bug report has sufficient " "information to be reproducible. If not, she goes back and forth with the " "reporter to obtain the needed information. At this point the bug is set to " "the `Open` state." msgstr "" "Джейн Рэндом БагБастер подтверждает, что отчёт об ошибке содержит достаточно " "информации для её воспроизведения. Если нет, она взаимодействует с " "отправителем, чтобы получить необходимые данные. На этом этапе ошибке " "присваивается статус `Open`." #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:74 msgid "" "Joe Random Committer takes interest in the report and assigns it to himself, " "or Jane Random BugBuster decides that Joe is best suited to handle it and " "assigns it to him. The bug should be set to the `In Discussion` state." msgstr "" "Джо Рандом Коммиттер проявляет интерес к отчёту и назначает его себе, или " "Джейн Рандом БагБастер решает, что Джо лучше всего подходит для его решения " "и назначает его Джону. Ошибка должна быть переведена в состояние `In " "Discussion`." #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:75 msgid "" "Joe has a brief exchange with the originator (making sure it all goes into " "the audit trail) and determines the cause of the problem." msgstr "" "Джо кратко общается с инициатором (убедившись, что всё заносится в журнал " "аудита) и определяет причину проблемы." #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:76 msgid "" "Joe pulls an all-nighter and whips up a patch that he thinks fixes the " "problem, and submits it in a follow-up, asking the originator to test it. He " "then sets the report's state to `Patch Ready`." msgstr "" "Джо засиживается всю ночь и создает патч, который, как он считает, " "исправляет проблему, и отправляет его в ответном сообщении, прося автора " "проверить его. Затем он устанавливает состояние отчёта в `Patch Ready`." #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:77 msgid "" "A couple of iterations later, both Joe and the originator are satisfied with " "the patch, and Joe commits it to `-CURRENT` (or directly to `-STABLE` if the " "problem does not exist in `-CURRENT`), making sure to reference the Problem " "Report in his commit log (and credit the originator if they submitted all or " "part of the patch) and, if appropriate, start an MFC countdown. The bug is " "set to the `Needs MFC` state." msgstr "" "После нескольких итераций и Джо, и автор патча остаются довольны " "результатом, и Джо фиксирует его в `-CURRENT` (или напрямую в `-STABLE`, " "если проблема отсутствует в `-CURRENT`), обязательно указывая в логе коммита " "ссылку на отчёт о проблеме (а также упоминая автора, если он предоставил " "патч целиком или частично) и, если необходимо, запускает отсчёт для MFC. " "Ошибка переводится в состояние `Needs MFC`." #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:78 msgid "" "If the patch does not need MFCing, Joe then closes the report as `Issue " "Resolved`." msgstr "" "Если исправление не требует переноса в стабильную ветку (MFC), Джо закрывает " "отчёт с пометкой `Issue Resolved`." #. type: delimited block = 4 #: documentation/content/en/articles/pr-guidelines/_index.adoc:83 msgid "" "Many reports are submitted with very little information about the problem, " "and some are either very complex to solve, or just scratch the surface of a " "larger problem; in these cases, it is very important to obtain all the " "necessary information needed to solve the problem. If the problem contained " "within cannot be solved, or has occurred again, it is necessary to re-open " "the report." msgstr "" "Многие отчётов отправляются с очень небольшим количеством информации о " "проблеме, а некоторые либо очень сложны для решения, либо лишь поверхностно " "затрагивают более крупную проблему; в таких случаях крайне важно получить " "всю необходимую информацию для решения проблемы. Если проблему внутри нельзя " "решить или она возникла снова, необходимо переоткрыть отчёт." #. type: Title == #: documentation/content/en/articles/pr-guidelines/_index.adoc:86 #, no-wrap msgid "Problem Report State" msgstr "Состояние отчёта о проблеме" #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:94 msgid "" "It is important to update the state of a Problem Report when certain actions " "are taken. The state should accurately reflect the current state of work on " "the issue." msgstr "" "Важно обновлять состояние отчёта о проблеме при выполнении определённых " "действий. Состояние должно точно отражать текущий статус работы над " "проблемой." #. type: Block title #: documentation/content/en/articles/pr-guidelines/_index.adoc:95 #, no-wrap msgid "A small example on when to change PR state" msgstr "Небольшой пример, когда следует изменить состояние PR" #. type: delimited block = 4 #: documentation/content/en/articles/pr-guidelines/_index.adoc:100 msgid "" "When a PR has been worked on and the developer(s) responsible feel " "comfortable about the fix, they will submit a followup to the PR and change " "its state to \"feedback\". At this point, the originator should evaluate " "the fix in their context and respond indicating whether the defect has " "indeed been remedied." msgstr "" "Когда работа над PR завершена и ответственные разработчики уверены в " "исправлении, они отправят обновление в PR и изменят его состояние на " "«feedback». На этом этапе автор должен оценить исправление в своём контексте " "и ответить, была ли действительно устранена проблема." #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:103 msgid "A Problem Report may be in one of the following states:" msgstr "Отчёт о проблеме может находиться в одном из следующих состояний:" #. type: Labeled list #: documentation/content/en/articles/pr-guidelines/_index.adoc:104 #, no-wrap msgid "open" msgstr "open (открыто)" #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:106 msgid "Initial state; the problem has been pointed out and it needs reviewing." msgstr "Начальное состояние; проблема была указана и требует рассмотрения." #. type: Labeled list #: documentation/content/en/articles/pr-guidelines/_index.adoc:107 #, no-wrap msgid "analyzed" msgstr "analyzed (проанализировано)" #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:109 msgid "The problem has been reviewed and a solution is being sought." msgstr "Проблема была рассмотрена, и решение находится в разработке." #. type: Labeled list #: documentation/content/en/articles/pr-guidelines/_index.adoc:110 #, no-wrap msgid "feedback" msgstr "feedback (обратная связь)" #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:112 msgid "" "Further work requires additional information from the originator or the " "community; possibly information regarding the proposed solution." msgstr "" "Дальнейшая работа требует дополнительной информации от инициатора или " "сообщества; возможно, информации относительно предлагаемого решения." #. type: Labeled list #: documentation/content/en/articles/pr-guidelines/_index.adoc:113 #, no-wrap msgid "patched" msgstr "patched (исправлено)" #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:115 msgid "" "A patch has been committed, but something (MFC, or maybe confirmation from " "originator) is still pending." msgstr "" "Патч был закоммичен, но что-то (MFC или, возможно, подтверждение от автора) " "ещё ожидается." #. type: Labeled list #: documentation/content/en/articles/pr-guidelines/_index.adoc:116 #, no-wrap msgid "suspended" msgstr "suspended (приостановлено)" #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:121 msgid "" "The problem is not being worked on, due to lack of information or " "resources. This is a prime candidate for somebody who is looking for a " "project to take on. If the problem cannot be solved at all, it will be " "closed, rather than suspended. The documentation project uses suspended for " "wish-list items that entail a significant amount of work which no one " "currently has time for." msgstr "" "Проблема не решается из-за недостатка информации или ресурсов. Это отличный " "вариант для тех, кто ищет проект для реализации. Если проблему не удастся " "решить вовсе, она будет закрыта, а не приостановлена. Документационный " "проект использует статус «приостановлено» для пунктов списка пожеланий, " "требующих значительного объёма работы, на который у участников сейчас нет " "времени." #. type: Labeled list #: documentation/content/en/articles/pr-guidelines/_index.adoc:122 #, no-wrap msgid "closed" msgstr "closed (закрыто)" #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:124 msgid "" "A problem report is closed when any changes have been integrated, " "documented, and tested, or when fixing the problem is abandoned." msgstr "" "Проблемный отчёт закрывается, когда все изменения внедрены, " "задокументированы и протестированы, или когда исправление проблемы " "прекращено." #. type: delimited block = 4 #: documentation/content/en/articles/pr-guidelines/_index.adoc:128 msgid "" "The \"patched\" state is directly related to feedback, so you may go " "directly to \"closed\" state if the originator cannot test the patch, and it " "works in your own testing." msgstr "" "Состояние \"исправлено\" (patched) напрямую связано с обратной связью, " "поэтому вы можете перейти сразу в состояние \"закрыто\", если автор не может " "протестировать исправление, и оно работает в ваших собственных тестах." #. type: Title == #: documentation/content/en/articles/pr-guidelines/_index.adoc:131 #, no-wrap msgid "Types of Problem Reports" msgstr "Типы отчётов о проблемах" #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:134 msgid "" "While handling problem reports, either as a developer who has direct access " "to the Problem Reports database or as a contributor who browses the database " "and submits followups with patches, comments, suggestions or change " "requests, you will come across several different types of PRs." msgstr "" "При обработке отчётов о проблемах, будь вы разработчиком с прямым доступом к " "базе данных отчётов или участником, который просматривает базу данных и " "отправляет ответы с исправлениями, комментариями, предложениями или " "запросами на изменения, вы столкнетесь с несколькими различными типами PR." #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:136 msgid "crossref:pr-guidelines[pr-unassigned, Unassigned PRs]" msgstr "crossref:pr-guidelines[pr-unassigned, Неназначенные PR]" #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:137 msgid "crossref:pr-guidelines[pr-assigned, Assigned PRs]" msgstr "crossref:pr-guidelines[pr-assigned, Назначенные PR]" #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:138 msgid "crossref:pr-guidelines[pr-dups, Duplicate PRs]" msgstr "crossref:pr-guidelines[pr-dups, Дублирующие PR]" #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:139 msgid "crossref:pr-guidelines[pr-stale, Stale PRs]" msgstr "crossref:pr-guidelines[pr-stale, Устаревшие PR]" #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:140 msgid "crossref:pr-guidelines[pr-misfiled-notpr, Non-Bug PRs]" msgstr "crossref:pr-guidelines[pr-misfiled-notpr, Несвязанные с ошибками PR]" #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:142 msgid "" "The following sections describe what each different type of PRs is used for, " "when a PR belongs to one of these types, and what treatment each different " "type receives." msgstr "" "Следующие разделы описывают, для чего используется каждый из различных типов " "PR, когда PR относится к одному из этих типов и как обрабатывается каждый из " "различных типов." #. type: Title == #: documentation/content/en/articles/pr-guidelines/_index.adoc:144 #, no-wrap msgid "Unassigned PRs" msgstr "Неназначенные PR" #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:150 msgid "" "When PRs arrive, they are initially assigned to a generic (placeholder) " "assignee. These are always prepended with `freebsd-`. The exact value for " "this default depends on the category; in most cases, it corresponds to a " "specific FreeBSD mailing list. Here is the current list, with the most " "common ones listed first:" msgstr "" "Когда поступают PR, они изначально назначаются на обобщённого исполнителя. " "Такие исполнители всегда начинаются с префикса `freebsd-`. Точное значение " "по умолчанию зависит от категории; в большинстве случаев оно соответствует " "определённому списку рассылки FreeBSD. Вот текущий список, с наиболее " "распространёнными значениями в начале:" #. type: Block title #: documentation/content/en/articles/pr-guidelines/_index.adoc:152 #, no-wrap msgid "Default Assignees - most common" msgstr "Назначенные по умолчанию исполнители — наиболее распространённые" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:156 #: documentation/content/en/articles/pr-guidelines/_index.adoc:193 #: documentation/content/en/articles/pr-guidelines/_index.adoc:240 #: documentation/content/en/articles/pr-guidelines/_index.adoc:350 #: documentation/content/en/articles/pr-guidelines/_index.adoc:460 #, no-wrap msgid "Type" msgstr "Тип" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:157 #: documentation/content/en/articles/pr-guidelines/_index.adoc:194 #, no-wrap msgid "Categories" msgstr "Категории" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:159 #: documentation/content/en/articles/pr-guidelines/_index.adoc:196 #, no-wrap msgid "Default Assignee" msgstr "Назначенный по умолчанию" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:160 #, no-wrap msgid "base system" msgstr "базовая система" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:161 #, no-wrap msgid "bin, conf, gnu, kern, misc" msgstr "bin, conf, gnu, kern, misc" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:163 #, no-wrap msgid "freebsd-bugs" msgstr "freebsd-bugs" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:164 #, no-wrap msgid "architecture-specific" msgstr "специфичные от архитектуры" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:165 #, no-wrap msgid "arm, amd64, i386, mips" msgstr "arm, amd64, i386, mips" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:167 #, no-wrap msgid "freebsd-_arch_" msgstr "freebsd-_arch_" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:168 #, no-wrap msgid "architecture-specific: powerpc" msgstr "специфичные от архитектуры: powerpc" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:169 #, no-wrap msgid "powerpc64" msgstr "powerpc64" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:171 #: documentation/content/en/articles/pr-guidelines/_index.adoc:257 #, no-wrap msgid "freebsd-ppc" msgstr "freebsd-ppc" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:172 #, no-wrap msgid "architecture-specific: riscv64" msgstr "специфичные от архитектуры: riscv64" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:173 #, no-wrap msgid "riscv64" msgstr "riscv64" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:175 #, no-wrap msgid "freebsd-risc" msgstr "freebsd-risc" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:176 #, no-wrap msgid "ports collection" msgstr "коллекция портов" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:177 #: documentation/content/en/articles/pr-guidelines/_index.adoc:356 #: documentation/content/en/articles/pr-guidelines/_index.adoc:361 #: documentation/content/en/articles/pr-guidelines/_index.adoc:366 #: documentation/content/en/articles/pr-guidelines/_index.adoc:371 #: documentation/content/en/articles/pr-guidelines/_index.adoc:376 #: documentation/content/en/articles/pr-guidelines/_index.adoc:381 #: documentation/content/en/articles/pr-guidelines/_index.adoc:386 #: documentation/content/en/articles/pr-guidelines/_index.adoc:391 #: documentation/content/en/articles/pr-guidelines/_index.adoc:396 #: documentation/content/en/articles/pr-guidelines/_index.adoc:401 #: documentation/content/en/articles/pr-guidelines/_index.adoc:406 #: documentation/content/en/articles/pr-guidelines/_index.adoc:411 #: documentation/content/en/articles/pr-guidelines/_index.adoc:416 #: documentation/content/en/articles/pr-guidelines/_index.adoc:421 #: documentation/content/en/articles/pr-guidelines/_index.adoc:426 #: documentation/content/en/articles/pr-guidelines/_index.adoc:431 #: documentation/content/en/articles/pr-guidelines/_index.adoc:436 #: documentation/content/en/articles/pr-guidelines/_index.adoc:441 #: documentation/content/en/articles/pr-guidelines/_index.adoc:446 #, no-wrap msgid "ports" msgstr "ports" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:179 #, no-wrap msgid "freebsd-ports-bugs" msgstr "freebsd-ports-bugs" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:180 #, no-wrap msgid "documentation shipped with the system" msgstr "документация, поставляемая с системой" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:181 #, no-wrap msgid "docs" msgstr "docs" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:183 #, no-wrap msgid "freebsd-doc" msgstr "freebsd-doc" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:184 #, no-wrap msgid "FreeBSD web pages (not including docs)" msgstr "веб-страницы FreeBSD (за исключением документации)" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:185 #, no-wrap msgid "Website" msgstr "Website" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:186 #, no-wrap msgid "freebsd-www" msgstr "freebsd-www" #. type: Block title #: documentation/content/en/articles/pr-guidelines/_index.adoc:189 #, no-wrap msgid "Default Assignees - other" msgstr "Назначенные по умолчанию - другие" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:197 #, no-wrap msgid "advocacy efforts" msgstr "усилия по продвижению" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:198 #, no-wrap msgid "advocacy" msgstr "advocacy" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:200 #, no-wrap msgid "freebsd-advocacy" msgstr "freebsd-advocacy" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:201 #, no-wrap msgid "Java Virtual Machine(TM) problems" msgstr "проблемы с Java Virtual Machine(TM)" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:202 #, no-wrap msgid "java" msgstr "java" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:204 #: documentation/content/en/articles/pr-guidelines/_index.adoc:402 #, no-wrap msgid "freebsd-java" msgstr "freebsd-java" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:205 #, no-wrap msgid "standards compliance" msgstr "соответствие стандартам" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:206 #, no-wrap msgid "standards" msgstr "standards" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:208 #, no-wrap msgid "freebsd-standards" msgstr "freebsd-standards" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:209 #, no-wrap msgid "threading libraries" msgstr "библиотеки потоков" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:210 #, no-wrap msgid "threads" msgstr "threads" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:212 #, no-wrap msgid "freebsd-threads" msgstr "freebsd-threads" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:213 #, no-wrap msgid "man:usb[4] subsystem" msgstr "подсистема man:usb[4]" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:214 #, no-wrap msgid "usb" msgstr "usb" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:215 #, no-wrap msgid "freebsd-usb" msgstr "freebsd-usb" #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:221 msgid "" "Do not be surprised to find that the submitter of the PR has assigned it to " "the wrong category. If you fix the category, do not forget to fix the " "assignment as well. (In particular, our submitters seem to have a hard time " "understanding that just because their problem manifested on an i386 system, " "that it might be generic to all of FreeBSD, and thus be more appropriate for " "`kern`. The converse is also true, of course.)" msgstr "" "Не удивляйтесь, если обнаружите, что автор PR назначил ему неверную " "категорию. Если вы исправите категорию, не забудьте также исправить " "назначение. (В частности, наши авторы, похоже, с трудом понимают, что даже " "если их проблема проявилась на системе i386, она может быть общей для всей " "FreeBSD и, следовательно, более уместна в `kern`. Обратное, конечно, тоже " "верно.)" #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:224 msgid "" "Certain PRs may be reassigned away from these generic assignees by anyone. " "There are several types of assignees: specialized mailing lists; mail " "aliases (used for certain limited-interest items); and individuals." msgstr "" "Некоторые PR могут быть переназначены с этих общих ответственных любым " "человеком. Существует несколько типов ответственных: специализированные " "почтовые рассылки, почтовые алиасы (используются для определённых элементов " "с ограниченным интересом) и отдельные лица." #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:227 msgid "" "For assignees which are mailing lists, please use the long form when making " "the assignment (e.g., `freebsd-foo` instead of `foo`); this will avoid " "duplicate emails sent to the mailing list." msgstr "" "Для назначений, которые являются списками рассылки, используйте полную форму " "при назначении (например, `freebsd-foo` вместо `foo`); это позволит избежать " "дублирования писем, отправляемых в список рассылки." #. type: delimited block = 4 #: documentation/content/en/articles/pr-guidelines/_index.adoc:231 msgid "" "Since the list of individuals who have volunteered to be the default " "assignee for certain types of PRs changes so often, it is much more suitable " "for https://wiki.freebsd.org/AssigningPRs[the FreeBSD wiki]." msgstr "" "Поскольку список людей, которые добровольно согласились быть ответственными " "по умолчанию за определённые типы PR, меняется так часто, эта информация " "гораздо лучше подходит для https://wiki.freebsd.org/AssigningPRs[вики " "FreeBSD]." #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:234 msgid "Here is a sample list of such entities; it is probably not complete." msgstr "Вот примерный список таких объектов; возможно, он не полный." #. type: Block title #: documentation/content/en/articles/pr-guidelines/_index.adoc:236 #, no-wrap msgid "Common Assignees - base system" msgstr "Общие ответственные исполнители — базовая система" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:241 #: documentation/content/en/articles/pr-guidelines/_index.adoc:351 #: documentation/content/en/articles/pr-guidelines/_index.adoc:461 #, no-wrap msgid "Suggested Category" msgstr "Предполагаемая категория" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:242 #: documentation/content/en/articles/pr-guidelines/_index.adoc:352 #: documentation/content/en/articles/pr-guidelines/_index.adoc:462 #, no-wrap msgid "Suggested Assignee" msgstr "Предполагаемый исполнитель" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:244 #: documentation/content/en/articles/pr-guidelines/_index.adoc:354 #: documentation/content/en/articles/pr-guidelines/_index.adoc:464 #, no-wrap msgid "Assignee Type" msgstr "Тип Назначенного" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:245 #, no-wrap msgid "problem specific to the ARM(R) architecture" msgstr "проблема, специфичная для архитектуры ARM(R)" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:246 #, no-wrap msgid "arm" msgstr "arm" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:247 #, no-wrap msgid "freebsd-arm" msgstr "freebsd-arm" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:249 #: documentation/content/en/articles/pr-guidelines/_index.adoc:254 #: documentation/content/en/articles/pr-guidelines/_index.adoc:259 #: documentation/content/en/articles/pr-guidelines/_index.adoc:264 #: documentation/content/en/articles/pr-guidelines/_index.adoc:269 #: documentation/content/en/articles/pr-guidelines/_index.adoc:274 #: documentation/content/en/articles/pr-guidelines/_index.adoc:279 #: documentation/content/en/articles/pr-guidelines/_index.adoc:284 #: documentation/content/en/articles/pr-guidelines/_index.adoc:289 #: documentation/content/en/articles/pr-guidelines/_index.adoc:294 #: documentation/content/en/articles/pr-guidelines/_index.adoc:299 #: documentation/content/en/articles/pr-guidelines/_index.adoc:304 #: documentation/content/en/articles/pr-guidelines/_index.adoc:309 #: documentation/content/en/articles/pr-guidelines/_index.adoc:314 #: documentation/content/en/articles/pr-guidelines/_index.adoc:319 #: documentation/content/en/articles/pr-guidelines/_index.adoc:324 #: documentation/content/en/articles/pr-guidelines/_index.adoc:329 #: documentation/content/en/articles/pr-guidelines/_index.adoc:334 #: documentation/content/en/articles/pr-guidelines/_index.adoc:339 #: documentation/content/en/articles/pr-guidelines/_index.adoc:343 #: documentation/content/en/articles/pr-guidelines/_index.adoc:364 #: documentation/content/en/articles/pr-guidelines/_index.adoc:379 #: documentation/content/en/articles/pr-guidelines/_index.adoc:384 #: documentation/content/en/articles/pr-guidelines/_index.adoc:389 #: documentation/content/en/articles/pr-guidelines/_index.adoc:404 #: documentation/content/en/articles/pr-guidelines/_index.adoc:409 #: documentation/content/en/articles/pr-guidelines/_index.adoc:414 #: documentation/content/en/articles/pr-guidelines/_index.adoc:419 #: documentation/content/en/articles/pr-guidelines/_index.adoc:424 #: documentation/content/en/articles/pr-guidelines/_index.adoc:429 #: documentation/content/en/articles/pr-guidelines/_index.adoc:434 #: documentation/content/en/articles/pr-guidelines/_index.adoc:448 #, no-wrap msgid "mailing list" msgstr "список рассылки" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:250 #, no-wrap msgid "problem specific to the MIPS(R) architecture" msgstr "проблема, специфичная для архитектуры MIPS(R)" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:251 #: documentation/content/en/articles/pr-guidelines/_index.adoc:256 #: documentation/content/en/articles/pr-guidelines/_index.adoc:261 #: documentation/content/en/articles/pr-guidelines/_index.adoc:266 #: documentation/content/en/articles/pr-guidelines/_index.adoc:271 #: documentation/content/en/articles/pr-guidelines/_index.adoc:276 #: documentation/content/en/articles/pr-guidelines/_index.adoc:281 #: documentation/content/en/articles/pr-guidelines/_index.adoc:286 #: documentation/content/en/articles/pr-guidelines/_index.adoc:291 #: documentation/content/en/articles/pr-guidelines/_index.adoc:296 #: documentation/content/en/articles/pr-guidelines/_index.adoc:301 #: documentation/content/en/articles/pr-guidelines/_index.adoc:306 #: documentation/content/en/articles/pr-guidelines/_index.adoc:311 #: documentation/content/en/articles/pr-guidelines/_index.adoc:316 #: documentation/content/en/articles/pr-guidelines/_index.adoc:321 #: documentation/content/en/articles/pr-guidelines/_index.adoc:331 #: documentation/content/en/articles/pr-guidelines/_index.adoc:336 #: documentation/content/en/articles/pr-guidelines/_index.adoc:341 #, no-wrap msgid "kern" msgstr "kern" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:252 #, no-wrap msgid "freebsd-mips" msgstr "freebsd-mips" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:255 #, no-wrap msgid "problem specific to the PowerPC(R) architecture" msgstr "проблема, специфичная для архитектуры PowerPC(R)" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:260 #, no-wrap msgid "problem with Advanced Configuration and Power Management (man:acpi[4])" msgstr "проблема с Advanced Configuration and Power Management (man:acpi[4])" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:262 #, no-wrap msgid "freebsd-acpi" msgstr "freebsd-acpi" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:265 #, no-wrap msgid "problem with embedded or small-footprint FreeBSD systems (e.g., NanoBSD/PicoBSD/FreeBSD-arm)" msgstr "проблема со встроенными или компактными системами FreeBSD (например, NanoBSD/PicoBSD/FreeBSD-arm)" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:267 #, no-wrap msgid "freebsd-embedded" msgstr "freebsd-embedded" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:270 #, no-wrap msgid "problem with FireWire(R) drivers" msgstr "проблема с драйверами FireWire(R)" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:272 #, no-wrap msgid "freebsd-firewire" msgstr "freebsd-firewire" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:275 #, no-wrap msgid "problem with the filesystem code" msgstr "проблема с кодом файловой системы" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:277 #, no-wrap msgid "freebsd-fs" msgstr "freebsd-fs" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:280 #, no-wrap msgid "problem with the man:geom[4] subsystem" msgstr "проблема с подсистемой man:geom[4]" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:282 #, no-wrap msgid "freebsd-geom" msgstr "freebsd-geom" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:285 #, no-wrap msgid "problem with the man:ipfw[4] subsystem" msgstr "проблема с подсистемой man:ipfw[4]" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:287 #, no-wrap msgid "freebsd-ipfw" msgstr "freebsd-ipfw" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:290 #, no-wrap msgid "man:jail[8] subsystem" msgstr "подсистема man:jail[8]" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:292 #, no-wrap msgid "freebsd-jail" msgstr "freebsd-jail" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:295 #, no-wrap msgid "problem with Linux(R) or SVR4 emulation" msgstr "проблема с эмуляцией Linux(R) или SVR4" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:297 #, no-wrap msgid "freebsd-emulation" msgstr "freebsd-emulation" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:300 #, no-wrap msgid "problem with the networking stack" msgstr "проблема со стеком сетевых протоколов" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:302 #, no-wrap msgid "freebsd-net" msgstr "freebsd-net" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:305 #, no-wrap msgid "problem with the man:pf[4] subsystem" msgstr "проблема с подсистемой man:pf[4]" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:307 #, no-wrap msgid "freebsd-pf" msgstr "freebsd-pf" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:310 #, no-wrap msgid "problem with the man:scsi[4] subsystem" msgstr "проблема с подсистемой man:scsi[4]" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:312 #, no-wrap msgid "freebsd-scsi" msgstr "freebsd-scsi" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:315 #, no-wrap msgid "problem with the man:sound[4] subsystem" msgstr "проблема с подсистемой man:sound[4]" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:317 #, no-wrap msgid "freebsd-multimedia" msgstr "freebsd-multimedia" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:320 #, no-wrap msgid "problems with the man:wlan[4] subsystem and wireless drivers" msgstr "проблемы с подсистемой man:wlan[4] и беспроводными драйверами" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:322 #, no-wrap msgid "freebsd-wireless" msgstr "freebsd-wireless" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:325 #, no-wrap msgid "problem with man:sysinstall[8] or man:bsdinstall[8]" msgstr "проблема с man:sysinstall[8] или man:bsdinstall[8]" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:326 #: documentation/content/en/articles/pr-guidelines/_index.adoc:466 #, no-wrap msgid "bin" msgstr "bin" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:327 #, no-wrap msgid "freebsd-sysinstall" msgstr "freebsd-sysinstall" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:330 #, no-wrap msgid "problem with the system startup scripts (man:rc[8])" msgstr "проблема со скриптами запуска системы (man:rc[8])" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:332 #, no-wrap msgid "freebsd-rc" msgstr "freebsd-rc" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:335 #, no-wrap msgid "problem with VIMAGE or VNET functionality and related code" msgstr "проблема с функциональностью VIMAGE или VNET и связанным кодом" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:337 #, no-wrap msgid "freebsd-virtualization" msgstr "freebsd-virtualization" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:340 #, no-wrap msgid "problem with Xen emulation" msgstr "проблема с эмуляцией Xen" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:342 #, no-wrap msgid "freebsd-xen" msgstr "freebsd-xen" #. type: Block title #: documentation/content/en/articles/pr-guidelines/_index.adoc:346 #, no-wrap msgid "Common Assignees - Ports Collection" msgstr "Общие ответственные исполнители — Коллекция портов" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:355 #, no-wrap msgid "problem with the ports framework (__not__ with an individual port!)" msgstr "проблема с фреймворком портов (__не__ с отдельным портом!)" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:357 #, no-wrap msgid "portmgr" msgstr "portmgr" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:359 #: documentation/content/en/articles/pr-guidelines/_index.adoc:369 #: documentation/content/en/articles/pr-guidelines/_index.adoc:374 #: documentation/content/en/articles/pr-guidelines/_index.adoc:394 #: documentation/content/en/articles/pr-guidelines/_index.adoc:399 #: documentation/content/en/articles/pr-guidelines/_index.adoc:439 #: documentation/content/en/articles/pr-guidelines/_index.adoc:444 #: documentation/content/en/articles/pr-guidelines/_index.adoc:469 #: documentation/content/en/articles/pr-guidelines/_index.adoc:473 #, no-wrap msgid "alias" msgstr "alias" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:360 #, no-wrap msgid "port which is maintained by apache@FreeBSD.org" msgstr "порт, который поддерживается apache@FreeBSD.org" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:362 #, no-wrap msgid "apache" msgstr "apache" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:365 #, no-wrap msgid "port which is maintained by autotools@FreeBSD.org" msgstr "порт, который поддерживается autotools@FreeBSD.org" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:367 #, no-wrap msgid "autotools" msgstr "autotools" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:370 #, no-wrap msgid "port which is maintained by doceng@FreeBSD.org" msgstr "порт, который поддерживается doceng@FreeBSD.org" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:372 #, no-wrap msgid "doceng" msgstr "doceng" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:375 #, no-wrap msgid "port which is maintained by eclipse@FreeBSD.org" msgstr "порт, который поддерживается eclipse@FreeBSD.org" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:377 #, no-wrap msgid "freebsd-eclipse" msgstr "freebsd-eclipse" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:380 #, no-wrap msgid "port which is maintained by gecko@FreeBSD.org" msgstr "порт, который поддерживается gecko@FreeBSD.org" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:382 #, no-wrap msgid "gecko" msgstr "gecko" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:385 #, no-wrap msgid "port which is maintained by gnome@FreeBSD.org" msgstr "порт, который поддерживается gnome@FreeBSD.org" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:387 #, no-wrap msgid "gnome" msgstr "gnome" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:390 #, no-wrap msgid "port which is maintained by hamradio@FreeBSD.org" msgstr "порт, который поддерживается hamradio@FreeBSD.org" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:392 #, no-wrap msgid "hamradio" msgstr "hamradio" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:395 #, no-wrap msgid "port which is maintained by haskell@FreeBSD.org" msgstr "порт, который поддерживается haskell@FreeBSD.org" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:397 #, no-wrap msgid "haskell" msgstr "haskell" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:400 #, no-wrap msgid "port which is maintained by java@FreeBSD.org" msgstr "порт, который поддерживается java@FreeBSD.org" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:405 #, no-wrap msgid "port which is maintained by kde@FreeBSD.org" msgstr "порт, который поддерживается kde@FreeBSD.org" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:407 #, no-wrap msgid "kde" msgstr "kde" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:410 #, no-wrap msgid "port which is maintained by mono@FreeBSD.org" msgstr "порт, который поддерживается mono@FreeBSD.org" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:412 #, no-wrap msgid "mono" msgstr "mono" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:415 #, no-wrap msgid "port which is maintained by office@FreeBSD.org" msgstr "порт, который поддерживается office@FreeBSD.org" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:417 #, no-wrap msgid "freebsd-office" msgstr "freebsd-office" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:420 #, no-wrap msgid "port which is maintained by perl@FreeBSD.org" msgstr "порт, который поддерживается perl@FreeBSD.org" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:422 #, no-wrap msgid "perl" msgstr "perl" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:425 #, no-wrap msgid "port which is maintained by python@FreeBSD.org" msgstr "порт, который поддерживается python@FreeBSD.org" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:427 #, no-wrap msgid "freebsd-python" msgstr "freebsd-python" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:430 #, no-wrap msgid "port which is maintained by ruby@FreeBSD.org" msgstr "порт, который поддерживается ruby@FreeBSD.org" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:432 #, no-wrap msgid "freebsd-ruby" msgstr "freebsd-ruby" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:435 #, no-wrap msgid "port which is maintained by secteam@FreeBSD.org" msgstr "порт, который поддерживается secteam@FreeBSD.org" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:437 #, no-wrap msgid "secteam" msgstr "secteam" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:440 #, no-wrap msgid "port which is maintained by vbox@FreeBSD.org" msgstr "порт, который поддерживается vbox@FreeBSD.org" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:442 #, no-wrap msgid "vbox" msgstr "vbox" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:445 #, no-wrap msgid "port which is maintained by x11@FreeBSD.org" msgstr "порт, который поддерживается x11@FreeBSD.org" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:447 #, no-wrap msgid "freebsd-x11" msgstr "freebsd-x11" #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:451 msgid "" "Ports PRs which have a maintainer who is a ports committer may be reassigned " "by anyone (but note that not every FreeBSD committer is necessarily a ports " "committer, so you cannot simply go by the email address alone.)" msgstr "" "PR портов, у которых есть сопровождающий, являющийся коммиттером портов, " "могут быть переназначены кем угодно (но обратите внимание, что не каждый " "коммиттер FreeBSD обязательно является коммиттером портов, поэтому нельзя " "ориентироваться только на адрес электронной почты.)" #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:454 msgid "" "For other PRs, please do not reassign them to individuals (other than " "yourself) unless you are certain that the assignee really wants to track the " "PR. This will help to avoid the case where no one looks at fixing a " "particular problem because everyone assumes that the assignee is already " "working on it." msgstr "" "Для других PR (запросов на включение изменений) не перераспределяйте их " "между участниками (кроме себя), если вы не уверены, что назначенный участник " "действительно хочет отслеживать PR. Это поможет избежать ситуации, когда " "никто не занимается исправлением конкретной проблемы, потому что все " "предполагают, что назначенный участник уже работает над ней." #. type: Block title #: documentation/content/en/articles/pr-guidelines/_index.adoc:456 #, no-wrap msgid "Common Assignees - Other" msgstr "Общие ответственные исполнители — Прочие" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:465 #, no-wrap msgid "problem with Problem Report database" msgstr "проблема с базой данных отчётов о проблемах" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:467 #: documentation/content/en/articles/pr-guidelines/_index.adoc:472 #, no-wrap msgid "bugmeister" msgstr "bugmeister" #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:470 #, no-wrap msgid "problem with Bugzilla https://bugs.freebsd.org/submit/[web form]." msgstr "проблема с https://bugs.freebsd.org/submit/[веб-формой] Bugzilla." #. type: Table #: documentation/content/en/articles/pr-guidelines/_index.adoc:471 #, no-wrap msgid "doc" msgstr "doc" #. type: Title == #: documentation/content/en/articles/pr-guidelines/_index.adoc:476 #, no-wrap msgid "Assigned PRs" msgstr "Назначенные PR" #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:479 msgid "" "If a PR has the `responsible` field set to the username of a FreeBSD " "developer, it means that the PR has been handed over to that particular " "person for further work." msgstr "" "Если в PR поле `responsible` содержит имя пользователя разработчика FreeBSD, " "это означает, что PR передан этому конкретному человеку для дальнейшей " "работы." #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:484 msgid "" "Assigned PRs should not be touched by anyone but the assignee or " "bugmeister. If you have comments, submit a followup. If for some reason " "you think the PR should change state or be reassigned, send a message to the " "assignee. If the assignee does not respond within two weeks, unassign the " "PR and do as you please." msgstr "" "Назначенные PR не должны изменяться никем, кроме назначенного исполнителя " "или bugmeister. Если у вас есть комментарии, отправьте последующее " "сообщение. Если по какой-либо причине вы считаете, что PR должен изменить " "состояние или быть переназначен, отправьте сообщение назначенному " "исполнителю. Если назначенный исполнитель не ответит в течение двух недель, " "снимите назначение с PR и действуйте по своему усмотрению." #. type: Title == #: documentation/content/en/articles/pr-guidelines/_index.adoc:486 #, no-wrap msgid "Duplicate PRs" msgstr "Дублирующие PR" #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:490 msgid "" "If you find more than one PR that describe the same issue, choose the one " "that contains the largest amount of useful information and close the others, " "stating clearly the number of the superseding PR. If several PRs contain " "non-overlapping useful information, submit all the missing information to " "one in a followup, including references to the others; then close the other " "PRs (which are now completely superseded)." msgstr "" "Если вы обнаружили несколько PR, описывающих одну и ту же проблему, выберите " "тот, который содержит наибольшее количество полезной информации, и закройте " "остальные, явно указав номер заменяющего PR. Если в нескольких PR содержится " "неперекрывающаяся полезная информация, добавьте всю недостающую информацию в " "один из них в виде последующего сообщения, включая ссылки на остальные PR; " "затем закройте другие PR (которые теперь полностью заменены)." #. type: Title == #: documentation/content/en/articles/pr-guidelines/_index.adoc:492 #, no-wrap msgid "Stale PRs" msgstr "Устаревшие PR" #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:495 msgid "" "A PR is considered stale if it has not been modified in more than six " "months. Apply the following procedure to deal with stale PRs:" msgstr "" "PR считается устаревшим, если он не изменялся более шести месяцев. Для " "обработки устаревших PR примените следующую процедуру:" #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:497 msgid "" "If the PR contains sufficient detail, try to reproduce the problem in `-" "CURRENT` and `-STABLE`. If you succeed, submit a followup detailing your " "findings and try to find someone to assign it to. Set the state to \"analyzed" "\" if appropriate." msgstr "" "Если PR содержит достаточно деталей, попробуйте воспроизвести проблему в `-" "CURRENT` и `-STABLE`. Если удастся, отправьте уточнение с вашими находками и " "попытайтесь найти, кому можно назначить задачу. Установите состояние " "\"analyzed\" (проанализировано), если это уместно." #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:498 msgid "" "If the PR describes an issue which you know is the result of a usage error " "(incorrect configuration or otherwise), submit a followup explaining what " "the originator did wrong, then close the PR with the reason \"User error\" " "or \"Configuration error\"." msgstr "" "Если PR описывает проблему, которая, как вам известно, является результатом " "ошибки использования (неправильной конфигурации или иной), отправьте " "комментарий с объяснением, что сделал не так автор, затем закройте PR с " "причиной \"Ошибка пользователя\" или \"Ошибка конфигурации\"." #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:499 msgid "" "If the PR describes an error which you know has been corrected in both `-" "CURRENT` and `-STABLE`, close it with a message stating when it was fixed in " "each branch." msgstr "" "Если PR описывает ошибку, которая, как вам известно, была исправлена в обеих " "ветках `-CURRENT` и `-STABLE`, закройте его с сообщением, указывающим, когда " "она была исправлена в каждой из веток." #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:500 msgid "" "If the PR describes an error which you know has been corrected in `-" "CURRENT`, but not in `-STABLE`, try to find out when the person who " "corrected it is planning to MFC it, or try to find someone else (maybe " "yourself?) to do it. Set the state to \"patched\" and assign it to whomever " "will do the MFC." msgstr "" "Если PR описывает ошибку, которая, как вам известно, исправлена в `-" "CURRENT`, но не в `-STABLE`, попытайтесь выяснить, когда планируется перенос " "исправления (MFC), или найдите кого-то (возможно, себя?), кто сможет это " "сделать. Установите статус \"patched\" и назначьте задачу тому, кто займётся " "переносом исправления (MFC)." #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:501 msgid "" "In other cases, ask the originator to confirm if the problem still exists in " "newer versions. If the originator does not reply within a month, close the " "PR with the notation \"Feedback timeout\"." msgstr "" "В других случаях попросите автора подтвердить, сохраняется ли проблема в " "более новых версиях. Если автор не ответит в течение месяца, закройте PR с " "пометкой \"Истекло время ожидания ответа\"." #. type: Title == #: documentation/content/en/articles/pr-guidelines/_index.adoc:503 #, no-wrap msgid "Non-Bug PRs" msgstr "Не связанные с ошибками PR" #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:506 msgid "" "Developers that come across PRs that look like they should have been posted " "to {freebsd-bugs} or some other list should close the PR, informing the " "submitter in a comment why this is not really a PR and where the message " "should be posted." msgstr "" "Разработчики, которые сталкиваются с PR, которые, по их мнению, должны были " "быть отправлены в {freebsd-bugs} или какой-либо другой список, должны " "закрыть PR, сообщив отправителю в комментарии, почему это не является PR и " "куда следует отправить сообщение." #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:509 msgid "" "The email addresses that Bugzilla listens to for incoming PRs have been " "published as part of the FreeBSD documentation, have been announced and " "listed on the web-site. This means that spammers found them." msgstr "" "Адреса электронной почты, которые Bugzilla использует для входящих PR, были " "опубликованы как часть документации FreeBSD, объявлены и перечислены на веб-" "сайте. Это означает, что спамеры их обнаружили." #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:511 msgid "Whenever you close one of these PRs, please do the following:" msgstr "" "Всякий раз, когда вы закрываете один из этих PR, пожалуйста, выполните " "следующее:" #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:513 msgid "Set the component to `junk` (under `Supporting Services`)." msgstr "" "Установите компонент в значение `junk` (в разделе `Поддерживающие сервисы`)." #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:514 msgid "Set Responsible to `nobody@FreeBSD.org`." msgstr "Установить Responsible в `nobody@FreeBSD.org`." #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:515 msgid "Set State to `Issue Resolved`." msgstr "Установите состояние `Issue Resolved`." #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:517 msgid "" "Setting the category to `junk` makes it obvious that there is no useful " "content within the PR, and helps to reduce the clutter within the main " "categories." msgstr "" "Установка категории в `junk` делает очевидным отсутствие полезного " "содержимого в PR и помогает уменьшить беспорядок в основных категориях." #. type: Title == #: documentation/content/en/articles/pr-guidelines/_index.adoc:519 #, no-wrap msgid "Further Reading" msgstr "Для дальнейшего ознакомления" #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:523 msgid "" "This is a list of resources relevant to the proper writing and processing of " "problem reports. It is by no means complete." msgstr "" "Это список информационных ресурсов, относящихся к правильному написанию и " "обработке сообщений о проблемах. Он, без сомнения, не полон." #. type: Plain text #: documentation/content/en/articles/pr-guidelines/_index.adoc:524 msgid "" "extref:{problem-reports}[How to Write FreeBSD Problem Reports]-guidelines " "for Problem Report originators." msgstr "" "extref:{problem-reports}[Как писать отчёты о проблемах в FreeBSD]-" "рекомендации для авторов отчётов." #, no-wrap #~ msgid "alpha, amd64, arm, i386, ia64, powerpc, sparc64" #~ msgstr "alpha, amd64, arm, i386, ia64, powerpc, sparc64" #, no-wrap #~ msgid "problem with Asynchronous Transfer Mode (ATM) drivers" #~ msgstr "проблема с драйверами Asynchronous Transfer Mode (ATM)" #, no-wrap #~ msgid "freebsd-atm" #~ msgstr "freebsd-atm" #, no-wrap #~ msgid "problem with Integrated Services Digital Network (ISDN) drivers" #~ msgstr "проблема с драйверами Integrated Services Digital Network (ISDN)" #, no-wrap #~ msgid "freebsd-isdn" #~ msgstr "freebsd-isdn" diff --git a/documentation/content/ru/articles/rc-scripting/_index.adoc b/documentation/content/ru/articles/rc-scripting/_index.adoc index f8674c68a6..d95808356b 100644 --- a/documentation/content/ru/articles/rc-scripting/_index.adoc +++ b/documentation/content/ru/articles/rc-scripting/_index.adoc @@ -1,775 +1,775 @@ --- authors: - author: 'Yar Tikhiy' email: yar@FreeBSD.org copyright: '2005-2006, 2012 The FreeBSD Project' description: 'Руководство по написанию новых rc.d-скриптов и пониманию уже существующих' tags: ["rc.d", "scripting", "guide", "tutorial", "FreeBSD"] title: 'Практическое руководство по написанию rc.d скриптов в BSD' trademarks: ["freebsd", "netbsd", "general"] --- = Практическое руководство по написанию rc.d скриптов в BSD :doctype: article :toc: macro :toclevels: 1 :icons: font :sectnums: :sectnumlevels: 6 :source-highlighter: rouge :experimental: :images-path: articles/rc-scripting/ ifdef::env-beastie[] ifdef::backend-html5[] include::shared/authors.adoc[] include::shared/mirrors.adoc[] include::shared/releases.adoc[] include::shared/attributes/attributes-{{% lang %}}.adoc[] include::shared/{{% lang %}}/teams.adoc[] include::shared/{{% lang %}}/mailing-lists.adoc[] include::shared/{{% lang %}}/urls.adoc[] :imagesdir: ../../../images/{images-path} endif::[] ifdef::backend-pdf,backend-epub3[] include::../../../../shared/asciidoctor.adoc[] endif::[] endif::[] ifndef::env-beastie[] include::../../../../../shared/asciidoctor.adoc[] endif::[] [.abstract-title] Аннотация Новичкам может быть сложно соотнести факты из официальной документации по фреймворку [.filename]#rc.d# в BSD с практическими задачами написания скриптов для [.filename]#rc.d#. В этой статье мы рассмотрим несколько типичных случаев возрастающей сложности, покажем возможности [.filename]#rc.d#, подходящие для каждого случая, и обсудим, как они работают. Такое рассмотрение должно дать ориентиры для дальнейшего изучения устройства и эффективного применения [.filename]#rc.d#. ''' toc::[] [[rcng-intro]] == Введение Исторически в BSD был монолитный стартовый сценарий [.filename]#/etc/rc#. Он вызывался man:init[8] во время загрузки системы и выполнял все задачи пользовательского пространства, необходимые для многопользовательского режима: проверку и монтирование файловых систем, настройку сети, запуск демонов и так далее. Точный список задач не был одинаковым в каждой системе; администраторам требовалось его настраивать. За редкими исключениями, [.filename]#/etc/rc# приходилось изменять, и настоящим хакерам это нравилось. Основная проблема монолитного подхода заключалась в том, что он не предоставлял контроля над отдельными компонентами, запускаемыми из [.filename]#/etc/rc#. Например, [.filename]#/etc/rc# не мог перезапустить отдельный демон. Администратору системы приходилось вручную находить процесс демона, завершать его, ждать, пока он действительно завершится, затем искать в [.filename]#/etc/rc# нужные флаги и, наконец, вводить полную командную строку для повторного запуска демона. Задача становилась ещё сложнее и более подверженной ошибкам, если служба состояла из нескольких демонов или требовала дополнительных действий. Одним словом, единый скрипт не справлялся с тем, для чего скрипты вообще предназначены: облегчать жизнь администратору системы. Позже была предпринята попытка разделить некоторые части [.filename]#/etc/rc# для возможности отдельного запуска наиболее важных подсистем. Известным примером стал [.filename]#/etc/netstart#, предназначенный для настройки сети. Это позволяло получить доступ к сети в однопользовательском режиме, но плохо интегрировалось в автоматический процесс запуска, так как части его кода требовалось переплетаться с действиями, по сути не связанными с сетью. Именно поэтому [.filename]#/etc/netstart# превратился в [.filename]#/etc/rc.network#. Последний больше не был обычным скриптом; он состоял из больших, запутанных функций man:sh[1], вызываемых из [.filename]#/etc/rc# на разных этапах загрузки системы. Однако по мере того, как задачи при запуске становились разнообразнее и сложнее, "квазимодульный" подход стал ещё большей обузой, чем монолитный [.filename]#/etc/rc#. Без чистого и хорошо продуманного каркаса, стартовые скрипты вынуждены были идти на всевозможные ухищрения, чтобы удовлетворить потребности быстро развивающихся BSD-ориентированных операционных систем. В конце концов стало очевидно, что необходимы дополнительные шаги на пути к детализированной и расширяемой системе [.filename]#rc#. Так появилась BSD [.filename]#rc.d#. Её признанными создателями стали Люк Мьюберн и сообщество NetBSD. Позже она была импортирована в FreeBSD. Её название отсылает к расположению системных скриптов для отдельных служб, которое находится в [.filename]#/etc/rc.d#. Вскоре мы узнаем больше о компонентах системы [.filename]#rc.d# и увидим, как вызываются отдельные скрипты. Основные идеи, лежащие в основе BSD [.filename]#rc.d#, — это _тонкая модульность_ и __повторное использование кода__. _Тонкая модульность_ означает, что каждая базовая «служба», такая как системный демон или примитивная задача запуска, получает собственный сценарий man:sh[1], способный запустить службу, остановить её, перезагрузить или проверить её состояние. Конкретное действие выбирается аргументом командной строки, переданным в сценарий. Сценарий [.filename]#/etc/rc# по-прежнему управляет запуском системы, но теперь он просто вызывает небольшие сценарии один за другим с аргументом `start`. Также легко выполнять задачи завершения работы, запуская тот же набор сценариев с аргументом `stop`, что и делает [.filename]#/etc/rc.shutdown#. Обратите внимание, насколько это близко следует Unix-подходу, где используется набор небольших специализированных инструментов, каждый из которых выполняет свою задачу наилучшим образом. _Повторное использование кода_ означает, что общие операции реализованы как функции man:sh[1] и собраны в [.filename]#/etc/rc.subr#. Теперь типичный сценарий может состоять всего из нескольких строк кода man:sh[1]. Наконец, важной частью инфраструктуры [.filename]#rc.d# является man:rcorder[8], который помогает [.filename]#/etc/rc# упорядоченно запускать небольшие сценарии с учётом зависимостей между ними. Он также может помочь [.filename]#/etc/rc.shutdown#, поскольку правильный порядок завершения работы противоположен порядку запуска. Дизайн BSD [.filename]#rc.d# описан в crossref:rc-scripting[lukem, оригинальной статье Люка Мьюберна], а компоненты [.filename]#rc.d# подробно документированы в crossref:rc-scripting[manpages, соответствующих страницах Справочника]. Однако новичку в [.filename]#rc.d# может быть неочевидно, как связать многочисленные элементы вместе, чтобы создать хорошо структурированный скрипт для конкретной задачи. Поэтому в этой статье будет предпринята попытка описать [.filename]#rc.d# с другого ракурса. В ней будет показано, какие функции следует использовать в ряде типичных случаев и почему. Обратите внимание, что это не руководство HowTo, поскольку наша цель — не предоставление готовых рецептов, а демонстрация нескольких простых способов входа в мир [.filename]#rc.d#. Также эта статья не заменяет соответствующие страниц Справочника. Не стесняйтесь обращаться к ним для получения более формальной и полной документации во время чтения этой статьи. Для понимания этой статьи есть предварительные требования. Прежде всего, вы должны быть знакомы с языком написания сценариев man:sh[1], чтобы освоить [.filename]#rc.d#. Кроме того, вы должны знать, как система выполняет задачи запуска и завершения работы пользовательского пространства, что описано в man:rc[8]. Эта статья посвящена ветке FreeBSD в [.filename]#rc.d#. Тем не менее, она может быть полезна и разработчикам NetBSD, потому что две ветки BSD [.filename]#rc.d# не только разделяют одинаковый дизайн, но и остаются схожими в аспектах, видимых авторам скриптов. [[rcng-task]] == Обрисовка задачи Немного размышлений перед запуском `$EDITOR` не повредит. Чтобы написать хорошо продуманный скрипт [.filename]#rc.d# для системной службы, сначала нужно ответить на следующие вопросы: * Является ли служба обязательной или опциональной? * Будет ли скрипт обслуживать одну программу, например, демон, или выполнять более сложные действия? * От каких других служб зависит наша служба, и наоборот? Из следующих примеров мы увидим, почему важно знать ответы на эти вопросы. [[rcng-dummy]] == Примитивный скрипт Следующий скрипт просто выводит сообщение каждый раз при загрузке системы: [.programlisting] .... #!/bin/sh <.> . /etc/rc.subr <.> name="dummy" <.> start_cmd="${name}_start" <.> stop_cmd=":" <.> dummy_start() <.> { echo "Nothing started." } load_rc_config $name <.> run_rc_command "$1" <.> .... Вот что следует учитывать: ➊ Интерпретируемый скрипт должен начинаться с "волшебной" строки shebang. Эта строка указывает программу-интерпретатор для скрипта. Благодаря строке shebang скрипт может быть запущен точно так же, как бинарная программа, при условии что у него установлен бит выполнения. (См. man:chmod[1].) Например, системный администратор может запустить наш скрипт вручную из командной строки: [source, shell] .... # /etc/rc.d/dummy start .... [NOTE] ==== Для корректного управления в рамках [.filename]#rc.d# скрипты должны быть написаны на языке man:sh[1]. Если у вас есть служба или порт, который использует двоичную утилиту управления или процедуру запуска, написанную на другом языке, установите этот компонент в [.filename]#/usr/sbin# (для системы) или [.filename]#/usr/local/sbin# (для портов) и вызовите его из man:sh[1] скрипта в соответствующем каталоге [.filename]#rc.d#. ==== [TIP] ==== Если вы хотите узнать подробности о том, почему скрипты [.filename]#rc.d# должны быть написаны на языке man:sh[1], изучите, как [.filename]#/etc/rc# вызывает их с помощью `run_rc_script`, а затем изучите реализацию `run_rc_script` в [.filename]#/etc/rc.subr#. ==== ➋ В файле [.filename]#/etc/rc.subr# определено несколько функций man:sh[1], которые могут использоваться скриптами [.filename]#rc.d#. Эти функции описаны в man:rc.subr[8]. Хотя теоретически возможно написать скрипт [.filename]#rc.d# без использования man:rc.subr[8], его функции оказываются чрезвычайно полезными и значительно упрощают задачу. Поэтому неудивительно, что все используют man:rc.subr[8] в скриптах [.filename]#rc.d#. Мы не будем исключением. Файл [.filename]#rc.d# должен "подгрузить" ([.filename]#/etc/rc.subr#, включить его с помощью "`.`") _до_ вызова функций man:rc.subr[8], чтобы у man:sh[1] была возможность знать об этих функциях заранее. Предпочтительный стиль — подгружать [.filename]#/etc/rc.subr# в самом начале. [NOTE] ==== Некоторые полезные функции, связанные с сетью, предоставляются другим включаемым файлом — [.filename]#/etc/network.subr#. ==== ➌ [[name-var]]Обязательная переменная `name` определяет имя нашего скрипта. Она требуется man:rc.subr[8]. То есть, каждый скрипт в [.filename]#rc.d# _должен_ установить `name` перед вызовом функций man:rc.subr[8]. Теперь самое время раз и навсегда выбрать уникальное имя для нашего скрипта. Мы будем использовать его в нескольких местах при разработке скрипта. Содержимое переменной name должно соответствовать имени скрипта, так как некоторые части FreeBSD (например, crossref:rc-scripting[rcng-service-jails, сервисные клетки (jail)] и функция cpuset в rc framework) зависят от этого. Таким образом, имя файла также не должно содержать символов, которые могут вызвать проблемы в скриптах (например, не используйте дефис "-" и другие). [NOTE] ==== Текущий стиль написания скриптов в [.filename]#rc.d# заключается в заключении значений, присваиваемых переменным, в двойные кавычки. Имейте в виду, что это всего лишь вопрос стиля, который может быть не всегда применим. Вы можете безопасно опустить кавычки вокруг простых слов без метасимволов man:sh[1], тогда как в некоторых случаях вам понадобятся одинарные кавычки, чтобы предотвратить интерпретацию значения man:sh[1]. Программист должен уметь отличать синтаксис языка от стилевых соглашений и разумно использовать и то, и другое. ==== ➍ Основная идея man:rc.subr[8] заключается в том, что скрипт [.filename]#rc.d# предоставляет обработчики (или методы) для вызова man:rc.subr[8]. В частности, аргументы `start`, `stop` и другие, передаваемые в скрипт [.filename]#rc.d#, обрабатываются таким образом. Метод представляет собой выражение man:sh[1], сохранённое в переменной с именем `argument_cmd`, где _argument_ соответствует тому, что может быть указано в командной строке скрипта. Далее мы увидим, как man:rc.subr[8] предоставляет стандартные методы для типовых аргументов. [NOTE] ==== Чтобы сделать код в [.filename]#rc.d# более единообразным, обычно используют `${name}` везде, где это уместно. Таким образом, множество строк можно просто копировать из одного скрипта в другой. ==== ➎ Следует помнить, что man:rc.subr[8] предоставляет методы по умолчанию для стандартных аргументов. Следовательно, если мы хотим, чтобы стандартный метод ничего не делал, мы должны переопределить его с помощью no-op man:sh[1] выражения. ➏ Тело сложного метода может быть реализовано в виде функции. Хорошей практикой является использование осмысленного имени функции. [IMPORTANT] ==== -Настоятельно рекомендуется добавлять префикс `${name}` к именам всех функций, определенных в нашем скрипте, чтобы они никогда не конфликтовали с функциями из man:rc.subr[8] или другого общего включаемого файла. +Настоятельно рекомендуется добавлять префикс `${name}` к именам всех функций, определённых в нашем скрипте, чтобы они никогда не конфликтовали с функциями из man:rc.subr[8] или другого общего включаемого файла. ==== ➐ Этот вызов man:rc.subr[8] загружает переменные man:rc.conf[5]. Наш скрипт пока их не использует, но всё равно рекомендуется загружать man:rc.conf[5], потому что могут быть переменные man:rc.conf[5], управляющие самим man:rc.subr[8]. ➑ Обычно это последняя команда в скрипте [.filename]#rc.d#. Она вызывает механизм man:rc.subr[8] для выполнения запрошенного действия, используя переменные и методы, предоставленные нашим скриптом. [[rcng-confdummy]] == Настраиваемый фиктивный скрипт Теперь добавим некоторые элементы управления в наш тестовый скрипт. Как вам может быть известно, скрипты [.filename]#rc.d# управляются с помощью man:rc.conf[5]. К счастью, man:rc.subr[8] скрывает от нас все сложности. Следующий скрипт использует man:rc.conf[5] через man:rc.subr[8], чтобы проверить, включен ли он вообще, и получить сообщение для отображения во время загрузки. Эти две задачи на самом деле независимы. С одной стороны, скрипт [.filename]#rc.d# может просто поддерживать включение и выключение своего сервиса. С другой стороны, обязательный скрипт [.filename]#rc.d# может иметь переменные конфигурации. Однако мы реализуем обе возможности в одном скрипте: [.programlisting] .... #!/bin/sh . /etc/rc.subr name=dummy rcvar=dummy_enable <.> start_cmd="${name}_start" stop_cmd=":" load_rc_config $name <.> : ${dummy_enable:=no} <.> : ${dummy_msg="Nothing started."} <.> dummy_start() { echo "$dummy_msg" <.> } run_rc_command "$1" .... Что изменилось в этом примере? ➊ Переменная `rcvar` определяет имя переменной-переключателя ON/OFF. ➋ Теперь `load_rc_config` вызывается раньше в скрипте, до обращения к любым переменным man:rc.conf[5]. [NOTE] ==== При изучении скриптов в [.filename]#rc.d# следует помнить, что man:sh[1] откладывает вычисление выражений в функции до её вызова. Поэтому не будет ошибкой вызвать `load_rc_config` непосредственно перед `run_rc_command` и при этом обращаться к переменным man:rc.conf[5] из функций методов, экспортируемых в `run_rc_command`. Это связано с тем, что функции методов вызываются `run_rc_command`, который выполняется _после_ `load_rc_config`. ==== ➌ `run_rc_command` выдаст предупреждение, если переменная `rcvar` установлена, но указанная переменная-флаг не задана. Если ваш скрипт [.filename]#rc.d# предназначен для базовой системы, вы должны добавить значение по умолчанию для флага в [.filename]#/etc/defaults/rc.conf# и задокументировать его в man:rc.conf[5]. В противном случае ваш скрипт должен предоставить значение по умолчанию для флага. Канонический подход для последнего случая показан в примере. [NOTE] ==== Вы можете заставить man:rc.subr[8] действовать так, как если бы переключатель установлен в `ON`, независимо от его текущего значения, добавив перед аргументом скрипта префикс `one` или `force`, например `onestart` или `forcestop`. Однако учтите, что `force` имеет другие опасные эффекты, которые мы затронем ниже, тогда как `one` просто переопределяет переключатель ON/OFF. Например, предположим, что `dummy_enable` установлен в `OFF`. Следующая команда выполнит метод `start`, несмотря на настройку: [source, shell] .... # /etc/rc.d/dummy onestart .... ==== -➍ Теперь сообщение, отображаемое при загрузке, больше не жестко закодировано в скрипте. Оно задается переменной `dummy_msg` в man:rc.conf[5]. Это простой пример того, как переменные man:rc.conf[5] могут управлять скриптом в [.filename]#rc.d#. +➍ Теперь сообщение, отображаемое при загрузке, больше не жёстко закодировано в скрипте. Оно задается переменной `dummy_msg` в man:rc.conf[5]. Это простой пример того, как переменные man:rc.conf[5] могут управлять скриптом в [.filename]#rc.d#. [IMPORTANT] ==== Имена всех переменных man:rc.conf[5], используемых исключительно нашим скриптом, _должны_ иметь один и тот же префикс: `${name}_`. Например: `dummy_mode`, `dummy_state_file` и так далее. ==== [NOTE] ==== -Хотя можно использовать более короткое имя внутри, например, просто `msg`, добавление уникального префикса `${name}_` ко всем глобальным именам, вводимым нашим скриптом, избавит нас от возможных конфликтов с пространством имен man:rc.subr[8]. +Хотя можно использовать более короткое имя внутри, например, просто `msg`, добавление уникального префикса `${name}_` ко всем глобальным именам, вводимым нашим скриптом, избавит нас от возможных конфликтов с пространством имён man:rc.subr[8]. Как правило, скрипты [.filename]#rc.d# базовой системы не должны предоставлять значения по умолчанию для своих переменных man:rc.conf[5], поскольку значения по умолчанию должны быть установлены в [.filename]#/etc/defaults/rc.conf#. С другой стороны, скрипты [.filename]#rc.d# для портов должны предоставлять значения по умолчанию, как показано в примере. ==== ➎ Здесь мы используем `dummy_msg` для фактического управления нашим скриптом, т.е., для выдачи переменного сообщения. Использование shell-функции здесь избыточно, так как она выполняет только одну команду; равнозначной альтернативой является: [.programlisting] .... start_cmd="echo \"$dummy_msg\"" .... [[rcng-daemon]] == Запуск и остановка простого демона Мы ранее говорили, что man:rc.subr[8] может предоставлять методы по умолчанию. Очевидно, что такие методы не могут быть слишком общими. Они подходят для стандартного случая запуска и остановки простого демона. Предположим, что нам нужно написать скрипт [.filename]#rc.d# для такого демона с именем `mumbled`. Вот он: [.programlisting] .... #!/bin/sh . /etc/rc.subr name=mumbled rcvar=mumbled_enable command="/usr/sbin/${name}" <.> load_rc_config $name run_rc_command "$1" .... Приятно просто, не так ли? Давайте рассмотрим наш небольшой скрипт. Единственное новое, на что стоит обратить внимание, это следующее: ➊ Переменная `command` имеет значение для man:rc.subr[8]. Если она установлена, man:rc.subr[8] будет действовать по сценарию обслуживания обычного демона. В частности, будут предоставлены стандартные методы для таких аргументов: `start`, `stop`, `restart`, `poll` и `status`. Демон будет запущен выполнением `$command` с флагами командной строки, указанными в `$mumbled_flags`. Таким образом, все входные данные для метода `start` по умолчанию доступны в переменных, установленных нашим скриптом. В отличие от `start`, другие методы могут требовать дополнительной информации о запущенном процессе. Например, `stop` должен знать PID процесса, чтобы завершить его. В данном случае, man:rc.subr[8] будет просматривать список всех процессов, ища процесс с именем, равным `procname`. Последний является ещё одной значимой переменной для man:rc.subr[8], и её значение по умолчанию совпадает со значением `command`. Другими словами, когда мы устанавливаем `command`, `procname` фактически устанавливается в то же значение. Это позволяет нашему скрипту завершить демон и проверить, запущен ли он вообще. [NOTE] ==== Некоторые программы на самом деле являются исполняемыми скриптами. Система запускает такие скрипты, запуская их интерпретатор и передавая ему имя скрипта в качестве аргумента командной строки. Это отражается в списке процессов, что может сбить с толку man:rc.subr[8]. Дополнительно следует установить `command_interpreter`, чтобы man:rc.subr[8] знал фактическое имя процесса, если `$command` является скриптом. Для каждого скрипта [.filename]#rc.d# существует необязательная переменная man:rc.conf[5], которая имеет приоритет над `command`. Её имя формируется следующим образом: `${name}_program`, где `name` — это обязательная переменная, которую мы обсуждали crossref:rc-scripting[name-var, ранее]. Например, в данном случае это будет `mumbled_program`. Именно man:rc.subr[8] обеспечивает переопределение `command` с помощью `${name}_program`. Конечно, man:sh[1] позволяет установить `${name}_program` из man:rc.conf[5] или самого скрипта, даже если `command` не задан. В этом случае специальные свойства `${name}_program` теряются, и она становится обычной переменной, которую ваш скрипт может использовать для своих целей. Однако использование `${name}_program` в одиночку не рекомендуется, так как совместное использование с `command` стало идиомой в [.filename]#rc.d# скриптах. ==== Для получения более подробной информации о стандартных методах обратитесь к man:rc.subr[8]. [[rcng-daemon-adv]] == Запуск и остановка продвинутого демона Добавим немного мяса к костям предыдущего скрипта и сделаем его более сложным и функциональным. Стандартные методы могут хорошо справляться с задачами, но иногда требуется их тонкая настройка. Теперь мы узнаем, как адаптировать стандартные методы под наши нужды. [.programlisting] .... #!/bin/sh . /etc/rc.subr name=mumbled rcvar=mumbled_enable command="/usr/sbin/${name}" command_args="mock arguments > /dev/null 2>&1" <.> pidfile="/var/run/${name}.pid" <.> required_files="/etc/${name}.conf /usr/share/misc/${name}.rules" <.> sig_reload="USR1" <.> start_precmd="${name}_prestart" <.> stop_postcmd="echo Bye-bye" <.> extra_commands="reload plugh xyzzy" <.> plugh_cmd="mumbled_plugh" <.> xyzzy_cmd="echo 'Nothing happens.'" mumbled_prestart() { if checkyesno mumbled_smart; then <.> rc_flags="-o smart ${rc_flags}" <.> fi case "$mumbled_mode" in foo) rc_flags="-frotz ${rc_flags}" ;; bar) rc_flags="-baz ${rc_flags}" ;; *) warn "Invalid value for mumbled_mode" <.> return 1 <.> ;; esac run_rc_command xyzzy <.> return 0 } mumbled_plugh() <.> { echo 'A hollow voice says "plugh".' } load_rc_config $name run_rc_command "$1" .... ➊ Дополнительные аргументы для `$command` могут быть переданы в `command_args`. Они будут добавлены в командную строку после `$mumbled_flags`. Поскольку итоговая командная строка передаётся в `eval` для фактического выполнения, перенаправления ввода и вывода могут быть указаны в `command_args`. [NOTE] ==== Никогда не включайте параметры с дефисами, такие как `-X` или `--foo`, в `command_args`. Содержимое `command_args` будет добавлено в конец итоговой командной строки, поэтому, скорее всего, окажется после аргументов, указанных в `${name}_flags`; однако большинство команд не распознают параметры с дефисами после обычных аргументов. Лучший способ передать дополнительные параметры в `$command` — добавить их в начало `${name}_flags`. Другой способ — изменить `rc_flags` crossref:rc-scripting[rc-flags, как показано далее]. ==== ➋ Вежливый демон должен создавать _pidfile_, чтобы его процесс можно было найти проще и надёжнее. Переменная `pidfile`, если она установлена, указывает man:rc.subr[8], где можно найти pidfile для использования его стандартными методами. [NOTE] ==== На самом деле, man:rc.subr[8] также использует pidfile для проверки, запущен ли демон, перед его запуском. Эту проверку можно пропустить, используя аргумент `faststart`. ==== ➌ Если демон не может работать без определённых файлов, просто укажите их в `required_files`, и man:rc.subr[8] проверит их наличие перед запуском демона. Также существуют `required_dirs` и `required_vars` для каталогов и переменных окружения соответственно. Все они подробно описаны в man:rc.subr[8]. [NOTE] ==== Метод по умолчанию из man:rc.subr[8] можно принудительно заставить пропустить проверки предварительных условий, используя аргумент `forcestart` в скрипте. ==== ➍ Мы можем настроить сигналы, отправляемые демону, если они отличаются от общеизвестных. В частности, `sig_reload` указывает сигнал, который заставляет демона перезагрузить свою конфигурацию; по умолчанию это SIGHUP. Другой сигнал отправляется для остановки процесса демона; по умолчанию используется SIGTERM, но это можно изменить, установив `sig_stop` соответствующим образом. [NOTE] ==== Имена сигналов должны указываться для man:rc.subr[8] без префикса `SIG`, как показано в примере. Версия man:kill[1] в FreeBSD может распознавать префикс `SIG`, но версии из других типов ОС могут не поддерживать его. ==== ➎➏ Выполнение дополнительных задач до или после стандартных методов — это просто. Для каждого аргумента команды, поддерживаемого нашим скриптом, мы можем определить `argument_precmd` и `argument_postcmd`. Эти команды man:sh[1] вызываются до и после соответствующего метода, что очевидно из их названий. [NOTE] ==== Переопределение стандартного метода с помощью пользовательского `argument_cmd` всё равно не мешает нам использовать `argument_precmd` или `argument_postcmd`, если это необходимо. В частности, первый полезен для проверки пользовательских сложных условий, которые должны быть выполнены перед выполнением самой команды. Использование `argument_precmd` вместе с `argument_cmd` позволяет логически разделить проверки от действия. Не забывайте, что вы можете вставлять любые допустимые выражения из man:sh[1] в определяемые вами методы, а также команды pre- и post-. Просто вызывать функцию, которая выполняет основную работу, — это хороший стиль в большинстве случаев, но никогда не позволяйте стилю ограничивать ваше понимание того, что происходит за кулисами. ==== ➐ Если мы хотим реализовать пользовательские аргументы, которые также можно рассматривать как _команды_ для нашего скрипта, необходимо перечислить их в `extra_commands` и предоставить методы для их обработки. [NOTE] ==== Команда `reload` является особенной. С одной стороны, у неё есть предустановленный метод в man:rc.subr[8]. С другой стороны, `reload` не предлагается по умолчанию. Причина в том, что не все демоны используют одинаковый механизм перезагрузки, а у некоторых вообще нет ничего для перезагрузки. Поэтому нам нужно явно запросить предоставление встроенной функциональности. Это можно сделать с помощью `extra_commands`. Что мы получаем от метода по умолчанию для `reload`? Довольно часто демоны перезагружают свою конфигурацию при получении сигнала — обычно, SIGHUP. Поэтому man:rc.subr[8] пытается перезагрузить демона, отправляя ему сигнал. Сигнал предустановлен на SIGHUP, но может быть изменён через `sig_reload` при необходимости. ==== ➑⓮ Наш скрипт поддерживает две нестандартные команды: `plugh` и `xyzzy`. Мы видели их в списке `extra_commands`, и теперь пришло время реализовать методы для них. Метод для `xyzzy` просто встроен в код, а для `plugh` он реализован как функция `mumbled_plugh`. Нестандартные команды не вызываются во время запуска или завершения работы. Обычно они предназначены для удобства системного администратора. Они также могут использоваться другими подсистемами, например, man:devd[8], если указаны в man:devd.conf[5]. Полный список доступных команд можно найти в строке использования, выводимой man:rc.subr[8], когда скрипт вызывается без аргументов. Например, вот строка использования из изучаемого скрипта: [source, shell] .... # /etc/rc.d/mumbled Usage: /etc/rc.d/mumbled [fast|force|one](start|stop|restart|rcvar|reload|plugh|xyzzy|status|poll) .... ⓭ Скрипт может вызывать свои собственные стандартные или нестандартные команды, если это необходимо. Это может выглядеть похоже на вызов функций, но мы знаем, что команды и функции оболочки не всегда одно и то же. Например, `xyzzy` не реализован как функция в данном случае. Кроме того, могут существовать пред-команда и пост-команда, которые должны вызываться в определённом порядке. Поэтому правильный способ для скрипта выполнить свою собственную команду — с помощью man:rc.subr[8], как показано в примере. ➒ Полезная функция `checkyesno` предоставляется man:rc.subr[8]. Она принимает имя переменной в качестве аргумента и возвращает нулевой код выхода только если переменная установлена в `YES`, `TRUE`, `ON` или `1`, без учёта регистра; в противном случае возвращается ненулевой код выхода. В последнем случае функция проверяет, установлена ли переменная в `NO`, `FALSE`, `OFF` или `0`, также без учёта регистра; если переменная содержит что-то иное (т.е. мусор), функция выводит предупреждение. Имейте в виду, что для man:sh[1] нулевой код возврата означает истину, а ненулевой код возврата означает ложь. [IMPORTANT] ==== Функция `checkyesno` принимает __имя переменной__. Не передавайте ей _значение_ переменной; это не будет работать, как ожидается. Ниже приведено правильное использование `checkyesno`: [.programlisting] .... if checkyesno mumbled_enable; then foo fi .... Напротив, вызов `checkyesno`, как показано ниже, не сработает — по крайней мере, не так, как ожидается: [.programlisting] .... if checkyesno "${mumbled_enable}"; then foo fi .... ==== ➓ [[rc-flags]] Мы можем влиять на флаги, передаваемые команде `$command`, изменяя `rc_flags` в `$start_precmd`. ⓫ В некоторых случаях может потребоваться вывести важное сообщение, которое также должно попасть в `syslog`. Это можно легко сделать с помощью следующих функций man:rc.subr[8]: `debug`, `info`, `warn` и `err`. Последняя функция завершает выполнение скрипта с указанным кодом. ⓬ Коды выхода из методов и их предварительных команд не просто игнорируются по умолчанию. Если `argument_precmd` возвращает ненулевой код выхода, основной метод не будет выполнен. В свою очередь, `argument_postcmd` не будет вызван, если основной метод возвращает ненулевой код выхода. [NOTE] ==== Однако man:rc.subr[8] можно указать из командной строки игнорировать эти коды завершения и выполнять все команды в любом случае, добавив префикс `force` к аргументу, например `forcestart`. ==== [[rcng-hookup]] == Подключение скрипта к инфраструктуре rc.d После написания скрипта его необходимо интегрировать в [.filename]#rc.d#. Ключевой шаг — установка скрипта в [.filename]#/etc/rc.d# (для базовой системы) или [.filename]#/usr/local/etc/rc.d# (для портов). И [.filename]#bsd.prog.mk#, и [.filename]#bsd.port.mk# предоставляют удобные механизмы для этого, и обычно вам не нужно беспокоиться о правильных правах доступа и режиме. Системные скрипты должны устанавливаться из [.filename]#src/libexec/rc/rc.d# через [.filename]#Makefile#, находящийся там. Скрипты портов можно установить с помощью `USE_RC_SUBR`, как описано extref:{porters-handbook}special[в Руководстве FreeBSD по созданию портов, rc-scripts]. Однако следует заранее продумать место нашего скрипта в последовательности запуска системы. Скорее всего, обслуживаемый нашим скриптом сервис зависит от других сервисов. Например, сетевой демон не может работать без поднятых сетевых интерфейсов и маршрутизации. Даже если сервис, казалось бы, ничего не требует, он вряд ли сможет запуститься до проверки и монтирования основных файловых систем. Мы уже упоминали man:rcorder[8]. Теперь пришло время рассмотреть его подробнее. В двух словах, man:rcorder[8] принимает набор файлов, анализирует их содержимое и выводит на `stdout` список этих файлов, упорядоченный по зависимостям. Главная идея заключается в том, чтобы хранить информацию о зависимостях _внутри_ файлов, чтобы каждый файл мог описывать только себя. Файл может содержать следующую информацию: * имена "условий" (что для нас означает сервисы), которые он __предоставляет__; * имена "условий", которые он __требует__; * имена "условий", перед которыми должен выполняться этот файл; * дополнительные _ключевые слова_, которые могут использоваться для выбора подмножества из всего набора файлов (man:rcorder[8] может быть настроен с помощью опций для включения или исключения файлов, содержащих указанные ключевые слова.) Неудивительно, что man:rcorder[8] может обрабатывать только текстовые файлы с синтаксисом, близким к man:sh[1]. То есть специальные строки, понимаемые man:rcorder[8], выглядят как комментарии в man:sh[1]. Синтаксис таких специальных строк довольно жёсткий, чтобы упростить их обработку. Подробности см. в man:rcorder[8]. Помимо использования специальных строк man:rcorder[8], скрипт может настаивать на своей зависимости от другой службы, просто принудительно запуская её. Это может быть необходимо, когда другая служба является опциональной и не запускается самостоятельно, потому что системный администратор ошибочно отключил её в man:rc.conf[5]. -С учетом этих общих знаний рассмотрим простой скрипт демона, дополненный зависимостями: +С учётом этих общих знаний рассмотрим простой скрипт демона, дополненный зависимостями: [.programlisting] .... #!/bin/sh # PROVIDE: mumbled oldmumble <.> # REQUIRE: DAEMON cleanvar frotz <.> # BEFORE: LOGIN <.> # KEYWORD: nojail shutdown <.> . /etc/rc.subr name=mumbled rcvar=mumbled_enable command="/usr/sbin/${name}" start_precmd="${name}_prestart" mumbled_prestart() { if ! checkyesno frotz_enable && \ ! /etc/rc.d/frotz forcestatus 1>/dev/null 2>&1; then force_depend frotz || return 1 <.> fi return 0 } load_rc_config $name run_rc_command "$1" .... Как и ранее, следует детальный анализ: ➊ Эта строка объявляет названия "условий", которые предоставляет наш скрипт. Теперь другие скрипты могут указывать зависимость от нашего скрипта по этим именам. [NOTE] ==== Обычно скрипт указывает одно предоставленное условие. Однако ничто не мешает нам перечислить несколько условий, например, по причинам совместимости. В любом случае, название основного или единственного условия `PROVIDE:` должно совпадать с `${name}`. ==== ➋➌ Таким образом, наш скрипт указывает, от каких "условий", предоставляемых другими скриптами, он зависит. Согласно строкам, наш скрипт просит man:rcorder[8] разместить его после скрипта(ов), предоставляющих [.filename]#DAEMON# и [.filename]#cleanvar#, но перед тем, который предоставляет [.filename]#LOGIN#. [NOTE] ==== Строку `BEFORE:` не следует использовать для обхода неполного списка зависимостей в другом скрипте. Правильный случай для использования `BEFORE:` — когда другой скрипт не зависит от нашего, но наш скрипт может выполнить свою задачу лучше, если запустится до другого. Типичный пример из реальной жизни — сетевые интерфейсы и межсетевой экран: хотя интерфейсы не зависят от межсетевого экрана при выполнении своей работы, безопасность системы выиграет, если межсетевой экран будет готов до начала сетевого трафика. Помимо условий, соответствующих отдельным службам, существуют метаусловия и их "заглушки" скриптов, используемые для обеспечения выполнения определённых групп операций в заданном порядке. Они обозначаются именами в [.filename]#ВЕРХНЕМ РЕГИСТРЕ#. Их список и назначение можно найти в man:rc[8]. Имейте в виду, что указание имени службы в строке `REQUIRE:` не гарантирует, что служба действительно будет запущена к моменту старта нашего скрипта. Требуемая служба может не запуститься или быть отключена в man:rc.conf[5]. Очевидно, man:rcorder[8] не может отслеживать такие детали, и man:rc[8] тоже этого не делает. Следовательно, приложение, запускаемое нашим скриптом, должно быть способно обрабатывать ситуации, когда требуемые службы недоступны. В некоторых случаях мы можем помочь ему, как описано в crossref:rc-scripting[forcedep, ниже] ==== [[keywords]]➍ Как мы помним из текста выше, ключевые слова man:rcorder[8] могут использоваться для выбора или исключения некоторых скриптов. А именно, любой потребитель man:rcorder[8] может указать с помощью опций `-k` и `-s`, какие ключевые слова находятся в "списке сохранения" и "списке пропуска" соответственно. Из всех файлов, подлежащих сортировке по зависимостям, man:rcorder[8] выберет только те, которые имеют ключевое слово из списка сохранения (если он не пуст) и не имеют ключевого слова из списка пропуска. В FreeBSD, man:rcorder[8] используется [.filename]#/etc/rc# и [.filename]#/etc/rc.shutdown#. Эти два скрипта определяют стандартный список ключевых слов [.filename]#rc.d# FreeBSD и их значения следующим образом: nojail:: Сервис не предназначен для окружения man:jail[8]. Процедуры автоматического запуска и остановки будут игнорировать скрипт, если он находится внутри клетки. nostart:: Служба должна запускаться вручную или не запускаться вовсе. Процедура автоматического запуска проигнорирует скрипт. В сочетании с ключевым словом [.filename]#shutdown# это может использоваться для написания скриптов, выполняющих действия только при выключении системы. shutdown:: Этот ключевой параметр должен быть указан __явно__, если службу необходимо остановить перед завершением работы системы. [NOTE] ==== Когда система собирается завершить работу, выполняется [.filename]#/etc/rc.shutdown#. Предполагается, что большинству скриптов [.filename]#rc.d# в этот момент нечего делать. Поэтому [.filename]#/etc/rc.shutdown# выборочно запускает скрипты [.filename]#rc.d# с ключевым словом [.filename]#shutdown#, фактически игнорируя остальные скрипты. Для ещё более быстрого завершения работы [.filename]#/etc/rc.shutdown# передаёт команду [.filename]#faststop# запускаемым скриптам, чтобы они пропускали предварительные проверки, например, проверку pid-файла. Поскольку зависимые службы должны быть остановлены до своих зависимостей, [.filename]#/etc/rc.shutdown# запускает скрипты в обратном порядке зависимостей. Если вы пишете настоящий скрипт [.filename]#rc.d#, стоит подумать, актуален ли он во время завершения работы системы. Например, если ваш скрипт выполняет свою работу только в ответ на команду [.filename]#start#, то включать это ключевое слово не нужно. Однако если ваш скрипт управляет службой, вероятно, стоит остановить её до того, как система перейдёт к финальной стадии завершения работы, описанной в man:halt[8]. В частности, службу следует останавливать явно, если для её корректного завершения требуется значительное время или специальные действия. Типичный пример такой службы — система управления базами данных. ==== [[forcedep]]➎ Прежде всего, `force_depend` следует использовать с большой осторожностью. Обычно лучше пересмотреть иерархию конфигурационных переменных для ваших [.filename]#rc.d# скриптов, если они взаимозависимы. Если вам всё ещё не обойтись без `force_depend`, в примере показано, как вызвать его условно. В примере наш демон `mumbled` требует, чтобы другой демон, `frotz`, был запущен заранее. Однако `frotz` также является опциональным, и man:rcorder[8] ничего не знает о таких деталях. К счастью, наш скрипт имеет доступ ко всем переменным man:rc.conf[5]. Если `frotz_enable` имеет значение true, мы надеемся на лучшее и полагаемся на [.filename]#rc.d#, что `frotz` был запущен. В противном случае мы принудительно проверяем статус `frotz`. Наконец, мы принудительно устанавливаем зависимость от `frotz`, если обнаруживаем, что он не запущен. `force_depend` выдаст предупреждение, так как его следует вызывать только в случае обнаружения неправильной конфигурации. [[rcng-args]] == Придание большей гибкости скрипту rc.d При вызове во время запуска или завершения работы скрипт [.filename]#rc.d# должен воздействовать на всю подсистему, за которую он отвечает. Например, [.filename]#/etc/rc.d/netif# должен запускать или останавливать все сетевые интерфейсы, описанные в man:rc.conf[5]. Любая из этих задач может быть однозначно указана единственным аргументом команды, таким как `start` или `stop`. Между запуском и завершением работы скрипты [.filename]#rc.d# помогают администратору управлять работающей системой, и именно тогда возникает потребность в большей гибкости и точности. Например, администратор может добавить настройки нового сетевого интерфейса в man:rc.conf[5], а затем запустить его, не затрагивая работу существующих интерфейсов. В следующий раз администратору может потребоваться остановить отдельный сетевой интерфейс. В духе командной строки, соответствующий скрипт [.filename]#rc.d# требует дополнительного аргумента — имени интерфейса. К счастью, man:rc.subr[8] позволяет передавать любое количество аргументов (в пределах системных ограничений) методам скрипта. Благодаря этому изменения в самом скрипте могут быть минимальными. Как man:rc.subr[8] может получить доступ к дополнительным аргументам командной строки. Должен ли он просто захватывать их напрямую? Ни в коем случае. Во-первых, функция man:sh[1] не имеет доступа к позиционным параметрам своего вызывающего объекта, но man:rc.subr[8] — это просто набор таких функций. Во-вторых, хороший стиль [.filename]#rc.d# предписывает, что именно главный скрипт должен решать, какие аргументы передавать его методам. Итак, подход, принятый в man:rc.subr[8], следующий: `run_rc_command` передаёт все свои аргументы, кроме первого, в соответствующий метод в неизменном виде. Первый, опущенный аргумент — это имя самого метода: `start`, `stop` и т.д. Он будет удалён с помощью `shift` в `run_rc_command`, так что то, что было `$2` в оригинальной командной строке, будет представлено как `$1` в методе, и так далее. Чтобы проиллюстрировать эту возможность, давайте изменим примитивный скрипт-заглушку так, чтобы его сообщения зависели от дополнительных переданных аргументов. Вот как это выглядит: [.programlisting] .... #!/bin/sh . /etc/rc.subr name="dummy" start_cmd="${name}_start" stop_cmd=":" kiss_cmd="${name}_kiss" extra_commands="kiss" dummy_start() { if [ $# -gt 0 ]; then <.> echo "Greeting message: $*" else echo "Nothing started." fi } dummy_kiss() { echo -n "A ghost gives you a kiss" if [ $# -gt 0 ]; then <.> echo -n " and whispers: $*" fi case "$*" in *[.!?]) echo ;; *) echo . ;; esac } load_rc_config $name run_rc_command "$@" <.> .... Какие основные изменения мы можем заметить в скрипте? ➊ Все аргументы, которые вы вводите после `start`, могут стать позиционными параметрами для соответствующего метода. Мы можем использовать их любым способом в соответствии с нашей задачей, навыками и предпочтениями. В текущем примере мы просто передаем все их в man:echo[1] как одну строку в следующей строке — обратите внимание на `$*` в двойных кавычках. Вот как теперь можно вызывать этот скрипт: [source, shell] .... # /etc/rc.d/dummy start Nothing started. # /etc/rc.d/dummy start Hello world! Greeting message: Hello world! .... ➋ То же самое относится к любому методу, который предоставляет наш скрипт, не только к стандартному. Мы добавили пользовательский метод с именем `kiss`, и он может использовать дополнительные аргументы не меньше, чем `start`. Например: [source, shell] .... # /etc/rc.d/dummy kiss A ghost gives you a kiss. # /etc/rc.d/dummy kiss Once I was Etaoin Shrdlu... A ghost gives you a kiss and whispers: Once I was Etaoin Shrdlu... .... ➌ Если мы хотим просто передать все дополнительные аргументы любому методу, мы можем просто заменить `"$@"` на `"$1"` в последней строке нашего скрипта, где мы вызываем `run_rc_command`. [IMPORTANT] ==== Программист man:sh[1] должен понимать тонкую разницу между `$*` и `$@` как способами обозначения всех позиционных параметров. Для детального обсуждения обратитесь к хорошему руководству по написанию скриптов на man:sh[1]. _Не используйте_ эти выражения, пока полностью не поймёте их, так как их неправильное применение приведёт к созданию ненадёжных и небезопасных скриптов. ==== [NOTE] ==== В настоящее время в `run_rc_command` может присутствовать ошибка, которая мешает ему сохранять исходные границы между аргументами. То есть аргументы с встроенными пробелами могут обрабатываться некорректно. Ошибка возникает из-за неправильного использования `$*`. ==== [[rcng-service-jails]] == Подготовка скрипта для сервисных клеток Скрипты, запускающие долго работающую службу, подходят для служебных клеток и должны поставляться с соответствующей конфигурацией сервисной клетки. Некоторые примеры скриптов, которые не подходят для запуска в сервисной клетке: * любой скрипт, который в команде start только изменяет настройки времени выполнения для программ или ядра, * или пытается что-то смонтировать, * или находит и удаляет файлы Необходимо предотвратить использование внутри сервисных клеток скриптов, не предназначенных для запуска в сервисной клетке. Скрипт с долго работающей службой, которому необходимо выполнить одно из перечисленных выше действий перед запуском или после остановки, может быть разделён на два скрипта с зависимостями или использовать части `precommand` и `postcommand` скрипта для выполнения этого действия. По умолчанию только части `start` и `stop` скрипта выполняются внутри сервисной клетки, остальное выполняется вне клетки. Таким образом, любые настройки, используемые в частях `start`/`stop` скрипта, не могут быть заданы, например, из `precommand`. Чтобы сделать скрипт готовым к использованию с extref:{handbook}jails[Сервисными Клетками, service-jails], необходимо добавить всего лишь одну дополнительную конфигурационную строку: [.programlisting] .... #!/bin/sh . /etc/rc.subr name="dummy" start_cmd="${name}_start" stop_cmd=":" : ${dummy_svcj_options:=""} <.> dummy_start() { echo "Nothing started." } load_rc_config $name run_rc_command "$1" .... ➊ Если имеет смысл, чтобы скрипт выполнялся в клетке, он должен иметь переопределяемую конфигурацию сервисных клеток. Если ему не требуется доступ к сети или любым другим ресурсам, которые ограничены в клетках, достаточно пустой конфигурации, как показано. Строго говоря, пустая конфигурация не обязательна, но она явно указывает, что скрипт готов к работе с сервисными клетками и не требует дополнительных разрешений для клеток. Поэтому настоятельно рекомендуется добавить такую пустую конфигурацию в таком случае. Наиболее распространённая опция — "net_basic", которая позволяет использовать IPv4 и IPv6 адреса хоста. Все возможные опции описаны в man:rc.conf[5]. Если настройка запуска/остановки зависит от переменных из rc-фреймворка (например, заданных в man:rc.conf[5]), это должно обрабатываться с помощью ``load_rc_config`` и ``run_rc_command``, а не внутри precommand. Если по какой-то причине скрипт не может быть запущен внутри сервисной клетки, например, потому что его невозможно запустить или нет смысла запускать его в клетке, используйте следующее: [.programlisting] .... #!/bin/sh . /etc/rc.subr name="dummy" start_cmd="${name}_start" stop_cmd=":" dummy_start() { echo "Nothing started." } load_rc_config $name dummy_svcj="NO" # does not make sense to run in a svcj <.> run_rc_command "$1" .... ➊ Отключение должно происходить после вызова ``load_rc_config``, иначе параметр из man:rc.conf[5] может переопределить его. [[rcng-instancing]] == Продвинутые сценарии rc: запуск нескольких экземпляров Иногда полезно запускать несколько экземпляров службы. Обычно требуется иметь возможность независимо запускать/останавливать такие экземпляры, а также иметь отдельный файл конфигурации для каждого из них. Каждый экземпляр должен запускаться при загрузке, после обновления каждый экземпляр должен оставаться, и при этом должен обновиться. Вот пример rc-скрипта, который поддерживает это: [.programlisting] .... #!/bin/sh # # PROVIDE: dummy # REQUIRE: NETWORKING SERVERS # KEYWORD: shutdown # # Add these following line to /etc/rc.conf.local or /etc/rc.conf # to enable this service: # # dummy_enable (bool): Set it to YES to enable dummy on startup. # Default: NO # dummy_user (string): User account to run with. # Default: www # . /etc/rc.subr case $0 in <.> /etc/rc*) # during boot (shutdown) $0 is /etc/rc (/etc/rc.shutdown), # so get the name of the script from $_file name=$_file ;; *) name=$0 ;; esac name=${name##*/} <.> rcvar="${name}_enable" <.> desc="Short description of this service" command="/usr/local/sbin/dummy" load_rc_config "$name" eval "${rcvar}=\${${rcvar}:-'NO'}" <.> eval "${name}_svcj_options=\${${name}_svcj_options:-'net_basic'}" <.> eval "_dummy_user=\${${name}_user:-'www'}" <.> _dummy_configname=/usr/local/etc/${name}.cfg <.> pidfile=/var/run/dummy/${name}.pid required_files ${_dummy_configname} command_args="-u ${_dummy_user} -c ${_dummy_configfile} -p ${pidfile}" run_rc_command "$1" .... ➊ и ➋ убедитесь, что переменная name установлена в значение man:basename[1] имени скрипта. Если имя файла — [.filename]#/usr/local/etc/rc.d/dummy#, то name будет установлено в [.filename]#dummy#. Таким образом, изменение имени rc-скрипта автоматически изменит содержимое переменной name. ➌ указывает имя переменной, которая используется в [.filename]#rc.conf# для включения этой службы на основе имени файла этого скрипта. В данном примере это преобразуется в dummy_enable. ➍ убеждается, что значение по умолчанию для переменной _enable установлено в NO. ➎ Вот пример установки некоторых значений по умолчанию для переменных фреймворка, специфичных для службы, в данном случае — опций клетки службы. ➏ и ➐ устанавливают переменные, внутренние для скрипта (обратите внимание на подчёркивание в начале _dummy_user, чтобы отличать её от dummy_user, которая может быть задана в [.filename]#rc.conf#). Часть в ➎ предназначена для переменных, которые не используются внутри самого скрипта, но используются в рамках rc. Все переменные, которые используются как параметры в скрипте, присваиваются общей переменной, как в ➐, чтобы упростить их использование (нет необходимости выполнять eval при каждом обращении). Этот скрипт теперь будет вести себя по-другому, если скрипт запуска имеет другое имя. Это позволяет создавать символьные ссылки на него: [source, shell] .... # ln -s dummy /usr/local/etc/rc.d/dummy_foo # sysrc dummy_foo_enable=YES # service dummy_foo start .... -Вышеприведенное создает экземпляр службы dummy с именем dummy_foo. Он использует не файл конфигурации [.filename]#/usr/local/etc/dummy.cfg#, а файл конфигурации [.filename]#/usr/local/etc/dummy_foo.cfg# (➐), и использует PID-файл [.filename]#/var/run/dummy/dummy_foo.pid# вместо [.filename]#/var/run/dummy/dummy.pid#. +Вышеприведённое создает экземпляр службы dummy с именем dummy_foo. Он использует не файл конфигурации [.filename]#/usr/local/etc/dummy.cfg#, а файл конфигурации [.filename]#/usr/local/etc/dummy_foo.cfg# (➐), и использует PID-файл [.filename]#/var/run/dummy/dummy_foo.pid# вместо [.filename]#/var/run/dummy/dummy.pid#. Сервисы dummy и dummy_foo могут управляться независимо друг от друга, при этом скрипт запуска обновляется автоматически при обновлении пакета (благодаря символьной ссылке). Это не обновляет строку REQUIRE, поэтому нет простого способа зависеть от конкретного экземпляра. Чтобы зависеть от конкретного экземпляра в порядке запуска, необходимо создать копию вместо использования символьной ссылки. Это предотвращает автоматическое применение изменений в скрипте запуска при установке обновления. [[rcng-furthur]] == Дополнительная литература [[lukem]]http://www.mewburn.net/luke/papers/rc.d.pdf[Оригинальная статья Люка Мьюберна] предлагает общий обзор [.filename]#rc.d# и подробное обоснование принятых при его проектировании решений. В ней представлено понимание всего фреймворка [.filename]#rc.d# и его места в современной BSD-системе. [[manpages]]Руководства man:rc[8], man:rc.subr[8] и man:rcorder[8] подробно описывают компоненты [.filename]#rc.d#. Без изучения этих руководств и обращения к ним при написании собственных скриптов невозможно в полной мере использовать возможности [.filename]#rc.d#. Основным источником рабочих, жизненных примеров является [.filename]#/etc/rc.d# в работающей системе. Его содержимое легко и приятно читать, поскольку большинство сложных моментов скрыто глубоко в man:rc.subr[8]. Однако помните, что скрипты в [.filename]#/etc/rc.d# были написаны не ангелами, поэтому они могут содержать ошибки и неоптимальные решения. Теперь вы можете их улучшить! diff --git a/documentation/content/ru/articles/rc-scripting/_index.po b/documentation/content/ru/articles/rc-scripting/_index.po index 8995309522..0eeb313a8b 100644 --- a/documentation/content/ru/articles/rc-scripting/_index.po +++ b/documentation/content/ru/articles/rc-scripting/_index.po @@ -1,2766 +1,2766 @@ # SOME DESCRIPTIVE TITLE # Copyright (C) YEAR The FreeBSD Project # This file is distributed under the same license as the FreeBSD Documentation package. -# Vladlen Popolitov , 2025. +# Vladlen Popolitov , 2025, 2026. msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" "POT-Creation-Date: 2025-11-08 16:17+0000\n" -"PO-Revision-Date: 2025-11-12 04:45+0000\n" +"PO-Revision-Date: 2026-03-08 09:11+0000\n" "Last-Translator: Vladlen Popolitov \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 4.17\n" #. type: YAML Front Matter: description #: documentation/content/en/articles/rc-scripting/_index.adoc:1 #, no-wrap msgid "A guide to writing new rc.d scripts and understanding those already written" msgstr "Руководство по написанию новых rc.d-скриптов и пониманию уже существующих" #. type: Title = #: documentation/content/en/articles/rc-scripting/_index.adoc:1 #: documentation/content/en/articles/rc-scripting/_index.adoc:12 #, no-wrap msgid "Practical rc.d scripting in BSD" msgstr "Практическое руководство по написанию rc.d скриптов в BSD" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:45 msgid "Abstract" msgstr "Аннотация" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:49 msgid "" "Beginners may find it difficult to relate the facts from the formal " "documentation on the BSD [.filename]#rc.d# framework with the practical " "tasks of [.filename]#rc.d# scripting. In this article, we consider a few " "typical cases of increasing complexity, show [.filename]#rc.d# features " "suited for each case, and discuss how they work. Such an examination should " "provide reference points for further study of the design and efficient " "application of [.filename]#rc.d#." msgstr "" "Новичкам может быть сложно соотнести факты из официальной документации по " "фреймворку [.filename]#rc.d# в BSD с практическими задачами написания " "скриптов для [.filename]#rc.d#. В этой статье мы рассмотрим несколько " "типичных случаев возрастающей сложности, покажем возможности [.filename]#rc." "d#, подходящие для каждого случая, и обсудим, как они работают. Такое " "рассмотрение должно дать ориентиры для дальнейшего изучения устройства и " "эффективного применения [.filename]#rc.d#." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:51 msgid "'''" msgstr "'''" #. type: Title == #: documentation/content/en/articles/rc-scripting/_index.adoc:55 #, no-wrap msgid "Introduction" msgstr "Введение" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:61 msgid "" "The historical BSD had a monolithic startup script, [.filename]#/etc/rc#. " "It was invoked by man:init[8] at system boot time and performed all userland " "tasks required for multi-user operation: checking and mounting file systems, " "setting up the network, starting daemons, and so on. The precise list of " "tasks was not the same in every system; admins needed to customize it. With " "few exceptions, [.filename]#/etc/rc# had to be modified, and true hackers " "liked it." msgstr "" "Исторически в BSD был монолитный стартовый сценарий [.filename]#/etc/rc#. Он " "вызывался man:init[8] во время загрузки системы и выполнял все задачи " "пользовательского пространства, необходимые для многопользовательского " "режима: проверку и монтирование файловых систем, настройку сети, запуск " "демонов и так далее. Точный список задач не был одинаковым в каждой системе; " "администраторам требовалось его настраивать. За редкими исключениями, [." "filename]#/etc/rc# приходилось изменять, и настоящим хакерам это нравилось." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:67 msgid "" "The real problem with the monolithic approach was that it provided no " "control over the individual components started from [.filename]#/etc/rc#. " "For instance, [.filename]#/etc/rc# could not restart a single daemon. The " "system admin had to find the daemon process by hand, kill it, wait until it " "actually exited, then browse through [.filename]#/etc/rc# for the flags, and " "finally type the full command line to start the daemon again. The task " "would become even more difficult and prone to errors if the service to " "restart consisted of more than one daemon or demanded additional actions. " "In a few words, the single script failed to fulfil what scripts are for: to " "make the system admin's life easier." msgstr "" "Основная проблема монолитного подхода заключалась в том, что он не " "предоставлял контроля над отдельными компонентами, запускаемыми из [." "filename]#/etc/rc#. Например, [.filename]#/etc/rc# не мог перезапустить " "отдельный демон. Администратору системы приходилось вручную находить процесс " "демона, завершать его, ждать, пока он действительно завершится, затем искать " "в [.filename]#/etc/rc# нужные флаги и, наконец, вводить полную командную " "строку для повторного запуска демона. Задача становилась ещё сложнее и более " "подверженной ошибкам, если служба состояла из нескольких демонов или " "требовала дополнительных действий. Одним словом, единый скрипт не справлялся " "с тем, для чего скрипты вообще предназначены: облегчать жизнь администратору " "системы." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:74 msgid "" "Later there was an attempt to split out some parts of [.filename]#/etc/rc# " "for the sake of starting the most important subsystems separately. The " "notorious example was [.filename]#/etc/netstart# to bring up networking. It " "did allow for accessing the network from single-user mode, but it did not " "integrate well into the automatic startup process because parts of its code " "needed to interleave with actions essentially unrelated to networking. That " "was why [.filename]#/etc/netstart# mutated into [.filename]#/etc/rc." "network#. The latter was no longer an ordinary script; it comprised of " "large, tangled man:sh[1] functions called from [.filename]#/etc/rc# at " "different stages of system startup. However, as the startup tasks grew " "diverse and sophisticated, the \"quasi-modular\" approach became even more " "of a drag than the monolithic [.filename]#/etc/rc# had been." msgstr "" "Позже была предпринята попытка разделить некоторые части [.filename]#/etc/" "rc# для возможности отдельного запуска наиболее важных подсистем. Известным " "примером стал [.filename]#/etc/netstart#, предназначенный для настройки " "сети. Это позволяло получить доступ к сети в однопользовательском режиме, но " "плохо интегрировалось в автоматический процесс запуска, так как части его " "кода требовалось переплетаться с действиями, по сути не связанными с сетью. " "Именно поэтому [.filename]#/etc/netstart# превратился в [.filename]#/etc/rc." "network#. Последний больше не был обычным скриптом; он состоял из больших, " "запутанных функций man:sh[1], вызываемых из [.filename]#/etc/rc# на разных " "этапах загрузки системы. Однако по мере того, как задачи при запуске " "становились разнообразнее и сложнее, \"квазимодульный\" подход стал ещё " "большей обузой, чем монолитный [.filename]#/etc/rc#." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:82 msgid "" "Without a clean and well-designed framework, the startup scripts had to bend " "over backwards to satisfy the needs of rapidly developing BSD-based " "operating systems. It became obvious at last that more steps are necessary " "on the way to a fine-grained and extensible [.filename]#rc# system. Thus " "BSD [.filename]#rc.d# was born. Its acknowledged fathers were Luke Mewburn " "and the NetBSD community. Later it was imported into FreeBSD. Its name " "refers to the location of system scripts for individual services, which is " "in [.filename]#/etc/rc.d#. Soon we will learn about more components of the " "[.filename]#rc.d# system and see how the individual scripts are invoked." msgstr "" "Без чистого и хорошо продуманного каркаса, стартовые скрипты вынуждены были " "идти на всевозможные ухищрения, чтобы удовлетворить потребности быстро " "развивающихся BSD-ориентированных операционных систем. В конце концов стало " "очевидно, что необходимы дополнительные шаги на пути к детализированной и " "расширяемой системе [.filename]#rc#. Так появилась BSD [.filename]#rc.d#. Её " "признанными создателями стали Люк Мьюберн и сообщество NetBSD. Позже она " "была импортирована в FreeBSD. Её название отсылает к расположению системных " "скриптов для отдельных служб, которое находится в [.filename]#/etc/rc.d#. " "Вскоре мы узнаем больше о компонентах системы [.filename]#rc.d# и увидим, " "как вызываются отдельные скрипты." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:93 msgid "" "The basic ideas behind BSD [.filename]#rc.d# are _fine modularity_ and " "__code reuse__. _Fine modularity_ means that each basic \"service\" such as " "a system daemon or primitive startup task gets its own man:sh[1] script able " "to start the service, stop it, reload it, check its status. A particular " "action is chosen by the command-line argument to the script. The [." "filename]#/etc/rc# script still drives system startup, but now it merely " "invokes the smaller scripts one by one with the `start` argument. It is " "easy to perform shutdown tasks as well by running the same set of scripts " "with the `stop` argument, which is done by [.filename]#/etc/rc.shutdown#. " "Note how closely this follows the Unix way of having a set of small " "specialized tools, each fulfilling its task as well as possible. _Code " "reuse_ means that common operations are implemented as man:sh[1] functions " "and collected in [.filename]#/etc/rc.subr#. Now a typical script can be " "just a few lines' worth of man:sh[1] code. Finally, an important part of " "the [.filename]#rc.d# framework is man:rcorder[8], which helps [.filename]#/" "etc/rc# to run the small scripts orderly with respect to dependencies " "between them. It can help [.filename]#/etc/rc.shutdown#, too, because the " "proper order for the shutdown sequence is opposite to that of startup." msgstr "" "Основные идеи, лежащие в основе BSD [.filename]#rc.d#, — это _тонкая " "модульность_ и __повторное использование кода__. _Тонкая модульность_ " "означает, что каждая базовая «служба», такая как системный демон или " "примитивная задача запуска, получает собственный сценарий man:sh[1], " "способный запустить службу, остановить её, перезагрузить или проверить её " "состояние. Конкретное действие выбирается аргументом командной строки, " "переданным в сценарий. Сценарий [.filename]#/etc/rc# по-прежнему управляет " "запуском системы, но теперь он просто вызывает небольшие сценарии один за " "другим с аргументом `start`. Также легко выполнять задачи завершения работы, " "запуская тот же набор сценариев с аргументом `stop`, что и делает [." "filename]#/etc/rc.shutdown#. Обратите внимание, насколько это близко следует " "Unix-подходу, где используется набор небольших специализированных " "инструментов, каждый из которых выполняет свою задачу наилучшим образом. " "_Повторное использование кода_ означает, что общие операции реализованы как " "функции man:sh[1] и собраны в [.filename]#/etc/rc.subr#. Теперь типичный " "сценарий может состоять всего из нескольких строк кода man:sh[1]. Наконец, " "важной частью инфраструктуры [.filename]#rc.d# является man:rcorder[8], " "который помогает [.filename]#/etc/rc# упорядоченно запускать небольшие " "сценарии с учётом зависимостей между ними. Он также может помочь [." "filename]#/etc/rc.shutdown#, поскольку правильный порядок завершения работы " "противоположен порядку запуска." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:101 msgid "" "The BSD [.filename]#rc.d# design is described in crossref:rc-" "scripting[lukem, the original article by Luke Mewburn], and the [." "filename]#rc.d# components are documented in great detail in crossref:rc-" "scripting[manpages, the respective manual pages]. However, it might not " "appear obvious to an [.filename]#rc.d# newbie how to tie the numerous bits " "and pieces together to create a well-styled script for a particular task. " "Therefore this article will try a different approach to describe [." "filename]#rc.d#. It will show which features should be used in a number of " "typical cases, and why. Note that this is not a how-to document because our " "aim is not at giving ready-made recipes, but at showing a few easy entrances " "into the [.filename]#rc.d# realm. Neither is this article a replacement for " "the relevant manual pages. Do not hesitate to refer to them for more formal " "and complete documentation while reading this article." msgstr "" "Дизайн BSD [.filename]#rc.d# описан в crossref:rc-scripting[lukem, " "оригинальной статье Люка Мьюберна], а компоненты [.filename]#rc.d# подробно " "документированы в crossref:rc-scripting[manpages, соответствующих страницах " "Справочника]. Однако новичку в [.filename]#rc.d# может быть неочевидно, как " "связать многочисленные элементы вместе, чтобы создать хорошо " "структурированный скрипт для конкретной задачи. Поэтому в этой статье будет " "предпринята попытка описать [.filename]#rc.d# с другого ракурса. В ней будет " "показано, какие функции следует использовать в ряде типичных случаев и " "почему. Обратите внимание, что это не руководство HowTo, поскольку наша цель " "— не предоставление готовых рецептов, а демонстрация нескольких простых " "способов входа в мир [.filename]#rc.d#. Также эта статья не заменяет " "соответствующие страниц Справочника. Не стесняйтесь обращаться к ним для " "получения более формальной и полной документации во время чтения этой статьи." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:105 msgid "" "There are prerequisites to understanding this article. First of all, you " "should be familiar with the man:sh[1] scripting language to master [." "filename]#rc.d#. In addition, you should know how the system performs " "userland startup and shutdown tasks, which is described in man:rc[8]." msgstr "" "Для понимания этой статьи есть предварительные требования. Прежде всего, вы " "должны быть знакомы с языком написания сценариев man:sh[1], чтобы освоить [." "filename]#rc.d#. Кроме того, вы должны знать, как система выполняет задачи " "запуска и завершения работы пользовательского пространства, что описано в " "man:rc[8]." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:108 msgid "" "This article focuses on the FreeBSD branch of [.filename]#rc.d#. " "Nevertheless, it may be useful to NetBSD developers, too, because the two " "branches of BSD [.filename]#rc.d# not only share the same design but also " "stay similar in their aspects visible to script authors." msgstr "" "Эта статья посвящена ветке FreeBSD в [.filename]#rc.d#. Тем не менее, она " "может быть полезна и разработчикам NetBSD, потому что две ветки BSD [." "filename]#rc.d# не только разделяют одинаковый дизайн, но и остаются схожими " "в аспектах, видимых авторам скриптов." #. type: Title == #: documentation/content/en/articles/rc-scripting/_index.adoc:110 #, no-wrap msgid "Outlining the task" msgstr "Обрисовка задачи" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:114 msgid "" "A little consideration before starting `$EDITOR` will not hurt. To write a " "well-tempered [.filename]#rc.d# script for a system service, we should be " "able to answer the following questions first:" msgstr "" "Немного размышлений перед запуском `$EDITOR` не повредит. Чтобы написать " "хорошо продуманный скрипт [.filename]#rc.d# для системной службы, сначала " "нужно ответить на следующие вопросы:" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:116 msgid "Is the service mandatory or optional?" msgstr "Является ли служба обязательной или опциональной?" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:117 msgid "" "Will the script serve a single program, e.g., a daemon, or perform more " "complex actions?" msgstr "" "Будет ли скрипт обслуживать одну программу, например, демон, или выполнять " "более сложные действия?" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:118 msgid "Which other services will our service depend on, and vice versa?" msgstr "От каких других служб зависит наша служба, и наоборот?" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:120 msgid "" "From the examples that follow we will see why it is important to know the " "answers to these questions." msgstr "" "Из следующих примеров мы увидим, почему важно знать ответы на эти вопросы." #. type: Title == #: documentation/content/en/articles/rc-scripting/_index.adoc:122 #, no-wrap msgid "A dummy script" msgstr "Примитивный скрипт" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:125 msgid "" "The following script just emits a message each time the system boots up:" msgstr "" "Следующий скрипт просто выводит сообщение каждый раз при загрузке системы:" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:129 #, no-wrap msgid "#!/bin/sh <.>\n" msgstr "#!/bin/sh <.>\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:131 #, no-wrap msgid ". /etc/rc.subr <.>\n" msgstr ". /etc/rc.subr <.>\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:135 #, no-wrap msgid "" "name=\"dummy\" <.>\n" "start_cmd=\"${name}_start\" <.>\n" "stop_cmd=\":\" <.>\n" msgstr "" "name=\"dummy\" <.>\n" "start_cmd=\"${name}_start\" <.>\n" "stop_cmd=\":\" <.>\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:140 #, no-wrap msgid "" "dummy_start() <.>\n" "{\n" "\techo \"Nothing started.\"\n" "}\n" msgstr "" "dummy_start() <.>\n" "{\n" "\techo \"Nothing started.\"\n" "}\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:143 #, no-wrap msgid "" "load_rc_config $name <.>\n" "run_rc_command \"$1\" <.>\n" msgstr "" "load_rc_config $name <.>\n" "run_rc_command \"$1\" <.>\n" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:146 msgid "Things to note are:" msgstr "Вот что следует учитывать:" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:152 msgid "" "➊ An interpreted script should begin with the magic \"shebang\" " "line. That line specifies the interpreter program for the script. Due to " "the shebang line, the script can be invoked exactly like a binary program " "provided that it has the execute bit set. (See man:chmod[1].) For example, " "a system admin can run our script manually, from the command line:" msgstr "" "➊ Интерпретируемый скрипт должен начинаться с \"волшебной\" строки " "shebang. Эта строка указывает программу-интерпретатор для скрипта. Благодаря " "строке shebang скрипт может быть запущен точно так же, как бинарная " "программа, при условии что у него установлен бит выполнения. (См. man:" "chmod[1].) Например, системный администратор может запустить наш скрипт " "вручную из командной строки:" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:156 #, no-wrap msgid "# /etc/rc.d/dummy start\n" msgstr "# /etc/rc.d/dummy start\n" #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:162 msgid "" "To be properly managed by the [.filename]#rc.d# framework, its scripts need " "to be written in the man:sh[1] language. If you have a service or port that " "uses a binary control utility or a startup routine written in another " "language, install that element in [.filename]#/usr/sbin# (for the system) or " "[.filename]#/usr/local/sbin# (for ports) and call it from a man:sh[1] script " "in the appropriate [.filename]#rc.d# directory." msgstr "" "Для корректного управления в рамках [.filename]#rc.d# скрипты должны быть " "написаны на языке man:sh[1]. Если у вас есть служба или порт, который " "использует двоичную утилиту управления или процедуру запуска, написанную на " "другом языке, установите этот компонент в [.filename]#/usr/sbin# (для " "системы) или [.filename]#/usr/local/sbin# (для портов) и вызовите его из man:" "sh[1] скрипта в соответствующем каталоге [.filename]#rc.d#." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:167 msgid "" "If you would like to learn the details of why [.filename]#rc.d# scripts must " "be written in the man:sh[1] language, see how [.filename]#/etc/rc# invokes " "them by means of `run_rc_script`, then study the implementation of " "`run_rc_script` in [.filename]#/etc/rc.subr#." msgstr "" "Если вы хотите узнать подробности о том, почему скрипты [.filename]#rc.d# " "должны быть написаны на языке man:sh[1], изучите, как [.filename]#/etc/rc# " "вызывает их с помощью `run_rc_script`, а затем изучите реализацию " "`run_rc_script` в [.filename]#/etc/rc.subr#." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:173 msgid "" "➋ In [.filename]#/etc/rc.subr#, a number of man:sh[1] functions are " "defined for an [.filename]#rc.d# script to use. The functions are " "documented in man:rc.subr[8]. While it is theoretically possible to write " "an [.filename]#rc.d# script without ever using man:rc.subr[8], its functions " "prove extremely handy and make the job an order of magnitude easier. So it " "is no surprise that everybody resorts to man:rc.subr[8] in [.filename]#rc.d# " "scripts. We are not going to be an exception." msgstr "" "➋ В файле [.filename]#/etc/rc.subr# определено несколько функций man:" "sh[1], которые могут использоваться скриптами [.filename]#rc.d#. Эти функции " "описаны в man:rc.subr[8]. Хотя теоретически возможно написать скрипт [." "filename]#rc.d# без использования man:rc.subr[8], его функции оказываются " "чрезвычайно полезными и значительно упрощают задачу. Поэтому неудивительно, " "что все используют man:rc.subr[8] в скриптах [.filename]#rc.d#. Мы не будем " "исключением." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:176 msgid "" "An [.filename]#rc.d# script must \"source\"[.filename]#/etc/rc.subr# " "(include it using \"`.`\") _before_ it calls man:rc.subr[8] functions so " "that man:sh[1] has an opportunity to learn the functions. The preferred " "style is to source [.filename]#/etc/rc.subr# first of all." msgstr "" "Файл [.filename]#rc.d# должен \"подгрузить\" ([.filename]#/etc/rc.subr#, " "включить его с помощью \"`.`\") _до_ вызова функций man:rc.subr[8], чтобы у " "man:sh[1] была возможность знать об этих функциях заранее. Предпочтительный " "стиль — подгружать [.filename]#/etc/rc.subr# в самом начале." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:180 msgid "" "Some useful functions related to networking are provided by another include " "file, [.filename]#/etc/network.subr#." msgstr "" "Некоторые полезные функции, связанные с сетью, предоставляются другим " "включаемым файлом — [.filename]#/etc/network.subr#." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:185 msgid "" "➌ [[name-var]]The mandatory variable `name` specifies the name of our " "script. It is required by man:rc.subr[8]. That is, each [.filename]#rc.d# " "script _must_ set `name` before it calls man:rc.subr[8] functions." msgstr "" "➌ [[name-var]]Обязательная переменная `name` определяет имя нашего " "скрипта. Она требуется man:rc.subr[8]. То есть, каждый скрипт в [." "filename]#rc.d# _должен_ установить `name` перед вызовом функций man:rc." "subr[8]." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:191 msgid "" "Now it is the right time to choose a unique name for our script once and for " "all. We will use it in a number of places while developing the script. The " "content of the name variable needs to match the script name, some parts of " "FreeBSD (e.g., crossref:rc-scripting[rcng-service-jails, service jails] and " "the cpuset feature of the rc framework) depend upon this. As such the " "filename shall also not contain characters which may be troublesome in " "scripting (e.g., do not use a hyphen \"-\" and others)." msgstr "" "Теперь самое время раз и навсегда выбрать уникальное имя для нашего скрипта. " "Мы будем использовать его в нескольких местах при разработке скрипта. " "Содержимое переменной name должно соответствовать имени скрипта, так как " "некоторые части FreeBSD (например, crossref:rc-scripting[rcng-service-jails, " "сервисные клетки (jail)] и функция cpuset в rc framework) зависят от этого. " "Таким образом, имя файла также не должно содержать символов, которые могут " "вызвать проблемы в скриптах (например, не используйте дефис \"-\" и другие)." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:198 msgid "" "The current style of [.filename]#rc.d# scripting is to enclose values " "assigned to variables in double quotes. Keep in mind that it is just a " "style issue that may not always be applicable. You can safely omit quotes " "from around simple words without man:sh[1] metacharacters in them, while in " "certain cases you will need single quotes to prevent any interpretation of " "the value by man:sh[1]. A programmer should be able to tell the language " "syntax from style conventions and use both of them wisely." msgstr "" "Текущий стиль написания скриптов в [.filename]#rc.d# заключается в " "заключении значений, присваиваемых переменным, в двойные кавычки. Имейте в " "виду, что это всего лишь вопрос стиля, который может быть не всегда " "применим. Вы можете безопасно опустить кавычки вокруг простых слов без " "метасимволов man:sh[1], тогда как в некоторых случаях вам понадобятся " "одинарные кавычки, чтобы предотвратить интерпретацию значения man:sh[1]. " "Программист должен уметь отличать синтаксис языка от стилевых соглашений и " "разумно использовать и то, и другое." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:204 msgid "" "➍ The main idea behind man:rc.subr[8] is that an [.filename]#rc.d# " "script provides handlers, or methods, for man:rc.subr[8] to invoke. In " "particular, `start`, `stop`, and other arguments to an [.filename]#rc.d# " "script are handled this way. A method is a man:sh[1] expression stored in a " "variable named `argument_cmd`, where _argument_ corresponds to what can be " "specified on the script's command line. We will see later how man:rc." "subr[8] provides default methods for the standard arguments." msgstr "" "➍ Основная идея man:rc.subr[8] заключается в том, что скрипт [." "filename]#rc.d# предоставляет обработчики (или методы) для вызова man:rc." "subr[8]. В частности, аргументы `start`, `stop` и другие, передаваемые в " "скрипт [.filename]#rc.d#, обрабатываются таким образом. Метод представляет " "собой выражение man:sh[1], сохранённое в переменной с именем `argument_cmd`, " "где _argument_ соответствует тому, что может быть указано в командной строке " "скрипта. Далее мы увидим, как man:rc.subr[8] предоставляет стандартные " "методы для типовых аргументов." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:209 msgid "" "To make the code in [.filename]#rc.d# more uniform, it is common to use `" "${name}` wherever appropriate. Thus a number of lines can be just copied " "from one script to another." msgstr "" "Чтобы сделать код в [.filename]#rc.d# более единообразным, обычно используют " "`${name}` везде, где это уместно. Таким образом, множество строк можно " "просто копировать из одного скрипта в другой." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:213 msgid "" "➎ We should keep in mind that man:rc.subr[8] provides default methods " "for the standard arguments. Consequently, we must override a standard " "method with a no-op man:sh[1] expression if we want it to do nothing." msgstr "" "➎ Следует помнить, что man:rc.subr[8] предоставляет методы по " "умолчанию для стандартных аргументов. Следовательно, если мы хотим, чтобы " "стандартный метод ничего не делал, мы должны переопределить его с помощью no-" "op man:sh[1] выражения." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:216 msgid "" "➏ The body of a sophisticated method can be implemented as a " "function. It is a good idea to make the function name meaningful." msgstr "" "➏ Тело сложного метода может быть реализовано в виде функции. Хорошей " "практикой является использование осмысленного имени функции." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:220 msgid "" "It is strongly recommended to add the prefix `${name}` to the names of all " "functions defined in our script so they never clash with the functions from " "man:rc.subr[8] or another common include file." msgstr "" "Настоятельно рекомендуется добавлять префикс `${name}` к именам всех " -"функций, определенных в нашем скрипте, чтобы они никогда не конфликтовали с " +"функций, определённых в нашем скрипте, чтобы они никогда не конфликтовали с " "функциями из man:rc.subr[8] или другого общего включаемого файла." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:224 msgid "" "➐ This call to man:rc.subr[8] loads man:rc.conf[5] variables. Our " "script makes no use of them yet, but it still is recommended to load man:rc." "conf[5] because there can be man:rc.conf[5] variables controlling man:rc." "subr[8] itself." msgstr "" "➐ Этот вызов man:rc.subr[8] загружает переменные man:rc.conf[5]. Наш " "скрипт пока их не использует, но всё равно рекомендуется загружать man:rc." "conf[5], потому что могут быть переменные man:rc.conf[5], управляющие самим " "man:rc.subr[8]." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:227 msgid "" "➑ Usually this is the last command in an [.filename]#rc.d# script. " "It invokes the man:rc.subr[8] machinery to perform the requested action " "using the variables and methods our script has provided." msgstr "" "➑ Обычно это последняя команда в скрипте [.filename]#rc.d#. Она " "вызывает механизм man:rc.subr[8] для выполнения запрошенного действия, " "используя переменные и методы, предоставленные нашим скриптом." #. type: Title == #: documentation/content/en/articles/rc-scripting/_index.adoc:229 #, no-wrap msgid "A configurable dummy script" msgstr "Настраиваемый фиктивный скрипт" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:239 msgid "" "Now let us add some controls to our dummy script. As you may know, [." "filename]#rc.d# scripts are controlled with man:rc.conf[5]. Fortunately, " "man:rc.subr[8] hides all the complications from us. The following script " "uses man:rc.conf[5] via man:rc.subr[8] to see whether it is enabled in the " "first place, and to fetch a message to show at boot time. These two tasks " "in fact are independent. On the one hand, an [.filename]#rc.d# script can " "just support enabling and disabling its service. On the other hand, a " "mandatory [.filename]#rc.d# script can have configuration variables. We " "will do both things in the same script though:" msgstr "" "Теперь добавим некоторые элементы управления в наш тестовый скрипт. Как вам " "может быть известно, скрипты [.filename]#rc.d# управляются с помощью man:rc." "conf[5]. К счастью, man:rc.subr[8] скрывает от нас все сложности. Следующий " "скрипт использует man:rc.conf[5] через man:rc.subr[8], чтобы проверить, " "включен ли он вообще, и получить сообщение для отображения во время " "загрузки. Эти две задачи на самом деле независимы. С одной стороны, скрипт [." "filename]#rc.d# может просто поддерживать включение и выключение своего " "сервиса. С другой стороны, обязательный скрипт [.filename]#rc.d# может иметь " "переменные конфигурации. Однако мы реализуем обе возможности в одном скрипте:" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:243 #: documentation/content/en/articles/rc-scripting/_index.adoc:334 #: documentation/content/en/articles/rc-scripting/_index.adoc:392 #: documentation/content/en/articles/rc-scripting/_index.adoc:624 #: documentation/content/en/articles/rc-scripting/_index.adoc:755 #: documentation/content/en/articles/rc-scripting/_index.adoc:860 #: documentation/content/en/articles/rc-scripting/_index.adoc:893 #: documentation/content/en/articles/rc-scripting/_index.adoc:927 #, no-wrap msgid "#!/bin/sh\n" msgstr "#!/bin/sh\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:245 #: documentation/content/en/articles/rc-scripting/_index.adoc:336 #: documentation/content/en/articles/rc-scripting/_index.adoc:394 #: documentation/content/en/articles/rc-scripting/_index.adoc:631 #: documentation/content/en/articles/rc-scripting/_index.adoc:757 #: documentation/content/en/articles/rc-scripting/_index.adoc:862 #: documentation/content/en/articles/rc-scripting/_index.adoc:895 #: documentation/content/en/articles/rc-scripting/_index.adoc:943 #, no-wrap msgid ". /etc/rc.subr\n" msgstr ". /etc/rc.subr\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:248 #, no-wrap msgid "" "name=dummy\n" "rcvar=dummy_enable <.>\n" msgstr "" "name=dummy\n" "rcvar=dummy_enable <.>\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:251 #, no-wrap msgid "" "start_cmd=\"${name}_start\"\n" "stop_cmd=\":\"\n" msgstr "" "start_cmd=\"${name}_start\"\n" "stop_cmd=\":\"\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:255 #, no-wrap msgid "" "load_rc_config $name <.>\n" ": ${dummy_enable:=no} <.>\n" ": ${dummy_msg=\"Nothing started.\"} <.>\n" msgstr "" "load_rc_config $name <.>\n" ": ${dummy_enable:=no} <.>\n" ": ${dummy_msg=\"Nothing started.\"} <.>\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:260 #, no-wrap msgid "" "dummy_start()\n" "{\n" "\techo \"$dummy_msg\" <.>\n" "}\n" msgstr "" "dummy_start()\n" "{\n" "\techo \"$dummy_msg\" <.>\n" "}\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:262 #: documentation/content/en/articles/rc-scripting/_index.adoc:972 #, no-wrap msgid "run_rc_command \"$1\"\n" msgstr "run_rc_command \"$1\"\n" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:265 msgid "What changed in this example?" msgstr "Что изменилось в этом примере?" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:267 msgid "" "➊ The variable `rcvar` specifies the name of the ON/OFF knob variable." msgstr "" "➊ Переменная `rcvar` определяет имя переменной-переключателя ON/OFF." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:269 msgid "" "➋ Now `load_rc_config` is invoked earlier in the script, before any " "man:rc.conf[5] variables are accessed." msgstr "" "➋ Теперь `load_rc_config` вызывается раньше в скрипте, до обращения к " "любым переменным man:rc.conf[5]." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:275 msgid "" "While examining [.filename]#rc.d# scripts, keep in mind that man:sh[1] " "defers the evaluation of expressions in a function until the latter is " "called. Therefore it is not an error to invoke `load_rc_config` as late as " "just before `run_rc_command` and still access man:rc.conf[5] variables from " "the method functions exported to `run_rc_command`. This is because the " "method functions are to be called by `run_rc_command`, which is invoked " "_after_ `load_rc_config`." msgstr "" "При изучении скриптов в [.filename]#rc.d# следует помнить, что man:sh[1] " "откладывает вычисление выражений в функции до её вызова. Поэтому не будет " "ошибкой вызвать `load_rc_config` непосредственно перед `run_rc_command` и " "при этом обращаться к переменным man:rc.conf[5] из функций методов, " "экспортируемых в `run_rc_command`. Это связано с тем, что функции методов " "вызываются `run_rc_command`, который выполняется _после_ `load_rc_config`." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:281 msgid "" "➌ A warning will be emitted by `run_rc_command` if `rcvar` itself is " "set, but the indicated knob variable is unset. If your [.filename]#rc.d# " "script is for the base system, you should add a default setting for the knob " "to [.filename]#/etc/defaults/rc.conf# and document it in man:rc.conf[5]. " "Otherwise it is your script that should provide a default setting for the " "knob. The canonical approach to the latter case is shown in the example." msgstr "" "➌ `run_rc_command` выдаст предупреждение, если переменная `rcvar` " "установлена, но указанная переменная-флаг не задана. Если ваш скрипт [." "filename]#rc.d# предназначен для базовой системы, вы должны добавить " "значение по умолчанию для флага в [.filename]#/etc/defaults/rc.conf# и " "задокументировать его в man:rc.conf[5]. В противном случае ваш скрипт должен " "предоставить значение по умолчанию для флага. Канонический подход для " "последнего случая показан в примере." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:288 msgid "" "You can make man:rc.subr[8] act as though the knob is set to `ON`, " "irrespective of its current setting, by prefixing the argument to the script " "with `one` or `force`, as in `onestart` or `forcestop`. Keep in mind though " "that `force` has other dangerous effects we will touch upon below, while " "`one` just overrides the ON/OFF knob. E.g., assume that `dummy_enable` is " "`OFF`. The following command will run the `start` method in spite of the " "setting:" msgstr "" "Вы можете заставить man:rc.subr[8] действовать так, как если бы " "переключатель установлен в `ON`, независимо от его текущего значения, " "добавив перед аргументом скрипта префикс `one` или `force`, например " "`onestart` или `forcestop`. Однако учтите, что `force` имеет другие опасные " "эффекты, которые мы затронем ниже, тогда как `one` просто переопределяет " "переключатель ON/OFF. Например, предположим, что `dummy_enable` установлен в " "`OFF`. Следующая команда выполнит метод `start`, несмотря на настройку:" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:292 #, no-wrap msgid "# /etc/rc.d/dummy onestart\n" msgstr "# /etc/rc.d/dummy onestart\n" #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:299 msgid "" "➍ Now the message to be shown at boot time is no longer hard-coded in " "the script. It is specified by an man:rc.conf[5] variable named " "`dummy_msg`. This is a trivial example of how man:rc.conf[5] variables can " "control an [.filename]#rc.d# script." msgstr "" -"➍ Теперь сообщение, отображаемое при загрузке, больше не жестко " -"закодировано в скрипте. Оно задается переменной `dummy_msg` в man:rc." -"conf[5]. Это простой пример того, как переменные man:rc.conf[5] могут " -"управлять скриптом в [.filename]#rc.d#." +"➍ Теперь сообщение, отображаемое при загрузке, больше не жёстко " +"закодировано в скрипте. Оно задается переменной `dummy_msg` в man:rc.conf[5]" +". Это простой пример того, как переменные man:rc.conf[5] могут управлять " +"скриптом в [.filename]#rc.d#." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:304 msgid "" "The names of all man:rc.conf[5] variables used exclusively by our script " "_must_ have the same prefix: `${name}_`. For example: `dummy_mode`, " "`dummy_state_file`, and so on." msgstr "" "Имена всех переменных man:rc.conf[5], используемых исключительно нашим " "скриптом, _должны_ иметь один и тот же префикс: `${name}_`. Например: " "`dummy_mode`, `dummy_state_file` и так далее." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:309 msgid "" "While it is possible to use a shorter name internally, e.g., just `msg`, " "adding the unique prefix `${name}_` to all global names introduced by our " "script will save us from possible collisions with the man:rc.subr[8] " "namespace." msgstr "" "Хотя можно использовать более короткое имя внутри, например, просто `msg`, " "добавление уникального префикса `${name}_` ко всем глобальным именам, " "вводимым нашим скриптом, избавит нас от возможных конфликтов с пространством " -"имен man:rc.subr[8]." +"имён man:rc.subr[8]." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:312 msgid "" "As a rule, [.filename]#rc.d# scripts of the base system need not provide " "defaults for their man:rc.conf[5] variables because the defaults should be " "set in [.filename]#/etc/defaults/rc.conf# instead. On the other hand, [." "filename]#rc.d# scripts for ports should provide the defaults as shown in " "the example." msgstr "" "Как правило, скрипты [.filename]#rc.d# базовой системы не должны " "предоставлять значения по умолчанию для своих переменных man:rc.conf[5], " "поскольку значения по умолчанию должны быть установлены в [.filename]#/etc/" "defaults/rc.conf#. С другой стороны, скрипты [.filename]#rc.d# для портов " "должны предоставлять значения по умолчанию, как показано в примере." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:316 msgid "" "➎ Here we use `dummy_msg` to actually control our script, i.e., to " "emit a variable message. Use of a shell function is overkill here, since it " "only runs a single command; an equally valid alternative is:" msgstr "" "➎ Здесь мы используем `dummy_msg` для фактического управления нашим " "скриптом, т.е., для выдачи переменного сообщения. Использование shell-" "функции здесь избыточно, так как она выполняет только одну команду; " "равнозначной альтернативой является:" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:320 #, no-wrap msgid "start_cmd=\"echo \\\"$dummy_msg\\\"\"\n" msgstr "start_cmd=\"echo \\\"$dummy_msg\\\"\"\n" #. type: Title == #: documentation/content/en/articles/rc-scripting/_index.adoc:323 #, no-wrap msgid "Startup and shutdown of a simple daemon" msgstr "Запуск и остановка простого демона" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:330 msgid "" "We said earlier that man:rc.subr[8] could provide default methods. " "Obviously, such defaults cannot be too general. They are suited for the " "common case of starting and shutting down a simple daemon program. Let us " "assume now that we need to write an [.filename]#rc.d# script for such a " "daemon called `mumbled`. Here it is:" msgstr "" "Мы ранее говорили, что man:rc.subr[8] может предоставлять методы по " "умолчанию. Очевидно, что такие методы не могут быть слишком общими. Они " "подходят для стандартного случая запуска и остановки простого демона. " "Предположим, что нам нужно написать скрипт [.filename]#rc.d# для такого " "демона с именем `mumbled`. Вот он:" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:339 #: documentation/content/en/articles/rc-scripting/_index.adoc:397 #: documentation/content/en/articles/rc-scripting/_index.adoc:634 #, no-wrap msgid "" "name=mumbled\n" "rcvar=mumbled_enable\n" msgstr "" "name=mumbled\n" "rcvar=mumbled_enable\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:341 #, no-wrap msgid "command=\"/usr/sbin/${name}\" <.>\n" msgstr "command=\"/usr/sbin/${name}\" <.>\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:344 #: documentation/content/en/articles/rc-scripting/_index.adoc:443 #: documentation/content/en/articles/rc-scripting/_index.adoc:649 #: documentation/content/en/articles/rc-scripting/_index.adoc:876 #, no-wrap msgid "" "load_rc_config $name\n" "run_rc_command \"$1\"\n" msgstr "" "load_rc_config $name\n" "run_rc_command \"$1\"\n" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:348 msgid "" "Pleasingly simple, isn't it? Let us examine our little script. The only new " "thing to note is as follows:" msgstr "" "Приятно просто, не так ли? Давайте рассмотрим наш небольшой скрипт. " "Единственное новое, на что стоит обратить внимание, это следующее:" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:352 msgid "" "➊ The `command` variable is meaningful to man:rc.subr[8]. If it is " "set, man:rc.subr[8] will act according to the scenario of serving a " "conventional daemon. In particular, the default methods will be provided " "for such arguments: `start`, `stop`, `restart`, `poll`, and `status`." msgstr "" "➊ Переменная `command` имеет значение для man:rc.subr[8]. Если она " "установлена, man:rc.subr[8] будет действовать по сценарию обслуживания " "обычного демона. В частности, будут предоставлены стандартные методы для " "таких аргументов: `start`, `stop`, `restart`, `poll` и `status`." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:361 msgid "" "The daemon will be started by running `$command` with command-line flags " "specified by `$mumbled_flags`. Thus all the input data for the default " "`start` method are available in the variables set by our script. Unlike " "`start`, other methods may require additional information about the process " "started. For instance, `stop` must know the PID of the process to terminate " "it. In the present case, man:rc.subr[8] will scan through the list of all " "processes, looking for a process with its name equal to `procname`. The " "latter is another variable of meaning to man:rc.subr[8], and its value " "defaults to that of `command`. In other words, when we set `command`, " "`procname` is effectively set to the same value. This enables our script to " "kill the daemon and to check if it is running in the first place." msgstr "" "Демон будет запущен выполнением `$command` с флагами командной строки, " "указанными в `$mumbled_flags`. Таким образом, все входные данные для метода " "`start` по умолчанию доступны в переменных, установленных нашим скриптом. В " "отличие от `start`, другие методы могут требовать дополнительной информации " "о запущенном процессе. Например, `stop` должен знать PID процесса, чтобы " "завершить его. В данном случае, man:rc.subr[8] будет просматривать список " "всех процессов, ища процесс с именем, равным `procname`. Последний является " "ещё одной значимой переменной для man:rc.subr[8], и её значение по умолчанию " "совпадает со значением `command`. Другими словами, когда мы устанавливаем " "`command`, `procname` фактически устанавливается в то же значение. Это " "позволяет нашему скрипту завершить демон и проверить, запущен ли он вообще." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:368 msgid "" "Some programs are in fact executable scripts. The system runs such a script " "by starting its interpreter and passing the name of the script to it as a " "command-line argument. This is reflected in the list of processes, which " "can confuse man:rc.subr[8]. You should additionally set " "`command_interpreter` to let man:rc.subr[8] know the actual name of the " "process if `$command` is a script." msgstr "" "Некоторые программы на самом деле являются исполняемыми скриптами. Система " "запускает такие скрипты, запуская их интерпретатор и передавая ему имя " "скрипта в качестве аргумента командной строки. Это отражается в списке " "процессов, что может сбить с толку man:rc.subr[8]. Дополнительно следует " "установить `command_interpreter`, чтобы man:rc.subr[8] знал фактическое имя " "процесса, если `$command` является скриптом." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:374 msgid "" "For each [.filename]#rc.d# script, there is an optional man:rc.conf[5] " "variable that takes precedence over `command`. Its name is constructed as " "follows: `${name}_program`, where `name` is the mandatory variable we " "discussed crossref:rc-scripting[name-var, earlier]. E.g., in this case it " "will be `mumbled_program`. It is man:rc.subr[8] that arranges `${name}" "_program` to override `command`." msgstr "" "Для каждого скрипта [.filename]#rc.d# существует необязательная переменная " "man:rc.conf[5], которая имеет приоритет над `command`. Её имя формируется " "следующим образом: `${name}_program`, где `name` — это обязательная " "переменная, которую мы обсуждали crossref:rc-scripting[name-var, ранее]. " "Например, в данном случае это будет `mumbled_program`. Именно man:rc.subr[8] " "обеспечивает переопределение `command` с помощью `${name}_program`." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:378 msgid "" "Of course, man:sh[1] will permit you to set `${name}_program` from man:rc." "conf[5] or the script itself even if `command` is unset. In that case, the " "special properties of `${name}_program` are lost, and it becomes an ordinary " "variable your script can use for its own purposes. However, the sole use of " "`${name}_program` is discouraged because using it together with `command` " "became an idiom of [.filename]#rc.d# scripting." msgstr "" "Конечно, man:sh[1] позволяет установить `${name}_program` из man:rc.conf[5] " "или самого скрипта, даже если `command` не задан. В этом случае специальные " "свойства `${name}_program` теряются, и она становится обычной переменной, " "которую ваш скрипт может использовать для своих целей. Однако использование `" "${name}_program` в одиночку не рекомендуется, так как совместное " "использование с `command` стало идиомой в [.filename]#rc.d# скриптах." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:381 msgid "" "For more detailed information on default methods, refer to man:rc.subr[8]." msgstr "" "Для получения более подробной информации о стандартных методах обратитесь к " "man:rc.subr[8]." #. type: Title == #: documentation/content/en/articles/rc-scripting/_index.adoc:383 #, no-wrap msgid "Startup and shutdown of an advanced daemon" msgstr "Запуск и остановка продвинутого демона" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:388 msgid "" "Let us add some meat onto the bones of the previous script and make it more " "complex and featureful. The default methods can do a good job for us, but " "we may need some of their aspects tweaked. Now we will learn how to tune " "the default methods to our needs." msgstr "" "Добавим немного мяса к костям предыдущего скрипта и сделаем его более " "сложным и функциональным. Стандартные методы могут хорошо справляться с " "задачами, но иногда требуется их тонкая настройка. Теперь мы узнаем, как " "адаптировать стандартные методы под наши нужды." #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:400 #, no-wrap msgid "" "command=\"/usr/sbin/${name}\"\n" "command_args=\"mock arguments > /dev/null 2>&1\" <.>\n" msgstr "" "command=\"/usr/sbin/${name}\"\n" "command_args=\"mock arguments > /dev/null 2>&1\" <.>\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:402 #, no-wrap msgid "pidfile=\"/var/run/${name}.pid\" <.>\n" msgstr "pidfile=\"/var/run/${name}.pid\" <.>\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:404 #, no-wrap msgid "required_files=\"/etc/${name}.conf /usr/share/misc/${name}.rules\" <.>\n" msgstr "required_files=\"/etc/${name}.conf /usr/share/misc/${name}.rules\" <.>\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:406 #, no-wrap msgid "sig_reload=\"USR1\" <.>\n" msgstr "sig_reload=\"USR1\" <.>\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:409 #, no-wrap msgid "" "start_precmd=\"${name}_prestart\" <.>\n" "stop_postcmd=\"echo Bye-bye\" <.>\n" msgstr "" "start_precmd=\"${name}_prestart\" <.>\n" "stop_postcmd=\"echo Bye-bye\" <.>\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:411 #, no-wrap msgid "extra_commands=\"reload plugh xyzzy\" <.>\n" msgstr "extra_commands=\"reload plugh xyzzy\" <.>\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:414 #, no-wrap msgid "" "plugh_cmd=\"mumbled_plugh\" <.>\n" "xyzzy_cmd=\"echo 'Nothing happens.'\"\n" msgstr "" "plugh_cmd=\"mumbled_plugh\" <.>\n" "xyzzy_cmd=\"echo 'Nothing happens.'\"\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:435 #, no-wrap msgid "" "mumbled_prestart()\n" "{\n" "\tif checkyesno mumbled_smart; then <.>\n" "\t\trc_flags=\"-o smart ${rc_flags}\" <.>\n" "\tfi\n" "\tcase \"$mumbled_mode\" in\n" "\tfoo)\n" "\t\trc_flags=\"-frotz ${rc_flags}\"\n" "\t\t;;\n" "\tbar)\n" "\t\trc_flags=\"-baz ${rc_flags}\"\n" "\t\t;;\n" "\t*)\n" "\t\twarn \"Invalid value for mumbled_mode\" <.>\n" "\t\treturn 1 <.>\n" "\t\t;;\n" "\tesac\n" "\trun_rc_command xyzzy <.>\n" "\treturn 0\n" "}\n" msgstr "" "mumbled_prestart()\n" "{\n" "\tif checkyesno mumbled_smart; then <.>\n" "\t\trc_flags=\"-o smart ${rc_flags}\" <.>\n" "\tfi\n" "\tcase \"$mumbled_mode\" in\n" "\tfoo)\n" "\t\trc_flags=\"-frotz ${rc_flags}\"\n" "\t\t;;\n" "\tbar)\n" "\t\trc_flags=\"-baz ${rc_flags}\"\n" "\t\t;;\n" "\t*)\n" "\t\twarn \"Invalid value for mumbled_mode\" <.>\n" "\t\treturn 1 <.>\n" "\t\t;;\n" "\tesac\n" "\trun_rc_command xyzzy <.>\n" "\treturn 0\n" "}\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:440 #, no-wrap msgid "" "mumbled_plugh() <.>\n" "{\n" "\techo 'A hollow voice says \"plugh\".'\n" "}\n" msgstr "" "mumbled_plugh() <.>\n" "{\n" "\techo 'A hollow voice says \"plugh\".'\n" "}\n" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:448 msgid "" "➊ Additional arguments to `$command` can be passed in " "`command_args`. They will be added to the command line after `" "$mumbled_flags`. Since the final command line is passed to `eval` for its " "actual execution, input and output redirections can be specified in " "`command_args`." msgstr "" "➊ Дополнительные аргументы для `$command` могут быть переданы в " "`command_args`. Они будут добавлены в командную строку после `" "$mumbled_flags`. Поскольку итоговая командная строка передаётся в `eval` для " "фактического выполнения, перенаправления ввода и вывода могут быть указаны в " "`command_args`." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:455 msgid "" "_Never_ include dashed options, like `-X` or `--foo`, in `command_args`. " "The contents of `command_args` will appear at the end of the final command " "line, hence they are likely to follow arguments present in `${name}_flags`; " "but most commands will not recognize dashed options after ordinary " "arguments. A better way of passing additional options to `$command` is to " "add them to the beginning of `${name}_flags`. Another way is to modify " "`rc_flags` crossref:rc-scripting[rc-flags, as shown later]." msgstr "" "Никогда не включайте параметры с дефисами, такие как `-X` или `--foo`, в " "`command_args`. Содержимое `command_args` будет добавлено в конец итоговой " "командной строки, поэтому, скорее всего, окажется после аргументов, " "указанных в `${name}_flags`; однако большинство команд не распознают " "параметры с дефисами после обычных аргументов. Лучший способ передать " "дополнительные параметры в `$command` — добавить их в начало `${name}" "_flags`. Другой способ — изменить `rc_flags` crossref:rc-scripting[rc-flags, " "как показано далее]." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:459 msgid "" "➋ A good-mannered daemon should create a _pidfile_ so that its " "process can be found more easily and reliably. The variable `pidfile`, if " "set, tells man:rc.subr[8] where it can find the pidfile for its default " "methods to use." msgstr "" "➋ Вежливый демон должен создавать _pidfile_, чтобы его процесс можно " "было найти проще и надёжнее. Переменная `pidfile`, если она установлена, " "указывает man:rc.subr[8], где можно найти pidfile для использования его " "стандартными методами." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:464 msgid "" "In fact, man:rc.subr[8] will also use the pidfile to see if the daemon is " "already running before starting it. This check can be skipped by using the " "`faststart` argument." msgstr "" "На самом деле, man:rc.subr[8] также использует pidfile для проверки, запущен " "ли демон, перед его запуском. Эту проверку можно пропустить, используя " "аргумент `faststart`." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:469 msgid "" "➌ If the daemon cannot run unless certain files exist, just list them " "in `required_files`, and man:rc.subr[8] will check that those files do exist " "before starting the daemon. There also are `required_dirs` and " "`required_vars` for directories and environment variables, respectively. " "They all are described in detail in man:rc.subr[8]." msgstr "" "➌ Если демон не может работать без определённых файлов, просто " "укажите их в `required_files`, и man:rc.subr[8] проверит их наличие перед " "запуском демона. Также существуют `required_dirs` и `required_vars` для " "каталогов и переменных окружения соответственно. Все они подробно описаны в " "man:rc.subr[8]." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:473 msgid "" "The default method from man:rc.subr[8] can be forced to skip the " "prerequisite checks by using `forcestart` as the argument to the script." msgstr "" "Метод по умолчанию из man:rc.subr[8] можно принудительно заставить " "пропустить проверки предварительных условий, используя аргумент `forcestart` " "в скрипте." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:479 msgid "" "➍ We can customize signals to send to the daemon in case they differ " "from the well-known ones. In particular, `sig_reload` specifies the signal " "that makes the daemon reload its configuration; it is SIGHUP by default. " "Another signal is sent to stop the daemon process; the default is SIGTERM, " "but this can be changed by setting `sig_stop` appropriately." msgstr "" "➍ Мы можем настроить сигналы, отправляемые демону, если они " "отличаются от общеизвестных. В частности, `sig_reload` указывает сигнал, " "который заставляет демона перезагрузить свою конфигурацию; по умолчанию это " "SIGHUP. Другой сигнал отправляется для остановки процесса демона; по " "умолчанию используется SIGTERM, но это можно изменить, установив `sig_stop` " "соответствующим образом." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:484 msgid "" "The signal names should be specified to man:rc.subr[8] without the `SIG` " "prefix, as it is shown in the example. The FreeBSD version of man:kill[1] " "can recognize the `SIG` prefix, but the versions from other OS types may not." msgstr "" "Имена сигналов должны указываться для man:rc.subr[8] без префикса `SIG`, как " "показано в примере. Версия man:kill[1] в FreeBSD может распознавать префикс " "`SIG`, но версии из других типов ОС могут не поддерживать его." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:489 msgid "" "➎➏ Performing additional tasks before or after the default " "methods is easy. For each command-argument supported by our script, we can " "define `argument_precmd` and `argument_postcmd`. These man:sh[1] commands " "are invoked before and after the respective method, as it is evident from " "their names." msgstr "" "➎➏ Выполнение дополнительных задач до или после стандартных " "методов — это просто. Для каждого аргумента команды, поддерживаемого нашим " "скриптом, мы можем определить `argument_precmd` и `argument_postcmd`. Эти " "команды man:sh[1] вызываются до и после соответствующего метода, что " "очевидно из их названий." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:495 msgid "" "Overriding a default method with a custom `argument_cmd` still does not " "prevent us from making use of `argument_precmd` or `argument_postcmd` if we " "need to. In particular, the former is good for checking custom, " "sophisticated conditions that should be met before performing the command " "itself. Using `argument_precmd` along with `argument_cmd` lets us logically " "separate the checks from the action." msgstr "" "Переопределение стандартного метода с помощью пользовательского " "`argument_cmd` всё равно не мешает нам использовать `argument_precmd` или " "`argument_postcmd`, если это необходимо. В частности, первый полезен для " "проверки пользовательских сложных условий, которые должны быть выполнены " "перед выполнением самой команды. Использование `argument_precmd` вместе с " "`argument_cmd` позволяет логически разделить проверки от действия." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:498 msgid "" "Do not forget that you can cram any valid man:sh[1] expressions into the " "methods, pre-, and post-commands you define. Just invoking a function that " "makes the real job is a good style in most cases, but never let style limit " "your understanding of what is going on behind the curtain." msgstr "" "Не забывайте, что вы можете вставлять любые допустимые выражения из man:" "sh[1] в определяемые вами методы, а также команды pre- и post-. Просто " "вызывать функцию, которая выполняет основную работу, — это хороший стиль в " "большинстве случаев, но никогда не позволяйте стилю ограничивать ваше " "понимание того, что происходит за кулисами." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:501 msgid "" "➐ If we would like to implement custom arguments, which can also be " "thought of as _commands_ to our script, we need to list them in " "`extra_commands` and provide methods to handle them." msgstr "" "➐ Если мы хотим реализовать пользовательские аргументы, которые также " "можно рассматривать как _команды_ для нашего скрипта, необходимо перечислить " "их в `extra_commands` и предоставить методы для их обработки." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:509 msgid "" "The `reload` command is special. On the one hand, it has a preset method in " "man:rc.subr[8]. On the other hand, `reload` is not offered by default. The " "reason is that not all daemons use the same reload mechanism and some have " "nothing to reload at all. So we need to ask explicitly that the builtin " "functionality be provided. We can do so via `extra_commands`." msgstr "" "Команда `reload` является особенной. С одной стороны, у неё есть " "предустановленный метод в man:rc.subr[8]. С другой стороны, `reload` не " "предлагается по умолчанию. Причина в том, что не все демоны используют " "одинаковый механизм перезагрузки, а у некоторых вообще нет ничего для " "перезагрузки. Поэтому нам нужно явно запросить предоставление встроенной " "функциональности. Это можно сделать с помощью `extra_commands`." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:513 msgid "" "What do we get from the default method for `reload`? Quite often daemons " "reload their configuration upon reception of a signal - typically, SIGHUP. " "Therefore man:rc.subr[8] attempts to reload the daemon by sending a signal " "to it. The signal is preset to SIGHUP but can be customized via " "`sig_reload` if necessary." msgstr "" "Что мы получаем от метода по умолчанию для `reload`? Довольно часто демоны " "перезагружают свою конфигурацию при получении сигнала — обычно, SIGHUP. " "Поэтому man:rc.subr[8] пытается перезагрузить демона, отправляя ему сигнал. " "Сигнал предустановлен на SIGHUP, но может быть изменён через `sig_reload` " "при необходимости." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:518 msgid "" "➑⓮ Our script supports two non-standard commands, `plugh` and " "`xyzzy`. We saw them listed in `extra_commands`, and now it is time to " "provide methods for them. The method for `xyzzy` is just inlined while that " "for `plugh` is implemented as the `mumbled_plugh` function." msgstr "" "➑⓮ Наш скрипт поддерживает две нестандартные команды: `plugh` и " "`xyzzy`. Мы видели их в списке `extra_commands`, и теперь пришло время " "реализовать методы для них. Метод для `xyzzy` просто встроен в код, а для " "`plugh` он реализован как функция `mumbled_plugh`." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:522 msgid "" "Non-standard commands are not invoked during startup or shutdown. Usually " "they are for the system admin's convenience. They can also be used from " "other subsystems, e.g., man:devd[8] if specified in man:devd.conf[5]." msgstr "" "Нестандартные команды не вызываются во время запуска или завершения работы. " "Обычно они предназначены для удобства системного администратора. Они также " "могут использоваться другими подсистемами, например, man:devd[8], если " "указаны в man:devd.conf[5]." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:525 msgid "" "The full list of available commands can be found in the usage line printed " "by man:rc.subr[8] when the script is invoked without arguments. For " "example, here is the usage line from the script under study:" msgstr "" "Полный список доступных команд можно найти в строке использования, выводимой " "man:rc.subr[8], когда скрипт вызывается без аргументов. Например, вот строка " "использования из изучаемого скрипта:" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:530 #, no-wrap msgid "" "# /etc/rc.d/mumbled\n" "Usage: /etc/rc.d/mumbled [fast|force|one](start|stop|restart|rcvar|reload|plugh|xyzzy|status|poll)\n" msgstr "" "# /etc/rc.d/mumbled\n" "Usage: /etc/rc.d/mumbled [fast|force|one](start|stop|restart|rcvar|reload|plugh|xyzzy|status|poll)\n" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:537 msgid "" "⓭ A script can invoke its own standard or non-standard commands if " "needed. This may look similar to calling functions, but we know that " "commands and shell functions are not always the same thing. For instance, " "`xyzzy` is not implemented as a function here. In addition, there can be a " "pre-command and post-command, which should be invoked orderly. So the " "proper way for a script to run its own command is by means of man:rc." "subr[8], as shown in the example." msgstr "" "⓭ Скрипт может вызывать свои собственные стандартные или нестандартные " "команды, если это необходимо. Это может выглядеть похоже на вызов функций, " "но мы знаем, что команды и функции оболочки не всегда одно и то же. " "Например, `xyzzy` не реализован как функция в данном случае. Кроме того, " "могут существовать пред-команда и пост-команда, которые должны вызываться в " "определённом порядке. Поэтому правильный способ для скрипта выполнить свою " "собственную команду — с помощью man:rc.subr[8], как показано в примере." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:543 msgid "" "➒ A handy function named `checkyesno` is provided by man:rc.subr[8]. " "It takes a variable name as its argument and returns a zero exit code if and " "only if the variable is set to `YES`, or `TRUE`, or `ON`, or `1`, case " "insensitive; a non-zero exit code is returned otherwise. In the latter " "case, the function tests the variable for being set to `NO`, `FALSE`, `OFF`, " "or `0`, case insensitive; it prints a warning message if the variable " "contains anything else, i.e., junk." msgstr "" "➒ Полезная функция `checkyesno` предоставляется man:rc.subr[8]. Она " "принимает имя переменной в качестве аргумента и возвращает нулевой код " "выхода только если переменная установлена в `YES`, `TRUE`, `ON` или `1`, без " "учёта регистра; в противном случае возвращается ненулевой код выхода. В " "последнем случае функция проверяет, установлена ли переменная в `NO`, " "`FALSE`, `OFF` или `0`, также без учёта регистра; если переменная содержит " "что-то иное (т.е. мусор), функция выводит предупреждение." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:545 msgid "" "Keep in mind that for man:sh[1] a zero exit code means true and a non-zero " "exit code means false." msgstr "" "Имейте в виду, что для man:sh[1] нулевой код возврата означает истину, а " "ненулевой код возврата означает ложь." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:550 msgid "" "The `checkyesno` function takes a __variable name__. Do not pass the " "expanded _value_ of a variable to it; it will not work as expected." msgstr "" "Функция `checkyesno` принимает __имя переменной__. Не передавайте ей " "_значение_ переменной; это не будет работать, как ожидается." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:552 msgid "The following is the correct usage of `checkyesno`:" msgstr "Ниже приведено правильное использование `checkyesno`:" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:558 #, no-wrap msgid "" "if checkyesno mumbled_enable; then\n" " foo\n" "fi\n" msgstr "" "if checkyesno mumbled_enable; then\n" " foo\n" "fi\n" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:561 msgid "" "On the contrary, calling `checkyesno` as shown below will not work - at " "least not as expected:" msgstr "" "Напротив, вызов `checkyesno`, как показано ниже, не сработает — по крайней " "мере, не так, как ожидается:" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:567 #, no-wrap msgid "" "if checkyesno \"${mumbled_enable}\"; then\n" " foo\n" "fi\n" msgstr "" "if checkyesno \"${mumbled_enable}\"; then\n" " foo\n" "fi\n" #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:572 msgid "" "➓ [[rc-flags]]We can affect the flags to be passed to `$command` by " "modifying `rc_flags` in `$start_precmd`." msgstr "" "➓ [[rc-flags]] Мы можем влиять на флаги, передаваемые команде `" "$command`, изменяя `rc_flags` в `$start_precmd`." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:576 msgid "" "⓫ In certain cases we may need to emit an important message that " "should go to `syslog` as well. This can be done easily with the following " "man:rc.subr[8] functions: `debug`, `info`, `warn`, and `err`. The latter " "function then exits the script with the code specified." msgstr "" "⓫ В некоторых случаях может потребоваться вывести важное сообщение, " "которое также должно попасть в `syslog`. Это можно легко сделать с помощью " "следующих функций man:rc.subr[8]: `debug`, `info`, `warn` и `err`. Последняя " "функция завершает выполнение скрипта с указанным кодом." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:580 msgid "" "⓬ The exit codes from methods and their pre-commands are not just " "ignored by default. If `argument_precmd` returns a non-zero exit code, the " "main method will not be performed. In turn, `argument_postcmd` will not be " "invoked unless the main method returns a zero exit code." msgstr "" "⓬ Коды выхода из методов и их предварительных команд не просто " "игнорируются по умолчанию. Если `argument_precmd` возвращает ненулевой код " "выхода, основной метод не будет выполнен. В свою очередь, `argument_postcmd` " "не будет вызван, если основной метод возвращает ненулевой код выхода." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:584 msgid "" "However, man:rc.subr[8] can be instructed from the command line to ignore " "those exit codes and invoke all commands anyway by prefixing an argument " "with `force`, as in `forcestart`." msgstr "" "Однако man:rc.subr[8] можно указать из командной строки игнорировать эти " "коды завершения и выполнять все команды в любом случае, добавив префикс " "`force` к аргументу, например `forcestart`." #. type: Title == #: documentation/content/en/articles/rc-scripting/_index.adoc:587 #, no-wrap msgid "Connecting a script to the rc.d framework" msgstr "Подключение скрипта к инфраструктуре rc.d" #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:594 msgid "" "After a script has been written, it needs to be integrated into [." "filename]#rc.d#. The crucial step is to install the script in [.filename]#/" "etc/rc.d# (for the base system) or [.filename]#/usr/local/etc/rc.d# (for " "ports). Both [.filename]#bsd.prog.mk# and [.filename]#bsd.port.mk# provide " "convenient hooks for that, and usually you do not have to worry about the " "proper ownership and mode. System scripts should be installed from [." "filename]#src/libexec/rc/rc.d# through the [.filename]#Makefile# found " "there. Port scripts can be installed using `USE_RC_SUBR` as described " "extref:{porters-handbook}special[in the Porter's Handbook, rc-scripts]." msgstr "" "После написания скрипта его необходимо интегрировать в [.filename]#rc.d#. " "Ключевой шаг — установка скрипта в [.filename]#/etc/rc.d# (для базовой " "системы) или [.filename]#/usr/local/etc/rc.d# (для портов). И [.filename]#bsd" ".prog.mk#, и [.filename]#bsd.port.mk# предоставляют удобные механизмы для " "этого, и обычно вам не нужно беспокоиться о правильных правах доступа и " "режиме. Системные скрипты должны устанавливаться из [.filename]#src/libexec/" "rc/rc.d# через [.filename]#Makefile#, находящийся там. Скрипты портов можно " "установить с помощью `USE_RC_SUBR`, как описано extref:{porters-" "handbook}special[в Руководстве FreeBSD по созданию портов, rc-scripts]." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:599 msgid "" "However, we should consider beforehand the place of our script in the system " "startup sequence. The service handled by our script is likely to depend on " "other services. For instance, a network daemon cannot function without the " "network interfaces and routing up and running. Even if a service seems to " "demand nothing, it can hardly start before the basic filesystems have been " "checked and mounted." msgstr "" "Однако следует заранее продумать место нашего скрипта в последовательности " "запуска системы. Скорее всего, обслуживаемый нашим скриптом сервис зависит " "от других сервисов. Например, сетевой демон не может работать без поднятых " "сетевых интерфейсов и маршрутизации. Даже если сервис, казалось бы, ничего " "не требует, он вряд ли сможет запуститься до проверки и монтирования " "основных файловых систем." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:605 msgid "" "We mentioned man:rcorder[8] already. Now it is time to have a close look at " "it. In a nutshell, man:rcorder[8] takes a set of files, examines their " "contents, and prints a dependency-ordered list of files from the set to " "`stdout`. The point is to keep dependency information _inside_ the files so " "that each file can speak for itself only. A file can specify the following " "information:" msgstr "" "Мы уже упоминали man:rcorder[8]. Теперь пришло время рассмотреть его " "подробнее. В двух словах, man:rcorder[8] принимает набор файлов, анализирует " "их содержимое и выводит на `stdout` список этих файлов, упорядоченный по " "зависимостям. Главная идея заключается в том, чтобы хранить информацию о " "зависимостях _внутри_ файлов, чтобы каждый файл мог описывать только себя. " "Файл может содержать следующую информацию:" #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:607 msgid "" "the names of the \"conditions\" (which means services to us) it __provides__;" msgstr "" "имена \"условий\" (что для нас означает сервисы), которые он " "__предоставляет__;" #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:608 msgid "the names of the \"conditions\" it __requires__;" msgstr "имена \"условий\", которые он __требует__;" #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:609 msgid "the names of the \"conditions\" this file should run __before__;" msgstr "имена \"условий\", перед которыми должен выполняться этот файл;" #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:610 msgid "" "additional _keywords_ that can be used to select a subset from the whole set " "of files (man:rcorder[8] can be instructed via options to include or omit " "the files having particular keywords listed.)" msgstr "" "дополнительные _ключевые слова_, которые могут использоваться для выбора " "подмножества из всего набора файлов (man:rcorder[8] может быть настроен с " "помощью опций для включения или исключения файлов, содержащих указанные " "ключевые слова.)" #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:615 msgid "" "It is no surprise that man:rcorder[8] can handle only text files with a " "syntax close to that of man:sh[1]. That is, special lines understood by man:" "rcorder[8] look like man:sh[1] comments. The syntax of such special lines " "is rather rigid to simplify their processing. See man:rcorder[8] for " "details." msgstr "" "Неудивительно, что man:rcorder[8] может обрабатывать только текстовые файлы " "с синтаксисом, близким к man:sh[1]. То есть специальные строки, понимаемые " "man:rcorder[8], выглядят как комментарии в man:sh[1]. Синтаксис таких " "специальных строк довольно жёсткий, чтобы упростить их обработку. " "Подробности см. в man:rcorder[8]." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:618 msgid "" "Besides using man:rcorder[8] special lines, a script can insist on its " "dependency upon another service by just starting it forcibly. This can be " "needed when the other service is optional and will not start by itself " "because the system admin has disabled it mistakenly in man:rc.conf[5]." msgstr "" "Помимо использования специальных строк man:rcorder[8], скрипт может " "настаивать на своей зависимости от другой службы, просто принудительно " "запуская её. Это может быть необходимо, когда другая служба является " "опциональной и не запускается самостоятельно, потому что системный " "администратор ошибочно отключил её в man:rc.conf[5]." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:620 msgid "" "With this general knowledge in mind, let us consider the simple daemon " "script enhanced with dependency stuff:" msgstr "" -"С учетом этих общих знаний рассмотрим простой скрипт демона, дополненный " +"С учётом этих общих знаний рассмотрим простой скрипт демона, дополненный " "зависимостями:" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:629 #, no-wrap msgid "" "# PROVIDE: mumbled oldmumble <.>\n" "# REQUIRE: DAEMON cleanvar frotz <.>\n" "# BEFORE: LOGIN <.>\n" "# KEYWORD: nojail shutdown <.>\n" msgstr "" "# PROVIDE: mumbled oldmumble <.>\n" "# REQUIRE: DAEMON cleanvar frotz <.>\n" "# BEFORE: LOGIN <.>\n" "# KEYWORD: nojail shutdown <.>\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:637 #, no-wrap msgid "" "command=\"/usr/sbin/${name}\"\n" "start_precmd=\"${name}_prestart\"\n" msgstr "" "command=\"/usr/sbin/${name}\"\n" "start_precmd=\"${name}_prestart\"\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:646 #, no-wrap msgid "" "mumbled_prestart()\n" "{\n" "\tif ! checkyesno frotz_enable && \\\n" "\t ! /etc/rc.d/frotz forcestatus 1>/dev/null 2>&1; then\n" "\t\tforce_depend frotz || return 1 <.>\n" "\tfi\n" "\treturn 0\n" "}\n" msgstr "" "mumbled_prestart()\n" "{\n" "\tif ! checkyesno frotz_enable && \\\n" "\t ! /etc/rc.d/frotz forcestatus 1>/dev/null 2>&1; then\n" "\t\tforce_depend frotz || return 1 <.>\n" "\tfi\n" "\treturn 0\n" "}\n" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:652 msgid "As before, detailed analysis follows:" msgstr "Как и ранее, следует детальный анализ:" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:655 msgid "" "➊ That line declares the names of \"conditions\" our script " "provides. Now other scripts can record a dependency on our script by those " "names." msgstr "" "➊ Эта строка объявляет названия \"условий\", которые предоставляет " "наш скрипт. Теперь другие скрипты могут указывать зависимость от нашего " "скрипта по этим именам." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:660 msgid "" "Usually a script specifies a single condition provided. However, nothing " "prevents us from listing several conditions there, e.g., for compatibility " "reasons." msgstr "" "Обычно скрипт указывает одно предоставленное условие. Однако ничто не мешает " "нам перечислить несколько условий, например, по причинам совместимости." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:662 msgid "" "In any case, the name of the main, or the only, `PROVIDE:` condition should " "be the same as `${name}`." msgstr "" "В любом случае, название основного или единственного условия `PROVIDE:` " "должно совпадать с `${name}`." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:666 msgid "" "➋➌ So our script indicates which \"conditions\" provided by " "other scripts it depends on. According to the lines, our script asks man:" "rcorder[8] to put it after the script(s) providing [.filename]#DAEMON# and [." "filename]#cleanvar#, but before that providing [.filename]#LOGIN#." msgstr "" "➋➌ Таким образом, наш скрипт указывает, от каких \"условий\", " "предоставляемых другими скриптами, он зависит. Согласно строкам, наш скрипт " "просит man:rcorder[8] разместить его после скрипта(ов), предоставляющих [." "filename]#DAEMON# и [.filename]#cleanvar#, но перед тем, который " "предоставляет [.filename]#LOGIN#." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:672 msgid "" "The `BEFORE:` line should not be abused to work around an incomplete " "dependency list in the other script. The appropriate case for using `BEFORE:" "` is when the other script does not care about ours, but our script can do " "its task better if run before the other one. A typical real-life example is " "the network interfaces vs. the firewall: While the interfaces do not depend " "on the firewall in doing their job, the system security will benefit from " "the firewall being ready before there is any network traffic." msgstr "" "Строку `BEFORE:` не следует использовать для обхода неполного списка " "зависимостей в другом скрипте. Правильный случай для использования `BEFORE:` " "— когда другой скрипт не зависит от нашего, но наш скрипт может выполнить " "свою задачу лучше, если запустится до другого. Типичный пример из реальной " "жизни — сетевые интерфейсы и межсетевой экран: хотя интерфейсы не зависят от " "межсетевого экрана при выполнении своей работы, безопасность системы " "выиграет, если межсетевой экран будет готов до начала сетевого трафика." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:676 msgid "" "Besides conditions corresponding to a single service each, there are meta-" "conditions and their \"placeholder\" scripts used to ensure that certain " "groups of operations are performed before others. These are denoted by [." "filename]#UPPERCASE# names. Their list and purposes can be found in man:" "rc[8]." msgstr "" "Помимо условий, соответствующих отдельным службам, существуют метаусловия и " "их \"заглушки\" скриптов, используемые для обеспечения выполнения " "определённых групп операций в заданном порядке. Они обозначаются именами в [." "filename]#ВЕРХНЕМ РЕГИСТРЕ#. Их список и назначение можно найти в man:rc[8]." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:682 msgid "" "Keep in mind that putting a service name in the `REQUIRE:` line does not " "guarantee that the service will actually be running by the time our script " "starts. The required service may fail to start or just be disabled in man:" "rc.conf[5]. Obviously, man:rcorder[8] cannot track such details, and man:" "rc[8] will not do that either. Consequently, the application started by our " "script should be able to cope with any required services being unavailable. " "In certain cases, we can help it as discussed crossref:rc-" "scripting[forcedep, below]" msgstr "" "Имейте в виду, что указание имени службы в строке `REQUIRE:` не гарантирует, " "что служба действительно будет запущена к моменту старта нашего скрипта. " "Требуемая служба может не запуститься или быть отключена в man:rc.conf[5]. " "Очевидно, man:rcorder[8] не может отслеживать такие детали, и man:rc[8] тоже " "этого не делает. Следовательно, приложение, запускаемое нашим скриптом, " "должно быть способно обрабатывать ситуации, когда требуемые службы " "недоступны. В некоторых случаях мы можем помочь ему, как описано в crossref:" "rc-scripting[forcedep, ниже]" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:687 msgid "" "[[keywords]]➍ As we remember from the above text, man:rcorder[8] " "keywords can be used to select or leave out some scripts. Namely any man:" "rcorder[8] consumer can specify through `-k` and `-s` options which keywords " "are on the \"keep list\" and \"skip list\", respectively. From all the " "files to be dependency sorted, man:rcorder[8] will pick only those having a " "keyword from the keep list (unless empty) and not having a keyword from the " "skip list." msgstr "" "[[keywords]]➍ Как мы помним из текста выше, ключевые слова man:" "rcorder[8] могут использоваться для выбора или исключения некоторых " "скриптов. А именно, любой потребитель man:rcorder[8] может указать с помощью " "опций `-k` и `-s`, какие ключевые слова находятся в \"списке сохранения\" и " "\"списке пропуска\" соответственно. Из всех файлов, подлежащих сортировке по " "зависимостям, man:rcorder[8] выберет только те, которые имеют ключевое слово " "из списка сохранения (если он не пуст) и не имеют ключевого слова из списка " "пропуска." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:690 msgid "" "In FreeBSD, man:rcorder[8] is used by [.filename]#/etc/rc# and [.filename]#/" "etc/rc.shutdown#. These two scripts define the standard list of FreeBSD [." "filename]#rc.d# keywords and their meanings as follows:" msgstr "" "В FreeBSD, man:rcorder[8] используется [.filename]#/etc/rc# и [.filename]#/" "etc/rc.shutdown#. Эти два скрипта определяют стандартный список ключевых " "слов [.filename]#rc.d# FreeBSD и их значения следующим образом:" #. type: Labeled list #: documentation/content/en/articles/rc-scripting/_index.adoc:691 #, no-wrap msgid "nojail" msgstr "nojail" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:693 msgid "" "The service is not for man:jail[8] environment. The automatic startup and " "shutdown procedures will ignore the script if inside a jail." msgstr "" "Сервис не предназначен для окружения man:jail[8]. Процедуры автоматического " "запуска и остановки будут игнорировать скрипт, если он находится внутри " "клетки." #. type: Labeled list #: documentation/content/en/articles/rc-scripting/_index.adoc:694 #, no-wrap msgid "nostart" msgstr "nostart" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:697 msgid "" "The service is to be started manually or not started at all. The automatic " "startup procedure will ignore the script. In conjunction with the [." "filename]#shutdown# keyword, this can be used to write scripts that do " "something only at system shutdown." msgstr "" "Служба должна запускаться вручную или не запускаться вовсе. Процедура " "автоматического запуска проигнорирует скрипт. В сочетании с ключевым словом " "[.filename]#shutdown# это может использоваться для написания скриптов, " "выполняющих действия только при выключении системы." #. type: Labeled list #: documentation/content/en/articles/rc-scripting/_index.adoc:698 #, no-wrap msgid "shutdown" msgstr "shutdown" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:699 msgid "" "This keyword is to be listed __explicitly__ if the service needs to be " "stopped before system shutdown." msgstr "" "Этот ключевой параметр должен быть указан __явно__, если службу необходимо " "остановить перед завершением работы системы." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:712 msgid "" "When the system is going to shut down, [.filename]#/etc/rc.shutdown# runs. " "It assumes that most [.filename]#rc.d# scripts have nothing to do at that " "time. Therefore [.filename]#/etc/rc.shutdown# selectively invokes [." "filename]#rc.d# scripts with the [.filename]#shutdown# keyword, effectively " "ignoring the rest of the scripts. For even faster shutdown, [.filename]#/" "etc/rc.shutdown# passes the [.filename]#faststop# command to the scripts it " "runs so that they skip preliminary checks, e.g., the pidfile check. As " "dependent services should be stopped before their prerequisites, [." "filename]#/etc/rc.shutdown# runs the scripts in reverse dependency order. " "If writing a real [.filename]#rc.d# script, you should consider whether it " "is relevant at system shutdown time. E.g., if your script does its work in " "response to the [.filename]#start# command only, then you need not to " "include this keyword. However, if your script manages a service, it is " "probably a good idea to stop it before the system proceeds to the final " "stage of its shutdown sequence described in man:halt[8]. In particular, a " "service should be stopped explicitly if it needs considerable time or " "special actions to shut down cleanly. A typical example of such a service " "is a database engine." msgstr "" "Когда система собирается завершить работу, выполняется [.filename]#/etc/rc." "shutdown#. Предполагается, что большинству скриптов [.filename]#rc.d# в этот " "момент нечего делать. Поэтому [.filename]#/etc/rc.shutdown# выборочно " "запускает скрипты [.filename]#rc.d# с ключевым словом [.filename]#shutdown#, " "фактически игнорируя остальные скрипты. Для ещё более быстрого завершения " "работы [.filename]#/etc/rc.shutdown# передаёт команду [.filename]#faststop# " "запускаемым скриптам, чтобы они пропускали предварительные проверки, " "например, проверку pid-файла. Поскольку зависимые службы должны быть " "остановлены до своих зависимостей, [.filename]#/etc/rc.shutdown# запускает " "скрипты в обратном порядке зависимостей. Если вы пишете настоящий скрипт [." "filename]#rc.d#, стоит подумать, актуален ли он во время завершения работы " "системы. Например, если ваш скрипт выполняет свою работу только в ответ на " "команду [.filename]#start#, то включать это ключевое слово не нужно. Однако " "если ваш скрипт управляет службой, вероятно, стоит остановить её до того, " "как система перейдёт к финальной стадии завершения работы, описанной в man:" "halt[8]. В частности, службу следует останавливать явно, если для её " "корректного завершения требуется значительное время или специальные " "действия. Типичный пример такой службы — система управления базами данных." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:716 msgid "" "[[forcedep]]➎ To begin with, `force_depend` should be used with much " "care. It is generally better to revise the hierarchy of configuration " "variables for your [.filename]#rc.d# scripts if they are interdependent." msgstr "" "[[forcedep]]➎ Прежде всего, `force_depend` следует использовать с " "большой осторожностью. Обычно лучше пересмотреть иерархию конфигурационных " "переменных для ваших [.filename]#rc.d# скриптов, если они взаимозависимы." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:725 msgid "" "If you still cannot do without `force_depend`, the example offers an idiom " "of how to invoke it conditionally. In the example, our `mumbled` daemon " "requires that another one, `frotz`, be started in advance. However, `frotz` " "is optional, too; and man:rcorder[8] knows nothing about such details. " "Fortunately, our script has access to all man:rc.conf[5] variables. If " "`frotz_enable` is true, we hope for the best and rely on [.filename]#rc.d# " "to have started `frotz`. Otherwise we forcibly check the status of " "`frotz`. Finally, we enforce our dependency on `frotz` if it is found to be " "not running. A warning message will be emitted by `force_depend` because it " "should be invoked only if a misconfiguration has been detected." msgstr "" "Если вам всё ещё не обойтись без `force_depend`, в примере показано, как " "вызвать его условно. В примере наш демон `mumbled` требует, чтобы другой " "демон, `frotz`, был запущен заранее. Однако `frotz` также является " "опциональным, и man:rcorder[8] ничего не знает о таких деталях. К счастью, " "наш скрипт имеет доступ ко всем переменным man:rc.conf[5]. Если " "`frotz_enable` имеет значение true, мы надеемся на лучшее и полагаемся на [." "filename]#rc.d#, что `frotz` был запущен. В противном случае мы " "принудительно проверяем статус `frotz`. Наконец, мы принудительно " "устанавливаем зависимость от `frotz`, если обнаруживаем, что он не запущен. " "`force_depend` выдаст предупреждение, так как его следует вызывать только в " "случае обнаружения неправильной конфигурации." #. type: Title == #: documentation/content/en/articles/rc-scripting/_index.adoc:727 #, no-wrap msgid "Giving more flexibility to an rc.d script" msgstr "Придание большей гибкости скрипту rc.d" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:736 msgid "" "When invoked during startup or shutdown, an [.filename]#rc.d# script is " "supposed to act on the entire subsystem it is responsible for. E.g., [." "filename]#/etc/rc.d/netif# should start or stop all network interfaces " "described by man:rc.conf[5]. Either task can be uniquely indicated by a " "single command argument such as `start` or `stop`. Between startup and " "shutdown, [.filename]#rc.d# scripts help the admin to control the running " "system, and it is when the need for more flexibility and precision arises. " "For instance, the admin may want to add the settings of a new network " "interface to man:rc.conf[5] and then to start it without interfering with " "the operation of the existing interfaces. Next time the admin may need to " "shut down a single network interface. In the spirit of the command line, " "the respective [.filename]#rc.d# script calls for an extra argument, the " "interface name." msgstr "" "При вызове во время запуска или завершения работы скрипт [.filename]#rc.d# " "должен воздействовать на всю подсистему, за которую он отвечает. Например, [." "filename]#/etc/rc.d/netif# должен запускать или останавливать все сетевые " "интерфейсы, описанные в man:rc.conf[5]. Любая из этих задач может быть " "однозначно указана единственным аргументом команды, таким как `start` или " "`stop`. Между запуском и завершением работы скрипты [.filename]#rc.d# " "помогают администратору управлять работающей системой, и именно тогда " "возникает потребность в большей гибкости и точности. Например, администратор " "может добавить настройки нового сетевого интерфейса в man:rc.conf[5], а " "затем запустить его, не затрагивая работу существующих интерфейсов. В " "следующий раз администратору может потребоваться остановить отдельный " "сетевой интерфейс. В духе командной строки, соответствующий скрипт [." "filename]#rc.d# требует дополнительного аргумента — имени интерфейса." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:739 msgid "" "Fortunately, man:rc.subr[8] allows for passing any number of arguments to " "script's methods (within the system limits). Due to that, the changes in " "the script itself can be minimal." msgstr "" "К счастью, man:rc.subr[8] позволяет передавать любое количество аргументов " "(в пределах системных ограничений) методам скрипта. Благодаря этому " "изменения в самом скрипте могут быть минимальными." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:744 msgid "" "How can man:rc.subr[8] gain access to the extra command-line arguments. " "Should it just grab them directly? Not by any means. Firstly, an man:sh[1] " "function has no access to the positional parameters of its caller, but man:" "rc.subr[8] is just a sack of such functions. Secondly, the good manner of [." "filename]#rc.d# dictates that it is for the main script to decide which " "arguments are to be passed to its methods." msgstr "" "Как man:rc.subr[8] может получить доступ к дополнительным аргументам " "командной строки. Должен ли он просто захватывать их напрямую? Ни в коем " "случае. Во-первых, функция man:sh[1] не имеет доступа к позиционным " "параметрам своего вызывающего объекта, но man:rc.subr[8] — это просто набор " "таких функций. Во-вторых, хороший стиль [.filename]#rc.d# предписывает, что " "именно главный скрипт должен решать, какие аргументы передавать его методам." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:748 msgid "" "So the approach adopted by man:rc.subr[8] is as follows: `run_rc_command` " "passes on all its arguments but the first one to the respective method " "verbatim. The first, omitted, argument is the name of the method itself: " "`start`, `stop`, etc. It will be shifted out by `run_rc_command`, so what " "is `$2` in the original command line will be presented as `$1` to the " "method, and so on." msgstr "" "Итак, подход, принятый в man:rc.subr[8], следующий: `run_rc_command` " "передаёт все свои аргументы, кроме первого, в соответствующий метод в " "неизменном виде. Первый, опущенный аргумент — это имя самого метода: " "`start`, `stop` и т.д. Он будет удалён с помощью `shift` в `run_rc_command`, " "так что то, что было `$2` в оригинальной командной строке, будет " "представлено как `$1` в методе, и так далее." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:751 msgid "" "To illustrate this opportunity, let us modify the primitive dummy script so " "that its messages depend on the additional arguments supplied. Here we go:" msgstr "" "Чтобы проиллюстрировать эту возможность, давайте изменим примитивный скрипт-" "заглушку так, чтобы его сообщения зависели от дополнительных переданных " "аргументов. Вот как это выглядит:" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:763 #, no-wrap msgid "" "name=\"dummy\"\n" "start_cmd=\"${name}_start\"\n" "stop_cmd=\":\"\n" "kiss_cmd=\"${name}_kiss\"\n" "extra_commands=\"kiss\"\n" msgstr "" "name=\"dummy\"\n" "start_cmd=\"${name}_start\"\n" "stop_cmd=\":\"\n" "kiss_cmd=\"${name}_kiss\"\n" "extra_commands=\"kiss\"\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:772 #, no-wrap msgid "" "dummy_start()\n" "{\n" " if [ $# -gt 0 ]; then <.>\n" " echo \"Greeting message: $*\"\n" " else\n" " echo \"Nothing started.\"\n" " fi\n" "}\n" msgstr "" "dummy_start()\n" "{\n" " if [ $# -gt 0 ]; then <.>\n" " echo \"Greeting message: $*\"\n" " else\n" " echo \"Nothing started.\"\n" " fi\n" "}\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:788 #, no-wrap msgid "" "dummy_kiss()\n" "{\n" " echo -n \"A ghost gives you a kiss\"\n" " if [ $# -gt 0 ]; then <.>\n" " echo -n \" and whispers: $*\"\n" " fi\n" " case \"$*\" in\n" " *[.!?])\n" " echo\n" " ;;\n" " *)\n" " echo .\n" " ;;\n" " esac\n" "}\n" msgstr "" "dummy_kiss()\n" "{\n" " echo -n \"A ghost gives you a kiss\"\n" " if [ $# -gt 0 ]; then <.>\n" " echo -n \" and whispers: $*\"\n" " fi\n" " case \"$*\" in\n" " *[.!?])\n" " echo\n" " ;;\n" " *)\n" " echo .\n" " ;;\n" " esac\n" "}\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:791 #, no-wrap msgid "" "load_rc_config $name\n" "run_rc_command \"$@\" <.>\n" msgstr "" "load_rc_config $name\n" "run_rc_command \"$@\" <.>\n" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:794 msgid "What essential changes can we notice in the script?" msgstr "Какие основные изменения мы можем заметить в скрипте?" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:799 msgid "" "➊ All arguments you type after `start` can end up as positional " "parameters to the respective method. We can use them in any way according " "to our task, skills, and fancy. In the current example, we just pass all of " "them to man:echo[1] as one string in the next line - note `$*` within the " "double quotes. Here is how the script can be invoked now:" msgstr "" "➊ Все аргументы, которые вы вводите после `start`, могут стать " "позиционными параметрами для соответствующего метода. Мы можем использовать " "их любым способом в соответствии с нашей задачей, навыками и предпочтениями. " "В текущем примере мы просто передаем все их в man:echo[1] как одну строку в " "следующей строке — обратите внимание на `$*` в двойных кавычках. Вот как " "теперь можно вызывать этот скрипт:" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:804 #, no-wrap msgid "" "# /etc/rc.d/dummy start\n" "Nothing started.\n" msgstr "" "# /etc/rc.d/dummy start\n" "Nothing started.\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:807 #, no-wrap msgid "" "# /etc/rc.d/dummy start Hello world!\n" "Greeting message: Hello world!\n" msgstr "" "# /etc/rc.d/dummy start Hello world!\n" "Greeting message: Hello world!\n" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:811 msgid "" "➋ The same applies to any method our script provides, not only to a " "standard one. We have added a custom method named `kiss`, and it can take " "advantage of the extra arguments not less than `start` does. E.g.:" msgstr "" "➋ То же самое относится к любому методу, который предоставляет наш " "скрипт, не только к стандартному. Мы добавили пользовательский метод с " "именем `kiss`, и он может использовать дополнительные аргументы не меньше, " "чем `start`. Например:" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:816 #, no-wrap msgid "" "# /etc/rc.d/dummy kiss\n" "A ghost gives you a kiss.\n" msgstr "" "# /etc/rc.d/dummy kiss\n" "A ghost gives you a kiss.\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:819 #, no-wrap msgid "" "# /etc/rc.d/dummy kiss Once I was Etaoin Shrdlu...\n" "A ghost gives you a kiss and whispers: Once I was Etaoin Shrdlu...\n" msgstr "" "# /etc/rc.d/dummy kiss Once I was Etaoin Shrdlu...\n" "A ghost gives you a kiss and whispers: Once I was Etaoin Shrdlu...\n" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:822 msgid "" "➌ If we want just to pass all extra arguments to any method, we can " "merely substitute `\"$@\"` for `\"$1\"` in the last line of our script, " "where we invoke `run_rc_command`." msgstr "" "➌ Если мы хотим просто передать все дополнительные аргументы любому " "методу, мы можем просто заменить `\"$@\"` на `\"$1\"` в последней строке " "нашего скрипта, где мы вызываем `run_rc_command`." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:828 msgid "" "An man:sh[1] programmer ought to understand the subtle difference between `" "$*` and `$@` as the ways to designate all positional parameters. For its in-" "depth discussion, refer to a good handbook on man:sh[1] scripting. _Do not_ " "use the expressions until you fully understand them because their misuse " "will result in buggy and insecure scripts." msgstr "" "Программист man:sh[1] должен понимать тонкую разницу между `$*` и `$@` как " "способами обозначения всех позиционных параметров. Для детального обсуждения " "обратитесь к хорошему руководству по написанию скриптов на man:sh[1]. _Не " "используйте_ эти выражения, пока полностью не поймёте их, так как их " "неправильное применение приведёт к созданию ненадёжных и небезопасных " "скриптов." #. type: delimited block = 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:835 msgid "" "Currently `run_rc_command` may have a bug that prevents it from keeping the " "original boundaries between arguments. That is, arguments with embedded " "whitespace may not be processed correctly. The bug stems from `$*` misuse." msgstr "" "В настоящее время в `run_rc_command` может присутствовать ошибка, которая " "мешает ему сохранять исходные границы между аргументами. То есть аргументы с " "встроенными пробелами могут обрабатываться некорректно. Ошибка возникает из-" "за неправильного использования `$*`." #. type: Title == #: documentation/content/en/articles/rc-scripting/_index.adoc:838 #, no-wrap msgid "Making a script ready for Service Jails" msgstr "Подготовка скрипта для сервисных клеток" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:841 msgid "" "Scripts which start a long running service are suitable for service jails, " "and should come with a suitable service jail configuration." msgstr "" "Скрипты, запускающие долго работающую службу, подходят для служебных клеток " "и должны поставляться с соответствующей конфигурацией сервисной клетки." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:843 msgid "" "Some examples of scripts which are not suitable to run in a service jail:" msgstr "" "Некоторые примеры скриптов, которые не подходят для запуска в сервисной " "клетке:" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:845 msgid "" "any script which in the start command only changes a runtime setting for " "programs or the kernel," msgstr "" "любой скрипт, который в команде start только изменяет настройки времени " "выполнения для программ или ядра," #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:846 msgid "or tries to mount something," msgstr "или пытается что-то смонтировать," #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:847 msgid "or finds and deletes files" msgstr "или находит и удаляет файлы" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:849 msgid "" "Scripts not suitable to run in a service jail need to prevent the use within " "service jails." msgstr "" "Необходимо предотвратить использование внутри сервисных клеток скриптов, не " "предназначенных для запуска в сервисной клетке." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:851 msgid "" "A script with a long running service which needs to do something listed " "above before the start or after the stop, can either be split-up into two " "scripts with dependencies, or use the precommand and postcommand parts of " "the script to perform this action." msgstr "" "Скрипт с долго работающей службой, которому необходимо выполнить одно из " "перечисленных выше действий перед запуском или после остановки, может быть " "разделён на два скрипта с зависимостями или использовать части `precommand` " "и `postcommand` скрипта для выполнения этого действия." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:854 msgid "" "By default, only the start and stop parts of a script are run within a " "service jail, the rest is run outside the jail. As such any setting used in " "the start/stop parts of the script can not be set from e.g. a precommand." msgstr "" "По умолчанию только части `start` и `stop` скрипта выполняются внутри " "сервисной клетки, остальное выполняется вне клетки. Таким образом, любые " "настройки, используемые в частях `start`/`stop` скрипта, не могут быть " "заданы, например, из `precommand`." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:856 msgid "" "To make a script ready for use with extref:{handbook}jails[Service Jails, " "service-jails], only one more config line needs to be inserted:" msgstr "" "Чтобы сделать скрипт готовым к использованию с extref:{handbook}jails[" "Сервисными Клетками, service-jails], необходимо добавить всего лишь одну " "дополнительную конфигурационную строку:" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:866 #: documentation/content/en/articles/rc-scripting/_index.adoc:899 #, no-wrap msgid "" "name=\"dummy\"\n" "start_cmd=\"${name}_start\"\n" "stop_cmd=\":\"\n" msgstr "" "name=\"dummy\"\n" "start_cmd=\"${name}_start\"\n" "stop_cmd=\":\"\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:868 #, no-wrap msgid ": ${dummy_svcj_options:=\"\"} <.>\n" msgstr ": ${dummy_svcj_options:=\"\"} <.>\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:873 #: documentation/content/en/articles/rc-scripting/_index.adoc:904 #, no-wrap msgid "" "dummy_start()\n" "{\n" " echo \"Nothing started.\"\n" "}\n" msgstr "" "dummy_start()\n" "{\n" " echo \"Nothing started.\"\n" "}\n" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:880 msgid "" "➊ If it makes sense that the script runs in a jail, it must have an " "overridable service jails configuration. If it does not need network access " "or access to any other resource which is restricted in jails, an empty " "config like displayed is enough." msgstr "" "➊ Если имеет смысл, чтобы скрипт выполнялся в клетке, он должен иметь " "переопределяемую конфигурацию сервисных клеток. Если ему не требуется доступ " "к сети или любым другим ресурсам, которые ограничены в клетках, достаточно " "пустой конфигурации, как показано." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:885 msgid "" "Strictly speaking an empty config is not needed, but it explicitly describes " "that the script is service jails ready, and that it does not need additional " "jail permissions. As such it is highly recommended to add such an empty " "config in such a case. The most common option to use is \"net_basic\", " "which enables the use of the hosts IPv4 and IPv6 addresses. All possible " "options are explained in man:rc.conf[5]." msgstr "" "Строго говоря, пустая конфигурация не обязательна, но она явно указывает, " "что скрипт готов к работе с сервисными клетками и не требует дополнительных " "разрешений для клеток. Поэтому настоятельно рекомендуется добавить такую " "пустую конфигурацию в таком случае. Наиболее распространённая опция — " "\"net_basic\", которая позволяет использовать IPv4 и IPv6 адреса хоста. Все " "возможные опции описаны в man:rc.conf[5]." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:887 msgid "" "If a setting for the start/stop depends on variables from the rc-framework " "(e.g., set inside man:rc.conf[5]), this needs to be handled by " "``load_rc_config`` and ``run_rc_command`` instead of inside a precommand." msgstr "" "Если настройка запуска/остановки зависит от переменных из rc-фреймворка " "(например, заданных в man:rc.conf[5]), это должно обрабатываться с помощью " "``load_rc_config`` и ``run_rc_command``, а не внутри precommand." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:889 msgid "" "If for some reason a script can not be run within a service jail, e.g., " "because it is not possible to run or it does not make sense to run it in a " "jail, use the following:" msgstr "" "Если по какой-то причине скрипт не может быть запущен внутри сервисной " "клетки, например, потому что его невозможно запустить или нет смысла " "запускать его в клетке, используйте следующее:" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:908 #, no-wrap msgid "" "load_rc_config $name\n" "dummy_svcj=\"NO\"\t\t# does not make sense to run in a svcj <.>\n" "run_rc_command \"$1\"\n" msgstr "" "load_rc_config $name\n" "dummy_svcj=\"NO\"\t\t# does not make sense to run in a svcj <.>\n" "run_rc_command \"$1\"\n" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:911 msgid "" "➊ The disabling needs to happen after the ``load_rc_config`` call, " "else a man:rc.conf[5] setting may override it." msgstr "" "➊ Отключение должно происходить после вызова ``load_rc_config``, " "иначе параметр из man:rc.conf[5] может переопределить его." #. type: Title == #: documentation/content/en/articles/rc-scripting/_index.adoc:913 #, no-wrap msgid "Advanced rc-scripting: Instancing" msgstr "Продвинутые сценарии rc: запуск нескольких экземпляров" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:921 msgid "" "Sometimes it is useful to run several instances of a service. Typically you " "want to be able to start/stop such instances independently, and you want to " "have a separate config file for each instance. Each instance should be " "started at boot, survive updates, and benefit from updates." msgstr "" "Иногда полезно запускать несколько экземпляров службы. Обычно требуется " "иметь возможность независимо запускать/останавливать такие экземпляры, а " "также иметь отдельный файл конфигурации для каждого из них. Каждый экземпляр " "должен запускаться при загрузке, после обновления каждый экземпляр должен " "оставаться, и при этом должен обновиться." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:923 msgid "Here is an example of a rc script which supports this:" msgstr "Вот пример rc-скрипта, который поддерживает это:" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:941 #, no-wrap msgid "" "#\n" "# PROVIDE: dummy\n" "# REQUIRE: NETWORKING SERVERS\n" "# KEYWORD: shutdown\n" "#\n" "# Add these following line to /etc/rc.conf.local or /etc/rc.conf\n" "# to enable this service:\n" "#\n" "# dummy_enable (bool):\tSet it to YES to enable dummy on startup.\n" "#\t\t\tDefault: NO\n" "# dummy_user (string):\tUser account to run with.\n" "#\t\t\tDefault: www\n" "#\n" msgstr "" "#\n" "# PROVIDE: dummy\n" "# REQUIRE: NETWORKING SERVERS\n" "# KEYWORD: shutdown\n" "#\n" "# Add these following line to /etc/rc.conf.local or /etc/rc.conf\n" "# to enable this service:\n" "#\n" "# dummy_enable (bool):\tSet it to YES to enable dummy on startup.\n" "#\t\t\tDefault: NO\n" "# dummy_user (string):\tUser account to run with.\n" "#\t\t\tDefault: www\n" "#\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:954 #, no-wrap msgid "" "case $0 in <.>\n" "/etc/rc*)\n" "\t# during boot (shutdown) $0 is /etc/rc (/etc/rc.shutdown),\n" "\t# so get the name of the script from $_file\n" "\tname=$_file\n" "\t;;\n" "*)\n" "\tname=$0\n" "\t;;\n" "esac\n" msgstr "" "case $0 in <.>\n" "/etc/rc*)\n" "\t# during boot (shutdown) $0 is /etc/rc (/etc/rc.shutdown),\n" "\t# so get the name of the script from $_file\n" "\tname=$_file\n" "\t;;\n" "*)\n" "\tname=$0\n" "\t;;\n" "esac\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:959 #, no-wrap msgid "" "name=${name##*/} <.>\n" "rcvar=\"${name}_enable\" <.>\n" "desc=\"Short description of this service\"\n" "command=\"/usr/local/sbin/dummy\"\n" msgstr "" "name=${name##*/} <.>\n" "rcvar=\"${name}_enable\" <.>\n" "desc=\"Short description of this service\"\n" "command=\"/usr/local/sbin/dummy\"\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:961 #, no-wrap msgid "load_rc_config \"$name\"\n" msgstr "load_rc_config \"$name\"\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:965 #, no-wrap msgid "" "eval \"${rcvar}=\\${${rcvar}:-'NO'}\" <.>\n" "eval \"${name}_svcj_options=\\${${name}_svcj_options:-'net_basic'}\" <.>\n" "eval \"_dummy_user=\\${${name}_user:-'www'}\" <.>\n" msgstr "" "eval \"${rcvar}=\\${${rcvar}:-'NO'}\" <.>\n" "eval \"${name}_svcj_options=\\${${name}_svcj_options:-'net_basic'}\" <.>\n" "eval \"_dummy_user=\\${${name}_user:-'www'}\" <.>\n" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:970 #, no-wrap msgid "" "_dummy_configname=/usr/local/etc/${name}.cfg <.>\n" "pidfile=/var/run/dummy/${name}.pid\n" "required_files ${_dummy_configname}\n" "command_args=\"-u ${_dummy_user} -c ${_dummy_configfile} -p ${pidfile}\"\n" msgstr "" "_dummy_configname=/usr/local/etc/${name}.cfg <.>\n" "pidfile=/var/run/dummy/${name}.pid\n" "required_files ${_dummy_configname}\n" "command_args=\"-u ${_dummy_user} -c ${_dummy_configfile} -p ${pidfile}\"\n" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:978 msgid "" "➊ and ➋ make sure to set the name variable to the man:" "basename[1] of the script name. If the filename is [.filename]#/usr/local/" "etc/rc.d/dummy#, name is set to [.filename]#dummy#. This way changing the " "filename of the rc script changes automatically the content of the name " "variable." msgstr "" "➊ и ➋ убедитесь, что переменная name установлена в значение " "man:basename[1] имени скрипта. Если имя файла — [.filename]#/usr/local/etc/" "rc.d/dummy#, то name будет установлено в [.filename]#dummy#. Таким образом, " "изменение имени rc-скрипта автоматически изменит содержимое переменной name." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:981 msgid "" "➌ specifies the variable name which is used in [.filename]#rc.conf# " "to enable this service based upon the filename of this script. In this " "example this resolves to dummy_enable." msgstr "" "➌ указывает имя переменной, которая используется в [.filename]#rc." "conf# для включения этой службы на основе имени файла этого скрипта. В " "данном примере это преобразуется в dummy_enable." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:983 msgid "➍ makes sure the default for the _enable variable is NO." msgstr "" "➍ убеждается, что значение по умолчанию для переменной _enable " "установлено в NO." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:986 msgid "" "➎ is an example of having some defaults for service specific " "framework variables, in this case the service jails options." msgstr "" "➎ Вот пример установки некоторых значений по умолчанию для переменных " "фреймворка, специфичных для службы, в данном случае — опций клетки службы." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:988 msgid "" "➏ and ➐ set variables internal to the script (pay attention to " "the underscore in front of _dummy_user to make it different from dummy_user " "which can be set in [.filename]#rc.conf#)." msgstr "" "➏ и ➐ устанавливают переменные, внутренние для скрипта " "(обратите внимание на подчёркивание в начале _dummy_user, чтобы отличать её " "от dummy_user, которая может быть задана в [.filename]#rc.conf#)." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:991 msgid "" "The part in ➎ is for variables which are not used inside the script " "itself but in the rc framework. All the variables which are used as " "parameters somewhere in the script are assigned to a generic variable like " "in ➐ to make it more easy to reference them (no need to eval them at " "each place of use)." msgstr "" "Часть в ➎ предназначена для переменных, которые не используются " "внутри самого скрипта, но используются в рамках rc. Все переменные, которые " "используются как параметры в скрипте, присваиваются общей переменной, как в " "➐, чтобы упростить их использование (нет необходимости выполнять eval " "при каждом обращении)." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:994 msgid "" "This script will now behave differently if the start script has a different " "name. This allows to create symlinks to it:" msgstr "" "Этот скрипт теперь будет вести себя по-другому, если скрипт запуска имеет " "другое имя. Это позволяет создавать символьные ссылки на него:" #. type: delimited block . 4 #: documentation/content/en/articles/rc-scripting/_index.adoc:1000 #, no-wrap msgid "" "# ln -s dummy /usr/local/etc/rc.d/dummy_foo\n" "# sysrc dummy_foo_enable=YES\n" "# service dummy_foo start\n" msgstr "" "# ln -s dummy /usr/local/etc/rc.d/dummy_foo\n" "# sysrc dummy_foo_enable=YES\n" "# service dummy_foo start\n" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:1005 msgid "" "The above creates an instance of the dummy service with the name dummy_foo. " "It does not use the config file [.filename]#/usr/local/etc/dummy.cfg# but " "the config file [.filename]#/usr/local/etc/dummy_foo.cfg# (➐), and it " "uses the PID file [.filename]#/var/run/dummy/dummy_foo.pid# instead of [." "filename]#/var/run/dummy/dummy.pid#." msgstr "" -"Вышеприведенное создает экземпляр службы dummy с именем dummy_foo. Он " +"Вышеприведённое создает экземпляр службы dummy с именем dummy_foo. Он " "использует не файл конфигурации [.filename]#/usr/local/etc/dummy.cfg#, а " "файл конфигурации [.filename]#/usr/local/etc/dummy_foo.cfg# (➐), и " "использует PID-файл [.filename]#/var/run/dummy/dummy_foo.pid# вместо [." "filename]#/var/run/dummy/dummy.pid#." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:1012 msgid "" "The services dummy and dummy_foo can be managed independently of each other, " "while having the start script update itself on package update (due to the " "symlink). This does not update the REQUIRE line, as such there is no easy " "way of depending on a specific instance. To depend upon a specific instance " "in the startup order a copy needs to be made instead of using a symlink. " "This prevents the automatic pick-up of changes to the start script when an " "update is installed." msgstr "" "Сервисы dummy и dummy_foo могут управляться независимо друг от друга, при " "этом скрипт запуска обновляется автоматически при обновлении пакета " "(благодаря символьной ссылке). Это не обновляет строку REQUIRE, поэтому нет " "простого способа зависеть от конкретного экземпляра. Чтобы зависеть от " "конкретного экземпляра в порядке запуска, необходимо создать копию вместо " "использования символьной ссылки. Это предотвращает автоматическое применение " "изменений в скрипте запуска при установке обновления." #. type: Title == #: documentation/content/en/articles/rc-scripting/_index.adoc:1014 #, no-wrap msgid "Further reading" msgstr "Дополнительная литература" #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:1018 msgid "" "[[lukem]]http://www.mewburn.net/luke/papers/rc.d.pdf[The original article by " "Luke Mewburn] offers a general overview of [.filename]#rc.d# and detailed " "rationale for its design decisions. It provides insight on the whole [." "filename]#rc.d# framework and its place in a modern BSD operating system." msgstr "" "[[lukem]]http://www.mewburn.net/luke/papers/rc.d.pdf[Оригинальная статья " "Люка Мьюберна] предлагает общий обзор [.filename]#rc.d# и подробное " "обоснование принятых при его проектировании решений. В ней представлено " "понимание всего фреймворка [.filename]#rc.d# и его места в современной BSD-" "системе." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:1021 msgid "" "[[manpages]]The manual pages man:rc[8], man:rc.subr[8], and man:rcorder[8] " "document the [.filename]#rc.d# components in great detail. You cannot fully " "use the [.filename]#rc.d# power without studying the manual pages and " "referring to them while writing your own scripts." msgstr "" "[[manpages]]Руководства man:rc[8], man:rc.subr[8] и man:rcorder[8] подробно " "описывают компоненты [.filename]#rc.d#. Без изучения этих руководств и " "обращения к ним при написании собственных скриптов невозможно в полной мере " "использовать возможности [.filename]#rc.d#." #. type: Plain text #: documentation/content/en/articles/rc-scripting/_index.adoc:1025 msgid "" "The major source of working, real-life examples is [.filename]#/etc/rc.d# in " "a live system. Its contents are easy and pleasant to read because most " "rough corners are hidden deep in man:rc.subr[8]. Keep in mind though that " "the [.filename]#/etc/rc.d# scripts were not written by angels, so they might " "suffer from bugs and suboptimal design decisions. Now you can improve them!" msgstr "" "Основным источником рабочих, жизненных примеров является [.filename]#/etc/rc." "d# в работающей системе. Его содержимое легко и приятно читать, поскольку " "большинство сложных моментов скрыто глубоко в man:rc.subr[8]. Однако " "помните, что скрипты в [.filename]#/etc/rc.d# были написаны не ангелами, " "поэтому они могут содержать ошибки и неоптимальные решения. Теперь вы можете " "их улучшить!" diff --git a/documentation/content/ru/articles/releng/_index.adoc b/documentation/content/ru/articles/releng/_index.adoc index 0046c4d5ff..1ccbba5108 100644 --- a/documentation/content/ru/articles/releng/_index.adoc +++ b/documentation/content/ru/articles/releng/_index.adoc @@ -1,358 +1,358 @@ --- authors: - author: 'Murray Stokely' email: murray@FreeBSD.org webpage: https://people.FreeBSD.org/~murray/ description: 'В этом документе описывается подход, ранее использовавшийся командой разработки релизов FreeBSD для создания релизов операционной системы FreeBSD производственного качества' tags: ["Release", "Engineering", "Historical", "FreeBSD"] title: 'Устаревшая разработка релизов FreeBSD' trademarks: ["freebsd", "intel", "general"] --- = Подготовка релизов FreeBSD :doctype: article :toc: macro :toclevels: 1 :icons: font :sectnums: :sectnumlevels: 6 :source-highlighter: rouge :experimental: :images-path: articles/releng/ ifdef::env-beastie[] ifdef::backend-html5[] include::shared/authors.adoc[] include::shared/mirrors.adoc[] include::shared/releases.adoc[] include::shared/attributes/attributes-{{% lang %}}.adoc[] include::shared/{{% lang %}}/teams.adoc[] include::shared/{{% lang %}}/mailing-lists.adoc[] include::shared/{{% lang %}}/urls.adoc[] :imagesdir: ../../../images/{images-path} endif::[] ifdef::backend-pdf,backend-epub3[] include::../../../../shared/asciidoctor.adoc[] endif::[] endif::[] ifndef::env-beastie[] include::../../../../../shared/asciidoctor.adoc[] endif::[] [.abstract-title] Аннотация [NOTE] ==== Этот документ устарел и не точно описывает текущие процедуры выпуска релизов команды FreeBSD Release Engineering. Он сохранен в исторических целях. Текущие процедуры, используемые командой FreeBSD Release Engineering, доступны в статье extref:{freebsd-releng}[FreeBSD Release Engineering]. ==== В этом документе описывается подход, используемый командой разработки релизов FreeBSD для создания релизов операционной системы FreeBSD производственного качества. Подробно излагается методология, применяемая для официальных выпусков FreeBSD, а также описываются инструменты, доступные тем, кто заинтересован в создании собственных релизов FreeBSD для корпоративного внедрения или использования в коммерческой деятельности. ''' toc::[] [[introduction]] == Введение -Разработка FreeBSD — это очень открытый процесс. FreeBSD создается благодаря вкладу тысяч людей по всему миру. Проект FreeBSD предоставляет доступ к Subversion footnote:[Subversion, http://subversion.apache.org] для широкой публики, чтобы другие могли просматривать сообщения журнала, различия (патчи) между ветками разработки и другие улучшения производительности, которые предоставляет система управления исходным кодом. Это значительно помогло привлечь больше талантливых разработчиков в FreeBSD. Однако, я думаю, все согласятся, что хаос быстро воцарился бы, если бы право записи в основной репозиторий было открыто для всех в Интернете. Поэтому только «избранная» группа из почти 300 человек имеет право записи в репозиторий Subversion. Эти extref:{contributors}[коммиттеры FreeBSD, staff-committers]footnote:[extref:{contributors}[коммиттеры FreeBSD, staff-committers]] обычно являются людьми, которые выполняют основную часть разработки FreeBSD. Избранная группа разработчиков — link:https://www.FreeBSD.org/administration/#t-core[Core Team]footnote:[link:https://www.FreeBSD.org/administration/#t-core[Core Team FreeBSD]] — обеспечивает некоторый уровень руководства проектом. +Разработка FreeBSD — это очень открытый процесс. FreeBSD создается благодаря вкладу тысяч людей по всему миру. Проект FreeBSD предоставляет доступ к Subversion footnote:[Subversion, http://subversion.apache.org] для широкой публики, чтобы другие могли просматривать сообщения журнала, различия (патчи) между ветками разработки и другие улучшения производительности, которые предоставляет система управления исходным кодом. Это значительно помогло привлечь больше талантливых разработчиков в FreeBSD. Однако, я думаю, все согласятся, что хаос быстро воцарился бы, если бы право записи в основной репозиторий было открыто для всех в Интернете. Поэтому только «избранная» группа из почти 300 человек имеет право записи в репозиторий Subversion. Эти extref:{contributors}[коммиттеры FreeBSD, staff-committers]footnote:[extref:{contributors}[коммиттеры FreeBSD, staff-committers]] обычно являются людьми, которые выполняют основную часть разработки FreeBSD. Выбранная группа разработчиков — link:https://www.FreeBSD.org/administration/#t-core[Основная команда (Core Team)]footnote:[link:https://www.FreeBSD.org/administration/#t-core[Основная команда FreeBSD]] — обеспечивает некоторый уровень руководства проектом. Быстрый темп разработки `FreeBSD` делает основную ветку разработки непригодной для повседневного использования широкой публикой. В частности, требуются усилия по стабилизации для доведения системы разработки до релиза производственного качества. Для решения этого конфликта разработка продолжается по нескольким параллельным направлениям. Основная ветка разработки — это _HEAD_ или _trunk_ нашего дерева Subversion, известная как "FreeBSD-CURRENT" или сокращённо "-CURRENT". Набор более стабильных ветвей поддерживается под названием "FreeBSD-STABLE" или сокращённо "-STABLE". Все ветви находятся в главном хранилище Subversion, которое поддерживается проектом FreeBSD. FreeBSD-CURRENT — это "передний край" разработки FreeBSD, куда сначала попадают все новые изменения. FreeBSD-STABLE — это ветвь разработки, на основе которой выпускаются основные релизы. Изменения попадают в эту ветвь с другой скоростью и с общим предположением, что они сначала попали в FreeBSD-CURRENT и были тщательно протестированы сообществом пользователей. Термин _stable_ в названии ветки относится к предполагаемой стабильности бинарного интерфейса приложений (ABI), которую гарантирует проект. Это означает, что пользовательское приложение, скомпилированное на более старой версии системы из той же ветки, будет работать на более новой системе из той же ветки. Стабильность ABI значительно улучшилась по сравнению с предыдущими выпусками. В большинстве случаев бинарные файлы со старых систем _STABLE_ работают без изменений на более новых системах, включая __HEAD__, при условии, что не используются интерфейсы управления системой. В промежуточный период между выпусками еженедельные снимки состояния системы автоматически создаются сборщиками FreeBSD Project и доступны для загрузки по адресу `https:/download.FreeBSD.org/snapshots/`. Широкое распространение бинарных снимков выпусков, а также склонность нашего сообщества пользователей следить за разработкой -STABLE с помощью Subversion и команды "`make buildworld`" footnote:[extref:{handbook}cutting-edge[Пересборка world, makeworld]] помогает поддерживать FreeBSD-STABLE в очень надёжном состоянии даже до того, как будут запущены мероприятия по обеспечению качества перед основным выпуском. Помимо снимков установочных ISO, также предоставляются еженедельные образы виртуальных машин для использования с VirtualBox, qemu или другим популярным эмуляционным программным обеспечением. Образы виртуальных машин можно загрузить с `https://download.FreeBSD.org/snapshots/VM-IMAGES/`. Образы виртуальных машин сжаты с помощью man:xz[1] и занимают примерно 150 МБ, а при подключении к виртуальной машине содержат разреженную файловую систему размером 10 ГБ. Отчёты об ошибках и запросы функций постоянно отправляются пользователями в течение цикла выпуска. Сообщения о проблемах вносятся в нашу базу данных Bugzilla через веб-интерфейс, доступный по адресу https://www.freebsd.org/support/bugreports/[https://www.freebsd.org/support/bugreports/]. Для обслуживания наиболее консервативных пользователей, начиная с FreeBSD 4.3, были введены индивидуальные ветки релизов. Эти ветки создаются незадолго до выпуска финального релиза. После выхода релиза на ветку вносятся только самые критические исправления безопасности и дополнения. Помимо обновлений исходного кода через Subversion, доступны бинарные патч-наборы для поддержания актуальности систем на ветках _releng/X.Y_. === Что описывает эта статья Следующие разделы этой статьи описывают: crossref:releng[release-proc, Процесс выпуска релиза]:: Различные этапы процесса разработки релиза, предшествующие непосредственной сборке системы. crossref:releng[release-build, Сборка релиза]:: Фактический процесс сборки. crossref:releng[extensibility, Расширяемость]:: Как базовый выпуск может быть расширен третьими сторонами. crossref:releng[lessons-learned, Уроки, извлеченные из FreeBSD 4.4]:: Некоторые уроки, извлеченные в процессе выпуска FreeBSD 4.4. crossref:releng[future, Перспективы развития]:: Перспективные направления развития. [[release-proc]] == Процесс выпуска релиза Новые выпуски FreeBSD выходят из ветки -STABLE примерно с интервалом в четыре месяца. Процесс выпуска FreeBSD начинает набирать обороты за 70-80 дней до предполагаемой даты выпуска, когда инженер выпуска отправляет электронное письмо в списки рассылки разработчиков, напоминая им, что у них осталось всего 15 дней для интеграции новых изменений до заморозки кода. В это время многие разработчики выполняют так называемые "MFC-проверки". MFC означает "Merge From CURRENT" и описывает процесс переноса проверенного изменения из нашей ветки разработки -CURRENT в ветку -STABLE. Политика проекта требует, чтобы любое изменение сначала было применено к основной ветке, а затем перенесено в ветки -STABLE после достаточного внешнего тестирования пользователями -CURRENT (ожидается, что разработчики тщательно проверят изменение перед внесением в -CURRENT, но невозможно для одного человека проверить все варианты использования универсальной операционной системы). Минимальный срок для MFC составляет 3 дня, который обычно используется только для тривиальных или критических исправлений ошибок. === Проверка кода За шестьдесят дней до предполагаемого релиза репозиторий исходного кода переходит в режим «заморозки кода». В этот период все коммиты в ветку -STABLE должны быть одобрены `{re}`. Процесс утверждения технически обеспечивается предкоммитным хуком. В этот период допускаются следующие виды изменений: * Исправления ошибок. * Обновления документации. * Исправления, связанные с безопасностью, любого рода. * Незначительные изменения в драйверах устройств, такие как добавление новых идентификаторов устройств. * Обновления драйверов от поставщиков. * Любое дополнительное изменение, которое команда разработки релизов сочтет оправданным, учитывая потенциальный риск. Вскоре после начала заморозки кода создаётся образ _BETA1_ и выпускается для широкого тестирования. В период заморозки кода не реже чем раз в две недели выпускается как минимум один бета-образ или кандидат в релизы, пока не будет готов финальный выпуск. В дни, предшествующие финальному релизу, команда разработки выпусков постоянно взаимодействует с командой security-officer, сопровождающими документации и сопровождающими портов, чтобы убедиться, что все необходимые компоненты для успешного релиза доступны. -После того, как качество BETA-образов становится достаточно удовлетворительным и не планируется крупных и потенциально рискованных изменений, создается ветка релиза, и образы _Release Candidate_ (RC) собираются из ветки релиза, вместо BETA-образов из ветки STABLE. Также снимается заморозка изменений в ветке STABLE, а ветка релиза переходит в режим "жесткой заморозки кода", когда становится значительно сложнее обосновать новые изменения в системе, за исключением исправления серьезных ошибок или проблем безопасности. +После того, как качество BETA-образов становится достаточно удовлетворительным и не планируется крупных и потенциально рискованных изменений, создается ветка релиза, и образы _Release Candidate_ (RC) собираются из ветки релиза, вместо BETA-образов из ветки STABLE. Также снимается заморозка изменений в ветке STABLE, а ветка релиза переходит в режим "жёсткой заморозки кода", когда становится значительно сложнее обосновать новые изменения в системе, за исключением исправления серьезных ошибок или проблем безопасности. === Контрольный список финального выпуска Когда несколько образов BETA станут доступны для широкого тестирования и все основные проблемы будут устранены, можно приступать к финальной "доводке" выпуска. [[rel-branch]] ==== Создание ветки релиза [NOTE] ==== Во всех примерах ниже `$FSVN` указывает на расположение репозитория Subversion FreeBSD, `svn+ssh://svn.FreeBSD.org/base/`. ==== Расположение веток FreeBSD в Subversion описано в extref:{committers-guide}[Руководстве коммиттера, subversion-primer-base-layout]. Первым шагом в создании ветки является определение ревизии исходников `stable/_X_`, от которой вы хотите сделать _ответвление_. [source, shell] .... # svn log -v $FSVN/stable/9 .... Следующий шаг — создание _ветки релиза_ [source, shell] .... # svn cp $FSVN/stable/9@REVISION $FSVN/releng/9.2 .... Эту ветку можно извлечь: [source, shell] .... # svn co $FSVN/releng/9.2 src .... [NOTE] ==== Создание ветки `releng` и тегов `release` выполняется командой link:https://www.FreeBSD.org/administration/#t-re[Release Engineering Team]. ==== image::branches-head.png["Ветка разработки FreeBSD"] image::branches-releng3.png["Ветка STABLE FreeBSD 3.x"] image::branches-releng4.png["Ветка FreeBSD 4.x STABLE"] image::branches-releng5.png["Ветка STABLE FreeBSD 5.x"] image::branches-releng6.png["Ветка FreeBSD 6.x STABLE"] image::branches-releng7.png["Ветка FreeBSD 7.x STABLE"] image::branches-releng8.png["Ветка FreeBSD 8.x STABLE"] image::branches-releng9.png["Ветка FreeBSD 9.x STABLE"] [[versionbump]] ==== Увеличение номера версии Перед тем как финальный выпуск может быть помечен, собран и выпущен, следующие файлы должны быть изменены, чтобы отражать корректную версию FreeBSD: * [.filename]#doc/en_US.ISO8859-1/books/handbook/mirrors/chapter.xml# * [.filename]#doc/en_US.ISO8859-1/books/porters-handbook/book.xml# * [.filename]#doc/en_US.ISO8859-1/htdocs/cgi/ports.cgi# * [.filename]#ports/Tools/scripts/release/config# * [.filename]#doc/shared/xml/freebsd.ent# * [.filename]#src/Makefile.inc1# * [.filename]#src/UPDATING# * [.filename]#src/gnu/usr.bin/groff/tmac/mdoc.local# * [.filename]#src/release/Makefile# * [.filename]#src/release/doc/en_US.ISO8859-1/shared/xml/release.dsl# * [.filename]#src/release/doc/shared/examples/Makefile.relnotesng# * [.filename]#src/release/doc/shared/xml/release.ent# * [.filename]#src/sys/conf/newvers.sh# * [.filename]#src/sys/sys/param.h# * [.filename]#src/usr.sbin/pkg_install/add/main.c# * [.filename]#doc/en_US.ISO8859-1/htdocs/search/opensearch/man.xml# Заметки о выпуске и файлы с опечатками также необходимо адаптировать для нового выпуска (в ветке выпуска) и соответствующим образом обрезать (в ветке stable/current): * [.filename]#src/release/doc/en_US.ISO8859-1/relnotes/common/new.xml# * [.filename]#src/release/doc/en_US.ISO8859-1/errata/article.xml# -В Sysinstall следует добавить информацию о количестве доступных портов и объеме дискового пространства, необходимого для коллекции портов. footnote:[Коллекция портов FreeBSD https://ports.FreeBSD.org] В настоящее время эта информация хранится в [.filename]#src/usr.sbin/bsdinstall/dist.c#. +В Sysinstall следует добавить информацию о количестве доступных портов и объёме дискового пространства, необходимого для коллекции портов. footnote:[Коллекция портов FreeBSD https://ports.FreeBSD.org] В настоящее время эта информация хранится в [.filename]#src/usr.sbin/bsdinstall/dist.c#. После сборки выпуска следует обновить ряд файлов, чтобы объявить о выпуске. Эти файлы находятся относительно `head/` в поддереве `doc/` Subversion. * [.filename]#share/images/articles/releng/branches-relengX.pic# * [.filename]#head/shared/xml/release.ent# * [.filename]#en_US.ISO8859-1/htdocs/releases/*# * [.filename]#en_US.ISO8859-1/htdocs/releng/index.xml# * [.filename]#share/xml/news.xml# Кроме того, обновите файл "Генеалогическое древо BSD": * [.filename]#src/shared/misc/bsd-family-tree# ==== Создание тега релиза Когда финальный выпуск будет готов, следующая команда создаст тег `release/9.2.0`. [source, shell] .... # svn cp $FSVN/releng/9.2 $FSVN/release/9.2.0 .... Менеджеры документации и портов ответственны за добавление тега `tags/RELEASE_9_2_0` в соответствующие деревья. Когда команда Subversion `svn cp` используется для создания __тега релиза (release tag)__, это идентифицирует исходный код на определённый момент времени. Создавая теги, мы гарантируем, что будущие сборщики релизов всегда смогут использовать тот же исходный код, который использовался для создания официальных релизов проекта FreeBSD. [[release-build]] == Сборка релиза Сборка "релизов" FreeBSD может быть выполнена любым пользователем, имеющим быстрый компьютер и доступ к репозиторию исходного кода. (Это должно быть доступно каждому, так как мы предоставляем доступ через Subversion! Подробности см. в extref:{handbook}[разделе Subversion в Руководстве, svn].) _Единственное_ специальное требование — доступность устройства man:md[4]. Если устройство не загружено в ваше ядро, то модуль ядра должен автоматически загрузиться при выполнении man:mdconfig[8] во время этапа создания загрузочного носителя. Все необходимые инструменты для сборки релиза доступны в репозитории Subversion в [.filename]#src/release#. Эти инструменты предназначены для обеспечения единообразного способа сборки релизов FreeBSD. Полный релиз может быть собран всего одной командой, включая создание ISO-образов, пригодных для записи на CDROM или DVD, а также каталога для установки по FTP. man:release[7] полностью документирует скрипт `src/release/generate-release.sh`, который используется для сборки релиза. `generate-release.sh` является обёрткой для цели Makefile: `make release`. === Сборка релиза man:release[7] документирует точные команды, необходимые для сборки релиза FreeBSD. Следующая последовательность команд может собрать релиз 9.2.0: [source, shell] .... # cd /usr/src/release # sh generate-release.sh release/9.2.0 /local3/release .... После выполнения этих команд все подготовленные файлы релиза будут доступны в каталоге [.filename]#/local3/release/R#. Файл [.filename]#Makefile# для выпуска можно разбить на несколько отдельных этапов. * Создание изолированного окружения системы в отдельной иерархии каталогов с помощью "`make installworld`". * Извлечение из Subversion чистой версии исходного кода системы, документации и портов в иерархию сборки релиза. * Заполнение каталогов [.filename]#/etc# и [.filename]#/dev# в chroot-окружении. * Изменение корневого каталога на верхний каталог иерархии сборки релиза с помощью `chroot`, чтобы усложнить влияние внешней среды на эту сборку. * Запуск `make world` в окружении `chroot`. * Сборка связанных с Kerberos бинарных файлов. * Сборка ядра [.filename]#GENERIC#. * Создание промежуточной структуры каталогов, в которой будут собираться и упаковываться бинарные дистрибутивы. * Сборка и установка инструментария для документации, необходимого для преобразования исходников документации (SGML) в HTML и текстовые документы, которые будут поставляться с релизом. * Сборка и установка непосредственно документации (руководства пользователя, учебные пособия, примечания к выпуску, списки совместимого оборудования и так далее). * Создание распространяемых tar-архивов с бинарными файлами и исходными кодами. * Создание иерархии установки FTP. * _(необязательно)_ Создание ISO-образов для носителей CDROM/DVD. Для получения дополнительной информации о инфраструктуре сборки релизов, обратитесь к man:release[7]. [NOTE] ==== Важно удалить все специфичные для сайта настройки из [.filename]#/etc/make.conf#. Например, было бы неразумно распространять бинарные файлы, собранные на системе с установленным `CPUTYPE` для конкретного процессора. ==== === Предоставленное программное обеспечение ("порты") https://ports.FreeBSD.org[Коллекция портов FreeBSD] представляет собой набор из более чем {numports} сторонних программных пакетов, доступных для FreeBSD. `{portmgr}` отвечает за поддержание согласованного дерева портов, которое может быть использовано для создания бинарных пакетов, поставляемых с официальными выпусками FreeBSD. === Релизные ISO-образы Начиная с FreeBSD 4.4, проект FreeBSD решил выпустить все четыре образа ISO, которые ранее продавались на «официальных» дистрибутивах CDROM от _BSDi/Wind River Systems/FreeBSD Mall_. Каждый из четырёх дисков должен содержать файл [.filename]#README.TXT#, объясняющий содержимое диска, файл [.filename]#CDROM.INF#, предоставляющий метаданные для диска, чтобы man:bsdinstall[8] мог проверить и использовать содержимое, и файл [.filename]#filename.txt#, содержащий манифест диска. Этот _манифест_ можно создать простой командой: [source, shell] .... /stage/cdrom# find . -type f | sed -e 's/^\.\///' | sort > filename.txt .... Конкретные требования для каждого CD приведены ниже. ==== Диск 1 Первый диск почти полностью создаётся командой `make release`. Единственные изменения, которые следует внести в каталог [.filename]#disc1#, — это добавление каталога [.filename]#tools# и как можно большего количества популярных сторонних программных пакетов, которые поместятся на диск. В каталоге [.filename]#tools# содержится программное обеспечение, позволяющее пользователям создавать установочные дискеты из других операционных систем. Этот диск должен быть загрузочным, чтобы пользователям современных ПК не требовалось создавать установочные дискеты. Если требуется включить пользовательское ядро FreeBSD, необходимо обновить man:bsdinstall[8] и man:release[7], чтобы включить инструкции по установке. Соответствующий код содержится в [.filename]#src/release# и [.filename]#src/usr.sbin/bsdinstall#. В частности, потребуется обновить файл [.filename]#src/release/Makefile#, а также [.filename]#dist.c#, [.filename]#dist.h#, [.filename]#menus.c#, [.filename]#install.c# и [.filename]#Makefile# в каталоге [.filename]#src/usr.sbin/bsdinstall#. При желании можно также обновить [.filename]#bsdinstall.8#. ==== Диск 2 Второй диск также в основном создаётся командой `make release`. Этот диск содержит «живую файловую систему», которая может использоваться через man:bsdinstall[8] для диагностики установки FreeBSD. Этот диск должен быть загрузочным и также содержать сжатую копию репозитория CVS в каталоге [.filename]#CVSROOT# и демонстрационные версии коммерческого ПО в каталоге [.filename]#commerce#. ==== Поддержка нескольких томов Sysinstall поддерживает установку пакетов с нескольких томов. Для этого каждый диск должен содержать файл [.filename]#INDEX#, в котором перечислены все пакеты на всех томах набора, а также дополнительное поле, указывающее, на каком именно томе находится конкретный пакет. Каждый том в наборе также должен иметь установленную переменную `CD_VOLUME` в файле [.filename]#cdrom.inf#, чтобы bsdinstall мог определить, какой том является каким. Когда пользователь пытается установить пакет, которого нет на текущем диске, bsdinstall предложит ему вставить соответствующий диск. [[distribution]] == Распространение [[dist-ftp]] === Сайты FTP Когда выпуск тщательно протестирован и упакован для распространения, необходимо обновить главный FTP-сайт. Официальные публичные FTP-сайты FreeBSD являются зеркалами главного сервера, который доступен только другим FTP-сайтам. Этот сервер известен как `ftp-master`. Когда выпуск готов, следующие файлы должны быть изменены на `ftp-master`: [.filename]#/pub/FreeBSD/releases/arch/X.Y-RELEASE/#:: Устанавливаемый каталог FTP, полученный в результате выполнения `make release`. [.filename]#/pub/FreeBSD/ports/arch/packages-X.Y-release/#:: Полная сборка пакетов для этого выпуска. [.filename]#/pub/FreeBSD/releases/arch/X.Y-RELEASE/tools#:: Символическая ссылка на [.filename]#../../../tools#. [.filename]#/pub/FreeBSD/releases/arch/X.Y-RELEASE/packages#:: Символическая ссылка на [.filename]#../../../ports/arch/packages-X.Y-release#. [.filename]#/pub/FreeBSD/releases/arch/ISO-IMAGES/X.Y/X.Y-RELEASE-arch-*.iso#:: Образы ISO. Символ "*" обозначает [.filename]#disc1#, [.filename]#disc2# и так далее. Только если существует [.filename]#disc1# и есть альтернативный первый установочный CD (например, упрощённая установка без графической оболочки), может также присутствовать [.filename]#mini#. Для получения дополнительной информации об архитектуре зеркал распространения FTP-сайтов FreeBSD, пожалуйста, ознакомьтесь со статьей extref:{hubs}[Поддержка зеркал FreeBSD]. Может потребоваться от нескольких часов до двух дней после обновления `ftp-master`, прежде чем большинство FTP-сайтов Tier-1 получат новое программное обеспечение, в зависимости от того, был ли загружен набор пакетов одновременно. Крайне важно, чтобы инженеры по выпуску скоординировались с {mirror-announce} перед объявлением общей доступности нового программного обеспечения на FTP-сайтах. В идеале набор пакетов для выпуска должен быть загружен как минимум за четыре дня до дня выпуска. Выпускные файлы должны быть загружены за 24–48 часов до запланированного времени выпуска с отключёнными разрешениями для "других" пользователей. Это позволит зеркальным сайтам загрузить их, но широкая публика не сможет скачать их с зеркальных сайтов. Письмо должно быть отправлено в {mirror-announce} в момент публикации выпускных файлов, уведомляя о том, что выпуск подготовлен, и указывая время, когда зеркальные сайты должны начать разрешать доступ. Обязательно укажите часовой пояс для указанного времени, например, относительно GMT. [[dist-cdrom]] === Репликация CD-ROM Скоро: Советы по отправке ISO-образов FreeBSD репликатору и меры по обеспечению качества. [[extensibility]] == Расширяемость Хотя FreeBSD представляет собой законченную операционную систему, ничто не обязывает вас использовать её именно в том виде, в каком мы упаковали её для распространения. Мы постарались разработать систему максимально расширяемой, чтобы она могла служить платформой для создания других коммерческих продуктов. Единственное «правило», которое у нас есть на этот счёт, — если вы собираетесь распространять FreeBSD с существенными изменениями, мы рекомендуем документировать ваши улучшения! Сообщество FreeBSD может оказывать поддержку только пользователям того программного обеспечения, которое мы предоставляем. Мы, безусловно, приветствуем инновации, такие как продвинутые инструменты установки и администрирования, но не можем отвечать на вопросы о них. === Скриптинг `bsdinstall` Инструмент установки и настройки системы FreeBSD, man:bsdinstall[8], может быть настроен для автоматизированной установки на крупных площадках. Эта функциональность может использоваться совместно с Intel(R) PXE footnote:[extref:{handbook}advanced-networking[Запуск системы по сети (PXE) без использования локальных накопителей, network-diskless]] для загрузки систем по сети. [[lessons-learned]] == Уроки, извлеченные из FreeBSD 4.4 Процесс разработки релиза 4.4 официально начался 1 августа 2001 года. После этой даты все коммиты в ветку `RELENG_4` FreeBSD должны были быть явно одобрены `{re}`. Первый релиз-кандидат для архитектуры x86 был выпущен 16 августа, за ним последовали ещё 4 релиз-кандидата, что привело к финальному релизу 18 сентября. Сотрудник по безопасности был очень вовлечён в последнюю неделю процесса, так как несколько проблем безопасности было обнаружено в ранних релиз-кандидатах. Всего за чуть более месяца было отправлено более _500_ писем `{re}`. Наше сообщество пользователей ясно дало понять, что безопасность и стабильность выпуска FreeBSD не должны приноситься в жертву из-за самостоятельно установленных сроков или целевых дат выпуска. Проект FreeBSD значительно вырос за время своего существования, и необходимость стандартизированных процедур управления выпусками никогда не была столь очевидной. Это станет ещё более важным по мере переноса FreeBSD на новые платформы. [[future]] == Перспективы развития Для обеспечения масштабирования наших процессов релиз-инжиниринга с растущей пользовательской базой мы прилагаем значительные усилия по документированию процедур, связанных с созданием выпусков FreeBSD. * _Параллелизм_ — Некоторые этапы сборки релиза действительно "тривиально параллельны". Большинство задач очень интенсивно используют ввод-вывод, поэтому наличие нескольких высокоскоростных дисков важнее, чем использование нескольких процессоров для ускорения процесса `make release`. Если в среде man:chroot[2] разные иерархии размещены на разных дисках, то выгрузка CVS для деревьев [.filename]#ports# и [.filename]#doc# может происходить одновременно с выполнением `make world` на другом диске. Использование RAID (аппаратного или программного) может значительно сократить общее время сборки. * _Кросс-сборка релизов_ - Сборка релиза для IA-64 или Alpha на x86 оборудовании? `make TARGET=ia64 release`. * _Регрессионное тестирование_ - Нам необходимы более совершенные автоматизированные тесты на корректность для FreeBSD. * _Инструменты установки_ - Наша программа установки уже давно вышла за рамки своего первоначального срока службы. В разработке находится несколько проектов, призванных обеспечить более продвинутый механизм установки. Проект libh был одним из таких проектов, целью которого было создание интеллектуальной новой системы управления пакетами и программы установки с графическим интерфейсом. [[ackno]] == Благодарности Я хотел бы поблагодарить Джордана Хаббарда за предоставленную мне возможность взять на себя часть обязанностей по управлению выпусками для FreeBSD 4.4, а также за всю его работу на протяжении многих лет, которая сделала FreeBSD такой, какая она есть сегодня. Конечно, выпуск не состоялся бы без всей работы, связанной с выпуском, выполненной `{asami}`, `{steve}`, `{bmah}`, `{nik}`, `{obrien}`, `{kris}`, `{jhb}` и остальным сообществом разработчиков FreeBSD. Я также хотел бы поблагодарить `{rgrimes}`, `{phk}` и других, кто работал над инструментами управления выпусками в самые ранние дни FreeBSD. На эту статью повлияли документы по управлению выпусками от CSRG footnote:[Маршалл Кирк МакКузик, Майкл Дж. Карелс и Кит Бостик: link:http://docs.FreeBSD.org/44doc/papers/releng.html[Управление выпусками 4.3BSD]], проекта NetBSD footnote:[Документация разработчика NetBSD: Управление выпусками http://www.NetBSD.org/developers/releng/index.html] и заметки Джона Болдуина с предложениями по процессу управления выпусками. footnote:[Предложение Джона Болдуина по управлению выпусками FreeBSD https://people.FreeBSD.org/~jhb/docs/releng.txt] diff --git a/documentation/content/ru/articles/releng/_index.po b/documentation/content/ru/articles/releng/_index.po index 981111ef8d..706a94cf6b 100644 --- a/documentation/content/ru/articles/releng/_index.po +++ b/documentation/content/ru/articles/releng/_index.po @@ -1,1596 +1,1596 @@ # SOME DESCRIPTIVE TITLE # Copyright (C) YEAR The FreeBSD Project # This file is distributed under the same license as the FreeBSD Documentation package. -# Vladlen Popolitov , 2025. +# Vladlen Popolitov , 2025, 2026. msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" "POT-Creation-Date: 2025-11-08 16:17+0000\n" -"PO-Revision-Date: 2025-11-12 04:45+0000\n" +"PO-Revision-Date: 2026-03-08 09:11+0000\n" "Last-Translator: Vladlen Popolitov \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 4.17\n" #. type: YAML Front Matter: description #: documentation/content/en/articles/releng/_index.adoc:1 #, no-wrap msgid "This paper describes the approach previously used by the FreeBSD release engineering team to make production quality releases of the FreeBSD Operating System" msgstr "В этом документе описывается подход, ранее использовавшийся командой разработки релизов FreeBSD для создания релизов операционной системы FreeBSD производственного качества" #. type: YAML Front Matter: title #: documentation/content/en/articles/releng/_index.adoc:1 #, no-wrap msgid "Legacy FreeBSD Release Engineering" msgstr "Устаревшая разработка релизов FreeBSD" #. type: Title = #: documentation/content/en/articles/releng/_index.adoc:12 #, no-wrap msgid "FreeBSD Release Engineering" msgstr "Подготовка релизов FreeBSD" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:45 msgid "Abstract" msgstr "Аннотация" #. type: delimited block = 4 #: documentation/content/en/articles/releng/_index.adoc:51 msgid "" "This document is outdated and does not accurately describe the current " "release procedures of the FreeBSD Release Engineering team. It is retained " "for historical purposes. The current procedures used by the FreeBSD Release " "Engineering team are available in the extref:{freebsd-releng}[FreeBSD " "Release Engineering] article." msgstr "" "Этот документ устарел и не точно описывает текущие процедуры выпуска релизов " "команды FreeBSD Release Engineering. Он сохранен в исторических целях. " "Текущие процедуры, используемые командой FreeBSD Release Engineering, " "доступны в статье extref:{freebsd-releng}[FreeBSD Release Engineering]." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:55 msgid "" "This paper describes the approach used by the FreeBSD release engineering " "team to make production quality releases of the FreeBSD Operating System. " "It details the methodology used for the official FreeBSD releases and " "describes the tools available for those interested in producing customized " "FreeBSD releases for corporate rollouts or commercial productization." msgstr "" "В этом документе описывается подход, используемый командой разработки " "релизов FreeBSD для создания релизов операционной системы FreeBSD " "производственного качества. Подробно излагается методология, применяемая для " "официальных выпусков FreeBSD, а также описываются инструменты, доступные " "тем, кто заинтересован в создании собственных релизов FreeBSD для " "корпоративного внедрения или использования в коммерческой деятельности." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:57 msgid "'''" msgstr "'''" #. type: Title == #: documentation/content/en/articles/releng/_index.adoc:61 #, no-wrap msgid "Introduction" msgstr "Введение" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:71 msgid "" "The development of FreeBSD is a very open process. FreeBSD is comprised of " "contributions from thousands of people around the world. The FreeBSD " "Project provides Subversion footnote:[Subversion, http://subversion.apache." "org] access to the general public so that others can have access to log " "messages, diffs (patches) between development branches, and other " "productivity enhancements that formal source code management provides. This " "has been a huge help in attracting more talented developers to FreeBSD. " "However, I think everyone would agree that chaos would soon manifest if " "write access to the main repository was opened up to everyone on the " "Internet. Therefore only a \"select\" group of nearly 300 people are given " "write access to the Subversion repository. These extref:{contributors}" "[FreeBSD committers, staff-committers]footnote:[extref:{contributors}" "[FreeBSD committers, staff-committers]] are usually the people who do the " "bulk of FreeBSD development. An elected link:https://www.FreeBSD.org/" "administration/#t-core[Core Team]footnote:[link:https://www.FreeBSD.org/" "administration/#t-core[FreeBSD Core Team]] of developers provide some level " "of direction over the project." msgstr "" "Разработка FreeBSD — это очень открытый процесс. FreeBSD создается благодаря " "вкладу тысяч людей по всему миру. Проект FreeBSD предоставляет доступ к " "Subversion footnote:[Subversion, http://subversion.apache.org] для широкой " -"публики, чтобы другие могли просматривать сообщения журнала, различия " -"(патчи) между ветками разработки и другие улучшения производительности, " -"которые предоставляет система управления исходным кодом. Это значительно " -"помогло привлечь больше талантливых разработчиков в FreeBSD. Однако, я " -"думаю, все согласятся, что хаос быстро воцарился бы, если бы право записи в " -"основной репозиторий было открыто для всех в Интернете. Поэтому только " -"«избранная» группа из почти 300 человек имеет право записи в репозиторий " -"Subversion. Эти extref:{contributors}[коммиттеры FreeBSD, staff-" +"публики, чтобы другие могли просматривать сообщения журнала, различия (патчи)" +" между ветками разработки и другие улучшения производительности, которые " +"предоставляет система управления исходным кодом. Это значительно помогло " +"привлечь больше талантливых разработчиков в FreeBSD. Однако, я думаю, все " +"согласятся, что хаос быстро воцарился бы, если бы право записи в основной " +"репозиторий было открыто для всех в Интернете. Поэтому только «избранная» " +"группа из почти 300 человек имеет право записи в репозиторий Subversion. Эти " +"extref:{contributors}[коммиттеры FreeBSD, staff-" "committers]footnote:[extref:{contributors}[коммиттеры FreeBSD, staff-" "committers]] обычно являются людьми, которые выполняют основную часть " -"разработки FreeBSD. Избранная группа разработчиков — link:https://www." -"FreeBSD.org/administration/#t-core[Core Team]footnote:[link:https://www." -"FreeBSD.org/administration/#t-core[Core Team FreeBSD]] — обеспечивает " -"некоторый уровень руководства проектом." +"разработки FreeBSD. Выбранная группа разработчиков — link:https://www.FreeBSD" +".org/administration/#t-core[Основная команда (Core " +"Team)]footnote:[link:https://www.FreeBSD.org/administration/#t-core[Основная " +"команда FreeBSD]] — обеспечивает некоторый уровень руководства проектом." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:76 msgid "" "The rapid pace of `FreeBSD` development makes the main development branch " "unsuitable for the everyday use by the general public. In particular, " "stabilizing efforts are required for polishing the development system into a " "production quality release. To solve this conflict, development continues " "on several parallel tracks. The main development branch is the _HEAD_ or " "_trunk_ of our Subversion tree, known as \"FreeBSD-CURRENT\" or \"-CURRENT\" " "for short." msgstr "" "Быстрый темп разработки `FreeBSD` делает основную ветку разработки " "непригодной для повседневного использования широкой публикой. В частности, " "требуются усилия по стабилизации для доведения системы разработки до релиза " "производственного качества. Для решения этого конфликта разработка " "продолжается по нескольким параллельным направлениям. Основная ветка " "разработки — это _HEAD_ или _trunk_ нашего дерева Subversion, известная как " "\"FreeBSD-CURRENT\" или сокращённо \"-CURRENT\"." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:82 msgid "" "A set of more stable branches are maintained, known as \"FreeBSD-STABLE\" or " "\"-STABLE\" for short. All branches live in a master Subversion repository " "maintained by the FreeBSD Project. FreeBSD-CURRENT is the \"bleeding-edge\" " "of FreeBSD development where all new changes first enter the system. " "FreeBSD-STABLE is the development branch from which major releases are " "made. Changes go into this branch at a different pace, and with the general " "assumption that they have first gone into FreeBSD-CURRENT and have been " "thoroughly tested by our user community." msgstr "" "Набор более стабильных ветвей поддерживается под названием \"FreeBSD-STABLE" "\" или сокращённо \"-STABLE\". Все ветви находятся в главном хранилище " "Subversion, которое поддерживается проектом FreeBSD. FreeBSD-CURRENT — это " "\"передний край\" разработки FreeBSD, куда сначала попадают все новые " "изменения. FreeBSD-STABLE — это ветвь разработки, на основе которой " "выпускаются основные релизы. Изменения попадают в эту ветвь с другой " "скоростью и с общим предположением, что они сначала попали в FreeBSD-CURRENT " "и были тщательно протестированы сообществом пользователей." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:87 msgid "" "The term _stable_ in the name of the branch refers to the presumed " "Application Binary Interface stability, which is promised by the project. " "This means that a user application compiled on an older version of the " "system from the same branch works on a newer system from the same branch. " "The ABI stability has improved greatly from the compared to previous " "releases. In most cases, binaries from the older _STABLE_ systems run " "unmodified on newer systems, including __HEAD__, assuming that the system " "management interfaces are not used." msgstr "" "Термин _stable_ в названии ветки относится к предполагаемой стабильности " "бинарного интерфейса приложений (ABI), которую гарантирует проект. Это " "означает, что пользовательское приложение, скомпилированное на более старой " "версии системы из той же ветки, будет работать на более новой системе из той " "же ветки. Стабильность ABI значительно улучшилась по сравнению с предыдущими " "выпусками. В большинстве случаев бинарные файлы со старых систем _STABLE_ " "работают без изменений на более новых системах, включая __HEAD__, при " "условии, что не используются интерфейсы управления системой." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:90 msgid "" "In the interim period between releases, weekly snapshots are built " "automatically by the FreeBSD Project build machines and made available for " "download from `https:/download.FreeBSD.org/snapshots/`. The widespread " "availability of binary release snapshots, and the tendency of our user " "community to keep up with -STABLE development with Subversion and \"`make " "buildworld`\" footnote:[extref:{handbook}cutting-edge[Rebuilding world, " "makeworld]] helps to keep FreeBSD-STABLE in a very reliable condition even " "before the quality assurance activities ramp up pending a major release." msgstr "" "В промежуточный период между выпусками еженедельные снимки состояния системы " "автоматически создаются сборщиками FreeBSD Project и доступны для загрузки " "по адресу `https:/download.FreeBSD.org/snapshots/`. Широкое распространение " "бинарных снимков выпусков, а также склонность нашего сообщества " "пользователей следить за разработкой -STABLE с помощью Subversion и команды " "\"`make buildworld`\" footnote:[extref:{handbook}cutting-edge[Пересборка " "world, makeworld]] помогает поддерживать FreeBSD-STABLE в очень надёжном " "состоянии даже до того, как будут запущены мероприятия по обеспечению " "качества перед основным выпуском." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:93 msgid "" "In addition to installation ISO snapshots, weekly virtual machine images are " "also provided for use with VirtualBox, qemu, or other popular emulation " "software. The virtual machine images can be downloaded from `https://" "download.FreeBSD.org/snapshots/VM-IMAGES/`." msgstr "" "Помимо снимков установочных ISO, также предоставляются еженедельные образы " "виртуальных машин для использования с VirtualBox, qemu или другим популярным " "эмуляционным программным обеспечением. Образы виртуальных машин можно " "загрузить с `https://download.FreeBSD.org/snapshots/VM-IMAGES/`." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:95 msgid "" "The virtual machine images are approximately 150MB man:xz[1] compressed, and " "contain a 10GB sparse filesystem when attached to a virtual machine." msgstr "" "Образы виртуальных машин сжаты с помощью man:xz[1] и занимают примерно 150 " "МБ, а при подключении к виртуальной машине содержат разреженную файловую " "систему размером 10 ГБ." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:98 msgid "" "Bug reports and feature requests are continuously submitted by users " "throughout the release cycle. Problems reports are entered into our " "Bugzilla database through the web interface provided at https://www.freebsd." "org/support/bugreports/[https://www.freebsd.org/support/bugreports/]." msgstr "" "Отчёты об ошибках и запросы функций постоянно отправляются пользователями в " "течение цикла выпуска. Сообщения о проблемах вносятся в нашу базу данных " "Bugzilla через веб-интерфейс, доступный по адресу https://www.freebsd.org/" "support/bugreports/[https://www.freebsd.org/support/bugreports/]." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:103 msgid "" "To service our most conservative users, individual release branches were " "introduced with FreeBSD 4.3. These release branches are created shortly " "before a final release is made. After the release goes out, only the most " "critical security fixes and additions are merged onto the release branch. " "In addition to source updates via Subversion, binary patchkits are available " "to keep systems on the _releng/X.Y_ branches updated." msgstr "" "Для обслуживания наиболее консервативных пользователей, начиная с FreeBSD " "4.3, были введены индивидуальные ветки релизов. Эти ветки создаются " "незадолго до выпуска финального релиза. После выхода релиза на ветку " "вносятся только самые критические исправления безопасности и дополнения. " "Помимо обновлений исходного кода через Subversion, доступны бинарные патч-" "наборы для поддержания актуальности систем на ветках _releng/X.Y_." #. type: Title === #: documentation/content/en/articles/releng/_index.adoc:104 #, no-wrap msgid "What This Article Describes" msgstr "Что описывает эта статья" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:107 msgid "The following sections of this article describe:" msgstr "Следующие разделы этой статьи описывают:" #. type: Labeled list #: documentation/content/en/articles/releng/_index.adoc:108 #, no-wrap msgid "crossref:releng[release-proc, Release Process]" msgstr "crossref:releng[release-proc, Процесс выпуска релиза]" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:110 msgid "" "The different phases of the release engineering process leading up to the " "actual system build." msgstr "" "Различные этапы процесса разработки релиза, предшествующие непосредственной " "сборке системы." #. type: Labeled list #: documentation/content/en/articles/releng/_index.adoc:111 #, no-wrap msgid "crossref:releng[release-build, Release Building]" msgstr "crossref:releng[release-build, Сборка релиза]" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:113 msgid "The actual build process." msgstr "Фактический процесс сборки." #. type: Labeled list #: documentation/content/en/articles/releng/_index.adoc:114 #, no-wrap msgid "crossref:releng[extensibility, Extensibility]" msgstr "crossref:releng[extensibility, Расширяемость]" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:116 msgid "How the base release may be extended by third parties." msgstr "Как базовый выпуск может быть расширен третьими сторонами." #. type: Labeled list #: documentation/content/en/articles/releng/_index.adoc:117 #, no-wrap msgid "crossref:releng[lessons-learned, Lessons Learned from FreeBSD 4.4]" msgstr "crossref:releng[lessons-learned, Уроки, извлеченные из FreeBSD 4.4]" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:119 msgid "Some of the lessons learned through the release of FreeBSD 4.4." msgstr "Некоторые уроки, извлеченные в процессе выпуска FreeBSD 4.4." #. type: Labeled list #: documentation/content/en/articles/releng/_index.adoc:120 #, no-wrap msgid "crossref:releng[future, Future Directions]" msgstr "crossref:releng[future, Перспективы развития]" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:122 msgid "Future directions of development." msgstr "Перспективные направления развития." #. type: Title == #: documentation/content/en/articles/releng/_index.adoc:124 #, no-wrap msgid "Release Process" msgstr "Процесс выпуска релиза" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:129 msgid "" "New releases of FreeBSD are released from the -STABLE branch at " "approximately four month intervals. The FreeBSD release process begins to " "ramp up 70-80 days before the anticipated release date when the release " "engineer sends an email to the development mailing lists to remind " "developers that they only have 15 days to integrate new changes before the " "code freeze. During this time, many developers perform what have become " "known as \"MFC sweeps\"." msgstr "" "Новые выпуски FreeBSD выходят из ветки -STABLE примерно с интервалом в " "четыре месяца. Процесс выпуска FreeBSD начинает набирать обороты за 70-80 " "дней до предполагаемой даты выпуска, когда инженер выпуска отправляет " "электронное письмо в списки рассылки разработчиков, напоминая им, что у них " "осталось всего 15 дней для интеграции новых изменений до заморозки кода. В " "это время многие разработчики выполняют так называемые \"MFC-проверки\"." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:133 msgid "" "MFC stands for \"Merge From CURRENT\" and it describes the process of " "merging a tested change from our -CURRENT development branch to our -STABLE " "branch. Project policy requires any change to be first applied to trunk, " "and merged to the -STABLE branches after sufficient external testing was " "done by -CURRENT users (developers are expected to extensively test the " "change before committing to -CURRENT, but it is impossible for a person to " "exercise all usages of the general-purpose operating system). Minimal MFC " "period is 3 days, which is typically used only for trivial or critical " "bugfixes." msgstr "" "MFC означает \"Merge From CURRENT\" и описывает процесс переноса " "проверенного изменения из нашей ветки разработки -CURRENT в ветку -STABLE. " "Политика проекта требует, чтобы любое изменение сначала было применено к " "основной ветке, а затем перенесено в ветки -STABLE после достаточного " "внешнего тестирования пользователями -CURRENT (ожидается, что разработчики " "тщательно проверят изменение перед внесением в -CURRENT, но невозможно для " "одного человека проверить все варианты использования универсальной " "операционной системы). Минимальный срок для MFC составляет 3 дня, который " "обычно используется только для тривиальных или критических исправлений " "ошибок." #. type: Title === #: documentation/content/en/articles/releng/_index.adoc:134 #, no-wrap msgid "Code Review" msgstr "Проверка кода" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:140 msgid "" "Sixty days before the anticipated release, the source repository enters a " "\"code freeze\". During this time, all commits to the -STABLE branch must " "be approved by `{re}`. The approval process is technically enforced by a " "pre-commit hook. The kinds of changes that are allowed during this period " "include:" msgstr "" "За шестьдесят дней до предполагаемого релиза репозиторий исходного кода " "переходит в режим «заморозки кода». В этот период все коммиты в ветку -" "STABLE должны быть одобрены `{re}`. Процесс утверждения технически " "обеспечивается предкоммитным хуком. В этот период допускаются следующие виды " "изменений:" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:142 msgid "Bug fixes." msgstr "Исправления ошибок." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:143 msgid "Documentation updates." msgstr "Обновления документации." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:144 msgid "Security-related fixes of any kind." msgstr "Исправления, связанные с безопасностью, любого рода." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:145 msgid "Minor changes to device drivers, such as adding new Device IDs." msgstr "" "Незначительные изменения в драйверах устройств, такие как добавление новых " "идентификаторов устройств." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:146 msgid "Driver updates from the vendors." msgstr "Обновления драйверов от поставщиков." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:147 msgid "" "Any additional change that the release engineering team feels is justified, " "given the potential risk." msgstr "" "Любое дополнительное изменение, которое команда разработки релизов сочтет " "оправданным, учитывая потенциальный риск." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:151 msgid "" "Shortly after the code freeze is started, a _BETA1_ image is built and " "released for widespread testing. During the code freeze, at least one beta " "image or release candidate is released every two weeks until the final " "release is ready. During the days preceding the final release, the release " "engineering team is in constant communication with the security-officer " "team, the documentation maintainers, and the port maintainers to ensure that " "all of the different components required for a successful release are " "available." msgstr "" "Вскоре после начала заморозки кода создаётся образ _BETA1_ и выпускается для " "широкого тестирования. В период заморозки кода не реже чем раз в две недели " "выпускается как минимум один бета-образ или кандидат в релизы, пока не будет " "готов финальный выпуск. В дни, предшествующие финальному релизу, команда " "разработки выпусков постоянно взаимодействует с командой security-officer, " "сопровождающими документации и сопровождающими портов, чтобы убедиться, что " "все необходимые компоненты для успешного релиза доступны." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:154 msgid "" "After the quality of the BETA images is satisfying enough, and no large and " "potentially risky changes are planned, the release branch is created and " "_Release Candidate_ (RC) images are built from the release branch, instead " "of the BETA images from the STABLE branch. Also, the freeze on the STABLE " "branch is lifted and release branch enters a \"hard code freeze\" where it " "becomes much harder to justify new changes to the system unless a serious " "bug-fix or security issue is involved." msgstr "" "После того, как качество BETA-образов становится достаточно " "удовлетворительным и не планируется крупных и потенциально рискованных " "изменений, создается ветка релиза, и образы _Release Candidate_ (RC) " "собираются из ветки релиза, вместо BETA-образов из ветки STABLE. Также " "снимается заморозка изменений в ветке STABLE, а ветка релиза переходит в " -"режим \"жесткой заморозки кода\", когда становится значительно сложнее " +"режим \"жёсткой заморозки кода\", когда становится значительно сложнее " "обосновать новые изменения в системе, за исключением исправления серьезных " "ошибок или проблем безопасности." #. type: Title === #: documentation/content/en/articles/releng/_index.adoc:155 #, no-wrap msgid "Final Release Checklist" msgstr "Контрольный список финального выпуска" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:158 msgid "" "When several BETA images have been made available for widespread testing and " "all major issues have been resolved, the final release \"polishing\" can " "begin." msgstr "" "Когда несколько образов BETA станут доступны для широкого тестирования и все " "основные проблемы будут устранены, можно приступать к финальной \"доводке\" " "выпуска." #. type: Title ==== #: documentation/content/en/articles/releng/_index.adoc:160 #, no-wrap msgid "Creating the Release Branch" msgstr "Создание ветки релиза" #. type: delimited block = 4 #: documentation/content/en/articles/releng/_index.adoc:165 msgid "" "In all examples below, `$FSVN` refers to the location of the FreeBSD " "Subversion repository, `svn+ssh://svn.FreeBSD.org/base/`." msgstr "" "Во всех примерах ниже `$FSVN` указывает на расположение репозитория " "Subversion FreeBSD, `svn+ssh://svn.FreeBSD.org/base/`." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:169 msgid "" "The layout of FreeBSD branches in Subversion is described in the extref:" "{committers-guide}[Committer's Guide, subversion-primer-base-layout]. The " "first step in creating a branch is to identify the revision of the `stable/" "_X_` sources that you want to branch _from_." msgstr "" "Расположение веток FreeBSD в Subversion описано в extref:{committers-guide}" "[Руководстве коммиттера, subversion-primer-base-layout]. Первым шагом в " "создании ветки является определение ревизии исходников `stable/_X_`, от " "которой вы хотите сделать _ответвление_." #. type: delimited block . 4 #: documentation/content/en/articles/releng/_index.adoc:173 #, no-wrap msgid "# svn log -v $FSVN/stable/9\n" msgstr "# svn log -v $FSVN/stable/9\n" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:176 msgid "The next step is to create the _release branch_" msgstr "Следующий шаг — создание _ветки релиза_" #. type: delimited block . 4 #: documentation/content/en/articles/releng/_index.adoc:180 #, no-wrap msgid "# svn cp $FSVN/stable/9@REVISION $FSVN/releng/9.2\n" msgstr "# svn cp $FSVN/stable/9@REVISION $FSVN/releng/9.2\n" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:183 msgid "This branch can be checked out:" msgstr "Эту ветку можно извлечь:" #. type: delimited block . 4 #: documentation/content/en/articles/releng/_index.adoc:187 #, no-wrap msgid "# svn co $FSVN/releng/9.2 src\n" msgstr "# svn co $FSVN/releng/9.2 src\n" #. type: delimited block = 4 #: documentation/content/en/articles/releng/_index.adoc:192 msgid "" "Creating the `releng` branch and `release` tags is done by the link:https://" "www.FreeBSD.org/administration/#t-re[Release Engineering Team]." msgstr "" "Создание ветки `releng` и тегов `release` выполняется командой link:https://" "www.FreeBSD.org/administration/#t-re[Release Engineering Team]." #. type: Positional ($1) AttributeList argument for macro 'image' #: documentation/content/en/articles/releng/_index.adoc:194 #, no-wrap msgid "FreeBSD Development Branch" msgstr "Ветка разработки FreeBSD" #. type: Target for macro image #: documentation/content/en/articles/releng/_index.adoc:194 #, no-wrap msgid "branches-head.png" msgstr "branches-head.png" #. type: Positional ($1) AttributeList argument for macro 'image' #: documentation/content/en/articles/releng/_index.adoc:196 #, no-wrap msgid "FreeBSD 3.x STABLE Branch" msgstr "Ветка STABLE FreeBSD 3.x" #. type: Target for macro image #: documentation/content/en/articles/releng/_index.adoc:196 #, no-wrap msgid "branches-releng3.png" msgstr "branches-releng3.png" #. type: Positional ($1) AttributeList argument for macro 'image' #: documentation/content/en/articles/releng/_index.adoc:198 #, no-wrap msgid "FreeBSD 4.x STABLE Branch" msgstr "Ветка FreeBSD 4.x STABLE" #. type: Target for macro image #: documentation/content/en/articles/releng/_index.adoc:198 #, no-wrap msgid "branches-releng4.png" msgstr "branches-releng4.png" #. type: Positional ($1) AttributeList argument for macro 'image' #: documentation/content/en/articles/releng/_index.adoc:200 #, no-wrap msgid "FreeBSD 5.x STABLE Branch" msgstr "Ветка STABLE FreeBSD 5.x" #. type: Target for macro image #: documentation/content/en/articles/releng/_index.adoc:200 #, no-wrap msgid "branches-releng5.png" msgstr "branches-releng5.png" #. type: Positional ($1) AttributeList argument for macro 'image' #: documentation/content/en/articles/releng/_index.adoc:202 #, no-wrap msgid "FreeBSD 6.x STABLE Branch" msgstr "Ветка FreeBSD 6.x STABLE" #. type: Target for macro image #: documentation/content/en/articles/releng/_index.adoc:202 #, no-wrap msgid "branches-releng6.png" msgstr "branches-releng6.png" #. type: Positional ($1) AttributeList argument for macro 'image' #: documentation/content/en/articles/releng/_index.adoc:204 #, no-wrap msgid "FreeBSD 7.x STABLE Branch" msgstr "Ветка FreeBSD 7.x STABLE" #. type: Target for macro image #: documentation/content/en/articles/releng/_index.adoc:204 #, no-wrap msgid "branches-releng7.png" msgstr "branches-releng7.png" #. type: Positional ($1) AttributeList argument for macro 'image' #: documentation/content/en/articles/releng/_index.adoc:206 #, no-wrap msgid "FreeBSD 8.x STABLE Branch" msgstr "Ветка FreeBSD 8.x STABLE" #. type: Target for macro image #: documentation/content/en/articles/releng/_index.adoc:206 #, no-wrap msgid "branches-releng8.png" msgstr "branches-releng8.png" #. type: Positional ($1) AttributeList argument for macro 'image' #: documentation/content/en/articles/releng/_index.adoc:208 #, no-wrap msgid "FreeBSD 9.x STABLE Branch" msgstr "Ветка FreeBSD 9.x STABLE" #. type: Target for macro image #: documentation/content/en/articles/releng/_index.adoc:208 #, no-wrap msgid "branches-releng9.png" msgstr "branches-releng9.png" #. type: Title ==== #: documentation/content/en/articles/releng/_index.adoc:211 #, no-wrap msgid "Bumping up the Version Number" msgstr "Увеличение номера версии" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:214 msgid "" "Before the final release can be tagged, built, and released, the following " "files need to be modified to reflect the correct version of FreeBSD:" msgstr "" "Перед тем как финальный выпуск может быть помечен, собран и выпущен, " "следующие файлы должны быть изменены, чтобы отражать корректную версию " "FreeBSD:" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:216 msgid "[.filename]#doc/en_US.ISO8859-1/books/handbook/mirrors/chapter.xml#" msgstr "[.filename]#doc/en_US.ISO8859-1/books/handbook/mirrors/chapter.xml#" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:217 msgid "[.filename]#doc/en_US.ISO8859-1/books/porters-handbook/book.xml#" msgstr "[.filename]#doc/en_US.ISO8859-1/books/porters-handbook/book.xml#" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:218 msgid "[.filename]#doc/en_US.ISO8859-1/htdocs/cgi/ports.cgi#" msgstr "[.filename]#doc/en_US.ISO8859-1/htdocs/cgi/ports.cgi#" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:219 msgid "[.filename]#ports/Tools/scripts/release/config#" msgstr "[.filename]#ports/Tools/scripts/release/config#" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:220 msgid "[.filename]#doc/shared/xml/freebsd.ent#" msgstr "[.filename]#doc/shared/xml/freebsd.ent#" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:221 msgid "[.filename]#src/Makefile.inc1#" msgstr "[.filename]#src/Makefile.inc1#" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:222 msgid "[.filename]#src/UPDATING#" msgstr "[.filename]#src/UPDATING#" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:223 msgid "[.filename]#src/gnu/usr.bin/groff/tmac/mdoc.local#" msgstr "[.filename]#src/gnu/usr.bin/groff/tmac/mdoc.local#" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:224 msgid "[.filename]#src/release/Makefile#" msgstr "[.filename]#src/release/Makefile#" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:225 msgid "[.filename]#src/release/doc/en_US.ISO8859-1/shared/xml/release.dsl#" msgstr "[.filename]#src/release/doc/en_US.ISO8859-1/shared/xml/release.dsl#" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:226 msgid "[.filename]#src/release/doc/shared/examples/Makefile.relnotesng#" msgstr "[.filename]#src/release/doc/shared/examples/Makefile.relnotesng#" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:227 msgid "[.filename]#src/release/doc/shared/xml/release.ent#" msgstr "[.filename]#src/release/doc/shared/xml/release.ent#" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:228 msgid "[.filename]#src/sys/conf/newvers.sh#" msgstr "[.filename]#src/sys/conf/newvers.sh#" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:229 msgid "[.filename]#src/sys/sys/param.h#" msgstr "[.filename]#src/sys/sys/param.h#" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:230 msgid "[.filename]#src/usr.sbin/pkg_install/add/main.c#" msgstr "[.filename]#src/usr.sbin/pkg_install/add/main.c#" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:231 msgid "[.filename]#doc/en_US.ISO8859-1/htdocs/search/opensearch/man.xml#" msgstr "[.filename]#doc/en_US.ISO8859-1/htdocs/search/opensearch/man.xml#" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:233 msgid "" "The release notes and errata files also need to be adjusted for the new " "release (on the release branch) and truncated appropriately (on the stable/" "current branch):" msgstr "" "Заметки о выпуске и файлы с опечатками также необходимо адаптировать для " "нового выпуска (в ветке выпуска) и соответствующим образом обрезать (в ветке " "stable/current):" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:235 msgid "[.filename]#src/release/doc/en_US.ISO8859-1/relnotes/common/new.xml#" msgstr "[.filename]#src/release/doc/en_US.ISO8859-1/relnotes/common/new.xml#" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:236 msgid "[.filename]#src/release/doc/en_US.ISO8859-1/errata/article.xml#" msgstr "[.filename]#src/release/doc/en_US.ISO8859-1/errata/article.xml#" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:240 msgid "" "Sysinstall should be updated to note the number of available ports and the " "amount of disk space required for the Ports Collection. footnote:[FreeBSD " "Ports Collection https://ports.FreeBSD.org] This information is currently " "kept in [.filename]#src/usr.sbin/bsdinstall/dist.c#." msgstr "" "В Sysinstall следует добавить информацию о количестве доступных портов и " -"объеме дискового пространства, необходимого для коллекции портов. footnote:" -"[Коллекция портов FreeBSD https://ports.FreeBSD.org] В настоящее время эта " +"объёме дискового пространства, необходимого для коллекции портов. footnote:[" +"Коллекция портов FreeBSD https://ports.FreeBSD.org] В настоящее время эта " "информация хранится в [.filename]#src/usr.sbin/bsdinstall/dist.c#." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:243 msgid "" "After the release has been built, a number of files should be updated to " "announce the release to the world. These files are relative to `head/` " "within the `doc/` subversion tree." msgstr "" "После сборки выпуска следует обновить ряд файлов, чтобы объявить о выпуске. " "Эти файлы находятся относительно `head/` в поддереве `doc/` Subversion." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:245 msgid "[.filename]#share/images/articles/releng/branches-relengX.pic#" msgstr "[.filename]#share/images/articles/releng/branches-relengX.pic#" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:246 msgid "[.filename]#head/shared/xml/release.ent#" msgstr "[.filename]#head/shared/xml/release.ent#" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:247 msgid "[.filename]#en_US.ISO8859-1/htdocs/releases/*#" msgstr "[.filename]#en_US.ISO8859-1/htdocs/releases/*#" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:248 msgid "[.filename]#en_US.ISO8859-1/htdocs/releng/index.xml#" msgstr "[.filename]#en_US.ISO8859-1/htdocs/releng/index.xml#" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:249 msgid "[.filename]#share/xml/news.xml#" msgstr "[.filename]#share/xml/news.xml#" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:251 msgid "Additionally, update the \"BSD Family Tree\" file:" msgstr "Кроме того, обновите файл \"Генеалогическое древо BSD\":" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:253 msgid "[.filename]#src/shared/misc/bsd-family-tree#" msgstr "[.filename]#src/shared/misc/bsd-family-tree#" #. type: Title ==== #: documentation/content/en/articles/releng/_index.adoc:254 #, no-wrap msgid "Creating the Release Tag" msgstr "Создание тега релиза" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:257 msgid "" "When the final release is ready, the following command will create the " "`release/9.2.0` tag." msgstr "" "Когда финальный выпуск будет готов, следующая команда создаст тег " "`release/9.2.0`." #. type: delimited block . 4 #: documentation/content/en/articles/releng/_index.adoc:261 #, no-wrap msgid "# svn cp $FSVN/releng/9.2 $FSVN/release/9.2.0\n" msgstr "# svn cp $FSVN/releng/9.2 $FSVN/release/9.2.0\n" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:264 msgid "" "The Documentation and Ports managers are responsible for tagging their " "respective trees with the `tags/RELEASE_9_2_0` tag." msgstr "" "Менеджеры документации и портов ответственны за добавление тега `tags/" "RELEASE_9_2_0` в соответствующие деревья." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:267 msgid "" "When the Subversion `svn cp` command is used to create a __release tag__, " "this identifies the source at a specific point in time. By creating tags, " "we ensure that future release builders will always be able to use the same " "source we used to create the official FreeBSD Project releases." msgstr "" "Когда команда Subversion `svn cp` используется для создания __тега релиза " "(release tag)__, это идентифицирует исходный код на определённый момент " "времени. Создавая теги, мы гарантируем, что будущие сборщики релизов всегда " "смогут использовать тот же исходный код, который использовался для создания " "официальных релизов проекта FreeBSD." #. type: Title == #: documentation/content/en/articles/releng/_index.adoc:269 #, no-wrap msgid "Release Building" msgstr "Сборка релиза" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:280 msgid "" "FreeBSD \"releases\" can be built by anyone with a fast machine and access " "to a source repository. (That should be everyone, since we offer Subversion " "access! See the extref:{handbook}[Subversion section in the Handbook, svn] " "for details.) The _only_ special requirement is that the man:md[4] device " "must be available. If the device is not loaded into your kernel, then the " "kernel module should be automatically loaded when man:mdconfig[8] is " "executed during the boot media creation phase. All of the tools necessary " "to build a release are available from the Subversion repository in [." "filename]#src/release#. These tools aim to provide a consistent way to " "build FreeBSD releases. A complete release can actually be built with only " "a single command, including the creation of ISO images suitable for burning " "to CDROM or DVD, and an FTP install directory. man:release[7] fully " "documents the `src/release/generate-release.sh` script which is used to " "build a release. `generate-release.sh` is a wrapper around the Makefile " "target: `make release`." msgstr "" "Сборка \"релизов\" FreeBSD может быть выполнена любым пользователем, имеющим " "быстрый компьютер и доступ к репозиторию исходного кода. (Это должно быть " "доступно каждому, так как мы предоставляем доступ через Subversion! " "Подробности см. в extref:{handbook}[разделе Subversion в Руководстве, svn].) " "_Единственное_ специальное требование — доступность устройства man:md[4]. " "Если устройство не загружено в ваше ядро, то модуль ядра должен " "автоматически загрузиться при выполнении man:mdconfig[8] во время этапа " "создания загрузочного носителя. Все необходимые инструменты для сборки " "релиза доступны в репозитории Subversion в [.filename]#src/release#. Эти " "инструменты предназначены для обеспечения единообразного способа сборки " "релизов FreeBSD. Полный релиз может быть собран всего одной командой, " "включая создание ISO-образов, пригодных для записи на CDROM или DVD, а также " "каталога для установки по FTP. man:release[7] полностью документирует скрипт " "`src/release/generate-release.sh`, который используется для сборки релиза. " "`generate-release.sh` является обёрткой для цели Makefile: `make release`." #. type: Title === #: documentation/content/en/articles/releng/_index.adoc:281 #, no-wrap msgid "Building a Release" msgstr "Сборка релиза" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:285 msgid "" "man:release[7] documents the exact commands required to build a FreeBSD " "release. The following sequences of commands can build an 9.2.0 release:" msgstr "" "man:release[7] документирует точные команды, необходимые для сборки релиза " "FreeBSD. Следующая последовательность команд может собрать релиз 9.2.0:" #. type: delimited block . 4 #: documentation/content/en/articles/releng/_index.adoc:290 #, no-wrap msgid "" "# cd /usr/src/release\n" "# sh generate-release.sh release/9.2.0 /local3/release\n" msgstr "" "# cd /usr/src/release\n" "# sh generate-release.sh release/9.2.0 /local3/release\n" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:293 msgid "" "After running these commands, all prepared release files are available in [." "filename]#/local3/release/R# directory." msgstr "" "После выполнения этих команд все подготовленные файлы релиза будут доступны " "в каталоге [.filename]#/local3/release/R#." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:295 msgid "" "The release [.filename]#Makefile# can be broken down into several distinct " "steps." msgstr "" "Файл [.filename]#Makefile# для выпуска можно разбить на несколько отдельных " "этапов." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:297 msgid "" "Creation of a sanitized system environment in a separate directory hierarchy " "with \"`make installworld`\"." msgstr "" "Создание изолированного окружения системы в отдельной иерархии каталогов с " "помощью \"`make installworld`\"." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:298 msgid "" "Checkout from Subversion of a clean version of the system source, " "documentation, and ports into the release build hierarchy." msgstr "" "Извлечение из Subversion чистой версии исходного кода системы, документации " "и портов в иерархию сборки релиза." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:299 msgid "" "Population of [.filename]#/etc# and [.filename]#/dev# in the chrooted " "environment." msgstr "" "Заполнение каталогов [.filename]#/etc# и [.filename]#/dev# в chroot-" "окружении." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:300 msgid "" "chroot into the release build hierarchy, to make it harder for the outside " "environment to taint this build." msgstr "" "Изменение корневого каталога на верхний каталог иерархии сборки релиза с " "помощью `chroot`, чтобы усложнить влияние внешней среды на эту сборку." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:301 msgid "`make world` in the chrooted environment." msgstr "Запуск `make world` в окружении `chroot`." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:302 msgid "Build of Kerberos-related binaries." msgstr "Сборка связанных с Kerberos бинарных файлов." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:303 msgid "Build [.filename]#GENERIC# kernel." msgstr "Сборка ядра [.filename]#GENERIC#." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:304 msgid "" "Creation of a staging directory tree where the binary distributions will be " "built and packaged." msgstr "" "Создание промежуточной структуры каталогов, в которой будут собираться и " "упаковываться бинарные дистрибутивы." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:305 msgid "" "Build and installation of the documentation toolchain needed to convert the " "documentation source (SGML) into HTML and text documents that will accompany " "the release." msgstr "" "Сборка и установка инструментария для документации, необходимого для " "преобразования исходников документации (SGML) в HTML и текстовые документы, " "которые будут поставляться с релизом." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:306 msgid "" "Build and installation of the actual documentation (user manuals, tutorials, " "release notes, hardware compatibility lists, and so on.)" msgstr "" "Сборка и установка непосредственно документации (руководства пользователя, " "учебные пособия, примечания к выпуску, списки совместимого оборудования и " "так далее)." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:307 msgid "Package up distribution tarballs of the binaries and sources." msgstr "" "Создание распространяемых tar-архивов с бинарными файлами и исходными кодами." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:308 msgid "Create FTP installation hierarchy." msgstr "Создание иерархии установки FTP." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:309 msgid "_(optionally)_ Create ISO images for CDROM/DVD media." msgstr "_(необязательно)_ Создание ISO-образов для носителей CDROM/DVD." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:311 msgid "" "For more information about the release build infrastructure, please see man:" "release[7]." msgstr "" "Для получения дополнительной информации о инфраструктуре сборки релизов, " "обратитесь к man:release[7]." #. type: delimited block = 4 #: documentation/content/en/articles/releng/_index.adoc:316 msgid "" "It is important to remove any site-specific settings from [.filename]#/etc/" "make.conf#. For example, it would be unwise to distribute binaries that " "were built on a system with `CPUTYPE` set to a specific processor." msgstr "" "Важно удалить все специфичные для сайта настройки из [.filename]#/etc/make." "conf#. Например, было бы неразумно распространять бинарные файлы, собранные " "на системе с установленным `CPUTYPE` для конкретного процессора." #. type: Title === #: documentation/content/en/articles/releng/_index.adoc:318 #, no-wrap msgid "Contributed Software (\"ports\")" msgstr "Предоставленное программное обеспечение (\"порты\")" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:322 msgid "" "The https://ports.FreeBSD.org[FreeBSD Ports collection] is a collection of " "over {numports} third-party software packages available for FreeBSD. The " "`{portmgr}` is responsible for maintaining a consistent ports tree that can " "be used to create the binary packages that accompany official FreeBSD " "releases." msgstr "" "https://ports.FreeBSD.org[Коллекция портов FreeBSD] представляет собой набор " "из более чем {numports} сторонних программных пакетов, доступных для " "FreeBSD. `{portmgr}` отвечает за поддержание согласованного дерева портов, " "которое может быть использовано для создания бинарных пакетов, поставляемых " "с официальными выпусками FreeBSD." #. type: Title === #: documentation/content/en/articles/releng/_index.adoc:323 #, no-wrap msgid "Release ISOs" msgstr "Релизные ISO-образы" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:328 msgid "" "Starting with FreeBSD 4.4, the FreeBSD Project decided to release all four " "ISO images that were previously sold on the _BSDi/Wind River Systems/FreeBSD " "Mall_ \"official\" CDROM distributions. Each of the four discs must contain " "a [.filename]#README.TXT# file that explains the contents of the disc, a [." "filename]#CDROM.INF# file that provides meta-data for the disc so that man:" "bsdinstall[8] can validate and use the contents, and a [.filename]#filename." "txt# file that provides a manifest for the disc. This _manifest_ can be " "created with a simple command:" msgstr "" "Начиная с FreeBSD 4.4, проект FreeBSD решил выпустить все четыре образа ISO, " "которые ранее продавались на «официальных» дистрибутивах CDROM от _BSDi/Wind " "River Systems/FreeBSD Mall_. Каждый из четырёх дисков должен содержать файл " "[.filename]#README.TXT#, объясняющий содержимое диска, файл [." "filename]#CDROM.INF#, предоставляющий метаданные для диска, чтобы man:" "bsdinstall[8] мог проверить и использовать содержимое, и файл [." "filename]#filename.txt#, содержащий манифест диска. Этот _манифест_ можно " "создать простой командой:" #. type: delimited block . 4 #: documentation/content/en/articles/releng/_index.adoc:332 #, no-wrap msgid "/stage/cdrom# find . -type f | sed -e 's/^\\.\\///' | sort > filename.txt\n" msgstr "/stage/cdrom# find . -type f | sed -e 's/^\\.\\///' | sort > filename.txt\n" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:335 msgid "The specific requirements of each CD are outlined below." msgstr "Конкретные требования для каждого CD приведены ниже." #. type: Title ==== #: documentation/content/en/articles/releng/_index.adoc:336 #, no-wrap msgid "Disc 1" msgstr "Диск 1" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:342 msgid "" "The first disc is almost completely created by `make release`. The only " "changes that should be made to the [.filename]#disc1# directory are the " "addition of a [.filename]#tools# directory, and as many popular third party " "software packages as will fit on the disc. The [.filename]#tools# directory " "contains software that allow users to create installation floppies from " "other operating systems. This disc should be made bootable so that users of " "modern PCs do not need to create installation floppy disks." msgstr "" "Первый диск почти полностью создаётся командой `make release`. Единственные " "изменения, которые следует внести в каталог [.filename]#disc1#, — это " "добавление каталога [.filename]#tools# и как можно большего количества " "популярных сторонних программных пакетов, которые поместятся на диск. В " "каталоге [.filename]#tools# содержится программное обеспечение, позволяющее " "пользователям создавать установочные дискеты из других операционных систем. " "Этот диск должен быть загрузочным, чтобы пользователям современных ПК не " "требовалось создавать установочные дискеты." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:347 msgid "" "If a custom kernel of FreeBSD is to be included, then man:bsdinstall[8] and " "man:release[7] must be updated to include installation instructions. The " "relevant code is contained in [.filename]#src/release# and [.filename]#src/" "usr.sbin/bsdinstall#. Specifically, the file [.filename]#src/release/" "Makefile#, and [.filename]#dist.c#, [.filename]#dist.h#, [.filename]#menus." "c#, [.filename]#install.c#, and [.filename]#Makefile# will need to be " "updated under [.filename]#src/usr.sbin/bsdinstall#. Optionally, you may " "choose to update [.filename]#bsdinstall.8#." msgstr "" "Если требуется включить пользовательское ядро FreeBSD, необходимо обновить " "man:bsdinstall[8] и man:release[7], чтобы включить инструкции по установке. " "Соответствующий код содержится в [.filename]#src/release# и [.filename]#src/" "usr.sbin/bsdinstall#. В частности, потребуется обновить файл [.filename]#src/" "release/Makefile#, а также [.filename]#dist.c#, [.filename]#dist.h#, [." "filename]#menus.c#, [.filename]#install.c# и [.filename]#Makefile# в " "каталоге [.filename]#src/usr.sbin/bsdinstall#. При желании можно также " "обновить [.filename]#bsdinstall.8#." #. type: Title ==== #: documentation/content/en/articles/releng/_index.adoc:348 #, no-wrap msgid "Disc 2" msgstr "Диск 2" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:353 msgid "" "The second disc is also largely created by `make release`. This disc " "contains a \"live filesystem\" that can be used from man:bsdinstall[8] to " "troubleshoot a FreeBSD installation. This disc should be bootable and " "should also contain a compressed copy of the CVS repository in the [." "filename]#CVSROOT# directory and commercial software demos in the [." "filename]#commerce# directory." msgstr "" "Второй диск также в основном создаётся командой `make release`. Этот диск " "содержит «живую файловую систему», которая может использоваться через " "man:bsdinstall[8] для диагностики установки FreeBSD. Этот диск должен быть " "загрузочным и также содержать сжатую копию репозитория CVS в каталоге [." "filename]#CVSROOT# и демонстрационные версии коммерческого ПО в каталоге [." "filename]#commerce#." #. type: Title ==== #: documentation/content/en/articles/releng/_index.adoc:354 #, no-wrap msgid "Multi-volume Support" msgstr "Поддержка нескольких томов" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:360 msgid "" "Sysinstall supports multiple volume package installations. This requires " "that each disc have an [.filename]#INDEX# file containing all of the " "packages on all volumes of a set, along with an extra field that indicates " "which volume that particular package is on. Each volume in the set must " "also have the `CD_VOLUME` variable set in the [.filename]#cdrom.inf# file so " "that bsdinstall can tell which volume is which. When a user attempts to " "install a package that is not on the current disc, bsdinstall will prompt " "the user to insert the appropriate one." msgstr "" "Sysinstall поддерживает установку пакетов с нескольких томов. Для этого " "каждый диск должен содержать файл [.filename]#INDEX#, в котором перечислены " "все пакеты на всех томах набора, а также дополнительное поле, указывающее, " "на каком именно томе находится конкретный пакет. Каждый том в наборе также " "должен иметь установленную переменную `CD_VOLUME` в файле [.filename]#cdrom." "inf#, чтобы bsdinstall мог определить, какой том является каким. Когда " "пользователь пытается установить пакет, которого нет на текущем диске, " "bsdinstall предложит ему вставить соответствующий диск." #. type: Title == #: documentation/content/en/articles/releng/_index.adoc:362 #, no-wrap msgid "Distribution" msgstr "Распространение" #. type: Title === #: documentation/content/en/articles/releng/_index.adoc:365 #, no-wrap msgid "FTP Sites" msgstr "Сайты FTP" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:371 msgid "" "When the release has been thoroughly tested and packaged for distribution, " "the master FTP site must be updated. The official FreeBSD public FTP sites " "are all mirrors of a master server that is open only to other FTP sites. " "This site is known as `ftp-master`. When the release is ready, the " "following files must be modified on `ftp-master`:" msgstr "" "Когда выпуск тщательно протестирован и упакован для распространения, " "необходимо обновить главный FTP-сайт. Официальные публичные FTP-сайты " "FreeBSD являются зеркалами главного сервера, который доступен только другим " "FTP-сайтам. Этот сервер известен как `ftp-master`. Когда выпуск готов, " "следующие файлы должны быть изменены на `ftp-master`:" #. type: Labeled list #: documentation/content/en/articles/releng/_index.adoc:372 #, no-wrap msgid "[.filename]#/pub/FreeBSD/releases/arch/X.Y-RELEASE/#" msgstr "[.filename]#/pub/FreeBSD/releases/arch/X.Y-RELEASE/#" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:374 msgid "The installable FTP directory as output from `make release`." msgstr "" "Устанавливаемый каталог FTP, полученный в результате выполнения `make " "release`." #. type: Labeled list #: documentation/content/en/articles/releng/_index.adoc:375 #, no-wrap msgid "[.filename]#/pub/FreeBSD/ports/arch/packages-X.Y-release/#" msgstr "[.filename]#/pub/FreeBSD/ports/arch/packages-X.Y-release/#" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:377 msgid "The complete package build for this release." msgstr "Полная сборка пакетов для этого выпуска." #. type: Labeled list #: documentation/content/en/articles/releng/_index.adoc:378 #, no-wrap msgid "[.filename]#/pub/FreeBSD/releases/arch/X.Y-RELEASE/tools#" msgstr "[.filename]#/pub/FreeBSD/releases/arch/X.Y-RELEASE/tools#" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:380 msgid "A symlink to [.filename]#../../../tools#." msgstr "Символическая ссылка на [.filename]#../../../tools#." #. type: Labeled list #: documentation/content/en/articles/releng/_index.adoc:381 #, no-wrap msgid "[.filename]#/pub/FreeBSD/releases/arch/X.Y-RELEASE/packages#" msgstr "[.filename]#/pub/FreeBSD/releases/arch/X.Y-RELEASE/packages#" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:383 msgid "A symlink to [.filename]#../../../ports/arch/packages-X.Y-release#." msgstr "" "Символическая ссылка на [.filename]#../../../ports/arch/packages-X.Y-" "release#." #. type: Labeled list #: documentation/content/en/articles/releng/_index.adoc:384 #, no-wrap msgid "[.filename]#/pub/FreeBSD/releases/arch/ISO-IMAGES/X.Y/X.Y-RELEASE-arch-*.iso#" msgstr "[.filename]#/pub/FreeBSD/releases/arch/ISO-IMAGES/X.Y/X.Y-RELEASE-arch-*.iso#" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:387 msgid "" "The ISO images. The \"*\" is [.filename]#disc1#, [.filename]#disc2#, etc. " "Only if there is a [.filename]#disc1# and there is an alternative first " "installation CD (for example a stripped-down install with no windowing " "system) there may be a [.filename]#mini# as well." msgstr "" "Образы ISO. Символ \"*\" обозначает [.filename]#disc1#, [.filename]#disc2# и " "так далее. Только если существует [.filename]#disc1# и есть альтернативный " "первый установочный CD (например, упрощённая установка без графической " "оболочки), может также присутствовать [.filename]#mini#." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:389 msgid "" "For more information about the distribution mirror architecture of the " "FreeBSD FTP sites, please see the extref:{hubs}[Mirroring FreeBSD] article." msgstr "" "Для получения дополнительной информации об архитектуре зеркал " "распространения FTP-сайтов FreeBSD, пожалуйста, ознакомьтесь со статьей " "extref:{hubs}[Поддержка зеркал FreeBSD]." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:397 msgid "" "It may take many hours to two days after updating `ftp-master` before a " "majority of the Tier-1 FTP sites have the new software depending on whether " "or not a package set got loaded at the same time. It is imperative that the " "release engineers coordinate with the {mirror-announce} before announcing " "the general availability of new software on the FTP sites. Ideally the " "release package set should be loaded at least four days prior to release " "day. The release bits should be loaded between 24 and 48 hours before the " "planned release time with \"other\" file permissions turned off. This will " "allow the mirror sites to download it but the general public will not be " "able to download it from the mirror sites. Mail should be sent to {mirror-" "announce} at the time the release bits get posted saying the release has " "been staged and giving the time that the mirror sites should begin allowing " "access. Be sure to include a time zone with the time, for example make it " "relative to GMT." msgstr "" "Может потребоваться от нескольких часов до двух дней после обновления `ftp-" "master`, прежде чем большинство FTP-сайтов Tier-1 получат новое программное " "обеспечение, в зависимости от того, был ли загружен набор пакетов " "одновременно. Крайне важно, чтобы инженеры по выпуску скоординировались с " "{mirror-announce} перед объявлением общей доступности нового программного " "обеспечения на FTP-сайтах. В идеале набор пакетов для выпуска должен быть " "загружен как минимум за четыре дня до дня выпуска. Выпускные файлы должны " "быть загружены за 24–48 часов до запланированного времени выпуска с " "отключёнными разрешениями для \"других\" пользователей. Это позволит " "зеркальным сайтам загрузить их, но широкая публика не сможет скачать их с " "зеркальных сайтов. Письмо должно быть отправлено в {mirror-announce} в " "момент публикации выпускных файлов, уведомляя о том, что выпуск подготовлен, " "и указывая время, когда зеркальные сайты должны начать разрешать доступ. " "Обязательно укажите часовой пояс для указанного времени, например, " "относительно GMT." #. type: Title === #: documentation/content/en/articles/releng/_index.adoc:399 #, no-wrap msgid "CD-ROM Replication" msgstr "Репликация CD-ROM" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:402 msgid "" "Coming soon: Tips for sending FreeBSD ISOs to a replicator and quality " "assurance measures to be taken." msgstr "" "Скоро: Советы по отправке ISO-образов FreeBSD репликатору и меры по " "обеспечению качества." #. type: Title == #: documentation/content/en/articles/releng/_index.adoc:404 #, no-wrap msgid "Extensibility" msgstr "Расширяемость" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:411 msgid "" "Although FreeBSD forms a complete operating system, there is nothing that " "forces you to use the system exactly as we have packaged it up for " "distribution. We have tried to design the system to be as extensible as " "possible so that it can serve as a platform that other commercial products " "can be built on top of. The only \"rule\" we have about this is that if you " "are going to distribute FreeBSD with non-trivial changes, we encourage you " "to document your enhancements! The FreeBSD community can only help support " "users of the software we provide. We certainly encourage innovation in the " "form of advanced installation and administration tools, for example, but we " "cannot be expected to answer questions about it." msgstr "" "Хотя FreeBSD представляет собой законченную операционную систему, ничто не " "обязывает вас использовать её именно в том виде, в каком мы упаковали её для " "распространения. Мы постарались разработать систему максимально расширяемой, " "чтобы она могла служить платформой для создания других коммерческих " "продуктов. Единственное «правило», которое у нас есть на этот счёт, — если " "вы собираетесь распространять FreeBSD с существенными изменениями, мы " "рекомендуем документировать ваши улучшения! Сообщество FreeBSD может " "оказывать поддержку только пользователям того программного обеспечения, " "которое мы предоставляем. Мы, безусловно, приветствуем инновации, такие как " "продвинутые инструменты установки и администрирования, но не можем отвечать " "на вопросы о них." #. type: Title === #: documentation/content/en/articles/releng/_index.adoc:412 #, no-wrap msgid "Scripting `bsdinstall`" msgstr "Скриптинг `bsdinstall`" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:416 msgid "" "The FreeBSD system installation and configuration tool, man:bsdinstall[8], " "can be scripted to provide automated installs for large sites. This " "functionality can be used in conjunction with Intel(R) PXE footnote:[extref:" "{handbook}advanced-networking[Diskless Operation with PXE, network-" "diskless]] to bootstrap systems from the network." msgstr "" "Инструмент установки и настройки системы FreeBSD, man:bsdinstall[8], может " "быть настроен для автоматизированной установки на крупных площадках. Эта " "функциональность может использоваться совместно с Intel(R) PXE " "footnote:[extref:{handbook}advanced-networking[Запуск системы по сети (PXE) " "без использования локальных накопителей, network-diskless]] для загрузки " "систем по сети." #. type: Title == #: documentation/content/en/articles/releng/_index.adoc:418 #, no-wrap msgid "Lessons Learned from FreeBSD 4.4" msgstr "Уроки, извлеченные из FreeBSD 4.4" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:425 msgid "" "The release engineering process for 4.4 formally began on August 1st, 2001. " "After that date all commits to the `RELENG_4` branch of FreeBSD had to be " "explicitly approved by the `{re}`. The first release candidate for the x86 " "architecture was released on August 16, followed by 4 more release " "candidates leading up to the final release on September 18th. The security " "officer was very involved in the last week of the process as several " "security issues were found in the earlier release candidates. A total of " "over _500_ emails were sent to the `{re}` in little over a month." msgstr "" "Процесс разработки релиза 4.4 официально начался 1 августа 2001 года. После " "этой даты все коммиты в ветку `RELENG_4` FreeBSD должны были быть явно " "одобрены `{re}`. Первый релиз-кандидат для архитектуры x86 был выпущен 16 " "августа, за ним последовали ещё 4 релиз-кандидата, что привело к финальному " "релизу 18 сентября. Сотрудник по безопасности был очень вовлечён в последнюю " "неделю процесса, так как несколько проблем безопасности было обнаружено в " "ранних релиз-кандидатах. Всего за чуть более месяца было отправлено более " "_500_ писем `{re}`." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:429 msgid "" "Our user community has made it very clear that the security and stability of " "a FreeBSD release should not be sacrificed for any self-imposed deadlines or " "target release dates. The FreeBSD Project has grown tremendously over its " "lifetime and the need for standardized release engineering procedures has " "never been more apparent. This will become even more important as FreeBSD " "is ported to new platforms." msgstr "" "Наше сообщество пользователей ясно дало понять, что безопасность и " "стабильность выпуска FreeBSD не должны приноситься в жертву из-за " "самостоятельно установленных сроков или целевых дат выпуска. Проект FreeBSD " "значительно вырос за время своего существования, и необходимость " "стандартизированных процедур управления выпусками никогда не была столь " "очевидной. Это станет ещё более важным по мере переноса FreeBSD на новые " "платформы." #. type: Title == #: documentation/content/en/articles/releng/_index.adoc:431 #, no-wrap msgid "Future Directions" msgstr "Перспективы развития" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:435 msgid "" "It is imperative for our release engineering activities to scale with our " "growing userbase. Along these lines we are working very hard to document " "the procedures involved in producing FreeBSD releases." msgstr "" "Для обеспечения масштабирования наших процессов релиз-инжиниринга с растущей " "пользовательской базой мы прилагаем значительные усилия по документированию " "процедур, связанных с созданием выпусков FreeBSD." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:437 msgid "" "_Parallelism_ - Certain portions of the release build are actually " "\"embarrassingly parallel\". Most of the tasks are very I/O intensive, so " "having multiple high-speed disk drives is actually more important than using " "multiple processors in speeding up the `make release` process. If multiple " "disks are used for different hierarchies in the man:chroot[2] environment, " "then the CVS checkout of the [.filename]#ports# and [.filename]#doc# trees " "can be happening simultaneously as the `make world` on another disk. Using a " "RAID solution (hardware or software) can significantly decrease the overall " "build time." msgstr "" "_Параллелизм_ — Некоторые этапы сборки релиза действительно \"тривиально " "параллельны\". Большинство задач очень интенсивно используют ввод-вывод, " "поэтому наличие нескольких высокоскоростных дисков важнее, чем использование " "нескольких процессоров для ускорения процесса `make release`. Если в среде " "man:chroot[2] разные иерархии размещены на разных дисках, то выгрузка CVS " "для деревьев [.filename]#ports# и [.filename]#doc# может происходить " "одновременно с выполнением `make world` на другом диске. Использование RAID " "(аппаратного или программного) может значительно сократить общее время " "сборки." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:438 msgid "" "_Cross-building releases_ - Building IA-64 or Alpha release on x86 hardware? " "`make TARGET=ia64 release`." msgstr "" "_Кросс-сборка релизов_ - Сборка релиза для IA-64 или Alpha на x86 " "оборудовании? `make TARGET=ia64 release`." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:439 msgid "" "_Regression Testing_ - We need better automated correctness testing for " "FreeBSD." msgstr "" "_Регрессионное тестирование_ - Нам необходимы более совершенные " "автоматизированные тесты на корректность для FreeBSD." #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:440 msgid "" "_Installation Tools_ - Our installation program has long since outlived its " "intended life span. Several projects are under development to provide a more " "advanced installation mechanism. The libh project was one such project that " "aimed to provide an intelligent new package framework and GUI installation " "program." msgstr "" "_Инструменты установки_ - Наша программа установки уже давно вышла за рамки " "своего первоначального срока службы. В разработке находится несколько " "проектов, призванных обеспечить более продвинутый механизм установки. Проект " "libh был одним из таких проектов, целью которого было создание " "интеллектуальной новой системы управления пакетами и программы установки с " "графическим интерфейсом." #. type: Title == #: documentation/content/en/articles/releng/_index.adoc:442 #, no-wrap msgid "Acknowledgements" msgstr "Благодарности" #. type: Plain text #: documentation/content/en/articles/releng/_index.adoc:447 msgid "" "I would like to thank Jordan Hubbard for giving me the opportunity to take " "on some of the release engineering responsibilities for FreeBSD 4.4 and also " "for all of his work throughout the years making FreeBSD what it is today. " "Of course the release would not have been possible without all of the " "release-related work done by `{asami}`, `{steve}`, `{bmah}`, `{nik}`, " "`{obrien}`, `{kris}`, `{jhb}` and the rest of the FreeBSD development " "community. I would also like to thank `{rgrimes}`, `{phk}`, and others who " "worked on the release engineering tools in the very early days of FreeBSD. " "This article was influenced by release engineering documents from the CSRG " "footnote:[Marshall Kirk McKusick, Michael J. Karels, and Keith Bostic: link:" "http://docs.FreeBSD.org/44doc/papers/releng.html[The Release Engineering of " "4.3BSD]] , the NetBSD Project, footnote:[NetBSD Developer Documentation: " "Release Engineering http://www.NetBSD.org/developers/releng/index.html] , " "and John Baldwin's proposed release engineering process notes. footnote:" "[John Baldwin's FreeBSD Release Engineering Proposal https://people.FreeBSD." "org/~jhb/docs/releng.txt]" msgstr "" "Я хотел бы поблагодарить Джордана Хаббарда за предоставленную мне " "возможность взять на себя часть обязанностей по управлению выпусками для " "FreeBSD 4.4, а также за всю его работу на протяжении многих лет, которая " "сделала FreeBSD такой, какая она есть сегодня. Конечно, выпуск не состоялся " "бы без всей работы, связанной с выпуском, выполненной `{asami}`, `{steve}`, " "`{bmah}`, `{nik}`, `{obrien}`, `{kris}`, `{jhb}` и остальным сообществом " "разработчиков FreeBSD. Я также хотел бы поблагодарить `{rgrimes}`, `{phk}` и " "других, кто работал над инструментами управления выпусками в самые ранние " "дни FreeBSD. На эту статью повлияли документы по управлению выпусками от " "CSRG footnote:[Маршалл Кирк МакКузик, Майкл Дж. Карелс и Кит Бостик: link:" "http://docs.FreeBSD.org/44doc/papers/releng.html[Управление выпусками " "4.3BSD]], проекта NetBSD footnote:[Документация разработчика NetBSD: " "Управление выпусками http://www.NetBSD.org/developers/releng/index.html] и " "заметки Джона Болдуина с предложениями по процессу управления выпусками. " "footnote:[Предложение Джона Болдуина по управлению выпусками FreeBSD https://" "people.FreeBSD.org/~jhb/docs/releng.txt]" diff --git a/documentation/content/ru/articles/remote-install/_index.adoc b/documentation/content/ru/articles/remote-install/_index.adoc index 1a12913726..ee38155597 100644 --- a/documentation/content/ru/articles/remote-install/_index.adoc +++ b/documentation/content/ru/articles/remote-install/_index.adoc @@ -1,347 +1,347 @@ --- authors: - author: 'Daniel Gerzo' email: danger@FreeBSD.org copyright: '2008-2021 The FreeBSD Documentation Project' description: 'Описывает удалённую установку операционной системы FreeBSD, когда консоль удалённой системы недоступна' tags: ["Remote", "Installation", "FreeBSD"] title: 'Удалённая установка операционной системы FreeBSD без удалённой консоли' trademarks: ["freebsd", "general"] --- = Удалённая установка операционной системы FreeBSD без удалённой консоли :doctype: article :toc: macro :toclevels: 1 :icons: font :sectnums: :sectnumlevels: 6 :source-highlighter: rouge :experimental: :images-path: articles/remote-install/ ifdef::env-beastie[] ifdef::backend-html5[] include::shared/authors.adoc[] include::shared/mirrors.adoc[] include::shared/releases.adoc[] include::shared/attributes/attributes-{{% lang %}}.adoc[] include::shared/{{% lang %}}/teams.adoc[] include::shared/{{% lang %}}/mailing-lists.adoc[] include::shared/{{% lang %}}/urls.adoc[] :imagesdir: ../../../images/{images-path} endif::[] ifdef::backend-pdf,backend-epub3[] include::../../../../shared/asciidoctor.adoc[] endif::[] endif::[] ifndef::env-beastie[] include::../../../../../shared/asciidoctor.adoc[] endif::[] [.abstract-title] Аннотация В этой статье описывается удалённая установка операционной системы FreeBSD, когда консоль удалённой системы недоступна. Основная идея этой статьи является результатом сотрудничества с `{mm}` при ценных вкладах от `{pjd}`. ''' toc::[] [[background]] == Пояснения В мире существует множество хостинг-провайдеров, но лишь немногие из них официально поддерживают FreeBSD. Обычно они предоставляют поддержку для дистрибутивов Linux(R), которые можно установить на предлагаемые серверы. В некоторых случаях эти компании могут установить предпочитаемый вами дистрибутив Linux(R) по вашему запросу. Используя эту опцию, мы попытаемся установить FreeBSD. В других случаях они могут предложить систему восстановления, которая используется в чрезвычайных ситуациях. Её также можно использовать для наших целей. В этой статье описаны основные шаги установки и настройки, необходимые для удалённой установки FreeBSD с поддержкой RAID-1 и ZFS. [[intro]] == Введение В этом разделе будет коротко расскажем о цели данной статьи и будет дано более подробное объяснение того, что в ней рассматривается. Инструкции, приведённые в статье, будут полезны тем, кто использует услуги колокационных центров, не поддерживающих FreeBSD. [.procedure] ==== . Как мы упоминали в разделе crossref:remote-install[background, Предыстория], многие авторитетные компании, предоставляющие хостинг серверов, предлагают своего рода систему восстановления, которая загружается из их локальной сети и доступна через SSH. Обычно они предоставляют эту возможность, чтобы помочь клиентам восстановить повреждённые операционные системы. Как будет объяснено в этой статье, с помощью таких систем восстановления можно установить FreeBSD. + . Следующий раздел этой статьи описывает, как настроить и собрать минималистичную FreeBSD на локальной машине. Эта версия в конечном итоге будет запущена на удаленной машине с ramdisk, что позволит нам установить полную операционную систему FreeBSD с FTP-зеркала с помощью утилиты sysinstall. . Оставшаяся часть статьи описывает процедуру установки, а также настройку файловой системы ZFS. ==== [[requirements]] === Требования Для успешного продолжения необходимо: * Иметь операционную систему с доступом по сети и доступом по SSH * Понимать процесса установки FreeBSD * Быть знакомым с утилитой man:sysinstall[8] * Иметь под рукой установочный образ SO или CD с FreeBSD [[preparation]] == Подготовка - mfsBSD Прежде чем FreeBSD может быть установлена на целевую систему, необходимо собрать минимальный образ операционной системы FreeBSD, который будет загружаться с жёсткого диска. Таким образом, новая система будет доступна из сети, а остальная часть установки может быть выполнена без удалённого доступа к консоли системы. Набор инструментов mfsBSD можно использовать для создания компактного образа FreeBSD. Как следует из названия mfsBSD («mfs» означает «файловая система в памяти»), итоговый образ полностью запускается с RAM-диска. Благодаря этой особенности не будет ограничений на работу с жёсткими дисками, что позволит установить полноценную операционную систему FreeBSD. На http://mfsbsd.vx.sk/[домашней странице] mfsBSD есть ссылки на последнюю версию набора инструментов. Обратите внимание, что внутреннее устройство mfsBSD и принципы его работы выходят за рамки данной статьи. Заинтересованным читателям следует обратиться к оригинальной документации mfsBSD для получения более подробной информации. Скачайте и распакуйте последний выпуск mfsBSD и перейдите в рабочий каталог, где будут находиться скрипты mfsBSD: [source, shell] .... # fetch http://mfsbsd.vx.sk/release/mfsbsd-2.1.tar.gz # tar xvzf mfsbsd-2.1.tar.gz # cd mfsbsd-2.1/ .... [[mfsbsd-config]] === Конфигурация mfsBSD Прежде чем загрузить mfsBSD, необходимо установить несколько важных параметров конфигурации. Самое важное, что нужно правильно настроить, — это, естественно, сеть. Наиболее подходящий метод настройки параметров сети зависит от того, знаем ли мы заранее тип используемого сетевого интерфейса и драйвер сетевого интерфейса, который нужно загрузить для нашего оборудования. Мы рассмотрим, как можно настроить mfsBSD в обоих случаях. Еще одна важная настройка — установка пароля `root`. Это можно сделать, отредактировав файл [.filename]#conf/loader.conf#. Пожалуйста, ознакомьтесь с приложенными комментариями. ==== Метод [.filename]#conf/interfaces.conf# Если установленная сетевая карта неизвестна, можно использовать функцию автоматического определения в mfsBSD. Скрипты запуска mfsBSD могут определить правильный драйвер для использования на основе MAC-адреса интерфейса, если установить следующие параметры в [.filename]#conf/interfaces.conf#: [.programlisting] .... mac_interfaces="ext1" ifconfig_ext1_mac="00:00:00:00:00:00" ifconfig_ext1="inet 192.168.0.2/24" .... Не забудьте добавить информацию о `defaultrouter` в [.filename]#conf/rc.conf#: [.programlisting] .... defaultrouter="192.168.0.1" .... ==== Метод [.filename]#conf/rc.conf# Когда драйвер сетевого интерфейса известен, удобнее использовать [.filename]#conf/rc.conf# для настройки сети. Синтаксис этого файла такой же, как в стандартном файле man:rc.conf[5] FreeBSD. Например, если известно, что сетевой интерфейс man:re[4] будет доступен, можно задать следующие параметры в [.filename]#conf/rc.conf#: [.programlisting] .... defaultrouter="192.168.0.1" ifconfig_re0="inet 192.168.0.2/24" .... [[mfsbsd-build]] === Создание образа mfsBSD Процесс создания образа mfsBSD довольно прост. Первым шагом необходимо подключить установочный CD FreeBSD или образ ISO установки к [.filename]#/cdrom#. В качестве примера в этой статье мы будем предполагать, что вы загрузили образ ISO FreeBSD 10.1-RELEASE. Подключение этого образа ISO к каталогу [.filename]#/cdrom# легко выполняется с помощью утилиты man:mdconfig[8]: [source, shell] .... # mdconfig -a -t vnode -u 10 -f FreeBSD-10.1-RELEASE-amd64-disc1.iso # mount_cd9660 /dev/md10 /cdrom .... Поскольку последние выпуски FreeBSD не содержат обычных наборов дистрибутивов, необходимо извлечь файлы дистрибутива FreeBSD из архивов дистрибутива, расположенных на образе ISO: [source, shell] .... # mkdir DIST # tar -xvf /cdrom/usr/freebsd-dist/base.txz -C DIST # tar -xvf /cdrom/usr/freebsd-dist/kernel.txz -C DIST .... Далее соберите загружаемый образ mfsBSD: [source, shell] .... # make BASE=DIST .... [NOTE] ==== Указанную команду `make` необходимо выполнять из корневого уровня дерева каталогов mfsBSD, например, [.filename]#~/mfsbsd-2.1/#. ==== === Загрузка mfsBSD Теперь, когда образ mfsBSD готов, его необходимо загрузить на удалённую систему, работающую под управлением live-системы восстановления или предустановленного дистрибутива Linux(R). Наиболее подходящий инструмент для этой задачи — scp: [source, shell] .... # scp disk.img root@192.168.0.2:. .... Для правильной загрузки образа mfsBSD он должен быть размещен на первом (загрузочном) устройстве данной машины. Это может быть выполнено с помощью следующего примера, при условии что [.filename]#sda# является первым загрузочным дисковым устройством: [source, shell] .... # dd if=/root/disk.img of=/dev/sda bs=1m .... Если всё прошло успешно, образ теперь должен находиться в MBR первого устройства, и машину можно перезагрузить. Следите за корректной загрузкой системы с помощью инструмента man:ping[8]. Как только машина снова окажется в сети, к ней можно будет подключиться через man:ssh[1] под пользователем `root` с настроенным паролем. [[installation]] == Установка операционной системы FreeBSD Система mfsBSD успешно загружена, и теперь можно войти через man:ssh[1]. В этом разделе будет описано, как создавать и размечать разделы, настраивать `gmirror` для RAID-1, а также как использовать `sysinstall` для установки минимальной дистрибуции операционной системы FreeBSD. -=== Подготовка жестких дисков +=== Подготовка жёстких дисков Первая задача — выделить дисковое пространство для FreeBSD, т.е.: создать слайсы и разделы. Очевидно, что текущая работающая система полностью загружена в оперативную память, поэтому не будет проблем с манипуляциями жёсткими дисками. Для выполнения этой задачи можно использовать либо `sysinstall`, либо man:fdisk[8] в сочетании с man:bsdlabel[8]. В начале пометьте все системные диски как пустые. Повторите следующую команду для каждого жёсткого диска: [source, shell] .... # dd if=/dev/zero of=/dev/ad0 count=2 .... Далее создайте разделы и пометьте их с помощью предпочитаемого инструмента. Хотя использование `sysinstall` считается более простым, но мощным и, вероятно, менее подверженным ошибкам методом будет использование стандартных текстовых инструментов UNIX(R), таких как man:fdisk[8] и man:bsdlabel[8], которые также будут рассмотрены в этом разделе. Первый вариант хорошо документирован в главе extref:{handbook}install[Установка FreeBSD, install-steps] Руководства FreeBSD. Как упоминалось во введении, в этой статье будет показано, как настроить систему с возможностями RAID-1 и ZFS. Наша конфигурация будет состоять из небольшого зеркального раздела man:gmirror[8] для [.filename]#/# (корневого), [.filename]#/usr# и [.filename]#/var#, а остальное место на диске будет выделено для зеркальной файловой системы ZFS man:zpool[8]. Обратите внимание, что файловая система ZFS будет настроена после успешной установки и загрузки операционной системы FreeBSD. Следующий пример описывает, как создать слайсы и метки, инициализировать man:gmirror[8] на каждом разделе и как создать файловую систему UFS2 в каждом зеркальном разделе: [source, shell] .... # fdisk -BI /dev/ad0 <.> # fdisk -BI /dev/ad1 # bsdlabel -wB /dev/ad0s1 <.> # bsdlabel -wB /dev/ad1s1 # bsdlabel -e /dev/ad0s1 <.> # bsdlabel /dev/ad0s1 > /tmp/bsdlabel.txt && bsdlabel -R /dev/ad1s1 /tmp/bsdlabel.txt <.> # gmirror label root /dev/ad[01]s1a <.> # gmirror label var /dev/ad[01]s1d # gmirror label usr /dev/ad[01]s1e # gmirror label -F swap /dev/ad[01]s1b <.> # newfs /dev/mirror/root <.> # newfs /dev/mirror/var # newfs /dev/mirror/usr .... -<.> Создайте раздел, охватывающий весь диск, и инициализируйте загрузочный код, содержащийся в секторе 0 данного диска. Повторите эту команду для всех жестких дисков в системе. +<.> Создайте раздел, охватывающий весь диск, и инициализируйте загрузочный код, содержащийся в секторе 0 данного диска. Повторите эту команду для всех жёстких дисков в системе. <.> Запишите стандартную метку для каждого диска, включая загрузочный код. <.> Теперь вручную отредактируйте метку указанного диска. Обратитесь к странице руководства man:bsdlabel[8], чтобы узнать, как создавать разделы. Создайте раздел `a` для [.filename]#/# — корневой файловой системы, `b` для раздела подкачки, `d` для [.filename]#/var#, `e` для [.filename]#/usr# и, наконец, `f`, который позже будет использоваться для ZFS. -<.> Импортируйте только что созданную метку для второго жесткого диска, чтобы оба жестких диска были размечены одинаковым образом. +<.> Импортируйте только что созданную метку для второго жёсткого диска, чтобы оба жёстких диска были размечены одинаковым образом. <.> Инициализируйте man:gmirror[8] на каждом разделе. <.> Обратите внимание, что `-F` используется для раздела подкачки. Это указывает man:gmirror[8] предполагать, что устройство находится в согласованном состоянии после сбоя питания/системы. <.> Создайте файловую систему UFS2 на каждом зеркальном разделе. === Установка системы Это самая важная часть. В этом разделе будет описано, как фактически установить минимальный дистрибутив FreeBSD на жёсткие диски, которые мы подготовили в предыдущем разделе. Для достижения этой цели необходимо смонтировать все файловые системы, чтобы `sysinstall` мог записать содержимое FreeBSD на жёсткие диски: [source, shell] .... # mount /dev/mirror/root /mnt # mkdir /mnt/var /mnt/usr # mount /dev/mirror/var /mnt/var # mount /dev/mirror/usr /mnt/usr .... Когда вы закончите, запустите man:sysinstall[8]. Выберите установку [.guimenuitem]#Custom# в главном меню. Выберите [.guimenuitem]#Options# и нажмите kbd:[Enter]. С помощью клавиш со стрелками переместите курсор на пункт `Install Root`, нажмите kbd:[Space] и измените его на [.filename]#/mnt#. Нажмите kbd:[Enter], чтобы подтвердить изменения, и выйдите из меню [.guimenuitem]#Options#, нажав kbd:[q]. [WARNING] ==== Обратите внимание, что этот шаг очень важен, и если его пропустить, `sysinstall` не сможет установить FreeBSD. ==== Перейдите в меню [.guimenuitem]#Distributions#, с помощью клавиш со стрелками переместите курсор к пункту `Minimal` и отметьте его, нажав kbd:[Space]. В этой статье используется дистрибутив Minimal для экономии сетевого трафика, так как сама система будет устанавливаться через ftp. Выйдите из этого меню, выбрав `Exit`. [NOTE] ==== [.guimenuitem]#Partition# и [.guimenuitem]#Label# будут пропущены, так как сейчас они бесполезны. ==== В меню [.guimenuitem]#Media# выберите `FTP`. Выберите ближайший зеркальный сервер и позвольте `sysinstall` предположить, что сеть уже настроена. Вы вернётесь обратно в меню [.guimenuitem]#Custom#. Наконец, выполните установку системы, выбрав последний пункт [.guimenuitem]#Commit#. Выйдите из `sysinstall` после завершения установки. === Шаги после установки -Операционная система FreeBSD теперь должна быть установлена; однако процесс еще не завершен. Необходимо выполнить несколько шагов после установки, чтобы FreeBSD могла загружаться в будущем и чтобы можно было войти в систему. +Операционная система FreeBSD теперь должна быть установлена; однако процесс ещё не завершен. Необходимо выполнить несколько шагов после установки, чтобы FreeBSD могла загружаться в будущем и чтобы можно было войти в систему. Вы должны теперь выполнить man:chroot[8] в только что установленную систему, чтобы завершить установку. Используйте следующую команду: [source, shell] .... # chroot /mnt .... Для достижения нашей цели выполните следующие шаги: * Скопируйте ядро `GENERIC` в каталог [.filename]#/boot/kernel#: + [source, shell] .... # cp -Rp /boot/GENERIC/* /boot/kernel .... * Создайте файлы [.filename]#/etc/rc.conf#, [.filename]#/etc/resolv.conf# и [.filename]#/etc/fstab#. Не забудьте правильно настроить сетевые параметры и включить sshd в [.filename]#/etc/rc.conf#. Содержимое [.filename]#/etc/fstab# будет выглядеть примерно следующим образом: + [.programlisting] .... # Device Mountpoint FStype Options Dump Pass# /dev/mirror/swap none swap sw 0 0 /dev/mirror/root / ufs rw 1 1 /dev/mirror/usr /usr ufs rw 2 2 /dev/mirror/var /var ufs rw 2 2 /dev/cd0 /cdrom cd9660 ro,noauto 0 0 .... * Создайте файл [.filename]#/boot/loader.conf# со следующим содержимым: + [.programlisting] .... geom_mirror_load="YES" zfs_load="YES" .... * Выполните следующую команду, чтобы сделать ZFS доступным при следующей загрузке: + [source, shell] .... # sysrc zfs_enable="YES" .... * Добавьте дополнительных пользователей в систему с помощью инструмента man:adduser[8]. Не забудьте добавить пользователя в группу `wheel`, чтобы получить доступ к root после перезагрузки. * Перепроверьте все ваши настройки. Система теперь должна быть готова к следующей загрузке. Используйте команду man:reboot[8] для перезагрузки системы. [[zfs]] == ZFS Если ваша система пережила перезагрузку, теперь должно быть возможно войти в систему. Добро пожаловать в новую установку FreeBSD, выполненную удалённо без использования удалённой консоли! Остался только последний шаг — настроить man:zpool[8] и создать несколько файловых систем man:zfs[8]. Создание и администрирование ZFS очень просто. Сначала создайте зеркальный пул: [source, shell] .... # zpool create tank mirror /dev/ad[01]s1f .... Далее создайте несколько файловых систем: [source, shell] .... # zfs create tank/ports # zfs create tank/src # zfs set compression=gzip tank/ports # zfs set compression=on tank/src # zfs set mountpoint=/usr/ports tank/ports # zfs set mountpoint=/usr/src tank/src .... Вот и все. Если вас интересуют более подробные сведения о ZFS в FreeBSD, обратитесь к разделу https://wiki.freebsd.org/ZFS[ZFS] на вики FreeBSD. diff --git a/documentation/content/ru/articles/remote-install/_index.po b/documentation/content/ru/articles/remote-install/_index.po index bea249061e..db1d88a41d 100644 --- a/documentation/content/ru/articles/remote-install/_index.po +++ b/documentation/content/ru/articles/remote-install/_index.po @@ -1,1007 +1,1007 @@ # SOME DESCRIPTIVE TITLE # Copyright (C) YEAR The FreeBSD Project # This file is distributed under the same license as the FreeBSD Documentation package. -# Vladlen Popolitov , 2025. +# Vladlen Popolitov , 2025, 2026. msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" "POT-Creation-Date: 2025-11-08 16:17+0000\n" -"PO-Revision-Date: 2025-11-12 04:45+0000\n" +"PO-Revision-Date: 2026-03-08 09:11+0000\n" "Last-Translator: Vladlen Popolitov \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 4.17\n" #. type: YAML Front Matter: description #: documentation/content/en/articles/remote-install/_index.adoc:1 #, no-wrap msgid "Describes the remote installation of the FreeBSD operating system when the console of the remote system is unavailable" msgstr "Описывает удалённую установку операционной системы FreeBSD, когда консоль удалённой системы недоступна" #. type: Title = #: documentation/content/en/articles/remote-install/_index.adoc:1 #: documentation/content/en/articles/remote-install/_index.adoc:12 #, no-wrap msgid "Remote Installation of the FreeBSD Operating System Without a Remote Console" msgstr "Удалённая установка операционной системы FreeBSD без удалённой консоли" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:45 msgid "Abstract" msgstr "Аннотация" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:48 msgid "" "This article documents the remote installation of the FreeBSD operating " "system when the console of the remote system is unavailable. The main idea " "behind this article is the result of a collaboration with `{mm}` with " "valuable input provided by `{pjd}`." msgstr "" "В этой статье описывается удалённая установка операционной системы FreeBSD, " "когда консоль удалённой системы недоступна. Основная идея этой статьи " "является результатом сотрудничества с `{mm}` при ценных вкладах от `{pjd}`." #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:50 msgid "'''" msgstr "'''" #. type: Title == #: documentation/content/en/articles/remote-install/_index.adoc:54 #, no-wrap msgid "Background" msgstr "Пояснения" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:58 msgid "" "There are many server hosting providers in the world, but very few of them " "are officially supporting FreeBSD. They usually provide support for a " "Linux(R) distribution to be installed on the servers they offer." msgstr "" "В мире существует множество хостинг-провайдеров, но лишь немногие из них " "официально поддерживают FreeBSD. Обычно они предоставляют поддержку для " "дистрибутивов Linux(R), которые можно установить на предлагаемые серверы." #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:62 msgid "" "In some cases, these companies will install your preferred Linux(R) " "distribution if you request it. Using this option, we will attempt to " "install FreeBSD. In other cases, they may offer a rescue system which would " "be used in an emergency. It is possible to use this for our purposes as " "well." msgstr "" "В некоторых случаях эти компании могут установить предпочитаемый вами " "дистрибутив Linux(R) по вашему запросу. Используя эту опцию, мы попытаемся " "установить FreeBSD. В других случаях они могут предложить систему " "восстановления, которая используется в чрезвычайных ситуациях. Её также " "можно использовать для наших целей." #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:64 msgid "" "This article covers the basic installation and configuration steps required " "to bootstrap a remote installation of FreeBSD with RAID-1 and ZFS " "capabilities." msgstr "" "В этой статье описаны основные шаги установки и настройки, необходимые для " "удалённой установки FreeBSD с поддержкой RAID-1 и ZFS." #. type: Title == #: documentation/content/en/articles/remote-install/_index.adoc:66 #, no-wrap msgid "Introduction" msgstr "Введение" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:70 msgid "" "This section will summarize the purpose of this article and better explain " "what is covered herein. The instructions included in this article will " "benefit those using services provided by colocation facilities not " "supporting FreeBSD." msgstr "" "В этом разделе будет коротко расскажем о цели данной статьи и будет дано " "более подробное объяснение того, что в ней рассматривается. Инструкции, " "приведённые в статье, будут полезны тем, кто использует услуги колокационных " "центров, не поддерживающих FreeBSD." #. type: delimited block = 4 #: documentation/content/en/articles/remote-install/_index.adoc:74 msgid "" "As we have mentioned in the crossref:remote-install[background, Background] " "section, many of the reputable server hosting companies provide some kind of " "rescue system, which is booted from their LAN and accessible over SSH. They " "usually provide this support to help their customers fix broken operating " "systems. As this article will explain, it is possible to install FreeBSD " "with the help of these rescue systems." msgstr "" "Как мы упоминали в разделе crossref:remote-install[background, Предыстория], " "многие авторитетные компании, предоставляющие хостинг серверов, предлагают " "своего рода систему восстановления, которая загружается из их локальной сети " "и доступна через SSH. Обычно они предоставляют эту возможность, чтобы помочь " "клиентам восстановить повреждённые операционные системы. Как будет объяснено " "в этой статье, с помощью таких систем восстановления можно установить " "FreeBSD." #. type: delimited block = 4 #: documentation/content/en/articles/remote-install/_index.adoc:76 msgid "" "The next section of this article will describe how to configure, and build " "minimalistic FreeBSD on the local machine. That version will eventually be " "running on the remote machine from a ramdisk, which will allow us to install " "a complete FreeBSD operating system from an FTP mirror using the sysinstall " "utility." msgstr "" "Следующий раздел этой статьи описывает, как настроить и собрать " "минималистичную FreeBSD на локальной машине. Эта версия в конечном итоге " "будет запущена на удаленной машине с ramdisk, что позволит нам установить " "полную операционную систему FreeBSD с FTP-зеркала с помощью утилиты " "sysinstall." #. type: delimited block = 4 #: documentation/content/en/articles/remote-install/_index.adoc:77 msgid "" "The rest of this article will describe the installation procedure itself, as " "well as the configuration of the ZFS file system." msgstr "" "Оставшаяся часть статьи описывает процедуру установки, а также настройку " "файловой системы ZFS." #. type: Title === #: documentation/content/en/articles/remote-install/_index.adoc:80 #, no-wrap msgid "Requirements" msgstr "Требования" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:83 msgid "To continue successfully, you must:" msgstr "Для успешного продолжения необходимо:" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:85 msgid "Have a network accessible operating system with SSH access" msgstr "Иметь операционную систему с доступом по сети и доступом по SSH" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:86 msgid "Understand the FreeBSD installation process" msgstr "Понимать процесса установки FreeBSD" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:87 msgid "Be familiar with the man:sysinstall[8] utility" msgstr "Быть знакомым с утилитой man:sysinstall[8]" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:88 msgid "Have the FreeBSD installation SO image or CD handy" msgstr "Иметь под рукой установочный образ SO или CD с FreeBSD" #. type: Title == #: documentation/content/en/articles/remote-install/_index.adoc:90 #, no-wrap msgid "Preparation - mfsBSD" msgstr "Подготовка - mfsBSD" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:94 msgid "" "Before FreeBSD may be installed on the target system, it is necessary to " "build the minimal FreeBSD operating system image which will boot from the " "hard drive. This way the new system can be accessed from the network, and " "the rest of the installation can be done without remote access to the system " "console." msgstr "" "Прежде чем FreeBSD может быть установлена на целевую систему, необходимо " "собрать минимальный образ операционной системы FreeBSD, который будет " "загружаться с жёсткого диска. Таким образом, новая система будет доступна из " "сети, а остальная часть установки может быть выполнена без удалённого " "доступа к консоли системы." #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:99 msgid "" "The mfsBSD tool-set can be used to build a tiny FreeBSD image. As the name " "of mfsBSD suggests (\"mfs\" means \"memory file system\"), the resulting " "image runs entirely from a ramdisk. Thanks to this feature, the " "manipulation of hard drives will not be limited, therefore it will be " "possible to install a complete FreeBSD operating system. The mfsBSD http://" "mfsbsd.vx.sk/[home page] includes pointers to the latest release of the " "toolset." msgstr "" "Набор инструментов mfsBSD можно использовать для создания компактного образа " "FreeBSD. Как следует из названия mfsBSD («mfs» означает «файловая система в " "памяти»), итоговый образ полностью запускается с RAM-диска. Благодаря этой " "особенности не будет ограничений на работу с жёсткими дисками, что позволит " "установить полноценную операционную систему FreeBSD. На http://mfsbsd.vx.sk/" "[домашней странице] mfsBSD есть ссылки на последнюю версию набора " "инструментов." #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:102 msgid "" "Please note that the internals of mfsBSD and how it all fits together is " "beyond the scope of this article. The interested reader should consult the " "original documentation of mfsBSD for more details." msgstr "" "Обратите внимание, что внутреннее устройство mfsBSD и принципы его работы " "выходят за рамки данной статьи. Заинтересованным читателям следует " "обратиться к оригинальной документации mfsBSD для получения более подробной " "информации." #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:104 msgid "" "Download and extract the latest mfsBSD release and change your working " "directory to the directory where the mfsBSD scripts will reside:" msgstr "" "Скачайте и распакуйте последний выпуск mfsBSD и перейдите в рабочий каталог, " "где будут находиться скрипты mfsBSD:" #. type: delimited block . 4 #: documentation/content/en/articles/remote-install/_index.adoc:110 #, no-wrap msgid "" "# fetch http://mfsbsd.vx.sk/release/mfsbsd-2.1.tar.gz\n" "# tar xvzf mfsbsd-2.1.tar.gz\n" "# cd mfsbsd-2.1/\n" msgstr "" "# fetch http://mfsbsd.vx.sk/release/mfsbsd-2.1.tar.gz\n" "# tar xvzf mfsbsd-2.1.tar.gz\n" "# cd mfsbsd-2.1/\n" #. type: Title === #: documentation/content/en/articles/remote-install/_index.adoc:113 #, no-wrap msgid "Configuration of mfsBSD" msgstr "Конфигурация mfsBSD" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:119 msgid "" "Before booting mfsBSD, a few important configuration options have to be " "set. The most important that we have to get right is, naturally, the " "network setup. The most suitable method to configure networking options " "depends on whether we know beforehand the type of the network interface we " "will use, and the network interface driver to be loaded for our hardware. " "We will see how mfsBSD can be configured in either case." msgstr "" "Прежде чем загрузить mfsBSD, необходимо установить несколько важных " "параметров конфигурации. Самое важное, что нужно правильно настроить, — это, " "естественно, сеть. Наиболее подходящий метод настройки параметров сети " "зависит от того, знаем ли мы заранее тип используемого сетевого интерфейса и " "драйвер сетевого интерфейса, который нужно загрузить для нашего " "оборудования. Мы рассмотрим, как можно настроить mfsBSD в обоих случаях." #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:123 msgid "" "Another important thing to set is the `root` password. This can be done by " "editing [.filename]#conf/loader.conf#. Please see the included comments." msgstr "" "Еще одна важная настройка — установка пароля `root`. Это можно сделать, " "отредактировав файл [.filename]#conf/loader.conf#. Пожалуйста, ознакомьтесь " "с приложенными комментариями." #. type: Title ==== #: documentation/content/en/articles/remote-install/_index.adoc:124 #, no-wrap msgid "The [.filename]#conf/interfaces.conf# method" msgstr "Метод [.filename]#conf/interfaces.conf#" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:128 msgid "" "When the installed network interface card is unknown, it is possible to use " "the auto-detection features of mfsBSD. The startup scripts of mfsBSD can " "detect the correct driver to use, based on the MAC address of the interface, " "if we set the following options in [.filename]#conf/interfaces.conf#:" msgstr "" "Если установленная сетевая карта неизвестна, можно использовать функцию " "автоматического определения в mfsBSD. Скрипты запуска mfsBSD могут " "определить правильный драйвер для использования на основе MAC-адреса " "интерфейса, если установить следующие параметры в [.filename]#conf/" "interfaces.conf#:" #. type: delimited block . 4 #: documentation/content/en/articles/remote-install/_index.adoc:134 #, no-wrap msgid "" "mac_interfaces=\"ext1\"\n" "ifconfig_ext1_mac=\"00:00:00:00:00:00\"\n" "ifconfig_ext1=\"inet 192.168.0.2/24\"\n" msgstr "" "mac_interfaces=\"ext1\"\n" "ifconfig_ext1_mac=\"00:00:00:00:00:00\"\n" "ifconfig_ext1=\"inet 192.168.0.2/24\"\n" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:137 msgid "" "Do not forget to add the `defaultrouter` information to [.filename]#conf/rc." "conf#:" msgstr "" "Не забудьте добавить информацию о `defaultrouter` в [.filename]#conf/rc." "conf#:" #. type: delimited block . 4 #: documentation/content/en/articles/remote-install/_index.adoc:141 #, no-wrap msgid "defaultrouter=\"192.168.0.1\"\n" msgstr "defaultrouter=\"192.168.0.1\"\n" #. type: Title ==== #: documentation/content/en/articles/remote-install/_index.adoc:143 #, no-wrap msgid "The [.filename]#conf/rc.conf# Method" msgstr "Метод [.filename]#conf/rc.conf#" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:147 msgid "" "When the network interface driver is known, it is more convenient to use [." "filename]#conf/rc.conf# for networking options. The syntax of this file is " "the same as the one used in the standard man:rc.conf[5] file of FreeBSD." msgstr "" "Когда драйвер сетевого интерфейса известен, удобнее использовать [." "filename]#conf/rc.conf# для настройки сети. Синтаксис этого файла такой же, " "как в стандартном файле man:rc.conf[5] FreeBSD." #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:149 msgid "" "For example, if you know that a man:re[4] network interface is going to be " "available, you can set the following options in [.filename]#conf/rc.conf#:" msgstr "" "Например, если известно, что сетевой интерфейс man:re[4] будет доступен, " "можно задать следующие параметры в [.filename]#conf/rc.conf#:" #. type: delimited block . 4 #: documentation/content/en/articles/remote-install/_index.adoc:154 #, no-wrap msgid "" "defaultrouter=\"192.168.0.1\"\n" "ifconfig_re0=\"inet 192.168.0.2/24\"\n" msgstr "" "defaultrouter=\"192.168.0.1\"\n" "ifconfig_re0=\"inet 192.168.0.2/24\"\n" #. type: Title === #: documentation/content/en/articles/remote-install/_index.adoc:157 #, no-wrap msgid "Building an mfsBSD Image" msgstr "Создание образа mfsBSD" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:160 msgid "The process of building an mfsBSD image is pretty straightforward." msgstr "Процесс создания образа mfsBSD довольно прост." #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:164 msgid "" "The first step is to mount the FreeBSD installation CD, or the installation " "ISO image to [.filename]#/cdrom#. For the sake of example, in this article " "we will assume that you have downloaded the FreeBSD 10.1-RELEASE ISO. " "Mounting this ISO image to the [.filename]#/cdrom# directory is easy with " "the man:mdconfig[8] utility:" msgstr "" "Первым шагом необходимо подключить установочный CD FreeBSD или образ ISO " "установки к [.filename]#/cdrom#. В качестве примера в этой статье мы будем " "предполагать, что вы загрузили образ ISO FreeBSD 10.1-RELEASE. Подключение " "этого образа ISO к каталогу [.filename]#/cdrom# легко выполняется с помощью " "утилиты man:mdconfig[8]:" #. type: delimited block . 4 #: documentation/content/en/articles/remote-install/_index.adoc:169 #, no-wrap msgid "" "# mdconfig -a -t vnode -u 10 -f FreeBSD-10.1-RELEASE-amd64-disc1.iso\n" "# mount_cd9660 /dev/md10 /cdrom\n" msgstr "" "# mdconfig -a -t vnode -u 10 -f FreeBSD-10.1-RELEASE-amd64-disc1.iso\n" "# mount_cd9660 /dev/md10 /cdrom\n" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:172 msgid "" "Since the recent FreeBSD releases do not contain regular distribution sets, " "it is required to extract the FreeBSD distribution files from the " "distribution archives located on the ISO image:" msgstr "" "Поскольку последние выпуски FreeBSD не содержат обычных наборов " "дистрибутивов, необходимо извлечь файлы дистрибутива FreeBSD из архивов " "дистрибутива, расположенных на образе ISO:" #. type: delimited block . 4 #: documentation/content/en/articles/remote-install/_index.adoc:178 #, no-wrap msgid "" "# mkdir DIST\n" "# tar -xvf /cdrom/usr/freebsd-dist/base.txz -C DIST\n" "# tar -xvf /cdrom/usr/freebsd-dist/kernel.txz -C DIST\n" msgstr "" "# mkdir DIST\n" "# tar -xvf /cdrom/usr/freebsd-dist/base.txz -C DIST\n" "# tar -xvf /cdrom/usr/freebsd-dist/kernel.txz -C DIST\n" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:181 msgid "Next, build the bootable mfsBSD image:" msgstr "Далее соберите загружаемый образ mfsBSD:" #. type: delimited block . 4 #: documentation/content/en/articles/remote-install/_index.adoc:185 #, no-wrap msgid "# make BASE=DIST\n" msgstr "# make BASE=DIST\n" #. type: delimited block = 4 #: documentation/content/en/articles/remote-install/_index.adoc:190 msgid "" "The above `make` has to be run from the top level of the mfsBSD directory " "tree, for example [.filename]#~/mfsbsd-2.1/#." msgstr "" "Указанную команду `make` необходимо выполнять из корневого уровня дерева " "каталогов mfsBSD, например, [.filename]#~/mfsbsd-2.1/#." #. type: Title === #: documentation/content/en/articles/remote-install/_index.adoc:192 #, no-wrap msgid "Booting mfsBSD" msgstr "Загрузка mfsBSD" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:196 msgid "" "Now that the mfsBSD image is ready, it must be uploaded to the remote system " "running a live rescue system or pre-installed Linux(R) distribution. The " "most suitable tool for this task is scp:" msgstr "" "Теперь, когда образ mfsBSD готов, его необходимо загрузить на удалённую " "систему, работающую под управлением live-системы восстановления или " "предустановленного дистрибутива Linux(R). Наиболее подходящий инструмент для " "этой задачи — scp:" #. type: delimited block . 4 #: documentation/content/en/articles/remote-install/_index.adoc:200 #, no-wrap msgid "# scp disk.img root@192.168.0.2:.\n" msgstr "# scp disk.img root@192.168.0.2:.\n" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:204 msgid "" "To boot mfsBSD image properly, it must be placed on the first (bootable) " "device of the given machine. This may be accomplished using this example " "providing that [.filename]#sda# is the first bootable disk device:" msgstr "" "Для правильной загрузки образа mfsBSD он должен быть размещен на первом " "(загрузочном) устройстве данной машины. Это может быть выполнено с помощью " "следующего примера, при условии что [.filename]#sda# является первым " "загрузочным дисковым устройством:" #. type: delimited block . 4 #: documentation/content/en/articles/remote-install/_index.adoc:208 #, no-wrap msgid "# dd if=/root/disk.img of=/dev/sda bs=1m\n" msgstr "# dd if=/root/disk.img of=/dev/sda bs=1m\n" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:213 msgid "" "If all went well, the image should now be in the MBR of the first device and " "the machine can be rebooted. Watch for the machine to boot up properly with " "the man:ping[8] tool. Once it has came back on-line, it should be possible " "to access it over man:ssh[1] as user `root` with the configured password." msgstr "" "Если всё прошло успешно, образ теперь должен находиться в MBR первого " "устройства, и машину можно перезагрузить. Следите за корректной загрузкой " "системы с помощью инструмента man:ping[8]. Как только машина снова окажется " "в сети, к ней можно будет подключиться через man:ssh[1] под пользователем " "`root` с настроенным паролем." #. type: Title == #: documentation/content/en/articles/remote-install/_index.adoc:215 #, no-wrap msgid "Installation of the FreeBSD Operating System" msgstr "Установка операционной системы FreeBSD" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:219 msgid "" "The mfsBSD has been successfully booted and it should be possible to log in " "through man:ssh[1]. This section will describe how to create and label " "slices, set up `gmirror` for RAID-1, and how to use `sysinstall` to install " "a minimal distribution of the FreeBSD operating system." msgstr "" "Система mfsBSD успешно загружена, и теперь можно войти через man:ssh[1]. В " "этом разделе будет описано, как создавать и размечать разделы, настраивать " "`gmirror` для RAID-1, а также как использовать `sysinstall` для установки " "минимальной дистрибуции операционной системы FreeBSD." #. type: Title === #: documentation/content/en/articles/remote-install/_index.adoc:220 #, no-wrap msgid "Preparation of Hard Drives" -msgstr "Подготовка жестких дисков" +msgstr "Подготовка жёстких дисков" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:225 msgid "" "The first task is to allocate disk space for FreeBSD, i.e.: to create slices " "and partitions. Obviously, the currently running system is fully loaded in " "system memory and therefore there will be no problems with manipulating hard " "drives. To complete this task, it is possible to use either `sysinstall` or " "man:fdisk[8] in conjunction to man:bsdlabel[8]." msgstr "" "Первая задача — выделить дисковое пространство для FreeBSD, т.е.: создать " "слайсы и разделы. Очевидно, что текущая работающая система полностью " "загружена в оперативную память, поэтому не будет проблем с манипуляциями " "жёсткими дисками. Для выполнения этой задачи можно использовать либо " "`sysinstall`, либо man:fdisk[8] в сочетании с man:bsdlabel[8]." #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:228 msgid "" "At the start, mark all system disks as empty. Repeat the following command " "for each hard drive:" msgstr "" "В начале пометьте все системные диски как пустые. Повторите следующую " "команду для каждого жёсткого диска:" #. type: delimited block . 4 #: documentation/content/en/articles/remote-install/_index.adoc:232 #, no-wrap msgid "# dd if=/dev/zero of=/dev/ad0 count=2\n" msgstr "# dd if=/dev/zero of=/dev/ad0 count=2\n" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:240 msgid "" "Next, create slices and label them with your preferred tool. While it is " "considered easier to use `sysinstall`, a powerful and also probably less " "buggy method will be to use standard text-based UNIX(R) tools, such as man:" "fdisk[8] and man:bsdlabel[8], which will also be covered in this section. " "The former option is well documented in the extref:{handbook}" "install[Installing FreeBSD, install-steps] chapter of the FreeBSD Handbook. " "As it was mentioned in the introduction, this article will present how to " "set up a system with RAID-1 and ZFS capabilities. Our set up will consist " "of a small man:gmirror[8] mirrored [.filename]#/# (root), [.filename]#/usr# " "and [.filename]#/var# dataset, and the rest of the disk space will be " "allocated for a man:zpool[8] mirrored ZFS file system. Please note, that " "the ZFS file system will be configured after the FreeBSD operating system is " "successfully installed and booted." msgstr "" "Далее создайте разделы и пометьте их с помощью предпочитаемого инструмента. " "Хотя использование `sysinstall` считается более простым, но мощным и, " "вероятно, менее подверженным ошибкам методом будет использование стандартных " "текстовых инструментов UNIX(R), таких как man:fdisk[8] и man:bsdlabel[8], " "которые также будут рассмотрены в этом разделе. Первый вариант хорошо " "документирован в главе extref:{handbook}install[Установка FreeBSD, install-" "steps] Руководства FreeBSD. Как упоминалось во введении, в этой статье будет " "показано, как настроить систему с возможностями RAID-1 и ZFS. Наша " "конфигурация будет состоять из небольшого зеркального раздела man:gmirror[8] " "для [.filename]#/# (корневого), [.filename]#/usr# и [.filename]#/var#, а " "остальное место на диске будет выделено для зеркальной файловой системы ZFS " "man:zpool[8]. Обратите внимание, что файловая система ZFS будет настроена " "после успешной установки и загрузки операционной системы FreeBSD." #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:242 msgid "" "The following example will describe how to create slices and labels, " "initialize man:gmirror[8] on each partition and how to create a UFS2 file " "system in each mirrored partition:" msgstr "" "Следующий пример описывает, как создать слайсы и метки, инициализировать man:" "gmirror[8] на каждом разделе и как создать файловую систему UFS2 в каждом " "зеркальном разделе:" #. type: delimited block . 4 #: documentation/content/en/articles/remote-install/_index.adoc:258 #, no-wrap msgid "" "# fdisk -BI /dev/ad0 <.>\n" "# fdisk -BI /dev/ad1\n" "# bsdlabel -wB /dev/ad0s1 <.>\n" "# bsdlabel -wB /dev/ad1s1\n" "# bsdlabel -e /dev/ad0s1 <.>\n" "# bsdlabel /dev/ad0s1 > /tmp/bsdlabel.txt && bsdlabel -R /dev/ad1s1 /tmp/bsdlabel.txt <.>\n" "# gmirror label root /dev/ad[01]s1a <.>\n" "# gmirror label var /dev/ad[01]s1d\n" "# gmirror label usr /dev/ad[01]s1e\n" "# gmirror label -F swap /dev/ad[01]s1b <.>\n" "# newfs /dev/mirror/root <.>\n" "# newfs /dev/mirror/var\n" "# newfs /dev/mirror/usr\n" msgstr "" "# fdisk -BI /dev/ad0 <.>\n" "# fdisk -BI /dev/ad1\n" "# bsdlabel -wB /dev/ad0s1 <.>\n" "# bsdlabel -wB /dev/ad1s1\n" "# bsdlabel -e /dev/ad0s1 <.>\n" "# bsdlabel /dev/ad0s1 > /tmp/bsdlabel.txt && bsdlabel -R /dev/ad1s1 /tmp/bsdlabel.txt <.>\n" "# gmirror label root /dev/ad[01]s1a <.>\n" "# gmirror label var /dev/ad[01]s1d\n" "# gmirror label usr /dev/ad[01]s1e\n" "# gmirror label -F swap /dev/ad[01]s1b <.>\n" "# newfs /dev/mirror/root <.>\n" "# newfs /dev/mirror/var\n" "# newfs /dev/mirror/usr\n" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:261 msgid "" "Create a slice covering the entire disk and initialize the boot code " "contained in sector 0 of the given disk. Repeat this command for all hard " "drives in the system." msgstr "" "Создайте раздел, охватывающий весь диск, и инициализируйте загрузочный код, " "содержащийся в секторе 0 данного диска. Повторите эту команду для всех " -"жестких дисков в системе." +"жёстких дисков в системе." #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:263 msgid "Write a standard label for each disk including the bootstrap code." msgstr "Запишите стандартную метку для каждого диска, включая загрузочный код." #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:265 msgid "" "Now, manually edit the label of the given disk. Refer to the man:bsdlabel[8] " "manual page to find out how to create partitions. Create partitions `a` for " "[.filename]#/# (root) file system, `b` for swap, `d` for [.filename]#/var#, " "`e` for [.filename]#/usr# and finally `f` which will later be used for ZFS." msgstr "" "Теперь вручную отредактируйте метку указанного диска. Обратитесь к странице " "руководства man:bsdlabel[8], чтобы узнать, как создавать разделы. Создайте " "раздел `a` для [.filename]#/# — корневой файловой системы, `b` для раздела " "подкачки, `d` для [.filename]#/var#, `e` для [.filename]#/usr# и, наконец, " "`f`, который позже будет использоваться для ZFS." #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:267 msgid "" "Import the recently created label for the second hard drive, so both hard " "drives will be labeled in the same way." msgstr "" -"Импортируйте только что созданную метку для второго жесткого диска, чтобы " -"оба жестких диска были размечены одинаковым образом." +"Импортируйте только что созданную метку для второго жёсткого диска, чтобы " +"оба жёстких диска были размечены одинаковым образом." #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:269 msgid "Initialize man:gmirror[8] on each partition." msgstr "Инициализируйте man:gmirror[8] на каждом разделе." #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:271 msgid "" "Note that `-F` is used for the swap partition. This instructs man:gmirror[8] " "to assume that the device is in the consistent state after the power/system " "failure." msgstr "" "Обратите внимание, что `-F` используется для раздела подкачки. Это указывает " "man:gmirror[8] предполагать, что устройство находится в согласованном " "состоянии после сбоя питания/системы." #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:273 msgid "Create a UFS2 file system on each mirrored partition." msgstr "Создайте файловую систему UFS2 на каждом зеркальном разделе." #. type: Title === #: documentation/content/en/articles/remote-install/_index.adoc:274 #, no-wrap msgid "System Installation" msgstr "Установка системы" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:279 msgid "" "This is the most important part. This section will describe how to actually " "install the minimal distribution of FreeBSD on the hard drives that we have " "prepared in the previous section. To accomplish this goal, all file systems " "need to be mounted so `sysinstall` may write the contents of FreeBSD to the " "hard drives:" msgstr "" "Это самая важная часть. В этом разделе будет описано, как фактически " "установить минимальный дистрибутив FreeBSD на жёсткие диски, которые мы " "подготовили в предыдущем разделе. Для достижения этой цели необходимо " "смонтировать все файловые системы, чтобы `sysinstall` мог записать " "содержимое FreeBSD на жёсткие диски:" #. type: delimited block . 4 #: documentation/content/en/articles/remote-install/_index.adoc:286 #, no-wrap msgid "" "# mount /dev/mirror/root /mnt\n" "# mkdir /mnt/var /mnt/usr\n" "# mount /dev/mirror/var /mnt/var\n" "# mount /dev/mirror/usr /mnt/usr\n" msgstr "" "# mount /dev/mirror/root /mnt\n" "# mkdir /mnt/var /mnt/usr\n" "# mount /dev/mirror/var /mnt/var\n" "# mount /dev/mirror/usr /mnt/usr\n" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:293 msgid "" "When you are done, start man:sysinstall[8]. Select the [." "guimenuitem]#Custom# installation from the main menu. Select [." "guimenuitem]#Options# and press kbd:[Enter]. With the help of arrow keys, " "move the cursor on the `Install Root` item, press kbd:[Space] and change it " "to [.filename]#/mnt#. Press kbd:[Enter] to submit your changes and exit the " "[.guimenuitem]#Options# menu by pressing kbd:[q]." msgstr "" "Когда вы закончите, запустите man:sysinstall[8]. Выберите установку [." "guimenuitem]#Custom# в главном меню. Выберите [.guimenuitem]#Options# и " "нажмите kbd:[Enter]. С помощью клавиш со стрелками переместите курсор на " "пункт `Install Root`, нажмите kbd:[Space] и измените его на [.filename]#/" "mnt#. Нажмите kbd:[Enter], чтобы подтвердить изменения, и выйдите из меню [." "guimenuitem]#Options#, нажав kbd:[q]." #. type: delimited block = 4 #: documentation/content/en/articles/remote-install/_index.adoc:297 msgid "" "Note that this step is very important and if skipped, `sysinstall` will be " "unable to install FreeBSD." msgstr "" "Обратите внимание, что этот шаг очень важен, и если его пропустить, " "`sysinstall` не сможет установить FreeBSD." #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:302 msgid "" "Go to the [.guimenuitem]#Distributions# menu, move the cursor with the arrow " "keys to `Minimal`, and check it by pressing kbd:[Space]. This article uses " "the Minimal distribution to save network traffic, because the system itself " "will be installed over ftp. Exit this menu by choosing `Exit`." msgstr "" "Перейдите в меню [.guimenuitem]#Distributions#, с помощью клавиш со " "стрелками переместите курсор к пункту `Minimal` и отметьте его, нажав kbd:" "[Space]. В этой статье используется дистрибутив Minimal для экономии " "сетевого трафика, так как сама система будет устанавливаться через ftp. " "Выйдите из этого меню, выбрав `Exit`." #. type: delimited block = 4 #: documentation/content/en/articles/remote-install/_index.adoc:306 msgid "" "The [.guimenuitem]#Partition# and [.guimenuitem]#Label# menus will be " "skipped, as these are useless now." msgstr "" "[.guimenuitem]#Partition# и [.guimenuitem]#Label# будут пропущены, так как " "сейчас они бесполезны." #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:311 msgid "" "In the [.guimenuitem]#Media# menu, select `FTP`. Select the nearest mirror " "and let `sysinstall` assume that the network is already configured. You " "will be returned back to the [.guimenuitem]#Custom# menu." msgstr "" "В меню [.guimenuitem]#Media# выберите `FTP`. Выберите ближайший зеркальный " "сервер и позвольте `sysinstall` предположить, что сеть уже настроена. Вы " "вернётесь обратно в меню [.guimenuitem]#Custom#." #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:314 msgid "" "Finally, perform the system installation by selecting the last option, [." "guimenuitem]#Commit#. Exit `sysinstall` when it finishes the installation." msgstr "" "Наконец, выполните установку системы, выбрав последний пункт [." "guimenuitem]#Commit#. Выйдите из `sysinstall` после завершения установки." #. type: Title === #: documentation/content/en/articles/remote-install/_index.adoc:315 #, no-wrap msgid "Post Installation Steps" msgstr "Шаги после установки" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:319 msgid "" "The FreeBSD operating system should be installed now; however, the process " "is not finished yet. It is necessary to perform some post installation " "steps to allow FreeBSD to boot in the future and to be able to log in to the " "system." msgstr "" "Операционная система FreeBSD теперь должна быть установлена; однако процесс " -"еще не завершен. Необходимо выполнить несколько шагов после установки, чтобы " +"ещё не завершен. Необходимо выполнить несколько шагов после установки, чтобы " "FreeBSD могла загружаться в будущем и чтобы можно было войти в систему." #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:322 msgid "" "You must now man:chroot[8] into the freshly installed system to finish the " "installation. Use the following command:" msgstr "" "Вы должны теперь выполнить man:chroot[8] в только что установленную систему, " "чтобы завершить установку. Используйте следующую команду:" #. type: delimited block . 4 #: documentation/content/en/articles/remote-install/_index.adoc:326 #, no-wrap msgid "# chroot /mnt\n" msgstr "# chroot /mnt\n" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:329 msgid "To complete our goal, perform these steps:" msgstr "Для достижения нашей цели выполните следующие шаги:" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:331 msgid "Copy the `GENERIC` kernel to the [.filename]#/boot/kernel# directory:" msgstr "Скопируйте ядро `GENERIC` в каталог [.filename]#/boot/kernel#:" #. type: delimited block . 4 #: documentation/content/en/articles/remote-install/_index.adoc:335 #, no-wrap msgid "# cp -Rp /boot/GENERIC/* /boot/kernel\n" msgstr "# cp -Rp /boot/GENERIC/* /boot/kernel\n" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:338 msgid "" "Create the [.filename]#/etc/rc.conf#, [.filename]#/etc/resolv.conf# and [." "filename]#/etc/fstab# files. Do not forget to properly set the network " "information and to enable sshd in [.filename]#/etc/rc.conf#. The contents of " "[.filename]#/etc/fstab# will be similar to the following:" msgstr "" "Создайте файлы [.filename]#/etc/rc.conf#, [.filename]#/etc/resolv.conf# и [." "filename]#/etc/fstab#. Не забудьте правильно настроить сетевые параметры и " "включить sshd в [.filename]#/etc/rc.conf#. Содержимое [.filename]#/etc/" "fstab# будет выглядеть примерно следующим образом:" #. type: delimited block . 4 #: documentation/content/en/articles/remote-install/_index.adoc:347 #, no-wrap msgid "" "# Device Mountpoint FStype Options Dump Pass#\n" "/dev/mirror/swap none swap sw 0 0\n" "/dev/mirror/root / ufs rw 1 1\n" "/dev/mirror/usr /usr ufs rw 2 2\n" "/dev/mirror/var /var ufs rw 2 2\n" "/dev/cd0 /cdrom cd9660 ro,noauto 0 0\n" msgstr "" "# Device Mountpoint FStype Options Dump Pass#\n" "/dev/mirror/swap none swap sw 0 0\n" "/dev/mirror/root / ufs rw 1 1\n" "/dev/mirror/usr /usr ufs rw 2 2\n" "/dev/mirror/var /var ufs rw 2 2\n" "/dev/cd0 /cdrom cd9660 ro,noauto 0 0\n" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:349 msgid "Create [.filename]#/boot/loader.conf# with the following contents:" msgstr "Создайте файл [.filename]#/boot/loader.conf# со следующим содержимым:" #. type: delimited block . 4 #: documentation/content/en/articles/remote-install/_index.adoc:354 #, no-wrap msgid "" "geom_mirror_load=\"YES\"\n" "zfs_load=\"YES\"\n" msgstr "" "geom_mirror_load=\"YES\"\n" "zfs_load=\"YES\"\n" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:356 msgid "" "Perform the following command, which will make ZFS available on the next " "boot:" msgstr "" "Выполните следующую команду, чтобы сделать ZFS доступным при следующей " "загрузке:" #. type: delimited block . 4 #: documentation/content/en/articles/remote-install/_index.adoc:360 #, no-wrap msgid "# sysrc zfs_enable=\"YES\"\n" msgstr "# sysrc zfs_enable=\"YES\"\n" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:363 msgid "" "Add additional users to the system using the man:adduser[8] tool. Do not " "forget to add a user to the `wheel` group so you may obtain root access " "after the reboot." msgstr "" "Добавьте дополнительных пользователей в систему с помощью инструмента man:" "adduser[8]. Не забудьте добавить пользователя в группу `wheel`, чтобы " "получить доступ к root после перезагрузки." #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:364 msgid "Double-check all your settings." msgstr "Перепроверьте все ваши настройки." #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:367 msgid "" "The system should now be ready for the next boot. Use the man:reboot[8] " "command to reboot your system." msgstr "" "Система теперь должна быть готова к следующей загрузке. Используйте команду " "man:reboot[8] для перезагрузки системы." #. type: Title == #: documentation/content/en/articles/remote-install/_index.adoc:369 #, no-wrap msgid "ZFS" msgstr "ZFS" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:373 msgid "" "If your system survived the reboot, it should now be possible to log in. " "Welcome to the fresh FreeBSD installation, performed remotely without the " "use of a remote console!" msgstr "" "Если ваша система пережила перезагрузку, теперь должно быть возможно войти в " "систему. Добро пожаловать в новую установку FreeBSD, выполненную удалённо " "без использования удалённой консоли!" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:376 msgid "" "The only remaining step is to configure man:zpool[8] and create some man:" "zfs[8] file systems. Creating and administering ZFS is very " "straightforward. First, create a mirrored pool:" msgstr "" "Остался только последний шаг — настроить man:zpool[8] и создать несколько " "файловых систем man:zfs[8]. Создание и администрирование ZFS очень просто. " "Сначала создайте зеркальный пул:" #. type: delimited block . 4 #: documentation/content/en/articles/remote-install/_index.adoc:380 #, no-wrap msgid "# zpool create tank mirror /dev/ad[01]s1f\n" msgstr "# zpool create tank mirror /dev/ad[01]s1f\n" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:383 msgid "Next, create some file systems:" msgstr "Далее создайте несколько файловых систем:" #. type: delimited block . 4 #: documentation/content/en/articles/remote-install/_index.adoc:392 #, no-wrap msgid "" "# zfs create tank/ports\n" "# zfs create tank/src\n" "# zfs set compression=gzip tank/ports\n" "# zfs set compression=on tank/src\n" "# zfs set mountpoint=/usr/ports tank/ports\n" "# zfs set mountpoint=/usr/src tank/src\n" msgstr "" "# zfs create tank/ports\n" "# zfs create tank/src\n" "# zfs set compression=gzip tank/ports\n" "# zfs set compression=on tank/src\n" "# zfs set mountpoint=/usr/ports tank/ports\n" "# zfs set mountpoint=/usr/src tank/src\n" #. type: Plain text #: documentation/content/en/articles/remote-install/_index.adoc:395 msgid "" "That is all. If you are interested in more details about ZFS on FreeBSD, " "please refer to the https://wiki.freebsd.org/ZFS[ZFS] section of the FreeBSD " "Wiki." msgstr "" "Вот и все. Если вас интересуют более подробные сведения о ZFS в FreeBSD, " "обратитесь к разделу https://wiki.freebsd.org/ZFS[ZFS] на вики FreeBSD."