- Package:
- software-properties-common
- Source:
- software-properties
- Submitter:
- Felix Stupp
- Date:
- 2021-01-24 13:15:02 UTC
- Severity:
- normal
The tool `add-apt-repository` does require the package `gnupg` to work
correctly. I tested this by running a Debian container using
Docker, installing `software-properties-common` and trying to use
`add-apt-repository`. I tried to add the repository
`ppa:andreasbutti/xournalpp-master`.
In addition, `add-apt-repository` does not exit with an exit code
unequal to 0 while raising an exception, this can be seen at the end of
the recording.
The error was:
```
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 688, in addkey_func
func(**kwargs)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 386, in add_key
return apsk.add_ppa_signing_key()
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 251, in add_ppa_signing_key
if not self._recv_key(
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 176, in _recv_key
res = subprocess.call(self.GPG_DEFAULT_OPTIONS + [
File "/usr/lib/python3.8/subprocess.py", line 340, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib/python3.8/subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'gpg'
```
I recorded a shell session with asciinema to allow you insight in how I
tested this. The recording is attached to this bug report, but this
recording can also be watched here: https://asciinema.org/a/HGoNlw5HuvoRnnQxecDmFqxSd
Hi, please find attached a patch. If Julian or nobody else objects or jumps in, I can NMU in about one week. Cheers, Bruno
Control: severity -1 normal old version that actually needs key server functionality (dirmngr and gnupg), and I absolutely do not want to depend on those. I also don't think this is a release critical bug - the script is not the main attraction, it does not produce immediate useful results on Debian anyway if you add a PPA, given that the PPAs do not exist for Debian in the first place, and other uses do not involve that codepath AFAIUI. Anyhow, this email was the first time I heard about this bug, and it did not provide any context (and I can't open attachments on my phone), so I was a bit unhappy, and I did not have a lot of time to dig into it yet. My advise for future NMU emails: Please keep the original bug subject in the subject, and quote the bug report so readers can make sense out of it without having to search for the bug in the BTS. We really ought to update software-properties to the Ubuntu 20.04 version rather than try to ship the 16.04 one - it's 5 years old by now. I have no idea what happened here that we're still on the old version, I did upload the 18.04 one to experimental 2 years ago. This also fixes this bug because it now talks to the keyserver directly, and drops the file into trusted.gpg.d. Generally, please: If I have not answered you for a month, your email was lost, if it's still a problem, please ping me.
Am Sonntag, dem 24.01.2021 um 10:38 +0100 schrieb Julian Andres Klode: Hi Julian, my apologies for the inconveniences. I must admit, I'm not a user of the script and didn't test it with and without the dependency. I only convinced myself that gpg is called and assumed the missing dependency is valid. I realize I don't understand enough of the package to fix anything by simply adding gpg to the dependency list and won't NMU. Cheers, Bruno