GithubHelp home page GithubHelp logo

Comments (8)

andyshinn avatar andyshinn commented on June 11, 2024

I'm pretty sure I was stripping out the i18n and locale stuff because it was so large (https://github.com/andyshinn/alpine-pkg-glibc/blob/master/APKBUILD#L25). So, I think the easy fix for this is to just have another sub-package (glibc-locale or glibc-i18n) that has the /usr/glibc-compat/share/i18n bits. Does that solve this issue?

from alpine-pkg-glibc.

frol avatar frol commented on June 11, 2024

I didn't ask for i18n. POSIX and UTF-8 files take less than 1MB. However, having a package with all locales might also be a good idea, but I would still prefer to have C.UTF-8 in the basic packaging.

from alpine-pkg-glibc.

andyshinn avatar andyshinn commented on June 11, 2024

Isn't the i18n stuff a requirement for generating locales? Or are you suggesting to generate them and package them so they can be installed without needing to be generated?

There are a couple paths to take that I can see:

  • One package with i18n and bins (or just a separate i18n package the requires the bins package) so they can be generated.
  • A separate i18n package and pre-generated locales package.
  • Separated locales packages per-locale.

I'm wondering which might be most flexible. Which are you preferring?

from alpine-pkg-glibc.

frol avatar frol commented on June 11, 2024

Oh, I'm sorry. There is a file i18n in i18n/locales/ folder, so I was just thinking about that file... and it is not required.

Here is the size of i18n folder with charmaps/UTF-8.gz and locales/POSIX:

$ du -h ./i18n
372K    i18n/charmaps
16K     i18n/locales
392K    i18n

392K is not so much.

I wouldn't ship pre-generated locales as all generated locales end up in /usr/glibc-compat/lib/locale/locale-archive binary file.

Having separate packages for each locale might be too much of a hassle since on my Arch Linux system all locales take 9.7MB altogether.

However, an idea has just come into my mind, we can have all locales in a separate package, which I will install in my Dockerfile, generate C.UTF-8 locale, and remove the package since I cannot imagine someone would re-generate locales inside a Docker container.

from alpine-pkg-glibc.

andyshinn avatar andyshinn commented on June 11, 2024

OK, I'll plan to create a glibc-i18n package that can be used with localdef to generate the locale and then be removed.

Another idea, is there a file or current way to know the locale desired (like a file?). We could make a package trigger to automatically generate the locale after install glibc-i18n.

from alpine-pkg-glibc.

frol avatar frol commented on June 11, 2024

In Arch Linux, they use /etc/locale.conf. However, there is no "standard" way of specifying this, and it is the "init" service responsible for setting up locale for the whole system. Thus, in case of Docker containers, I will have to set LANG env variable as a step in Dockerfile, and also put it in /etc/environment (just for the case when user will do su/sudo inside a container).

from alpine-pkg-glibc.

andyshinn avatar andyshinn commented on June 11, 2024

Give https://github.com/andyshinn/alpine-pkg-glibc/releases/tag/pre a try. I added some information to the README as well.

from alpine-pkg-glibc.

frol avatar frol commented on June 11, 2024

This one seems to be fixed! Great!

from alpine-pkg-glibc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.