You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by Don Lewis <tr...@apache.org> on 2019/09/18 05:43:37 UTC

git revision missing when building 4.1.7 from the source tarball

If you build 4.1.7 starting with the source tarball, the git revision
isn't included in the build result because the source tarball doesn't
include the .git directory.  That is needed so that 'git log' can find
the most recent commit hash.  I wasn't able to find a reasonable subset
of the .git contents that would allow this to work.

This problem was probably also present with svn, but nobody noticed.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: git revision missing when building 4.1.7 from the source tarball

Posted by Matthias Seidel <ma...@hamburg.de>.
Thanks!

As it is in 4.1.8 I will start a test build on that branch now...

Matthias

Am 03.10.19 um 19:16 schrieb Jim Jagielski:
> Done in 27a447d8e738b70f74ab05606693d7139127efc4
>
>> On Sep 19, 2019, at 8:25 AM, Matthias Seidel <ma...@hamburg.de> wrote:
>>
>> Hi Jim,
>>
>> Am 19.09.19 um 13:47 schrieb Jim Jagielski:
>>>> On Sep 18, 2019, at 1:43 AM, Don Lewis <tr...@apache.org> wrote:
>>>>
>>>> If you build 4.1.7 starting with the source tarball, the git revision
>>>> isn't included in the build result because the source tarball doesn't
>>>> include the .git directory.  That is needed so that 'git log' can find
>>>> the most recent commit hash.  I wasn't able to find a reasonable subset
>>>> of the .git contents that would allow this to work.
>>>>
>>>> This problem was probably also present with svn, but nobody noticed.
>>> It was actually. That is because the RCversion is determined at build time. We could, when we make the src distribution store that info away in a file someplace, but that would involve changing the build process (and SvnRevision.pm) accordingly.
>>>
>>> Maybe something for 4.2.x and trunk?
>> +1
>>
>> Matthias
>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
>>> For additional commands, e-mail: dev-help@openoffice.apache.org
>>>
>


Re: git revision missing when building 4.1.7 from the source tarball

Posted by Matthias Seidel <ma...@hamburg.de>.
Hi Jim,

Am 03.10.19 um 21:16 schrieb Jim Jagielski:
> Here is the logic of the patch:
>
> Basically, at build time, the same system in place to get the "repo version" is used... During the build it checks to see if the build is based on a git checkout and, if so, uses the short hash. If not a git repo, it sees if it's SVN and uses that. If neither, then it looks for a special file solenv/inc/reporevision.lst and uses the string in there as the repo revision number.
>
> What the aoo_srcrelease process does now is that it finds the git/svn revision and places that *in* the reporevision.lst file. So when people build from the source repo, it will be the revision number from the version that the source repo was from.

That sounds good!

Matthias

> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
> For additional commands, e-mail: dev-help@openoffice.apache.org
>


Re: git revision missing when building 4.1.7 from the source tarball

Posted by Jim Jagielski <ji...@jaguNET.com>.
Here is the logic of the patch:

Basically, at build time, the same system in place to get the "repo version" is used... During the build it checks to see if the build is based on a git checkout and, if so, uses the short hash. If not a git repo, it sees if it's SVN and uses that. If neither, then it looks for a special file solenv/inc/reporevision.lst and uses the string in there as the repo revision number.

What the aoo_srcrelease process does now is that it finds the git/svn revision and places that *in* the reporevision.lst file. So when people build from the source repo, it will be the revision number from the version that the source repo was from.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: git revision missing when building 4.1.7 from the source tarball

Posted by Jim Jagielski <ji...@jaguNET.com>.
Done in 27a447d8e738b70f74ab05606693d7139127efc4

> On Sep 19, 2019, at 8:25 AM, Matthias Seidel <ma...@hamburg.de> wrote:
> 
> Hi Jim,
> 
> Am 19.09.19 um 13:47 schrieb Jim Jagielski:
>>> On Sep 18, 2019, at 1:43 AM, Don Lewis <tr...@apache.org> wrote:
>>> 
>>> If you build 4.1.7 starting with the source tarball, the git revision
>>> isn't included in the build result because the source tarball doesn't
>>> include the .git directory.  That is needed so that 'git log' can find
>>> the most recent commit hash.  I wasn't able to find a reasonable subset
>>> of the .git contents that would allow this to work.
>>> 
>>> This problem was probably also present with svn, but nobody noticed.
>> It was actually. That is because the RCversion is determined at build time. We could, when we make the src distribution store that info away in a file someplace, but that would involve changing the build process (and SvnRevision.pm) accordingly.
>> 
>> Maybe something for 4.2.x and trunk?
> 
> +1
> 
> Matthias
> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
>> For additional commands, e-mail: dev-help@openoffice.apache.org
>> 
> 


Re: git revision missing when building 4.1.7 from the source tarball

Posted by Matthias Seidel <ma...@hamburg.de>.
Hi Jim,

Am 19.09.19 um 13:47 schrieb Jim Jagielski:
>> On Sep 18, 2019, at 1:43 AM, Don Lewis <tr...@apache.org> wrote:
>>
>> If you build 4.1.7 starting with the source tarball, the git revision
>> isn't included in the build result because the source tarball doesn't
>> include the .git directory.  That is needed so that 'git log' can find
>> the most recent commit hash.  I wasn't able to find a reasonable subset
>> of the .git contents that would allow this to work.
>>
>> This problem was probably also present with svn, but nobody noticed.
> It was actually. That is because the RCversion is determined at build time. We could, when we make the src distribution store that info away in a file someplace, but that would involve changing the build process (and SvnRevision.pm) accordingly.
>
> Maybe something for 4.2.x and trunk?

+1

Matthias

> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
> For additional commands, e-mail: dev-help@openoffice.apache.org
>


Re: git revision missing when building 4.1.7 from the source tarball

Posted by Jim Jagielski <ji...@jaguNET.com>.
> On Sep 18, 2019, at 1:43 AM, Don Lewis <tr...@apache.org> wrote:
> 
> If you build 4.1.7 starting with the source tarball, the git revision
> isn't included in the build result because the source tarball doesn't
> include the .git directory.  That is needed so that 'git log' can find
> the most recent commit hash.  I wasn't able to find a reasonable subset
> of the .git contents that would allow this to work.
> 
> This problem was probably also present with svn, but nobody noticed.

It was actually. That is because the RCversion is determined at build time. We could, when we make the src distribution store that info away in a file someplace, but that would involve changing the build process (and SvnRevision.pm) accordingly.

Maybe something for 4.2.x and trunk?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: git revision missing when building 4.1.7 from the source tarball

Posted by Don Lewis <tr...@apache.org>.
That sounds reasonable.  I suggest .revision since the value ends
up as the Revision value in versionrc.  Whatever the name, it should
be added to .gitignore.

Since this is not a regression, I don't consider it a blocker for
4.1.7.  In the meantime, I have a workaround for the FreeBSD port.

On 18 Sep, Matthias Seidel wrote:
> Hi Don,
> 
> We build the source tarball with "dmake aoo_srcrelease" [1].
> 
> Maybe the git hash can additionally be put into a file which is used
> when no .git directory is present?
> This should even work if the person who wants to build from source
> tarball has no git installed...
> 
> Regards,
> 
>    Matthias
> 
> [1]
> https://cwiki.apache.org/confluence/display/OOOUSERS/How+to+Cook+a+Release#HowtoCookaRelease-Howisthesourcecodeobtained?
> 
> 
> Am 18.09.19 um 07:43 schrieb Don Lewis:
>> If you build 4.1.7 starting with the source tarball, the git revision
>> isn't included in the build result because the source tarball doesn't
>> include the .git directory.  That is needed so that 'git log' can find
>> the most recent commit hash.  I wasn't able to find a reasonable subset
>> of the .git contents that would allow this to work.
>>
>> This problem was probably also present with svn, but nobody noticed.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
>> For additional commands, e-mail: dev-help@openoffice.apache.org
>>
>>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: git revision missing when building 4.1.7 from the source tarball

Posted by Matthias Seidel <ma...@hamburg.de>.
Hi Don,

We build the source tarball with "dmake aoo_srcrelease" [1].

Maybe the git hash can additionally be put into a file which is used
when no .git directory is present?
This should even work if the person who wants to build from source
tarball has no git installed...

Regards,

   Matthias

[1]
https://cwiki.apache.org/confluence/display/OOOUSERS/How+to+Cook+a+Release#HowtoCookaRelease-Howisthesourcecodeobtained?


Am 18.09.19 um 07:43 schrieb Don Lewis:
> If you build 4.1.7 starting with the source tarball, the git revision
> isn't included in the build result because the source tarball doesn't
> include the .git directory.  That is needed so that 'git log' can find
> the most recent commit hash.  I wasn't able to find a reasonable subset
> of the .git contents that would allow this to work.
>
> This problem was probably also present with svn, but nobody noticed.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
> For additional commands, e-mail: dev-help@openoffice.apache.org
>
>