Publish shasum cli compatible hash files

Đang mở
#1,122 0 bình luận 2 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
shell
Lĩnh vực
release

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
Python
Star
638
Fork
138
Merge trung bình
8 giờ 27 phút
Pull request đã merge (30 ngày)
8

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Backblaze/B2_Command_Line_Tool

Tất cả issue của Backblaze/B2_Command_Line_Tool

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.