Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/golden-image-container-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ guest:
- libnspr4
- libnss3
- libpango-1.0-0
- libsqlite3-dev
- libssl-dev
- libx11-6
- libxcb1
Expand Down
1 change: 1 addition & 0 deletions config/golden-image-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ guest:
- git
- git-lfs
- jq
- libsqlite3-dev
- libssl-dev
- maven
- ninja-build
Expand Down
1 change: 1 addition & 0 deletions config/golden-image-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ guest:
- git
- git-lfs
- jq
- libsqlite3-dev
- libssl-dev
- maven
- ninja-build
Expand Down
1 change: 1 addition & 0 deletions config/golden-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ guest:
- git
- git-lfs
- jq
- libsqlite3-dev
- libssl-dev
- maven
- ninja-build
Expand Down
6 changes: 6 additions & 0 deletions internal/imagebuild/assets/smoke-integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,12 @@ python3 -m pip --version >/dev/null
pip --version >/dev/null
pip3 --version >/dev/null

# Release workers have no apt egress. Host tests that load libsqlite3.so or
# compile against sqlite3.h must find both already in the image.
test -f /usr/include/sqlite3.h
test -e /usr/lib/x86_64-linux-gnu/libsqlite3.so
pkg-config --exists sqlite3

for forbidden in \
/run/incus/unix.socket \
/var/lib/incus/unix.socket \
Expand Down
6 changes: 6 additions & 0 deletions internal/imagebuild/assets/smoke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,12 @@ python3 -m pip --version >/dev/null
pip --version >/dev/null
pip3 --version >/dev/null

# Release workers have no apt egress. Host tests that load libsqlite3.so or
# compile against sqlite3.h must find both already in the image.
test -f /usr/include/sqlite3.h
test -e /usr/lib/x86_64-linux-gnu/libsqlite3.so
pkg-config --exists sqlite3

for forbidden in \
/var/run/docker.sock \
/run/incus/unix.socket \
Expand Down
2 changes: 1 addition & 1 deletion internal/imagebuild/orchestrator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func TestRecipeFingerprintIsDeterministic(t *testing.T) {
// coupling is the point: the alias is part of the recipe, so a manifest
// whose contents changed under an unchanged alias would otherwise ask the
// builder to produce different bytes for a name that is already promoted.
if first != "sha256:3ca60ebd286bb7be8c1e2449d18e705d65a9ff4d3e4478c60e6416f3807c4498" {
if first != "sha256:7a3a1820816163ead5bbbfecfd455147adcae39195b8d6d194927408f7e2c40b" {
t.Fatalf("deployed standard recipe fingerprint drifted: %q", first)
}
smoke, err := SmokeFingerprint(plan)
Expand Down
2 changes: 1 addition & 1 deletion internal/imagemanifest/manifest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func TestRepositoryManifestIsValidAndPinned(t *testing.T) {
if !strings.HasPrefix(fingerprint, "sha256:") || len(fingerprint) != len("sha256:")+64 {
t.Fatalf("unexpected fingerprint %q", fingerprint)
}
if fingerprint != "sha256:7a69a79e9ab4e8e99b4dd94d3507d829d1e092927d7a64063ff893d3b7686afb" {
if fingerprint != "sha256:98ab78a52fdccdd6df1622e5383f27a67c507cfdad789880c0cf10b1b7f31377" {
t.Fatalf("standard manifest fingerprint drifted: %q", fingerprint)
}
}
Expand Down
17 changes: 17 additions & 0 deletions internal/imagemanifest/provides_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,23 @@ func TestEveryPromisedCommandComesFromThisManifest(t *testing.T) {
}
}

func TestEveryImageBakesSqliteCLibrary(t *testing.T) {
t.Parallel()
for _, path := range goldenManifestPaths(t) {
manifest := loadGolden(t, path)
found := false
for _, name := range manifest.Guest.Packages {
if name == "libsqlite3-dev" {
found = true
break
}
}
if !found {
t.Errorf("%s does not install libsqlite3-dev; release workers have no apt egress", filepath.Base(path))
}
}
}

func goldenManifestPaths(t *testing.T) []string {
t.Helper()
paths, err := filepath.Glob(filepath.Join("..", "..", "config", "golden-image*.yaml"))
Expand Down