Repository navigation
feat: Add ARM64 (arm64) stemcell build support #768
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
base: ubuntu-noble
Are you sure you want to change the base?
Changes from 6 commits
3592393
fa18269
4c54388
38bf380
6be1c8a
a3d30fb
aff698b
b5e9dff
93b1b86
067ddc2
0c7c028
f683baa
a7ecfab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,9 +33,16 @@ | |
|
|
||
| describe "base_apt" do | ||
| describe file("/etc/apt/sources.list") do | ||
| its(:content) { should match 'deb http:\/\/(archive|snapshot).ubuntu.com\/ubuntu(|\/\d*T\d*Z) noble main universe multiverse' } | ||
| its(:content) { should match 'deb http:\/\/(archive|snapshot).ubuntu.com\/ubuntu(|\/\d*T\d*Z) noble-updates main universe multiverse' } | ||
| its(:content) { should match 'deb http:\/\/(security|snapshot).ubuntu.com\/ubuntu(|\/\d*T\d*Z) noble-security main universe multiverse' } | ||
| if Bosh::Stemcell::Arch.x86_64? | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure we gain a lot by adding this conditional here since the regexs are already fairly complex. Seems possibly simpler to add ... if doing so would be unsafe I'm fine with On further reflection maybe we should use a common regex that matches all the entries and only assert on the "listings" => "deb http:\/\/(archive|ports|security|snapshot).ubuntu.com\/ubuntu(|\/\d*T\d*Z) ${listing}" |
||
| its(:content) { should match 'deb http:\/\/(archive|snapshot).ubuntu.com\/ubuntu(|\/\d*T\d*Z) noble main universe multiverse' } | ||
| its(:content) { should match 'deb http:\/\/(archive|snapshot).ubuntu.com\/ubuntu(|\/\d*T\d*Z) noble-updates main universe multiverse' } | ||
| its(:content) { should match 'deb http:\/\/(security|snapshot).ubuntu.com\/ubuntu(|\/\d*T\d*Z) noble-security main universe multiverse' } | ||
| else | ||
| # ARM64 (and other non-amd64 arches) are served from the ports mirror. | ||
| its(:content) { should match 'deb http:\/\/(ports|snapshot).ubuntu.com\/ubuntu(-ports)?(|\/\d*T\d*Z) noble main universe multiverse' } | ||
| its(:content) { should match 'deb http:\/\/(ports|snapshot).ubuntu.com\/ubuntu(-ports)?(|\/\d*T\d*Z) noble-updates main universe multiverse' } | ||
| its(:content) { should match 'deb http:\/\/(ports|snapshot).ubuntu.com\/ubuntu(-ports)?(|\/\d*T\d*Z) noble-security main universe multiverse' } | ||
| end | ||
| end | ||
|
|
||
| describe file("/lib/systemd/system/monit.service") do | ||
|
|
@@ -86,14 +93,18 @@ | |
| end | ||
|
|
||
| context "installed by system_grub" do | ||
| %w[ | ||
| grub2 | ||
| ].each do |pkg| | ||
| # ARM64 has no "grub2" metapackage; grub-efi-arm64 is the equivalent. | ||
| grub_packages = Bosh::Stemcell::Arch.x86_64? ? %w[grub2] : %w[grub-efi-arm64] | ||
| grub_packages.each do |pkg| | ||
| describe package(pkg) do | ||
| it { should be_installed } | ||
| end | ||
| end | ||
| %w[unicode.pf2 menu.lst gfxblacklist.txt].each do |grub_stage| | ||
| # gfxblacklist.txt ships with the amd64 grub2 metapackage and is not present | ||
| # in the arm64 grub-efi-arm64 package set. | ||
| grub_files = %w[unicode.pf2 menu.lst] | ||
| grub_files << "gfxblacklist.txt" if Bosh::Stemcell::Arch.x86_64? | ||
| grub_files.each do |grub_stage| | ||
| describe file("/boot/grub/#{grub_stage}") do | ||
| it { should be_file } | ||
| end | ||
|
|
@@ -163,7 +174,8 @@ | |
| end | ||
|
|
||
| context "PAM configuration" do | ||
| describe file("/lib/x86_64-linux-gnu/security/pam_pwquality.so") do | ||
| pam_multiarch_triplet = Bosh::Stemcell::Arch.x86_64? ? "x86_64-linux-gnu" : "aarch64-linux-gnu" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems like describe file("/lib/#{Bosh::Stemcell::Arch.gnu_arch}-linux-gnu/security/pam_pwquality.so") doNote: no idea if |
||
| describe file("/lib/#{pam_multiarch_triplet}/security/pam_pwquality.so") do | ||
| it { should be_file } | ||
| end | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,8 +34,11 @@ | |
| it("should be owned by root user (stig: V-38466)") { should be_owned_by("root") } | ||
| end | ||
|
|
||
| describe file("/lib64") do | ||
| it("should be owned by root user (stig: V-38466)") { should be_owned_by("root") } | ||
| # /lib64 holds the x86_64 dynamic linker and is absent on arm64, which uses | ||
| # /lib/ld-linux-aarch64.so.1. Skip the ownership check when it is missing, | ||
| # mirroring the /usr/lib64 check below. RFC: cloudfoundry/community#1530 | ||
| describe command('if [ -e /lib64 ]; then stat -c "%U" /lib64 ; else echo "root" ; fi') do | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Broader AsideOverall it seems like we need a pattern for running specs for specific ARCH targets rather than smashing conditionals into various parts of many different spec files. We probably need some coherent pattern for running/selecting specs for a given ARCH. Maybe rspec tags on specific examples, maybe something like Golang's I'm not sure what the right pattern is though I don't think we should have ad-hoc conditionals. |
||
| its(:stdout) { should eq("root\n") } | ||
| end | ||
|
|
||
| describe file("/usr/lib") do | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.