Files
hammer/recipes/parted.toml
T
sergio 8691f3139f base-system: parted usa la libuuid REAL de util-linux (quita el hack horneado)
b3:d73a5286. util-linux ya compila y provee libuuid.a + uuid.pc; parted la halla vía
PKG_CHECK_MODULES/pkgconf (dep de build util-linux). Elimina la libuuid v4 mínima que se
horneaba en la fase configure cuando util-linux estaba roto. Verificado: parted --version OK.
2026-07-10 23:24:15 -04:00

56 lines
2.3 KiB
TOML

# 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.
name = "parted"
version = "3.7"
[source]
tarball = "https://ftp.gnu.org/gnu/parted/parted-3.7.tar.xz"
# FIXME sha256: el wrapper lo calcula (Alpine publica sha512). sha512 de Alpine:
# sha512 = "941afeb68edb45c33fb797f4c320ed1aa1de2e8b35defa5d742aa6894618e6729a1440e3ee0824e8710bc58eb42b85d77f28ba083d92d4ea3f3f65f37c8307b0"
sha256 = "008de57561a4f3c25a0648e66ed11e7b30be493889b64334a6d70f2c1951ef7b"
patches = ["fix-includes.patch", "fix-libintl-header-s390x.patch", "parted-include-sysmacros.patch", "fix-truncate-tests.patch", "make-tests.patch", "skip-duplicate-bsd-test-on-s390x.patch"]
[build]
compiler = "zig-cc"
target = "x86_64-linux-musl"
link = "static"
flags = []
[build.phases]
# fase configure EXPLÍCITA (gotcha rsync): sin ella hammer autogenera su propio ./configure
# e ignora estos flags.
#
# libuuid: parted la EXIGE (uuid_generate para los GUID de particiones GPT). La provee la
# receta `util-linux` (dep de build): el lab materializa su usr/{lib/libuuid.a,include/uuid,
# lib/pkgconfig/uuid.pc} en /usr del sandbox ⇒ el PKG_CHECK_MODULES([UUID],[uuid]) de parted la
# halla vía pkgconf, sin lib horneada. (Antes horneábamos una uuid v4 mínima porque util-linux
# no compilaba; ya compila — 2026-07-10.)
configure = '''
set -e
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--disable-device-mapper \
--disable-nls \
--disable-shared \
--enable-static \
--without-readline
'''
# -all-static: libtool ignora el -static del lab para el ejecutable final (queda musl-dinámico
# y no corre fuera del sandbox). Se inyecta SÓLO acá (en configure rompería los link-tests, que
# no pasan por libtool). La libuuid.a real de util-linux linka estática sin más.
compile = '''
make LDFLAGS="-all-static"
'''
# de package() de Alpine (traducido $pkgdir→/out):
install = '''
make DESTDIR="/out" install
'''
# lvm2 (device-mapper) ausente y opcional → --disable-device-mapper. libuuid real vía util-linux
# (dep de build); pkgconf resuelve uuid.pc. bash/ncurses/readline innecesarios al binario estático.
[deps]
build = ["util-linux", "linux-headers", "pkgconf"]