Skip to content
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

Ported NUT package to PFSense 2.3 pkg structure. #120

Merged
merged 6 commits into from
May 7, 2016

Conversation

sander1988
Copy link
Contributor

NUT package for PFSense 2.3 . Fixed several bugs that where introduced due to PFSense 2.3 and converted the interface to bootstrap. This includes the widget.

The NUT package for FreeBSD was build with the default options during testing.

I have tested it as far as I can, but I only have one UPS available for testing. So more people should test it.

scp -P 2788 work/pkg/*.txz root@10.0.201.150:.
echo "Done"

exit 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you forgot your own test script and committed it together, can you please remove it?

@PiBa-NL
Copy link
Contributor

PiBa-NL commented Apr 25, 2016

Sadly it looks like at least one of us wasted some time.. #111

@sander1988
Copy link
Contributor Author

Yep, found out yesterday. I checked before but probably one ore two days before your merge request.

Maybe we should merge it and keep the best of both?

You can also contact me directly, email can be found in the source code header comments.

Removed PORTREVISION line for make file.
@sander1988
Copy link
Contributor Author

I made the requested changes (commit d7208cb). In a few days I will push an updated version. After contact with @PiBa-NL we decided to merge his and mine version of the NUT package and keep the best of both.

@sbeaver-netgate
Copy link
Contributor

So pleased you were able to get together on this. Each version had merit but together everyone will win.

Several styling fixes.
Added support for 2 (new) NUT states (CHRG and DISCHRG).
Added green/red text colors to status. Green when the UPS is online, red for warnings/errors.
@sander1988
Copy link
Contributor Author

sander1988 commented May 1, 2016

The package of PiBa-NL and mime have been merged, several bugs fixed and other small improvements. Commits fddc5ae, 64f3b26 and 70e8c8d .

Please test and send me your feedback.

…and it's really needed) due to the new bootstrap theme in PFSense 2.3.
<fielddescr>UPS Monitoring</fielddescr>
<fieldname>monitor</fieldname>
<type>select</type>
<required/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove the 'required' ? Its not possible to disable nut with the "Disabled" option from line 86, which fails to save as it has no value.. (Or add another default empty option, with the choice to specifically disable nut?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit 781492c

@Andrew17856
Copy link

Andrew17856 commented May 5, 2016

Hi Sander1988. Thanks for your work on this. I'm very happy to test the package. What is the easiest way to deploy it onto a live pfSense appliance please?

There used to be an option on pfSense 2.2.x to point at a different package repository - but that seems to have gone in 2.3.

@sander1988
Copy link
Contributor Author

sander1988 commented May 5, 2016

The easiest way is building the pkg package, uploading it to your PFSense box and install it from the command line.

You can download my x64 builds from my drive (so you can skip building the pkg packages yourself): https://drive.google.com/open?id=0BwLY6Pu4pV3QdTNDeXRUVzRtNEE .

First you have to install nut:
pkg add nut-2.7.4_x64.txz

And then you can install the PFSense package for nut:
pkg add pfSense-pkg-nut-2.3.0_x64.txz

Note: do NOT install it on a production box.

@Andrew17856
Copy link

Thanks. I've installed the packages, but can't get it to work with my UPS.

I suspect half the reason is I'm not sure what UPS to select from the menu (and in particular what, if anything to select in Local UPS Generic Type and Local UPS Cable Type).

I'll try playing further tomorrow.

During boot, my UPS is recognised as follows:

May 6 00:52:01 kernel uhid0: <MEC MEC0002, class 0/0, rev 1.00/1.00, addr 1> on usbus0
May 6 00:52:01 kernel ugen0.2: at usbus0

I've seen forum posts suggesting the MEC0003 protocol works well with the Blazer driver

However, I get various messages are in the nut log, e.g.:
May 6 01:23:11 upsd 34473 Can't connect to UPS pfSense: No such file or directory

May 6 01:23:11 upsmon 35018 Poll UPS [pfSense@localhost] failed - Driver not connected

Thanks.

@woffko
Copy link

woffko commented May 6, 2016

After configuring SNMP UPS I've run into old issue. Widget reports:
ERROR: NUT is enabled, however the service is not running! The SNMP UPS may be unreachable.
I don't have any further info in System logs and NUT status is STOPPED, however on start its reports
/rc.start_packages: [nut] INFO: Starting service
but no info after that.
My pfSense is not clean install and I going to try clean install later.

@woffko
Copy link

woffko commented May 6, 2016

Clean Install. Same error.
Manual start from console

[2.3.1-DEVELOPMENT][root@pfSense.localdomain]/root: /usr/local/etc/rc.d/nut onestart
Network UPS Tools - UPS driver controller END-OF-2015Q4-14339-ge69cccf
Can't start /usr/local/libexec/nut/snmp-ups: No such file or directory
/usr/local/etc/rc.d/nut: WARNING: failed precmd routine for nut

You should include SNMP UPS driver into package!
Try install nut from freebsd reprository on pfsense (change settings in /usr/local/etc/pkg/repos).
When you install NUT onto pfsense it requires some additional packages, if you just copy SNMP driver
it may not work becouse additional SNMP package missing, I don't remember its name, sorry.
Anyway, installed nut from freebsd reprository first and pfSense-pkg-nut-2.3.0_x64 package on second step. SNMP UPS now working

@Andrew17856
Copy link

Yes, I noticed the "no such file or directory" error in my setup. Are all the dependencies there?

@woffko
Copy link

woffko commented May 6, 2016

May be its better to install original freebsd nut port instead of modifying it for pfsense but it's now a little bit complicated and breaking community rules maybe also, I don't know.

@netgate-git-updates netgate-git-updates merged commit 781492c into pfsense:devel May 7, 2016
@cbuechler
Copy link

This has been merged. Thanks @sander1988 and @PiBa-NL!

@sander1988
Copy link
Contributor Author

@woffko - You should not start NUT from the command line. Can you check what happens when you start the service through the PFSense webinterface (Status > Services)?

Please also include more details of your NUT settings (all the settings configured on the NUT settings page) so we are able to test the issue you are experiencing.

@Andrew17856
Copy link

@sander1988 Thanks for your work on this. I can see the package has now reappeared in pfSense (thanks). I'm having trouble getting it to work with my UPS. I've posted the issue on the forums here: https://forum.pfsense.org/index.php?topic=111476.0

Any help gratefully received, though I suspect it might be that Blazer driver doesn't support the Megatec MEC0003 protocol, rather than any issue with the port itself.

@woffko
Copy link

woffko commented May 8, 2016

For feedback, my UPS is working with latest official pfSense build without any additional steps required.
Thanks everybody!

@Andrew17856
Copy link

I do wonder if some of the drivers are missing from the port. Selecting a number of the drivers from the pull down menu in pfSense gives a "file not found" for the corresponding driver that should be in /usr/local/libexec/nut/ but isn't.

e.g. Selecting the Mustek UPSs give the following error:
[2.3-RELEASE][admin@pfsense.home]/root: /usr/local/etc/rc.d/nut.sh start
starting megatec
Network UPS Tools - UPS driver controller 2.7.3
Can't start /usr/local/libexec/nut/megatec: No such file or directory
megatec failed to start

Similarly, selecting the Cyber Power UPSs give the following error:

[2.3-RELEASE][admin@pfsense.home]/root: /usr/local/etc/rc.d/nut.sh start
starting cyberpower
Network UPS Tools - UPS driver controller 2.7.3
Can't start /usr/local/libexec/nut/cyberpower: No such file or directory
cyberpower failed to start

@PiBa-NL
Copy link
Contributor

PiBa-NL commented May 8, 2016

Wierd thing is those drivers didn't exist in 2.2 either, where the package was ported from.. Perhaps the whole list of available drivers should be filtered to those drivers that actually exist in /usr/local/libexec/nut/ , and add the few that aren't in the list hoping they will work with the same cable/type parameters..
They don't seem to be mentioned as a driver on http://networkupstools.org/stable-hcl.html either..

@dennypage
Copy link
Contributor

Hey guys, just wanted to say thank you for your work in getting this into 2.3. Really appreciate it.

@hansmuff
Copy link

I installed 2.3.2-RELEASE. I had nut configured and running wonderfully on 2.3.1. After upgrading to 2.3.2-RELEASE (via SSH option 13) pfsense works fine, and all packages except nut work.

When I start nut via Services Status, it does not start. When I use the menu to navigate to Services>NUT, I'll get a 404 message from nginx

I have SSH'd to the box to find that my previous config files all were gone. So I rebuilt them from scratch and ran '/usr/local/etc/rc.d/nut start' and NUT started and seemed to run fine. I still got a 404 on the Services>NUT page though.

So I rebooted pfsense, all the same issues were still there, also something had deleted all my freshly built NUT setup files.. just poof gone, only .sample files left.

I tried uninstall and reinstall of the package, all the same problems.

@dennypage
Copy link
Contributor

Please see the information/help link for the package. It looks like a large lower case "i" in the package manager.

https://forum.pfsense.org/index.php?topic=115349.0

netgate-git-updates pushed a commit that referenced this pull request Sep 13, 2017
Feature request #86: Change meaning of "RequiredHeaders" such that
	header validity is always checked, but messages are only
	rejected on that basis when the flag is set.  Based
	on a patch from Andreas Schulze.
Feature request #127: Log SPF results when rejecting.  Requested
	by Patrick Wagner; patch from Andreas Schulze, follow-up
	patch from Juri Haberland.
Feature request #138: Inculde policy and disposition information
	in an Authentication-Results comment.  Based on a patch
	from Juri Haberland.
Feature request #139: Include the client host name if known
	in failure reports.  Suggested by Roland Turner;
	patch by Andreas Schulze.
Fix bug #95: Assume IPv6 for SPF operations.  Patch from Juri Haberland.
Fix bug #120: Fix control logic around the SPF result.
	Reported by Christophe Wolfhugel; patch from Andreas Schulze.
Fix bug #122: Don't skip the HELO milter phase when SPF is enabled.
	Reported by Christophe Wolfhugel.
Fix bug #157: Fix logging of implicit authserv-ids.  Reported
	by Andreas Schulze; patch from Juri Haberland.
Fix bug #158: Log ignored connections.  Patch from Andreas Schulze.
Fix bug #160: Fix "SyslogFacility" handling.  Patch from
	Juri Haberland.
Fix bug #163: Use a larger buffer for the raw MAIL FROM value.
	Based on a patch from Andreas Schulze.
Fix bug #174: Trim "!" suffixes from reporting addresses.  Problem
	noted by Juri Haberland.
Fix bug #186: When reloading the configuration file, the public
	suffix list was read in with the wrong comment indicator.
	Patch from Federico Omoto.
LIBOPENDMARC: Fix bug #115: Fix type mismatch.  Patch from
	Sebastian A. Siewior via Scott Kitterman.
LIBOPENDMARC: Fix bug #121: Fix IPv6 CIDR matching in SPF code.
	Patch from Christophe Wolfhugel.
LIBOPENDMARC: Fix bug #125: Compile time IPv6 fix.  Reported by
	Christophe Wolfhugel.
LIBOPENDMARC: Fix bug #131: Fix alignment bug.  Patch from
	Andreas Schulze.
LIBOPENDMARC: Fix bug #147: Fix stripping of whitespace from
	DMARC DNS records.  Based on a patch from Job Noorman.
LIBOPENDMARC: Fix bug #149: Apply "sp" setting, if present and
	applicable.  Patch from Petr Novak.
LIBOPENDMARC: Fix bug #154: Fix "rf" and "fo" processing logic.
LIBOPENDMARC: Fix bug #156: Fix variable name.  Patch by
	Andreas Schulze.
LIBOPENDMARC: Fix bug #165: Fix logic in checking which SPF
	identifier was used.  Patches from Marco Favero and
	Juri Haberland.
LIBOPENDMARC: Fix bug #167: Don't return "fail" when we should
	return "none".  Patch from Marco Favero.
REPORTS: Fix bug #134: Handle SMTP errors correctly.  Patch from
	Andreas Schulze.
REPORTS: Fix bug #141: Set the HELO parameter correctly.
	Reported by Alan Smith; patch from Andreas Schulze.
REPORTS: Fix bug #143: Fix logic in table truncation.
	Reported by Wayne Andersen; patch from Juri Haberland.
REPORTS: Fix bug #162: Always report "sp" in aggregate reports.
	Patch from Juri Haberland.
REPORTS: Fix bug #166: Fix report start/end time logic.
	Patch from Juri Haberland.
REPORTS: Fix bug #188: Don't delete inputs too early in
	opendmarc-reports.  Patch from Juri Haberland.
TOOLS: Fix bug #161: "Forensic" reports were renamed "Failure"
	reports.  Patch from Andreas Schulze.
TOOLS: Fix bug #164: Handle IPv6 test addresses.  Reported by
	Andreas Schulze; patch from Juri Haberland.
DOCS: Patch #189: Replace the DMARC RFC with an HTML page
	referencing the relevant specs, since Debian doesn't
	consider RFCs to be "free".  Patch from Scott Kitterman
	via Juri Haberland.

PR:		220902
Submitted by:	Dan Mahoney <freebsd@gushi.org> (maintainer), Lukasz Wasikowski <lukasz@wasikowski.net>
netgate-git-updates pushed a commit that referenced this pull request Nov 2, 2018
 - Switch to PyPi source
 - PyPi source does not provide LICENSE file
 - Change Log:
   - Bugfixes:
     - Fix CloudError if response and error message are provided at the same
       time #114
     - Fix LRO polling if last call is an empty Location (Autorest.Python 3.x
        only) #120
   - Features:
     - Altered resource id parsing logic to allow for resource group IDs #117
netgate-git-updates pushed a commit that referenced this pull request Jan 29, 2021
Upstream Enhancements:
 * Detect future Intel AVX/AMX features #128
 * Add support for Tiger Lake and Sapphire rapids Intel microarchitectures #127
 * Update features for AArch64 to Linux 5.8 #126
 * AVX-512 FMA count detection #120

Port Changes:
 * Add license file
 * Change libcpu_features to a shared library

PR: 253037
Submitted by:	yuri@
netgate-git-updates pushed a commit that referenced this pull request Feb 18, 2021
<ChangeLog>

# 4.0.0      > 2021-02-16

#### New features

- **[BREAKING]** Remove the `prn` option as it's not included
  in the spec any longer #114
- **[BREAKING]** Avoid adding an `exp` claim automatically.
  Instead, the `--exp` flag must be present, with or without a
  value
- Support adding `jti` when encoding
- Add `no-iat` flag to disable automatic `iat` claim generation
- Add an `--iso8601` flag to represent date-based claims as ISO
  8601 date strings. Only applies to `iat`, `exp`, and `nbf`

#### Bug fixes

- Trim whitespace around a jwt before encoding #120

# 3.3.0      > 2020-12-24

#### New features

- Default decoding to JSON when not in a TTY #100

</ChangeLog>
netgate-git-updates pushed a commit that referenced this pull request Oct 19, 2022
ChangeLog:
Bacula-Web 8.6.1 (October 19th 2022)
Changelog
General

User will stay on current page when switching to another catalog (see
Fixed Bacula catalog selector
Using several Bacula catalog, the catalog selector was broken for some
pages (see #120)
Web browser will not ask a form submission while moving back from Job
logs report page (see #30)
Fixed how pagination count rows per page (see #123)
Bump Composer dependencies to latest version
Fixed pagination next button (see #125)
Link to official documentation is now available from top navigation bar
Jobs report

Fixed pagination not using applied filters and options (see #122)
Job endtime filter is now working as expected
Ordering options are kept while using pagination (see #122)
You can reach Job files report from Jobs report page from now (see #126)
Job logs report

More job information are now displayed (see #124)
Pools report

Fixed the Volumes button which now list volumes in the right pool (see
Volumes report

Fixed pagination not using applied filters and options (see #122)
Settings

Removed extra flash message which appear when a user is created
Fixed bug(s)
    (filtered) job overview
     page
New feature(s)
netgate-git-updates pushed a commit that referenced this pull request Oct 25, 2022
ChangeLog:
Bacula-Web 8.6.1 (October 19th 2022)
Changelog
General

User will stay on current page when switching to another catalog (see
Fixed Bacula catalog selector
Using several Bacula catalog, the catalog selector was broken for some
pages (see #120)
Web browser will not ask a form submission while moving back from Job
logs report page (see #30)
Fixed how pagination count rows per page (see #123)
Bump Composer dependencies to latest version
Fixed pagination next button (see #125)
Link to official documentation is now available from top navigation bar
Jobs report

Fixed pagination not using applied filters and options (see #122)
Job endtime filter is now working as expected
Ordering options are kept while using pagination (see #122)
You can reach Job files report from Jobs report page from now (see #126)
Job logs report

More job information are now displayed (see #124)
Pools report

Fixed the Volumes button which now list volumes in the right pool (see
Volumes report

Fixed pagination not using applied filters and options (see #122)
Settings

Removed extra flash message which appear when a user is created
Fixed bug(s)
    (filtered) job overview
     page
New feature(s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants