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

Aberta
#2,196 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
42/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
rust
Domínio
cli

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Rust
Estrelas
9
Forks
2
Merge médio
1d 8h
PRs com merge (30d)
309

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de SocketDev/socket-patch

Todas as issues de SocketDev/socket-patch

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.