Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
Development and Code Review
(Moderator:
fabian
) »
[SOLVED] Adding package(s) dependencies for plugins?
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Adding package(s) dependencies for plugins? (Read 5605 times)
ndejong
Newbie
Posts: 18
Karma: 0
[SOLVED] Adding package(s) dependencies for plugins?
«
on:
August 10, 2018, 06:12:40 pm »
Hi,
We are in the process of writing another OPNsense plugin that requires an additional standard FreeBSD distribution package, namely autossh.
Have done dirty hacks in the past by manually pulling in packages from the FreeBSD repo and installing manually when those packages are not available via the opnsense repo but this is surely not the right thing to be doing.
What is the correct way (if any) to add package dependencies to a plugin? If anyone could point to other plugin examples that handle any part this that would be great.
Thanks in advance.
N
«
Last Edit: August 12, 2018, 08:54:47 pm by franco
»
Logged
mimugmail
Hero Member
Posts: 6766
Karma: 494
Re: Adding package(s) dependencies for plugins?
«
Reply #1 on:
August 10, 2018, 06:33:32 pm »
Ask in GitHub/Tools for a pkg
Logged
WWW:
www.routerperformance.net
Support plans:
https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German):
https://opnsense.max-it.de/
franco
Administrator
Hero Member
Posts: 17661
Karma: 1611
Re: Adding package(s) dependencies for plugins?
«
Reply #2 on:
August 11, 2018, 01:50:11 pm »
Yep... thanks for the ticket. We'll have this up in 18.7.2 because 18.7.1 is currently being prepared.
Cheers,
Franco
Logged
franco
Administrator
Hero Member
Posts: 17661
Karma: 1611
Re: Adding package(s) dependencies for plugins?
«
Reply #3 on:
August 12, 2018, 08:54:32 pm »
I assumed that the package was missing, not remembering we added it over three years ago already:
https://github.com/opnsense/tools/commit/22f90aa
Cheers,
Franco
Logged
ndejong
Newbie
Posts: 18
Karma: 0
Re: [SOLVED] Adding package(s) dependencies for plugins?
«
Reply #4 on:
August 13, 2018, 02:26:15 pm »
Urgh - this is embarrassing
Franco, thank you for taking the time in responding both here and the ticket, it is entirely my fault.
To help others hopefully not make the same mistake:-
- packages on the OPNsense host listed under System > Firmware > Packages are those packages that are currently installed, not those that "can be" installed as per the Plugins. It's silly that I made this mistake, it seems so obvious but this is indeed what led me astray to begin with.
- packages listed under
https://github.com/opnsense/tools/blob/master/config/
[release]/ports.conf are not in alphabetical order, they are prefixed by their package-subpath. I know looked here myself before placing the ticket but neglected to do a simple string search to find autossh further down the file.
Good news, there is nothing required to be done :/
Thanks again Franco - will make up for it by making sure the promised Autossh plugin gets completed and submitted for review.
N
Logged
franco
Administrator
Hero Member
Posts: 17661
Karma: 1611
Re: [SOLVED] Adding package(s) dependencies for plugins?
«
Reply #5 on:
August 14, 2018, 01:54:03 pm »
Hi N,
No worries at all.
It's true that packages in the GUI only show what is installed. We decided against allowing to manually install+click packages there not knowing what it would do to user installations and they would have to go to the command line to configure them anyway. So the idea was to use plugins to pull in the packages automatically and provide a GUI way to deal with them.
You can also query all available binary packages from the command line:
# pkg rquery "%n-%v: %c"
Cheers,
Franco
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
Development and Code Review
(Moderator:
fabian
) »
[SOLVED] Adding package(s) dependencies for plugins?