Comment 3 for bug 2057885

Revision history for this message
Paul Mars (upils) wrote :

Since you showed versions of gpg/dirmngr did not change between the working and the buggy versions of ubuntu-image, I suspect this limitation (length of the path of the gpg temp dir) is not new in gnupg.

However, after looking into it I noticed that previously this directory was created in the /tmp folder of the building machine, so outside the chroot. When reworking the PPA handling I moved this path in the chroot to make the build process more self contained and avoid creating files/directories outside the workdir, and thus the path can be arbitrarily long depending on the workdir location. This is also safer in case several ubuntu-image builds run concurrently (but we could fix this by adding a random string in the temp dir name).

I will investigate more to understand if this was done by design in dirmngr or if we could raise this 100 char length limit.

As a temporary/half solution I can also rename the /tmp/ubuntu-image-gpg as /tmp/ui-gpg to be under 100 chars in your case. We loose a bit in readability but we do not really expect users to look into this dir anyway. We could also check the length of the path early and display an explicit error to avoid confusing users with this cryptic error.

In the end if no other solution is possible we could also revert this change and be sure it will always work.