Skip to content

Commit

Permalink
fix linux package dependencies (#620)
Browse files Browse the repository at this point in the history
* fix linux package dependencies

Signed-off-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>

* depend on bash for debian systems

Signed-off-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>

* revert bash dependency

Signed-off-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>

---------

Signed-off-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
  • Loading branch information
mowies authored Aug 6, 2024
1 parent 5342205 commit 73a756f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
8 changes: 7 additions & 1 deletion cmd/goreleaser/internal/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,13 @@ func Package(dist string) config.NFPM {
License: "Apache 2.0",
Description: fmt.Sprintf("OpenTelemetry Collector - %s", dist),
Maintainer: "The OpenTelemetry Collector maintainers <cncf-opentelemetry-maintainers@lists.cncf.io>",
Overrides: map[string]config.NFPMOverridables{
"rpm": {
Dependencies: []string{
"/bin/sh",
},
},
},

NFPMOverridables: config.NFPMOverridables{
PackageName: dist,
Expand All @@ -164,7 +171,6 @@ func Package(dist string) config.NFPM {
Type: "config|noreplace",
},
},
Dependencies: []string{"/bin/sh"},
},
}
}
Expand Down
6 changes: 4 additions & 2 deletions distributions/otelcol-contrib/.goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ archives:
name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}'
nfpms:
- package_name: otelcol-contrib
dependencies:
- /bin/sh
contents:
- src: otelcol-contrib.service
dst: /lib/systemd/system/otelcol-contrib.service
Expand All @@ -70,6 +68,10 @@ nfpms:
preinstall: preinstall.sh
postinstall: postinstall.sh
preremove: preremove.sh
overrides:
rpm:
dependencies:
- /bin/sh
id: otelcol-contrib
builds:
- otelcol-contrib
Expand Down
6 changes: 4 additions & 2 deletions distributions/otelcol/.goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ archives:
name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}'
nfpms:
- package_name: otelcol
dependencies:
- /bin/sh
contents:
- src: otelcol.service
dst: /lib/systemd/system/otelcol.service
Expand All @@ -70,6 +68,10 @@ nfpms:
preinstall: preinstall.sh
postinstall: postinstall.sh
preremove: preremove.sh
overrides:
rpm:
dependencies:
- /bin/sh
id: otelcol
builds:
- otelcol
Expand Down

0 comments on commit 73a756f

Please sign in to comment.