Publish shasum cli compatible hash files

未关闭
#1,122 0 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
半天
新手友好度
45/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
shell
领域
release

调研方向

The payload names only the existing *_hashes.txt release files, so start by finding where the release pipeline writes them. The issue gives the target format: running shasum on the binaries and redirecting output yields lines of hash filename. Done when an extra shasum-format file is published with each release and shasum --check passes on it.

由索引模型根据 Issue 内容生成。

描述

enhancement

Currently the hash files published with each binary release are in a format that isn't consumable by the shasum perl script (that is commonly distributed with many Linux distributions and platforms) when using its --check option. When automating the download and hash check of a new version, there is some unpleasant parsing and rewriting of the current *_hashes.txt files to create a format which can be read correctly by shasum --check.

It would be really useful if binary releases could include an additional hash file in a shasum compatible format. From the shasum man page:

When verifying SHA-512/224 or SHA-512/256 checksums, indicate the
algorithm explicitly using the -a option, e.g.

shasum -a 512224 -c checksumfile

The sums are computed as described in FIPS PUB 180-4. When checking,
the input should be a former output of this program. The default
mode is to print a line with checksum, a character indicating type
(*' for binary, ' for text, U' for UNIVERSAL, ^' for BITS),
and name for each FILE. The line starts with a \' character if the FILE name contains either newlines or backslashes, which are then replaced by the two-character sequences \n' and `\' respectively.

The file can be generated by shasum itself to ensure the format is correct. A simple example (note this uses the default sha1 but other algorithms are supported):

$ touch testfile.txt
$ shasum testfile.txt
da39a3ee5e6b4b0d3255bfef95601890afd80709  testfile.txt
$ shasum testfile.txt > shasums.txt
$ shasum --check shasums.txt
testfile.txt: OK
$ cat shasums.txt
da39a3ee5e6b4b0d3255bfef95601890afd80709  testfile.txt
主要语言
Python
星标
638
派生
138
平均合并
8 小时 27 分钟
30 天内合并 PR
8

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Backblaze/B2_Command_Line_Tool 的其他 Issue

查看 Backblaze/B2_Command_Line_Tool 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。