tempfile command removed from debianutils
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
boost1.74 (Ubuntu) |
Invalid
|
Wishlist
|
Unassigned | ||
bzip2 (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
ceph (Ubuntu) |
Won't Fix
|
Wishlist
|
Unassigned | ||
grub-legacy-ec2 (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Error when do-release-upgrade -d from 20.04.3
ProblemType: Package
DistroRelease: Ubuntu 22.04
Package: linux-image-
ProcVersionSign
Uname: Linux 5.4.0-90-generic x86_64
ApportVersion: 2.20.11-0ubuntu73
Architecture: amd64
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/by-path', '/dev/snd/
CasperMD5CheckR
Date: Mon Nov 22 13:31:36 2021
ErrorMessage: run-parts: /etc/kernel/
InstallationDate: Installed on 2018-10-01 (1147 days ago)
InstallationMedia: Ubuntu-Server 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig'
Lsusb:
Bus 001 Device 002: ID 8087:07e6 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Lsusb-t:
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/8p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
MachineType: PAIQ EC3-BT19D4L
ProcFB: 0 i915drmfb
ProcKernelCmdLine: BOOT_IMAGE=
Python3Details: Error: command ['readlink', '-f', "/usr/bin/which: this version of `which' is deprecated; use `command -v' in scripts instead.
PythonDetails: N/A
RebootRequiredPkgs: Error: path contained symlinks.
RelatedPackageV
RfKill: Error: [Errno 2] No such file or directory: 'rfkill'
SourcePackage: grub-legacy-ec2
Title: package linux-image-
UpgradeStatus: Upgraded to jammy on 2021-11-22 (0 days ago)
dmi.bios.date: 02/28/2017
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 5.6.5
dmi.board.
dmi.board.name: EC3-BT19D4L
dmi.board.vendor: PAIQ
dmi.board.version: A1
dmi.chassis.
dmi.chassis.type: 3
dmi.chassis.vendor: To Be Filled By O.E.M.
dmi.chassis.
dmi.modalias: dmi:bvnAmerican
dmi.product.family: To be filled by O.E.M.
dmi.product.name: EC3-BT19D4L
dmi.product.sku: 18:19:28
dmi.product.
dmi.sys.vendor: PAIQ
Related branches
- Miriam España Acebal (community): Approve
- Canonical Server packageset reviewers: Pending requested
- git-ubuntu import: Pending requested
-
Diff: 82 lines (+15/-7)3 files modifieddebian/changelog (+8/-0)
debian/grub-legacy-ec2.postrm (+2/-2)
debian/update-grub-legacy-ec2 (+5/-5)
summary: |
- package linux-image-5.13.0-19-generic 5.13.0-19.19 failed to - install/upgrade: run-parts: /etc/kernel/postinst.d/x-grub-legacy-ec2 - exited with return code 127 + tempfile command removed from debianutils |
tags: |
added: server-todo removed: server-next |
tags: | added: bitesize |
Changed in ceph (Ubuntu): | |
assignee: | nobody → Miriam España Acebal (mirespace) |
Changed in grub-legacy-ec2 (Ubuntu): | |
assignee: | nobody → Miriam España Acebal (mirespace) |
Changed in ceph (Ubuntu): | |
assignee: | Miriam España Acebal (mirespace) → nobody |
Thanks for taking the time to report this bug and trying to make Ubuntu better.
This seems to be a bug indeed. From the upgrade logs we can see:
/etc/kernel/ postinst. d/x-grub- legacy- ec2: update- grub-legacy- ec2: line 494: tempfile: command not found postinst. d/x-grub- legacy- ec2 exited with return code 127 5.13.0- 19-generic (--configure): 5.13.0- 19-generic package post-installation script subprocess returned error exit status 1
Searching for GRUB installation directory ... found: /boot/grub
/usr/sbin/
run-parts: /etc/kernel/
dpkg: error processing package linux-image-
installed linux-image-
The important part here is the "tempfile: command not found". The tempfile command was removed from debianutils package in version 5.0, and during the do-release-upgrade run it was upgraded from version 4.9.1 (Focal) to version 5.5-1 (Jammy). The debianutils package was upgraded before linux-image- 5.13.0- 19-generic: 5.13.0- 19.19 and then when the linux-image postinst triggered the execution of /usr/sbin/ update- grub-legacy- ec2 you got the crash because this script still relies on the tempfile command.
In order to do not break upgrades from Focal to Jammy we need to make the update- grub-legacy- ec2 script in src:grub-legacy-ec2 use likely "mktemp" instead of "tempfile". A bonus point would be to avoid using the "which" command (probably use "command -v") since it was already deprecated in debianutils version 5.0 and should be removed in the future.