cloudflare / cloudflare/pages-build-image

v2 build system is missing locales

Open
#8 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
No language data
Stars
43
Forks
1
PR merge metrics
No merged PRs in 30d

Description

V2 build system is missing locales (`apt install locales`), resulting in any build that contains calls to [`setlocale`](https://man7.org/linux/man-pages/man3/setlocale.3.html) defunct (e.g. [Pelican](https://getpelican.com/)-based build with its setting `LOCALE = ['en_US.UTF-8']` or its `DATE_FORMATS`). Only locale `"C"` works, but this then, among other issues, limits rendering datetimes to American standards, which are far from universal. 😅

Similarly reported in this blog post: https://herrickfang.com/2023/11/26/cloudflare-workers/

The issue obviously cannot be worked around with `UNSTABLE_PRE_BUILD=` (due to disabled sudo) nor asdf.

This was not an issue in v1.

Contributor guide

Open the contributing guide

Research direction

Start by locating the v2 build-image definition and its package-installation setup; the issue identifies `apt install locales` and failures involving `setlocale`, including Pelican's `en_US.UTF-8` setting. Done means v2 builds support non-C locales such as `en_US.UTF-8` without requiring sudo, an unstable pre-build command, or asdf.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.