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 msitools install for windows build, using the latest docker image with msitools preinstalled #30040

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