A file added by a patch is always created 0o444: the manifest has no per-file mode, so a patch cannot add an executable or a shared library

Abierto
#2,196 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
42/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
rust
Área
cli

Línea de trabajo

Start in crates/socket-patch-core/src/patch/apply.rs, where a newly added file is staged with StageMode::ReadOnly (around line 878, with the mode described near line 608). Then read crates/socket-patch-core/src/manifest/schema.rs, where PatchFileInfo holds only beforeHash and afterHash. Done means an optional per-file mode in the manifest, absent meaning today's 0o444 behaviour, applied when the file is created and restored on rollback. The maintainer has not yet chosen between a general mode and a single execute-bit boolean, so confirm that first.

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

Descripción

agent:triaged enhancement priority:p3

Summary

A file that a patch ADDS is written with mode 0o444 (StageMode::ReadOnly, crates/socket-patch-core/src/patch/apply.rs:878; the mode is described at apply.rs:608). The manifest has nowhere to say otherwise: PatchFileInfo holds only beforeHash and afterHash (crates/socket-patch-core/src/manifest/schema.rs:23). An existing file keeps its own mode, so this only affects new files.

Why this matters

A patch cannot add an executable script, or a new shared library where the platform expects the execute bit. For patches made of rebuilt artifacts this comes up when a fix adds a helper binary or splits a library.

Suggested direction

An optional per-file mode in the manifest (absent = today's behaviour), applied on create and restored by rollback. If a general mode is too broad, a single boolean for the execute bit would cover the cases above.

Lenguaje dominante
Rust
Estrellas
9
Forks
2
Merge medio
1 d 8 h
PR fusionados (30 d)
309

Preparar el entorno

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 SocketDev/socket-patch

Todos los issues de SocketDev/socket-patch

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.