[SeaBIOS] [PATCH] scripts/buildversion.py: allow version to be overridden

David Woodhouse posted 1 patch 4 years, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/seabios tags/patchew/22fb4727e2b73574471b2e99b7d5db43ab41da6c.camel@infradead.org
scripts/buildversion.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
[SeaBIOS] [PATCH] scripts/buildversion.py: allow version to be overridden
Posted by David Woodhouse 4 years, 10 months ago
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
---
 scripts/buildversion.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/buildversion.py b/scripts/buildversion.py
index 8875497..fc2decd 100755
--- a/scripts/buildversion.py
+++ b/scripts/buildversion.py
@@ -113,7 +113,9 @@ def main():
 
     cleanbuild, toolstr = tool_versions(options.tools)
 
-    ver = git_version()
+    ver = os.getenv('SEABIOS_VERSION')
+    if not ver:
+        ver = git_version()
     cleanbuild = cleanbuild and 'dirty' not in ver
     if not ver:
         ver = file_version()

_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org
[SeaBIOS] Re: [PATCH] scripts/buildversion.py: allow version to be overridden
Posted by Kevin O'Connor 4 years, 10 months ago
On Thu, Jun 13, 2019 at 04:25:53PM +0100, David Woodhouse wrote:
> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
> ---
>  scripts/buildversion.py | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/buildversion.py b/scripts/buildversion.py
> index 8875497..fc2decd 100755
> --- a/scripts/buildversion.py
> +++ b/scripts/buildversion.py
> @@ -113,7 +113,9 @@ def main():
>  
>      cleanbuild, toolstr = tool_versions(options.tools)
>  
> -    ver = git_version()
> +    ver = os.getenv('SEABIOS_VERSION')
> +    if not ver:
> +        ver = git_version()
>      cleanbuild = cleanbuild and 'dirty' not in ver
>      if not ver:
>          ver = file_version()

Can you give some background on how this is intended to be used?

We used to allow the version string to be overridden, but we found the
results were a bit chaotic - different people chose different names
and it was hard to correlate a bug report to the source of the code.
So, we changed to the scheme detailed at:

https://www.seabios.org/Build_overview#Distribution_builds

Cheers,
-Kevin
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org
[SeaBIOS] Re: [PATCH] scripts/buildversion.py: allow version to be overridden
Posted by David Woodhouse 4 years, 10 months ago
On Thu, 2019-06-13 at 13:33 -0400, Kevin O'Connor wrote:
> Can you give some background on how this is intended to be used?
> 
> We used to allow the version string to be overridden, but we found the
> results were a bit chaotic - different people chose different names
> and it was hard to correlate a bug report to the source of the code.
> So, we changed to the scheme detailed at:
> 
> https://www.seabios.org/Build_overview#Distribution_builds

I encountered a build system with SeaBIOS in a git submodule of the
main project.

The main project has an out-of-tree build, and currently *copies*
everything from the SeaBIOS submodule (except .git) into the build
directory and building it there. It creates a .version file with the
overall version number of the main project.

By setting OUT= and KCONFIG_CONFIG= I can do a proper out of tree build
from the original read-only SeaBIOS submodule... except for the version
number. This solves that.



_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org
[SeaBIOS] Re: [PATCH] scripts/buildversion.py: allow version to be overridden
Posted by Kevin O'Connor 4 years, 10 months ago
On Thu, Jun 13, 2019 at 07:01:06PM +0100, David Woodhouse wrote:
> On Thu, 2019-06-13 at 13:33 -0400, Kevin O'Connor wrote:
> > Can you give some background on how this is intended to be used?
> > 
> > We used to allow the version string to be overridden, but we found the
> > results were a bit chaotic - different people chose different names
> > and it was hard to correlate a bug report to the source of the code.
> > So, we changed to the scheme detailed at:
> > 
> > https://www.seabios.org/Build_overview#Distribution_builds
> 
> I encountered a build system with SeaBIOS in a git submodule of the
> main project.
> 
> The main project has an out-of-tree build, and currently *copies*
> everything from the SeaBIOS submodule (except .git) into the build
> directory and building it there. It creates a .version file with the
> overall version number of the main project.
> 
> By setting OUT= and KCONFIG_CONFIG= I can do a proper out of tree build
> from the original read-only SeaBIOS submodule... except for the version
> number. This solves that.

Okay, thanks for the info.  However, since my past experience with
completely custom versioning wasn't positive, I'd prefer the main repo
to encourage using the EXTRAVERSION method instead.

-Kevin
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org
[SeaBIOS] Re: [PATCH] scripts/buildversion.py: allow version to be overridden
Posted by David Woodhouse 4 years, 10 months ago
On Tue, 2019-06-18 at 18:48 -0400, Kevin O'Connor wrote:
> > The main project has an out-of-tree build, and currently *copies*
> > everything from the SeaBIOS submodule (except .git) into the build
> > directory and building it there. It creates a .version file with the
> > overall version number of the main project.
> > 
> > By setting OUT= and KCONFIG_CONFIG= I can do a proper out of tree build
> > from the original read-only SeaBIOS submodule... except for the version
> > number. This solves that.
> 
> Okay, thanks for the info.  However, since my past experience with
> completely custom versioning wasn't positive, I'd prefer the main repo
> to encourage using the EXTRAVERSION method instead.

Ack. I'll come up with a different approach. Thanks.

_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org