ALT Linux Distributions development
 help / color / mirror / Atom feed
From: Michael Shigorin <mike@altlinux.org>
To: devel-distro@lists.altlinux.org
Subject: [devel-distro] %_install_langs (was: история про use/stage2/kms и /use/firmware)
Date: Fri, 25 Sep 2020 13:39:06 +0300
Message-ID: <20200925103905.GE32019@imap.altlinux.org> (raw)
In-Reply-To: <20200922225340.6ab155fd@narod.ru>

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

On Tue, Sep 22, 2020 at 10:53:40PM +0300, Владимир Гусев wrote:
> >И ещё где-то теперь не хватает зависимости на use/firmware,
> >которая при этом тащит огромный firmware-linux (в идеале бы
> >отпилить от него то, что нужно видеокартам, и тащить в инсталер
> >только это).
> В идеале firmware-linux вобще разбить по группам устройств,
> чтобы выбиралось только то, что реально есть.

Чуточку начали, вынеся уж совсем специфику, но там ещё много.
Очень бы помогло, если б в апстриме сделали структуризацию
вроде той, что в самом ядре с раскладкой драйверов учинили --
но, так понимаю, это заметно сложней в плане совместимости.

> P.S. Это касается и других больших монолитных пакетов,
> например локали.  Выбрал языки при инсталляции - те локали и
> подтянулись... Захотел потом добавить еще - доустановилась и
> соответствующая локаль... И т.д.

Здесь смотри на /etc/rpm/macros и %_install_langs -- в нём
можно через двоеточие перечислить, например, ru_RU:en_US.

Т.е. это давно уже реализовано, просто где-то в районе 4.0
решили, что диски в среднем достаточно объёмные, чтобы не
заморачиваться и не морочить пользователям голову; дело в
том, что для _изменения_ списка локалей "на местности"
требуется переустановка _всех_ пакетов, содержащих файлы
локализации, управляемые этим механизмом в rpm.  А если
резать на подпакеты -- тогда попадаем на комбинаторный
взрыв при рассмотрении и других пакетов помимо glibc.

На прошлой неделе попытался сделать набег в эту сторону
в m-p для stage2, пока не преуспел -- слишком поздно
содержимое модифицируется.  Кажется, проверял и с lib/,
только что-то следов той попытки теперь не найду.

Прилагаю заведомо нерабочий патч -- для архива.

-- 
 ---- WBR, Michael Shigorin / http://altlinux.org
  ------ http://opennet.ru / http://anna-news.info

[-- Attachment #2: 0001-install2-handle-_install_langs.patch --]
[-- Type: text/x-patch, Size: 1217 bytes --]

>From 8e44d83773efd20c38298c28165b42ad27f200db Mon Sep 17 00:00:00 2001
From: Michael Shigorin <mike@altlinux.org>
Date: Thu, 17 Sep 2020 22:09:30 +0300
Subject: [PATCH] install2: handle %_install_langs

There's no sense to have locales that the user is unable
to even choose from: one can pass lang=ab_CD by hand but
alterator-{l10n,sysinfo} just won't learn it instantly.

NB: override "%_install_langs all" that might be there,
    both lines available result in all locales installed.
---
 .../install2/install2/scripts.d/50-install2-langs        | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100755 features.in/install2/install2/scripts.d/50-install2-langs

diff --git a/features.in/install2/install2/scripts.d/50-install2-langs b/features.in/install2/install2/scripts.d/50-install2-langs
new file mode 100755
index 000000000..72788dafc
--- /dev/null
+++ b/features.in/install2/install2/scripts.d/50-install2-langs
@@ -0,0 +1,9 @@
+#!/bin/sh
+# restrict available locales to languages
+# with available alterator translations
+# (listed as of alterator-l10n 2.9.74)
+
+mkdir -p "$WORKDIR"/etc/rpm
+cat > "$WORKDIR"/etc/rpm/macros << EOF
+%_install_langs de es kk pt_BR ru tt_RU uk
+EOF
-- 
2.25.4


  reply	other threads:[~2020-09-25 10:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-21 15:37 [devel-distro] [SOLVED] история про use/stage2/kms и /use/firmware Michael Shigorin
2020-09-22 19:53 ` Владимир Гусев
2020-09-25 10:39   ` Michael Shigorin [this message]
2020-09-25 11:05     ` [devel-distro] %_install_langs (was: история про use/stage2/kms и /use/firmware) Sergey V Turchin
2020-09-25 11:26       ` Michael Shigorin
2020-09-25 11:22 ` [devel-distro] [SOLVED] история про use/stage2/kms и /use/firmware Konstantin Lepikhov
2020-09-25 11:25   ` Michael Shigorin
2020-09-28  8:11     ` Konstantin Lepikhov
2020-10-20  9:28     ` Dmitry V. Levin
2020-10-20 10:13       ` Anton V. Boyarshinov
2020-10-20 10:16         ` Dmitry V. Levin
2020-11-09  8:04           ` Michael Shigorin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200925103905.GE32019@imap.altlinux.org \
    --to=mike@altlinux.org \
    --cc=devel-distro@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Distributions development

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel-distro/0 devel-distro/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel-distro devel-distro/ http://lore.altlinux.org/devel-distro \
		devel-distro@lists.altlinux.org devel-distro@lists.altlinux.ru devel-distro@lists.altlinux.com
	public-inbox-index devel-distro

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel-distro


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git