Skip to content

Commit

Permalink
Remove rosetta and the preinstall script
Browse files Browse the repository at this point in the history
As the binaries we ship are now univeral binaries, we no longer need rosetta.

This reverts kolide#708, as the only thing the preinstall script was used for is installing rosetta.
  • Loading branch information
directionless committed Jun 28, 2022
1 parent 6a410b5 commit c056881
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 51 deletions.
31 changes: 0 additions & 31 deletions pkg/packaging/assets/preinstall-darwin.sh

This file was deleted.

20 changes: 0 additions & 20 deletions pkg/packaging/packaging.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,6 @@ func (p *PackageOptions) Build(ctx context.Context, packageWriter io.Writer, tar
return errors.Wrapf(err, "setup init script for %s", p.target.String())
}

if err := p.setupPreinst(ctx); err != nil {
return errors.Wrapf(err, "setup preinst for %s", p.target.String())
}

if err := p.setupPostinst(ctx); err != nil {
return errors.Wrapf(err, "setup postInst for %s", p.target.String())
}
Expand Down Expand Up @@ -605,22 +601,6 @@ func (p *PackageOptions) setupPrerm(ctx context.Context) error {
return nil
}

func (p *PackageOptions) setupPreinst(ctx context.Context) error {
if p.target.Platform != Darwin {
return nil
}

preinstallContent, err := assets.ReadFile("assets/preinstall-darwin.sh")
if err != nil {
return errors.Wrap(err, "getting template for preinstall")
}

return errors.Wrap(
ioutil.WriteFile(filepath.Join(p.scriptRoot, "preinstall"), preinstallContent, 0755),
"writing preinstall file",
)
}

func (p *PackageOptions) setupPostinst(ctx context.Context) error {
if p.target.Init == NoInit {
return nil
Expand Down

0 comments on commit c056881

Please sign in to comment.