-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
ocsinventory-agent: 2.10.1 -> 2.10.4 #351733
ocsinventory-agent: 2.10.1 -> 2.10.4 #351733
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @anthonyroussel,
I haven't used ocsinventory-agent
in a while and the update itself looks alright.
If I run nixpkgs-review
on your PR it seems to build fine, but I'm not sure whether the binary is working as intended.
[nix-shell:~/.cache/nixpkgs-review/pr-351733]$ sudo ./results/ocsinventory-agent-x86_64-linux/bin/ocsinventory-agent
Duplicate specification "R|remotedir=s" for option "r"
Duplicate specification "p|password=s" for option "p"
[error] Cannot establish communication : 301 Moved Permanently
However, might just be a configuration issue. Have you successfully tested the binary?
The ipdiscover
binary seems to work fine:
[nix-shell:~/.cache/nixpkgs-review/pr-351733]$ sudo ./results/ocsinventory-agent-x86_64-linux/bin/ipdiscover <interface>
<IPDISCOVER>
<H><I>x.x.x.x</I><M>xx:xx:ff:fc:6a:12</M><N>_gateway</N></H>
Hi @totoroot, The binary is working as expected because the OCS Inventory NixOS test is passing But indeed, there are a few warnings when running ocsinventory-agent:
These warnings appear to be related to the GetOpt-Long Perl package. The GetOpt-Long dependency in nixpkgs was recently upgraded to 2.58 (21th September), which introduced these warnings, see commit dd115b3 / #343459 Indeed, since GetOpt-Long v2.55, GetOpt-Long treats single-letter options as case-sensitive. However, OCS Inventory Agent uses several single letter options (-p/-P, -r/-R) that don't respect the breaking rule introduced in GetOpt-Long recently. Example: https://github.com/OCSInventory-NG/UnixAgent/blob/v2.10.4/lib/Ocsinventory/Agent/Config.pm#L127. |
Looks like postPatch = ''
substituteInPlace lib/Ocsinventory/Agent/Config.pm \
--replace-fail "use Getopt::Long;" "use Getopt::Long qw(:config no_ignore_case);"
''; is a resolution.
EDIT: added the |
084ce62
to
c185999
Compare
PR opened upstream: OCSInventory-NG/UnixAgent#490 |
c185999
to
c9adb80
Compare
OCSInventory-NG/UnixAgent@v2.10.1-MAC...v2.10.4
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.