install.sh: honor PLANNOTATOR_RELEASE_DOWNLOAD_URL for the binary download
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ó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 66/100
Hướng nghiên cứu
URL GitHub được mã cứng là binary_url trong install.sh, khoảng dòng 848; biến ghi đè PLANNOTATOR_RELEASE_DOWNLOAD_URL đã được dùng để tải .sha256 trong update-prepare, vì vậy hãy làm theo mẫu đó. Bắt đầu bằng việc đọc cách install.sh xây dựng binary_url và kiểm tra PLANNOTATOR_EXPECTED_SHA256. Hoàn thành khi cả binary lẫn checksum đều lấy từ biến ghi đè nếu được đặt, và lấy từ GitHub nếu không, đồng thời checksum vẫn kiểm soát việc cài đặt.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
On some networks, downloading release assets from github.com is very slow. Here it ran at about 110 KB/s, so the ~195 MB plannotator-darwin-arm64 took about 25 minutes, and the update lock was held the whole time. A nearby machine downloads the same file in seconds and could serve it as a mirror. Plannotator already has a setting for this, but the installer ignores it for the binary.
Current behavior (0.28.63)
- The app accepts
PLANNOTATOR_RELEASE_DOWNLOAD_URL, which passesisAllowedOverrideUrl.update-prepareuses it to fetch the.sha256. install.shhardcodes GitHub for the binary (line 848):
So the override changes where the checksum comes from, but the 195 MB download still goes to github.com.binary_url="https://github.com/${REPO}/releases/download/${latest_tag}/${binary_name}"
Request
Make install.sh use PLANNOTATOR_RELEASE_DOWNLOAD_URL for the binary and its .sha256 when set, and fall back to GitHub when it isn't:
release_base="${PLANNOTATOR_RELEASE_DOWNLOAD_URL:-https://github.com/${REPO}/releases/download}"
binary_url="${release_base}/${latest_tag}/${binary_name}"
The pinned SHA-256 check (PLANNOTATOR_EXPECTED_SHA256) still guards the file, so a mirror can't swap in a different binary.
Why
With this change, a slow link can point updates at a mirror and keep the normal path: auto-update, Update now, checksum and attestation checks. Without it, the only workaround is to copy the binary by hand into the installer's temp download file mid-update, which depends on internal details.
- Ngôn ngữ chính
- TypeScript
- Star
- 8.7k
- Fork
- 649
- Merge trung bình
- 10 giờ 45 phút
- Pull request đã merge (30 ngày)
- 830
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của backnotprop/plannotator
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
backnotprop/plannotator#2643 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
backnotprop/plannotator#2243 · 2 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Annotate documentation omits per-file version history and privacy controlsCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
backnotprop/plannotator#1086 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 45/100
backnotprop/plannotator#3301 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
backnotprop/plannotator#3299 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của backnotprop/plannotator
Issue tương tự
-
Resources: Update work of urumqiCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
railmapgen/rmp-gallery#4176 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
GraphQL custom headers duplicate differently cased default headersCó thể đã có người làm @yxr-2025 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
elie222/rakazo#4625 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement sharing & sync
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Adapter] Magic HourĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
HelpCode-ai/anythingmcp#1659 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày