mbox series

[0/5] gconv module configuration improvements

Message ID 20210607085221.43612-1-siddhesh@sourceware.org
Headers show
Series gconv module configuration improvements | expand


Siddhesh Poyarekar June 7, 2021, 8:52 a.m. UTC
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%)