Page 1 of 1

apt-key is deprecated

Posted: Mon Feb 20, 2023 9:18 am
by liblaf
The Linux deb package still uses

Code: Select all

apt-key add
to add keyring files. However, apt-key is deprecated. Keyring files should be managed in trusted.gpg.d instead (see apt-key(8)).

Re: apt-key is deprecated

Posted: Mon Feb 20, 2023 9:22 am
by liblaf
We should copy the keyring file to trusted.gpg.d ( or use the `install` command from coreutils ) instead.

Re: apt-key is deprecated

Posted: Mon Feb 20, 2023 9:49 am
by Alex
Hello,
I'm not a Linux expert. Could you please provide more details? For now, I don't even know what you're talking about :)

Re: apt-key is deprecated

Posted: Thu Feb 23, 2023 4:09 pm
by liblaf
If you open the freedownloadmanager.deb package as an archive and look into control.tar.xz > ./postinst, you will find something looks like:

Code: Select all

/usr/bin/apt-key add - >/dev/null 2>&1 <<PUBKEYDATA
-----BEGIN PGP PUBLIC KEY BLOCK-----
...
-----END PGP PUBLIC KEY BLOCK-----
PUBKEYDATA


The above script uses `apt-key` to add the public key. As far as I know, we should copy that key to `/etc/apt/trusted.gpg.d` instead of using `apt-key add`. For example:

Code: Select all

/usr/bin/gpg --dearmor --output /etc/apt/trusted.gpg.d/freedownloadmanager.gpg >/dev/null 2>&1 <<PUBKEYDATA
-----BEGIN PGP PUBLIC KEY BLOCK-----
...
-----END PGP PUBLIC KEY BLOCK-----
PUBKEYDATA


I'm not sure how the .deb package are packaged manually or automatically. But I feel this is not a very difficult problem to solve.

BTW, another more general distribution method is to package the application as an AppImage (though I'm not very familiar with it), which will enable FDM to run on almost all Linux distributions, not just Debian-based distros.

Re: apt-key is deprecated

Posted: Sun Feb 26, 2023 4:29 pm
by liblaf
Any progress?

Re: apt-key is deprecated

Posted: Mon Feb 27, 2023 6:54 pm
by Alex
Hello,
Thank you for the detailed description. We'll check it.
I'll provide you with more info as soon as I can.