Charles Lepple
2015-Mar-10 00:48 UTC
[Nut-upsuser] Install problems (group permissions) with nut 2.7.2
On Mar 9, 2015, at 12:00 PM, Rob Groner <rgroner at RTD.com> wrote:> 1) Autoreconf *must* be run, and not ./configure? I had thought that putting in my *.c and *.h files and making the makefile changes and then executing ./configure for the first time would be enough.Each tool serves a different purpose. autoreconf (and NUT's autogen.sh, by inclusion) generates the ./configure script. I think it typically runs it as well, but often you would re-run it with "--prefix=" or other arguments (such as "--with-drivers=usbhid-ups" to cut down on compilation time). It occurred to me that your driver will be introducing new USB VID:PID entries, so this is something else that autogen.sh does: it rebuilds the udev files that change permissions when the UPS gets plugged in. I mentioned pulling in a copy of autogen.sh earlier, and I'm not sure what other developer-only scripts are left out of the tarball. We really only heavily test two cases: building from Git, and building from a clean tarball. Small patches to the tarball are easy; structural changes like adding files are harder to guarantee that they will work. That, plus the fact that 2.7.2 still has the old prefix number on the udev files, means you might be better off starting from the latest Git version of NUT, or at least including the following patch: https://github.com/networkupstools/nut/commit/040c800efad46ead9670077c9764360802d7aaf5 Reference: https://github.com/networkupstools/nut/issues/140 -- Charles Lepple clepple at gmail
Rob Groner
2015-Mar-10 12:38 UTC
[Nut-upsuser] Install problems (group permissions) with nut 2.7.2
It's arbitrary to me what version I start from, I had just grabbed the latest 2.7.2 tar. How do I get the version that you suggest I start from? git clone? Or do I just change the .tar file I have with what you linked (changes the 52-* file to 62-*) Sincerely, Rob Groner> -----Original Message----- > From: Charles Lepple [mailto:clepple at gmail.com] > Sent: Monday, March 09, 2015 8:48 PM > To: Rob Groner > Cc: nut-upsuser List > Subject: Re: [Nut-upsuser] Install problems (group permissions) with nut > 2.7.2 > > On Mar 9, 2015, at 12:00 PM, Rob Groner <rgroner at RTD.com> wrote: > > > 1) Autoreconf *must* be run, and not ./configure? I had thought that > putting in my *.c and *.h files and making the makefile changes and then > executing ./configure for the first time would be enough. > > Each tool serves a different purpose. autoreconf (and NUT's autogen.sh, by > inclusion) generates the ./configure script. I think it typically runs it as well, > but often you would re-run it with "--prefix=" or other arguments (such as "-- > with-drivers=usbhid-ups" to cut down on compilation time). > > It occurred to me that your driver will be introducing new USB VID:PID > entries, so this is something else that autogen.sh does: it rebuilds the udev > files that change permissions when the UPS gets plugged in. > > I mentioned pulling in a copy of autogen.sh earlier, and I'm not sure what > other developer-only scripts are left out of the tarball. We really only heavily > test two cases: building from Git, and building from a clean tarball. Small > patches to the tarball are easy; structural changes like adding files are harder > to guarantee that they will work. > > That, plus the fact that 2.7.2 still has the old prefix number on the udev files, > means you might be better off starting from the latest Git version of NUT, or > at least including the following patch: > > https://github.com/networkupstools/nut/commit/040c800efad46ead967007 > 7c9764360802d7aaf5 > > Reference: > > https://github.com/networkupstools/nut/issues/140 > > -- > Charles Lepple > clepple at gmail > >
Charles Lepple
2015-Mar-10 12:50 UTC
[Nut-upsuser] building from git (was Re: Install problems (group permissions) with nut 2.7.2)
On Mar 10, 2015, at 8:38 AM, Rob Groner <rgroner at RTD.com> wrote:> How do I get the version that you suggest I start from? git clone?Yes. Once you have your changes added in to your local git repository, you can try making a tarball with 'make dist'.> Or do I just change the .tar file I have with what you linked (changes the 52-* file to 62-*)It would be a change to some of the Makefiles, but I don't remember off the top of my head all of the locations that would need to be changed. Building the latest version from git avoids this, since that patch is already incorporated. -- Charles Lepple clepple at gmail
Charles Lepple
2015-Mar-10 23:48 UTC
[Nut-upsuser] building from git (was Re: Install problems (group permissions) with nut 2.7.2)
On Mar 10, 2015, at 11:20 AM, Rob Groner <rgroner at RTD.com> wrote:> I added "_RTD" to the version string in configure.ac and ran autogen.sh and then configure, and it now shows the _RTD version string during configure. I did a clean make and install, but don't see where else the version number may be showing. When the executables startup, they show 2.7.2-signed-*.I never finished the cleanup of that code, I guess. If you build and install from the Git tree, it generates a version based on the latest tag in Git. The tarball generated from 'make dist' uses the version in configure.ac, but only if you build it outside of the Git working directory. -- Charles Lepple clepple at gmail
Rob Groner
2015-Mar-11 12:41 UTC
[Nut-upsuser] building from git (was Re: Install problems (group permissions) with nut 2.7.2)
Ok, that worked great. I make a .tar, took it somewhere else, untarred it, configured, and built. Then I installed the result and ran it, and it shows 2.7.2.6_RTD for a version number. Awesome! Today I work on commands to tell the UPS to turn off...fun! Sincerely, Rob Groner Software Engineer RTD Embedded Technologies, Inc. ISO9001 and AS9100 Certified Ph: 814-234-8087 www.rtd.com> -----Original Message----- > From: Charles Lepple [mailto:clepple at gmail.com] > Sent: Tuesday, March 10, 2015 7:48 PM > To: Rob Groner > Cc: nut-upsuser List > Subject: Re: [Nut-upsuser] building from git (was Re: Install problems (group > permissions) with nut 2.7.2) > > On Mar 10, 2015, at 11:20 AM, Rob Groner <rgroner at RTD.com> wrote: > > > I added "_RTD" to the version string in configure.ac and ran autogen.sh and > then configure, and it now shows the _RTD version string during configure. I > did a clean make and install, but don't see where else the version number > may be showing. When the executables startup, they show 2.7.2-signed-*. > > I never finished the cleanup of that code, I guess. If you build and install from > the Git tree, it generates a version based on the latest tag in Git. The tarball > generated from 'make dist' uses the version in configure.ac, but only if you > build it outside of the Git working directory. > > -- > Charles Lepple > clepple at gmail > >