[arch-commits] Commit in netdata/trunk (4 files)
Sven-Hendrik Haase
svenstaro at archlinux.org
Mon Dec 18 11:55:47 UTC 2017
Date: Monday, December 18, 2017 @ 11:55:46
Author: svenstaro
Revision: 274762
upgpkg: netdata 1.9.0-1
Added:
netdata/trunk/netdata.sysusers
netdata/trunk/netdata.tmpfiles
Modified:
netdata/trunk/PKGBUILD
netdata/trunk/netdata.install
------------------+
PKGBUILD | 52 +++++++++++++++++++++++++++++++---------------------
netdata.install | 16 +++++-----------
netdata.sysusers | 1 +
netdata.tmpfiles | 3 +++
4 files changed, 40 insertions(+), 32 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2017-12-18 11:44:46 UTC (rev 274761)
+++ PKGBUILD 2017-12-18 11:55:46 UTC (rev 274762)
@@ -2,7 +2,7 @@
# Contributor: SanskritFritz (gmail)
pkgname=netdata
-pkgver=1.8.0
+pkgver=1.9.0
pkgrel=1
pkgdesc="Real-time performance monitoring, in the greatest possible detail, over the web"
url="https://github.com/firehol/netdata/wiki"
@@ -18,35 +18,45 @@
'hddtemp: for monitoring hhd temperature'
'apcupsd: for monitoring APC UPS'
'iw: for monitoring Linux as access point')
-backup=('etc/netdata/'{apps_groups,charts.d,health_alarm_notify,health_email_recipients,netdata,python.d}.conf
- 'etc/netdata/health.d/'{apache,cpu,disks,entropy,memcached,mysql,named,net,nginx,qos,ram,redis,retroshare,squid,swap}.conf
- 'etc/netdata/python.d/'{apache_cache,apache,cpufreq,dovecot,example,exim,hddtemp,ipfs,memcached,mysql,nginx,nginx_log,phpfpm,postfix,redis,retroshare,sensors,squid,tomcat}.conf)
+backup=('etc/netdata/'{apps_groups,charts.d,health_alarm_notify,health_email_recipients,netdata,python.d,stream}.conf
+ 'etc/netdata/health.d/'{apache,beanstalkd,couchdb,cpu,disks,entropy,memcached,mysql,named,net,nginx,qos,ram,redis,retroshare,squid,swap,tcp_conn,tcp_mem,tcp_orphans}.conf
+ 'etc/netdata/python.d/'{apache_cache,apache,beanstalk,couchdb,cpufreq,dnsdist,dovecot,example,exim,hddtemp,ipfs,memcached,mysql,nginx,nginx_log,phpfpm,powerdns,postfix,redis,retroshare,sensors,squid,tomcat}.conf)
install="$pkgname.install"
-source=("https://github.com/firehol/netdata/releases/download/v${pkgver}/netdata-${pkgver}.tar.xz")
-sha512sums=('0fb86b6cea9628556b625d9c5930c36b658d997bc477d468341675dfc2f55fe384344758a6efc50c30d502cf3be35fef21b7e320853c96d0b0eaeaafe24e816b')
+source=("https://github.com/firehol/netdata/releases/download/v${pkgver}/netdata-${pkgver}.tar.xz"
+ "${pkgname}.tmpfiles"
+ "${pkgname}.sysusers")
+sha512sums=('3766c8b86229545dee8fed3a43a5dd73ba36db9114b2418a6ceaaba15488edf792308be922dafed34026fd52166257fc27823ce0f6664696f79b33b93345f2b5'
+ '3f934ddd1f5248f9e11c29050c023d60b76e4098ec9c8d413bb362d43e9242f767fd58310d966076e8400779af8bda2459afcc314b267fcb9f1c84173e14e313'
+ 'a910809a823ba58ca7bdaa72e8d68427b48f452c1fbb2343fa182ecb0a091a7640e73af24b8ba2fdd90e00aed8ef53b7fccd25cb8f04ca9b9fa6c8e52223ca66')
build() {
- cd "$pkgname-$pkgver"
+ cd "$pkgname-$pkgver"
- ./autogen.sh
- ./configure \
- --prefix="/usr" \
- --sbindir="/usr/bin" \
- --sysconfdir="/etc" \
- --libexecdir="/usr/lib" \
- --localstatedir="/var" \
- --with-zlib --with-math --with-user=netdata
- make
+ ./autogen.sh
+ ./configure \
+ --prefix="/usr" \
+ --sbindir="/usr/bin" \
+ --sysconfdir="/etc" \
+ --libexecdir="/usr/lib" \
+ --localstatedir="/var" \
+ --with-zlib --with-math --with-user=netdata
+ make
}
package() {
- cd "$pkgname-$pkgver"
+ cd "$pkgname-$pkgver"
- make DESTDIR="$pkgdir" install
+ make DESTDIR="$pkgdir" install
- touch "$pkgdir/etc/netdata/netdata.conf"
+ # Remove /var/*, pacman creates it via tmpfiles hook
+ rm -vrf "${pkgdir}/var"
+ touch "$pkgdir/etc/netdata/netdata.conf"
+ chown -R 134:134 "$pkgdir"/etc/netdata
+ chown -R 134:134 "$pkgdir"/usr/share/netdata/web
- install -Dm0644 "system/netdata.service" "$pkgdir/usr/lib/systemd/system/netdata.service"
- install -Dm0644 "system/netdata.logrotate" "$pkgdir/etc/logrotate.d/netdata"
+ install -Dm0644 "system/netdata.service" "$pkgdir/usr/lib/systemd/system/netdata.service"
+ install -Dm0644 "system/netdata.logrotate" "$pkgdir/etc/logrotate.d/netdata"
+ install -Dm0644 "${srcdir}/${pkgname}.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
+ install -Dm0644 "${srcdir}/${pkgname}.sysusers" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
}
Modified: netdata.install
===================================================================
--- netdata.install 2017-12-18 11:44:46 UTC (rev 274761)
+++ netdata.install 2017-12-18 11:55:46 UTC (rev 274762)
@@ -1,17 +1,11 @@
-chown_netdata() {
- chown -R netdata:netdata /var/lib/netdata
- chown -R netdata:netdata /var/log/netdata
- chown -R netdata:netdata /var/cache/netdata
- chown -R netdata:netdata /usr/share/netdata/web
- chown -R netdata:netdata /etc/netdata
+setcap_netdata() {
+ #https://github.com/firehol/netdata/wiki/Apps-Plugin#apps-plugin-is-missing-information
+ setcap cap_dac_read_search,cap_sys_ptrace+ep /usr/lib/netdata/plugins.d/apps.plugin || chmod 1755 /usr/lib/netdata/plugins.d/apps.plugin
}
post_install() {
- getent group netdata > /dev/null || groupadd -g 134 netdata 1>/dev/null
- getent passwd netdata > /dev/null || useradd -u 134 -d /var/cache/netdata -g netdata -s /bin/nologin netdata 1>/dev/null
+ setcap_netdata
- chown_netdata
-
echo
echo "After the daemon has been started for the first time,"
echo "download the default config file from"
@@ -22,5 +16,5 @@
}
post_upgrade() {
- chown_netdata
+ setcap_netdata
}
Added: netdata.sysusers
===================================================================
--- netdata.sysusers (rev 0)
+++ netdata.sysusers 2017-12-18 11:55:46 UTC (rev 274762)
@@ -0,0 +1 @@
+u netdata 134 - /var/cache/netdata
Added: netdata.tmpfiles
===================================================================
--- netdata.tmpfiles (rev 0)
+++ netdata.tmpfiles 2017-12-18 11:55:46 UTC (rev 274762)
@@ -0,0 +1,3 @@
+d /var/lib/netdata 0750 netdata netdata
+d /var/log/netdata 0750 netdata netdata
+d /var/cache/netdata 0750 netdata netdata
More information about the arch-commits
mailing list