public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] 2022-12-24-alternatives-introduction: add news item
@ 2022-12-24 11:34 Sam James
  2022-12-27 13:01 ` Alexey Sokolov
  0 siblings, 1 reply; 2+ messages in thread
From: Sam James @ 2022-12-24 11:34 UTC (permalink / raw
  To: gentoo-dev; +Cc: pr, base-system, mgorny, Sam James

Bug: https://bugs.gentoo.org/886247
Bug: https://bugs.gentoo.org/886017
Signed-off-by: Sam James <sam@gentoo.org>
---
 ...022-12-24-alternatives-introduction.en.txt | 92 +++++++++++++++++++
 1 file changed, 92 insertions(+)
 create mode 100644 2022-12-24-alternatives-introduction/2022-12-24-alternatives-introduction.en.txt

diff --git a/2022-12-24-alternatives-introduction/2022-12-24-alternatives-introduction.en.txt b/2022-12-24-alternatives-introduction/2022-12-24-alternatives-introduction.en.txt
new file mode 100644
index 0000000..841e07a
--- /dev/null
+++ b/2022-12-24-alternatives-introduction/2022-12-24-alternatives-introduction.en.txt
@@ -0,0 +1,92 @@
+Title: Introduction of app-alternatives ebuilds
+Author: Sam James <sam@gentoo.org>
+Posted: 2022-12-24
+Revision: 1
+News-Item-Format: 2.0
+
+Gentoo is introducing a new category of ebuilds called 'app-alternatives'
+to handle cases where a symlink for a common binary may want to be switched
+between different packages by a user.
+
+Traditionally, eselect was used for this, and while eselect still has its
+place, it's unsuitable for cases like /bin/awk and /bin/sh because it
+prevents immutable system directories and (more importantly
+from a package management perspective) relies on orphaned symlinks which
+means no package owns /bin/awk, /bin/sh, etc. This is not reliable and
+can lead to dead symlinks (or no symlink at all) in some edge cases [0].
+
+Systems will be more robust and desired system configuration
+can be achieved using the package manager rather than manual steps outside of it.
+
+The initial list of packages which support alternatives is as follows:
+- app-alternatives/awk
+- app-alternatives/bzip2
+- app-alternatives/bc
+- app-alternatives/cpio
+- app-alternatives/gzip
+- app-alternatives/lex
+- app-alternatives/sh
+- app-alternatives/tar
+- app-alternatives/yacc
+
+The stabilization of these new ebuilds and packages depending
+on them is ongoing in bug 886017 [1].
+
+## Per-upgrade requirements
+
+The default configuration on Gentoo systems is FEATURES="protect-owned"
+which works similarly to FEATURES="collision-protect" but it allows
+collisions between orphaned files. In this case, a one-off collision
+occurs as the app-alternatives/ ebuilds begin to claim once-orphaned
+symlinks.
+
+A similar issue occurred during the libxcrypt migration where users
+had upgrades interrupted by using the older, more aggressive
+FEATURES="collision-protect".
+
+It is recommended that users alter their configuration to
+remove references to 'collision-protect' in FEATURES and instead either
+explicitly enable 'protect-owned' in FEATURES or rely on the default
+(equivalent). It is also acceptable to simply disable collision-protect
+temporarily for the purposes of this news item.
+
+WARNING: Users with collision-protect enabled must disable FEATURES="collision-protect"
+in /etc/portage/make.conf by removing it or setting FEATURES="-collision-protect"
+if they have enabled it. collision-protect detects collisions between files including
+orphaned files where no package owns the file.
+
+## Migrating
+
+To migrate your system, a standard world upgrade will suffice:
+1. # emerge --sync
+2. # emerge -a -uvDU @world (or other similar standard world upgrade command)
+
+## Configuration
+
+Users who are not interested in using different implementations for
+various tools listed above can ignore this section.
+
+No configuration should be required by default, but users may wish
+to configure the new app-alternatives/ ebuilds to their tastes as they
+used to do via e.g. eselect-sh and eselect-awk.
+
+Going forward, /etc/portage/package.use will be used for this purpose.
+
+Users should review the USE flags available for the various app-alternatives
+ebuilds like app-alternatives/sh and adjust their configuration as desired.
+
+For example, to have /usr/bin/gzip be provided by app-arch/pigz for automatic
+parallelization of 'gzip', one would have the following in /etc/portage/package.use:
+```
+# https://wiki.gentoo.org/wiki/Gzip#Parallelization
+# Make /usr/bin/gzip be a symlink to pigz for a speedup in compression
+app-alternatives/gzip -reference pigz
+```
+
+## Further reading
+
+For more details, please see the technical documentation on the wiki [2].
+
+[0] https://wiki.gentoo.org/wiki/Project:Base/Alternatives#Why.3F
+[1] https://bugs.gentoo.org/886017
+[2] https://wiki.gentoo.org/wiki/Project:Base/Alternatives
-- 
2.39.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [gentoo-dev] [PATCH] 2022-12-24-alternatives-introduction: add news item
  2022-12-24 11:34 [gentoo-dev] [PATCH] 2022-12-24-alternatives-introduction: add news item Sam James
@ 2022-12-27 13:01 ` Alexey Sokolov
  0 siblings, 0 replies; 2+ messages in thread
From: Alexey Sokolov @ 2022-12-27 13:01 UTC (permalink / raw
  To: gentoo-dev, Sergey Torokhov

[-- Attachment #1: Type: text/plain, Size: 4820 bytes --]

Russian translation attached

+Sergey to see any obvious mistakes

24.12.2022 11:34, Sam James пишет:
> Bug: https://bugs.gentoo.org/886247
> Bug: https://bugs.gentoo.org/886017
> Signed-off-by: Sam James <sam@gentoo.org>
> ---
>   ...022-12-24-alternatives-introduction.en.txt | 92 +++++++++++++++++++
>   1 file changed, 92 insertions(+)
>   create mode 100644 2022-12-24-alternatives-introduction/2022-12-24-alternatives-introduction.en.txt
> 
> diff --git a/2022-12-24-alternatives-introduction/2022-12-24-alternatives-introduction.en.txt b/2022-12-24-alternatives-introduction/2022-12-24-alternatives-introduction.en.txt
> new file mode 100644
> index 0000000..841e07a
> --- /dev/null
> +++ b/2022-12-24-alternatives-introduction/2022-12-24-alternatives-introduction.en.txt
> @@ -0,0 +1,92 @@
> +Title: Introduction of app-alternatives ebuilds
> +Author: Sam James <sam@gentoo.org>
> +Posted: 2022-12-24
> +Revision: 1
> +News-Item-Format: 2.0
> +
> +Gentoo is introducing a new category of ebuilds called 'app-alternatives'
> +to handle cases where a symlink for a common binary may want to be switched
> +between different packages by a user.
> +
> +Traditionally, eselect was used for this, and while eselect still has its
> +place, it's unsuitable for cases like /bin/awk and /bin/sh because it
> +prevents immutable system directories and (more importantly
> +from a package management perspective) relies on orphaned symlinks which
> +means no package owns /bin/awk, /bin/sh, etc. This is not reliable and
> +can lead to dead symlinks (or no symlink at all) in some edge cases [0].
> +
> +Systems will be more robust and desired system configuration
> +can be achieved using the package manager rather than manual steps outside of it.
> +
> +The initial list of packages which support alternatives is as follows:
> +- app-alternatives/awk
> +- app-alternatives/bzip2
> +- app-alternatives/bc
> +- app-alternatives/cpio
> +- app-alternatives/gzip
> +- app-alternatives/lex
> +- app-alternatives/sh
> +- app-alternatives/tar
> +- app-alternatives/yacc
> +
> +The stabilization of these new ebuilds and packages depending
> +on them is ongoing in bug 886017 [1].
> +
> +## Per-upgrade requirements
> +
> +The default configuration on Gentoo systems is FEATURES="protect-owned"
> +which works similarly to FEATURES="collision-protect" but it allows
> +collisions between orphaned files. In this case, a one-off collision
> +occurs as the app-alternatives/ ebuilds begin to claim once-orphaned
> +symlinks.
> +
> +A similar issue occurred during the libxcrypt migration where users
> +had upgrades interrupted by using the older, more aggressive
> +FEATURES="collision-protect".
> +
> +It is recommended that users alter their configuration to
> +remove references to 'collision-protect' in FEATURES and instead either
> +explicitly enable 'protect-owned' in FEATURES or rely on the default
> +(equivalent). It is also acceptable to simply disable collision-protect
> +temporarily for the purposes of this news item.
> +
> +WARNING: Users with collision-protect enabled must disable FEATURES="collision-protect"
> +in /etc/portage/make.conf by removing it or setting FEATURES="-collision-protect"
> +if they have enabled it. collision-protect detects collisions between files including
> +orphaned files where no package owns the file.
> +
> +## Migrating
> +
> +To migrate your system, a standard world upgrade will suffice:
> +1. # emerge --sync
> +2. # emerge -a -uvDU @world (or other similar standard world upgrade command)
> +
> +## Configuration
> +
> +Users who are not interested in using different implementations for
> +various tools listed above can ignore this section.
> +
> +No configuration should be required by default, but users may wish
> +to configure the new app-alternatives/ ebuilds to their tastes as they
> +used to do via e.g. eselect-sh and eselect-awk.
> +
> +Going forward, /etc/portage/package.use will be used for this purpose.
> +
> +Users should review the USE flags available for the various app-alternatives
> +ebuilds like app-alternatives/sh and adjust their configuration as desired.
> +
> +For example, to have /usr/bin/gzip be provided by app-arch/pigz for automatic
> +parallelization of 'gzip', one would have the following in /etc/portage/package.use:
> +```
> +# https://wiki.gentoo.org/wiki/Gzip#Parallelization
> +# Make /usr/bin/gzip be a symlink to pigz for a speedup in compression
> +app-alternatives/gzip -reference pigz
> +```
> +
> +## Further reading
> +
> +For more details, please see the technical documentation on the wiki [2].
> +
> +[0] https://wiki.gentoo.org/wiki/Project:Base/Alternatives#Why.3F
> +[1] https://bugs.gentoo.org/886017
> +[2] https://wiki.gentoo.org/wiki/Project:Base/Alternatives

-- 
Best regards,
Alexey "DarthGandalf" Sokolov

[-- Attachment #2: 0001-2022-12-27-alternatives-introduction-add-Ru-translat.patch --]
[-- Type: text/x-patch, Size: 7001 bytes --]

From eadf8d50a52876068cfbe17f8c4c0d2ce226edc7 Mon Sep 17 00:00:00 2001
From: Alexey Sokolov <alexey+gentoo@asokolov.org>
Date: Tue, 27 Dec 2022 12:51:25 +0000
Subject: [PATCH] 2022-12-27-alternatives-introduction: add Ru translation

Signed-off-by: Alexey Sokolov <alexey+gentoo@asokolov.org>

---
 ...022-12-27-alternatives-introduction.ru.txt | 98 +++++++++++++++++++
 1 file changed, 98 insertions(+)
 create mode 100644 2022-12-27-alternatives-introduction/2022-12-27-alternatives-introduction.ru.txt

diff --git a/2022-12-27-alternatives-introduction/2022-12-27-alternatives-introduction.ru.txt b/2022-12-27-alternatives-introduction/2022-12-27-alternatives-introduction.ru.txt
new file mode 100644
index 0000000..254bb40
--- /dev/null
+++ b/2022-12-27-alternatives-introduction/2022-12-27-alternatives-introduction.ru.txt
@@ -0,0 +1,98 @@
+Title: Нововведение: пакеты app-alternatives
+Author: Sam James <sam@gentoo.org>
+Translator: Alexey Sokolov <alexey+gentoo@asokolov.org>
+Posted: 2022-12-24
+Revision: 1
+News-Item-Format: 2.0
+
+В Gentoo будет новая категория пакетов под названием «app-alternatives» для
+случаев, когда пользователь хочет поменять символическую ссылку, указывающую
+на распространённую программу, доступную в разных пакетах.
+
+По традиции, для этого использовался eselect, но, хотя eselect всё ещё бывает
+нужен, он плохо подходит для случаев, таких как /bin/awk и /bin/sh, потому что
+а) он предотвращает использование корневой файловой системы в режиме только
+для чтения, б) что более важно с точки зрения системы управления пакетами, он
+зависит от осиротевших символических ссылок: ни один пакет не владеет файлами
+/bin/awk, /bin/sh и т. д. Это не надёжно, и в некоторых случаях может привести
+к мёртвой ссылке или даже к отсутствию ссылки [0].
+
+При использовании для этих целей пакетного менеджера вместо ручной
+конфигурации вовне система станет более надёжной.
+
+Начальный список пакетов с поддержкой альтернатив такой:
+- app-alternatives/awk
+- app-alternatives/bzip2
+- app-alternatives/bc
+- app-alternatives/cpio
+- app-alternatives/gzip
+- app-alternatives/lex
+- app-alternatives/sh
+- app-alternatives/tar
+- app-alternatives/yacc
+
+Стабилизация этих пакетов, а также пакетов, от них зависящих, происходит в
+баге 886017 [1].
+
+## Требования для обновления
+
+Настройка по умолчанию для систем Gentoo выглядит так:
+FEATURES="protect-owned"; это работает подобно FEATURES="collision-protect",
+но позволяет конфликты между файлами-сиротами. В этом случае возникнет
+одноразовый конфликт, когда пакет из app-alternatives/ присвоит себе
+символическую ссылку, которая до этого не принадлежала ни одному пакету.
+
+Похожая ситуация была при миграции на libxcrypt, когда обновления ломались у
+пользователей при использовании старой, более агрессивной настройки
+FEATURES="collision-protect".
+
+Мы рекомендуем вам обновить свою конфигурацию, и убрать «collision-protect» из
+FEATURES. Вместо этого можете явно включить «protect-owned» или не указывать
+там ничего, потому что это итак настройка по умолчанию. Также можно выключить
+«collision-protect» временно, только для этого обновления, и затем включить
+обратно.
+
+ВНИМАНИЕ: Пользователи, использующие collision-protect, должны убрать его из
+FEATURES в /etc/portage/make.conf, либо установить
+FEATURES="-collision-protect". collision-protect находит конфликты между
+файлами, даже когда ни один пакет не владеет файлом.
+
+## Миграция
+
+Для миграции достаточно убрать eselect-awk и eselect-sh из world, и обновить
+систему как обычно:
+1. # emerge --deselect app-eselect/eselect-awk app-eselect/eselect-sh
+2. # emerge --sync
+3. # emerge -a -uvDU @world (или похожая команда для стандартного обновления
+системы)
+
+## Конфигурация
+
+Если вы не заинтересованны в использовании разных реализаций перечисленных
+выше инструментов, эту секцию можно пропустить.
+
+По умолчанию никакая конфигурация не требуется, но вы можете настраивать
+поведение пакетов из app-alternatives/, как раньше использовали для этого,
+например, eselect-sh и eselect-awk.
+
+Теперь для этого будет использоваться /etc/portage/package.use.
+
+Пожалуйста, просмотрите USE-флаги, доступные для различных пакетов из
+app-alternatives, таких как app-alternatives/sh, и настройте их на ваше
+усмотрение.
+
+Например, чтобы /usr/bin/gzip был предоставлен пакетом app-arch/pigz, это
+автоматически параллелизует gzip, нужен такой текст в /etc/portage/package.use:
+```
+# https://wiki.gentoo.org/wiki/Gzip#Parallelization
+# Пусть /usr/bin/gzip будет ссылкой на pigz для ускорения сжатия
+app-alternatives/gzip -reference pigz
+```
+
+## Дополнительные материалы
+
+Больше технических подробностей описано в вики [2].
+
+[0] https://wiki.gentoo.org/wiki/Project:Base/Alternatives#Why.3F
+[1] https://bugs.gentoo.org/886017
+[2] https://wiki.gentoo.org/wiki/Project:Base/Alternatives
-- 
2.38.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-27 13:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-24 11:34 [gentoo-dev] [PATCH] 2022-12-24-alternatives-introduction: add news item Sam James
2022-12-27 13:01 ` Alexey Sokolov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox