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 socat package #4054

Merged
merged 2 commits into from
Jun 13, 2024
Merged

Conversation

koooosh
Copy link
Contributor

@koooosh koooosh commented Jun 13, 2024

Issue number: #4055

Closes #4055

Description of changes:

This change adds the socat package to the aws-dev variant to be used by our downstream customers. Specifically, it includes the following:

  • socat.spec which is similar to the previous spec file we had for socat with some changes to account for new features added to the updated version 1.8.0.0
  • Cargo.toml for the new package
  • 0001-xioopts-conditionally-compile-applyopts_termios_valu.patch needed to successfully compile the new socat version. Prior to this patch, we got a compilation error for an undefined reference to xiotermios_value, which was defined in a conditionally compiled code block that we want disabled. To fix this, in the patch we add that same conditional compilation directive WITH_TERMIOS to the function applyopts_termios_value which was using that undefined reference.
  • Adding socat as a dependency to aws-dev which includes updates to its Cargo.toml and the general variant Cargo.lock

Testing done:

aws-dev variant successfully builds and launches. socat binary exists and runs successfully. We tested socat by using it to connect a TCP port to a UNIX socket and verifying we can use the port to get responses.

Further testing for the downstream use case also looks good.

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.

@koooosh koooosh requested a review from arnaldo2792 June 13, 2024 05:17
@koooosh koooosh self-assigned this Jun 13, 2024
Comment on lines 36 to 37
+#if WITH_TERMIOS
+ int applyopts_termios_value(
Copy link
Contributor

Choose a reason for hiding this comment

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

Convention is not to indent the lines guarded by #ifdef - that keeps the code readable in the case where it's used, and for the purposes of this patch will minimize the delta.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it, will remove those indents

Signed-off-by: Kush Upadhyay <kushupad@amazon.com>
Signed-off-by: Kush Upadhyay <kushupad@amazon.com>
@koooosh koooosh merged commit 618ec7a into bottlerocket-os:develop Jun 13, 2024
31 checks passed
@koooosh koooosh deleted the add-socat-package branch June 13, 2024 20:33
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.

Add the socat package to Bottlerocket
4 participants