bluesky-social / pds

Bluesky PDS (Personal Data Server) container image, compose file, and documentation
Other
1.48k stars 134 forks source link

`installer.sh:10` usage of `uname` broken on MacOS / Apple Silicon #69

Open DrewMcArthur opened 5 months ago

DrewMcArthur commented 5 months ago

Running the installer script locally (for testing some things, not for real hosting) on an M2 MacBook, and getting this

uname: illegal option -- -
usage: uname [-amnoprsv]
installer.sh: line 11: lsb_release: command not found
installer.sh: line 12: lsb_release: command not found
ERROR: Sorry, only x86_64 and aarch64/arm64 are supported. Exiting...
Usage:
sudo bash installer.sh

Please try again.

This is because of line 10 in installer.sh, which is

PLATFORM="$(uname --hardware-platform || true)"

This yields

$ PLATFORM="$(uname --hardware-platform || true)"

uname: illegal option -- -
usage: uname [-amnoprsv]
$ echo $PLATFORM

$ 

--hardware-platform isn't an option supported by the uname on macs, i guess? but uname -m returns what you're expecting, which is arm64. So replacing that line with

PLATFORM="$(uname --hardware-platform || uname -m || true)"

still outputs the illegal option -- - lines, but sets the $PLATFORM variable correctly, allowing the script to continue.

DrewMcArthur commented 5 months ago

of course, the next lines (11 & 12) expect the platform to be debian, so this probably doesn't matter too much, hah. is there any specific reason I can't run a PDS locally on my mac, or in a docker image? just not supported? thanks!

bnewbold commented 5 months ago

You are totally welcome to run the PDS on a mac! Many of the core developers use macs for development (though I do not myself). I don't think there are too many quirks or differences. It's just docker under the hood.

For the "distribution" that we support in this repo, however, we only support a very specific and limited setup, intentionally. We don't have the technical bandwidth to support many similar-but-slightly-different setups (like FreeBSD, other linux distros, kubernetes, nomad, podman, arm64, etc, etc). In the long run, the way to have things run on many platforms will probably be to have community folks contribute write blog posts or HOWTOs/guides and have those show up in google searches!