-
-
Notifications
You must be signed in to change notification settings - Fork 637
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
FreeBSD builds #199
Comments
@jmattheis What do you think? Should we add official support for this? |
@eternal-flame-AD Sure, why not (:. |
AFAIK Ubuntu does not seem to have a pre-built freebsd cross-compiler available. I think we need to build it from source manually. Right? @jmattheis |
So, I'm not a free bsd user but I've you said that free bsd supports linux binary compatibility, why not use this instead? Yeah, couldn't find a prebuilt cross compiler. |
@geeseven Does the linux binary work on your machine? |
Thanks for the timely replies. I was hoping to avoid Linux binary compatibility if possible. It seems like a workaround golang was designed to eliminate. That being said, I understand in the real world other issues crop up. If there is no tooling and y'all do not use FreeBSD, I think official support more or less just providing 'as is' binaries is not a good idea. If/when I get time, I will report back how I got gotify running on FreeBSD. |
I've recently deployed gotify on freeBSD based VPS without any issues, built without any hiccups. If that helps anybody |
Hey @barolo, glad to hear. Do you mind sharing details on what you did, as I have not had a chance to look into this further. |
Besides VPS specific stuff like setting paths [ it had to be compiled and installed in the user folder ] nothing much
in the ui folder:
in the main folder
[ I had to get packr, but just:
was enough ] then copy config.example.yml into config.yml [ changed port to what I needed ] and launch serwer, done. npm and go was already set up |
@barolo, thanks for the details. Did the ports versions of go and npm not work? Also do you mind sharing your rc.d script? |
@geeseven It's a VPS, I have no access to system or say in how it's set up, It was preconfigured by a hosting provider |
Interesting, sounds more like a shell account than a VPS. None the less, thanks for sharing. |
@geeseven It's something inbetween, on a shell account you can't usually binexec your own stuff. There's decent amount of configurability, myriad of dev tools of several versions and virtual environments for these [ It's also really cheap ] |
I have been toying with sourcehut's build tools to see if it could be used for FreeBSD builds. They not only offer Linux build hosts, but also FreeBSD, OpenBSD and even 9front. 😆 I was able to get a build to complete, but I get the following error after coping the binary off the build host:
Note, /health works, but /version gets weird:
I will post updates if I make anymore progress. |
Have a look at our build docs. Steps 2 and 3 are responsible for the ui: https://gotify.net/docs/build The version info will be populated via ldflags: Line 42 in 92a468b
|
I don't use FreeBSD as my primary OS (so I'm not quite as clued up on it as I'd like to be) but I have a server that uses it and I'd like to run gotify on that. I setup a new jail (to have a fresh environment of FreeBSD 11.4) and followed the documented build instructions. The instructions worked almost as-is without issue. I built gotify manually without docker or the makefile and only had to make two minor changes due to the default shell being csh rather than bash:
I now appear have a fully-functioning gotify server running on FreeBSD. I'd be happy to help trying to roll that out to the Release/CI build process. I haven't tried yet but I expect if I installed bash and went through the build process there it'd work without modification. |
Yeah, the problem is that there are no cross-compilers for freebsd. Thus, we cannot integrate this into the current build pipeline on travis-ci. |
Restic (encrypted backup utility written in Go) provides FreeBSD builds. Maybe one of their pipelines can give some insight in how to solve this? https://github.com/restic/restic/blob/master/.github/workflows/tests.yml |
Anyone has luck with recent build on Freebsd 14? I have currently yarn command run exception
|
Ignore above it was about puppeteer chromium download, can be skipped with env variable
|
I just wanted to create a package for FreeBSD and commit it into FreeBSD ports, but I see some problems. The packages that are used for the UI (package.json) are outdated and do not work with nodejs (version 2017.0) which is the standard nodejs version available on FreeBSD, while I write this post. It seems that at least Also the needs to be changed to:
But before I start with this, is there intereset to merge such modifications? I the gotify-server repository will compile, I could start next to create a port for FreeBSD. |
The is a arch build which works with the latest nodejs version, and also this repo uses node20 to build gotify/server. You are likely getting the error from this ticket #574, you can work around this by setting the env var #574 (comment) Feel free to try updating to the latest react-scripts version, I've tried this a couple of hours but you have to update much more than just react-scripts. |
Thanks @jmattheis, yes I think you are right. it will not only reacts-scripts that needs an update, but much more.
So it seem that I must tell react-script to skip tests. I never did something with react. |
You can probably remove all files from ./ui/src/tests, they are not needed for the prod build. |
Ok, I just patch the Generate the go binary. The next is now, that I must work a little bit on the configuration, but I think the hardest part is done. |
The package is currently in POC mode, but compilation works now and a package is generated: I will now start with testing and fine-tuning the package (this will maybe take most of the time ;) ). |
A simple selfhosted message service with nice UI and a client for Android. Thanks a lot for help I received here: gotify/server#199
I commited now a first version into the FreeBSD ports for gotify-server. @jmattheis what do you think about switch from react-scripts to vite? I think it will be much faster the the amount of work is I think equal. |
I support this, although the amount of work feels a lot to pull the whole front end to "modern ecosystem". |
Yeah, vite seems to be the standard now, and react-scripts isn't maintained anymore. |
ok, I have a first draft available. I will do some more tests, but at least on Windows it comiles and dev mode is also running. |
I just push gotify-cli as a port to the FreeBSD ports, so there is now also a package for this very soon available. I think we have a a good start point to work on all the other topics. I created already here an issue for the react-scripts migration: And here is a draft PR (will need some more work, but is a good start): If the migration to vite is done, we can also close this issue: |
Is your feature request related to a problem? Please describe.
I would like to run gotify on FreeBSD but there are not any FreeBSD builds.
Describe the solution you'd like
I would like to see FreeBSD builds for each release just like other OSes.
Describe alternatives you've considered
Linux binary compatibility or running a Linux bhyve virtual machine are workarounds.
Additional context
n/a
The text was updated successfully, but these errors were encountered: