From f5d65beeb72ecdc188f55ada4a3eb93670cc9147 Mon Sep 17 00:00:00 2001 From: sergio Date: Fri, 10 Jul 2026 22:44:18 -0400 Subject: [PATCH] =?UTF-8?q?base-system:=20tzdata=20construye=20=E2=80=94?= =?UTF-8?q?=20zoneinfo=20(598=20zonas)=20desde=20eggert/tz=20git=20pineado?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit b3:6b4f0397. Raíz del fallo: el tarball IANA tzcode NO trae los datos de zona (y el combinado es .tar.lz sin lzip acá). Cambié [source] a git github.com/eggert/tz @ tag 2026b (código+datos juntos, commit fijo ADR 0006), quité los patches de posixtz (no lo construimos), fases = zic → DESTDIR posix_only. Habilita la zona horaria real del instalador interactivo. --- recipes/incoming-clib/tzdata.toml | 55 +++++++++++-------------------- 1 file changed, 20 insertions(+), 35 deletions(-) diff --git a/recipes/incoming-clib/tzdata.toml b/recipes/incoming-clib/tzdata.toml index b3e875b4..de7e9530 100644 --- a/recipes/incoming-clib/tzdata.toml +++ b/recipes/incoming-clib/tzdata.toml @@ -1,15 +1,20 @@ -# Importada de Alpine aports por `hammer import-alpine` (Etapa G). PUNTO DE PARTIDA — pero -# YA trae los parches de musl de Alpine (lo que un import de nix pierde). Pendiente: el -# sha256 del tarball (el wrapper lo calcula), y adaptar build/install del shell de abuild. +# Base de zonas horarias (IANA tz). +# +# El tarball `tzcode2026b.tar.gz` de IANA trae SÓLO el código (zic.c, Makefile) y el +# `tzdata2026b.tar.gz` SÓLO los datos (africa, asia, ...). Como hammer fija una única +# fuente por receta y el tarball combinado de IANA es `.tar.lz` (lzip no disponible), +# usamos el árbol git de eggert/tz —que contiene código + datos juntos— pineado al tag +# 2026b (ADR 0006: commit fijo, nunca HEAD). +# +# Objetivo: poblar /usr/share/zoneinfo/* con `zic`. NO empaquetamos el binario +# zic/zdump/posixtz, sólo las zonas compiladas. Por eso quitamos los parches de Alpine +# de `posixtz` (no lo construimos). name = "tzdata" version = "2026b" [source] -tarball = "https://www.iana.org/time-zones/repository/releases/tzcode2026b.tar.gz" -# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine: -# sha512 = "55b44d52a83c9db151be32c3d78376ea7f9d4311ef15ed6fe34b855b08fc546531e51309d178d9c175a6d5d7d0b058440e45a55d200ca8925e3798dac9bc739f" -sha256 = "37e9ed8427f5d3521c22fc58e293cbfb043d70eedf1003870b33f363f61ca344" -patches = ["0001-posixtz-ensure-the-file-offset-we-pass-to-lseek-is-o.patch", "0002-fix-implicit-declaration-warnings-by-including-strin.patch"] +repo = "https://github.com/eggert/tz" +commit = "48c25a1ba86cb602990c0573aba7795417931bb4" # tag 2026b (annotated → commit) [build] compiler = "zig-cc" @@ -18,34 +23,14 @@ link = "static" flags = [] [build.phases] -# de build() de Alpine (traducido; el lab provee $CBUILD/$CHOST — Etapa G Fase 3; revisá --shared para estático): +# El Makefile de tz compila `zic` (C estándar, sin deps externas). VERSION lo pasamos a +# mano porque el árbol se materializa vía `git archive` (sin .git para `git describe`). compile = ''' -_abuild_phase() { -make cc="${CC:-gcc}" CFLAGS="$CFLAGS -DHAVE_STDINT_H=1" \ - TZDIR="/usr/share/zoneinfo" - - make -C "$builddir"/posixtz-$_ptzver posixtz -} -_abuild_phase +make CC="$CC" LDFLAGS="$LDFLAGS" VERSION=2026b zic ''' -# de package() de Alpine (traducido $pkgdir→/out): +# `posix_only` genera tzdata.zi + leapseconds (vía awk, que busybox awk resuelve) y corre +# `zic -d $DESTDIR$TZDIR tzdata.zi` → deja las zonas en /out/usr/share/zoneinfo. install = ''' -_abuild_phase() { -./zic -b fat -y ./yearistype -d "/out"/usr/share/zoneinfo $_timezones - ./zic -b fat -y ./yearistype -d "/out"/usr/share/zoneinfo/right -L leapseconds $_timezones - #./zic -b fat -y ./yearistype -d "/out"/usr/share/zoneinfo/posix $_timezones - - ./zic -b fat -y ./yearistype -d "/out"/usr/share/zoneinfo -p America/New_York - install -m444 -t "/out"/usr/share/zoneinfo iso3166.tab zone1970.tab zone.tab - - install -Dm755 -t "/out"/usr/sbin zic zdump - - install -Dm644 -t "/out"/usr/share/man/man8 zic.8 zdump.8 - - rm -f "/out"/usr/share/zoneinfo/localtime - install -Dm755 -t "/out"/usr/bin "$srcdir"/posixtz-$_ptzver/posixtz - - install -Dm644 -t "/out"/usr/share/zoneinfo "$srcdir"/leap-seconds.list -} -_abuild_phase +make CC="$CC" LDFLAGS="$LDFLAGS" VERSION=2026b \ + DESTDIR=/out TZDIR=/usr/share/zoneinfo posix_only '''