[edk2-devel] RFC for Edk2-Library

2019-05-07 Thread Sean via Groups.Io
RFC  Edk2-Library creation

Create a new tianocore owned repository to host a python library package in 
support of UEFI development.  This package will allow easy sharing of python 
library code to facilitate reuse.  Inclusion of this package and dependency 
management should be managed using Pip/Pypi.   To start this is a supplemental 
package and is not required to be used for edk2 builds.

 

Examples of content here

* Edk2 file type parsing
* UEFI structure encode/decode in python
* Packaging tools (Capsules generation, signing, INF gen, Cat gen)
* TPM support code
* Potentially move content from basetools/source/python/common/*
* No command line tools/interface

Maintainers

* Sean Brogan
* Bret Barkelew
* Placeholder for existing maintainer from the basetools

License

* BSD + Patent (edk2 aligned)

Contribution process and issue tracking

* Follow Github PR process for contributions and issue tracking
* Contributor forks repo in github
* Contributor creates branch for work
* Contributor updates release notes to indicate change (if necessary)
* Contributor submits PR to master branch of tianocore/Edk2-Library repo
* Review feedback is given in PR
* Python Tests are run on the repo (new contributions need unit tests)
* Python Style (flake8) must pass
* All review feedback must be completed, maintainers approved, and tests run 
successfully before PR is *squash merged* into master

Documentation

* Use Github IO documentation/wiki hosting
* Example content

  i.  
https://microsoft.github.io/mu/dyn/mu_pip_python_library/developing/ ( 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoft.github.io%2Fmu%2Fdyn%2Fmu_pip_python_library%2Fdeveloping%2F&data=01%7C01%7Csean.brogan%40microsoft.com%7C47c4ca03e19b4fffc8ad08d6d314774a%7C72f988bf86f141af91ab2d7cd011db47%7C1&sdata=fKIb1Pfj4AqoGVOWudcyFMxMypJk%2FHTts9aMxZ8HukI%3D&reserved=0
 )

ii. 
https://microsoft.github.io/mu/dyn/mu_pip_python_library/publishing/ ( 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoft.github.io%2Fmu%2Fdyn%2Fmu_pip_python_library%2Fpublishing%2F&data=01%7C01%7Csean.brogan%40microsoft.com%7C47c4ca03e19b4fffc8ad08d6d314774a%7C72f988bf86f141af91ab2d7cd011db47%7C1&sdata=QJMUMB1hIusaRVJhgsi9kF9KIbgdhS0WRnIXVkGeBCM%3D&reserved=0
 )

* Readme at root of repo
* Example: https://github.com/Microsoft/mu_pip_python_library ( 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fmu_pip_python_library&data=01%7C01%7Csean.brogan%40microsoft.com%7C47c4ca03e19b4fffc8ad08d6d314774a%7C72f988bf86f141af91ab2d7cd011db47%7C1&sdata=DiuPnNMagvYYf0XXxDycSVHqijBBcDT0fXHzVY9U6%2Fw%3D&reserved=0
 )

CI Builds

* CI build process using dev ops
* Validation is done thru build process
* Release publication done thru manual CI Build
* Examples from Mu-Python-Library
* Windows CI - https://dev.azure.com/projectmu/mu%20pip/_build?definitionId=13 
( 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdev.azure.com%2Fprojectmu%2Fmu%2520pip%2F_build%3FdefinitionId%3D13&data=01%7C01%7Csean.brogan%40microsoft.com%7C47c4ca03e19b4fffc8ad08d6d314774a%7C72f988bf86f141af91ab2d7cd011db47%7C1&sdata=jQCCZo2u8JVisCchOoMLSgKJbG3YEk%2FG1JP9fI4g2JY%3D&reserved=0
 )
* Linux CI - https://dev.azure.com/projectmu/mu%20pip/_build?definitionId=12 ( 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdev.azure.com%2Fprojectmu%2Fmu%2520pip%2F_build%3FdefinitionId%3D12&data=01%7C01%7Csean.brogan%40microsoft.com%7C47c4ca03e19b4fffc8ad08d6d314774a%7C72f988bf86f141af91ab2d7cd011db47%7C1&sdata=CILlTdeEGpsi%2BCQNiZdIqd2Vt2RQV6L3qjz2rWEARYE%3D&reserved=0
 )
* Publishing - https://dev.azure.com/projectmu/mu%20pip/_build?definitionId=16 
( 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdev.azure.com%2Fprojectmu%2Fmu%2520pip%2F_build%3FdefinitionId%3D16&data=01%7C01%7Csean.brogan%40microsoft.com%7C47c4ca03e19b4fffc8ad08d6d314774a%7C72f988bf86f141af91ab2d7cd011db47%7C1&sdata=hkpzn9P6RBjduYBWjN56Y2qRBWyOG32mFkP%2BwtY7KBQ%3D&reserved=0
 )

Release

* Release to Pypi as Edk2-Library for easy usage in product environment
* Versioned follows: Aa.bb.cc.dd
* AA == Major version.  Changes don’t need to be backward compatible
* BB == Minor version.  Significant new features.  Backward compatibility 
maintained
* CC == Bug fix/patch/small optional feature
* DD == build/Release version. 
* Package on Pypi will be owned by Tianocore group
* Example for mu-python-library: https://pypi.org/project/mu-python-library/ ( 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpypi.org%2Fproject%2Fmu-python-library%2F&data=01%7C01%7Csean.brogan%40microsoft.com%7C47c4ca03e19b4fffc8ad08d6d314774a%7C72f988bf86f141af91ab2d7cd011db47%7C1&sdata=5nTb93dDnAo%2FsWyfv1zYEIkJF8L58YY5P3BkzKi4Ivc%3D&reserved=0
 )

Other Notes

* Only support Python 3 (prefer 3

Re: [edk2-devel] RFC for Edk2-Library

2019-05-22 Thread Michael D Kinney
Hi Sean,

Can you send an RFC V2 that makes the following changes:

1) Add use of python virtual environments
2) Update Repository name: edk2-tools-library
3) Provide a summary of the APIs/Services that this PIP module 
   provides and the APIs/Services from the edk2 repo that this
   PIP module depends on.
4) Contribution process.  Add recommendation that PRs be focused
   on changes that make sense to be squashed.  Submit a different
   PR for a different feature/issue.  Break up a complex PR into
   multiple PRs.
5) Remove the following bullet:

   "* Potentially move content from basetools/source/python/common/*"

   We can discuss this concept after TianoCore platforms are
   successfully using these new features and the overlap between
   the edk2 repo and edk2-tools-library repo is clearly understood.

A follow on task should evaluate GitHub PR options for submitting
and preserving a patch series.

Thanks,

Mike


> -Original Message-
> From: Laszlo Ersek [mailto:ler...@redhat.com]
> Sent: Monday, May 13, 2019 1:29 PM
> To: Kinney, Michael D ;
> devel@edk2.groups.io; sean.bro...@microsoft.com
> Subject: Re: [edk2-devel] RFC for Edk2-Library
> 
> On 05/13/19 20:20, Kinney, Michael D wrote:
> > Laszlo,
> >
> > On Windows build systems, we have to install OpenSSL
> command line
> > utilities.  For all host systems, the OpenSSL command
> line
> > utilities need to be in the system path.  My point is
> that this
> > is similar to other dependencies like iASL and NASM.
> 
> OK. I think I must have misunderstood you at some point.
> Sorry about that.
> 
> > For the patch discussion, I did not mean to confuse
> things.  From
> > one perspective, there are two types of patch
> submissions.  Single
> > commit (no series) and multiple commits (patch series).
> The squash
> > merge of a PR works just fine for the single commit (no
> series) type.
> > There may be feedback/comments that require code
> changes and once the
> > PR is accepted, the history in the repository shows a
> single commit.
> > As the PR evolves, commits are made on the PR to
> address each piece
> > of feedback.  Squashing all of these together at the
> time the PR is
> > accepted is the correct action and matches what we do
> the for email
> > based review process.  The final result for both PR and
> email is a
> > single commit with a cleaned up commit message.
> 
> OK.
> 
> > You may consider the single commit (no series) type
> more rare than the
> > multiple commit (patch series) type.  However, there
> may be cases where
> > a multiple commit (patch series) was used where the
> changes could have
> > been submitted as a set of single commit (no series)
> changes.
> 
> OK.
> 
> Thanks
> Laszlo
> 
> >
> > Best regards,
> >
> > Mike
> >
> >> -Original Message-
> >> From: devel@edk2.groups.io
> [mailto:devel@edk2.groups.io]
> >> On Behalf Of Laszlo Ersek
> >> Sent: Monday, May 13, 2019 3:46 AM
> >> To: Kinney, Michael D ;
> >> devel@edk2.groups.io; sean.bro...@microsoft.com
> >> Subject: Re: [edk2-devel] RFC for Edk2-Library
> >>
> >> On 05/10/19 02:01, Kinney, Michael D wrote:
> >>> Laszlo,
> >>>
> >>> 1) We also use OpenSSL command line tool to locally
> >> sign
> >>>capsules and recovery images for local testing.
> So
> >> both
> >>>tool dependency and source dependency apply to the
> >> OpenSSL
> >>>content.
> >>
> >> I haven't used the tools yet that you refer to, so I'm
> >> unsure how
> >> exactly they invoke the "openssl" utility. If they
> just
> >> rely on the PATH
> >> environment variable, then what they invoke comes from
> >> the system-wide
> >> openssl package.
> >>
> >>>
> >>> 2) If a dev submits a PR, and there are many review
> >> comments
> >>>that require code changes, then those code changes
> >> are
> >>>added to that PR until all feedback is addressed.
> >>
> >> I don't understand how. Let's say the pull request
> refers
> >> to a branch
> >> with three commits, and the majority of the review
> >> comments request
> >> updates for patch #2 (i.e., in the middle). How can
> the
> >> submitter "add
> >> changes to the PR"? It is patch #2 that needs to be
> >> reworked, which will
> >> require rebases, and so the hash of the HEAD commit of
>

Re: [edk2-devel] RFC for Edk2-Library

2019-06-11 Thread Purma, Kondal R
Hi Sean ,

Its great that all python files must pass flake8 Python Style. I remember 
flake8 does not show errors for undefined member variables or instances . 

I feel this is one of most common use cases of code failures, due to typing 
errors and won't be visible unless  test that use case.

Are we planning to use any flake8 plug-ins to cover this or is it good idea to 
use Pylint (only to cover features not covered by falke8)on top of flake8.

Thanks,
Kondal.

-Original Message-
From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Michael D 
Kinney
Sent: Wednesday, May 22, 2019 7:32 PM
To: Laszlo Ersek ; devel@edk2.groups.io; 
sean.bro...@microsoft.com; Kinney, Michael D 
Subject: Re: [edk2-devel] RFC for Edk2-Library

Hi Sean,

Can you send an RFC V2 that makes the following changes:

1) Add use of python virtual environments
2) Update Repository name: edk2-tools-library
3) Provide a summary of the APIs/Services that this PIP module 
   provides and the APIs/Services from the edk2 repo that this
   PIP module depends on.
4) Contribution process.  Add recommendation that PRs be focused
   on changes that make sense to be squashed.  Submit a different
   PR for a different feature/issue.  Break up a complex PR into
   multiple PRs.
5) Remove the following bullet:

   "* Potentially move content from basetools/source/python/common/*"

   We can discuss this concept after TianoCore platforms are
   successfully using these new features and the overlap between
   the edk2 repo and edk2-tools-library repo is clearly understood.

A follow on task should evaluate GitHub PR options for submitting and 
preserving a patch series.

Thanks,

Mike


> -Original Message-
> From: Laszlo Ersek [mailto:ler...@redhat.com]
> Sent: Monday, May 13, 2019 1:29 PM
> To: Kinney, Michael D ; 
> devel@edk2.groups.io; sean.bro...@microsoft.com
> Subject: Re: [edk2-devel] RFC for Edk2-Library
> 
> On 05/13/19 20:20, Kinney, Michael D wrote:
> > Laszlo,
> >
> > On Windows build systems, we have to install OpenSSL
> command line
> > utilities.  For all host systems, the OpenSSL command
> line
> > utilities need to be in the system path.  My point is
> that this
> > is similar to other dependencies like iASL and NASM.
> 
> OK. I think I must have misunderstood you at some point.
> Sorry about that.
> 
> > For the patch discussion, I did not mean to confuse
> things.  From
> > one perspective, there are two types of patch
> submissions.  Single
> > commit (no series) and multiple commits (patch series).
> The squash
> > merge of a PR works just fine for the single commit (no
> series) type.
> > There may be feedback/comments that require code
> changes and once the
> > PR is accepted, the history in the repository shows a
> single commit.
> > As the PR evolves, commits are made on the PR to
> address each piece
> > of feedback.  Squashing all of these together at the
> time the PR is
> > accepted is the correct action and matches what we do
> the for email
> > based review process.  The final result for both PR and
> email is a
> > single commit with a cleaned up commit message.
> 
> OK.
> 
> > You may consider the single commit (no series) type
> more rare than the
> > multiple commit (patch series) type.  However, there
> may be cases where
> > a multiple commit (patch series) was used where the
> changes could have
> > been submitted as a set of single commit (no series)
> changes.
> 
> OK.
> 
> Thanks
> Laszlo
> 
> >
> > Best regards,
> >
> > Mike
> >
> >> -----Original Message-
> >> From: devel@edk2.groups.io
> [mailto:devel@edk2.groups.io]
> >> On Behalf Of Laszlo Ersek
> >> Sent: Monday, May 13, 2019 3:46 AM
> >> To: Kinney, Michael D ; 
> >> devel@edk2.groups.io; sean.bro...@microsoft.com
> >> Subject: Re: [edk2-devel] RFC for Edk2-Library
> >>
> >> On 05/10/19 02:01, Kinney, Michael D wrote:
> >>> Laszlo,
> >>>
> >>> 1) We also use OpenSSL command line tool to locally
> >> sign
> >>>capsules and recovery images for local testing.
> So
> >> both
> >>>tool dependency and source dependency apply to the
> >> OpenSSL
> >>>content.
> >>
> >> I haven't used the tools yet that you refer to, so I'm unsure how 
> >> exactly they invoke the "openssl" utility. If they
> just
> >> rely on the PATH
> >> environment variable, then what they invoke comes from the 
> >> system-wide openssl package.
> >>
> >>>
> >>>

Re: [edk2-devel] RFC for Edk2-Library

2019-05-08 Thread Laszlo Ersek
On 05/07/19 23:35, Sean via Groups.Io wrote:
> RFC  Edk2-Library creation
>
> Create a new tianocore owned repository to host a python library
> package in support of UEFI development.  This package will allow easy
> sharing of python library code to facilitate reuse.  Inclusion of this
> package and dependency management should be managed using Pip/Pypi. To
> start this is a supplemental package and is not required to be used
> for edk2 builds.

[1]

> Examples of content here
>
> * Edk2 file type parsing
> * UEFI structure encode/decode in python
> * Packaging tools (Capsules generation, signing, INF gen, Cat gen)
> * TPM support code
> * Potentially move content from basetools/source/python/common/*

[2]

> * No command line tools/interface
>
> Maintainers
>
> * Sean Brogan
> * Bret Barkelew
> * Placeholder for existing maintainer from the basetools
>
> License
>
> * BSD + Patent (edk2 aligned)
>
> Contribution process and issue tracking
>
> * Follow Github PR process for contributions and issue tracking
> * Contributor forks repo in github
> * Contributor creates branch for work
> * Contributor updates release notes to indicate change (if necessary)
> * Contributor submits PR to master branch of tianocore/Edk2-Library
>   repo
> * Review feedback is given in PR
> * Python Tests are run on the repo (new contributions need unit tests)
> * Python Style (flake8) must pass
> * All review feedback must be completed, maintainers approved, and
>   tests run successfully before PR is *squash merged* into master

The sentences

[1] "To start this is a supplemental package and is not required to be
 used for edk2 builds."

[2] "Potentially move content from basetools/source/python/common/*"

foreshadow that such a code movement might happen down the road, and the
external package could become a requirement for building edk2.

That step would mean the following:

(a) Edk2 would not remain buildable from a single command

git clone --recurse-submodules

Building edk2 would require GNU/Linux users to start tracking
packages with "pip", which is independent of any given distro's own
package management, and may cause conflicts if not used carefully:

  
https://developer.fedoraproject.org/tech/languages/python/pypi-installation.html

This requirement on "pip" would only go away once the external
python dependencies were packaged for at least the larger GNU/Linux
distros.

(b) Edk2 users running into build problems related to the external
python dependencies would have to contribute through a github-only
workflow. That's not a deal-breaker per se -- if we want to
contribute to other edk2 dependencies, such as OpenSSL or nasm, we
also have to conform to their specific development models, clearly.

However, "squash merge" is a catastrophically bad development model,
and I'd object to introducing a new edk2 build dependency that
followed that model.

(There are other issues with the GitHub.com development workflow, as
discussed elsewhere, but "squash merge" takes the cake.)

Problem (a) would be solvable in the long term (through collaboration
with distro maintainers, i.e. downstream packaging), but problem (b)
would not be. Thus I'm fine with the proposal, in its current form, only
if the new package is 100% an addition on top of edk2, even in the long
term, and not in any part intended as a future replacement for current
edk2 functionality.

Thanks,
Laszlo

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40191): https://edk2.groups.io/g/devel/message/40191
Mute This Topic: https://groups.io/mt/31536886/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] RFC for Edk2-Library

2019-05-09 Thread Michael D Kinney
Hello,

It is difficult to tell if the repo name edk2-library
is for firmware or tools, so I recommend we work on a
name that clearly identifies that this repo is related
to tools.

For the pip dependencies, is the concern that a platform
that depends on these tools will not be buildable without
running a "pip install" command that pulls content from the
network?  We already have to pull content to get the sources
and potentially other dependent tools (NASM, iASL, openssl).

Can we limit the initial scope to tools that layer on top
of edk2, and a different future RFC would be required if 
there is a proposal for the edk2 repo to depend on another
repo?  If we accept this limited scope, are there still 
concerns about initially using squash commits for changes
to these tools.  Is there a way for GitHub to support both
squash commits for some PRs and preserve a patch series for
other PRs?
 
Thanks,

Mike

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io]
> On Behalf Of Laszlo Ersek
> Sent: Wednesday, May 8, 2019 2:56 AM
> To: devel@edk2.groups.io; sean.bro...@microsoft.com
> Subject: Re: [edk2-devel] RFC for Edk2-Library
> 
> On 05/07/19 23:35, Sean via Groups.Io wrote:
> > RFC  Edk2-Library creation
> >
> > Create a new tianocore owned repository to host a
> python library
> > package in support of UEFI development.  This package
> will allow easy
> > sharing of python library code to facilitate reuse.
> Inclusion of this
> > package and dependency management should be managed
> using Pip/Pypi. To
> > start this is a supplemental package and is not
> required to be used
> > for edk2 builds.
> 
> [1]
> 
> > Examples of content here
> >
> > * Edk2 file type parsing
> > * UEFI structure encode/decode in python
> > * Packaging tools (Capsules generation, signing, INF
> gen, Cat gen)
> > * TPM support code
> > * Potentially move content from
> basetools/source/python/common/*
> 
> [2]
> 
> > * No command line tools/interface
> >
> > Maintainers
> >
> > * Sean Brogan
> > * Bret Barkelew
> > * Placeholder for existing maintainer from the
> basetools
> >
> > License
> >
> > * BSD + Patent (edk2 aligned)
> >
> > Contribution process and issue tracking
> >
> > * Follow Github PR process for contributions and issue
> tracking
> > * Contributor forks repo in github
> > * Contributor creates branch for work
> > * Contributor updates release notes to indicate change
> (if necessary)
> > * Contributor submits PR to master branch of
> tianocore/Edk2-Library
> >   repo
> > * Review feedback is given in PR
> > * Python Tests are run on the repo (new contributions
> need unit tests)
> > * Python Style (flake8) must pass
> > * All review feedback must be completed, maintainers
> approved, and
> >   tests run successfully before PR is *squash merged*
> into master
> 
> The sentences
> 
> [1] "To start this is a supplemental package and is not
> required to be
>  used for edk2 builds."
> 
> [2] "Potentially move content from
> basetools/source/python/common/*"
> 
> foreshadow that such a code movement might happen down
> the road, and the
> external package could become a requirement for building
> edk2.
> 
> That step would mean the following:
> 
> (a) Edk2 would not remain buildable from a single
> command
> 
> git clone --recurse-submodules
> 
> Building edk2 would require GNU/Linux users to start
> tracking
> packages with "pip", which is independent of any
> given distro's own
> package management, and may cause conflicts if not
> used carefully:
> 
> 
> https://developer.fedoraproject.org/tech/languages/pytho
> n/pypi-installation.html
> 
> This requirement on "pip" would only go away once
> the external
> python dependencies were packaged for at least the
> larger GNU/Linux
> distros.
> 
> (b) Edk2 users running into build problems related to
> the external
> python dependencies would have to contribute through
> a github-only
> workflow. That's not a deal-breaker per se -- if we
> want to
> contribute to other edk2 dependencies, such as
> OpenSSL or nasm, we
> also have to conform to their specific development
> models, clearly.
> 
> However, "squash merge" is a catastrophically bad
> development model,
> and I'd object to introducing a new edk2 build
> dependency that
> followed that model.
> 
> (There are other issues with the GitHub.com
> development 

Re: [edk2-devel] RFC for Edk2-Library

2019-05-09 Thread Laszlo Ersek
ls/Source/C: take EXTRA_OPTFLAGS from the caller
81502cee20ac BaseTools/Source/C: take EXTRA_LDFLAGS from the caller
+
aa4e0df1f0c7 BaseTools/VfrCompile: honor EXTRA_LDFLAGS

* For <https://bugzilla.tianocore.org/show_bug.cgi?id=1377>, I pushed 26
  patches:

8ff122119941 EmulatorPkg: require GCC48 or later
8d7cdfae8cb8 OvmfPkg: require GCC48 or later
fd158437dcce Vlv2TbltDevicePkg: assume GCC48 or later
7a9dbf2c94d1 BaseTools/Conf/tools_def.template: drop ARM/AARCH support from 
GCC46/GCC47
48e64498c961 BaseTools/tools_def.template: fix up LF-only line terminator
7381a6627a66 BaseTools/tools_def.template: strip trailing whitespace
9bbf156faaad BaseTools/tools_def.template: remove 
GCC48_IA32_X64_DLINK_COMMON dead-end
3c5613c5932c BaseTools/tools_def.template: remove GCC47 leaf definitions
fc87b8d7f411 BaseTools/tools_def.template: propagate loss of GCC47 
references
91a67e0f111e BaseTools/tools_def.template: remove GCC47 documentation
0f234fb8a662 BaseTools/tools_def.template: remove GCC46 leaf definitions
83a8f313884a BaseTools/tools_def.template: propagate loss of GCC46 
references
be359fa7ceec BaseTools/tools_def.template: remove GCC46 documentation
1458af0cbce0 BaseTools/tools_def.template: remove GCC45 leaf definitions
024576896d42 BaseTools/tools_def.template: propagate loss of GCC45 
references
3e77d20f5cb3 BaseTools/tools_def.template: remove GCC45 documentation
e046dc60fb89 BaseTools/tools_def.template: remove GCC44 leaf definitions
38c570efede0 BaseTools/tools_def.template: propagate loss of GCC44 
references
383d29096846 BaseTools/tools_def.template: rename GCC44_ALL_CC_FLAGS to 
GCC48_ALL_CC_FLAGS
0db91daf5228 BaseTools/tools_def.template: eliminate 
GCC44_IA32_X64_DLINK_FLAGS
84d21abf4e36 BaseTools/tools_def.template: rename 
GCC44_IA32_X64_DLINK_COMMON to GCC48_IA32_X64_DLINK_COMMON
5c6ccd53244b BaseTools/tools_def.template: remove comment about GCC44 + 
LzmaF86Compress
3bc65326d6ed BaseTools/tools_def.template: remove GCC44 documentation
f7282023e758 ArmPkg/ArmSoftFloatLib: drop build flags specific to 
GCC46/GCC47
300b8c5f150c CryptoPkg/BaseCryptLib: drop build flags specific to GCC44
7423ba9d499b Revert "MdePkg: avoid __builtin_unreachable() on GCC v4.4"

  (Note, from this list, 7a9dbf2c94d1 was authored by Ard, I just
  included it at the right spot.)

All of these patch series were carefully structured, and carefully
documented (in the commit messages). I would have been devastated, had
they been squashed.

(And it would have been questionable to squash Ard's patch with patches
authored by me.)


> Is there a way for GitHub to support both squash commits for some PRs
> and preserve a patch series for other PRs?

I don't know.

But honestly, what is the purpose of squash merges? Don't we expect
*all* contributions in well structured patch series?

If review discovers an issue with the structure of the series (for
example, not buildable in the middle, or the steps are not logical in
that order, or some patches do too many things at once and should be
split up, or a patch in the middle has a typo), the fixes shouldn't be
just heaped on top. The submitter should restructure (rebase) the
series, and submit the reworked series on a new topic branch / pull
request.

Isn't this the contribution pattern we'd like to see in all
sub-projects, where we (the TianoCore community) have reviewer /
maintainer responsibilities?

Thanks,
Laszlo

> Thanks,
>
> Mike
>
>> -Original Message-
>> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io]
>> On Behalf Of Laszlo Ersek
>> Sent: Wednesday, May 8, 2019 2:56 AM
>> To: devel@edk2.groups.io; sean.bro...@microsoft.com
>> Subject: Re: [edk2-devel] RFC for Edk2-Library
>>
>> On 05/07/19 23:35, Sean via Groups.Io wrote:
>>> RFC  Edk2-Library creation
>>>
>>> Create a new tianocore owned repository to host a
>> python library
>>> package in support of UEFI development.  This package
>> will allow easy
>>> sharing of python library code to facilitate reuse.
>> Inclusion of this
>>> package and dependency management should be managed
>> using Pip/Pypi. To
>>> start this is a supplemental package and is not
>> required to be used
>>> for edk2 builds.
>>
>> [1]
>>
>>> Examples of content here
>>>
>>> * Edk2 file type parsing
>>> * UEFI structure encode/decode in python
>>> * Packaging tools (Capsules generation, signing, INF
>> gen, Cat gen)
>>> * TPM support code
>>> * Potentially move content from
>> basetools/source/python/common/*
>>
>> [2]
>>
>>> * No command line tools/interface
>>>
>>> Mainta

Re: [edk2-devel] RFC for Edk2-Library

2019-05-09 Thread Michael D Kinney
Laszlo,

1) We also use OpenSSL command line tool to locally sign
   capsules and recovery images for local testing.  So both 
   tool dependency and source dependency apply to the OpenSSL
   content.

2) If a dev submits a PR, and there are many review comments
   that require code changes, then those code changes are
   added to that PR until all feedback is addressed.  At that
   point, if the change is something that should be in a single
   commit, then doing a squash merge with a cleaned up commit
   message would be appropriate.  And the history of all the
   review feedback preserved in the PR.

   If we create a 2nd PR with the cleaned up content, then the
   connection to the 1st PR feedback may be lost.  I agree this 
   matches what we do in email reviews to create a V2 patch series.
   The V1 and V2 threads are in the email archive.  I wonder if 
   there is a way to link a 2nd PR to the 1st PR and guarantee
   that both PRs are preserved?  This would also allow the 2nd
   cleaned up PR to contain a series, and if there was a way to
   make the squash merge optional, then the developer can choose
   the way the patches are committed.

   Just a few ideas to explore...Perhaps Sean can provide some
   additional ideas to manage complex changes in PRs.

Best regards,

Mike

> -Original Message-
> From: Laszlo Ersek [mailto:ler...@redhat.com]
> Sent: Thursday, May 9, 2019 3:56 PM
> To: Kinney, Michael D ;
> devel@edk2.groups.io; sean.bro...@microsoft.com
> Subject: Re: [edk2-devel] RFC for Edk2-Library
> 
> On 05/09/19 20:06, Kinney, Michael D wrote:
> > Hello,
> >
> > It is difficult to tell if the repo name edk2-library
> is for firmware
> > or tools, so I recommend we work on a name that clearly
> identifies
> > that this repo is related to tools.
> 
> Good idea.
> 
> > For the pip dependencies, is the concern that a
> platform that depends
> > on these tools will not be buildable without running a
> "pip install"
> > command that pulls content from the network?
> 
> Almost. Not exactly.
> 
> First, the concern is not specific to any given platform.
> My
> understanding is that the extraction would target, in the
> longer term,
> general BaseTools functionality. That would impact all
> platforms that
> consume & build against edk2.
> 
> Second, it's not the network access that's concerning per
> se. It's the
> compatibility / interoperation with any given Linux
> distribution's own
> (native) package management system. Such a package
> management system is
> generally not used on Windows, therefore Windows users
> are accustomed to
> installing software packages from a boatload of vendors.
> This is not the
> case on Linux distros -- your distro vendor offers a
> curated set of
> packages, such that everything interoperates with
> everything (ideally),
> there are no file conflicts, version dependencies are
> handled
> automatically (e.g. if you install a high-level package,
> its
> dependencies are pulled in automatically), and so on.
> 
> Clearly the distro vendor does not *author* all this
> software (although
> they are strongly encouraged to contribute to the
> upstream software
> projects they package and ship). The distro vendor is
> responsible for
> the integration of all these packages into a consistent
> OS, into
> consistent feature sets, and so on.
> 
> "pip" and similar tools are generally unfit for this
> approach, because
> they implement a parallel package management system, to
> my
> understanding. If they are carefully used in a user's
> home directory,
> they might work. If packages were installed with "pip"
> system-wide, they
> would almost certainly break (conflict with) the distro-
> provided
> packages.
> 
> Therefore, when users would like to get a new piece of
> software
> packaged, or an existent package refreshed (to a more
> recent upstream
> version), they file a feature requst with their distro
> vendor (unless
> the distro vendor already tracks the upstream project
> closely and
> performs periodic rebases anyway). Then the distro vendor
> ships a new
> (or refreshed) package, again nicely integrated with the
> rest of the
> system.
> 
> > We already have to pull content to get the sources and
> potentially
> > other dependent tools (NASM, iASL, openssl).
> 
> Yes, these are good examples to demonstrate the
> difference. Consider
> NASM. If a Windows user would like to install NASM, they
> google "NASM
> for Windows", then go to:
> 
> https://www.nasm.us/pub/nasm/releasebuilds/2.14.02/win64/
> 
> download the ZIP file or EXE file, and install it.
> 

Re: [edk2-devel] RFC for Edk2-Library

2019-05-09 Thread Michael D Kinney
Laszlo,

I forgot to mention that pip supports virtual environments.

https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/

This means that a virtual environment can be created for EDK II
builds and pip install operations can be performed in that EDK II
specific virtual environment and will not impact the system wide
pip installations.

Mike

> -Original Message-
> From: Kinney, Michael D
> Sent: Thursday, May 9, 2019 5:02 PM
> To: Laszlo Ersek ;
> devel@edk2.groups.io; sean.bro...@microsoft.com; Kinney,
> Michael D 
> Subject: RE: [edk2-devel] RFC for Edk2-Library
> 
> Laszlo,
> 
> 1) We also use OpenSSL command line tool to locally sign
>capsules and recovery images for local testing.  So
> both
>tool dependency and source dependency apply to the
> OpenSSL
>content.
> 
> 2) If a dev submits a PR, and there are many review
> comments
>that require code changes, then those code changes are
>added to that PR until all feedback is addressed.  At
> that
>point, if the change is something that should be in a
> single
>commit, then doing a squash merge with a cleaned up
> commit
>message would be appropriate.  And the history of all
> the
>review feedback preserved in the PR.
> 
>If we create a 2nd PR with the cleaned up content,
> then the
>connection to the 1st PR feedback may be lost.  I
> agree this
>matches what we do in email reviews to create a V2
> patch series.
>The V1 and V2 threads are in the email archive.  I
> wonder if
>there is a way to link a 2nd PR to the 1st PR and
> guarantee
>that both PRs are preserved?  This would also allow
> the 2nd
>cleaned up PR to contain a series, and if there was a
> way to
>make the squash merge optional, then the developer can
> choose
>the way the patches are committed.
> 
>Just a few ideas to explore...Perhaps Sean can provide
> some
>additional ideas to manage complex changes in PRs.
> 
> Best regards,
> 
> Mike
> 
> > -Original Message-
> > From: Laszlo Ersek [mailto:ler...@redhat.com]
> > Sent: Thursday, May 9, 2019 3:56 PM
> > To: Kinney, Michael D ;
> > devel@edk2.groups.io; sean.bro...@microsoft.com
> > Subject: Re: [edk2-devel] RFC for Edk2-Library
> >
> > On 05/09/19 20:06, Kinney, Michael D wrote:
> > > Hello,
> > >
> > > It is difficult to tell if the repo name edk2-library
> > is for firmware
> > > or tools, so I recommend we work on a name that
> clearly
> > identifies
> > > that this repo is related to tools.
> >
> > Good idea.
> >
> > > For the pip dependencies, is the concern that a
> > platform that depends
> > > on these tools will not be buildable without running
> a
> > "pip install"
> > > command that pulls content from the network?
> >
> > Almost. Not exactly.
> >
> > First, the concern is not specific to any given
> platform.
> > My
> > understanding is that the extraction would target, in
> the
> > longer term,
> > general BaseTools functionality. That would impact all
> > platforms that
> > consume & build against edk2.
> >
> > Second, it's not the network access that's concerning
> per
> > se. It's the
> > compatibility / interoperation with any given Linux
> > distribution's own
> > (native) package management system. Such a package
> > management system is
> > generally not used on Windows, therefore Windows users
> > are accustomed to
> > installing software packages from a boatload of
> vendors.
> > This is not the
> > case on Linux distros -- your distro vendor offers a
> > curated set of
> > packages, such that everything interoperates with
> > everything (ideally),
> > there are no file conflicts, version dependencies are
> > handled
> > automatically (e.g. if you install a high-level
> package,
> > its
> > dependencies are pulled in automatically), and so on.
> >
> > Clearly the distro vendor does not *author* all this
> > software (although
> > they are strongly encouraged to contribute to the
> > upstream software
> > projects they package and ship). The distro vendor is
> > responsible for
> > the integration of all these packages into a consistent
> > OS, into
> > consistent feature sets, and so on.
> >
> > "pip" and similar tools are generally unfit for this
> > approach, because
> > they implement a parallel package management system, to
> >

Re: [edk2-devel] RFC for Edk2-Library

2019-05-09 Thread Sean via Groups.Io
1. Agree on the name but not sure whats better.  i don't think it should be 
edk2-tools because the idea of this is to be a library of support code but not 
the tools themselves.  This limits dependencies and keeps the library free of 
business specific logic.  The second RFC will be for a new repo that is more 
like edk2-tools.  So maybe this could be edk2-tools-library?

2. Future direction (edk2 having a dependency on this package).  I don't think 
this library will achieve my goals if it doesn't start to pull in support 
libraries from basetools.  The simplest example is the parsers.  It would seem 
foolish to have two copies.  It would be great to have one set of parsers that 
could be used by tool developers as well as the edk2 build process.  Opening up 
those tools would make writing edk2 analysis tools much easier/faster/better.

3. Pip/distribution/versioning.  I would definitely not want my version of this 
pip module dependent on my OS distro and version.  This will be something tied 
to the edk2 platform i am building.   These are things that are somewhat stable 
but i would expect more churn than an OS and different platforms will have 
different needs.  i also don't want to sign up for working with OS vendors to 
get this into their package management.  With python 3.5 and newer there is a 
built in concept of virtual environments (venv).  This is how i would handle 
this problem.  The Pip modules and their dependencies do not impact the global 
packages.  Only the virtual environment gets updated and a virtual environment 
can be trivially created/deleted.  This is also expected if you are building 
platforms that might be running different versions of edk2 so its a good idea 
to create a venv for each code tree on your system and activate that venv when 
doing builds in that code tree.

4. Squash merge/PR process.  We discussed this at length at plugfest and 
unfortunately i don't think there was any silver bullet.  Patchsets and the 
edk2 process today are a relic of emailing patches.  When you move to pull 
requests managed by a server with policy and automation i think the only 
feasible solution is squash merge.  Now i don't understand why squash merge 
means bad commit messages and lost info.  The idea is that a single PR should 
be a single feature.  When it gets squashed the commit message should reflect 
the feature and be of high quality.  If the PR was too big and contained 
numerous features then the PR should be split up.  Squash merge allows your 
automation to easily guarantee bisect-ability, build-ability, and that each 
commit will pass the requirements.    Having one continuous PR optimizes your 
review process/comment tracking, etc.  I would be strongly opposed to opening 
new PRs for every new "version".

Thanks
Sean

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40393): https://edk2.groups.io/g/devel/message/40393
Mute This Topic: https://groups.io/mt/31536886/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] RFC for Edk2-Library

2019-05-13 Thread Laszlo Ersek
On 05/10/19 02:01, Kinney, Michael D wrote:
> Laszlo,
> 
> 1) We also use OpenSSL command line tool to locally sign
>capsules and recovery images for local testing.  So both 
>tool dependency and source dependency apply to the OpenSSL
>content.

I haven't used the tools yet that you refer to, so I'm unsure how
exactly they invoke the "openssl" utility. If they just rely on the PATH
environment variable, then what they invoke comes from the system-wide
openssl package.

> 
> 2) If a dev submits a PR, and there are many review comments
>that require code changes, then those code changes are
>added to that PR until all feedback is addressed.

I don't understand how. Let's say the pull request refers to a branch
with three commits, and the majority of the review comments request
updates for patch #2 (i.e., in the middle). How can the submitter "add
changes to the PR"? It is patch #2 that needs to be reworked, which will
require rebases, and so the hash of the HEAD commit of the topic branch
(patch #3) will change as well.

>At that
>point, if the change is something that should be in a single
>commit, then doing a squash merge with a cleaned up commit
>message would be appropriate.

I don't understand -- we modify only patch #2, yes, to address review
comments, but why does that justify squashing #1 through #3 into a
single commit?

>And the history of all the
>review feedback preserved in the PR.

That's good (but it could be better -- see the lacking email
integration. Anyway this is not strictly tied to my concern with
squash-on-merge).

> 
>If we create a 2nd PR with the cleaned up content, then the
>connection to the 1st PR feedback may be lost.  I agree this 
>matches what we do in email reviews to create a V2 patch series.
>The V1 and V2 threads are in the email archive.

Indeed. And the blurb for both threads reference the bugzilla, and the
bugzilla has (if the submitter is careful) comments linking the v1 and
v2 threads from the email archive.

>I wonder if
>there is a way to link a 2nd PR to the 1st PR and guarantee
>that both PRs are preserved?  This would also allow the 2nd
>cleaned up PR to contain a series, and if there was a way to
>make the squash merge optional, then the developer can choose
>the way the patches are committed.

This sounds great! I think both PRs can reference the bugzilla ticket,
and the bugzilla ticket can reference both PRs too (as comments). The
first PR can be rejected & closed when the second one is submitted.

>Just a few ideas to explore...Perhaps Sean can provide some
>additional ideas to manage complex changes in PRs.

Thanks!
Laszlo

> 
> Best regards,
> 
> Mike
> 
>> -Original Message-
>> From: Laszlo Ersek [mailto:ler...@redhat.com]
>> Sent: Thursday, May 9, 2019 3:56 PM
>> To: Kinney, Michael D ;
>> devel@edk2.groups.io; sean.bro...@microsoft.com
>> Subject: Re: [edk2-devel] RFC for Edk2-Library
>>
>> On 05/09/19 20:06, Kinney, Michael D wrote:
>>> Hello,
>>>
>>> It is difficult to tell if the repo name edk2-library
>> is for firmware
>>> or tools, so I recommend we work on a name that clearly
>> identifies
>>> that this repo is related to tools.
>>
>> Good idea.
>>
>>> For the pip dependencies, is the concern that a
>> platform that depends
>>> on these tools will not be buildable without running a
>> "pip install"
>>> command that pulls content from the network?
>>
>> Almost. Not exactly.
>>
>> First, the concern is not specific to any given platform.
>> My
>> understanding is that the extraction would target, in the
>> longer term,
>> general BaseTools functionality. That would impact all
>> platforms that
>> consume & build against edk2.
>>
>> Second, it's not the network access that's concerning per
>> se. It's the
>> compatibility / interoperation with any given Linux
>> distribution's own
>> (native) package management system. Such a package
>> management system is
>> generally not used on Windows, therefore Windows users
>> are accustomed to
>> installing software packages from a boatload of vendors.
>> This is not the
>> case on Linux distros -- your distro vendor offers a
>> curated set of
>> packages, such that everything interoperates with
>> everything (ideally),
>> there are no file conflicts, version dependencies are
>> handled
>> automatically (e.g. if you install a high-level package,
>> its
>> dependencies are pulled in a

Re: [edk2-devel] RFC for Edk2-Library

2019-05-13 Thread Laszlo Ersek
On 05/10/19 04:48, Sean via Groups.Io wrote:
> 1. Agree on the name but not sure whats better.  i don't think it
> should be edk2-tools because the idea of this is to be a library of
> support code but not the tools themselves.  This limits dependencies
> and keeps the library free of business specific logic.  The second RFC
> will be for a new repo that is more like edk2-tools.  So maybe this
> could be edk2-tools-library?
>
> 2. Future direction (edk2 having a dependency on this package).  I
> don't think this library will achieve my goals if it doesn't start to
> pull in support libraries from basetools.  The simplest example is the
> parsers.  It would seem foolish to have two copies.  It would be great
> to have one set of parsers that could be used by tool developers as
> well as the edk2 build process.  Opening up those tools would make
> writing edk2 analysis tools much easier/faster/better.
>
> 3. Pip/distribution/versioning.  I would definitely not want my
> version of this pip module dependent on my OS distro and version. This
> will be something tied to the edk2 platform i am building. These are
> things that are somewhat stable but i would expect more churn than an
> OS and different platforms will have different needs.  i also don't
> want to sign up for working with OS vendors to get this into their
> package management.  With python 3.5 and newer there is a built in
> concept of virtual environments (venv).  This is how i would handle
> this problem. The Pip modules and their dependencies do not impact the
> global packages.  Only the virtual environment gets updated and a
> virtual environment can be trivially created/deleted.  This is also
> expected if you are building platforms that might be running different
> versions of edk2 so its a good idea to create a venv for each code
> tree on your system and activate that venv when doing builds in that
> code tree.

OK. I think we'll just have to package the right version of the new
python dependency, downstream, eventually.


> 4. Squash merge/PR process.  We discussed this at length at plugfest
> and unfortunately i don't think there was any silver bullet. Patchsets
> and the edk2 process today are a relic of emailing patches.

That's your opinion ("relic"), which I respect. It's not a fact though.
There are large communities that email patches (with git-send-email)
because that's the most scalable and proven approach for them. It's not
because they are prevented from using anything better. For these people
(including me), there *is* nothing better.

I *have* contributed to projects with a GitHub.com-only workflow. Red
Hat contributes to, and maintains, several such projects. git-send-email
is still better, in my opinion. It's not perfect, of course.

If the TianoCore community perceives the patch email based workflow
limiting, I will not try to prevent the community from adopting
something else. But I would like to see some values preserved. (Unless
contributors clearly state that they don't care about those values.)


> When you move to pull requests managed by a server with policy and
> automation i think the only feasible solution is squash merge.  Now i
> don't understand why squash merge means bad commit messages and lost
> info.

Please refer to the following patch series, as an example.

  [edk2] [PATCH 0/4]
  MdePkg/BaseSafeIntLib: fix undefined behavior in INT64 Sub/Add/Mult

  http://mid.mail-archive.com/20180215183638.18578-1-lersek@redhat.com
  https://lists.01.org/pipermail/edk2-devel/2018-February/021476.html

It was committed as:

  1  54c7728a0465 MdePkg/BaseSafeIntLib: fix undefined behavior in 
SafeInt64Sub()
  2  41bfaffd1309 MdePkg/BaseSafeIntLib: fix undefined behavior in 
SafeInt64Add()
  3  8c33cc0ec926 MdePkg/BaseSafeIntLib: clean up parentheses in 
MIN_INT64_MAGNITUDE
  4  75505d161133 MdePkg/BaseSafeIntLib: fix undefined behavior in 
SafeInt64Mult()

If you squash these patches together, you will end up with a single
patch that modifies three independent functions, and rewrites a macro,
at the same time.

In addition, you will either lose the details of the individual commit
messages, or else you will end up with a humongous and incoherent commit
message. For example, the reasoning in commit #1 is distinct from the
reasoning in commit #4.

In addition, if the series had caused a regression, then git-bisect
would have had a lot worse granularity in locating the culprit patch.
With the above patch set structure, git-bisect would have told us what
function or macro to start investigating. Squashed together, we'd have
only gotten a *set* of functions to investigate.

This is not a theoretical problem. 1000-line feature patches are still
all too common in edk2. They are basically impossible to analyze in a
bug hunt, especially for someone that has not originally authored the
feature.

(Analyzing someone else's code for issues is the norm in open source
development.)


>  The idea is that a single PR should be a single 

Re: [edk2-devel] RFC for Edk2-Library

2019-05-13 Thread Michael D Kinney
Laszlo,

On Windows build systems, we have to install OpenSSL command line
utilities.  For all host systems, the OpenSSL command line
utilities need to be in the system path.  My point is that this 
is similar to other dependencies like iASL and NASM.

For the patch discussion, I did not mean to confuse things.  From
one perspective, there are two types of patch submissions.  Single
commit (no series) and multiple commits (patch series).  The squash
merge of a PR works just fine for the single commit (no series) type.
There may be feedback/comments that require code changes and once the 
PR is accepted, the history in the repository shows a single commit.
As the PR evolves, commits are made on the PR to address each piece
of feedback.  Squashing all of these together at the time the PR is
accepted is the correct action and matches what we do the for email
based review process.  The final result for both PR and email is a
single commit with a cleaned up commit message.

You may consider the single commit (no series) type more rare than the
multiple commit (patch series) type.  However, there may be cases where
a multiple commit (patch series) was used where the changes could have
been submitted as a set of single commit (no series) changes.

Best regards,

Mike

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io]
> On Behalf Of Laszlo Ersek
> Sent: Monday, May 13, 2019 3:46 AM
> To: Kinney, Michael D ;
> devel@edk2.groups.io; sean.bro...@microsoft.com
> Subject: Re: [edk2-devel] RFC for Edk2-Library
> 
> On 05/10/19 02:01, Kinney, Michael D wrote:
> > Laszlo,
> >
> > 1) We also use OpenSSL command line tool to locally
> sign
> >capsules and recovery images for local testing.  So
> both
> >tool dependency and source dependency apply to the
> OpenSSL
> >content.
> 
> I haven't used the tools yet that you refer to, so I'm
> unsure how
> exactly they invoke the "openssl" utility. If they just
> rely on the PATH
> environment variable, then what they invoke comes from
> the system-wide
> openssl package.
> 
> >
> > 2) If a dev submits a PR, and there are many review
> comments
> >that require code changes, then those code changes
> are
> >added to that PR until all feedback is addressed.
> 
> I don't understand how. Let's say the pull request refers
> to a branch
> with three commits, and the majority of the review
> comments request
> updates for patch #2 (i.e., in the middle). How can the
> submitter "add
> changes to the PR"? It is patch #2 that needs to be
> reworked, which will
> require rebases, and so the hash of the HEAD commit of
> the topic branch
> (patch #3) will change as well.
> 
> >At that
> >point, if the change is something that should be in
> a single
> >commit, then doing a squash merge with a cleaned up
> commit
> >message would be appropriate.
> 
> I don't understand -- we modify only patch #2, yes, to
> address review
> comments, but why does that justify squashing #1 through
> #3 into a
> single commit?
> 
> >And the history of all the
> >review feedback preserved in the PR.
> 
> That's good (but it could be better -- see the lacking
> email
> integration. Anyway this is not strictly tied to my
> concern with
> squash-on-merge).
> 
> >
> >If we create a 2nd PR with the cleaned up content,
> then the
> >connection to the 1st PR feedback may be lost.  I
> agree this
> >matches what we do in email reviews to create a V2
> patch series.
> >The V1 and V2 threads are in the email archive.
> 
> Indeed. And the blurb for both threads reference the
> bugzilla, and the
> bugzilla has (if the submitter is careful) comments
> linking the v1 and
> v2 threads from the email archive.
> 
> >I wonder if
> >there is a way to link a 2nd PR to the 1st PR and
> guarantee
> >that both PRs are preserved?  This would also allow
> the 2nd
> >cleaned up PR to contain a series, and if there was
> a way to
> >make the squash merge optional, then the developer
> can choose
> >the way the patches are committed.
> 
> This sounds great! I think both PRs can reference the
> bugzilla ticket,
> and the bugzilla ticket can reference both PRs too (as
> comments). The
> first PR can be rejected & closed when the second one is
> submitted.
> 
> >    Just a few ideas to explore...Perhaps Sean can
> provide some
> >additional ideas to manage complex changes in PRs.
> 
> Thanks!
> Laszlo
> 
> >
> > Best regards,
> >
> 

Re: [edk2-devel] RFC for Edk2-Library

2019-05-13 Thread Laszlo Ersek
On 05/13/19 20:20, Kinney, Michael D wrote:
> Laszlo,
> 
> On Windows build systems, we have to install OpenSSL command line
> utilities.  For all host systems, the OpenSSL command line
> utilities need to be in the system path.  My point is that this 
> is similar to other dependencies like iASL and NASM.

OK. I think I must have misunderstood you at some point. Sorry about that.

> For the patch discussion, I did not mean to confuse things.  From
> one perspective, there are two types of patch submissions.  Single
> commit (no series) and multiple commits (patch series).  The squash
> merge of a PR works just fine for the single commit (no series) type.
> There may be feedback/comments that require code changes and once the 
> PR is accepted, the history in the repository shows a single commit.
> As the PR evolves, commits are made on the PR to address each piece
> of feedback.  Squashing all of these together at the time the PR is
> accepted is the correct action and matches what we do the for email
> based review process.  The final result for both PR and email is a
> single commit with a cleaned up commit message.

OK.

> You may consider the single commit (no series) type more rare than the
> multiple commit (patch series) type.  However, there may be cases where
> a multiple commit (patch series) was used where the changes could have
> been submitted as a set of single commit (no series) changes.

OK.

Thanks
Laszlo

> 
> Best regards,
> 
> Mike
> 
>> -Original Message-
>> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io]
>> On Behalf Of Laszlo Ersek
>> Sent: Monday, May 13, 2019 3:46 AM
>> To: Kinney, Michael D ;
>> devel@edk2.groups.io; sean.bro...@microsoft.com
>> Subject: Re: [edk2-devel] RFC for Edk2-Library
>>
>> On 05/10/19 02:01, Kinney, Michael D wrote:
>>> Laszlo,
>>>
>>> 1) We also use OpenSSL command line tool to locally
>> sign
>>>capsules and recovery images for local testing.  So
>> both
>>>tool dependency and source dependency apply to the
>> OpenSSL
>>>content.
>>
>> I haven't used the tools yet that you refer to, so I'm
>> unsure how
>> exactly they invoke the "openssl" utility. If they just
>> rely on the PATH
>> environment variable, then what they invoke comes from
>> the system-wide
>> openssl package.
>>
>>>
>>> 2) If a dev submits a PR, and there are many review
>> comments
>>>that require code changes, then those code changes
>> are
>>>added to that PR until all feedback is addressed.
>>
>> I don't understand how. Let's say the pull request refers
>> to a branch
>> with three commits, and the majority of the review
>> comments request
>> updates for patch #2 (i.e., in the middle). How can the
>> submitter "add
>> changes to the PR"? It is patch #2 that needs to be
>> reworked, which will
>> require rebases, and so the hash of the HEAD commit of
>> the topic branch
>> (patch #3) will change as well.
>>
>>>At that
>>>point, if the change is something that should be in
>> a single
>>>commit, then doing a squash merge with a cleaned up
>> commit
>>>message would be appropriate.
>>
>> I don't understand -- we modify only patch #2, yes, to
>> address review
>> comments, but why does that justify squashing #1 through
>> #3 into a
>> single commit?
>>
>>>And the history of all the
>>>review feedback preserved in the PR.
>>
>> That's good (but it could be better -- see the lacking
>> email
>> integration. Anyway this is not strictly tied to my
>> concern with
>> squash-on-merge).
>>
>>>
>>>If we create a 2nd PR with the cleaned up content,
>> then the
>>>connection to the 1st PR feedback may be lost.  I
>> agree this
>>>matches what we do in email reviews to create a V2
>> patch series.
>>>The V1 and V2 threads are in the email archive.
>>
>> Indeed. And the blurb for both threads reference the
>> bugzilla, and the
>> bugzilla has (if the submitter is careful) comments
>> linking the v1 and
>> v2 threads from the email archive.
>>
>>>I wonder if
>>>there is a way to link a 2nd PR to the 1st PR and
>> guarantee
>>>that both PRs are preserved?  This would also allow
>> the 2nd
>>>cleaned up PR to contain a series, and if there was
>> a way to
>>>make