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

Add hotdog OCI hooks #1871

Merged
merged 1 commit into from
Dec 17, 2021
Merged

Conversation

arnaldo2792
Copy link
Contributor

@arnaldo2792 arnaldo2792 commented Dec 16, 2021

Issue number:
N / A

Description of changes:
hotdog provides oci hooks to apply the hotpatch for Apache log4j2, to containers running JVM machines

Remaining tasks:

  • Change the sources to the public hotdog repo
  • Update cache

Testing done:
I built it with my local copy of the sources.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@arnaldo2792 arnaldo2792 requested a review from cbgbt December 16, 2021 23:52
@arnaldo2792
Copy link
Contributor Author

Forced push includes:

  • Update sources to reference public repository
  • Ordering nit in release.spec
  • Added LICENSE file from hotdog sources
  • Updated license fro hotdog
  • Used the upstream compile command for hotdog-hotpatch

Copy link
Contributor

@samuelkarp samuelkarp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM. We need to get this tested in combination with the other PRs too.

@arnaldo2792 arnaldo2792 requested a review from bcressey December 17, 2021 01:43
@arnaldo2792 arnaldo2792 marked this pull request as ready for review December 17, 2021 01:56
Comment on lines 11 to 13
[[package.metadata.build-package.external-files]]
url = "https://github.com/bottlerocket-os/hotdog/archive/c212cfb564850b48aa6008563074a329cee041a1/hotdog-c212cfb.tar.gz"
sha512 = "68bbd4c4fda72065eae995fe75f0f8d0a30228476051906da4bce3f66352138356bb4dd4fd8e0aa6f5822388f9c7dc04e85fa35038e91be294e4fdd4a6e970bc"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want bottlerocket-os/hotdog@f300fb78 for the verbosity fix.

# The oci hooks commands can be compiled as we usually compile golang packages
%cross_go_configure %{goimport}
for cmd in hotdog-cc-hook hotdog-poststart-hook; do
GO111MODULE=off go build -buildmode=pie -ldflags "-linkmode=external" -o $cmd ./cmd/$cmd
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably needs to change for the newer SDK:

Suggested change
GO111MODULE=off go build -buildmode=pie -ldflags "-linkmode=external" -o $cmd ./cmd/$cmd
GO111MODULE=off go build -buildmode=pie -ldflags "${GOLDFLAGS}" -o $cmd ./cmd/$cmd

hotdog provides oci hooks to apply the hotpatch for Apache log4j2, to
containers running JVM machines

Signed-off-by: Arnaldo Garcia Rincon <agarrcia@amazon.com>
@arnaldo2792
Copy link
Contributor Author

arnaldo2792 commented Dec 17, 2021

Forced push includes:

  • Updated the version in hotdog
  • Used the new flags in build

@arnaldo2792 arnaldo2792 requested a review from bcressey December 17, 2021 02:48
@arnaldo2792 arnaldo2792 merged commit 7f4039d into bottlerocket-os:develop Dec 17, 2021
@arnaldo2792 arnaldo2792 deleted the add-hotdog branch January 26, 2022 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants