From b022c819d7742683f05fcfe88dd6e10deacdf24d Mon Sep 17 00:00:00 2001 From: Harald Sitter Date: Tue, 15 Apr 2025 15:01:27 +0200 Subject: [PATCH] try to use glibc-locales instead of locale-gen shaves at least 10 minutes off the build time while only costing about 20 mib when installed (even less when compressed) --- mkosi.conf.d/00-packages-core.conf | 1 + mkosi.prepare.d/10-locale-archive.sh.chroot | 21 --------------------- 2 files changed, 1 insertion(+), 21 deletions(-) delete mode 100755 mkosi.prepare.d/10-locale-archive.sh.chroot diff --git a/mkosi.conf.d/00-packages-core.conf b/mkosi.conf.d/00-packages-core.conf index 90289c1..ea8be5e 100644 --- a/mkosi.conf.d/00-packages-core.conf +++ b/mkosi.conf.d/00-packages-core.conf @@ -5,6 +5,7 @@ Packages=archlinux-keyring base btrfs-progs + glibc-locales # instead of running locale-gen as part of our build we install a package that has all locales pre-generated kernel-modules-hook kmod linux diff --git a/mkosi.prepare.d/10-locale-archive.sh.chroot b/mkosi.prepare.d/10-locale-archive.sh.chroot deleted file mode 100755 index 6a23bc6..0000000 --- a/mkosi.prepare.d/10-locale-archive.sh.chroot +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL -# SPDX-FileCopyrightText: 2025 Harald Sitter - -set -ex - -if [ "$1" = "final" ]; then - # Generate all locales. Because /usr/lib is not writable in the target system we need to ship all locales pre-generated. - # Sucks. But oh well. - # We can at least limit to UTF-8 variants because nobody uses the rest and Qt doesn't even work with them. - grep UTF-8 /usr/share/i18n/SUPPORTED > /etc/locale.gen - - # Also allow overriding the list by setting a LOCALE_GEN environment variable - # in mkosi.local.conf or command line parameters for local builds - if [ -n "$LOCALE_GEN" ]; then - echo "$LOCALE_GEN" > /etc/locale.gen - fi - - locale-gen -fi