[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#891393: debootstrap: Should warn about distributions that need vsyscall enabled



Hi,

On Mon, 26 Feb 2018 23:19:43 +0900 Hideki Yamane <henrich@iijmio-mail.jp> wrote:
> > debootstrap could perhaps warn about the need to enable vsyscalls for
> > old amd64 distributions.  (Annoyingly, there's no easy way to detect
> > whether they are currently enabled.)
> 
>  Just showing some errors about it is fine, IMO.

 And here's a proposed patch. Could you check it, please?


diff --git a/scripts/debian-common b/scripts/debian-common
index 4ab1fe8..830a99e 100644
--- a/scripts/debian-common
+++ b/scripts/debian-common
@@ -59,6 +59,17 @@ first_stage_install () {
 }
 
 second_stage_install () {
+       case "$CODENAME" in
+               etch|etch-m68k|jessie|jessie-kfreebsd|lenny|squeeze|wheezy|hoary|breezy|dapper|edgy|feisty|gusty|hardy|interpid|jaunty|karmic)
+                       if [ "$ARCH" = amd64 ] && [ "$HOST_ARCH" = amd64 ] && \
+                               [ $(uname -r | awk 'BEGIN{FS="."}{printf("%d%03d", $1, $2)}') -gt 4009 ]; then
+                               warning VIRTUALSYSCALL "You're trying to create an old amd64 release on newer one, and it may cause segfault due to incompatibility.\n   If you'd face such case, you should add 'vsyscall=emulate' to your kernel parametar.\n   For detail, see /usr/share/doc/linux-image-amd64/NEWS.Debian.gz"
+                       fi
+                       ;;
+               *)
+                       ;;
+       esac
+
        in_target /bin/true
 
        setup_dynamic_devices


Reply to: