Skip to content

Commit

Permalink
Remove msitools install for windows build, using the latest docker im…
Browse files Browse the repository at this point in the history
…age with msitools preinstalled (#30040)
  • Loading branch information
aleksmaus authored Jan 27, 2022
1 parent 206de56 commit 3d3452f
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions x-pack/osquerybeat/magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,6 @@ func extractFromMSI() error {
return err
}

// Install msitools
err := execCommand("apt", "update")
if err != nil {
return err
}

err = execCommand("apt", "install", "-y", "msitools")
if err != nil {
return err
}

osArchs := osquerybeat.OSArchs(devtools.Platforms)

for _, osarch := range osArchs {
Expand Down Expand Up @@ -161,18 +150,12 @@ func GolangCrossBuild() error {
// Currently we can't reproduce this is issue, but here we can eliminate the need for calling msiexec
// if extract the osqueryd.exe binary during the build.
//
// The builder docker images are Debian so we need to install msitools for
// linux in order to extract the osqueryd.exe from MSI during build process. // Install MSI tools in order to extract file from MSI
// Ideally we would want these to be a part of the build docker image,
// but doing this here for now due to limited time before 7.16.2
//
// The cross build is currently called for two binaries osquerybeat and osqquery-extension
// Only install msitools and extract osqueryd.exe during osquerybeat build on windows
// Only extract osqueryd.exe during osquerybeat build on windows
args := devtools.DefaultGolangCrossBuildArgs()

// Install msitools only
if !strings.HasPrefix(args.Name, "osquery-extension-") {
// Install msitools in the container and extract osqueryd.exe from MSI
// Extract osqueryd.exe from MSI
if err := extractFromMSI(); err != nil {
return err
}
Expand Down

0 comments on commit 3d3452f

Please sign in to comment.