From nobody Sat May 18 08:14:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+57003+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+57003+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1586220000; cv=none; d=zohomail.com; s=zohoarc; b=V5xuLsW8GSHJ4nodZ639lZ+NiRJFNcdQw4j/yC5r+aL9+ZzJNJjD+/tIPvzvznBdH6mRdrEORti+QuTQE7q4QBkmqX79ktoBELjrWiCHRCknR5JP6VcRpNu8xD2vBghVmkZHK2ssPxeFmTxDQLJ4phNDZkbF7l3BifAfA0rGdB8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586220000; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=ciL2bJQbZ7GeK7KFASJirOu37edt3N1fcfNJ191iT/E=; b=hDwOvcsI96c+tZl+Bb0BOjhFaRef/NOt395Rmk4ceeqMCCTBfdA2ehUVALWjjUt/CQA/RCV+dws7YbOlfJ+OPpGvFRCh9TjYPKUNrrnnUEU5xhx7mMAgh99q7gddsLhQYv9q7gj2tLkTE91ZjZL/JSvSPiT+6w1OJ9o2nWm5poc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+57003+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1586220000114569.4343362430095; Mon, 6 Apr 2020 17:40:00 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id SVquYY1788612xDJVHTXOwnD; Mon, 06 Apr 2020 17:39:59 -0700 X-Received: from mga02.intel.com (mga02.intel.com []) by mx.groups.io with SMTP id smtpd.web12.583.1586219997646584672 for ; Mon, 06 Apr 2020 17:39:58 -0700 IronPort-SDR: gsf0b39bWigaK69DYz8EBFZvbnZioO6es93YsitZabzrtZLVOiDSiaI18znjLVju2QktluaoKa kCf6+zKmIiXg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2020 17:39:57 -0700 IronPort-SDR: QmjdnjkFDYWY3ucophOaVaA+/IX4OC5ZgG9w5Qtmy3x+TR90hSDF2lOo0BC0Yte7M1HMx+Wyuu ea9rrLjjFb8Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,352,1580803200"; d="scan'208";a="251059374" X-Received: from vbuzyanx-mobl.amr.corp.intel.com ([10.254.111.95]) by orsmga003.jf.intel.com with ESMTP; 06 Apr 2020 17:39:56 -0700 From: "Nate DeSimone" To: devel@edk2.groups.io Cc: Puja Pandya , Erik Bjorge , Prince Agyeman , Bret Barkelew , Philippe Mathieu-Daude Subject: [edk2-devel] [edk2-staging/EdkRepo] [PATCH 1/2] EdkRepo: Add setup_git_pyenv_mac.sh Date: Mon, 6 Apr 2020 17:39:49 -0700 Message-Id: <20200407003950.33249-2-nathaniel.l.desimone@intel.com> In-Reply-To: <20200407003950.33249-1-nathaniel.l.desimone@intel.com> References: <20200407003950.33249-1-nathaniel.l.desimone@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,nathaniel.l.desimone@intel.com X-Gm-Message-State: BFaSe6MvRDYJRKc8UxxCR7SFx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1586219999; bh=fycwsy8S3SLkpy0X7wNpACi9inNorOvww6q6lcmCNo4=; h=Cc:Date:From:Reply-To:Subject:To; b=rll0EsVpkgHXiaGXDoaWGaLy+lfdm4AAhRf3EYZH4DTkmUNB6R2uRhivti9nx+Hv+zN 6pvLLBe6IaCTU9JEoL2YfwYsbnffhIe8u2ZO5GWCiLi/MH6zmTEnwxTtmTXUbf64Ell3C 0Xi50wA/GbkxoH5QMXP0B7wq2ysD0qlwaQU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Script to configure pyenv and git for use on macOS. Signed-off-by: Nate DeSimone Cc: Puja Pandya Cc: Erik Bjorge Cc: Prince Agyeman Cc: Bret Barkelew Cc: Philippe Mathieu-Daude Reviewed-by: Ashley DeSimone --- .../mac-scripts/setup_git_pyenv_mac.sh | 118 ++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100755 edkrepo_installer/mac-scripts/setup_git_pyenv_mac.sh diff --git a/edkrepo_installer/mac-scripts/setup_git_pyenv_mac.sh b/edkrepo= _installer/mac-scripts/setup_git_pyenv_mac.sh new file mode 100755 index 0000000..34083d1 --- /dev/null +++ b/edkrepo_installer/mac-scripts/setup_git_pyenv_mac.sh @@ -0,0 +1,118 @@ +#!/usr/bin/env bash +# +## @file setup_git_pyenv_mac.sh +# +# Copyright (c) 2020, Intel Corporation. All rights reserved.
+# SPDX-License-Identifier: BSD-2-Clause-Patent +# + +IFS=3D'' read -r -d '' python_script <<"EOF" +import os +import re +import subprocess +import sys +import traceback + +profile_source_regex =3D re.compile(r"source\s+~/\.bashrc") +profile_source_regex2 =3D re.compile(r".\s+~/\.bashrc") + +ls_alias_regex =3D re.compile(r"alias\s+ls=3D'ls\s+-G'") +bash_completion_regex =3D re.compile(r"\[\[\s+-r\s+\"/usr/local/etc/profil= e.d/bash_completion.sh\"\s+\]\]\s+&&\s+.\s+\"/usr/local/etc/profile.d/bash_= completion.sh\"") +zsh_autoload_compinit_regex =3D re.compile(r"autoload\s+-U\s+compinit") +zsh_autoload_bashcompinit_regex =3D re.compile(r"autoload\s+-U\s+bashcompi= nit") +zsh_autoload_colors_regex =3D re.compile(r"autoload\s+-U\s+colors") +zsh_colors_regex =3D re.compile(r"\n\s*colors\n") +zsh_compinit_regex =3D re.compile(r"compinit\s+-u") +zsh_bashcompinit_regex =3D re.compile(r"\n\s*bashcompinit\n") +pyenv_init_regex =3D re.compile(r"eval\s+\"\$\(pyenv\s+init\s+-\)\"") + +ls_alias =3D "alias ls=3D'ls -G'" +bash_completion =3D '[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]= ] && . "/usr/local/etc/profile.d/bash_completion.sh"' + +zsh_autoload_compinit =3D 'autoload -U compinit' +zsh_autoload_bashcompinit =3D 'autoload -U bashcompinit' +zsh_autoload_colors =3D 'autoload -U colors' +zsh_colors =3D 'colors' +zsh_compinit =3D 'compinit -u' +zsh_bashcompinit =3D 'bashcompinit' + +pyenv_init =3D ''' +# Use the pyenv intalled Python interperter +if command -v pyenv 1>/dev/null 2>&1; then + eval "$(pyenv init -)" +fi +''' + +def add_command_to_startup_script(script_file, regex, command): + script =3D '' + if os.path.isfile(script_file): + with open(script_file, 'r') as f: + script =3D f.read().strip() + data =3D regex.search(script) + if not data: + if script =3D=3D '': + script =3D command + else: + script =3D '{}\n{}'.format(script, command) + with open(script_file, 'w') as f: + f.write(script) + +def main(): + home_dir =3D os.path.expanduser('~') + + # Add "source ~/.bashrc" to ~/.bash_profile if it does not have it alr= eady + bash_profile_file =3D os.path.join(home_dir, '.bash_profile') + bash_profile =3D '' + if os.path.isfile(bash_profile_file): + with open(bash_profile_file, 'r') as f: + bash_profile =3D f.read().strip() + data =3D profile_source_regex.search(bash_profile) + if not data: + data =3D profile_source_regex2.search(bash_profile) + if not data: + if bash_profile =3D=3D '': + bash_profile =3D 'source ~/.bashrc\n' + else: + bash_profile =3D '{}\nsource ~/.bashrc\n'.format(bash_prof= ile) + with open(bash_profile_file, 'w') as f: + f.write(bash_profile) + + # Add pyenv configuration to ~/.bashrc if it does not have it already + bash_rc_file =3D os.path.join(home_dir, '.bashrc') + add_command_to_startup_script(bash_rc_file, ls_alias_regex, ls_alias) + add_command_to_startup_script(bash_rc_file, bash_completion_regex, bas= h_completion) + add_command_to_startup_script(bash_rc_file, pyenv_init_regex, pyenv_in= it) + zsh_rc_file =3D os.path.join(home_dir, '.zshrc') + add_command_to_startup_script(zsh_rc_file, ls_alias_regex, ls_alias) + add_command_to_startup_script(zsh_rc_file, zsh_autoload_compinit_regex= , zsh_autoload_compinit) + add_command_to_startup_script(zsh_rc_file, zsh_autoload_bashcompinit_r= egex, zsh_autoload_bashcompinit) + add_command_to_startup_script(zsh_rc_file, zsh_autoload_colors_regex, = zsh_autoload_colors) + add_command_to_startup_script(zsh_rc_file, zsh_colors_regex, zsh_color= s) + add_command_to_startup_script(zsh_rc_file, zsh_compinit_regex, zsh_com= pinit) + add_command_to_startup_script(zsh_rc_file, zsh_bashcompinit_regex, zsh= _bashcompinit) + add_command_to_startup_script(zsh_rc_file, bash_completion_regex, bash= _completion) + add_command_to_startup_script(zsh_rc_file, pyenv_init_regex, pyenv_ini= t) + + print('Pyenv configured successfully') + return 0 + +if __name__ =3D=3D '__main__': + ret_val =3D 255 + try: + ret_val =3D main() + except Exception: + print('Unhandled Exception...') + traceback.print_exc() + + sys.exit(ret_val) +EOF + +# On Catalina and later python3 is preferred, +# however it is not packaged by Apple on earlier OSes +if [ -x "$(command -v python3)" ]; then + python3 -c "$python_script" + exit $? +else + python -c "$python_script" + exit $? +fi -- 2.25.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#57003): https://edk2.groups.io/g/devel/message/57003 Mute This Topic: https://groups.io/mt/72840961/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sat May 18 08:14:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+57004+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+57004+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1586219999; cv=none; d=zohomail.com; s=zohoarc; b=HuOuc6+rIjZafQ9e6iwcCpNdN/r+u9v3Tm+KPhv87qvTak46FO8aCapPQ5CxlpdMT7jhoa7G/rOOygb7RdFNjhpN7NGxjcT8mgMYNBlJ6h6yI4NVm9PAZkQ255qHc+nDOzXJ0ZSIJlUk57APWzavrnV7D8LMI1zyICuVqge+IqY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586219999; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=zIKerIzQ/GDx6T7nihVli3f6mI1sQ4B1OlJPp3O6ars=; b=Nj0u260fvQope2cMGYYNpEMdMj21+DHSP6HY5yxHp/61lxsew02JPm01aOC/9pToMSZsdXV4ZBbM4keIz4B1QKhdKWZR8ok38WMSm9Zp9gouG1TofxAO3YLGd2ptCQaW0LrmhYy/CCZiLwpFHCXGWQHjfh6LqCsyUdjqdngeaNA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+57004+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1586219999825734.1886452631674; Mon, 6 Apr 2020 17:39:59 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id UTpWYY1788612x9sy0pNpzCP; Mon, 06 Apr 2020 17:39:59 -0700 X-Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web12.585.1586219998854604470 for ; Mon, 06 Apr 2020 17:39:59 -0700 IronPort-SDR: mzFj7N7MY/CDGLqTz1EBXwVaNVDESNPT1rFvlAXOmOxHvmD4N/j1AqVFbYXBaYj18aRmJyhzIr Nr+M88yWAJhw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2020 17:39:57 -0700 IronPort-SDR: /jW+QNkvcQ5ETXcfP7E8XcwlIsrIOANplBYiCQ3UDU/PI4FqqsJenHGjeY42Sjy9qbrA82GG92 hIlGwH30/Mfw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,352,1580803200"; d="scan'208";a="251059377" X-Received: from vbuzyanx-mobl.amr.corp.intel.com ([10.254.111.95]) by orsmga003.jf.intel.com with ESMTP; 06 Apr 2020 17:39:57 -0700 From: "Nate DeSimone" To: devel@edk2.groups.io Cc: Puja Pandya , Erik Bjorge , Prince Agyeman , Bret Barkelew , Philippe Mathieu-Daude Subject: [edk2-devel] [edk2-staging/EdkRepo] [PATCH 2/2] EdkRepo: Update README.md Date: Mon, 6 Apr 2020 17:39:50 -0700 Message-Id: <20200407003950.33249-3-nathaniel.l.desimone@intel.com> In-Reply-To: <20200407003950.33249-1-nathaniel.l.desimone@intel.com> References: <20200407003950.33249-1-nathaniel.l.desimone@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,nathaniel.l.desimone@intel.com X-Gm-Message-State: qIOnd0cms0oJGxsB1eARq0TFx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1586219999; bh=5iOlGQwWjpBoT8f4hYlYDsxTsfQobw8AzAQjqZQRTX4=; h=Cc:Date:From:Reply-To:Subject:To; b=IpSfxSicqTr2HXe0/VUTiuHSMhq08f7JC0LD9gDCXJfvM0RrenR8wJENiIbr4j1gx7v aYb2bD8BRei6azW9BmcNbb+mDMpn+8SS5qnR/8oQKnlOIVf/QMm48/4+VO36Qi6Ir7qGB MYL2zFwOqEJCMWkCdG63IusiWNu4VU99Wpg= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" - Added installation instructions for macOS - Updated recommended versions of Git and Python Signed-off-by: Nate DeSimone Cc: Puja Pandya Cc: Erik Bjorge Cc: Prince Agyeman Cc: Bret Barkelew Cc: Philippe Mathieu-Daude Reviewed-by: Ashley DeSimone --- README.md | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 76 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1fbb698..9b02e4c 100644 --- a/README.md +++ b/README.md @@ -47,25 +47,96 @@ To build a EdkRepo distribution tarball, the Python whe= el package is required in 2. `./build_linux_installer.py` ### Install From Source -To install from source, one must have installedd using the tarball method = above at least once in order to setup the EdkRepo configuration files. One = this is done, one may use the standard distutils method to install EdkRepo = from source: +To install from source, one must have installed using the tarball method a= bove at least once in order to setup the EdkRepo configuration files. One t= his is done, one may use the standard distutils method to install EdkRepo f= rom source: `./setup.py install` +## macOS Instructions + +### Install Pre-Requisites + +#### 1. Install the Xcode Command Line Tools + +a) Open a Terminal and type the following command: + +`xcode-select --install` + +b) A new window will appear, click Install. +c) Accept the license agreement. +d) Wait for the installation to complete. + +#### 2. Install Homebrew + +Install [Homebrew](https://brew.sh/) if it has not been installed already.= Homebrew is a package manager for macOS that has become the most common me= thod of installing command line software on macOS that was not originally p= rovided by Apple. EdkRepo has several dependencies that are distributed via= Homebrew. + +Type the following command to install Homebrew: + +`/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/ins= tall/master/install.sh)"` + +Follow the on-screen prompts. + +#### 3. Install Dependencies + +Run the following commands to install EdkRepo's dependencies: + +`brew install bash-completion git git-gui pyenv` + +`pyenv install 3.8.2` + +`pyenv global 3.8.2` + +During installation, you may be prompted to enter your password. + +#### 4. Configure Shell for Pyenv and Git + +To enable usage of Pyenv installed Python interpreters and Git command com= pletions, run the following command: + +`/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/tianocore/ed= k2-staging/EdkRepo/edkrepo_installer/mac-scripts/setup_git_pyenv_mac.sh)"` + +Restart your shell so the Pyenv changes can take effect: + +`exec $SHELL` + +### Install EdkRepo + +Extract the archive: + +`tar -xzvf edkrepo-.tar.gz` + +If you are installing from source, you will need to build the distribution= tarball using the following commands first: + +1. `pip install wheel` (If not done already) +1. `cd build-scripts` +2. `./build_linux_installer.py` + +Install EdkRepo: + +`./install.py` + +Restart your shell so the new Pyenv shim for EdkRepo can take effect: + +`exec $SHELL` + ## Windows Instructions ### Pre-Requisites - Git 2.13.x or later - Python 3.5 or later -Git 2.16.2 is the version that has recieved the most validation, though an= y version of Git 2.13 or later works fine. If you want to install 2.16.2, h= ere are some links: -- [Direct Link - Git for Windows 2.16.2 - 64 Bit](https://github.com/git-f= or-windows/git/releases/download/v2.16.2.windows.1/Git-2.16.2-64-bit.exe) -- [Direct Link - Git for Windows 2.16.2 - 32 Bit](https://github.com/git-f= or-windows/git/releases/download/v2.16.2.windows.1/Git-2.16.2-64-bit.exe) +Git 2.26.0 is the version that has received the most validation, though an= y version of Git 2.13 or later works fine. If you want to install 2.26.0, h= ere are some links: +- [Direct Link - Git for Windows 2.26.0 - 64 Bit](https://github.com/git-f= or-windows/git/releases/download/v2.26.0.windows.1/Git-2.26.0-64-bit.exe) +- [Direct Link - Git for Windows 2.26.0 - 32 Bit](https://github.com/git-f= or-windows/git/releases/download/v2.26.0.windows.1/Git-2.26.0-32-bit.exe) -Python 3.7 or later is recommended due to performance improvements. You ca= n get Python from here: https://www.python.org/ +Python 3.8 or later is recommended due to performance improvements. You ca= n get Python from here: https://www.python.org/ ### Install Process 1. Run the installer .exe 2. Click Install +### Install From Source +To install from source, one must build and run the installer .exe using th= e instructions below at least once in order to setup the EdkRepo configurat= ion files. One this is done, one may use the standard distutils method to i= nstall EdkRepo from source: + +`py -3 setup.py install` + ### Build Process #### Build Pre-Requisites - Visual Studio 2015 or later with the C# language installed -- 2.25.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#57004): https://edk2.groups.io/g/devel/message/57004 Mute This Topic: https://groups.io/mt/72840962/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-