Ruby is built without libcrypt on Debian 14 (forky) because `libc6-dev` no longer depends on `libcrypt-dev`

Abierto Apto para principiantes
#534 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
78/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
docker, ruby, shell
Área
build-system

Línea de trabajo

Empieza por los Dockerfiles de las variantes de Debian, especialmente por los archivos 4.0/trixie y 4.0/slim-trixie mencionados en el informe, y sigue sus dependencias de compilación. Reproduce las comprobaciones de configure con las imágenes base forky indicadas; la compilación tiene éxito si encuentra crypt y el Ruby resultante admite el ejemplo de SHA-512 crypt mostrado. Confirma que la dependencia de ejecución ya está presente como libcrypt1, tal como indica el issue.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

This is a heads-up for the time a Debian 14 (forky) variant is added. The current images (trixie, bookworm and alpine) are not affected.

Debian's glibc package dropped the libcrypt-dev dependency from libc6-dev in 2.42-7:

https://salsa.debian.org/glibc-team/glibc/-/commit/10c4a331fb977ae5ae7255e9ee1c9c133f9d9da9

The Dockerfiles do not install libcrypt-dev explicitly, and buildpack-deps:forky does not have it either. On Debian 14 (forky), Ruby's configure then does not find crypt, and the build still succeeds. As a result, String#crypt falls back to the DES-only missing/crypt.c, and libruby.so is not linked to libcrypt.so.1.

I built 4.0/trixie/Dockerfile and 4.0/slim-trixie/Dockerfile with only the FROM line changed to buildpack-deps:forky and debian:forky-slim. Both give the same result:

$ docker build -t local/dl-ruby:4.0-forky forky
... snip ...
checking for crypt in -lcrypt... no
... snip ...
checking for crypt_r... no
... snip ...
$ docker run --rm local/dl-ruby:4.0-forky ruby -e 'p "secret".crypt("$6$saltsalt$")'
"$6/iozuRTIzwY"
$ docker run --rm ruby:4.0 ruby -e 'p "secret".crypt("$6$saltsalt$")'
"$6$saltsalt$TVLlQcbpFVof5W3Yz4DTP6gRstiNuHwwTt6GLc1E5n0U0aDehy0S5knV8wiOQSpT0Y77vwPZN.Pq.H91p5hVO1"

The same thing happened to the rubylang/ruby images when they moved to Ubuntu 26.04, which has the same glibc change. It was fixed by installing libcrypt-dev in the build stage: https://github.com/ruby/docker-images/pull/195

Ubuntu also added libcrypt-dev to build-essential for Ubuntu 26.04 because of this: https://bugs.launchpad.net/bugs/2154780

A possible fix is to add libcrypt-dev to the build dependencies of the Debian variants. libcrypt1 is already in both base images, so nothing is needed at runtime.

Lenguaje dominante
Shell
Estrellas
627
Forks
322
Merge medio
23 h 39 min
PR fusionados (30 d)
2

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de docker-library/ruby

Todos los issues de docker-library/ruby

Issues similares

Más issues de Shell/Bash

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.