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 initial ClearLinux support for testing RPM build #7659

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pccowboy
Copy link

What does this PR do?

This adds RPM packaging support sufficient for testing installation of the datadog agent on Clearlinux

Motivation

Experimenting with using clearlinux

Additional Notes

The existing dependency scanning creates a dependency on /bin/sh in the resulting RPM. I cannot find a way to inject %define __requires_exclude ^/bin/sh$ using omnibus, unless I manually create the spec.erb described at https://github.com/chef/omnibus/blob/3e43293a0eff95c4175c983247b737a2ce137e35/docs/Building%20on%20RHEL.md

Any suggestions on how to do this are welcomed. Clearlinux installs /bin/sh as part of a different package entirely as part of the os-core bundle installation.

Describe your test plan

rpm -ivh --force datadog-agent-7.26.0-1.x86_64.rpm; datadog-agent configcheck

@pccowboy pccowboy requested a review from a team as a code owner March 15, 2021 21:43
@bits-bot
Copy link
Collaborator

bits-bot commented Mar 15, 2021

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


David Swift seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@bkabrda
Copy link
Contributor

bkabrda commented Mar 16, 2021

Hi 👋 thanks for opening the PR.

I think the problem here is that the autogenerated /bin/sh dependency is generated for a reason - for example, the omnibus/package-scripts/agent/postinst script that your PR modifies has #!/bin/sh as the interpreter and AFAICT running on a system that doesn't have /bin/sh, it would just fail. There are more scripts that use /bin/sh as their interpreter as well. I'm not very familiar with Clear Linux, but I'll try to take a look at this and see what the best solution might be.

@bkabrda
Copy link
Contributor

bkabrda commented Mar 16, 2021

Ok, after getting more familiar with Clear Linux, I see where the problem is now:

Since Clear Linux is not primarily an RPM-based distribution, rpm can be installed on it, but the RPM database is empty (initially), so there is no package that provides /bin/sh in RPM terms, even if /bin/sh is actually present on the filesystem (installed via the os-core bundle).

I think that perhaps removing the /bin/sh dependency might be the right way to go, but I will have to investigate a little bit more what effect that would have on installation on all the RPM-based platforms that we support today. I'll update this discussion when I have a better understanding of whether or not we can do this change.

@bkabrda
Copy link
Contributor

bkabrda commented Apr 8, 2021

First of all, sorry for not responding further on this for a long time.

As for the solution, is it an option for you to use containerized agent as described in Datadog docs? That's generally a good way to go, unless there's something the containerized agent can't do on ClearLinux (in which case we'd love to hear specific issues).

@pccowboy
Copy link
Author

Hello -
We are not currently planning to allow containerized applications to run on our production infrastructure.

We have tried to build a virtual RPM so that the RPM db reflects that /bin/sh is installed. Is that a valid enough workaround that you could accept this PR?

cc:onfleet-ablair

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.

3 participants