Package Details: network-ups-tools 2.7.4-5

Git Clone URL: https://aur.archlinux.org/network-ups-tools.git (read-only)
Package Base: network-ups-tools
Description: NUT is a collection of programs for monitoring and administering UPS hardware
Upstream URL: http://www.networkupstools.org/
Licenses: GPL2
Submitter: Atsutane
Maintainer: The-Compiler
Last Packager: The-Compiler
Votes: 79
Popularity: 0.399724
First Submitted: 2010-09-21 19:10
Last Updated: 2017-04-28 20:10

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 Next › Last »

travesh commented on 2014-02-08 17:01

Dan, thanks again for taking this on. Arch Linux ARM builds and works as is using your 2.7.1. Docs build is rather slow on embedded ARM, as it can't be distcc'd to faster hosts. SNMP users may want to check specific UPS support, as IETF fallback seems somewhat broken in 2.7.1.

zman0900 commented on 2014-01-29 05:38

I made an updated PKGBUILD for 2.7.1. Its nearly the same as Atsutane's current version, but I added a few missing dependencies, and more explicitly defined what options are enabled. Also, I removed the old init file since we have systemd now, and added the documentation. Look in /usr/share/doc/network-ups-tools. I added in the arm arches too, since travesh reports them to work, and the Debian package is build for all of their arches.

https://gist.github.com/zman0900/8682369#file-pkgbuild-network-ups-tools

If you are interested in the NUT-Monitor GUI, I also created a separate package for that here:

https://aur.archlinux.org/packages/nut-monitor/

travesh commented on 2013-10-12 16:21

Thanks, zman0900 for the helpful work and comments. I've modified that PKGBUILD to include support for ARM and SNMP, placing it here:
http://www.mudbury.com/linux/arch/network-ups-tools/PKGBUILD-travesh-20131012
This is working for me on Arch Linux ARM on BeagleBone Black hardware. Should also work on Raspberry Pi (and of course x86).

--- PKGBUILD-network-ups-tools 2013-10-10 23:13:18.859094762 -0400
+++ PKGBUILD-travesh-20131012 2013-10-12 11:00:22.063110119 -0400
@@ -4,12 +4,12 @@

pkgname=network-ups-tools
pkgver=2.6.5
-pkgrel=3
+pkgrel=5
pkgdesc="NUT is a collection of programs for monitoring and administering UPS hardware"
-arch=('i686' 'x86_64')
+arch=('i686' 'x86_64' 'armv6h' 'armv7h')
url="http://www.networkupstools.org/"
license=('GPL2')
-depends=('openssl' 'libusb-compat')
+depends=('openssl' 'libusb-compat' 'net-snmp' 'desktop-file-utils')
makedepends=()
optdepends=('python2: for nut-monitor gui')
backup=(etc/ups/{ups.conf,upsd.conf,upsd.users,upsmon.conf,upssched.conf})
@@ -29,10 +29,11 @@
sed -i 's|/usr/bin/env python|/usr/bin/env python2.7|' scripts/python/app/NUT-Monitor

./configure \
- --without-wrap \
+ --without-wrap \
--with-user=ups \
--with-group=nut \
--with-usb \
+ --with-snmp \
--prefix=/usr \
--with-udev-dir=/usr/lib/udev \
--with-systemdsystemunitdir=/lib/systemd/system \

zman0900 commented on 2013-06-19 04:49

Using --sbindir and --with-drvpath works for me. Here's my working PKGBUILD: https://dl.dropboxusercontent.com/u/50802094/PKGBUILD-network-ups-tools

Note that this has the nut-monitor GUI enabled as well.

kurych commented on 2013-06-08 10:13

Yes, option "--sbindir" is necessary for the correct path. And second thing: if you add option "--with-drvpath=/usr/bin", patch file "nut-driver.service.patch" will not be necessary.

denn commented on 2013-06-04 18:28

Due to /bin, /sbin and /usr/sbin are now merged into /usr/bin, it is needed add --sbindir=/usr/bin to the configure command line.

Anonymous comment on 2013-02-08 17:06

Also, this does not compile with snmp support, edit the PKGBUILD and under --with-usb\ add the line --with-snmp \ . Make sure you have the required dependencies installed it should just be the net-snmp package in the extra repos.

Anonymous comment on 2013-02-07 20:40

For the record: this compiles without issue on the RaspberryPi, so you can add 'armv6h' to the supported architectures.

Also, for those that are having issues (like I was) with usb UPSs, try executing upsdrvctl start .

Otherwise, keep up the good work.

zman0900 commented on 2013-01-29 23:53

I made a patch to enable installing the nut-monitor python gui, and also fix permissions of a few config files.

http://dl.dropbox.com/u/50802094/enable-nut-monitor.patch


diff -ur network-ups-tools.orig/nut.install network-ups-tools/nut.install
--- network-ups-tools.orig/nut.install 2011-02-27 11:53:24.000000000 -0500
+++ network-ups-tools/nut.install 2013-01-29 18:40:13.227550729 -0500
@@ -4,7 +4,7 @@
mkdir -p /var/state/ups/
chmod 0770 /var/state/ups/
chown root:nut /var/state/ups/
- chown root:nut /etc/ups/upsd.conf /etc/ups/upsd.users /etc/ups/upsmon.conf
+ chown root:nut /etc/ups/nut.conf /etc/ups/ups.conf /etc/ups/upsd.conf /etc/ups/upsd.users /etc/ups/upsmon.conf /etc/ups/upssched.conf
echo ">>> Before starting your UPSd daemon, you must"
echo ">>> edit /etc/ups/ups.conf in order to set your"
echo ">>> UPS driver and port."
diff -ur network-ups-tools.orig/PKGBUILD network-ups-tools/PKGBUILD
--- network-ups-tools.orig/PKGBUILD 2012-10-21 06:13:11.000000000 -0400
+++ network-ups-tools/PKGBUILD 2013-01-29 18:44:09.268473116 -0500
@@ -4,13 +4,14 @@

pkgname=network-ups-tools
pkgver=2.6.5
-pkgrel=2
+pkgrel=3
pkgdesc="NUT is a collection of programs for monitoring and administering UPS hardware"
arch=('i686' 'x86_64')
url="http://www.networkupstools.org/"
license=('GPL2')
depends=('openssl' 'libusb-compat')
makedepends=()
+optdepends=('python2: for nut-monitor gui')
backup=(etc/ups/{ups.conf,upsd.conf,upsd.users,upsmon.conf,upssched.conf})
install=nut.install
source=("http://www.networkupstools.org/source/2.6/nut-$pkgver.tar.gz"
@@ -23,6 +24,11 @@
build() {

cd $srcdir/nut-$pkgver
+
+ sed -i 's|=NUT-Monitor|=nut-monitor|' scripts/python/app/nut-monitor.desktop
+ sed -i "s|sys.argv\[0\]|'/usr/share/nut/nut-monitor/nut-monitor'|" scripts/python/app/NUT-Monitor
+ sed -i 's|/usr/bin/env python|/usr/bin/env python2.7|' scripts/python/app/NUT-Monitor
+
./configure \
--without-wrap \
--with-user=ups \
@@ -50,6 +56,15 @@
install -D -m640 conf/upsmon.conf.sample $pkgdir/etc/ups/upsmon.conf
install -D -m644 conf/upssched.conf.sample $pkgdir/etc/ups/upssched.conf

+ install -D -m644 scripts/python/module/PyNUT.py $pkgdir/usr/lib/python2.7/site-packages/PyNUT.py
+ mkdir -p $pkgdir/usr/share/nut/nut-monitor/pixmaps
+ install -m 755 scripts/python/app/NUT-Monitor $pkgdir/usr/share/nut/nut-monitor/nut-monitor
+ install -m 644 scripts/python/app/gui-1.3.glade $pkgdir/usr/share/nut/nut-monitor
+ install -m 644 scripts/python/app/pixmaps/* $pkgdir/usr/share/nut/nut-monitor/pixmaps/
+ install -D scripts/python/app/nut-monitor.png $pkgdir/usr/share/pixmaps/nut-monitor.png
+ desktop-file-install --dir=$pkgdir/usr/share/applications scripts/python/app/nut-monitor.desktop
+ ln -s /usr/share/nut/nut-monitor/nut-monitor $pkgdir/usr/bin/nut-monitor
+
# Fix systemd's nut-driver.service
cd $pkgdir
patch -p1 < ../nut-driver.service.patch

BeepDog commented on 2013-01-17 04:26

I'm building using these instructions: https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_Clean_Chroot

I got it to successfully build changing two lines:
install -D -m755 $srcdir/upsd.init $pkgdir/etc/rc.d/upsd || return 1
and
patch -p1 < $srcdir/nut-driver.service.patch

Works fine after that.