bootstrap: add some comments about Linux specifics

This commit is contained in:
gutteridge 2024-03-22 23:34:00 +00:00
parent 1da87242a5
commit fecb6a682c
1 changed files with 8 additions and 3 deletions

View File

@ -1,6 +1,6 @@
#! /bin/sh
# $NetBSD: bootstrap,v 1.322 2024/03/12 22:00:13 joerg Exp $
# $NetBSD: bootstrap,v 1.323 2024/03/22 23:34:00 gutteridge Exp $
#
# Copyright (c) 2001-2011 Alistair Crooks <agc@NetBSD.org>
# All rights reserved.
@ -726,13 +726,16 @@ IRIX*)
fi
;;
Linux)
# XXX This was added in 2010 to handle Linux distros that use "wheel"
# for root's group. It's a hack, since it only supports (apparently
# now defunct) SSD Linux.
if [ -f /etc/ssdlinux_version ]; then
root_group=wheel
else
root_group=root
fi
# Debian/Ubuntu's awk is mawk, and mawk does not understand
# some regexp used in pkgsrc/mk.
# some regexps used in pkgsrc/mk.
if [ -f /etc/debian_version ]; then
need_awk=yes
# Arch uses gawk 5 that breaks some regexps. It doesn't provide pax
@ -740,6 +743,8 @@ Linux)
elif [ -f /etc/arch-release ]; then
need_awk=yes
need_pax=yes
# ChromeOS provides a version of mawk that is permanently in restricted
# mode. Notably, this means it cannot run pipes, which pkgsrc requires.
elif grep -sq '^CHROMEOS_RELEASE_NAME' /etc/lsb-release; then
need_awk=yes
need_sed=yes
@ -896,7 +901,7 @@ if [ -n "${march}" ]; then
machine_arch="${march}"
fi
# Fixup MACHINE_ARCH to use canonical pkgsrc variants, and support multiarch
# Fix up MACHINE_ARCH to use canonical pkgsrc variants, and support multiarch
# systems via --abi, setting a default $abi based on MACHINE_ARCH if not set.
#
case "$machine_arch/$abi" in