mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 03:58:21 +00:00
8300099: Configuration fails to auto-detect build user through $USER in dockers
Reviewed-by: ihse
This commit is contained in:
parent
e7fa150bc1
commit
3ffc955783
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -88,6 +88,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
|
||||
UTIL_LOOKUP_PROGS(GIT, git)
|
||||
UTIL_LOOKUP_PROGS(NICE, nice)
|
||||
UTIL_LOOKUP_PROGS(READLINK, greadlink readlink)
|
||||
UTIL_LOOKUP_PROGS(WHOAMI, whoami)
|
||||
|
||||
# These are only needed on some platforms
|
||||
UTIL_LOOKUP_PROGS(PATHTOOL, cygpath wslpath)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -74,6 +74,11 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
# Outer [ ] to quote m4.
|
||||
[ USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'` ]
|
||||
|
||||
# $USER may be not defined in dockers, so try to check with $WHOAMI
|
||||
if test "x$USERNAME" = x && test "x$WHOAMI" != x; then
|
||||
[ USERNAME=`$WHOAMI | $TR -d -c '[a-z][A-Z][0-9]'` ]
|
||||
fi
|
||||
|
||||
# Setup username (for use in adhoc version strings etc)
|
||||
UTIL_ARG_WITH(NAME: build-user, TYPE: string,
|
||||
RESULT: USERNAME,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user