Skip to content

Commit

Permalink
Remove macOS preference panels and code related to DMG (#30097)
Browse files Browse the repository at this point in the history
This commit removes the build of the macOS preference panels for Filebeat,
Auditbeat, Metricbeat, heartbeat. This artifact was never released
officially and was unsupported. We do not have any tests in place to
assert that the new version of macOS doesn't break the preference panel.

Remove the code related to building DMG images, this was only required
to package the preference panel.

Fixes: #30003
  • Loading branch information
ph authored Feb 2, 2022
1 parent b6e347f commit c87406b
Show file tree
Hide file tree
Showing 59 changed files with 5 additions and 3,257 deletions.
2 changes: 1 addition & 1 deletion auditbeat/scripts/mage/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func CustomizePackaging(pkgFlavor PackagingFlavor) {
case devtools.TarGz, devtools.Zip:
args.Spec.ReplaceFile("{{.BeatName}}.yml", shortConfig)
args.Spec.ReplaceFile("{{.BeatName}}.reference.yml", referenceConfig)
case devtools.Deb, devtools.RPM, devtools.DMG:
case devtools.Deb, devtools.RPM:
args.Spec.ReplaceFile("/etc/{{.BeatName}}/{{.BeatName}}.yml", shortConfig)
args.Spec.ReplaceFile("/etc/{{.BeatName}}/{{.BeatName}}.reference.yml", referenceConfig)
sampleRulesTarget = "/etc/{{.BeatName}}/" + defaultSampleRulesTarget
Expand Down
295 changes: 0 additions & 295 deletions dev-tools/mage/dmgbuilder.go

This file was deleted.

2 changes: 0 additions & 2 deletions dev-tools/mage/kibana.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ func PackageKibanaDashboardsFromBuildDir() {
pkgArgs.Spec.ReplaceFile("kibana", kibanaDashboards)
case Deb, RPM:
pkgArgs.Spec.ReplaceFile("/usr/share/{{.BeatName}}/kibana", kibanaDashboards)
case DMG:
pkgArgs.Spec.ReplaceFile("/Library/Application Support/{{.BeatVendor}}/{{.BeatName}}/kibana", kibanaDashboards)
default:
panic(errors.Errorf("unhandled package type: %v", pkgType))
}
Expand Down
5 changes: 0 additions & 5 deletions dev-tools/mage/pkg.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@ func Package() error {
continue
}

if pkgType == DMG && runtime.GOOS != "darwin" {
log.Printf("Skipping DMG package type because build host isn't darwin")
continue
}

if target.Name == "linux/arm64" && pkgType == Docker && runtime.GOARCH != "arm64" {
log.Printf("Skipping Docker package type because build host isn't arm")
continue
Expand Down
26 changes: 0 additions & 26 deletions dev-tools/mage/pkgtypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ const (
Deb
Zip
TarGz
DMG
Docker
)

Expand Down Expand Up @@ -125,10 +124,6 @@ var OSArchNames = map[string]map[PackageType]map[string]string{
"386": "x86",
"amd64": "x86_64",
},
DMG: map[string]string{
"386": "x86",
"amd64": "x86_64",
},
},
"linux": map[PackageType]map[string]string{
RPM: map[string]string{
Expand Down Expand Up @@ -217,8 +212,6 @@ func (typ PackageType) String() string {
return "zip"
case TarGz:
return "tar.gz"
case DMG:
return "dmg"
case Docker:
return "docker"
default:
Expand All @@ -242,8 +235,6 @@ func (typ *PackageType) UnmarshalText(text []byte) error {
*typ = TarGz
case "zip":
*typ = Zip
case "dmg":
*typ = DMG
case "docker":
*typ = Docker
default:
Expand Down Expand Up @@ -289,8 +280,6 @@ func (typ PackageType) Build(spec PackageSpec) error {
return PackageZip(spec)
case TarGz:
return PackageTarGz(spec)
case DMG:
return PackageDMG(spec)
case Docker:
return PackageDocker(spec)
default:
Expand Down Expand Up @@ -973,21 +962,6 @@ func addSymlinkToTar(tmpdir string, ar *tar.Writer, baseDir string, pkgFile Pack
})
}

// PackageDMG packages the Beat into a .dmg file containing an installer pkg
// and uninstaller app.
func PackageDMG(spec PackageSpec) error {
if runtime.GOOS != "darwin" {
return errors.New("packaging a dmg requires darwin")
}

b, err := newDMGBuilder(spec)
if err != nil {
return err
}

return b.Build()
}

// PackageDocker packages the Beat into a docker image.
func PackageDocker(spec PackageSpec) error {
if err := HaveDocker(); err != nil {
Expand Down
Loading

0 comments on commit c87406b

Please sign in to comment.