MakeMaker writes Perl v-string VERSION bytes into generated Makefile
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 57/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- perl
- Área
- build-system
Línea de trabajo
Start in src/main/perl/lib/ExtUtils/MakeMaker.pm and trace how WriteMakefile selects and passes VERSION into Makefile generation. Add a focused regression test for VERSION = v0.1.0 that checks generated version fields and recipes contain printable text without control bytes, then confirm the generated Makefile works with make. The issue notes that the full upstream suite cannot run under the available system Perl.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
File-Util-SecureDir v0.1.0 fails during the PerlOnJava MakeMaker build, before its test suite starts. Its Makefile.PL passes a dotted version string literal as the MakeMaker VERSION:
WriteMakefile(
NAME => 'File::Util::SecureDir',
VERSION => v0.1.0,
...
);
PerlOnJava writes the literal's internal v-string bytes into the generated Makefile instead of its printable version representation. The resulting all recipe is malformed, and make exits with a shell unmatched-quote error.
Evidence
CPAN tester run 20261119-133823-51077, distribution LEMBARK/File-Util-SecureDir-v0.1.0.tar.gz:
Makefile.PLcompletes successfully.- The generated Makefile contains NUL/SOH/NUL bytes where the version should be (
VERSION = <NUL><SOH><NUL>). PerlOnJava's MakeMaker diagnostic likewise prints the version as control bytes. - The
allrecipe interpolates that raw value into a quotedechocommand. /usr/bin/makefails before tests with/bin/sh: ... unexpected EOF while looking for matching \".
A minimal WriteMakefile(NAME => 'Probe::Version', VERSION => v0.1.0) probe reproduces the difference: system Perl's ExtUtils::MakeMaker emits the printable VERSION = v0.1.0, while PerlOnJava's generated Makefile has an empty/truncated version field and a recipe containing the raw control bytes.
Root cause
In src/main/perl/lib/ExtUtils/MakeMaker.pm, WriteMakefile selects $version directly from $args{VERSION} (or VERSION_FROM) and passes it into Makefile generation. The value is interpolated into Makefile variables and recipes without converting a Perl v-string to printable version text. A v-string such as v0.1.0 is internally represented as the bytes 00 01 00; embedding those bytes in a shell command causes the shell to see a truncated quoted command.
Proposed fix
Normalize the selected version to printable version text before using it in diagnostics, metadata, DISTVNAME, Makefile variables, and recipes. Use the core version module's parsed version string representation (while preserving ordinary decimal versions). Add a focused regression test that calls WriteMakefile with VERSION => v0.1.0, then verifies the generated Makefile contains a printable version and no embedded NUL/control bytes in version-derived fields or recipes. The generated Makefile should also be usable by make.
Standard Perl comparison and scope
The installed system Perl is 5.34.1, but this distribution declares use v5.36, so its full upstream configure/build/test suite could not be run under the available system Perl. The minimal system-Perl MakeMaker probe did emit the expected printable version. The archived PerlOnJava failure occurs during make all, before any upstream tests execute.
This is a pure-Perl CPAN distribution; there is no XS/native dependency or reverse-dependency count to report. Existing issue #2068 concerns Module::Install::Share staging and does not cover this v-string serialization bug.
- Lenguaje dominante
- Perl
- Estrellas
- 67
- Forks
- 8
- Merge medio
- 5 h 12 min
- PR fusionados (30 d)
- 131
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de fglock/PerlOnJava
-
area:cpan-port bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
fglock/PerlOnJava#2153 ·
Los mantenedores suelen responder en 1 día
-
area:cpan-port area:parser bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
fglock/PerlOnJava#2137 ·
Los mantenedores suelen responder en 1 día
-
area:backend area:cpan-port area:runtime bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
fglock/PerlOnJava#2071 ·
Los mantenedores suelen responder en 1 día
-
area:runtime documentation enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
fglock/PerlOnJava#1579 ·
Los mantenedores suelen responder en 1 día
-
area:cpan-port bug
Dificultad 3/5 1-2 días Aptitud para principiantes 62/100
fglock/PerlOnJava#2157 ·
Los mantenedores suelen responder en 1 día
Todos los issues de fglock/PerlOnJava
Issues similares
-
Dev-output directory preparation accepts file-valued lib/include paths and fails on dangling linksAbiertoteam-cli
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 93/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
inverse-inc/packetfence#9728 ·
Los mantenedores suelen responder en 1 día
-
fix(char-create): show the real reason a character is refusedPosiblemente ocupada @baphomello la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día