diff options
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | PKGBUILD | 46 |
2 files changed, 42 insertions, 17 deletions
@@ -1,12 +1,13 @@ pkgbase = newrelic-infra - pkgver = 1.11.26 + pkgver = 1.15.2 pkgrel = 1 - url = https://download.newrelic.com/infrastructure_agent/linux/apt/pool/main/n/newrelic-infra + url = https://github.com/newrelic/infrastructure-agent arch = x86_64 - license = custom - depends = curl - source = https://download.newrelic.com/infrastructure_agent/linux/apt/pool/main/n/newrelic-infra/newrelic-infra_systemd_1.11.26_systemd_amd64.deb - sha256sums = 6123dcc1c206db060675feecc978662441347c6ad697bf2b56d5cf2f244ca321 + license = Apache + source = https://download.newrelic.com/infrastructure_agent/linux/apt/pool/main/n/newrelic-infra/newrelic-infra_systemd_1.15.2_systemd_amd64.deb + source = https://raw.githubusercontent.com/newrelic/infrastructure-agent/1.15.2/assets/examples/infrastructure/newrelic-infra-template.yml.example + sha256sums = 5051958c7df07c4425649440694b5ebece7a33b48f01b8c238f3b4708cbf8f00 + sha256sums = f4f5614c45e1afb9fbf11a5d948d5a80f1793ebfc2b0a073bfdd4264e396daa5 pkgname = newrelic-infra @@ -1,18 +1,42 @@ pkgname=newrelic-infra -pkgver=1.11.26 +pkgver=1.15.2 pkgrel=1 -license=('custom') +license=('Apache') arch=('x86_64') -depends=('curl') -url=https://download.newrelic.com/infrastructure_agent/linux/apt/pool/main/n/newrelic-infra -source=($url/newrelic-infra_systemd_${pkgver}_systemd_amd64.deb) -sha256sums=('6123dcc1c206db060675feecc978662441347c6ad697bf2b56d5cf2f244ca321') +url=https://github.com/newrelic/infrastructure-agent +source=( + "https://download.newrelic.com/infrastructure_agent/linux/apt/pool/main/n/newrelic-infra/newrelic-infra_systemd_${pkgver}_systemd_amd64.deb" + "https://raw.githubusercontent.com/newrelic/infrastructure-agent/${pkgver}/assets/examples/infrastructure/newrelic-infra-template.yml.example" +) +sha256sums=( + '5051958c7df07c4425649440694b5ebece7a33b48f01b8c238f3b4708cbf8f00' + 'f4f5614c45e1afb9fbf11a5d948d5a80f1793ebfc2b0a073bfdd4264e396daa5' +) package() { - tar xvf "${srcdir}/data.tar.gz" - - cp -Ra "${srcdir}/etc" "${pkgdir}" - cp -Ra "${srcdir}/usr" "${pkgdir}" - cp -Ra "${srcdir}/var" "${pkgdir}" + for dir in usr/bin var/db etc/newrelic-infra var/log/newrelic-infra usr/lib/systemd/system; do + mkdir -p "${pkgdir}/${dir}" + done + + # Extract debian data + tar -xzf data.tar.gz + + # Sample config + cp newrelic-infra-template.yml.example "${pkgdir}/etc/newrelic-infra/newrelic-infra.yml.example" + + # Integration configs + cp -Ra "${srcdir}/etc/newrelic-infra" "${pkgdir}/etc/" + + # Systemd unit file, without the broken PIDFile directive + grep -ve '^PIDFile' \ + "${srcdir}/etc/systemd/system/newrelic-infra.service" \ + > "${pkgdir}/usr/lib/systemd/system/newrelic-infra.service" + + # Infra-agent binaries + cp -Ra ${srcdir}/usr/bin/* "${pkgdir}/usr/bin/" + + # Integration binaries and definitions + # TODO: Move this to /var/lib and add corresponding env overrides + cp -Ra "${srcdir}/var/db/newrelic-infra" "${pkgdir}/var/db" } |