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

Cherry-pick #10429 to 6.7: Add rpm packaging rebase #10623

Merged
merged 1 commit into from
Feb 6, 2019

Conversation

tsg
Copy link
Contributor

@tsg tsg commented Feb 6, 2019

Cherry-pick of PR #10429 to 6.7 branch. Original message:

This takes over the code from #9092 and rebases it on top of master.

This adds support for programmatically reading the list of RPM packages. The previous version was using exec (called the rpm binary), but we'd like to keep Auditbeat exec free, because execs are currently blocked by seccomp, as a security feature.

Using the model from Journalbeat, the new code uses dlopen get the relevant C functions and calls them using CGo. This means that librpm is not a hard dependency, but only for when this functionality is needed.

* Add RPM packages support to the package dataset

(cherry picked from commit 99d09ea)
RPMTAG_URL = 1020
RPMTAG_ARCH = 1022
RPMTAG_SIZE = 1009
RPMTAG_INSTALLTIME = 1008

Choose a reason for hiding this comment

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

don't use ALL_CAPS in Go names; use CamelCase

RPMTAG_LICENSE = 1014
RPMTAG_URL = 1020
RPMTAG_ARCH = 1022
RPMTAG_SIZE = 1009

Choose a reason for hiding this comment

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

don't use ALL_CAPS in Go names; use CamelCase

RPMTAG_SUMMARY = 1004
RPMTAG_LICENSE = 1014
RPMTAG_URL = 1020
RPMTAG_ARCH = 1022

Choose a reason for hiding this comment

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

don't use ALL_CAPS in Go names; use CamelCase

RPMTAG_RELEASE = 1002
RPMTAG_SUMMARY = 1004
RPMTAG_LICENSE = 1014
RPMTAG_URL = 1020

Choose a reason for hiding this comment

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

don't use ALL_CAPS in Go names; use CamelCase

RPMTAG_VERSION = 1001
RPMTAG_RELEASE = 1002
RPMTAG_SUMMARY = 1004
RPMTAG_LICENSE = 1014

Choose a reason for hiding this comment

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

don't use ALL_CAPS in Go names; use CamelCase

RPMTAG_NAME = 1000
RPMTAG_VERSION = 1001
RPMTAG_RELEASE = 1002
RPMTAG_SUMMARY = 1004

Choose a reason for hiding this comment

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

don't use ALL_CAPS in Go names; use CamelCase

const (
RPMTAG_NAME = 1000
RPMTAG_VERSION = 1001
RPMTAG_RELEASE = 1002

Choose a reason for hiding this comment

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

don't use ALL_CAPS in Go names; use CamelCase

// Constants in sync with /usr/include/rpm/rpmtag.h
const (
RPMTAG_NAME = 1000
RPMTAG_VERSION = 1001

Choose a reason for hiding this comment

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

don't use ALL_CAPS in Go names; use CamelCase


// Constants in sync with /usr/include/rpm/rpmtag.h
const (
RPMTAG_NAME = 1000

Choose a reason for hiding this comment

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

don't use ALL_CAPS in Go names; use CamelCase

@tsg tsg merged commit 9e0ed82 into elastic:6.7 Feb 6, 2019
@tsg
Copy link
Contributor Author

tsg commented Feb 6, 2019

Merged because all tests were green and it was already reviewed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants