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

ocsinventory-agent: 2.10.1 -> 2.10.4 #351733

Merged

Conversation

anthonyroussel
Copy link
Member

@anthonyroussel anthonyroussel commented Oct 27, 2024

OCSInventory-NG/UnixAgent@v2.10.1-MAC...v2.10.4

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@anthonyroussel
Copy link
Member Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 351733


x86_64-linux

✅ 2 packages built:
  • ocsinventory-agent
  • ocsinventory-agent.devdoc

aarch64-darwin

✅ 2 packages built:
  • ocsinventory-agent
  • ocsinventory-agent.devdoc

Copy link
Contributor

@totoroot totoroot left a 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>

@anthonyroussel
Copy link
Member Author

anthonyroussel commented Oct 29, 2024

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:

Duplicate specification "R|remotedir=s" for option "r"
Duplicate specification "p|password=s" for option "p"

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.

@anthonyroussel
Copy link
Member Author

anthonyroussel commented Oct 29, 2024

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.

no_ignore_case configuration flag can be passed to Getopt::Long

EDIT: added the postPatch in this PR.

@anthonyroussel
Copy link
Member Author

PR opened upstream: OCSInventory-NG/UnixAgent#490

@ofborg ofborg bot requested a review from totoroot October 30, 2024 02:42
@anthonyroussel anthonyroussel force-pushed the update/ocsinventory-agent branch from c185999 to c9adb80 Compare November 3, 2024 17:27
@anthonyroussel anthonyroussel changed the title ocsinventory-agent: 2.10.1 -> 2.10.3 ocsinventory-agent: 2.10.1 -> 2.10.4 Nov 3, 2024
@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Nov 23, 2024
@anthonyroussel anthonyroussel merged commit 3585cfd into NixOS:master Nov 23, 2024
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 1-10 10.rebuild-linux: 1 11.by: package-maintainer This PR was created by the maintainer of the package it changes 12.approvals: 1 This PR was reviewed and approved by one reputable person
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants