From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6558749580291211264 X-Received: by 2002:a1c:8985:: with SMTP id l127-v6mr1035796wmd.24.1527505009625; Mon, 28 May 2018 03:56:49 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:9314:: with SMTP id v20-v6ls5289141wmd.7.canary-gmail; Mon, 28 May 2018 03:56:49 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIbRLp0usvuW0Xb6v2sdyjVyIZxMiU/zs+n8+0blmOgSKPt6vmTVevTtC+VMtWSmIrM++tQ X-Received: by 2002:a1c:f910:: with SMTP id x16-v6mr1140165wmh.11.1527505009224; Mon, 28 May 2018 03:56:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527505009; cv=none; d=google.com; s=arc-20160816; b=n85vpsPg6u+i6J8EG21/xU2tnNOiNmQw+SBLdvGPIoLOp82MuMzOL2zIpe0Ayddxic r1/18DwPslWVoWvzInlzmJfvNF4kksfdFXszVdrfr6dyvHEn+EIOC4qzTkehoOp8/Va3 OzujYk3DtZUuxTM3Q7GEv7vWvzNG0DQZfWuXWEC7qOYWtBODMZ9ZTJlJkIqVy9Yjj4Ub /thmm3TXE2sbGRZ81hbSaC2E7RTEeETmPN1qzUvinkUJhBKJP5VmciOG11Dmo/w/LhAj Cke0NN0FzuCoi1FDLGkxsXB0Gzo1Rn3cE5JSF95KDKjR8o/b9FAW1rna6if2wlLyGuNm yLxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=XSmJaTePeu7DFKAJGEfO004vbtjegNExWkgOrOyxN7A=; b=ao9a2qVppB2km6eFo+++cx0F+Dxi20q2icAYRcu0KyWTPgz/3ENkvSZyoeED5Dwi1B JwrMpHkdnITPkQ4v/MG5PB9l1ITe7fuLTFOJ0Q4dg+ZNQCauLuSKlE1QBsA9E4Ssmgiv hnMdFfsdmO1BZs1MbDHdKc4WkuHGXgEvTyYoIWZ6dsWsN2Jm01H3v1IK201g3TR2bNGE DsVChYQCpGuXNbr7Y6SlLFKnkMh7n4OEGfdxtacYat+dQcB4fG0HUj0+MaAyA1j//dsX sKBnLb89THGmZ1FhTKcWs8D/KKHaKu9DvtNpMQHMAZFmn/3G+1ChUo2emS6ZfSigXN2Q IXlQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com Return-Path: Received: from lizzard.sbs.de (lizzard.sbs.de. [194.138.37.39]) by gmr-mx.google.com with ESMTPS id b8-v6si167934wrn.2.2018.05.28.03.56.49 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 May 2018 03:56:49 -0700 (PDT) Received-SPF: pass (google.com: domain of claudius.heine.ext@siemens.com designates 194.138.37.39 as permitted sender) client-ip=194.138.37.39; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id w4SAumVE013280 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 28 May 2018 12:56:48 +0200 Received: from ring.ppmd.siemens.net (linux-ses-ext02.ppmd.siemens.net [139.25.69.69]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id w4SAumAh019491; Mon, 28 May 2018 12:56:48 +0200 From: claudius.heine.ext@siemens.com To: isar-users@googlegroups.com Cc: Claudius Heine Subject: [PATCH v4 2/3] meta/isar-cfg-localepurge: added locale purge recipe Date: Mon, 28 May 2018 12:56:42 +0200 Message-Id: <20180528105643.23518-3-claudius.heine.ext@siemens.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528105643.23518-1-claudius.heine.ext@siemens.com> References: <20180528105643.23518-1-claudius.heine.ext@siemens.com> X-TUID: Yxp4MYRV5GJn From: Claudius Heine The package 'isar-cfg-localepurge' is used to set the locales of the root file system and purge all not required locales. Signed-off-by: Claudius Heine --- .../isar-cfg-localepurge/files/locale.debconf | 12 ++++++++ .../isar-cfg-localepurge/files/locale.gen | 1 + .../isar-cfg-localepurge/files/postinst | 30 +++++++++++++++++++ .../isar-cfg-localepurge.bb | 19 ++++++++++++ 4 files changed, 62 insertions(+) create mode 100644 meta/recipes-support/isar-cfg-localepurge/files/locale.debconf create mode 100644 meta/recipes-support/isar-cfg-localepurge/files/locale.gen create mode 100644 meta/recipes-support/isar-cfg-localepurge/files/postinst create mode 100644 meta/recipes-support/isar-cfg-localepurge/isar-cfg-localepurge.bb diff --git a/meta/recipes-support/isar-cfg-localepurge/files/locale.debconf b/meta/recipes-support/isar-cfg-localepurge/files/locale.debconf new file mode 100644 index 0000000..169c071 --- /dev/null +++ b/meta/recipes-support/isar-cfg-localepurge/files/locale.debconf @@ -0,0 +1,12 @@ +locales locales/locales_to_be_generated multiselect en_US.UTF-8 UTF-8 +locales locales/default_environment_locale select en_US.UTF-8 + +localepurge localepurge/dontbothernew boolean true +localepurge localepurge/nopurge multiselect en, en_US, en_US.UTF-8 +localepurge localepurge/use-dpkg-feature boolean false +localepurge localepurge/verbose boolean false +localepurge localepurge/showfreedspace boolean false +localepurge localepurge/none_selected boolean false +localepurge localepurge/mandelete boolean true +localepurge localepurge/quickndirtycalc boolean false +localepurge localepurge/remove_no note diff --git a/meta/recipes-support/isar-cfg-localepurge/files/locale.gen b/meta/recipes-support/isar-cfg-localepurge/files/locale.gen new file mode 100644 index 0000000..a66d814 --- /dev/null +++ b/meta/recipes-support/isar-cfg-localepurge/files/locale.gen @@ -0,0 +1 @@ +en_US.UTF-8 UTF-8 diff --git a/meta/recipes-support/isar-cfg-localepurge/files/postinst b/meta/recipes-support/isar-cfg-localepurge/files/postinst new file mode 100644 index 0000000..092f12e --- /dev/null +++ b/meta/recipes-support/isar-cfg-localepurge/files/postinst @@ -0,0 +1,30 @@ +#!/bin/sh +set -e + +cat /usr/lib/isar-cfg-localepurge/locale.gen \ + >> /etc/locale.gen + +debconf-set-selections /usr/lib/isar-cfg-localepurge/locale.debconf + +# locale.nopurge needs to be removed before localepurge is reconfigured. +# Otherwise it would set the debconf to the values from the locale.nopurge +# file again. +rm -rf /etc/locale.nopurge +dpkg-reconfigure -f noninteractive locales localepurge + +# When /etc/locale.nopurge was removed before dpkg-reconfigure, it writes +# the new configuration with the '.ucf-dist' postfix +mv /etc/locale.nopurge.ucf-dist /etc/locale.nopurge + +# Now reconfigure it localpurge again, because otherwise it would complain: +# Some new locales have appeared on your system: +# +# bal be@latin en@boldquot en@quot sr@latin +# +# They will not be touched until you reconfigure localepurge +# with the following command: +# +# dpkg-reconfigure localepurge +dpkg-reconfigure -f noninteractive localepurge + +localepurge diff --git a/meta/recipes-support/isar-cfg-localepurge/isar-cfg-localepurge.bb b/meta/recipes-support/isar-cfg-localepurge/isar-cfg-localepurge.bb new file mode 100644 index 0000000..d2cf1f3 --- /dev/null +++ b/meta/recipes-support/isar-cfg-localepurge/isar-cfg-localepurge.bb @@ -0,0 +1,19 @@ +# This software is a part of ISAR. + +DESCRIPTION = "Isar configuration package for locale and localepurge" +MAINTAINER = "isar-users " +DEBIAN_DEPENDS = "localepurge" + +SRC_URI = "file://locale.debconf \ + file://locale.gen \ + file://postinst" + +inherit dpkg-raw + +do_install() { + install -v -d ${D}/usr/lib/${PN} + install -v -m 644 ${WORKDIR}/locale.debconf \ + ${D}/usr/lib/${PN}/locale.debconf + install -v -m 644 ${WORKDIR}/locale.gen \ + ${D}/usr/lib/${PN}/locale.gen +} -- 2.17.0