OPNsense Forum

English Forums => Development and Code Review => Topic started by: Gauss23 on January 19, 2025, 12:21:37 PM

Title: Plugin not added to the firmware section of config.xml
Post by: Gauss23 on January 19, 2025, 12:21:37 PM
Hi everyone,

I'm in the process of helping to develop a Netbird plugin for OPNsense.
It actually works quite well already, as you can read here: https://github.com/netbirdio/netbird/issues/2200#issuecomment-2600784609

The plugin os-netbird is reported as misconfigured in the plugin section.

I discovered that the plugin is not registering in the firmware section in the config.xml, i.e.:
    <firmware version="1.0.1">
      <mirror/>
      <flavour/>
      <plugins>os-qemu-guest-agent</plugins>
      <type/>
      <subscription/>
      <reboot/>
    </firmware>

When adding the os-netbird after os-qemu-guest-agent, it is reported as installed.

What is the problem?
The plugin code is here:
https://github.com/moserpjm/opnsense-plugins/tree/stable/24.7/net/netbird

I assume it's just a small issue.

Thank you!
Title: Re: Plugin not added to the firmware section of config.xml
Post by: franco on January 21, 2025, 02:38:19 PM
> What is the problem?

There's no problem.  config.xml only registers plugins installed through the firmware GUI.


Cheers,
Franco
Title: Re: Plugin not added to the firmware section of config.xml
Post by: Gauss23 on January 22, 2025, 06:47:54 PM
Thanks Franco. The plugin is installed via the firmware UI. It's currently in on a custom repo, the plugin is the listed ready for installation, like the original plugins. But after installation it stays in the state of ,,misconfigured". Is this normal for plugins from custom repos?

I would like to add this plugin to the OPNsense plugin repo. What is needed to do so? Create a pull-request?

Kind regards,
Chris
Title: Re: Plugin not added to the firmware section of config.xml
Post by: Monviech (Cedrik) on January 22, 2025, 07:11:49 PM
Here are two recent examples how to add a plugin to the opnsense repo:

https://github.com/opnsense/plugins/pull/4348

https://github.com/opnsense/plugins/pull/4386