Re: [edk2] [PATCH] OvmfPkg: retire "create-release.py"

2019-03-26 Thread Laszlo Ersek
On 03/25/19 14:24, Laszlo Ersek wrote:
> Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=1653
> 
> "create-release.py" generates a 2-BSDL copyright block that will no longer
> apply once we fix .
> 
> Rather than update "create-release.py", remove it. We haven't used it in
> several years now, plus source releases of upstream edk2 are now covered
> by the edk2 stable tags
> .
> 
> Regarding binary releases of upstream OVMF: OVMF and ArmVirtQemu binaries
> built at the edk2 stable tags are being bundled with upstream QEMU,
> similarly to other firmware that runs on QEMU platforms:
> .
> Furthermore, the Xen project has provided its own builds of OVMF and
> ArmVirtXen for a good while now.
> 
> Cc: Anthony Perard 
> Cc: Ard Biesheuvel 
> Cc: Jordan Justen 
> Cc: Julien Grall 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Laszlo Ersek 
> ---
> 
> Notes:
> Repo:   https://github.com/lersek/edk2.git
> Branch: retire_create_release
> 
>  OvmfPkg/create-release.py | 208 
>  1 file changed, 208 deletions(-)

Pushed as commit cf85ba23d58c.

Thanks
Laszlo
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] OvmfPkg: retire "create-release.py"

2019-03-25 Thread Jordan Justen
Acked-by: Jordan Justen 

On 2019-03-25 06:24:18, Laszlo Ersek wrote:
> Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=1653
> 
> "create-release.py" generates a 2-BSDL copyright block that will no longer
> apply once we fix .
> 
> Rather than update "create-release.py", remove it. We haven't used it in
> several years now, plus source releases of upstream edk2 are now covered
> by the edk2 stable tags
> .
> 
> Regarding binary releases of upstream OVMF: OVMF and ArmVirtQemu binaries
> built at the edk2 stable tags are being bundled with upstream QEMU,
> similarly to other firmware that runs on QEMU platforms:
> .
> Furthermore, the Xen project has provided its own builds of OVMF and
> ArmVirtXen for a good while now.
> 
> Cc: Anthony Perard 
> Cc: Ard Biesheuvel 
> Cc: Jordan Justen 
> Cc: Julien Grall 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Laszlo Ersek 
> ---
> 
> Notes:
> Repo:   https://github.com/lersek/edk2.git
> Branch: retire_create_release
> 
>  OvmfPkg/create-release.py | 208 
>  1 file changed, 208 deletions(-)
> 
> diff --git a/OvmfPkg/create-release.py b/OvmfPkg/create-release.py
> deleted file mode 100755
> index 82d8e7b0a2b8..
> --- a/OvmfPkg/create-release.py
> +++ /dev/null
> @@ -1,208 +0,0 @@
> -#!/usr/bin/python
> -#
> -# Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.
> -#
> -# This program and the accompanying materials
> -# are licensed and made available under the terms and conditions of the BSD 
> License
> -# which accompanies this distribution.  The full text of the license may be 
> found at
> -# http://opensource.org/licenses/bsd-license.php
> -#
> -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
> -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
> IMPLIED.
> -#
> -
> -import os
> -import re
> -import StringIO
> -import subprocess
> -import sys
> -import zipfile
> -
> -is_unix = not sys.platform.startswith('win')
> -
> -if not is_unix:
> -print "This script currently only supports unix-like systems"
> -sys.exit(-1)
> -
> -if os.path.exists('OvmfPkgX64.dsc'):
> -os.chdir('..')
> -
> -if not os.path.exists(os.path.join('OvmfPkg', 'OvmfPkgX64.dsc')):
> -print "OvmfPkg/OvmfPkgX64.dsc doesn't exist"
> -sys.exit(-1)
> -
> -def run_and_capture_output(args, checkExitCode = True):
> -p = subprocess.Popen(args=args, stdout=subprocess.PIPE)
> -stdout = p.stdout.read()
> -ret_code = p.wait()
> -if checkExitCode:
> -assert ret_code == 0
> -return stdout
> -
> -gcc_version = run_and_capture_output(args=('gcc', '--version'))
> -gcc_re = re.compile(r'\s*\S+\s+\([^\)]+?\)\s+(\d+(?:\.\d+)*)(?:\s+.*)?')
> -mo = gcc_re.match(gcc_version)
> -if not mo:
> -print "Unable to find GCC version"
> -sys.exit(-1)
> -gcc_version = map(lambda n: int(n), mo.group(1).split('.'))
> -
> -if 'TOOLCHAIN' in os.environ:
> -TOOLCHAIN = os.environ['TOOLCHAIN']
> -else:
> -assert(gcc_version[0] == 4)
> -minor = max(4, min(7, gcc_version[1]))
> -TOOLCHAIN = 'GCC4' + str(minor)
> -
> -def git_based_version():
> -dir = os.getcwd()
> -if not os.path.exists('.git'):
> -os.chdir('OvmfPkg')
> -stdout = run_and_capture_output(args=('git', 'log',
> -  '-n', '1',
> -  '--abbrev-commit'))
> -regex = re.compile(r'^\s*git-svn-id:\s+\S+@(\d+)\s+[0-9a-f\-]+$',
> -   re.MULTILINE)
> -mo = regex.search(stdout)
> -if mo:
> -version = 'r' + mo.group(1)
> -else:
> -version = stdout.split(None, 3)[1]
> -os.chdir(dir)
> -return version
> -
> -def svn_info():
> -dir = os.getcwd()
> -os.chdir('OvmfPkg')
> -stdout = run_and_capture_output(args=('svn', 'info'))
> -os.chdir(dir)
> -return stdout
> -
> -def svn_based_version():
> -buf = svn_info()
> -revision_re = re.compile('^Revision\:\s*([\da-f]+)$', re.MULTILINE)
> -mo = revision_re.search(buf)
> -assert(mo is not None)
> -return 'r' + mo.group(1)
> -
> -def get_revision():
> -if os.path.exists(os.path.join('OvmfPkg', '.svn')):
> -return svn_based_version()
> -else:
> -return git_based_version()
> -
> -revision = get_revision()
> -
> -newline_re = re.compile(r'(\n|\r\n|\r(?!\n))', re.MULTILINE)
> -def to_dos_text(str):
> -return newline_re.sub('\r\n', str)
> -
> -def gen_build_info():
> -distro = run_and_capture_output(args=('lsb_release', '-sd')).strip()
> -
> -machine = run_and_capture_output(args=('uname', '-m')).strip()
> -
> -gcc_version_str = '.'.join(map(lambda v: str(v), gcc_version))
> -
> -ld_version = 

Re: [edk2] [PATCH] OvmfPkg: retire "create-release.py"

2019-03-25 Thread Ard Biesheuvel
On Mon, 25 Mar 2019 at 14:24, Laszlo Ersek  wrote:
>
> Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=1653
>
> "create-release.py" generates a 2-BSDL copyright block that will no longer
> apply once we fix .
>
> Rather than update "create-release.py", remove it. We haven't used it in
> several years now, plus source releases of upstream edk2 are now covered
> by the edk2 stable tags
> .
>
> Regarding binary releases of upstream OVMF: OVMF and ArmVirtQemu binaries
> built at the edk2 stable tags are being bundled with upstream QEMU,
> similarly to other firmware that runs on QEMU platforms:
> .
> Furthermore, the Xen project has provided its own builds of OVMF and
> ArmVirtXen for a good while now.
>
> Cc: Anthony Perard 
> Cc: Ard Biesheuvel 
> Cc: Jordan Justen 
> Cc: Julien Grall 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Laszlo Ersek 

Acked-by: Ard Biesheuvel 

> ---
>
> Notes:
> Repo:   https://github.com/lersek/edk2.git
> Branch: retire_create_release
>
>  OvmfPkg/create-release.py | 208 
>  1 file changed, 208 deletions(-)
>
> diff --git a/OvmfPkg/create-release.py b/OvmfPkg/create-release.py
> deleted file mode 100755
> index 82d8e7b0a2b8..
> --- a/OvmfPkg/create-release.py
> +++ /dev/null
> @@ -1,208 +0,0 @@
> -#!/usr/bin/python
> -#
> -# Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.
> -#
> -# This program and the accompanying materials
> -# are licensed and made available under the terms and conditions of the BSD 
> License
> -# which accompanies this distribution.  The full text of the license may be 
> found at
> -# http://opensource.org/licenses/bsd-license.php
> -#
> -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
> -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
> IMPLIED.
> -#
> -
> -import os
> -import re
> -import StringIO
> -import subprocess
> -import sys
> -import zipfile
> -
> -is_unix = not sys.platform.startswith('win')
> -
> -if not is_unix:
> -print "This script currently only supports unix-like systems"
> -sys.exit(-1)
> -
> -if os.path.exists('OvmfPkgX64.dsc'):
> -os.chdir('..')
> -
> -if not os.path.exists(os.path.join('OvmfPkg', 'OvmfPkgX64.dsc')):
> -print "OvmfPkg/OvmfPkgX64.dsc doesn't exist"
> -sys.exit(-1)
> -
> -def run_and_capture_output(args, checkExitCode = True):
> -p = subprocess.Popen(args=args, stdout=subprocess.PIPE)
> -stdout = p.stdout.read()
> -ret_code = p.wait()
> -if checkExitCode:
> -assert ret_code == 0
> -return stdout
> -
> -gcc_version = run_and_capture_output(args=('gcc', '--version'))
> -gcc_re = re.compile(r'\s*\S+\s+\([^\)]+?\)\s+(\d+(?:\.\d+)*)(?:\s+.*)?')
> -mo = gcc_re.match(gcc_version)
> -if not mo:
> -print "Unable to find GCC version"
> -sys.exit(-1)
> -gcc_version = map(lambda n: int(n), mo.group(1).split('.'))
> -
> -if 'TOOLCHAIN' in os.environ:
> -TOOLCHAIN = os.environ['TOOLCHAIN']
> -else:
> -assert(gcc_version[0] == 4)
> -minor = max(4, min(7, gcc_version[1]))
> -TOOLCHAIN = 'GCC4' + str(minor)
> -
> -def git_based_version():
> -dir = os.getcwd()
> -if not os.path.exists('.git'):
> -os.chdir('OvmfPkg')
> -stdout = run_and_capture_output(args=('git', 'log',
> -  '-n', '1',
> -  '--abbrev-commit'))
> -regex = re.compile(r'^\s*git-svn-id:\s+\S+@(\d+)\s+[0-9a-f\-]+$',
> -   re.MULTILINE)
> -mo = regex.search(stdout)
> -if mo:
> -version = 'r' + mo.group(1)
> -else:
> -version = stdout.split(None, 3)[1]
> -os.chdir(dir)
> -return version
> -
> -def svn_info():
> -dir = os.getcwd()
> -os.chdir('OvmfPkg')
> -stdout = run_and_capture_output(args=('svn', 'info'))
> -os.chdir(dir)
> -return stdout
> -
> -def svn_based_version():
> -buf = svn_info()
> -revision_re = re.compile('^Revision\:\s*([\da-f]+)$', re.MULTILINE)
> -mo = revision_re.search(buf)
> -assert(mo is not None)
> -return 'r' + mo.group(1)
> -
> -def get_revision():
> -if os.path.exists(os.path.join('OvmfPkg', '.svn')):
> -return svn_based_version()
> -else:
> -return git_based_version()
> -
> -revision = get_revision()
> -
> -newline_re = re.compile(r'(\n|\r\n|\r(?!\n))', re.MULTILINE)
> -def to_dos_text(str):
> -return newline_re.sub('\r\n', str)
> -
> -def gen_build_info():
> -distro = run_and_capture_output(args=('lsb_release', '-sd')).strip()
> -
> -machine = run_and_capture_output(args=('uname', '-m')).strip()
> -
> -gcc_version_str = '.'.join(map(lambda v: str(v), gcc_version))
> -
> -ld_version = 

[edk2] [PATCH] OvmfPkg: retire "create-release.py"

2019-03-25 Thread Laszlo Ersek
Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=1653

"create-release.py" generates a 2-BSDL copyright block that will no longer
apply once we fix .

Rather than update "create-release.py", remove it. We haven't used it in
several years now, plus source releases of upstream edk2 are now covered
by the edk2 stable tags
.

Regarding binary releases of upstream OVMF: OVMF and ArmVirtQemu binaries
built at the edk2 stable tags are being bundled with upstream QEMU,
similarly to other firmware that runs on QEMU platforms:
.
Furthermore, the Xen project has provided its own builds of OVMF and
ArmVirtXen for a good while now.

Cc: Anthony Perard 
Cc: Ard Biesheuvel 
Cc: Jordan Justen 
Cc: Julien Grall 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek 
---

Notes:
Repo:   https://github.com/lersek/edk2.git
Branch: retire_create_release

 OvmfPkg/create-release.py | 208 
 1 file changed, 208 deletions(-)

diff --git a/OvmfPkg/create-release.py b/OvmfPkg/create-release.py
deleted file mode 100755
index 82d8e7b0a2b8..
--- a/OvmfPkg/create-release.py
+++ /dev/null
@@ -1,208 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.
-#
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD 
License
-# which accompanies this distribution.  The full text of the license may be 
found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-
-import os
-import re
-import StringIO
-import subprocess
-import sys
-import zipfile
-
-is_unix = not sys.platform.startswith('win')
-
-if not is_unix:
-print "This script currently only supports unix-like systems"
-sys.exit(-1)
-
-if os.path.exists('OvmfPkgX64.dsc'):
-os.chdir('..')
-
-if not os.path.exists(os.path.join('OvmfPkg', 'OvmfPkgX64.dsc')):
-print "OvmfPkg/OvmfPkgX64.dsc doesn't exist"
-sys.exit(-1)
-
-def run_and_capture_output(args, checkExitCode = True):
-p = subprocess.Popen(args=args, stdout=subprocess.PIPE)
-stdout = p.stdout.read()
-ret_code = p.wait()
-if checkExitCode:
-assert ret_code == 0
-return stdout
-
-gcc_version = run_and_capture_output(args=('gcc', '--version'))
-gcc_re = re.compile(r'\s*\S+\s+\([^\)]+?\)\s+(\d+(?:\.\d+)*)(?:\s+.*)?')
-mo = gcc_re.match(gcc_version)
-if not mo:
-print "Unable to find GCC version"
-sys.exit(-1)
-gcc_version = map(lambda n: int(n), mo.group(1).split('.'))
-
-if 'TOOLCHAIN' in os.environ:
-TOOLCHAIN = os.environ['TOOLCHAIN']
-else:
-assert(gcc_version[0] == 4)
-minor = max(4, min(7, gcc_version[1]))
-TOOLCHAIN = 'GCC4' + str(minor)
-
-def git_based_version():
-dir = os.getcwd()
-if not os.path.exists('.git'):
-os.chdir('OvmfPkg')
-stdout = run_and_capture_output(args=('git', 'log',
-  '-n', '1',
-  '--abbrev-commit'))
-regex = re.compile(r'^\s*git-svn-id:\s+\S+@(\d+)\s+[0-9a-f\-]+$',
-   re.MULTILINE)
-mo = regex.search(stdout)
-if mo:
-version = 'r' + mo.group(1)
-else:
-version = stdout.split(None, 3)[1]
-os.chdir(dir)
-return version
-
-def svn_info():
-dir = os.getcwd()
-os.chdir('OvmfPkg')
-stdout = run_and_capture_output(args=('svn', 'info'))
-os.chdir(dir)
-return stdout
-
-def svn_based_version():
-buf = svn_info()
-revision_re = re.compile('^Revision\:\s*([\da-f]+)$', re.MULTILINE)
-mo = revision_re.search(buf)
-assert(mo is not None)
-return 'r' + mo.group(1)
-
-def get_revision():
-if os.path.exists(os.path.join('OvmfPkg', '.svn')):
-return svn_based_version()
-else:
-return git_based_version()
-
-revision = get_revision()
-
-newline_re = re.compile(r'(\n|\r\n|\r(?!\n))', re.MULTILINE)
-def to_dos_text(str):
-return newline_re.sub('\r\n', str)
-
-def gen_build_info():
-distro = run_and_capture_output(args=('lsb_release', '-sd')).strip()
-
-machine = run_and_capture_output(args=('uname', '-m')).strip()
-
-gcc_version_str = '.'.join(map(lambda v: str(v), gcc_version))
-
-ld_version = run_and_capture_output(args=('ld', '--version'))
-ld_version = ld_version.split('\n')[0].split()[-1]
-
-iasl_version = run_and_capture_output(args=('iasl'), checkExitCode=False)
-iasl_version = filter(lambda s: s.find(' version ') >= 0, 
iasl_version.split('\n'))[0]
-iasl_version = iasl_version.split(' version ')[1].strip()
-
-sb = StringIO.StringIO()