diff --git a/cmd/chisel/cmd_info_test.go b/cmd/chisel/cmd_info_test.go index 0629f467..81377906 100644 --- a/cmd/chisel/cmd_info_test.go +++ b/cmd/chisel/cmd_info_test.go @@ -153,6 +153,7 @@ var defaultChiselYaml = ` ubuntu: version: 22.04 components: [main, universe] + suites: [jammy] public-keys: [test-key] public-keys: test-key: diff --git a/internal/setup/setup.go b/internal/setup/setup.go index 0efe8e67..d17cead4 100644 --- a/internal/setup/setup.go +++ b/internal/setup/setup.go @@ -477,13 +477,6 @@ type yamlPubKey struct { Armor string `yaml:"armor"` } -var ubuntuAdjectives = map[string]string{ - "18.04": "bionic", - "20.04": "focal", - "22.04": "jammy", - "22.10": "kinetic", -} - func parseRelease(baseDir, filePath string, data []byte) (*Release, error) { release := &Release{ Path: baseDir, @@ -525,11 +518,7 @@ func parseRelease(baseDir, filePath string, data []byte) (*Release, error) { return nil, fmt.Errorf("%s: archive %q missing version field", fileName, archiveName) } if len(details.Suites) == 0 { - adjective := ubuntuAdjectives[details.Version] - if adjective == "" { - return nil, fmt.Errorf("%s: archive %q missing suites field", fileName, archiveName) - } - details.Suites = []string{adjective} + return nil, fmt.Errorf("%s: archive %q missing suites field", fileName, archiveName) } if len(details.Components) == 0 { return nil, fmt.Errorf("%s: archive %q missing components field", fileName, archiveName) diff --git a/internal/setup/setup_test.go b/internal/setup/setup_test.go index de50899a..117d78f9 100644 --- a/internal/setup/setup_test.go +++ b/internal/setup/setup_test.go @@ -819,6 +819,18 @@ var setupTests = []setupTest{{ }, }, }, +}, { + summary: "Archive with suites unset", + input: map[string]string{ + "chisel.yaml": ` + format: v1 + archives: + ubuntu: + version: 22.04 + components: [main, other] + `, + }, + relerror: `chisel.yaml: archive "ubuntu" missing suites field`, }, { summary: "Extra fields in YAML are ignored (necessary for forward compatibility)", input: map[string]string{ @@ -1589,6 +1601,7 @@ var defaultChiselYaml = ` ubuntu: version: 22.04 components: [main, universe] + suites: [jammy] public-keys: [test-key] public-keys: test-key: diff --git a/internal/slicer/slicer_test.go b/internal/slicer/slicer_test.go index 36d6271c..0f3bdfd8 100644 --- a/internal/slicer/slicer_test.go +++ b/internal/slicer/slicer_test.go @@ -778,11 +778,13 @@ var slicerTests = []slicerTest{{ foo: version: 22.04 components: [main, universe] + suites: [jammy] default: true public-keys: [test-key] bar: version: 22.04 components: [main] + suites: [jammy] public-keys: [test-key] public-keys: test-key: @@ -1202,6 +1204,7 @@ var defaultChiselYaml = ` ubuntu: version: 22.04 components: [main, universe] + suites: [jammy] public-keys: [test-key] public-keys: test-key: