Couldn't create temporary file /tmp/apt.conf.fsIutr for passing config to apt-key

Bug #1988145 reported by Heinrich Schuchardt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I tried to run
http://iso.qa.ubuntu.com/qatracker/milestones/438/builds/257552/testcases/1318/results

I downloaded http://cdimage.ubuntu.com/ubuntu-base/focal/daily/20220829.1/focal-base-riscv64.tar.gz

mkdir base
sudo tar -C base -zxf focal-base-riscv64.tar.gz
sudo mount --bind /proc base/proc
sudo mount --bind /sys base/sys
sudo mount --bind /dev base/dev
sudo mount --bind /dev/pts base/dev/pts
sudo cp /etc/resolv.conf base/etc/
sudo chroot base

apt-get update results in:

Get:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease [265 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease [114 kB]
Err:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease
  Couldn't create temporary file /tmp/apt.conf.fsIutr for passing config to apt-key
Err:2 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease
  Couldn't create temporary file /tmp/apt.conf.x7LQrB for passing config to apt-key
Get:3 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease [108 kB]
Err:3 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease
  Couldn't create temporary file /tmp/apt.conf.t2upW0 for passing config to apt-key
Get:4 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease [114 kB]
Err:4 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease
  Couldn't create temporary file /tmp/apt.conf.L2I28d for passing config to apt-key
Reading package lists... Done
W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal InRelease: Couldn't create temporary file /tmp/apt.conf.fsIutr for passing config to apt-key
E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease: Couldn't create temporary file /tmp/apt.conf.x7LQrB for passing config to apt-key
E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease: Couldn't create temporary file /tmp/apt.conf.t2upW0 for passing config to apt-key
E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal-security InRelease: Couldn't create temporary file /tmp/apt.conf.L2I28d for passing config to apt-key
E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal-security InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

As touch /tmp/apt.conf.fsIutr works without issues there must be a bug in how apt creates temporary files.

Tags: iso-testing
Revision history for this message
Heinrich Schuchardt (xypron) wrote :

Outside the chroot these are my mounts relevant for the test:

$ mount | grep /home
/dev/mapper/vgubuntu-home on /home type ext4 (rw,relatime)
proc on /home/user/temp/base/proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /home/user/temp/base/sys type sysfs (rw,nosuid,nodev,noexec,relatime)
udev on /home/user/temp/base/dev type devtmpfs (rw,nosuid,relatime,size=7940560k,nr_inodes=1985140,mode=755,inode64)
devpts on /home/user/temp/base/dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)

description: updated
Changed in apt (Ubuntu):
status: New → Invalid
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
https://iso.qa.ubuntu.com/qatracker/reports/bugs/1988145

tags: added: iso-testing
Revision history for this message
Julian Andres Klode (juliank) wrote :

Closing this as invalid. The analysis is flawed, the configuration file is created by user _apt, not root, the call is literally just mkstemp() with the path given in the error message, or rather a template, so there is no bug in apt here.

It's more likely to be wrong permissions on /tmp preventing the _apt user from creating files.

Revision history for this message
Heinrich Schuchardt (xypron) wrote :

Thanks for pointing at user _apt.

My /tmp is chmod 777 and mounted as
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime,inode64)

When I create the chroot directory in / which is chmod 755 I can execute the test case.

So I guess it is one of the mount options that is incompatible with the test case.

We need to update the test case and describe the requirements for successful execution-

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.