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
Include python3 metapackage #7411
Comments
We do offer a python3 link to the appropriate binary. Does that not suffice? If you need to depend on specific Python patches the plugin framework can fill the Python version used. Cheers, |
Interesting, |
Looking for a package? just look for the „binary“:
|
I don’t think I’m getting your point:
So, if I’m building a custom package (with a custom toolchain, which generates a |
I would just take it as a given fact when operating on OPNsense. The core package is mandatory (pkg vital flag even). As I said all the scripting relies on that python3 link to be set. |
Just reading your question again it would be beneficial to check out how plugins are built as it would probably answer most of your upcoming questions regarding how to integrate something. |
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
Is your feature request related to a problem? Please describe.
Python packages on FreeBSD include both the major and minor version in the package name, allowing multiple versions of Python (say, 3.5 and 3.9) to be installed alongside each other, as
python35
andpython39
are different packages rather than different versions of the same package.Packages which require any minor version of Python 3 can specify
python3
as a dependency, which is a meta-package and will always depend on the Python package for a reasonably current version (python39
for FreeBSD 13).As of 24.1, OPNsense includes
python39
but thepython3
meta-package is not installed and not available from the repository.When developing additional packages (e.g. upcoming plug-ins), this means I have to prepare a different binary package (
.pkg
) for each Python version available for that system, effectively for every new OPNsense release. In order to install on OPNsense 24.1, the package needs to depend onpython39
whereas on OPNsense 24.7 this dependency cannot be satisfied (or will result in the parallel installation of a second Python version, depending on what is available from the repo) and the.pkg
needs to be updated to depend onpython311
.Describe the solution you like
I would like the OPNsense repo to include
python3
, so packages that require Python 3 without being particularly picky about a particular minor version can just state that as their dependency. That package can probably be taken from upstream OpenBSD without any modification.Describe alternatives you considered
make package
and makefile to pull in the correct dependency and build the .pkg accordingly. Downsides: this would require me to use a particular toolchain and build on a particular version of a particular OS (whereas now, as long as my package contains no binary code but, say, just scripts and config files, I could use any toolchain I want and even build it on a totally different OS, such as Linux or Cygwin on Windows). Also, I would still need to provide a different .pkg for each version of OPNsense.python3
instead ofpython39
orpython311
). Up to you guys, but I fully understand if you don’t want to maintain this discrepancy from upstream forever.python3
metapackage will solve the issue just as well.python39 OR python311
. This would be the way to go for dependencies which are in fact genetically unrelated but nonetheless drop-in replacements for each other (such ascurl OR wget
), but it is unlikely to happen overnight, if at all. For packages which are just different versions of the same code base but have distinct names in order to allow different versions to coexist, I would then need to provide an exhaustive list of all possible names (python30 OR python31 OR ... OR python311
, though any later version will still require me to adapt the package), and upstream will rightfully point out that they already have a solution (in this case, thepython3
metapackage).Additional context
There may be other metapackages in upstream to which the same considerations apply – basically any metapackage which is not in the OPNsense repo but its dependencies are.
The text was updated successfully, but these errors were encountered: