[lucid] /var/lib/dpkg/tmp.ci/preinst: 399: arithmetic expression: expecting EOF: "3.0-0-generic"

Bug #802985 reported by Marcin Juszkiewicz
42
This bug affects 5 people
Affects Status Importance Assigned to Milestone
debootstrap (Ubuntu)
Invalid
High
Unassigned
Hardy
Invalid
Undecided
Unassigned
Lucid
Invalid
Undecided
Unassigned
Maverick
Invalid
Undecided
Unassigned
Natty
Invalid
Undecided
Unassigned
eglibc (Ubuntu)
Invalid
Undecided
Unassigned
Hardy
Invalid
High
Unassigned
Lucid
Won't Fix
High
Unassigned
Maverick
Invalid
High
Unassigned
Natty
Invalid
High
Unassigned

Bug Description

Creating 'lucid' chroot is not possible under oneiric due to code which check for kernel version and bails out when 3.0 kernel is used on host machine:

15:19 hrw@puchatek:chroots$ sudo chroot /home/hrw/HDD/devel/chroots/lucid-clean dpkg --force-depends --install /var/cache/apt/arch
ives/libc6_2.11.1-0ubuntu7_amd64.deb
(Reading database ... 344 files and directories currently installed.)
Unpacking libc6 (from .../libc6_2.11.1-0ubuntu7_amd64.deb) ...
[: 399: Illegal number: 3.0-0-generic
/var/lib/dpkg/tmp.ci/preinst: 399: arithmetic expression: expecting EOF: "3.0-0-generic"
dpkg: error processing /var/cache/apt/archives/libc6_2.11.1-0ubuntu7_amd64.deb (--install):
 subprocess new pre-installation script returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/libc6_2.11.1-0ubuntu7_amd64.deb

Tags: patch lucid
Revision history for this message
Colin Watson (cjwatson) wrote :

While we could SRU this, it won't be much use until we fix debootstrap to be able to handle fetching packages from multiple suites (i.e. lucid + lucid-updates). Until then, perhaps an LD_PRELOAD wrapper to lie about uname() might be a workaround ...

Changed in debootstrap (Ubuntu):
status: New → Triaged
importance: Undecided → High
Colin Watson (cjwatson)
Changed in debootstrap (Ubuntu Hardy):
status: New → Invalid
Changed in debootstrap (Ubuntu Lucid):
status: New → Invalid
Changed in debootstrap (Ubuntu Maverick):
status: New → Invalid
Changed in debootstrap (Ubuntu Natty):
status: New → Invalid
Changed in eglibc (Ubuntu):
status: New → Invalid
Changed in eglibc (Ubuntu Hardy):
importance: Undecided → High
status: New → Triaged
Changed in eglibc (Ubuntu Lucid):
importance: Undecided → High
status: New → Triaged
Changed in eglibc (Ubuntu Maverick):
importance: Undecided → High
status: New → Triaged
Changed in eglibc (Ubuntu Natty):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Enrique Hernández Bello (ehbello) wrote :

I attach a patch for /usr/share/debootstrap/gutsy to support fake-uname wrapper[1] for LD_PRELOAD and workaround this problem.

# HOWTO #

Compile fake-uname.so as shown here:
$ gcc -shared -fPIC uname.c -o /usr/local/lib/fake-uname.so -ldl

(-ldl parameter at last of command line is important)
(fake-uname.so at /usr/local/lib is also important according to following patch)

Patch /usr/share/debootstrap/gutsy:
$ sudo patch -p0 fake-uname_support.patch

Use debootstrap with UTS_RELEASE variable like:
$ UTS_RELEASE=2.6.32 debootstrap lucid target_dir/

[1]http://www.developpez.net/forums/d466836/systemes/linux/systeme/changer-version-kernel-dynamiquement-chroot/#post2815469

Revision history for this message
Enrique Hernández Bello (ehbello) wrote :
tags: added: patch
Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

This debdiff contains fake-uname.so source code (modified to to not use /usr/src/linux and to be buildable under oneiric) and installation + ubuntu scripts changes.

But I do not know is it ready for release because there is no license for source, and package became arch related.

Revision history for this message
Colin Watson (cjwatson) wrote :

I'm not at all happy with actually uploading debootstrap to Ubuntu with such a uname hack. I only suggested it for local use, not for upload to Ubuntu.

The correct (but harder) fix to debootstrap is to have it be able to fetch packages from lucid and lucid-updates at once.

Revision history for this message
Colin Watson (cjwatson) wrote :

This shouldn't be a problem for the time being because Oneiric now has a three-digit kernel version again (as of the 3.0.0-4 ABI), so upgrade to that. It will no doubt become a problem again in the future, so I'm leaving this bug open.

Revision history for this message
Kev (ukev) wrote :

I did just run into this issue while creating an LXC container with ubuntu 10.04 LTS in arch linux:

Unpacking libc6 (from .../libc6_2.11.1-0ubuntu7_amd64.deb) ...
[: 399: Illegal number: 3.0-ARCH
/var/lib/dpkg/tmp.ci/preinst: 399: arithmetic expression: expecting EOF: "3.0-ARCH"
dpkg: error processing /var/cache/apt/archives/libc6_2.11.1-0ubuntu7_amd64.deb (--install):
 subprocess new pre-installation script returned error exit status 2

That means that I can't use lucid in the container at the moment which really is a big bummer.
A solution must be found. Now.

Any suggests?

Revision history for this message
JC Hulce (soaringsky) wrote :

This bug affects Ubuntu 10.10, Maverick Meerkat. Maverick has reached end-of-life and is no longer supported, so I am closing the bugtask for Maverick. Please upgrade to a newer version of Ubuntu.
More information here: https://lists.ubuntu.com/archives/ubuntu-announce/2012-April/000158.html

Changed in eglibc (Ubuntu Maverick):
status: Triaged → Invalid
Revision history for this message
dino99 (9d9) wrote :
Changed in eglibc (Ubuntu Hardy):
status: Triaged → Invalid
Changed in eglibc (Ubuntu Natty):
status: Triaged → Invalid
Revision history for this message
Rolf Leggewie (r0lf) wrote :

lucid has seen the end of its life and is no longer receiving any updates. Marking the lucid task for this ticket as "Won't Fix".

Changed in eglibc (Ubuntu Lucid):
status: Triaged → Won't Fix
Revision history for this message
dino99 (9d9) wrote :

that error has not been reported with recent version; so closing it now

Changed in debootstrap (Ubuntu):
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

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