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

golang-crossbuild: fix the issue with the CVE-2022-24765 #34241

Closed

Conversation

v1v
Copy link
Member

@v1v v1v commented Jan 12, 2023

What does this PR do?

Fix the issue with the CVE-2022-24765, so the workspace is set as safe

Why is it important?

Otherwise, it will fail with:

[2023-01-11T09:58:36.531Z] >> Building using: cmd='build/mage-linux-amd64 golangCrossBuild', env=[CC=o64-clang, CXX=o64-clang++, GOARCH=amd64, GOARM=, GOOS=darwin, PLATFORM_ID=darwin-amd64]
[2023-01-11T09:58:36.632Z] fatal: detected dubious ownership in repository at '/go/src/github.com/elastic/beats'

How to test this PR locally

cd <your-beats>
PACKAGES="docker" PLATFORMS="linux/arm64" mage package

##. Further details

b32084d didn't work since the docker container requires the docker use so it can run the installDependencies function defined in `dev-tools/mage/pkgdeps.go

So I ended up using the suggestion from elastic/golang-crossbuild#232

Related issues

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jan 12, 2023
@botelastic
Copy link

botelastic bot commented Jan 12, 2023

This pull request doesn't have a Team:<team> label.

@v1v
Copy link
Member Author

v1v commented Jan 12, 2023

/packaging

@mergify mergify bot assigned v1v Jan 12, 2023
@mergify
Copy link
Contributor

mergify bot commented Jan 12, 2023

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @v1v? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

@v1v v1v added backport-7.17 Automated backport to the 7.17 branch with mergify backport-v8.6.0 Automated backport with mergify labels Jan 12, 2023
@elasticmachine
Copy link
Collaborator

💔 Build Failed

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-01-12T09:07:00.201+0000

  • Duration: 75 min 41 sec

Test stats 🧪

Test Results
Failed 0
Passed 25159
Skipped 1954
Total 27113

Steps errors 5

Expand to view the steps failures

metricbeat-crosscompile - make -C metricbeat crosscompile
  • Took 8 min 52 sec . View more details here
  • Description: make -C metricbeat crosscompile
metricbeat-crosscompile - make -C metricbeat crosscompile
  • Took 6 min 6 sec . View more details here
  • Description: make -C metricbeat crosscompile
metricbeat-crosscompile - make -C metricbeat crosscompile
  • Took 6 min 2 sec . View more details here
  • Description: make -C metricbeat crosscompile
winlogbeat-windows-2019-windows-2019 - mage build unitTest
  • Took 2 min 11 sec . View more details here
  • Description: mage build unitTest
Error signal
  • Took 0 min 0 sec . View more details here
  • Description: Error 'hudson.AbortException: script returned exit code 2'

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@v1v
Copy link
Member Author

v1v commented Jan 13, 2023

#34254 is the one actually changing the git correctly! Closing this one now

@v1v v1v closed this Jan 13, 2023
@elasticmachine
Copy link
Collaborator

💔 Build Failed

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-01-13T09:22:53.117+0000

  • Duration: 92 min 40 sec

Test stats 🧪

Test Results
Failed 0
Passed 25235
Skipped 1954
Total 27189

Steps errors 5

Expand to view the steps failures

metricbeat-goIntegTest - mage goIntegTest
  • Took 47 min 50 sec . View more details here
  • Description: mage goIntegTest
metricbeat-crosscompile - make -C metricbeat crosscompile
  • Took 8 min 9 sec . View more details here
  • Description: make -C metricbeat crosscompile
metricbeat-crosscompile - make -C metricbeat crosscompile
  • Took 6 min 2 sec . View more details here
  • Description: make -C metricbeat crosscompile
metricbeat-crosscompile - make -C metricbeat crosscompile
  • Took 6 min 4 sec . View more details here
  • Description: make -C metricbeat crosscompile
Error signal
  • Took 0 min 0 sec . View more details here
  • Description: Error 'hudson.AbortException: script returned exit code 2'

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-7.17 Automated backport to the 7.17 branch with mergify backport-v8.6.0 Automated backport with mergify needs_team Indicates that the issue/PR needs a Team:* label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants