[arch-commits] Commit in beats/repos (24 files)

Massimiliano Torromeo mtorromeo at archlinux.org
Thu Oct 27 14:07:24 UTC 2016


    Date: Thursday, October 27, 2016 @ 14:07:23
  Author: mtorromeo
Revision: 193784

archrelease: copy trunk to community-i686, community-x86_64

Added:
  beats/repos/community-i686/PKGBUILD
    (from rev 193783, beats/trunk/PKGBUILD)
  beats/repos/community-i686/filebeat.install
    (from rev 193783, beats/trunk/filebeat.install)
  beats/repos/community-i686/filebeat.service
    (from rev 193783, beats/trunk/filebeat.service)
  beats/repos/community-i686/filebeat.sysusers
    (from rev 193783, beats/trunk/filebeat.sysusers)
  beats/repos/community-i686/metricbeat.service
    (from rev 193783, beats/trunk/metricbeat.service)
  beats/repos/community-i686/packetbeat.service
    (from rev 193783, beats/trunk/packetbeat.service)
  beats/repos/community-x86_64/PKGBUILD
    (from rev 193783, beats/trunk/PKGBUILD)
  beats/repos/community-x86_64/filebeat.install
    (from rev 193783, beats/trunk/filebeat.install)
  beats/repos/community-x86_64/filebeat.service
    (from rev 193783, beats/trunk/filebeat.service)
  beats/repos/community-x86_64/filebeat.sysusers
    (from rev 193783, beats/trunk/filebeat.sysusers)
  beats/repos/community-x86_64/metricbeat.service
    (from rev 193783, beats/trunk/metricbeat.service)
  beats/repos/community-x86_64/packetbeat.service
    (from rev 193783, beats/trunk/packetbeat.service)
Deleted:
  beats/repos/community-i686/PKGBUILD
  beats/repos/community-i686/filebeat.install
  beats/repos/community-i686/filebeat.service
  beats/repos/community-i686/filebeat.sysusers
  beats/repos/community-i686/metricbeat.service
  beats/repos/community-i686/packetbeat.service
  beats/repos/community-x86_64/PKGBUILD
  beats/repos/community-x86_64/filebeat.install
  beats/repos/community-x86_64/filebeat.service
  beats/repos/community-x86_64/filebeat.sysusers
  beats/repos/community-x86_64/metricbeat.service
  beats/repos/community-x86_64/packetbeat.service

-------------------------------------+
 /PKGBUILD                           |  212 ++++++++++++++++++++++++++++++++++
 /filebeat.install                   |   38 ++++++
 /filebeat.service                   |   24 +++
 /filebeat.sysusers                  |    2 
 /metricbeat.service                 |   22 +++
 /packetbeat.service                 |   22 +++
 community-i686/PKGBUILD             |  110 -----------------
 community-i686/filebeat.install     |   19 ---
 community-i686/filebeat.service     |   11 -
 community-i686/filebeat.sysusers    |    1 
 community-i686/metricbeat.service   |   10 -
 community-i686/packetbeat.service   |   10 -
 community-x86_64/PKGBUILD           |  110 -----------------
 community-x86_64/filebeat.install   |   19 ---
 community-x86_64/filebeat.service   |   11 -
 community-x86_64/filebeat.sysusers  |    1 
 community-x86_64/metricbeat.service |   10 -
 community-x86_64/packetbeat.service |   10 -
 18 files changed, 320 insertions(+), 322 deletions(-)

Deleted: community-i686/PKGBUILD
===================================================================
--- community-i686/PKGBUILD	2016-10-27 14:05:43 UTC (rev 193783)
+++ community-i686/PKGBUILD	2016-10-27 14:07:23 UTC (rev 193784)
@@ -1,110 +0,0 @@
-# Maintainer: Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
-# Contributor: Tyler Langlois <ty |at| tjll |dot| net>
-
-pkgbase=beats
-pkgname=(filebeat packetbeat metricbeat)
-pkgver=5.0.0
-pkgrel=1
-pkgdesc='Data shippers for Elasticsearch'
-arch=('i686' 'x86_64')
-url='https://www.elastic.co/products/beats'
-license=('APACHE')
-depends=('glibc')
-makedepends=('go' 'git' 'libpcap')
-options=('!strip')
-source=("https://github.com/elastic/beats/archive/v$pkgver/beats-$pkgver.tar.gz"
-        "filebeat.install"
-        "filebeat.sysusers"
-        "filebeat.service"
-        "packetbeat.service"
-        "metricbeat.service")
-sha256sums=('3e6b7cf2ee5f52e78ae87ef04ab9dd49977c89f86a09416586896aeaea844e34'
-            'fd765921479d391d613c75fe592a4193e538dd9feffc1ca36bc687bec0f0e1aa'
-            '33feb3690f8b31563cc1e2da557c2aa326501ce9ccd7e0a142036902bfdb05ff'
-            '1ab98d3e387c3970e3005f72f4ce266c4fa19ec3938a576da0a407c7db2fa7ce'
-            'cabf11f35ced8bb61fc26ace4d409dfdb4ed812ff4bc70e168410cb1dc324318'
-            '8a1bcfdb057e4f57d5f16570079055d1822fdfe8d453409891682f6e580f4ff0')
-
-prepare() {
-    cd beats-$pkgver
-
-    # Avoid installing extraneous configs
-    sed '/[- ]win/d ; /[- ]darwin/d ; /[- ]binary/d' -i */Makefile
-    # Install the Linux config as default
-    sed -r 's#/([a-z]+)-linux.yml#/\1.yml#' -i */Makefile
-
-    # Perform some timestomping to avoid make warnings
-    LANG=C _t="$(date -r Makefile +'%Y-%m-%d %k:%M:%S')"
-    touch -m -d "$_t" */Makefile
-
-    # Workaround to place extracted release into GOPATH
-    mkdir -p "$srcdir"/gopath/src/github.com/elastic
-    ln -sf "$srcdir"/beats-$pkgver \
-        "$srcdir"/gopath/src/github.com/elastic/beats
-}
-
-build() {
-    export GOPATH="$srcdir"/gopath
-    for beat in ${pkgname[@]}; do
-        msg2 "Building $beat..."
-        cd "$srcdir"/beats-$pkgver/$beat
-        make
-    done
-}
-
-package_filebeat() {
-    pkgdesc='Collects, pre-processes, and forwards log files to remote sources'
-    optdepends=('elasticsearch: for standalone installation')
-    backup=("etc/$pkgname/$pkgname.yml" "etc/$pkgname/$pkgname.template.json")
-    install="$pkgname.install"
-
-    cd beats-$pkgver/$pkgname
-
-    install -dm755 "$pkgdir"/var/lib/$pkgname
-
-    install -dm755 "$pkgdir"/etc/$pkgname
-    cp $pkgname.{yml,template.json} "$pkgdir"/etc/$pkgname
-
-    install -Dm755 $pkgname \
-                   "$pkgdir"/usr/bin/$pkgname
-    install -Dm644 "$srcdir"/$pkgname.service \
-                   "$pkgdir"/usr/lib/systemd/system/$pkgname.service
-
-    install -Dm644 "$srcdir"/$pkgname.sysusers \
-                   "$pkgdir"/usr/lib/sysusers.d/$pkgname.conf
-}
-
-package_packetbeat() {
-    pkgdesc='Network packet analyzer that ships data to Elasticsearch'
-    depends=('libpcap')
-    optdepends=('elasticsearch: for standalone installation')
-    backup=("etc/$pkgname/$pkgname.yml" "etc/$pkgname/$pkgname.template.json")
-
-    cd beats-$pkgver/$pkgname
-
-    install -dm755 "$pkgdir"/etc/$pkgname
-    cp $pkgname.{yml,template.json} "$pkgdir"/etc/$pkgname
-
-    install -Dm755 $pkgname \
-                   "$pkgdir"/usr/bin/$pkgname
-    install -Dm644 "$srcdir"/$pkgname.service \
-                   "$pkgdir"/usr/lib/systemd/system/$pkgname.service
-}
-
-package_metricbeat() {
-    pkgdesc='Server monitoring agent that stores metrics in Elasticsearch'
-    optdepends=('elasticsearch: for standalone installation')
-    backup=("etc/$pkgname/$pkgname.yml" "etc/$pkgname/$pkgname.template.json")
-    conflicts=('topbeat')
-    replaces=('topbeat')
-
-    cd beats-$pkgver/$pkgname
-
-    install -dm755 "$pkgdir"/etc/$pkgname
-    cp $pkgname.{yml,template.json} "$pkgdir"/etc/$pkgname
-
-    install -Dm755 $pkgname \
-                   "$pkgdir"/usr/bin/$pkgname
-    install -Dm644 "$srcdir"/$pkgname.service \
-                   "$pkgdir"/usr/lib/systemd/system/$pkgname.service
-}

Copied: beats/repos/community-i686/PKGBUILD (from rev 193783, beats/trunk/PKGBUILD)
===================================================================
--- community-i686/PKGBUILD	                        (rev 0)
+++ community-i686/PKGBUILD	2016-10-27 14:07:23 UTC (rev 193784)
@@ -0,0 +1,106 @@
+# Maintainer: Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
+# Contributor: Tyler Langlois <ty |at| tjll |dot| net>
+
+pkgbase=beats
+pkgname=(filebeat packetbeat metricbeat)
+pkgver=5.0.0
+pkgrel=2
+pkgdesc='Data shippers for Elasticsearch'
+arch=('i686' 'x86_64')
+url='https://www.elastic.co/products/beats'
+license=('APACHE')
+depends=('glibc')
+makedepends=('go' 'git' 'libpcap')
+optdepends=('elasticsearch: for standalone installation'
+            'python: for migration script')
+options=('!strip')
+source=("https://github.com/elastic/beats/archive/v$pkgver/beats-$pkgver.tar.gz"
+        "filebeat.install"
+        "filebeat.sysusers"
+        "filebeat.service"
+        "packetbeat.service"
+        "metricbeat.service")
+sha256sums=('3e6b7cf2ee5f52e78ae87ef04ab9dd49977c89f86a09416586896aeaea844e34'
+            'fd765921479d391d613c75fe592a4193e538dd9feffc1ca36bc687bec0f0e1aa'
+            '33feb3690f8b31563cc1e2da557c2aa326501ce9ccd7e0a142036902bfdb05ff'
+            '402ecb4d9643ae23c95d6c48702c70f6c8821c477f16b23e4c9137cb34fdca24'
+            '588ce1da188186f9b751592ba3b5848dfa509d1abf314e2a053687e361955553'
+            '8c8636661080248b7eef3dad1a203b6376277de8d9855ed5b33dcbb85eca2fc0')
+
+prepare() {
+    cd beats-$pkgver
+
+    # Avoid installing extraneous configs
+    sed '/[- ]win/d ; /[- ]darwin/d ; /[- ]binary/d' -i */Makefile
+    # Install the Linux config as default
+    sed -r 's#/([a-z]+)-linux.yml#/\1.yml#' -i */Makefile
+
+    # Perform some timestomping to avoid make warnings
+    LANG=C _t="$(date -r Makefile +'%Y-%m-%d %k:%M:%S')"
+    touch -m -d "$_t" */Makefile
+
+    # Workaround to place extracted release into GOPATH
+    mkdir -p "$srcdir"/gopath/src/github.com/elastic
+    ln -sf "$srcdir"/beats-$pkgver \
+        "$srcdir"/gopath/src/github.com/elastic/beats
+}
+
+build() {
+    export GOPATH="$srcdir"/gopath
+    for beat in ${pkgname[@]}; do
+        msg2 "Building $beat..."
+        cd "$srcdir"/beats-$pkgver/$beat
+        make
+        cd "$srcdir"/beats-$pkgver/libbeat/dashboards
+        make BEAT=$beat
+        mv import_dashboards import_dashboards-$beat
+    done
+}
+
+_do_package_beat() {
+    backup=("etc/$pkgname/$pkgname.yml" "etc/$pkgname/$pkgname.template.json")
+
+    cd beats-$pkgver/$pkgname
+
+    install -dm755 "$pkgdir"/var/lib/$pkgname
+
+    install -dm755 "$pkgdir"/etc/$pkgname
+    cp $pkgname.{yml,full.yml,template.json} "$pkgdir"/etc/$pkgname
+
+    install -Dm755 $pkgname \
+                   "$pkgdir"/usr/bin/$pkgname
+    install -Dm644 "$srcdir"/$pkgname.service \
+                   "$pkgdir"/usr/lib/systemd/system/$pkgname.service
+
+    cd ../libbeat
+    install -Dm755 dashboards/import_dashboards-$pkgname \
+                   "$pkgdir"/usr/share/$pkgname/scripts/import_dashboards
+    install -Dm755 scripts/migrate_beat_config_1_x_to_5_0.py \
+                   "$pkgdir"/usr/share/$pkgname/scripts/migrate_beat_config_1_x_to_5_0.py
+}
+
+package_filebeat() {
+    pkgdesc='Collects, pre-processes, and forwards log files to remote sources'
+    install="$pkgname.install"
+
+    _do_package_beat
+
+    cd "$srcdir"/beats-$pkgver/$pkgname
+    install -Dm644 "$srcdir"/$pkgname.sysusers \
+                   "$pkgdir"/usr/lib/sysusers.d/$pkgname.conf
+}
+
+package_packetbeat() {
+    pkgdesc='Network packet analyzer that ships data to Elasticsearch'
+    depends=('libpcap')
+
+    _do_package_beat
+}
+
+package_metricbeat() {
+    pkgdesc='Server monitoring agent that stores metrics in Elasticsearch'
+    conflicts=('topbeat')
+    replaces=('topbeat')
+
+    _do_package_beat
+}

Deleted: community-i686/filebeat.install
===================================================================
--- community-i686/filebeat.install	2016-10-27 14:05:43 UTC (rev 193783)
+++ community-i686/filebeat.install	2016-10-27 14:07:23 UTC (rev 193784)
@@ -1,19 +0,0 @@
-# Arg 1: the new package version
-post_install() {
-
-  # Create user and group
-  systemd-sysusers filebeat.conf
-
-  # Required at this stage to ensure user & group are available
-  install -d -o filebeat -g filebeat /var/lib/filebeat
-}
-
-# Arg 1: new package version, arg 2: old package version
-post_upgrade() {
-  # All packages <= 1.0.0_rc2-1 didn't have discrete users
-  if [ "`vercmp $2 1.0.0_rc2-1`" -le 0 ] ; then
-      post_install
-  fi
-}
-
-# vim:set ts=2 sw=2 et:

Copied: beats/repos/community-i686/filebeat.install (from rev 193783, beats/trunk/filebeat.install)
===================================================================
--- community-i686/filebeat.install	                        (rev 0)
+++ community-i686/filebeat.install	2016-10-27 14:07:23 UTC (rev 193784)
@@ -0,0 +1,19 @@
+# Arg 1: the new package version
+post_install() {
+
+  # Create user and group
+  systemd-sysusers filebeat.conf
+
+  # Required at this stage to ensure user & group are available
+  install -d -o filebeat -g filebeat /var/lib/filebeat
+}
+
+# Arg 1: new package version, arg 2: old package version
+post_upgrade() {
+  # All packages <= 1.0.0_rc2-1 didn't have discrete users
+  if [ "`vercmp $2 1.0.0_rc2-1`" -le 0 ] ; then
+      post_install
+  fi
+}
+
+# vim:set ts=2 sw=2 et:

Deleted: community-i686/filebeat.service
===================================================================
--- community-i686/filebeat.service	2016-10-27 14:05:43 UTC (rev 193783)
+++ community-i686/filebeat.service	2016-10-27 14:07:23 UTC (rev 193784)
@@ -1,11 +0,0 @@
-[Unit]
-Description=Log file forwarder to remote sources
-Documentation=https://www.elastic.co/guide/en/beats/filebeat/current/index.html
-After=network.target
-
-[Service]
-ExecStart=/usr/bin/filebeat -c /etc/filebeat/filebeat.yml
-User=filebeat
-
-[Install]
-WantedBy=multi-user.target

Copied: beats/repos/community-i686/filebeat.service (from rev 193783, beats/trunk/filebeat.service)
===================================================================
--- community-i686/filebeat.service	                        (rev 0)
+++ community-i686/filebeat.service	2016-10-27 14:07:23 UTC (rev 193784)
@@ -0,0 +1,12 @@
+[Unit]
+Description=Log file forwarder to remote sources
+Documentation=https://www.elastic.co/guide/en/beats/filebeat/current/index.html
+After=network.target
+
+[Service]
+User=filebeat
+ExecStart=/usr/bin/filebeat -c /etc/filebeat/filebeat.yml
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target

Deleted: community-i686/filebeat.sysusers
===================================================================
--- community-i686/filebeat.sysusers	2016-10-27 14:05:43 UTC (rev 193783)
+++ community-i686/filebeat.sysusers	2016-10-27 14:07:23 UTC (rev 193784)
@@ -1 +0,0 @@
-u filebeat - "Lightweight Shipper for Log Data" /var/lib/filebeat

Copied: beats/repos/community-i686/filebeat.sysusers (from rev 193783, beats/trunk/filebeat.sysusers)
===================================================================
--- community-i686/filebeat.sysusers	                        (rev 0)
+++ community-i686/filebeat.sysusers	2016-10-27 14:07:23 UTC (rev 193784)
@@ -0,0 +1 @@
+u filebeat - "Lightweight Shipper for Log Data" /var/lib/filebeat

Deleted: community-i686/metricbeat.service
===================================================================
--- community-i686/metricbeat.service	2016-10-27 14:05:43 UTC (rev 193783)
+++ community-i686/metricbeat.service	2016-10-27 14:07:23 UTC (rev 193784)
@@ -1,10 +0,0 @@
-[Unit]
-Description=Server monitoring agent that stores metrics in Elasticsearch
-Documentation=https://www.elastic.co/guide/en/beats/metricbeat/current/index.html
-After=network.target
-
-[Service]
-ExecStart=/usr/bin/metricbeat -c /etc/metricbeat/metricbeat.yml
-
-[Install]
-WantedBy=multi-user.target

Copied: beats/repos/community-i686/metricbeat.service (from rev 193783, beats/trunk/metricbeat.service)
===================================================================
--- community-i686/metricbeat.service	                        (rev 0)
+++ community-i686/metricbeat.service	2016-10-27 14:07:23 UTC (rev 193784)
@@ -0,0 +1,11 @@
+[Unit]
+Description=Server monitoring agent that stores metrics in Elasticsearch
+Documentation=https://www.elastic.co/guide/en/beats/metricbeat/current/index.html
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/metricbeat -c /etc/metricbeat/metricbeat.yml
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target

Deleted: community-i686/packetbeat.service
===================================================================
--- community-i686/packetbeat.service	2016-10-27 14:05:43 UTC (rev 193783)
+++ community-i686/packetbeat.service	2016-10-27 14:07:23 UTC (rev 193784)
@@ -1,10 +0,0 @@
-[Unit]
-Description=Real-Time Packet Analyzer
-Documentation=https://www.elastic.co/guide/en/beats/packetbeat/current/index.html
-After=network.target
-
-[Service]
-ExecStart=/usr/bin/packetbeat -c /etc/packetbeat/packetbeat.yml
-
-[Install]
-WantedBy=multi-user.target

Copied: beats/repos/community-i686/packetbeat.service (from rev 193783, beats/trunk/packetbeat.service)
===================================================================
--- community-i686/packetbeat.service	                        (rev 0)
+++ community-i686/packetbeat.service	2016-10-27 14:07:23 UTC (rev 193784)
@@ -0,0 +1,11 @@
+[Unit]
+Description=Real-Time Packet Analyzer
+Documentation=https://www.elastic.co/guide/en/beats/packetbeat/current/index.html
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/packetbeat -c /etc/packetbeat/packetbeat.yml
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target

Deleted: community-x86_64/PKGBUILD
===================================================================
--- community-x86_64/PKGBUILD	2016-10-27 14:05:43 UTC (rev 193783)
+++ community-x86_64/PKGBUILD	2016-10-27 14:07:23 UTC (rev 193784)
@@ -1,110 +0,0 @@
-# Maintainer: Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
-# Contributor: Tyler Langlois <ty |at| tjll |dot| net>
-
-pkgbase=beats
-pkgname=(filebeat packetbeat metricbeat)
-pkgver=5.0.0
-pkgrel=1
-pkgdesc='Data shippers for Elasticsearch'
-arch=('i686' 'x86_64')
-url='https://www.elastic.co/products/beats'
-license=('APACHE')
-depends=('glibc')
-makedepends=('go' 'git' 'libpcap')
-options=('!strip')
-source=("https://github.com/elastic/beats/archive/v$pkgver/beats-$pkgver.tar.gz"
-        "filebeat.install"
-        "filebeat.sysusers"
-        "filebeat.service"
-        "packetbeat.service"
-        "metricbeat.service")
-sha256sums=('3e6b7cf2ee5f52e78ae87ef04ab9dd49977c89f86a09416586896aeaea844e34'
-            'fd765921479d391d613c75fe592a4193e538dd9feffc1ca36bc687bec0f0e1aa'
-            '33feb3690f8b31563cc1e2da557c2aa326501ce9ccd7e0a142036902bfdb05ff'
-            '1ab98d3e387c3970e3005f72f4ce266c4fa19ec3938a576da0a407c7db2fa7ce'
-            'cabf11f35ced8bb61fc26ace4d409dfdb4ed812ff4bc70e168410cb1dc324318'
-            '8a1bcfdb057e4f57d5f16570079055d1822fdfe8d453409891682f6e580f4ff0')
-
-prepare() {
-    cd beats-$pkgver
-
-    # Avoid installing extraneous configs
-    sed '/[- ]win/d ; /[- ]darwin/d ; /[- ]binary/d' -i */Makefile
-    # Install the Linux config as default
-    sed -r 's#/([a-z]+)-linux.yml#/\1.yml#' -i */Makefile
-
-    # Perform some timestomping to avoid make warnings
-    LANG=C _t="$(date -r Makefile +'%Y-%m-%d %k:%M:%S')"
-    touch -m -d "$_t" */Makefile
-
-    # Workaround to place extracted release into GOPATH
-    mkdir -p "$srcdir"/gopath/src/github.com/elastic
-    ln -sf "$srcdir"/beats-$pkgver \
-        "$srcdir"/gopath/src/github.com/elastic/beats
-}
-
-build() {
-    export GOPATH="$srcdir"/gopath
-    for beat in ${pkgname[@]}; do
-        msg2 "Building $beat..."
-        cd "$srcdir"/beats-$pkgver/$beat
-        make
-    done
-}
-
-package_filebeat() {
-    pkgdesc='Collects, pre-processes, and forwards log files to remote sources'
-    optdepends=('elasticsearch: for standalone installation')
-    backup=("etc/$pkgname/$pkgname.yml" "etc/$pkgname/$pkgname.template.json")
-    install="$pkgname.install"
-
-    cd beats-$pkgver/$pkgname
-
-    install -dm755 "$pkgdir"/var/lib/$pkgname
-
-    install -dm755 "$pkgdir"/etc/$pkgname
-    cp $pkgname.{yml,template.json} "$pkgdir"/etc/$pkgname
-
-    install -Dm755 $pkgname \
-                   "$pkgdir"/usr/bin/$pkgname
-    install -Dm644 "$srcdir"/$pkgname.service \
-                   "$pkgdir"/usr/lib/systemd/system/$pkgname.service
-
-    install -Dm644 "$srcdir"/$pkgname.sysusers \
-                   "$pkgdir"/usr/lib/sysusers.d/$pkgname.conf
-}
-
-package_packetbeat() {
-    pkgdesc='Network packet analyzer that ships data to Elasticsearch'
-    depends=('libpcap')
-    optdepends=('elasticsearch: for standalone installation')
-    backup=("etc/$pkgname/$pkgname.yml" "etc/$pkgname/$pkgname.template.json")
-
-    cd beats-$pkgver/$pkgname
-
-    install -dm755 "$pkgdir"/etc/$pkgname
-    cp $pkgname.{yml,template.json} "$pkgdir"/etc/$pkgname
-
-    install -Dm755 $pkgname \
-                   "$pkgdir"/usr/bin/$pkgname
-    install -Dm644 "$srcdir"/$pkgname.service \
-                   "$pkgdir"/usr/lib/systemd/system/$pkgname.service
-}
-
-package_metricbeat() {
-    pkgdesc='Server monitoring agent that stores metrics in Elasticsearch'
-    optdepends=('elasticsearch: for standalone installation')
-    backup=("etc/$pkgname/$pkgname.yml" "etc/$pkgname/$pkgname.template.json")
-    conflicts=('topbeat')
-    replaces=('topbeat')
-
-    cd beats-$pkgver/$pkgname
-
-    install -dm755 "$pkgdir"/etc/$pkgname
-    cp $pkgname.{yml,template.json} "$pkgdir"/etc/$pkgname
-
-    install -Dm755 $pkgname \
-                   "$pkgdir"/usr/bin/$pkgname
-    install -Dm644 "$srcdir"/$pkgname.service \
-                   "$pkgdir"/usr/lib/systemd/system/$pkgname.service
-}

Copied: beats/repos/community-x86_64/PKGBUILD (from rev 193783, beats/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD	                        (rev 0)
+++ community-x86_64/PKGBUILD	2016-10-27 14:07:23 UTC (rev 193784)
@@ -0,0 +1,106 @@
+# Maintainer: Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
+# Contributor: Tyler Langlois <ty |at| tjll |dot| net>
+
+pkgbase=beats
+pkgname=(filebeat packetbeat metricbeat)
+pkgver=5.0.0
+pkgrel=2
+pkgdesc='Data shippers for Elasticsearch'
+arch=('i686' 'x86_64')
+url='https://www.elastic.co/products/beats'
+license=('APACHE')
+depends=('glibc')
+makedepends=('go' 'git' 'libpcap')
+optdepends=('elasticsearch: for standalone installation'
+            'python: for migration script')
+options=('!strip')
+source=("https://github.com/elastic/beats/archive/v$pkgver/beats-$pkgver.tar.gz"
+        "filebeat.install"
+        "filebeat.sysusers"
+        "filebeat.service"
+        "packetbeat.service"
+        "metricbeat.service")
+sha256sums=('3e6b7cf2ee5f52e78ae87ef04ab9dd49977c89f86a09416586896aeaea844e34'
+            'fd765921479d391d613c75fe592a4193e538dd9feffc1ca36bc687bec0f0e1aa'
+            '33feb3690f8b31563cc1e2da557c2aa326501ce9ccd7e0a142036902bfdb05ff'
+            '402ecb4d9643ae23c95d6c48702c70f6c8821c477f16b23e4c9137cb34fdca24'
+            '588ce1da188186f9b751592ba3b5848dfa509d1abf314e2a053687e361955553'
+            '8c8636661080248b7eef3dad1a203b6376277de8d9855ed5b33dcbb85eca2fc0')
+
+prepare() {
+    cd beats-$pkgver
+
+    # Avoid installing extraneous configs
+    sed '/[- ]win/d ; /[- ]darwin/d ; /[- ]binary/d' -i */Makefile
+    # Install the Linux config as default
+    sed -r 's#/([a-z]+)-linux.yml#/\1.yml#' -i */Makefile
+
+    # Perform some timestomping to avoid make warnings
+    LANG=C _t="$(date -r Makefile +'%Y-%m-%d %k:%M:%S')"
+    touch -m -d "$_t" */Makefile
+
+    # Workaround to place extracted release into GOPATH
+    mkdir -p "$srcdir"/gopath/src/github.com/elastic
+    ln -sf "$srcdir"/beats-$pkgver \
+        "$srcdir"/gopath/src/github.com/elastic/beats
+}
+
+build() {
+    export GOPATH="$srcdir"/gopath
+    for beat in ${pkgname[@]}; do
+        msg2 "Building $beat..."
+        cd "$srcdir"/beats-$pkgver/$beat
+        make
+        cd "$srcdir"/beats-$pkgver/libbeat/dashboards
+        make BEAT=$beat
+        mv import_dashboards import_dashboards-$beat
+    done
+}
+
+_do_package_beat() {
+    backup=("etc/$pkgname/$pkgname.yml" "etc/$pkgname/$pkgname.template.json")
+
+    cd beats-$pkgver/$pkgname
+
+    install -dm755 "$pkgdir"/var/lib/$pkgname
+
+    install -dm755 "$pkgdir"/etc/$pkgname
+    cp $pkgname.{yml,full.yml,template.json} "$pkgdir"/etc/$pkgname
+
+    install -Dm755 $pkgname \
+                   "$pkgdir"/usr/bin/$pkgname
+    install -Dm644 "$srcdir"/$pkgname.service \
+                   "$pkgdir"/usr/lib/systemd/system/$pkgname.service
+
+    cd ../libbeat
+    install -Dm755 dashboards/import_dashboards-$pkgname \
+                   "$pkgdir"/usr/share/$pkgname/scripts/import_dashboards
+    install -Dm755 scripts/migrate_beat_config_1_x_to_5_0.py \
+                   "$pkgdir"/usr/share/$pkgname/scripts/migrate_beat_config_1_x_to_5_0.py
+}
+
+package_filebeat() {
+    pkgdesc='Collects, pre-processes, and forwards log files to remote sources'
+    install="$pkgname.install"
+
+    _do_package_beat
+
+    cd "$srcdir"/beats-$pkgver/$pkgname
+    install -Dm644 "$srcdir"/$pkgname.sysusers \
+                   "$pkgdir"/usr/lib/sysusers.d/$pkgname.conf
+}
+
+package_packetbeat() {
+    pkgdesc='Network packet analyzer that ships data to Elasticsearch'
+    depends=('libpcap')
+
+    _do_package_beat
+}
+
+package_metricbeat() {
+    pkgdesc='Server monitoring agent that stores metrics in Elasticsearch'
+    conflicts=('topbeat')
+    replaces=('topbeat')
+
+    _do_package_beat
+}

Deleted: community-x86_64/filebeat.install
===================================================================
--- community-x86_64/filebeat.install	2016-10-27 14:05:43 UTC (rev 193783)
+++ community-x86_64/filebeat.install	2016-10-27 14:07:23 UTC (rev 193784)
@@ -1,19 +0,0 @@
-# Arg 1: the new package version
-post_install() {
-
-  # Create user and group
-  systemd-sysusers filebeat.conf
-
-  # Required at this stage to ensure user & group are available
-  install -d -o filebeat -g filebeat /var/lib/filebeat
-}
-
-# Arg 1: new package version, arg 2: old package version
-post_upgrade() {
-  # All packages <= 1.0.0_rc2-1 didn't have discrete users
-  if [ "`vercmp $2 1.0.0_rc2-1`" -le 0 ] ; then
-      post_install
-  fi
-}
-
-# vim:set ts=2 sw=2 et:

Copied: beats/repos/community-x86_64/filebeat.install (from rev 193783, beats/trunk/filebeat.install)
===================================================================
--- community-x86_64/filebeat.install	                        (rev 0)
+++ community-x86_64/filebeat.install	2016-10-27 14:07:23 UTC (rev 193784)
@@ -0,0 +1,19 @@
+# Arg 1: the new package version
+post_install() {
+
+  # Create user and group
+  systemd-sysusers filebeat.conf
+
+  # Required at this stage to ensure user & group are available
+  install -d -o filebeat -g filebeat /var/lib/filebeat
+}
+
+# Arg 1: new package version, arg 2: old package version
+post_upgrade() {
+  # All packages <= 1.0.0_rc2-1 didn't have discrete users
+  if [ "`vercmp $2 1.0.0_rc2-1`" -le 0 ] ; then
+      post_install
+  fi
+}
+
+# vim:set ts=2 sw=2 et:

Deleted: community-x86_64/filebeat.service
===================================================================
--- community-x86_64/filebeat.service	2016-10-27 14:05:43 UTC (rev 193783)
+++ community-x86_64/filebeat.service	2016-10-27 14:07:23 UTC (rev 193784)
@@ -1,11 +0,0 @@
-[Unit]
-Description=Log file forwarder to remote sources
-Documentation=https://www.elastic.co/guide/en/beats/filebeat/current/index.html
-After=network.target
-
-[Service]
-ExecStart=/usr/bin/filebeat -c /etc/filebeat/filebeat.yml
-User=filebeat
-
-[Install]
-WantedBy=multi-user.target

Copied: beats/repos/community-x86_64/filebeat.service (from rev 193783, beats/trunk/filebeat.service)
===================================================================
--- community-x86_64/filebeat.service	                        (rev 0)
+++ community-x86_64/filebeat.service	2016-10-27 14:07:23 UTC (rev 193784)
@@ -0,0 +1,12 @@
+[Unit]
+Description=Log file forwarder to remote sources
+Documentation=https://www.elastic.co/guide/en/beats/filebeat/current/index.html
+After=network.target
+
+[Service]
+User=filebeat
+ExecStart=/usr/bin/filebeat -c /etc/filebeat/filebeat.yml
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target

Deleted: community-x86_64/filebeat.sysusers
===================================================================
--- community-x86_64/filebeat.sysusers	2016-10-27 14:05:43 UTC (rev 193783)
+++ community-x86_64/filebeat.sysusers	2016-10-27 14:07:23 UTC (rev 193784)
@@ -1 +0,0 @@
-u filebeat - "Lightweight Shipper for Log Data" /var/lib/filebeat

Copied: beats/repos/community-x86_64/filebeat.sysusers (from rev 193783, beats/trunk/filebeat.sysusers)
===================================================================
--- community-x86_64/filebeat.sysusers	                        (rev 0)
+++ community-x86_64/filebeat.sysusers	2016-10-27 14:07:23 UTC (rev 193784)
@@ -0,0 +1 @@
+u filebeat - "Lightweight Shipper for Log Data" /var/lib/filebeat

Deleted: community-x86_64/metricbeat.service
===================================================================
--- community-x86_64/metricbeat.service	2016-10-27 14:05:43 UTC (rev 193783)
+++ community-x86_64/metricbeat.service	2016-10-27 14:07:23 UTC (rev 193784)
@@ -1,10 +0,0 @@
-[Unit]
-Description=Server monitoring agent that stores metrics in Elasticsearch
-Documentation=https://www.elastic.co/guide/en/beats/metricbeat/current/index.html
-After=network.target
-
-[Service]
-ExecStart=/usr/bin/metricbeat -c /etc/metricbeat/metricbeat.yml
-
-[Install]
-WantedBy=multi-user.target

Copied: beats/repos/community-x86_64/metricbeat.service (from rev 193783, beats/trunk/metricbeat.service)
===================================================================
--- community-x86_64/metricbeat.service	                        (rev 0)
+++ community-x86_64/metricbeat.service	2016-10-27 14:07:23 UTC (rev 193784)
@@ -0,0 +1,11 @@
+[Unit]
+Description=Server monitoring agent that stores metrics in Elasticsearch
+Documentation=https://www.elastic.co/guide/en/beats/metricbeat/current/index.html
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/metricbeat -c /etc/metricbeat/metricbeat.yml
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target

Deleted: community-x86_64/packetbeat.service
===================================================================
--- community-x86_64/packetbeat.service	2016-10-27 14:05:43 UTC (rev 193783)
+++ community-x86_64/packetbeat.service	2016-10-27 14:07:23 UTC (rev 193784)
@@ -1,10 +0,0 @@
-[Unit]
-Description=Real-Time Packet Analyzer
-Documentation=https://www.elastic.co/guide/en/beats/packetbeat/current/index.html
-After=network.target
-
-[Service]
-ExecStart=/usr/bin/packetbeat -c /etc/packetbeat/packetbeat.yml
-
-[Install]
-WantedBy=multi-user.target

Copied: beats/repos/community-x86_64/packetbeat.service (from rev 193783, beats/trunk/packetbeat.service)
===================================================================
--- community-x86_64/packetbeat.service	                        (rev 0)
+++ community-x86_64/packetbeat.service	2016-10-27 14:07:23 UTC (rev 193784)
@@ -0,0 +1,11 @@
+[Unit]
+Description=Real-Time Packet Analyzer
+Documentation=https://www.elastic.co/guide/en/beats/packetbeat/current/index.html
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/packetbeat -c /etc/packetbeat/packetbeat.yml
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target



More information about the arch-commits mailing list