Re: [gentoo-dev] [PATCH] eclass/vim-plugin.eclass: delete if has_version condition.
> On 21 Jul 2021, at 17:47, Patrice Clement wrote: > > ... and replace it with a test against the REPLACING_VERSIONS variable. > > See https://projects.gentoo.org/pms/8/pms.html#x1-10900011.1. > > Patch courtesy of Arfrever. > Ideally, we'd use Arfrever's sign off, but this is kind of a grey area, so it's not a blocker at all right now. > Closes: https://github.com/gentoo/gentoo/pull/21733 > Signed-off-by: Patrice Clement > --- > eclass/vim-plugin.eclass | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/eclass/vim-plugin.eclass b/eclass/vim-plugin.eclass > index 6b72d66111d..460edcce3eb 100644 > --- a/eclass/vim-plugin.eclass > +++ b/eclass/vim-plugin.eclass > [snip] The patch itself seems fine, but I have some suggestions while we're working on the eclass: - Add EAPI 8 support - Please drop obsolete EAPI compatibility hacks like: >has "${EAPI:-0}" 0 1 2 && ! use prefix && ED="${D}" This is unnecessary because we're only declaring support for EAPI 6 and 7 right now. - Could you please convert POSIX tests to Bash tests? [0] - In update_vim_afterscripts, the einfo seems (at first glance) to be misleading. Should it be printing ${afterdir} instead? - Ideally, we'd add the standard inherit guard if possible (see e.g. gnuconfig.eclass for a simple example). [0] https://devmanual.gentoo.org/tools-reference/bash/#single-versus-double-brackets-in-bash Let me know if you need any assistance, etc. thanks, sam signature.asc Description: Message signed with OpenPGP
Re: [gentoo-dev] [PATCH] eclass/vim-plugin.eclass: delete if has_version condition.
> On Wed, 21 Jul 2021, Patrice Clement wrote: > + if [[ -n "${VIM_PLUGIN_HELPFILES}" ]]; then Quotation marks are not necessary here (and three more times below, in the elif lines). signature.asc Description: PGP signature
Re: [gentoo-dev] [PATCH 3/3] 2021-07-21-libxcrypt-migration: new news item for libxcrypt migration changes
Instead of removing the translation, can it be updated? Here's the new text to append: Обратите внимание: если последний раз вы меняли пароль до ~2008 года, он может использовать в /etc/shadow слабую хэш-функцию, такую как md5crypt. При этом дефект в PAM [0][1] может помешать вам войти в систему. Мы рекомендуем вам сменить пароль, чтобы он использовал современные хэши. Данный дефект был исправлен в новой версии PAM, добавленной в дерево. В некоторых случаях Portage может попытаться пересобрать некоторые пакеты в неправильном порядке [2]. Если какой-то пакет не собирается, попробуйте сначала обновить libcrypt и libxcrypt: # emerge -v1 virtual/libcrypt sys-libs/libxcrypt А затем продолжите обновление системы с помощью опции Portage "--keep-going=y". Дополнительные сведения и советы можно найти здесь: * https://wiki.gentoo.org/wiki/Project:Toolchain/libcrypt_implementation * https://bugs.gentoo.org/699422 [0] https://bugs.gentoo.org/802267 [1] https://bugs.gentoo.org/802807 [2] https://bugs.gentoo.org/802210 20.07.2021 22:32, Sam James пишет: > Bug: https://bugs.gentoo.org/699422 > Signed-off-by: Sam James > --- > .../2021-06-30-libxcrypt-migration.ru.txt | 47 --- > .../2021-07-21-libxcrypt-migration.en.txt | 4 +- > 2 files changed, 2 insertions(+), 49 deletions(-) > delete mode 100644 > 2021-06-30-libxcrypt-migration/2021-06-30-libxcrypt-migration.ru.txt > rename 2021-06-30-libxcrypt-migration/2021-06-30-libxcrypt-migration.en.txt > => 2021-07-21-libxcrypt-migration/2021-07-21-libxcrypt-migration.en.txt (98%) > > diff --git > a/2021-06-30-libxcrypt-migration/2021-06-30-libxcrypt-migration.ru.txt > b/2021-06-30-libxcrypt-migration/2021-06-30-libxcrypt-migration.ru.txt > deleted file mode 100644 > index d52db11..000 > --- a/2021-06-30-libxcrypt-migration/2021-06-30-libxcrypt-migration.ru.txt > +++ /dev/null > @@ -1,47 +0,0 @@ > -Title: Миграция в ~arch с glibc[crypt] на libxcrypt > -Author: Andreas K. Hüttel > -Author: Sam James > -Translator: Alexey Sokolov > -Posted: 2021-06-30 > -Revision: 1 > -News-Item-Format: 2.0 > - > -Реализация библиотеки libcrypt.so в glibc давно устарела и скоро > -будет удалена. > - > -Прочие дистрибутивы годы назад уже переключились на внешнюю > -реализацию под названием libxcrypt. Мы решили последовать их примеру > -и тоже переключиться на libxcrypt. Вначале изменения затронут системы > -на ~arch. > - > -Это будет обычное обновление, и, скорее всего, вам не нужно будет > -предпринимать никаких действий, и проблем возникнуть не должно. > - > -Однако, мы рекомендуем сперва *полностью* обновить систему. > -Это стандартная рекомендация, но в этом конкретном случае > -более простой граф зависимостей поможет portage вычислить > -порядок обновлений. > - > -Так что, чтобы упростить процесс обновления, пожалуйста, > -обновите систему сейчас, до начала самой миграции. > - > -Для пользователей ~arch изменение произойдёт 14 июля 2021, > -пользователи стабильной ветки перейдут на libxcrypt позже. > - > -Если по какой-либо причине вы *не* хотите пока переходить > -на libxcrypt (всего лишь отлагая неизбежное), выполните > -следующие действия: > -* размаскируйте и включите USE-флаг crypt пакета sys-libs/glibc > -* замаскируйте USE-флаг system пакета sys-libs/libxcrypt > -* замаскируйте >=virtual/libcrypt-2 > - > -Если вы хотите перейти на libxcrypt уже, точная процедура > -описана в wiki (см. ниже), но суть такая: > -* принудительно выключите USE-флаг crypt пакета sys-libs/glibc > -* размаскируйте USE-флаги system и, если требуется, split-usr > - пакета sys-libs/libxcrypt > -* размаскируйте ~virtual/libcrypt-2 > - > -Дополнительные сведения можно найти здесь: > -* https://wiki.gentoo.org/wiki/Project:Toolchain/libcrypt_implementation > -* https://bugs.gentoo.org/699422 > diff --git > a/2021-06-30-libxcrypt-migration/2021-06-30-libxcrypt-migration.en.txt > b/2021-07-21-libxcrypt-migration/2021-07-21-libxcrypt-migration.en.txt > similarity index 98% > rename from > 2021-06-30-libxcrypt-migration/2021-06-30-libxcrypt-migration.en.txt > rename to 2021-07-21-libxcrypt-migration/2021-07-21-libxcrypt-migration.en.txt > index fb16a29..1a9ea96 100644 > --- a/2021-06-30-libxcrypt-migration/2021-06-30-libxcrypt-migration.en.txt > +++ b/2021-07-21-libxcrypt-migration/2021-07-21-libxcrypt-migration.en.txt > @@ -1,8 +1,8 @@ > Title: migrating from glibc[crypt] to libxcrypt in ~arch > Author: Andreas K. Hüttel > Author: Sam James > -Posted: 2021-06-30 > -Revision: 2 > +Posted: 2021-07-21 > +Revision: 1 > News-Item-Format: 2.0 > > The implementation of libcrypt.so within glibc has been deprecated > -- Best regards, Alexey "DarthGandalf" Sokolov
[gentoo-dev] [PATCH] eclass/vim-plugin.eclass: delete if has_version condition.
... and replace it with a test against the REPLACING_VERSIONS variable. See https://projects.gentoo.org/pms/8/pms.html#x1-10900011.1. Patch courtesy of Arfrever. Closes: https://github.com/gentoo/gentoo/pull/21733 Signed-off-by: Patrice Clement --- eclass/vim-plugin.eclass | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/eclass/vim-plugin.eclass b/eclass/vim-plugin.eclass index 6b72d66111d..460edcce3eb 100644 --- a/eclass/vim-plugin.eclass +++ b/eclass/vim-plugin.eclass @@ -126,31 +126,31 @@ update_vim_afterscripts() { display_vim_plugin_help() { local h - if ! has_version ${CATEGORY}/${PN} ; then - if [[ -n "${VIM_PLUGIN_HELPFILES}" ]] ; then + if [[ -z ${REPLACING_VERSIONS} ]]; then + if [[ -n "${VIM_PLUGIN_HELPFILES}" ]]; then elog " " elog "This plugin provides documentation via vim's help system. To" elog "view it, use:" - for h in ${VIM_PLUGIN_HELPFILES} ; do + for h in ${VIM_PLUGIN_HELPFILES}; do elog ":help ${h}" done elog " " - elif [[ -n "${VIM_PLUGIN_HELPTEXT}" ]] ; then + elif [[ -n "${VIM_PLUGIN_HELPTEXT}" ]]; then elog " " while read h ; do elog "$h" done <<<"${VIM_PLUGIN_HELPTEXT}" elog " " - elif [[ -n "${VIM_PLUGIN_HELPURI}" ]] ; then + elif [[ -n "${VIM_PLUGIN_HELPURI}" ]]; then elog " " elog "Documentation for this plugin is available online at:" elog "${VIM_PLUGIN_HELPURI}" elog " " fi - if has "filetype" "${VIM_PLUGIN_MESSAGES}" ; then + if has "filetype" "${VIM_PLUGIN_MESSAGES}"; then elog "This plugin makes use of filetype settings. To enable these," elog "add lines like:" elog "filetype plugin on" -- 2.31.1
Re: [gentoo-dev] [PATCH v2] xdg.eclass: add EAPI 8 support
> On Wed, 21 Jul 2021, Florian Schmaus wrote: > case "${EAPI:-0}" in This could be simplified to ${EAPI} (and no quotation marks). > 4|5|6|7) > - EXPORT_FUNCTIONS src_prepare pkg_preinst pkg_postinst pkg_postrm > + # src_prepare is only exported in EAPI < 8. > + EXPORT_FUNCTIONS src_prepare > + ;& The ;& terminator is a new Bash feature and cannot be used in EAPIs older than 6. (Easy to fix: Simply move the following EXPORT_FUNCTIONS below the case block.) > + 8) > + EXPORT_FUNCTIONS pkg_preinst pkg_postinst pkg_postrm > ;; > *) die "EAPI=${EAPI} is not supported" ;; Please prepend "${ECLASS}: " to the die message. > esac > # @FUNCTION: xdg_src_prepare > # @DESCRIPTION: > # Prepare sources to work with XDG standards. > +# Note that this function is only exported in EAPIs < 8. > xdg_src_prepare() { > xdg_environment_reset I wonder, should the function be defined in EAPI 8 then? It calls default, so presumably ebuilds would rather call xdg_environment_reset directly? Ulrich signature.asc Description: PGP signature
[gentoo-dev] [PATCH v2] xdg.eclass: add EAPI 8 support
Note that this removes the export of src_prepare in EPAI 8 as requested by ionen: 1. remove src_prepare export in EAPI-8 While "some" packages need xdg_environment_reset, most don't because the eclass is often only inherited to handle icons/.desktop and this just needlessly overwrite the src_prepare of other eclasses requiring more careful inherit ordering (e.g. inherit xdg cmake). I'd prefer it was clear when a package need this by calling xdg_environment_reset directly. Unless there is a non-trivial amount of packages that need it (e.g. for tests) that I'm not aware of. Signed-off-by: Florian Schmaus --- Notes: - Do not longer export src_prepare in EAPI 8 (as requested by ionen) eclass/xdg.eclass | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/eclass/xdg.eclass b/eclass/xdg.eclass index 219be712e84d..ce2d337bff5c 100644 --- a/eclass/xdg.eclass +++ b/eclass/xdg.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: xdg.eclass @@ -6,7 +6,7 @@ # freedesktop-b...@gentoo.org # @AUTHOR: # Original author: Gilles Dartiguelongue -# @SUPPORTED_EAPIS: 4 5 6 7 +# @SUPPORTED_EAPIS: 4 5 6 7 8 # @BLURB: Provides phases for XDG compliant packages. # @DESCRIPTION: # Utility eclass to update the desktop, icon and shared mime info as laid @@ -16,22 +16,36 @@ inherit xdg-utils case "${EAPI:-0}" in 4|5|6|7) - EXPORT_FUNCTIONS src_prepare pkg_preinst pkg_postinst pkg_postrm + # src_prepare is only exported in EAPI < 8. + EXPORT_FUNCTIONS src_prepare + ;& + 8) + EXPORT_FUNCTIONS pkg_preinst pkg_postinst pkg_postrm ;; *) die "EAPI=${EAPI} is not supported" ;; esac # Avoid dependency loop as both depend on glib-2 if [[ ${CATEGORY}/${P} != dev-libs/glib-2.* ]] ; then -DEPEND=" +_XDG_DEPEND=" dev-util/desktop-file-utils x11-misc/shared-mime-info " + +case "${EAPI}" in + 4|5|6|7) + DEPEND="${_XDG_DEPEND}" + ;; + *) + IDEPEND="${_XDG_DEPEND}" + ;; +esac fi # @FUNCTION: xdg_src_prepare # @DESCRIPTION: # Prepare sources to work with XDG standards. +# Note that this function is only exported in EAPIs < 8. xdg_src_prepare() { xdg_environment_reset -- 2.31.1