NicoHood / GPGit

A shell script that automates the process of signing Git sources via GPG
MIT License
89 stars 10 forks source link

Add more detailed installing instructions for different OS #30

Closed NicoHood closed 2 years ago

NicoHood commented 3 years ago

See https://github.com/NicoHood/gpgit/pull/19#issuecomment-770510163 for Mac.

A detailed dependency list should be added.

NicoHood commented 3 years ago

@WoLpH can you please help again with the MacOS dependencies?

  1. I am using gnu awk, and the script seems to work for you. Is that because you set that as default or is there no other option than gnu awk available?

  2. When looking at the debian dependencies, can you maybe give me a hint what is missing for mac? I am not sure if such things as bash can be even installed with brew or can be considered installed with the brew package itself?

# Install dependencies
sudo apt-get install bash gnupg2 git tar xz-utils coreutils gawk grep sed util-linux
# Optional dependencies
sudo apt-get install gzip bzip lzip zstd file jq curl

Current Mac instructions. Please add everything that needs to be added.

# Install dependencies
brew install bash git xz awk grep gnu-sed gnu-getopt coreutils
# Optional dependencies
brew install gzip bzip2 lzip zstd jq curl
NicoHood commented 3 years ago

I noticed, that file and tar are not available in brew. How to get that?

Would you install gnupg@2.2 or do you get that from somewhere else?

Do you need gnu-sed or is the builtin sed sufficient?

wolph commented 2 years ago
  1. I am using gnu awk, and the script seems to work for you. Is that because you set that as default or is there no other option than gnu awk available?

I'm actually using the regular system awk and I don't even have gnu-awk installed. So I don't think you have to worry about that. Most unix systems should have tools such as awk, grep, sed, file, etc. installed by default.

  1. When looking at the debian dependencies, can you maybe give me a hint what is missing for mac? I am not sure if such things as bash can be even installed with brew or can be considered installed with the brew package itself?

Current Mac instructions. Please add everything that needs to be added.

# Install dependencies
brew install bash git xz gnu-getopt coreutils
# Optional dependencies
brew install lzip zstd jq curl

The big issue is that I'm not testing from a clean system so it's slightly tricky to find out which packages are stock and which aren't. I know that bash is definitely one you need to install manually because apple replaced bash with zsh a few years ago.

In any case, I expect the command above to work correctly. I should note that curl is also bundled so that might not be needed either.

I noticed, that file and tar are not available in brew. How to get that?

Most standard unix tools are available by default so you generally don't have to worry about that. The only issue is with gnu specific extensions.

Both file and tar are provided by the system, but I'm not sure if they're 100% compatible. So far I haven't seen any issues with them however. The only issues I have seen were with date and getopt.

Would you install gnupg@2.2 or do you get that from somewhere else?

Getting GPG to work is a bit of a pain in my experience, so I usually use GPG Suite: https://gpgtools.org/ It can be installed through brew as well: brew install --ask gpg-suite

Do you need gnu-sed or is the builtin sed sufficient?

With regards to sed, same story. As long as you don't use any gnu-only features of sed there shouldn't be any need for gnu-sed. I generally just use the BSD sed and I haven't seen any compatibility issues for the little sed replacements that I do on my system daily.

NicoHood commented 2 years ago

Thanks for clarifying!

Last Question: Why --ask?

wolph commented 2 years ago

Sorry, missed a character there. It should be --cask which is a binary package

NicoHood commented 2 years ago

Should I add this parameter to the other commands as well?

wolph commented 2 years ago

No, it's only relevant for that one.

Casks are for automating fully packaged installers. Bottles are pre-build source packages (the default). If no bottle is available for a source package, it is automatically built.

The lists can be found here: https://formulae.brew.sh/

wolph commented 2 years ago

Actually, I just noticed that it's not needed anymore apparently. If a package doesn't have a source package available it will automatically fall back to a cask so that should work fine without the parameter.