Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove macOS preference panels and code related to DMG #30097

Merged
merged 1 commit into from
Feb 2, 2022
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
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