Ubuntu

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

Reported by Marcin Juszkiewicz on 2011-06-28
42
This bug affects 5 people
Affects Status Importance Assigned to Milestone
debootstrap (Ubuntu)
High
Unassigned
Hardy
Undecided
Unassigned
Lucid
Undecided
Unassigned
Maverick
Undecided
Unassigned
Natty
Undecided
Unassigned
eglibc (Ubuntu)
Undecided
Unassigned
Hardy
High
Unassigned
Lucid
High
Unassigned
Maverick
High
Unassigned
Natty
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

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) on 2011-06-28
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

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

tags: added: patch
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.

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.

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.

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?

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
dino99 (9d9) wrote :
Changed in eglibc (Ubuntu Hardy):
status: Triaged → Invalid
Changed in eglibc (Ubuntu Natty):
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments