Skip to content

[Auditbeat] Read formula path from INSTALL_RECEIPT.json for Homebrew packages#10507

Merged
cwurm merged 3 commits intoelastic:masterfrom
cwurm:package_homebrew_install_receipt
Feb 5, 2019
Merged

[Auditbeat] Read formula path from INSTALL_RECEIPT.json for Homebrew packages#10507
cwurm merged 3 commits intoelastic:masterfrom
cwurm:package_homebrew_install_receipt

Conversation

@cwurm
Copy link
Copy Markdown
Contributor

@cwurm cwurm commented Feb 3, 2019

When reading Homebrew packages, changes to reading the path to the Ruby formula from /usr/local/Cellar/{pkg.Name}/{pkg.Version}/INSTALL_RECEIPT.json and fall back to the previous /usr/local/Cellar/{pkg.Name}/{pkg.Version}/.brew/{pkg.Name}.rb only if that does not work.

On my Mac this read the whole 99 packages and their versions (confirmed with find /usr/local/Cellar -type d -depth 2 | wc -l), where the previous logic read only 92.

@cwurm cwurm added review needs_backport PR is waiting to be backported to other branches. Auditbeat SecOps labels Feb 3, 2019
@cwurm cwurm requested a review from a team as a code owner February 3, 2019 12:09
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/secops

@cwurm
Copy link
Copy Markdown
Contributor Author

cwurm commented Feb 4, 2019

jenkins, test this

Copy link
Copy Markdown
Contributor

@tsg tsg left a comment

Choose a reason for hiding this comment

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

LGTM.

@cwurm cwurm force-pushed the package_homebrew_install_receipt branch from 8e5dab0 to fb25834 Compare February 4, 2019 16:55
@cwurm cwurm merged commit 912ef57 into elastic:master Feb 5, 2019
@cwurm cwurm added v6.7.0 and removed needs_backport PR is waiting to be backported to other branches. labels Feb 5, 2019
cwurm pushed a commit to cwurm/beats that referenced this pull request Feb 5, 2019
…packages (elastic#10507)

When reading Homebrew packages, changes to reading the path to the Ruby formula from `/usr/local/Cellar/{pkg.Name}/{pkg.Version}/INSTALL_RECEIPT.json` and fall back to the previous `/usr/local/Cellar/{pkg.Name}/{pkg.Version}/.brew/{pkg.Name}.rb` only if that does not work.

(cherry picked from commit 912ef57)
@cwurm cwurm deleted the package_homebrew_install_receipt branch February 5, 2019 09:35
cwurm pushed a commit that referenced this pull request Feb 5, 2019
…packages (#10507) (#10559)

When reading Homebrew packages, changes to reading the path to the Ruby formula from `/usr/local/Cellar/{pkg.Name}/{pkg.Version}/INSTALL_RECEIPT.json` and fall back to the previous `/usr/local/Cellar/{pkg.Name}/{pkg.Version}/.brew/{pkg.Name}.rb` only if that does not work.

(cherry picked from commit 912ef57)
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.

4 participants