-
Notifications
You must be signed in to change notification settings - Fork 34
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
Cross-compile arm releases & include insert-user in release #291
Conversation
22ea114
to
6d88458
Compare
(armel > armhf because better compatibility and hard to do both)
turns out even Raspberry Pi 1 supports armhf, also Raspbian packages are all armhf. refs: - rclone/rclone#5107 (comment)
this is ready for review! 🍰 here's some compiled releases: https://github.com/ahdinosaur/go-ssb-room/releases/tag/v2.1.0-pre.1 /cc @mhfowler |
# create a user to run the server as | ||
adduser --system --home /var/lib/go-ssb-room go-ssb-room | ||
chown go-ssb-room /var/lib/go-ssb-room | ||
|
||
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i stole these systemd script things from peachcloud/peach-package-builder who stole them from mmstick/cargo-deb 📦
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
however, they do change things such that the service starts automatically when installed (and is enabled to start on boot), as this is the usual behavior on Debian. if we follow this behavior, we should update the postinstall message to tell you to restart the service rather than reload daemon after making changes.
would there be a problem with the service first running with the wrong config, then changing it and restarting the service?
as a side note, we shouldn't be recommending updating services by writing to the systemd file directly, there's a whole built-in edit workflow with conf overrides and such that we should be doing: https://askubuntu.com/questions/659267/how-do-i-override-or-configure-systemd-services.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would there be a problem with the service first running with the wrong config, then changing it and restarting the service?
According to:
Before you start using room server via the systemd service, you need to at least change the https domain in the systemd service. |
The startup will fail? Maybe we can avoid automatically starting up & recommend the commands? Unsure what Debian does when installed packages need to be configured first? Or perhaps there is a standard way to ask for input here and then sed'in the relevant files / updating templated files? Just throwing out some options...
as a side note, we shouldn't be recommending updating services by writing to the systemd file directly, there's a whole built-in edit workflow with conf overrides and such that we should be doing: https://askubuntu.com/questions/659267/how-do-i-override-or-configure-systemd-services.
One for the docs I guess, can do here or let's open an issue to catch that another time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! I'm curious if it is possible to avoid the vagrant/vm requirement and instead use Docker? As far as I understand, you're using a Debian image & running a series of build commands which could be done with Docker?
🤷 i usually use Docker, but here i used Vagrant and had a lovely time. 😺 |
Thanks for this PR. I'd love to get it out in the near future and am doing a review now. I think the current change set needs a rebase, sorry for letting it sit for so long.
Would you be up for using Docker instead? I think I'd love to avoid having to work with Vagrant going forward because it assumes a workstation that has virtualisation wired up and sometimes that is a bit tricky / can be a barrier to working on this. We could wire up a Debian-based Dockerfile and acommpanying commands instead? I could do that or if you feel like it, please go for it. |
@decentral1se great, i'm happy for you to continue from where i left off, i'll be here on the sidelines if you need me. 😺 |
All credit goes to @ahdinosaur for this work. Follows ssbc#291.
hi, i'm keen for
go-ssb-room
on a Raspberry Pi. 🥧so i improved the release dev tools, using Vagrant (a friendly wrapper around VirtualBox).
open to feedback! 💜
related:
also now i see #266 and #241, happy to incorporate other changes as need be, could also cross-compile
armel
andarmhf
if need be.