[go: nahoru, domu]

Skip to content

Commit

Permalink
Merge branch 'uname' of github.com:dnschneid/crouton
Browse files Browse the repository at this point in the history
  • Loading branch information
dnschneid committed Jul 9, 2021
2 parents 0b82cd5 + eba51ad commit 10728f0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions installer/ubuntu/prepare
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,24 @@ export DEBIAN_FRONTEND=noninteractive
echo exit 101 > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d

# Debian glibc won't install on kernel revisions >=255, so add a wrapper script
# to clamp the revision number. Without also patching the uname syscalls,
# glibc's version math will overflow, resulting in an increased minor version
# number and possibly in glibc trying to use unavailable syscalls or features.
if [ ! -e /bin/uname.bin -a ! -e /usr/bin/uname.bin ]; then
for uname in /bin/uname /usr/bin/uname; do
# We don't use --rename since /bin may be a temp symlink to /usr/bin.
# --no-rename doesn't exist on old dpkg, but --rename will become the
# default in the future, so we have to try both with and without.
dpkg-divert --divert "$uname.bin" --no-rename "$uname" 2>/dev/null \
|| dpkg-divert --divert "$uname.bin" "$uname"
mv -f "$uname" "$uname.bin" 2>/dev/null || true
done
echo '#!/bin/sh -eu
uname.bin "$@" | sed '\''s/\.\(25[5-9]\|2[6-9][0-9]\|[3-9][0-9][0-9]\)-/.254-/g'\' > /bin/uname
chmod +x /bin/uname
fi

# Run debootstrap second stage if it hasn't already happened
if [ -r /debootstrap ]; then
# Debootstrap doesn't like anything mounted under /sys or /var when it runs
Expand Down

0 comments on commit 10728f0

Please sign in to comment.