nut: bump version and do some spring cleaning#29390
Conversation
For files with an existing OpenWrt copyright notation, update to include 2026 for scripts which have been updated this year. Per openwrt#29390 (comment) Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
For files with an existing OpenWrt copyright notation, update to include 2026 for scripts which have been updated this year. Per openwrt#29390 (comment) Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
feb3299 to
ff94137
Compare
|
Looks like |
|
Look at the ones with error and see if those executables return a valid version, like this one: |
|
That is a script, not part of the upstream NUT package. It should not be expected to return the NUT version IMO. |
|
You can add a |
Is this documented somewhere? |
|
No. It's new and still being worked on. |
|
You'll still need an override for packages that can't pass generic checks. I'm working on this, so I'm not sure it's useful to tag more people. |
|
Yes, but you have no documentation on what the script should look like, or examples to follow. That needs to be remedied before this is made 'live'. |
|
I don't have write access to the actions repo, so I can't fix things in a timely manner, and it's otherwise impossible for me to test every package for every CI change. I do try to test large swaths of open PRs. But things slip through. Which means there's always a chance something will break. If you disagree with these changes, and unhappy about the lack of the documentation, feel free to open a PR in the actions repo to revert all the recent commits. Here's an example of the version check override script: |
960f98e to
0fb67ac
Compare
|
@GeorgeSapkin What environment are the binaries in for the multiarch test? There are now drivers that are in /usr/libexec/nut that should be versioned checked (/usr/libexec/nut/<driver> -V) - I've currently got that path, but will that work? |
Look, I think it’s just expected that things will occasionally break or be in constant flux in the development and master branches. As for the CI/CD being 'broken,' I have a slightly different take. Runtime testing in the CI/CD now provides a lot more info much earlier in the process—you can see exactly what failed and that it tested a wide range of other data. You could say it didn't fail across the board. I get that seeing a 'failed' status in CI/CD can look a bit intimidating, but it’s better to actually check the error and see if it’s even relevant. At that point, it’s up to the maintainer whether they want to merge it or not. Anyone is welcome to contribute, and kicking up a fuss isn't really ideal. :) It just takes some time, and it’ll be fine again. The simple truth is, no one just got around to it sooner. And yeah, it would be nice if GitHub Actions had a 'warning' state. - https://github.com/orgs/community/discussions/11592 But then again, you don't want to use warnings for absolutely everything during runtime testing, because most of the time, they just end up being ignored. |
|
@BKPepe I think the biggest problem for me, was that this was unannounced (I'm on the announce and devel mailing lists and I had no idea this was coming) and (is) undocumented, when it should have been obvious that it would cause many failures and that contributors would/will need guidance on resolving the resulting breakage. OTOH I did not realize that GitHub Actions doesn't have a 'warning' state. I think it would be useful to selectively use that during a transition period. Since that doesn't look like it will be implemented by GitHub, that is wishful thinking. It's not so much intimidating as an abrupt shock. Having a bit of warning or buffer would have done a lot for me to not feel like I was being blindsided. |
|
Oh, we could do that, though. It’s true. I’m not subscribed to any mailing lists and I don't use IRC like I used to. Hm... But I get it. :) You know how it is. It's a path full of surprises, and since it’s a packages feed that core members aren't really interested in, posting it to the 'devel' mailing list feels a bit odd. Maybe it’ll make more sense once it’s in the core repo, but yeah, anyway, I guess we can. After all, some people use GitHub Actions quite extensively for building OpenWrt outside of upstream. |
|
@GeorgeSapkin Sorry for not handling the shock to my system of the CI changes very well. |
|
@GeorgeSapkin It looks like the version check overrides are not working as expected and the avahi maintainer is having the same issue, from I can see from the logs. |
|
I'll add treewide PR to add version check overrides. I already have a list with some of the misbehaving packages. Once it's open, you can add more offending packages there. I'd say if builds pass but version checks fail, PRs should be merged for now. |
|
@GeorgeSapkin Sounds good. Thank you. |
|
I looked at the logs and the override is failing for a few packages: Could it be that the exit code from those executables is non-zero so you need to ignore it in the version check? |
Will check. Thank you for looking at this. |
@GeorgeSapkin It appears the issue is that I was following the this pattern: EXEC="${PKG_NAME#nut-}"
...
*)
"$EXEC" -V 2>&1 | grep -qF "${PKG_VERSION}"but the executable name(s) for the package are not the same as the package name in some cases. I am working on updating the affected packages' version checks, but I wonder if the script could get a command line parameter with the name of the executable to be version checked, not just the package name. |
0fb67ac to
d624ca7
Compare
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Bumps the OpenWrt nut package to 2.8.5, updates packaging to satisfy newer CI checks, and standardizes/init-script formatting (shfmt/shellcheck), including relocating NUT driver executables to /usr/libexec/nut.
Changes:
- Update NUT to 2.8.5 (reset
PKG_RELEASE, update source URL/hash). - Move driver executables from
/lib/nutto/usr/libexec/nutacross packaging and init/shutdown scripts. - Add/adjust shellcheck directives and reformat several init/default scripts.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| net/nut/Makefile | Version bump + driver path relocation + driver list/description updates + configure path changes |
| net/nut/files/nutshutdown | Use /usr/libexec/nut driver path during shutdown/killpower |
| net/nut/files/nut-server.init | Formatting/shellcheck updates + switch driver paths to /usr/libexec/nut |
| net/nut/files/nut-monitor.init | shellcheck directive change + minor formatting tweaks |
| net/nut/files/nut-cgi.init | shellcheck directives + formatting + directory creation mode handling tweaks |
| net/nut/files/nut-sendmail-notify.default | Add shellcheck hints + whitespace/pipe formatting |
| net/nut/test-version.sh | New CI helper script to validate embedded version strings for subpackages |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
For files with an existing OpenWrt copyright notation, update to include 2026 for scripts which have been updated this year. Per openwrt#29390 (comment) Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
d624ca7 to
a50fe10
Compare
The override (and the manual test) is per-package and not per-executable. So you can chose which executables to test yourself, if any. |
Use shfmt to standardize initscripts and other scripts for the NUT package in OpenWrt. At the same time handle any issues found with shellcheck linting. Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
Bump version to latest stable release. Adjust configure and drivers as needed. Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
For files with an existing OpenWrt copyright notation, update to include 2026 for scripts which have been updated this year. Per openwrt#29390 (comment) Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
They are executables not libraries, so move the UPS drivers to /libexec/nut. Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
Allow CI to pass by skipping the generic version check where it not appropriate. Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
The nut-server script as a single file is difficult for automated code reviewers to parse and analze, so we split the script into a main script, and helper scriptlets. Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
e795cd1 to
67f74c0
Compare
Reduce duplication in the *.functions and nut-server.init scripts. Also improve documentation, some error handling, and logging. Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
AI was complaining about duplication on one script, and another needed a space between variable assignments for better readability. Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
Log more to console when initscript is run manually. Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
67f74c0 to
aca9f48
Compare
|
I've lost track of where I am with this. Will close and resubmit once I have chance to clear my head. I had just intended a quick version bump, but Copilot's complaints need more than a quick fix (which were part of the refactor I had intended to do as a separate PR). |
For files with an existing OpenWrt copyright notation, update to include 2026 for scripts which have been updated this year. Per openwrt#29390 (comment) Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
For files with an existing OpenWrt copyright notation, update to include 2026 for scripts which have been updated this year. Per openwrt#29390 (comment) Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
|
This has a new urgency, because both the master branch and the 25.12 branch now fail to build 2.8.4, since the download fails due to a non-matching SHA256 hash. Compare: EDIT: Sorry, didn't notice #29592 |
For files with an existing OpenWrt copyright notation, update to include 2026 for scripts which have been updated this year. Per openwrt#29390 (comment) Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
|
Regarding the hash for NUT v2.8.4 (released in August) - as explained later on the mailing list, there was some mismatch between tarballs and signatures published before leaving for vacations, which was only rectified in September. The sets published in github release page and on nut-website now should be the correct ones. There is an ongoing effort about recipes and scripts "properly" handling multi-digit version components, but for now integers are considered a scarce resource, so there was no re-release with a new number to settle it better. |
|
@GeorgeSapkin @BKPepe Give the above note from @jimklimov do you want me to issue a hash update (AIUI the OpenWrt download mirror will also need updated if I do that)? |
📦 Package Details
Maintainer: @danielfdickinson
Description:
2.8.5 adds optional JSON output for
upsc(the NUT CLI client) andupscgi(the NUT CGI program), which will be used in future to enhance the LuCI interface.🧪 Run Testing Details
✅ Formalities