preinst check for kernel release > 255 no longer needed

Bug #1962606 reported by Nic Doye
74
This bug affects 12 people
Affects Status Importance Assigned to Milestone
glibc (Debian)
Unknown
Unknown
glibc (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

When running in docker in (for example) AWS CodeBuild, the output from `uname -r` can include kernel version that the debhelper.in/libc.preinst (lines 140-152) dislikes when you upgrade `libc6`.

Debian claim to have removed the offending section in glibc/2.31-14. See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=987266

Please can we have this fix ported into 20.04 Focal?

Full Error:
-----------------------------------------------------------------------
ERROR: Your kernel version indicates a revision number
of 255 or greater. Glibc has a number of built in
assumptions that this revision number is less than 255.
If you\'ve built your own kernel, please make sure that any
custom version numbers are appended to the upstream
kernel number with a dash or some other delimiter.

dpkg: error processing archive /var/cache/apt/archives/libc6_2.31-0ubuntu9.7_amd64.deb (--unpack):
new libc6:amd64 package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/libc6_2.31-0ubuntu9.7_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
-----------------------------------------------------------------------
# lsb_release -rd
Description: Ubuntu 20.04.4 LTS
Release: 20.04

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in glibc (Ubuntu):
status: New → Confirmed
Revision history for this message
Jing Zhang (domzjing) wrote :

It impacts Bionic(public.ecr.aws/lts/ubuntu:18.04_stable) on AWS CodeBuild also.

Revision history for this message
Chenghao Pan (pch4115209) wrote (last edit ):

Update:

Retried this morning, and the issue seems to be fixed.

Thanks!

-----------------------------------------------------------------------------------------------------------------------------------------------------------
It impacts docker build with an image of public.ecr.aws/lts/ubuntu:20.04_candidate on AWS CodeBuild.

Please see full error output:
```
Preparing to unpack .../libc6_2.31-0ubuntu9.7_amd64.deb ...
ERROR: Your kernel version indicates a revision number
of 255 or greater. Glibc has a number of built in
assumptions that this revision number is less than 255.
If you\'ve built your own kernel, please make sure that any
custom version numbers are appended to the upstream
kernel number with a dash or some other delimiter.

dpkg: error processing archive /var/cache/apt/archives/libc6_2.31-0ubuntu9.7_amd64.deb (--unpack):
 new libc6:amd64 package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/libc6_2.31-0ubuntu9.7_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
```

Revision history for this message
Pietro Dalpane (pietrod) wrote :

Same happening to me with the below

Preparing to unpack .../libc6_2.27-3ubuntu1.5_amd64.deb ...
ERROR: Your kernel version indicates a revision number
of 255 or greater. Glibc has a number of built in
assumptions that this revision number is less than 255.
If you\'ve built your own kernel, please make sure that any
custom version numbers are appended to the upstream
kernel number with a dash or some other delimiter.

Revision history for this message
John Park (johndouglaspark) wrote :

This issue is also affecting arm64 Focal

Preparing to unpack .../libc6_2.31-0ubuntu9.7_arm64.deb ...
ERROR: Your kernel version indicates a revision number
of 255 or greater. Glibc has a number of built in
assumptions that this revision number is less than 255.
If you\'ve built your own kernel, please make sure that any
custom version numbers are appended to the upstream
kernel number with a dash or some other delimiter.

dpkg: error processing archive /var/cache/apt/archives/libc6_2.31-0ubuntu9.7_arm64.deb (--unpack):
 new libc6:arm64 package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/libc6_2.31-0ubuntu9.7_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Theepag (theepag) wrote :

Hi people, Anyone knows how to solve this issue?

Revision history for this message
Erik Bročko (ericek111) wrote :

You can work around the issue by modifying the .deb (unpack, remove the check, repack).

    $ mkdir -p new old/DEBIAN
    $ dpkg-deb -x /var/cache/apt/archives/libc6_*.deb old/
    $ dpkg-deb -e /var/cache/apt/archives/libc6_*.deb old/DEBIAN
    $ nano old/DEBIAN/preinst # remove "exit 1" in the `if [ "$kernel_rev" -ge 255 ]` block around line 150
    $ dpkg-deb -Z xz -b old/ new/
    $ dpkg -i new/*.deb

This worked for me on Ubuntu Touch on Android.

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.