cut fails on uncompressed deb
Đá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
- 78/100
Hướng nghiên cứu
Bắt đầu với internal/deb/extract.go và DataReader, mà issue xác định là chỉ xử lý các thành phần dữ liệu đã nén. Kiểm tra cách chọn các thành phần trong archive và cách các bài kiểm thử hiện có bao phủ payload .gz, .xz và .zst. Công việc hoàn tất khi có thể giải nén thành công một gói chứa data.tar không nén và có bài kiểm thử cho trường hợp này.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
chisel cannot cut a package whose data.tar is not compressed. this is not common (clearly) but it does happen.
deb(5) allows the data of the deb to be plain data.tar, as well as the usual suspects (.gz, .xz, etc etc). DataReader in internal/deb/extract.go only handles data.tar.gz, data.tar.xz and data.tar.zst. it skips every other kind and reports io.EOF as "no data payload".
some packages in the archives are built like this (with dpkg-deb -Znone). e.g. in 26.04 main that is every linux-firmware-*, linux-image-* and linux-modules-*.
$ curl -sO http://archive.ubuntu.com/ubuntu/pool/main/l/linux-firmware-realtek/linux-firmware-realtek_20260319.git217ca6e4-0ubuntu1.2_all.deb
$ ar t linux-firmware-realtek_20260319.git217ca6e4-0ubuntu1.2_all.deb
debian-binary
control.tar
data.tar
none of these packages are sliced, so the repro uses chisel-proxy with a deb built the same way:
$ alias chisel-proxy='go run github.com/lczyk/chisel-proxy/cmd/[email protected]'
$ mkdir -p test-package/DEBIAN test-package/usr/lib/test-package
$ printf 'Package: test-package\nVersion: 1.0\nArchitecture: all\nMaintainer: nobody\nDescription: uncompressed data member\n' > test-package/DEBIAN/control
$ echo data > test-package/usr/lib/test-package/file
$ dpkg-deb -Znone --build test-package test-package_1.0_all.deb
$ ar t test-package_1.0_all.deb
debian-binary
control.tar
data.tar
# test-package.yaml
package: test-package
slices:
all:
contents:
/usr/lib/test-package/file:
$ chisel-proxy cut --arch amd64 ./test-package_1.0_all.deb ./test-package.yaml \
-- --root ./rootfs test-package_all
Extracting files from package "test-package"...
error: cannot extract from package "test-package": no data payload
the same deb built with -Zgzip cuts fine.
- Ngôn ngữ chính
- Go
- Star
- 434
- Fork
- 74
- Merge trung bình
- 1 ngày 30 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
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 canonical/chisel
-
`mode` of a generated directory is random when it has a generated childCó thể đã có người làm @Amadeus-22 đã nhận 24 ngày trước. Đang mởBug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 42/100
-
`prefer` drops a path when the preferred package lists it `until: mutate`Có thể đã có người làm @18Abhinav07 đã nhận 8 ngày trước. Đang mởBug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Tất cả issue của canonical/chisel
Issue tương tự
-
mcpx scan: flag unsafe tool namesCó thể đã có người làm @zeyadbadawyy đã nhận hôm nay. Đang mởarea/scan enhancement good first issue priority/medium size/small
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
rohitgollarahalli/mcpx#45 · 1 bình luận · 1 người được giao ·
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 68/100
-
Mend: dependency security vulnerability
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Windows 主机
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Lee-xeo/Claude-Cage#1550 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
(bug) ui: spanPaint can index spans past their end (panic: index out of range)Có thể đã có người làm @MaxMiksa đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
Maintainer thường phản hồi trong vòng 1 ngày