[arch-commits] Commit in beats/trunk (10 files)
Massimiliano Torromeo
mtorromeo at archlinux.org
Mon Oct 31 08:59:22 UTC 2016
Date: Monday, October 31, 2016 @ 08:59:21
Author: mtorromeo
Revision: 194123
Fixed working paths in service files and added creation of log and data directories with tmpfiles.
Added:
beats/trunk/filebeat-tmpfile.conf
beats/trunk/metricbeat-tmpfile.conf
beats/trunk/metricbeat.install
beats/trunk/packetbeat-tmpfile.conf
beats/trunk/packetbeat.install
Modified:
beats/trunk/PKGBUILD
beats/trunk/filebeat.install
beats/trunk/filebeat.service
beats/trunk/metricbeat.service
beats/trunk/packetbeat.service
-------------------------+
PKGBUILD | 26 +++++++++++++++++---------
filebeat-tmpfile.conf | 2 ++
filebeat.install | 17 +++--------------
filebeat.service | 2 +-
metricbeat-tmpfile.conf | 2 ++
metricbeat.install | 8 ++++++++
metricbeat.service | 2 +-
packetbeat-tmpfile.conf | 2 ++
packetbeat.install | 8 ++++++++
packetbeat.service | 2 +-
10 files changed, 45 insertions(+), 26 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2016-10-31 08:14:36 UTC (rev 194122)
+++ PKGBUILD 2016-10-31 08:59:21 UTC (rev 194123)
@@ -4,7 +4,7 @@
pkgbase=beats
pkgname=(filebeat packetbeat metricbeat)
pkgver=5.0.0
-pkgrel=2
+pkgrel=3
pkgdesc='Data shippers for Elasticsearch'
arch=('i686' 'x86_64')
url='https://www.elastic.co/products/beats'
@@ -19,13 +19,19 @@
"filebeat.sysusers"
"filebeat.service"
"packetbeat.service"
- "metricbeat.service")
+ "metricbeat.service"
+ "filebeat-tmpfile.conf"
+ "packetbeat-tmpfile.conf"
+ "metricbeat-tmpfile.conf")
sha256sums=('3e6b7cf2ee5f52e78ae87ef04ab9dd49977c89f86a09416586896aeaea844e34'
- 'fd765921479d391d613c75fe592a4193e538dd9feffc1ca36bc687bec0f0e1aa'
+ 'e3cb8d4cd630aa606b9826ab2f54b4309f8558326e3ecaba9a868f566669643e'
'33feb3690f8b31563cc1e2da557c2aa326501ce9ccd7e0a142036902bfdb05ff'
- '402ecb4d9643ae23c95d6c48702c70f6c8821c477f16b23e4c9137cb34fdca24'
- '588ce1da188186f9b751592ba3b5848dfa509d1abf314e2a053687e361955553'
- '8c8636661080248b7eef3dad1a203b6376277de8d9855ed5b33dcbb85eca2fc0')
+ '4d5394cfe3299c9a6af5ac34c1ad4bcdc2e79162379cccbf00fb414eb28253c0'
+ '9f4e33fc768d3500fa3428dcbfda241c6473a2cae8cc4dbadf8f61ca9f2bbec5'
+ '26b123acd96808162a7f827ce6f0e9669140c2665fc28d76583a15996fbf853d'
+ 'ec999a29bc19d1b36b84e03cbd7b00b29d3e08c97ca03043b9fd6bfbe04c5e2d'
+ '3f3ead4168d5b4953cca883d8a3c4552c26a75f52cedfcf6c7785bfd7bbae3c4'
+ 'cb927141d3bed94cb5570789dd9fc97713e967580ee354ff393020811f087dca')
prepare() {
cd beats-$pkgver
@@ -58,7 +64,8 @@
}
_do_package_beat() {
- backup=("etc/$pkgname/$pkgname.yml" "etc/$pkgname/$pkgname.template.json")
+ backup=(etc/$pkgname/$pkgname.yml etc/$pkgname/$pkgname.template{,-es2x}.json)
+ install="$pkgname.install"
cd beats-$pkgver/$pkgname
@@ -65,12 +72,14 @@
install -dm755 "$pkgdir"/var/lib/$pkgname
install -dm755 "$pkgdir"/etc/$pkgname
- cp $pkgname.{yml,full.yml,template.json} "$pkgdir"/etc/$pkgname
+ cp $pkgname.{yml,full.yml,template{,-es2x}.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-tmpfile.conf \
+ "$pkgdir"/usr/lib/tmpfiles.d/$pkgname.conf
cd ../libbeat
install -Dm755 dashboards/import_dashboards-$pkgname \
@@ -81,7 +90,6 @@
package_filebeat() {
pkgdesc='Collects, pre-processes, and forwards log files to remote sources'
- install="$pkgname.install"
_do_package_beat
Added: filebeat-tmpfile.conf
===================================================================
--- filebeat-tmpfile.conf (rev 0)
+++ filebeat-tmpfile.conf 2016-10-31 08:59:21 UTC (rev 194123)
@@ -0,0 +1,2 @@
+d /var/log/filebeat 0755 filebeat filebeat -
+d /var/lib/filebeat 0755 filebeat filebeat -
Modified: filebeat.install
===================================================================
--- filebeat.install 2016-10-31 08:14:36 UTC (rev 194122)
+++ filebeat.install 2016-10-31 08:59:21 UTC (rev 194123)
@@ -1,19 +1,8 @@
-# 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
+ systemd-tmpfiles --create filebeat.conf
}
-# 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
+post_upgrade(){
+ systemd-tmpfiles --create filebeat.conf
}
-
-# vim:set ts=2 sw=2 et:
Modified: filebeat.service
===================================================================
--- filebeat.service 2016-10-31 08:14:36 UTC (rev 194122)
+++ filebeat.service 2016-10-31 08:59:21 UTC (rev 194123)
@@ -5,7 +5,7 @@
[Service]
User=filebeat
-ExecStart=/usr/bin/filebeat -c /etc/filebeat/filebeat.yml
+ExecStart=/usr/bin/filebeat -c /etc/filebeat/filebeat.yml -path.home /usr/share/filebeat -path.config /etc/filebeat -path.data /var/lib/filebeat -path.logs /var/log/filebeat
Restart=on-failure
[Install]
Added: metricbeat-tmpfile.conf
===================================================================
--- metricbeat-tmpfile.conf (rev 0)
+++ metricbeat-tmpfile.conf 2016-10-31 08:59:21 UTC (rev 194123)
@@ -0,0 +1,2 @@
+d /var/log/metricbeat 0755 root root -
+d /var/lib/metricbeat 0755 root root -
Added: metricbeat.install
===================================================================
--- metricbeat.install (rev 0)
+++ metricbeat.install 2016-10-31 08:59:21 UTC (rev 194123)
@@ -0,0 +1,8 @@
+post_install() {
+ systemd-sysusers metricbeat.conf
+ systemd-tmpfiles --create metricbeat.conf
+}
+
+post_upgrade(){
+ systemd-tmpfiles --create metricbeat.conf
+}
Modified: metricbeat.service
===================================================================
--- metricbeat.service 2016-10-31 08:14:36 UTC (rev 194122)
+++ metricbeat.service 2016-10-31 08:59:21 UTC (rev 194123)
@@ -4,7 +4,7 @@
After=network.target
[Service]
-ExecStart=/usr/bin/metricbeat -c /etc/metricbeat/metricbeat.yml
+ExecStart=/usr/bin/metricbeat -c /etc/metricbeat/metricbeat.yml -path.home /usr/share/metricbeat -path.config /etc/metricbeat -path.data /var/lib/metricbeat -path.logs /var/log/metricbeat
Restart=on-failure
[Install]
Added: packetbeat-tmpfile.conf
===================================================================
--- packetbeat-tmpfile.conf (rev 0)
+++ packetbeat-tmpfile.conf 2016-10-31 08:59:21 UTC (rev 194123)
@@ -0,0 +1,2 @@
+d /var/log/packetbeat 0755 root root -
+d /var/lib/packetbeat 0755 root root -
Added: packetbeat.install
===================================================================
--- packetbeat.install (rev 0)
+++ packetbeat.install 2016-10-31 08:59:21 UTC (rev 194123)
@@ -0,0 +1,8 @@
+post_install() {
+ systemd-sysusers packetbeat.conf
+ systemd-tmpfiles --create packetbeat.conf
+}
+
+post_upgrade(){
+ systemd-tmpfiles --create packetbeat.conf
+}
Modified: packetbeat.service
===================================================================
--- packetbeat.service 2016-10-31 08:14:36 UTC (rev 194122)
+++ packetbeat.service 2016-10-31 08:59:21 UTC (rev 194123)
@@ -4,7 +4,7 @@
After=network.target
[Service]
-ExecStart=/usr/bin/packetbeat -c /etc/packetbeat/packetbeat.yml
+ExecStart=/usr/bin/packetbeat -c /etc/packetbeat/packetbeat.yml -path.home /usr/share/packetbeat -path.config /etc/packetbeat -path.data /var/lib/packetbeat -path.logs /var/log/packetbeat
Restart=on-failure
[Install]
More information about the arch-commits
mailing list