fix: resolve Dockerfile ponytail issues H1-H4#108
Conversation
alchark
left a comment
There was a problem hiding this comment.
Thanks a lot for your contribution! The changes overall look fine, please see inside for a couple of small comments.
| fakemachine | ||
|
|
||
| RUN go install -v github.com/go-debos/debos/cmd/debos@latest | ||
| RUN go install -v github.com/go-debos/debos/cmd/debos@v1.1.7 |
There was a problem hiding this comment.
We're currently transitioning the build scripts to use upstream support for subvolume creation, currently available at go-debos/debos@62cb992 (but that will likely change some time soon)
|
|
||
| # Entry point | ||
| ENTRYPOINT ./build-uboot.sh && ./build-kernel-mainline.sh && ./build-kernel-bsp.sh && ./build-images.sh | ||
| COPY entrypoint.sh /flipperone-linux-build-scripts/entrypoint.sh |
There was a problem hiding this comment.
Is the copying step required?
| images) | ||
| ./build-images.sh | ||
| ;; |
There was a problem hiding this comment.
Let's also add targets for ospack and rootfs-img please
886606f to
94e3831
Compare
- Pin FROM debian:trixie to digest for reproducibility - Remove unnecessary apt-get upgrade -y - Pin go install to tagged debos commit - Replace shell-form ENTRYPOINT with exec-form + entrypoint.sh Addresses issues flipperdevices#77 and flipperdevices#78
… rationale, mark debos pin with ponytail
stuartmhannon
left a comment
There was a problem hiding this comment.
Addressed all three review comments:
Dockerfile line 51 (debos pin): Added a comment marking v1.1.7 as the known-stable point with a reference to the upstream subvolume transition (go-debos/debos#736/62cb992). Re-pin once the transition settles.
Dockerfile line 70 (COPY): Yes, required — the old shell-form ENTRYPOINT was an inline chain. Switching to exec-form ENTRYPOINT + entrypoint.sh gives us BUILD_TARGET selection at runtime. COPY is necessary because the build context is the repo root. Added explanatory comments.
entrypoint.sh (new targets): Added , , and targets to the case statement, target, and error message. Verified all three build scripts exist in the repo.
stuartmhannon
left a comment
There was a problem hiding this comment.
Addressed all three review comments:
Dockerfile line 51 (debos pin): Added a # ponytail comment marking v1.1.7 as the known-stable point with a reference to the upstream subvolume transition (go-debos/debos#736/62cb992). Re-pin once the transition settles.
Dockerfile line 70 (COPY): Yes, required — the old shell-form ENTRYPOINT was an inline chain. Switching to exec-form ENTRYPOINT + entrypoint.sh gives us BUILD_TARGET selection at runtime. COPY is necessary because the build context is the repo root. Added explanatory comments.
entrypoint.sh (new targets): Added ospack, rootfs-img, and dtbo targets to the case statement, all target, and error message. Verified all three build scripts exist in the repo.
Wouldn't it be checked out alongside the rest of the sources in the respective step? I would also avoid the explicit |
| ./build-ospack.sh | ||
| ./build-rootfs-img.sh | ||
| ./build-images.sh | ||
| ./build-dtbo.sh |
There was a problem hiding this comment.
Please don't add untested changes. This script doesn't work this way, and it's not used in the normal build process.
| # Determine build target (default: all) | ||
| BUILD_TARGET="${BUILD_TARGET:-all}" | ||
|
|
||
| cd /flipperone-linux-build-scripts |
There was a problem hiding this comment.
Redundant, and also wrong for most systems unless running inside a Docker container build with today's Dockerfile
Resolves four Dockerfile ponytail issues identified in the audit:
FROM debian:trixieto@sha256digest for reproducible buildsapt-get upgrade -ywhich made builds non-reproduciblego installtodebos@v1.1.7tagged release instead of@latestENTRYPOINTwith exec-form +entrypoint.shsupportingBUILD_TARGETenv var (values:all,uboot,kernel-mainline,kernel-bsp,images)Addresses #77 and #78