I need more help for setting up the development environment
I have switched from Mac OS to Asahi Linux and want to contribute.
So far, I have tried to follow the README. This is my progress:
-
I have cloned the repo into a folder
-
I have installed pnpm, age, sops and asdf on my system (Fedora arm64). Since sops and asdf are not available on the repo, I had to run some remote scripts with curl, which I didn't feel very confident to do. I wish it was not necessary, or at least explicitly stated in our Readme.
-
pnpm decrypt
does not work. It expects a key at/home/flupsi/.config/sops/age/keys.txt
but there is nothing. -
Then I was not sure if I should actually install age, node and sops via asdf. This would make more sense because it would respect the .tool-versions declaration.
-
I have found a guide for installing the node plugin for asdf.
-
asdf install
complains about age, sops and pnpm plugin not being installed. -
I creatively tried out
asdf plugin add age
etc., and surprisingly it works. -
Now, when I
asdf install
, it successfully downloads the correct versions of age, sops, node and pnpm. -
I wonder whether I now have two conflicting versions of pnpm, age and sops on my system. Just hope that the one specified in .tool-versions is used... continuing.
-
pnpm decrypt still does not work. So... probably I need to do something. In the readme, there is a link to a lengthy text about sops. Let's see if that will help.
-
Aha! Here we have the
asdf plugin
commands. -
And then we need to generate a key apparently.
A weird error appears. Is it bad? Is it ok? The bash execution seems to end both in error AND success. What a mystery!
flupsi@asahi:~/web$ export XDG_CONFIG_HOME=$HOME/.config flupsi@asahi:~/web$ mkdir -p $XDG_CONFIG_HOME/sops/age flupsi@asahi:~/web$ age-keygen -o $XDG_CONFIG_HOME/sops/age/keys.txt /home/flupsi/.asdf/lib/commands/command-exec.bash: line 28: /home/flupsi/.asdf/installs/age/1.0.0/bin/age-keygen: cannot execute binary file: Exec format error /home/flupsi/.asdf/lib/commands/command-exec.bash: line 28: /home/flupsi/.asdf/installs/age/1.0.0/bin/age-keygen: Success
-
The file has not been created. Damn. Let's see if Google can assist with finding the cause of the "Exec format error"...
-
"Typically the cause is running an executable on the wrong architecture - if you try to run x86 executables on an ARM CPU, this message comes up." Thank you Google!
-
But why would asdf install a non-arm64 binary on my PC? And what can I do to remedy this?
-
One solution: rebooting into Mac OS and copying the
sops/age/keys.txt
- hoping I can find it (on MacOS I used brew to install everyhing, which has different conventions than Linux I think) ...Another solution: re-read all the descriptions to find out if I missed something. Third solution: ask Jon to send me the keys.txt via safe file transfer?
CONCLUSION:
I have spent several hours trying to set up my machine, and I feel I'm nowhere close. I also feel like an idiot because I know I have set the very same thing up already twice, on my MacOS install. So it shouldn't be so hard to do the same on Linux on the identical PC (Macbook Air M1 2020). I am forgetful with these tech things.
I wish to have a step-by-step guide for setting up my development environment. It would simply be a list of commands with short descriptions. All links would be optional! I don't want to read 10-page manuals for each software package we use. I will forget everything about age and sops anyways. I'm thinking arch linux wiki. Whenever I wanted to do anything on arch linux, there was a precise and super easy to follow step by step guide on wiki.archlinux.org. I want this for our project. For Linux and perhaps MacOS. Initial setup should take 10 minutes max.
Or we cut the whole key stuff and just work with public files and public directus endpoints? I faintly remember that was an idea you once had, @yala, right?