[arch-commits] Commit in nrpe/repos (28 files)
Jonathan Steel
jsteel at archlinux.org
Tue Feb 10 14:35:44 UTC 2015
Date: Tuesday, February 10, 2015 @ 15:35:44
Author: jsteel
Revision: 127466
archrelease: copy trunk to community-i686, community-x86_64
Added:
nrpe/repos/community-i686/PKGBUILD
(from rev 127465, nrpe/trunk/PKGBUILD)
nrpe/repos/community-i686/nrpe.install
(from rev 127465, nrpe/trunk/nrpe.install)
nrpe/repos/community-i686/nrpe.service
(from rev 127465, nrpe/trunk/nrpe.service)
nrpe/repos/community-i686/nrpe.socket
(from rev 127465, nrpe/trunk/nrpe.socket)
nrpe/repos/community-i686/nrpe.tmpfiles
(from rev 127465, nrpe/trunk/nrpe.tmpfiles)
nrpe/repos/community-i686/nrpe at .service
(from rev 127465, nrpe/trunk/nrpe at .service)
nrpe/repos/community-i686/syslog.patch
(from rev 127465, nrpe/trunk/syslog.patch)
nrpe/repos/community-x86_64/PKGBUILD
(from rev 127465, nrpe/trunk/PKGBUILD)
nrpe/repos/community-x86_64/nrpe.install
(from rev 127465, nrpe/trunk/nrpe.install)
nrpe/repos/community-x86_64/nrpe.service
(from rev 127465, nrpe/trunk/nrpe.service)
nrpe/repos/community-x86_64/nrpe.socket
(from rev 127465, nrpe/trunk/nrpe.socket)
nrpe/repos/community-x86_64/nrpe.tmpfiles
(from rev 127465, nrpe/trunk/nrpe.tmpfiles)
nrpe/repos/community-x86_64/nrpe at .service
(from rev 127465, nrpe/trunk/nrpe at .service)
nrpe/repos/community-x86_64/syslog.patch
(from rev 127465, nrpe/trunk/syslog.patch)
Deleted:
nrpe/repos/community-i686/PKGBUILD
nrpe/repos/community-i686/nrpe.install
nrpe/repos/community-i686/nrpe.service
nrpe/repos/community-i686/nrpe.socket
nrpe/repos/community-i686/nrpe.tmpfiles
nrpe/repos/community-i686/nrpe at .service
nrpe/repos/community-i686/syslog.patch
nrpe/repos/community-x86_64/PKGBUILD
nrpe/repos/community-x86_64/nrpe.install
nrpe/repos/community-x86_64/nrpe.service
nrpe/repos/community-x86_64/nrpe.socket
nrpe/repos/community-x86_64/nrpe.tmpfiles
nrpe/repos/community-x86_64/nrpe at .service
nrpe/repos/community-x86_64/syslog.patch
--------------------------------+
/PKGBUILD | 158 +++++++++++++++++++++++++++++++++++++++
/nrpe.install | 46 +++++++++++
/nrpe.service | 26 ++++++
/nrpe.socket | 18 ++++
/nrpe.tmpfiles | 2
/nrpe at .service | 16 +++
/syslog.patch | 44 ++++++++++
community-i686/PKGBUILD | 79 -------------------
community-i686/nrpe.install | 28 ------
community-i686/nrpe.service | 13 ---
community-i686/nrpe.socket | 9 --
community-i686/nrpe.tmpfiles | 1
community-i686/nrpe at .service | 8 -
community-i686/syslog.patch | 22 -----
community-x86_64/PKGBUILD | 79 -------------------
community-x86_64/nrpe.install | 28 ------
community-x86_64/nrpe.service | 13 ---
community-x86_64/nrpe.socket | 9 --
community-x86_64/nrpe.tmpfiles | 1
community-x86_64/nrpe at .service | 8 -
community-x86_64/syslog.patch | 22 -----
21 files changed, 310 insertions(+), 320 deletions(-)
Deleted: community-i686/PKGBUILD
===================================================================
--- community-i686/PKGBUILD 2015-02-10 14:35:16 UTC (rev 127465)
+++ community-i686/PKGBUILD 2015-02-10 14:35:44 UTC (rev 127466)
@@ -1,79 +0,0 @@
-# Maintainer: Jonathan Steel <jsteel at archlinux.org>
-# Contributor: Phillip Smith <fukawi2 at NO-SPAM.gmail.com>
-# Contributor: Dale Blount <dale at archlinux.org>
-
-pkgname=nrpe
-pkgver=2.15
-pkgrel=3
-pkgdesc="Nagios Remote Plugin Executor"
-arch=('i686' 'x86_64')
-license=('GPL')
-depends=('openssl')
-optdepends=("monitoring-plugins: common tools for monitoring using $pkgname")
-replaces=('nagios-nrpe')
-install=$pkgname.install
-backup=('etc/nrpe/nrpe.cfg' 'etc/xinetd.d/nrpe')
-url="http://exchange.nagios.org/directory/Addons/Monitoring-Agents/NRPE--2D-Nagios-Remote-Plugin-Executor/details"
-source=(http://downloads.sourceforge.net/nagios/$pkgname-$pkgver.tar.gz
- $pkgname.service $pkgname.socket $pkgname at .service $pkgname.tmpfiles
- syslog.patch)
-md5sums=('3921ddc598312983f604541784b35a50'
- '265512fbfc65f89eab1ca23d11ec749d'
- 'f239bb4e7b885449d1f4067b209d89fd'
- '143278e9495821bd887cf84ce0f97af6'
- 'd4b89b7ff8ffb187d44fedf294e7f5de'
- 'e68e6460f5a2999635254dac64056679')
-
-prepare() {
- cd "$srcdir"/$pkgname-$pkgver
-
- # fix directory permissions
- sed -i 's/775/755/' Makefile.in src/Makefile.in
-
- # fix run directory
- sed -i 's/nrpe.pid/nrpe\/nrpe.pid/' sample-config/nrpe.cfg.in
-
- # set the nrpe user and group
- sed -i 's/@nrpe_user@/31/' sample-config/nrpe.cfg.in
- sed -i 's/@nrpe_group@/31/' sample-config/nrpe.cfg.in
-
- # fix logging binary data to journal/syslog when ipv4 disconnects with debug=1
- patch -Np1 -i "$srcdir"/syslog.patch
-}
-
-build() {
- cd "$srcdir"/$pkgname-$pkgver
-
- ./configure \
- --prefix=/usr \
- --sysconfdir=/etc/nrpe \
- --libexecdir=/usr/lib/monitoring-plugins \
- --enable-command-args \
- --with-nrpe-user=0 --with-nrpe-group=0 \
- --with-nagios-user=0 --with-nagios-group=0
-
- make
-}
-
-package() {
- cd "$srcdir"/$pkgname-$pkgver
-
- make DESTDIR="$pkgdir"/ install
- make DESTDIR="$pkgdir"/ install-daemon-config
-
- install -Dm644 sample-config/nrpe.xinetd "$pkgdir"/etc/xinetd.d/nrpe
-
- install -D -m644 "$srcdir"/nrpe.service \
- "$pkgdir"/usr/lib/systemd/system/nrpe.service
- install -D -m644 "$srcdir"/nrpe.socket \
- "$pkgdir"/usr/lib/systemd/system/nrpe.socket
- install -D -m644 "$srcdir"/nrpe at .service \
- "$pkgdir"/usr/lib/systemd/system/nrpe at .service
- install -D -m644 "$srcdir"/nrpe.tmpfiles \
- "$pkgdir"/usr/lib/tmpfiles.d/nrpe.conf
-
- install -Dm644 README "$pkgdir"/usr/share/doc/$pkgname/README
- install -Dm644 README.SSL "$pkgdir"/usr/share/doc/$pkgname/README.SSL
- install -Dm644 SECURITY "$pkgdir"/usr/share/doc/$pkgname/SECURITY
- install -Dm644 LEGAL "$pkgdir"/usr/share/licenses/$pkgname/LEGAL
-}
Copied: nrpe/repos/community-i686/PKGBUILD (from rev 127465, nrpe/trunk/PKGBUILD)
===================================================================
--- community-i686/PKGBUILD (rev 0)
+++ community-i686/PKGBUILD 2015-02-10 14:35:44 UTC (rev 127466)
@@ -0,0 +1,79 @@
+# Maintainer: Jonathan Steel <jsteel at archlinux.org>
+# Contributor: Phillip Smith <fukawi2 at NO-SPAM.gmail.com>
+# Contributor: Dale Blount <dale at archlinux.org>
+
+pkgname=nrpe
+pkgver=2.15
+pkgrel=4
+pkgdesc="Nagios Remote Plugin Executor"
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('openssl')
+optdepends=("monitoring-plugins: common tools for monitoring using $pkgname")
+replaces=('nagios-nrpe')
+install=$pkgname.install
+backup=('etc/nrpe/nrpe.cfg' 'etc/xinetd.d/nrpe')
+url="http://exchange.nagios.org/directory/Addons/Monitoring-Agents/NRPE--2D-Nagios-Remote-Plugin-Executor/details"
+source=(http://downloads.sourceforge.net/nagios/$pkgname-$pkgver.tar.gz
+ $pkgname.service $pkgname.socket $pkgname at .service $pkgname.tmpfiles
+ syslog.patch)
+md5sums=('3921ddc598312983f604541784b35a50'
+ '265512fbfc65f89eab1ca23d11ec749d'
+ 'f239bb4e7b885449d1f4067b209d89fd'
+ '143278e9495821bd887cf84ce0f97af6'
+ 'd4b89b7ff8ffb187d44fedf294e7f5de'
+ 'e68e6460f5a2999635254dac64056679')
+
+prepare() {
+ cd $pkgname-$pkgver
+
+ # fix directory permissions
+ sed -i 's/775/755/' Makefile.in src/Makefile.in
+
+ # fix run directory
+ sed -i 's/nrpe.pid/nrpe\/nrpe.pid/' sample-config/nrpe.cfg.in
+
+ # set the nrpe user and group
+ sed -i 's/@nrpe_user@/31/' sample-config/nrpe.cfg.in
+ sed -i 's/@nrpe_group@/31/' sample-config/nrpe.cfg.in
+
+ # fix logging binary data to journal/syslog when ipv4 disconnects with debug=1
+ patch -Np1 -i "$srcdir"/syslog.patch
+}
+
+build() {
+ cd $pkgname-$pkgver
+
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc/nrpe \
+ --libexecdir=/usr/lib/monitoring-plugins \
+ --enable-command-args \
+ --with-nrpe-user=0 --with-nrpe-group=0 \
+ --with-nagios-user=0 --with-nagios-group=0
+
+ make
+}
+
+package() {
+ cd $pkgname-$pkgver
+
+ make DESTDIR="$pkgdir" install
+ make DESTDIR="$pkgdir"/ install-daemon-config
+
+ install -Dm644 sample-config/nrpe.xinetd "$pkgdir"/etc/xinetd.d/nrpe
+
+ install -D -m644 "$srcdir"/nrpe.service \
+ "$pkgdir"/usr/lib/systemd/system/nrpe.service
+ install -D -m644 "$srcdir"/nrpe.socket \
+ "$pkgdir"/usr/lib/systemd/system/nrpe.socket
+ install -D -m644 "$srcdir"/nrpe at .service \
+ "$pkgdir"/usr/lib/systemd/system/nrpe at .service
+ install -D -m644 "$srcdir"/nrpe.tmpfiles \
+ "$pkgdir"/usr/lib/tmpfiles.d/nrpe.conf
+
+ install -Dm644 README "$pkgdir"/usr/share/doc/$pkgname/README
+ install -Dm644 README.SSL "$pkgdir"/usr/share/doc/$pkgname/README.SSL
+ install -Dm644 SECURITY "$pkgdir"/usr/share/doc/$pkgname/SECURITY
+ install -Dm644 LEGAL "$pkgdir"/usr/share/licenses/$pkgname/LEGAL
+}
Deleted: community-i686/nrpe.install
===================================================================
--- community-i686/nrpe.install 2015-02-10 14:35:16 UTC (rev 127465)
+++ community-i686/nrpe.install 2015-02-10 14:35:44 UTC (rev 127466)
@@ -1,28 +0,0 @@
-post_install() {
- if [ -z "$(getent group nrpe)" ]; then
- groupadd -g 31 nrpe
- fi
- if [ -z "$(getent passwd nrpe)" ]; then
- useradd -u 31 -g nrpe -c "Nagios NRPE" -d /dev/null -s /usr/bin/nologin nrpe
- fi
-
- grep -Pq '^nrpe\s+' /etc/services || \
- echo "nrpe 5666/tcp" >> /etc/services
-
- systemd-tmpfiles --create /usr/lib/tmpfiles.d/nrpe.conf
-}
-
-post_upgrade() {
- post_install $1
-}
-
-post_remove() {
- userdel nrpe
- groupdel nrpe
-}
-
-post_remove() {
- # remove the line added to /etc/services
- sed -e '/nrpe 5666\/tcp/d' \
- -i /etc/services || true
-}
Copied: nrpe/repos/community-i686/nrpe.install (from rev 127465, nrpe/trunk/nrpe.install)
===================================================================
--- community-i686/nrpe.install (rev 0)
+++ community-i686/nrpe.install 2015-02-10 14:35:44 UTC (rev 127466)
@@ -0,0 +1,23 @@
+post_install() {
+ if [ -z "$(getent group nrpe)" ]; then
+ groupadd -g 31 nrpe
+ fi
+ if [ -z "$(getent passwd nrpe)" ]; then
+ useradd -u 31 -g nrpe -c "NRPE" -d /dev/null -s /usr/bin/nologin nrpe
+ fi
+
+ grep -Pq '^nrpe\s+' /etc/services || \
+ echo "nrpe 5666/tcp" >> /etc/services
+
+ systemd-tmpfiles --create /usr/lib/tmpfiles.d/nrpe.conf
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ # remove the line added to /etc/services
+ sed -e '/nrpe 5666\/tcp/d' \
+ -i /etc/services || true
+}
Deleted: community-i686/nrpe.service
===================================================================
--- community-i686/nrpe.service 2015-02-10 14:35:16 UTC (rev 127465)
+++ community-i686/nrpe.service 2015-02-10 14:35:44 UTC (rev 127466)
@@ -1,13 +0,0 @@
-[Unit]
-Description=Daemon to answer plugin requests from Nagios on remote hosts
-After=network.target
-Requires=network.target
-
-[Service]
-Type=forking
-User=nrpe
-Group=nrpe
-ExecStart=/usr/bin/nrpe -c /etc/nrpe/nrpe.cfg -d
-
-[Install]
-WantedBy=multi-user.target
Copied: nrpe/repos/community-i686/nrpe.service (from rev 127465, nrpe/trunk/nrpe.service)
===================================================================
--- community-i686/nrpe.service (rev 0)
+++ community-i686/nrpe.service 2015-02-10 14:35:44 UTC (rev 127466)
@@ -0,0 +1,13 @@
+[Unit]
+Description=Daemon to answer plugin requests from Nagios on remote hosts
+After=network.target
+Requires=network.target
+
+[Service]
+Type=forking
+User=nrpe
+Group=nrpe
+ExecStart=/usr/bin/nrpe -c /etc/nrpe/nrpe.cfg -d
+
+[Install]
+WantedBy=multi-user.target
Deleted: community-i686/nrpe.socket
===================================================================
--- community-i686/nrpe.socket 2015-02-10 14:35:16 UTC (rev 127465)
+++ community-i686/nrpe.socket 2015-02-10 14:35:44 UTC (rev 127466)
@@ -1,9 +0,0 @@
-[Unit]
-Description=NRPE Socket for Per-Connection Servers
-
-[Socket]
-ListenStream=5666
-Accept=yes
-
-[Install]
-WantedBy=sockets.target
Copied: nrpe/repos/community-i686/nrpe.socket (from rev 127465, nrpe/trunk/nrpe.socket)
===================================================================
--- community-i686/nrpe.socket (rev 0)
+++ community-i686/nrpe.socket 2015-02-10 14:35:44 UTC (rev 127466)
@@ -0,0 +1,9 @@
+[Unit]
+Description=NRPE Socket for Per-Connection Servers
+
+[Socket]
+ListenStream=5666
+Accept=yes
+
+[Install]
+WantedBy=sockets.target
Deleted: community-i686/nrpe.tmpfiles
===================================================================
--- community-i686/nrpe.tmpfiles 2015-02-10 14:35:16 UTC (rev 127465)
+++ community-i686/nrpe.tmpfiles 2015-02-10 14:35:44 UTC (rev 127466)
@@ -1 +0,0 @@
-d /run/nrpe 0755 nrpe nrpe -
Copied: nrpe/repos/community-i686/nrpe.tmpfiles (from rev 127465, nrpe/trunk/nrpe.tmpfiles)
===================================================================
--- community-i686/nrpe.tmpfiles (rev 0)
+++ community-i686/nrpe.tmpfiles 2015-02-10 14:35:44 UTC (rev 127466)
@@ -0,0 +1 @@
+d /run/nrpe 0755 nrpe nrpe -
Deleted: community-i686/nrpe at .service
===================================================================
--- community-i686/nrpe at .service 2015-02-10 14:35:16 UTC (rev 127465)
+++ community-i686/nrpe at .service 2015-02-10 14:35:44 UTC (rev 127466)
@@ -1,8 +0,0 @@
-[Unit]
-Description=NRPE Per-Connection Server
-
-[Service]
-ExecStart=-/usr/bin/nrpe -c /etc/nrpe/nrpe.cfg --inetd
-User=nrpe
-Group=nrpe
-StandardInput=socket
Copied: nrpe/repos/community-i686/nrpe at .service (from rev 127465, nrpe/trunk/nrpe at .service)
===================================================================
--- community-i686/nrpe at .service (rev 0)
+++ community-i686/nrpe at .service 2015-02-10 14:35:44 UTC (rev 127466)
@@ -0,0 +1,8 @@
+[Unit]
+Description=NRPE Per-Connection Server
+
+[Service]
+ExecStart=-/usr/bin/nrpe -c /etc/nrpe/nrpe.cfg --inetd
+User=nrpe
+Group=nrpe
+StandardInput=socket
Deleted: community-i686/syslog.patch
===================================================================
--- community-i686/syslog.patch 2015-02-10 14:35:16 UTC (rev 127465)
+++ community-i686/syslog.patch 2015-02-10 14:35:44 UTC (rev 127466)
@@ -1,22 +0,0 @@
-diff --git a/src/nrpe.c b/src/nrpe.c
-index 381f0ac..bc6b227 100644
---- a/src/nrpe.c
-+++ b/src/nrpe.c
-@@ -1131,7 +1131,16 @@ void wait_for_connections(void){
-
- /* log info to syslog facility */
- if(debug==TRUE) {
-- syslog(LOG_DEBUG,"Connection from %s closed.",ipstr);
-+ switch(addr.ss_family) {
-+ case AF_INET:
-+ syslog(LOG_DEBUG,"Connection from %s closed.",
-+ inet_ntoa(nptr->sin_addr));
-+ break;
-+ case AF_INET6:
-+ syslog(LOG_DEBUG,"Connection from %s closed.",
-+ ipstr);
-+ break;
-+ }
- }
-
- /* close socket prior to exiting */
Copied: nrpe/repos/community-i686/syslog.patch (from rev 127465, nrpe/trunk/syslog.patch)
===================================================================
--- community-i686/syslog.patch (rev 0)
+++ community-i686/syslog.patch 2015-02-10 14:35:44 UTC (rev 127466)
@@ -0,0 +1,22 @@
+diff --git a/src/nrpe.c b/src/nrpe.c
+index 381f0ac..bc6b227 100644
+--- a/src/nrpe.c
++++ b/src/nrpe.c
+@@ -1131,7 +1131,16 @@ void wait_for_connections(void){
+
+ /* log info to syslog facility */
+ if(debug==TRUE) {
+- syslog(LOG_DEBUG,"Connection from %s closed.",ipstr);
++ switch(addr.ss_family) {
++ case AF_INET:
++ syslog(LOG_DEBUG,"Connection from %s closed.",
++ inet_ntoa(nptr->sin_addr));
++ break;
++ case AF_INET6:
++ syslog(LOG_DEBUG,"Connection from %s closed.",
++ ipstr);
++ break;
++ }
+ }
+
+ /* close socket prior to exiting */
Deleted: community-x86_64/PKGBUILD
===================================================================
--- community-x86_64/PKGBUILD 2015-02-10 14:35:16 UTC (rev 127465)
+++ community-x86_64/PKGBUILD 2015-02-10 14:35:44 UTC (rev 127466)
@@ -1,79 +0,0 @@
-# Maintainer: Jonathan Steel <jsteel at archlinux.org>
-# Contributor: Phillip Smith <fukawi2 at NO-SPAM.gmail.com>
-# Contributor: Dale Blount <dale at archlinux.org>
-
-pkgname=nrpe
-pkgver=2.15
-pkgrel=3
-pkgdesc="Nagios Remote Plugin Executor"
-arch=('i686' 'x86_64')
-license=('GPL')
-depends=('openssl')
-optdepends=("monitoring-plugins: common tools for monitoring using $pkgname")
-replaces=('nagios-nrpe')
-install=$pkgname.install
-backup=('etc/nrpe/nrpe.cfg' 'etc/xinetd.d/nrpe')
-url="http://exchange.nagios.org/directory/Addons/Monitoring-Agents/NRPE--2D-Nagios-Remote-Plugin-Executor/details"
-source=(http://downloads.sourceforge.net/nagios/$pkgname-$pkgver.tar.gz
- $pkgname.service $pkgname.socket $pkgname at .service $pkgname.tmpfiles
- syslog.patch)
-md5sums=('3921ddc598312983f604541784b35a50'
- '265512fbfc65f89eab1ca23d11ec749d'
- 'f239bb4e7b885449d1f4067b209d89fd'
- '143278e9495821bd887cf84ce0f97af6'
- 'd4b89b7ff8ffb187d44fedf294e7f5de'
- 'e68e6460f5a2999635254dac64056679')
-
-prepare() {
- cd "$srcdir"/$pkgname-$pkgver
-
- # fix directory permissions
- sed -i 's/775/755/' Makefile.in src/Makefile.in
-
- # fix run directory
- sed -i 's/nrpe.pid/nrpe\/nrpe.pid/' sample-config/nrpe.cfg.in
-
- # set the nrpe user and group
- sed -i 's/@nrpe_user@/31/' sample-config/nrpe.cfg.in
- sed -i 's/@nrpe_group@/31/' sample-config/nrpe.cfg.in
-
- # fix logging binary data to journal/syslog when ipv4 disconnects with debug=1
- patch -Np1 -i "$srcdir"/syslog.patch
-}
-
-build() {
- cd "$srcdir"/$pkgname-$pkgver
-
- ./configure \
- --prefix=/usr \
- --sysconfdir=/etc/nrpe \
- --libexecdir=/usr/lib/monitoring-plugins \
- --enable-command-args \
- --with-nrpe-user=0 --with-nrpe-group=0 \
- --with-nagios-user=0 --with-nagios-group=0
-
- make
-}
-
-package() {
- cd "$srcdir"/$pkgname-$pkgver
-
- make DESTDIR="$pkgdir"/ install
- make DESTDIR="$pkgdir"/ install-daemon-config
-
- install -Dm644 sample-config/nrpe.xinetd "$pkgdir"/etc/xinetd.d/nrpe
-
- install -D -m644 "$srcdir"/nrpe.service \
- "$pkgdir"/usr/lib/systemd/system/nrpe.service
- install -D -m644 "$srcdir"/nrpe.socket \
- "$pkgdir"/usr/lib/systemd/system/nrpe.socket
- install -D -m644 "$srcdir"/nrpe at .service \
- "$pkgdir"/usr/lib/systemd/system/nrpe at .service
- install -D -m644 "$srcdir"/nrpe.tmpfiles \
- "$pkgdir"/usr/lib/tmpfiles.d/nrpe.conf
-
- install -Dm644 README "$pkgdir"/usr/share/doc/$pkgname/README
- install -Dm644 README.SSL "$pkgdir"/usr/share/doc/$pkgname/README.SSL
- install -Dm644 SECURITY "$pkgdir"/usr/share/doc/$pkgname/SECURITY
- install -Dm644 LEGAL "$pkgdir"/usr/share/licenses/$pkgname/LEGAL
-}
Copied: nrpe/repos/community-x86_64/PKGBUILD (from rev 127465, nrpe/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD (rev 0)
+++ community-x86_64/PKGBUILD 2015-02-10 14:35:44 UTC (rev 127466)
@@ -0,0 +1,79 @@
+# Maintainer: Jonathan Steel <jsteel at archlinux.org>
+# Contributor: Phillip Smith <fukawi2 at NO-SPAM.gmail.com>
+# Contributor: Dale Blount <dale at archlinux.org>
+
+pkgname=nrpe
+pkgver=2.15
+pkgrel=4
+pkgdesc="Nagios Remote Plugin Executor"
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('openssl')
+optdepends=("monitoring-plugins: common tools for monitoring using $pkgname")
+replaces=('nagios-nrpe')
+install=$pkgname.install
+backup=('etc/nrpe/nrpe.cfg' 'etc/xinetd.d/nrpe')
+url="http://exchange.nagios.org/directory/Addons/Monitoring-Agents/NRPE--2D-Nagios-Remote-Plugin-Executor/details"
+source=(http://downloads.sourceforge.net/nagios/$pkgname-$pkgver.tar.gz
+ $pkgname.service $pkgname.socket $pkgname at .service $pkgname.tmpfiles
+ syslog.patch)
+md5sums=('3921ddc598312983f604541784b35a50'
+ '265512fbfc65f89eab1ca23d11ec749d'
+ 'f239bb4e7b885449d1f4067b209d89fd'
+ '143278e9495821bd887cf84ce0f97af6'
+ 'd4b89b7ff8ffb187d44fedf294e7f5de'
+ 'e68e6460f5a2999635254dac64056679')
+
+prepare() {
+ cd $pkgname-$pkgver
+
+ # fix directory permissions
+ sed -i 's/775/755/' Makefile.in src/Makefile.in
+
+ # fix run directory
+ sed -i 's/nrpe.pid/nrpe\/nrpe.pid/' sample-config/nrpe.cfg.in
+
+ # set the nrpe user and group
+ sed -i 's/@nrpe_user@/31/' sample-config/nrpe.cfg.in
+ sed -i 's/@nrpe_group@/31/' sample-config/nrpe.cfg.in
+
+ # fix logging binary data to journal/syslog when ipv4 disconnects with debug=1
+ patch -Np1 -i "$srcdir"/syslog.patch
+}
+
+build() {
+ cd $pkgname-$pkgver
+
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc/nrpe \
+ --libexecdir=/usr/lib/monitoring-plugins \
+ --enable-command-args \
+ --with-nrpe-user=0 --with-nrpe-group=0 \
+ --with-nagios-user=0 --with-nagios-group=0
+
+ make
+}
+
+package() {
+ cd $pkgname-$pkgver
+
+ make DESTDIR="$pkgdir" install
+ make DESTDIR="$pkgdir"/ install-daemon-config
+
+ install -Dm644 sample-config/nrpe.xinetd "$pkgdir"/etc/xinetd.d/nrpe
+
+ install -D -m644 "$srcdir"/nrpe.service \
+ "$pkgdir"/usr/lib/systemd/system/nrpe.service
+ install -D -m644 "$srcdir"/nrpe.socket \
+ "$pkgdir"/usr/lib/systemd/system/nrpe.socket
+ install -D -m644 "$srcdir"/nrpe at .service \
+ "$pkgdir"/usr/lib/systemd/system/nrpe at .service
+ install -D -m644 "$srcdir"/nrpe.tmpfiles \
+ "$pkgdir"/usr/lib/tmpfiles.d/nrpe.conf
+
+ install -Dm644 README "$pkgdir"/usr/share/doc/$pkgname/README
+ install -Dm644 README.SSL "$pkgdir"/usr/share/doc/$pkgname/README.SSL
+ install -Dm644 SECURITY "$pkgdir"/usr/share/doc/$pkgname/SECURITY
+ install -Dm644 LEGAL "$pkgdir"/usr/share/licenses/$pkgname/LEGAL
+}
Deleted: community-x86_64/nrpe.install
===================================================================
--- community-x86_64/nrpe.install 2015-02-10 14:35:16 UTC (rev 127465)
+++ community-x86_64/nrpe.install 2015-02-10 14:35:44 UTC (rev 127466)
@@ -1,28 +0,0 @@
-post_install() {
- if [ -z "$(getent group nrpe)" ]; then
- groupadd -g 31 nrpe
- fi
- if [ -z "$(getent passwd nrpe)" ]; then
- useradd -u 31 -g nrpe -c "Nagios NRPE" -d /dev/null -s /usr/bin/nologin nrpe
- fi
-
- grep -Pq '^nrpe\s+' /etc/services || \
- echo "nrpe 5666/tcp" >> /etc/services
-
- systemd-tmpfiles --create /usr/lib/tmpfiles.d/nrpe.conf
-}
-
-post_upgrade() {
- post_install $1
-}
-
-post_remove() {
- userdel nrpe
- groupdel nrpe
-}
-
-post_remove() {
- # remove the line added to /etc/services
- sed -e '/nrpe 5666\/tcp/d' \
- -i /etc/services || true
-}
Copied: nrpe/repos/community-x86_64/nrpe.install (from rev 127465, nrpe/trunk/nrpe.install)
===================================================================
--- community-x86_64/nrpe.install (rev 0)
+++ community-x86_64/nrpe.install 2015-02-10 14:35:44 UTC (rev 127466)
@@ -0,0 +1,23 @@
+post_install() {
+ if [ -z "$(getent group nrpe)" ]; then
+ groupadd -g 31 nrpe
+ fi
+ if [ -z "$(getent passwd nrpe)" ]; then
+ useradd -u 31 -g nrpe -c "NRPE" -d /dev/null -s /usr/bin/nologin nrpe
+ fi
+
+ grep -Pq '^nrpe\s+' /etc/services || \
+ echo "nrpe 5666/tcp" >> /etc/services
+
+ systemd-tmpfiles --create /usr/lib/tmpfiles.d/nrpe.conf
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ # remove the line added to /etc/services
+ sed -e '/nrpe 5666\/tcp/d' \
+ -i /etc/services || true
+}
Deleted: community-x86_64/nrpe.service
===================================================================
--- community-x86_64/nrpe.service 2015-02-10 14:35:16 UTC (rev 127465)
+++ community-x86_64/nrpe.service 2015-02-10 14:35:44 UTC (rev 127466)
@@ -1,13 +0,0 @@
-[Unit]
-Description=Daemon to answer plugin requests from Nagios on remote hosts
-After=network.target
-Requires=network.target
-
-[Service]
-Type=forking
-User=nrpe
-Group=nrpe
-ExecStart=/usr/bin/nrpe -c /etc/nrpe/nrpe.cfg -d
-
-[Install]
-WantedBy=multi-user.target
Copied: nrpe/repos/community-x86_64/nrpe.service (from rev 127465, nrpe/trunk/nrpe.service)
===================================================================
--- community-x86_64/nrpe.service (rev 0)
+++ community-x86_64/nrpe.service 2015-02-10 14:35:44 UTC (rev 127466)
@@ -0,0 +1,13 @@
+[Unit]
+Description=Daemon to answer plugin requests from Nagios on remote hosts
+After=network.target
+Requires=network.target
+
+[Service]
+Type=forking
+User=nrpe
+Group=nrpe
+ExecStart=/usr/bin/nrpe -c /etc/nrpe/nrpe.cfg -d
+
+[Install]
+WantedBy=multi-user.target
Deleted: community-x86_64/nrpe.socket
===================================================================
--- community-x86_64/nrpe.socket 2015-02-10 14:35:16 UTC (rev 127465)
+++ community-x86_64/nrpe.socket 2015-02-10 14:35:44 UTC (rev 127466)
@@ -1,9 +0,0 @@
-[Unit]
-Description=NRPE Socket for Per-Connection Servers
-
-[Socket]
-ListenStream=5666
-Accept=yes
-
-[Install]
-WantedBy=sockets.target
Copied: nrpe/repos/community-x86_64/nrpe.socket (from rev 127465, nrpe/trunk/nrpe.socket)
===================================================================
--- community-x86_64/nrpe.socket (rev 0)
+++ community-x86_64/nrpe.socket 2015-02-10 14:35:44 UTC (rev 127466)
@@ -0,0 +1,9 @@
+[Unit]
+Description=NRPE Socket for Per-Connection Servers
+
+[Socket]
+ListenStream=5666
+Accept=yes
+
+[Install]
+WantedBy=sockets.target
Deleted: community-x86_64/nrpe.tmpfiles
===================================================================
--- community-x86_64/nrpe.tmpfiles 2015-02-10 14:35:16 UTC (rev 127465)
+++ community-x86_64/nrpe.tmpfiles 2015-02-10 14:35:44 UTC (rev 127466)
@@ -1 +0,0 @@
-d /run/nrpe 0755 nrpe nrpe -
Copied: nrpe/repos/community-x86_64/nrpe.tmpfiles (from rev 127465, nrpe/trunk/nrpe.tmpfiles)
===================================================================
--- community-x86_64/nrpe.tmpfiles (rev 0)
+++ community-x86_64/nrpe.tmpfiles 2015-02-10 14:35:44 UTC (rev 127466)
@@ -0,0 +1 @@
+d /run/nrpe 0755 nrpe nrpe -
Deleted: community-x86_64/nrpe at .service
===================================================================
--- community-x86_64/nrpe at .service 2015-02-10 14:35:16 UTC (rev 127465)
+++ community-x86_64/nrpe at .service 2015-02-10 14:35:44 UTC (rev 127466)
@@ -1,8 +0,0 @@
-[Unit]
-Description=NRPE Per-Connection Server
-
-[Service]
-ExecStart=-/usr/bin/nrpe -c /etc/nrpe/nrpe.cfg --inetd
-User=nrpe
-Group=nrpe
-StandardInput=socket
Copied: nrpe/repos/community-x86_64/nrpe at .service (from rev 127465, nrpe/trunk/nrpe at .service)
===================================================================
--- community-x86_64/nrpe at .service (rev 0)
+++ community-x86_64/nrpe at .service 2015-02-10 14:35:44 UTC (rev 127466)
@@ -0,0 +1,8 @@
+[Unit]
+Description=NRPE Per-Connection Server
+
+[Service]
+ExecStart=-/usr/bin/nrpe -c /etc/nrpe/nrpe.cfg --inetd
+User=nrpe
+Group=nrpe
+StandardInput=socket
Deleted: community-x86_64/syslog.patch
===================================================================
--- community-x86_64/syslog.patch 2015-02-10 14:35:16 UTC (rev 127465)
+++ community-x86_64/syslog.patch 2015-02-10 14:35:44 UTC (rev 127466)
@@ -1,22 +0,0 @@
-diff --git a/src/nrpe.c b/src/nrpe.c
-index 381f0ac..bc6b227 100644
---- a/src/nrpe.c
-+++ b/src/nrpe.c
-@@ -1131,7 +1131,16 @@ void wait_for_connections(void){
-
- /* log info to syslog facility */
- if(debug==TRUE) {
-- syslog(LOG_DEBUG,"Connection from %s closed.",ipstr);
-+ switch(addr.ss_family) {
-+ case AF_INET:
-+ syslog(LOG_DEBUG,"Connection from %s closed.",
-+ inet_ntoa(nptr->sin_addr));
-+ break;
-+ case AF_INET6:
-+ syslog(LOG_DEBUG,"Connection from %s closed.",
-+ ipstr);
-+ break;
-+ }
- }
-
- /* close socket prior to exiting */
Copied: nrpe/repos/community-x86_64/syslog.patch (from rev 127465, nrpe/trunk/syslog.patch)
===================================================================
--- community-x86_64/syslog.patch (rev 0)
+++ community-x86_64/syslog.patch 2015-02-10 14:35:44 UTC (rev 127466)
@@ -0,0 +1,22 @@
+diff --git a/src/nrpe.c b/src/nrpe.c
+index 381f0ac..bc6b227 100644
+--- a/src/nrpe.c
++++ b/src/nrpe.c
+@@ -1131,7 +1131,16 @@ void wait_for_connections(void){
+
+ /* log info to syslog facility */
+ if(debug==TRUE) {
+- syslog(LOG_DEBUG,"Connection from %s closed.",ipstr);
++ switch(addr.ss_family) {
++ case AF_INET:
++ syslog(LOG_DEBUG,"Connection from %s closed.",
++ inet_ntoa(nptr->sin_addr));
++ break;
++ case AF_INET6:
++ syslog(LOG_DEBUG,"Connection from %s closed.",
++ ipstr);
++ break;
++ }
+ }
+
+ /* close socket prior to exiting */
More information about the arch-commits
mailing list