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
  • Loading branch information
aleksmaus committed Jan 26, 2022
1 parent a473d94 commit 49e914e
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 49e914e

Please sign in to comment.