-
-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lacking / wrong documentation for custom building #535
Comments
NUT does not have all of the init scripts for each distribution, which is why I recommended not removing the original .deb files. Also, the Debian packages still include /etc/init.d (this doesn't come from the NUT repository) so you may want to file a bug with Debian. Partial list of files from the .debs: https://packages.debian.org/stretch/amd64/nut-server/filelist and https://packages.debian.org/stretch/amd64/nut-client/filelist Are you sure you cleaned everything up before re-invoking the |
I now ran
I still think though that this could really be made much clearer - From manual:
This part is very misleading. "overwrite" -- this would mean that files are installed in the same locations but as you can see, they aren't. Since systemd scripts do get overwritten, the default install indeed become the manual one but duplicate library files, binary commands and left-over artefacts from .deb remain unless the package is removed.
This part is also confusing / not true because the default install according to the configure command in the document is to Conclusion: I now see how to successfully install from any commit and the only thing needed from .deb packages is: Last suggestion I would have is that here: http://networkupstools.org/docs/user-manual.chunked/ar01s06.html#UPS_shutdown this example
is updated to:
and instead of just "Init script examples are provide in the scripts directory of the NUT source tree, and in the various packages that exist.", it would be great to mention I really needed a lot of time as a beginner to figure this out. Also here someone is mentioning the same:
So thank you for hints and help, through this I managed to get a working system for me and I try to give back a little with these suggestions. Maybe there is still something I overlooked but please take a look and think about it, if you think no changes to the docs are needed at this point, just close the issue and maybe return later when it makes sense. |
Forgot something very important... I tried once again to completely remove
When I create
and restart the services, it works but only until restart when I guess I'll have to install UPDATE: I think the problem for this particular issue is in systemd scripts, along these lines: From here:
So I'll install the nut package again and investigate systemd scripts, then update them accordingly. I hope then everything works and this is another issue to solve for the team? Or if you confirm, I can provide a pull request for |
.deb package does it this way:
So for now, I just did the same, not sure how it should be done properly so I won't produce a fix. Now I have a working system again. I hope this report has been useful. |
This part is also confusing / not true because the default install according to the configure command in the document is to /usr/lib/nut and for sure doesn't overwrite the .deb install libraries.
Did anything actually get installed to /usr/lib/nut after fixing the backslashes?
The driver path is controlled by another option (--with-drvpath).
https://gist.github.com/davidhq/3caa7ebfaafbf54d48a7c23eb00d6a03#file-gistfile1-txt-L1222 <https://gist.github.com/davidhq/3caa7ebfaafbf54d48a7c23eb00d6a03#file-gistfile1-txt-L1222>
I am not trying to be difficult, honest. This set of instructions has been used many times on the mailing lists (and the configure command-line originally came from the Debian build logs), so I am trying to figure out what is different about your box.
I will try to address some of the other points later.
|
yes, but later I used
I see! Thank you... this doesn't change the comments above but I didn't realize there is this option too... anyway since I used Last summary:
Maybe you should try on a sample debian box... Thank you for all the help! I'm happy with my setup now. |
Am I missing something?
I tried running I cannot even run I am trying to follow this documentation for building: https://networkupstools.org/docs/user-manual.chunked/ar01s05.html I also tried after changing to the branch I needed The above to commands still fail. So does |
The pre-generated The git origin is aimed at developers so you are expected to have common tooling (pkg-config, autotools, compiler, etc.) Indeed the For a Debian/Ubuntu like system you can start by following |
Thanks for filling me in on the blanks I will try the |
On Ubuntu I needed the following: Oh also I had to run autogen as root Then I could run the generated configure script Finally I think that process could be documented better. |
When building from source where are the config files sourced from? My configs in |
Nevermind it seems to be using the correct config files now. |
I custom build wont however pickup my driver
It worked fine before with deb package. I tried specifiying the driver location like so but still no luck:
|
|
had to run |
Finally |
On Ubuntu I needed the following:
sudo apt-get install libtool autoconf autotools-dev pkg-config gcc libusb-dev
Perhaps these deps should be documented?
https://github.com/networkupstools/nut/wiki/Building-NUT-on-Debian,-Raspbian-and-Ubuntu step 3 installs those dependencies.
|
Is that accessable via the website since thats where I was looking? My appologies since it does atleast exsist. I did however have to move those udev rules. |
Is that accessable via the website since thats where I was looking? My appologies since it does atleast exsist.
It's there in general terms:
https://networkupstools.org/docs/developer-guide.chunked/ar01s03.html#building
I did however have to move those udev rules.
Maybe sometime later when the process of rebuilding the website is more automated, we can add in all the quirks for each distro. Until then, it's probably going to be general installation instructions on the website, and specifics on Wiki pages that users can update.
|
Perhaps linking to the Wiki or suggesting people check the Wiki first for community contributed writeups would be a good idea to add to the website. |
Also I believe |
Also I believe sudo apt-get build-dep would only work if the .deb package was installed beforehand.
"These instructions are intended to help you build a copy of NUT that will partially install over the official .debs" so yes, that is assumed
|
I think we should provide explicit information of what's needed for people like me who choose to uninstall the deb but leave configs in place or for people who wish to build without a deb perhaps they dont have a deb for their architecture etc. imo the deps should be documented and not rely on another source for that information. |
Info here: https://github.com/networkupstools/nut/wiki/Building-NUT-on-Debian,-Raspbian-and-Ubuntu
claims that configure and install as described in the document will install binaries and other files exactly as
apt-get install nut
would and so this could be used to build from custom commit and then override the correct files from .deb install (apt-get install nut
) in a simple way.There are actually two problems:
/usr/lib/ups
vs/lib/nut
(maybe this doesn't happen in all branches but when I tried libusb-1.0+0.1 it did because a)--libexecdir
configure options was ignored plus it's specified wrong in the above document--libexecdir=/usr/lib/nut
(should probably be--libexecdir=/lib/nut
to match .deb install but it would still be ignored for some reason)commands in
/usr/local/ups/bin
and/usr/local/ups/sbin
vs/bin/
and/sbin
/etc/init.d/nut
and/etc/init.d/ups-monitor
vs much betternut-client.service
,nut-driver.service
,nut-monitor.service
andnut-server.service
in/lib/systemd/system
with .deb install. It also leaves a symlink for shutdown in/etc/rc6.d
which doesn't really work in recent versions of Debian anyway. .deb install does a nice job creating a short script/lib/systemd/system-shutdown/nutshutdown
and this is not documented anywhere.I managed to do clean custom install this way but it's a bit tiresome and had to be discovered by trial and exploration:
configure
andsudo make install
as in the document above/lib/nut
and/usr/local/ups
to some temporary directorysudo make uninstall
sudo apt-get install nut
/lib/nut
from temporary directory/bin
and/sbin
from a saved copy of/usr/local/ups
/etc/init.d
scripts from manual install which are not used (or could even cause issues) because .deb install usessystemd
scripts/etc/rc6.d
for the same reasonAm I missing something obvious or is that wiki entry really obsolete / wrong for some reason?
I tried on Debian 9.3 Stretch.
The text was updated successfully, but these errors were encountered: