From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by mx.groups.io with SMTP id smtpd.web10.59867.1683431475487779619 for ; Sat, 06 May 2023 20:51:15 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20221208 header.b=mnMVf3+E; spf=pass (domain: gmail.com, ip: 209.85.216.49, mailfrom: pedro.falcato@gmail.com) Received: by mail-pj1-f49.google.com with SMTP id 98e67ed59e1d1-24e24b0193fso2427057a91.2 for ; Sat, 06 May 2023 20:51:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683431475; x=1686023475; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=VePmrFO3fQYzk3iBHr3Fso3f04D88T6GLYaM+kFyeEE=; b=mnMVf3+EcAp3JgoAYaMiJJ8vmi/Ky9fk8tDMfpW/1ZszVFzLGBVL/ZYx0mMvxv+gsq eWjFSaY/9xgSYgnt2A3FaYIDbUm+M0zlgDNS2rN5CDFjM62GJB4yWVed/nrw7NBCWvIe hDj736uHqIvQXeU1r6UnZ3Yq895yfKtYTnCVqtM35K7iFBg5TNYDnRQZ73Gq6CJM602E XlGcKG+m1SHSFsbLNqQKgmSbADDKtfGEImDyJ65PSQB7eVNBjQKG54zf7DyfI9RAi8n3 FbK/ugJMjwzKUOQHtsSiVyH6cUhIql1+8YhjUCqkHrUTpJzVliYmNpZzLaARN/pq9tZZ uPpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683431475; x=1686023475; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VePmrFO3fQYzk3iBHr3Fso3f04D88T6GLYaM+kFyeEE=; b=gGtL+lTSCHOW7lq/rsog6vEmmDAseHjWZCkED//CX8N3Dg3Kg/y45a94FCFPYBdx1w YwralPyYHOaDmeoqFYGJvvIx8lnpcbKCgLDVoElsSJW4/WoR/uB/1yZBtXTSx0Lsy0C8 PHp4QMFY1YFk3yWHDG56tb2CU7cKIwcNcDfhdTIzZI4EFJAD1jM21hx7gwPVX5qPBBD9 LkFMYBjQfsEUSoEWCyPW49J5kxkL1qj2kWF24/riV2D6J/4RwrRqt/tigxk0chMELsHB W8AFo0WQr+jJYjbU3vZw9FOFaAm6Sk19YTj3dELRYzuSf2MFjFLllskxPiErPgdgxskB 00Hw== X-Gm-Message-State: AC+VfDxaSHgQuWaL3Vf9PLqc657/uPp5OLkAADoPqm4+tqSFYPHWh50D XL7LJjXnTTsvAo27qz9GwObD4UNasUiAefT0VUY= X-Google-Smtp-Source: ACHHUZ5vW3HCy4FnrIawQZH/6+AEsLRX8lt8JSuKaupfm+8Heygyhq6TLmNL39r6KAcuWsGQulKvSJnUiSfNQQgLqqI= X-Received: by 2002:a17:90b:1d87:b0:24e:3206:7ca9 with SMTP id pf7-20020a17090b1d8700b0024e32067ca9mr6349574pjb.46.1683431474759; Sat, 06 May 2023 20:51:14 -0700 (PDT) MIME-Version: 1.0 References: <20230506182311.14023-1-rebecca@bsdio.com> <175CA4E73380D66F.2502@groups.io> <3e01cc9e-ac5f-bf4d-0359-adfc1aa21c4b@bsdio.com> <7e3cccac-ade2-7a5c-29e0-50c080a31abe@bsdio.com> In-Reply-To: <7e3cccac-ade2-7a5c-29e0-50c080a31abe@bsdio.com> From: "Pedro Falcato" Date: Sun, 7 May 2023 04:51:03 +0100 Message-ID: Subject: Re: [edk2-devel] [PATCH 1/1] Remove bashisms from edksetup.sh and BaseTools/BuildEnv To: Rebecca Cran Cc: devel@edk2.groups.io, Liming Gao , Bob Feng , Yuwei Chen , Andrew Fish , Leif Lindholm , Michael D Kinney Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, May 7, 2023 at 4:31=E2=80=AFAM Rebecca Cran wro= te: > > On 5/6/23 15:48, Pedro Falcato wrote: > > > > My local installations of Net (latest stable) and FreeBSD (13.1 with a > > hacked-up kernel) do not have a python3 symlink. > > > > I'm slightly worried that this breaks something. I know requiring > > whereis isn't ideal, but I'm fairly sure it did handle this situation? > > I uninstalled the python and python3 packages, leaving only python39. > > I got the following results on edk2 master: > > > [bcran@maxamd ~/src/uefi/edk2]$ whereis python3 > python3: > > [bcran@maxamd ~/src/uefi/edk2]$ ls /usr/local/bin | grep python > > python3.9 > > python3.9-config > > [bcran@maxamd ~/src/uefi/edk2]$ . edksetup.sh > Using EDK2 in-source Basetools > WORKSPACE: /home/bcran/src/uefi/edk2 > EDK_TOOLS_PATH: /home/bcran/src/uefi/edk2/BaseTools > > CONF_PATH: /home/bcran/src/uefi/edk2/Conf > > > [bcran@maxamd ~/src/uefi/edk2]$ echo $PYTHON_COMMAND > > [bcran@maxamd ~/src/uefi/edk2]$ gmake -C BaseTools/ -j16 > gmake: Entering directory '/usr/home/bcran/src/uefi/edk2/BaseTools' > gmake -C Source/C > gmake -C Source/Python > gmake[1]: Entering directory > '/usr/home/bcran/src/uefi/edk2/BaseTools/Source/C' > gmake[1]: Entering directory > '/usr/home/bcran/src/uefi/edk2/BaseTools/Source/Python' > gmake[1]: Nothing to be done for 'all'. > gmake[1]: Leaving directory > '/usr/home/bcran/src/uefi/edk2/BaseTools/Source/Python' > Attempting to detect HOST_ARCH from 'uname -m': amd64 > Detected HOST_ARCH of X64 using uname. > mkdir -p . > mkdir ./libs > mkdir ./bin > gmake -C VfrCompile VfrLexer.h > gmake -C Common > gmake[2]: Entering directory > '/usr/home/bcran/src/uefi/edk2/BaseTools/Source/C/VfrCompile' > gmake[2]: Entering directory > '/usr/home/bcran/src/uefi/edk2/BaseTools/Source/C/Common' > > ..... > > Finished building BaseTools C Tools with HOST_ARCH=3DX64 > gmake[1]: Leaving directory > '/usr/home/bcran/src/uefi/edk2/BaseTools/Source/C' > gmake -C Tests > gmake[1]: Entering directory '/usr/home/bcran/src/uefi/edk2/BaseTools/Tes= ts' > /bin/sh: python: not found > gmake[1]: *** [GNUmakefile:11: test] Error 127 > gmake[1]: Leaving directory '/usr/home/bcran/src/uefi/edk2/BaseTools/Test= s' > gmake: *** [GNUmakefile:19: Tests] Error 2 > gmake: Leaving directory '/usr/home/bcran/src/uefi/edk2/BaseTools' > ... > > [bcran@maxamd ~/src/uefi/edk2]$ build -p OvmfPkg/OvmfPkgX64.dsc -a X64 > -t GCC -b RELEASE > /home/bcran/src/uefi/edk2/BaseTools/BinWrappers/PosixLike/build: line > 14: exec: python: not found Thank you for your testing. I asked around and came to the conclusion it's a FreeBSD "meta-package" that lots of people don't have installed. If this doesn't break anything, I'm ok with it. Although there should really be a better solution, the status quo sucks. That said, the rest of the POSIX sh conversion looks ok to me. Acked-by: Pedro Falcato Although there's a small fixup you may want to do at >echo "source $SCRIPTNAME" Since source is not POSIX, but '.' is. --=20 Pedro