jaredhendrickson13 / pfsense-api

The missing REST and GraphQL API package for pfSense
https://pfrest.org/
Apache License 2.0
689 stars 106 forks source link

Issue : API install for pfSense plus (arm64) #239

Closed Augustin987 closed 2 years ago

Augustin987 commented 2 years ago

Describe the bug When i try to install pfSense API for pfSense plus v22.01 on arm64 architecture, i get the error : "pkg : wrong architecture : FreeBSD:12:amd64 instead of FreeBSD:12:aarch64"

To Reproduce Steps to reproduce the behavior:

  1. Download package for pfSense plus v22.01 : https://github.com/jaredhendrickson13/pfsense-api/releases/latest/download/pfSense-22.01-pkg-API.txz
  2. Start install : "pkg add pfSense-22.01-pkg-API.txz"
  3. See error

Expected behavior The package should install without error on arm64 architecture

Screenshots or Response "pkg : wrong architecture : FreeBSD:12:amd64 instead of FreeBSD:12:aarch64"

pfSense Version & Package Version:

Bypass the error Steps to bypass the error:

  1. Download package for pfSense plus v22.01 : https://github.com/jaredhendrickson13/pfsense-api/releases/latest/download/pfSense-22.01-pkg-API.txz
  2. Open files "+MANIFEST" and "+COMPACT_MANIFEST"
  3. Replace "FreeBSD:12:amd64" with "FreeBSD:12:aarch64" in both files
  4. Start install : "pkg add pfSense-22.01-pkg-API.txz"
jaredhendrickson13 commented 2 years ago

Hey!

This would be expected behavior at the moment. I actually wasn't aware pfSense Plus ran on ARM so I'm assuming this is exclusive to Netgate appliances, which I do not own. If that's not the case, please let me know.

Otherwise, to be brief, I don't have a build system that can build an ARM-based package currently, and I don't have access to an ARM-based pfSense instance to test the package going forward. So it would technically be considered unsupported at the moment. If they ever release a publicly available version of pfSense on ARM I could start supporting it. In the meantime, I will update documentation to reflect this.

There may be an quicker workaround though. You can try to force the the package to install:

pkg add -f https://github.com/jaredhendrickson13/pfsense-api/releases/latest/download/pfSense-22.01-pkg-API.txz && /etc/rc.restart_webgui

I do know that doing so will prevent you from updating the API within the UI or using pfsense-api command line tool, so you would need to manually uninstall and reinstall the package from the command line with pkg anytime you need to update the package. Other than that, I'm not aware of any architecture dependent components of the API, so this should work without issues. But as I mentioned I don't have a ARM-based pfSense instance to verify that.

Hope this helps.

Thanks!

robindbe commented 1 year ago

Hi Jared,

I stumbled upon this, and just as confirmation, I have an ARM machine and forced installed the API and it works just as expected (except for the CLI commands as you mentioned). Tested with some basic alias GET and PUT commands.

VebjornRiiser commented 1 year ago

For anyone else looking for this i just want to say i did some basic tests with version 22.05 - Netgate 2100 and this still works

jwfox5150 commented 1 year ago

Confirming that pkg add -f still installs pfsense-api (v1.6.0) correctly on a Netgate 2100 running 23.01.