Skip to content

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

Merged
tsg merged 1 commit intoelastic:6.7from
tsg:backport_10429_6.7
Feb 6, 2019
Merged

Cherry-pick #10429 to 6.7: Add rpm packaging rebase#10623
tsg merged 1 commit intoelastic:6.7from
tsg:backport_10429_6.7

Conversation

@tsg
Copy link
Copy Markdown
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
Copy link
Copy Markdown

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
Copy link
Copy Markdown

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
Copy link
Copy Markdown

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
Copy link
Copy Markdown

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
Copy link
Copy Markdown

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
Copy link
Copy Markdown

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
Copy link
Copy Markdown

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
Copy link
Copy Markdown

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
Copy link
Copy Markdown

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
Copy Markdown
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