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

オープン
#2,196 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
42/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust
領域
cli

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Rust
スター
9
フォーク
2
平均マージ
1日 8時間
マージ済み PR(30日)
309

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

SocketDev/socket-patch のほかの issue

SocketDev/socket-patch の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。