snwh / ubuntu-post-install

A set of post-installation shell scripts for Ubuntu
GNU General Public License v3.0
694 stars 285 forks source link

save repository signing keys in right location for apt #18

Open pm-b opened 6 years ago

pm-b commented 6 years ago

The function add_apt_repo is used for download_sublime, which is needed for install sublime_text. In order to download the package, the GPG key is downloaded from the Sublime website and added to a new keyring using apt-key. To get apt to use this keyring, it should be saved in /etc/apt/trusted.gpg.d/.

snwh commented 6 years ago

Well you can remove this entire section --keyring /etc/apt/trusted.gpg.d/${4}.gpg if that's the case

pm-b commented 6 years ago

You're right. Since the script originally included --keyring ${4}.gpg I assumed you preferred to save the key in a separate file. I would prefer putting it in /etc/apt/trusted.gpg.d/, as it matches the way third party repositories are usually stored in /etc/apt/sources.list.d/.

The added benefits of using separate files for third party software is that it allows for more configuration using apt, while allowing less experienced users to remove these repos by simply deleting the files, instead of having to use specific apt commands.

snwh commented 6 years ago

I would prefer it too but it seems that it doesn't work. I have the same issue with Sublime repo