From patchwork Mon Jun 7 08:52:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 43735 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 21EAE383B83B for ; Mon, 7 Jun 2021 08:53:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 21EAE383B83B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1623055984; bh=cX5rz7adOFm1hR9eWYfVQ+gwh1YDO10VyLb1cSsCkD0=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=NtJXd+BjBflxmjXgv5zlkzuKrJ8kQkRBLpoUMt8fi4QfPMjdJW9Z8LEJA7y/KDDLS tEKZnDwngm3NiIA9kukTnl1+9j+/y/L5RG5m/4waHECmuxpS2HQqvXkr+hWAfocy6u j9j0vH2R4kvWHk6bagVkXyfLYx6eVYuQFAy7BfH8= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from bumble.maple.relay.mailchannels.net (bumble.maple.relay.mailchannels.net [23.83.214.25]) by sourceware.org (Postfix) with ESMTPS id DF9F03839C7F for ; Mon, 7 Jun 2021 08:52:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DF9F03839C7F X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 30F5836216D; Mon, 7 Jun 2021 08:52:38 +0000 (UTC) Received: from pdx1-sub0-mail-a36.g.dreamhost.com (100-96-18-89.trex.outbound.svc.cluster.local [100.96.18.89]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 716B8362026; Mon, 7 Jun 2021 08:52:37 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a36.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.96.18.89 (trex/6.3.1); Mon, 07 Jun 2021 08:52:37 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Belong-Whistle: 3ee2458d5938c3b8_1623055957685_3931315420 X-MC-Loop-Signature: 1623055957685:1398925581 X-MC-Ingress-Time: 1623055957685 Received: from pdx1-sub0-mail-a36.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a36.g.dreamhost.com (Postfix) with ESMTP id 9ED4E7F257; Mon, 7 Jun 2021 08:52:36 +0000 (UTC) Received: from rhbox.intra.reserved-bit.com (unknown [1.186.101.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a36.g.dreamhost.com (Postfix) with ESMTPSA id 2FC3D82BC8; Mon, 7 Jun 2021 08:52:33 +0000 (UTC) X-DH-BACKEND: pdx1-sub0-mail-a36 To: libc-alpha@sourceware.org Subject: [PATCH 0/5] gconv module configuration improvements Date: Mon, 7 Jun 2021 14:22:16 +0530 Message-Id: <20210607085221.43612-1-siddhesh@sourceware.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Spam-Status: No, score=-3487.0 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Siddhesh Poyarekar via Libc-alpha From: Siddhesh Poyarekar Reply-To: Siddhesh Poyarekar Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" This patchset proposes to replace the single gconv-modules file in the GCONV_PATH directory with a gconv-modules.d directory with configuration files suffixed with .conf to allow a single module directory to have multiple module configurations. The main intent of this change is to make the installation of modules shipped in glibc more configurable. The change allows the glibc gconv modules to be classified into 'minimal' and 'extra' sets wherein the former are the most commonly used converters, e.g. UTF, ISO8859-1{,5}, etc. and the latter set constitutes everything else. In future, the 'extra' set could could be further subdivided and mapped to languages, allowing finer grained control in distributions over which modules get installed. This has a number of advantages, chief among them being reduction in size. There is the secondary advantage of the possibility of reducing attack surface by removing all 'extra' modules since many of them are not as extensively used and hence haven't had as much testing. The patchset has been tested in Fedora on x86_64 and s390x. Siddhesh Poyarekar (5): iconvconfig: Make file handling more general purpose iconvconfig: Read configuration from gconv-modules.d subdirectory gconv_conf: Read configuration files in gconv-modules.d iconvdata: Move gconv-modules configuration to gconv-modules.conf iconvdata: Split out non-essential gconv module configuration iconv/gconv_conf.c | 49 +++++++- iconv/iconvconfig.c | 103 ++++++++++++---- iconvdata/Makefile | 46 ++++--- ...gconv-modules => gconv-modules-extra.conf} | 83 ------------- iconvdata/gconv-modules.conf | 115 ++++++++++++++++++ localedata/Makefile | 4 +- sysdeps/s390/Makefile | 16 ++- ...{gconv-modules => gconv-modules-s390.conf} | 0 8 files changed, 280 insertions(+), 136 deletions(-) rename iconvdata/{gconv-modules => gconv-modules-extra.conf} (95%) create mode 100644 iconvdata/gconv-modules.conf rename sysdeps/s390/{gconv-modules => gconv-modules-s390.conf} (100%)