[Nut-upsuser] APC Back-UPS CS and ES series

Charles Lepple clepple at gmail.com
Wed Aug 21 02:41:52 UTC 2013

On Aug 18, 2013, at 8:59 AM, Charles Lepple wrote:

> On Aug 18, 2013, at 12:14 AM, Lyndon Drake wrote:
>> I'm happy to test an updated build, but have no idea about how to go about doing a build in the first place. Could someone help me in the process of creating a snapshot build for FreeNAS?
> I am not familiar with the specifics of building for FreeNAS, but our BuildBot instance is making source snapshots again:
>   http://buildbot.networkupstools.org/public/nut/waterfall?show=Debian-x64-gcc
> On the "Uploading..." step, there is currently a link to nut-2.7.1-pre1.tar.gz - that can be built just like 2.6.5.
> Somewhere in the FreeNAS source is the command line that you would use to configure NUT to put all of its binaries in the same place that FreeNAS does. Someone asked for that in the second forum link, but there wasn't an answer in that thread. I also didn't see that in a quick search of the NUT archives (we've done this a few times to test out similar in-place upgrades in Linux.)

I think I see where FreeNAS is getting their copy of NUT. They use a ports tree, so I tried building the latest NUT tarball in /usr/ports/sysutils/nut on a FreeBSD 9.1 box (in place of 2.6.5).


The port build system doesn't like our intermediate version number (2.7.1-pre1), so I hacked that to be 2.7.0. There are also some patches which don't apply, so I blindly removed them. I suspect they will need to be regenerated by the port maintainer.

None of this should stop you from building a copy of just one driver, and copying it over the 2.6.5 driver. (The version number doesn't matter there.)

I haven't tried this in my FreeNAS VM yet, but I think you can download the snapshot (see buildbot URL above), and configure it like so:

   ./configure --sysconfdir=/usr/local/etc/nut --program-transform-name= \
     --localstatedir=/var/db/nut --datadir=/usr/local/etc/nut \
     --with-drvpath=/usr/local/libexec/nut --with-statepath=/var/db/nut \
     --with-altpidpath=/var/db/nut --with-pidpath=/var/db/nut \
     --with-pkgconfig-dir=/usr/local/libdata/pkgconfig \
     --with-user=uucp --with-group=uucp --with-dev --without-cgi \
     --with-drivers=usbhid-ups \
     --prefix=/usr/local --mandir=/usr/local/man --infodir=/usr/local/info/ \

Then "cd drivers; make usbhid-ups", and copy usbhid-ups to /usr/local/libexec/nut

Charles Lepple
clepple at gmail

More information about the Nut-upsuser mailing list