Skip to content

Commit 7743fb4

Browse files
authored
feat(deb): base architecture variant support (#1031)
1 parent edbfb76 commit 7743fb4

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

deb/deb.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,9 @@ Section: {{.Info.Section}}
772772
Priority: {{.Info.Priority}}
773773
Architecture: {{ if ne .Info.Platform "linux"}}{{ .Info.Platform }}-{{ end }}{{.Info.Arch}}
774774
{{- /* Optional fields */ -}}
775+
{{- if .Info.Deb.ArchVariant}}
776+
Architecture-Variant: {{ .Info.Deb.ArchVariant }}
777+
{{- end }}
775778
{{- if .Info.License }}
776779
License: {{.Info.License}}
777780
{{- end }}

deb/deb_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,9 @@ func TestNoJoinsControl(t *testing.T) {
317317
Provides: []string{},
318318
Conflicts: []string{},
319319
Contents: []*files.Content{},
320+
Deb: nfpm.Deb{
321+
ArchVariant: "amd64v3",
322+
},
320323
},
321324
}),
322325
InstalledSize: 10,

deb/testdata/control2.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Version: 1.0.0
33
Section: default
44
Priority: extra
55
Architecture: amd64
6+
Architecture-Variant: amd64v3
67
Maintainer: Carlos A Becker <pkg@carlosbecker.com>
78
Installed-Size: 10
89
Homepage: http://carlosbecker.com

nfpm.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,7 @@ type APKScripts struct {
433433
// Deb is custom configs that are only available on deb packages.
434434
type Deb struct {
435435
Arch string `yaml:"arch,omitempty" json:"arch,omitempty" jsonschema:"title=architecture in deb nomenclature"`
436+
ArchVariant string `yaml:"arch_variant,omitempty" json:"arch_variant,omitempty" jsonschema:"title=target architecture variant in deb nomenclature,example=amd64v3"`
436437
Scripts DebScripts `yaml:"scripts,omitempty" json:"scripts,omitempty" jsonschema:"title=scripts"`
437438
Triggers DebTriggers `yaml:"triggers,omitempty" json:"triggers,omitempty" jsonschema:"title=triggers"`
438439
Breaks []string `yaml:"breaks,omitempty" json:"breaks,omitempty" jsonschema:"title=breaks"`

0 commit comments

Comments
 (0)