-
Notifications
You must be signed in to change notification settings - Fork 160
rootfs-*.tar.gz: Add per-arch tarballs (currently for amd64 and 386) #479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Before this commit, attempting to list the commands using a busybox binary built for another platform would result in: sh: rootfs/bin/busybox: cannot execute binary file: Exec format error but not cause Make to abort. Now Make reports an error on such failures (and also on link failures). Signed-off-by: W. Trevor King <wking@tremily.us>
There won't be any for a successful run, because the busybox rule clears out the directory. But there may be some symlinks already if you're running after the echo rule failed for whatever reason. This change makes those echo re-runs more robust. Signed-off-by: W. Trevor King <wking@tremily.us>
The new Make handling is using:
* Default values [1] for ARCHES ?= amd64
* Substitution references [2] for $(ARCHES:%=rootfs-%.tar.gz).
* % [3] and $* [4] for pattern rules like rootfs-%.tar.gz.
* .PRECIOUS [5] to avoid errors like:
rm downloads/stage3-amd64-current.tar.bz2 rootfs/amd64/bin/busyboxmake: unlink: rootfs/amd64/bin/busybox: Permission denied
rootfs/amd64/bin/echomake: unlink: rootfs/amd64/bin/echo: Permission denied
when Make completes.
Where Gentoo's architecture names don't match, the per-platform
tarballs should be renamed to use the Go names [6] when copying into
the root project directory.
[1]: https://www.gnu.org/software/make/manual/html_node/Setting.html#Setting
[2]: https://www.gnu.org/software/make/manual/html_node/Substitution-Refs.html
[3]: https://www.gnu.org/software/make/manual/html_node/Pattern-Rules.html
[4]: https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html
[5]: https://www.gnu.org/software/make/manual/html_node/Special-Targets.html#index-precious-targets
[6]: https://golang.org/doc/install/source#introduction
Signed-off-by: W. Trevor King <wking@tremily.us>
And use the appropriate one for the current architecture. Renaming the old 'runtime' -> 'runtimeCommand' avoids clobbering the runtime package name. Renaming our local variable to match what container.go is using seemed like a better choice than inventing a custom name for the local package import. Signed-off-by: W. Trevor King <wking@tremily.us>
cec5f49 to
afcac88
Compare
This was extracted with from stage3-i486-20170919.tar.bz2. The stage3
had a SHA512 hash of [1] and a valid signature by [2].
Generated with:
$ cd contrib/rootfs-builder
$ make ARCHES=i486
$ cp -f rootfs-i486.tar.gz ../../rootfs-386.tar.gz
[1]: 9e007ef33f5aef6f70b7e263ed66e7679479261758ac34f61e5a2558de7559eb9a7fdbb31264bbeba09bfcc06df57263592d986393051bac5cd432c1228b65f0
[2]: Gentoo Linux Release Engineering (Automated Weekly Release Key) <releng@gentoo.org>
Primary key fingerprint: 13EB BDBE DE7A 1277 5DFD B1BA BB57 2E0E 2D18 2910
Signed-off-by: W. Trevor King <wking@tremily.us>
afcac88 to
c3c8c02
Compare
1 similar comment
Contributor
wking
added a commit
to wking/ocitools-v2
that referenced
this pull request
Mar 9, 2018
I'm not sure when the change happened (sometime since ff5e578, contrib/rootfs-builder: Support multiple architectures, 2017-09-20, opencontainers#479), but Gentoo is now using timestamps and xz compression for their amd64 stage3: $ curl http://distfiles.gentoo.org/releases/amd64/autobuilds/latest-stage3.txt # Latest as of Fri, 09 Mar 2018 15:00:02 +0000 # ts=1520607602 20180308T214502Z/stage3-amd64-20180308T214502Z.tar.xz 188851072 20180308T214502Z/hardened/stage3-amd64-hardened-20180308T214502Z.tar.xz 174759140 20180308T214502Z/hardened/stage3-amd64-hardened+nomultilib-20180308T214502Z.tar.xz 167639136 20180301T214503Z/hardened/stage3-amd64-hardened-selinux-20180301T214503Z.tar.xz 187319664 20180308T214502Z/stage3-amd64-nomultilib-20180308T214502Z.tar.xz 181866296 20180303/systemd/stage3-amd64-systemd-20180303.tar.bz2 281873162 20180225/uclibc/stage3-amd64-uclibc-hardened-20180225.tar.bz2 57147392 20180225/uclibc/stage3-amd64-uclibc-vanilla-20180225.tar.bz2 144490332 20180308T214502Z/stage3-x32-20180308T214502Z.tar.xz 205285160 20180308T214502Z/hardened/stage4-amd64-hardened+minimal-20180308T214502Z.tar.bz2 261776436 20180308T214502Z/hardened/stage4-amd64-hardened+minimal-nomultilib-20180308T214502Z.tar.bz2 251821245 20180308T214502Z/stage4-amd64-minimal-20180308T214502Z.tar.bz2 280918565 20180308T214502Z/stage4-amd64-minimal-nomultilib-20180308T214502Z.tar.bz2 268835860 20180303/systemd/stage4-amd64-systemd-20180303.tar.bz2 622067712 This commit adapts to that change, allowing us to continue to pull the vanilla stage3-amd64-20180308T214502Z.tar.xz. Signed-off-by: W. Trevor King <wking@tremily.us>
wking
added a commit
to wking/ocitools-v2
that referenced
this pull request
Mar 9, 2018
I'm not sure when the change happened (sometime since ff5e578, contrib/rootfs-builder: Support multiple architectures, 2017-09-20, opencontainers#479), but Gentoo is now using timestamps for some amd64 stages: $ curl http://distfiles.gentoo.org/releases/amd64/autobuilds/latest-stage3.txt # Latest as of Fri, 09 Mar 2018 15:00:02 +0000 # ts=1520607602 20180308T214502Z/stage3-amd64-20180308T214502Z.tar.xz 188851072 20180308T214502Z/hardened/stage3-amd64-hardened-20180308T214502Z.tar.xz 174759140 20180308T214502Z/hardened/stage3-amd64-hardened+nomultilib-20180308T214502Z.tar.xz 167639136 20180301T214503Z/hardened/stage3-amd64-hardened-selinux-20180301T214503Z.tar.xz 187319664 20180308T214502Z/stage3-amd64-nomultilib-20180308T214502Z.tar.xz 181866296 20180303/systemd/stage3-amd64-systemd-20180303.tar.bz2 281873162 20180225/uclibc/stage3-amd64-uclibc-hardened-20180225.tar.bz2 57147392 20180225/uclibc/stage3-amd64-uclibc-vanilla-20180225.tar.bz2 144490332 ... Signed-off-by: W. Trevor King <wking@tremily.us>
wking
added a commit
to wking/ocitools-v2
that referenced
this pull request
Mar 9, 2018
I'm not sure when the change happened (sometime since ff5e578, contrib/rootfs-builder: Support multiple architectures, 2017-09-20, opencontainers#479), but Gentoo is now using xz compression for some amd64 stages: $ curl http://distfiles.gentoo.org/releases/amd64/autobuilds/latest-stage3.txt # Latest as of Fri, 09 Mar 2018 15:00:02 +0000 # ts=1520607602 20180308T214502Z/stage3-amd64-20180308T214502Z.tar.xz 188851072 20180308T214502Z/hardened/stage3-amd64-hardened-20180308T214502Z.tar.xz 174759140 20180308T214502Z/hardened/stage3-amd64-hardened+nomultilib-20180308T214502Z.tar.xz 167639136 20180301T214503Z/hardened/stage3-amd64-hardened-selinux-20180301T214503Z.tar.xz 187319664 20180308T214502Z/stage3-amd64-nomultilib-20180308T214502Z.tar.xz 181866296 20180303/systemd/stage3-amd64-systemd-20180303.tar.bz2 281873162 20180225/uclibc/stage3-amd64-uclibc-hardened-20180225.tar.bz2 57147392 20180225/uclibc/stage3-amd64-uclibc-vanilla-20180225.tar.bz2 144490332 20180308T214502Z/stage3-x32-20180308T214502Z.tar.xz 205285160 20180308T214502Z/hardened/stage4-amd64-hardened+minimal-20180308T214502Z.tar.bz2 261776436 20180308T214502Z/hardened/stage4-amd64-hardened+minimal-nomultilib-20180308T214502Z.tar.bz2 251821245 20180308T214502Z/stage4-amd64-minimal-20180308T214502Z.tar.bz2 280918565 20180308T214502Z/stage4-amd64-minimal-nomultilib-20180308T214502Z.tar.bz2 268835860 20180303/systemd/stage4-amd64-systemd-20180303.tar.bz2 622067712 This commit adapts to that change, allowing us to continue to pull the vanilla stage3-amd64-20180308T214502Z.tar.xz. Signed-off-by: W. Trevor King <wking@tremily.us>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR also includes a number of other rootfs-builder improvements; details in the commit messages.
We can build tarballs for other platforms if we get access to a box that can run the target
busyboxbinary, because part of the extraction process is asking the extractedbusyboxwhat commands it supports.Builds on #478; review that first.