My company has a debian repository which has new gpg keys. We want to generate new package versions which add these keys to /etc/apt/trusted.gpg.d. The caveat is that we only want to add those in that specific version, meaning that we won't add the keys in subsequent versions. This causes the issue of not being able to just put it in that folder in the debian package, since the keyring will be deleted in the next version.
Our approach is to have that file in a random folder, which we then copy to the correct folder ( /etc/apt/trusted.gpg.d ) in the postinst script. My question is, what random folder should that be? Is it correct to place the keys in the /tmp folder?
I noticed the spotify-client package does a similar thing, it has the keys in /usr/share/spotify/apt-keys and then copies it to /etc/apt/trusted.gpg.d. I'm not sure if this is the correct folder to place it though