git revision missing when building 4.1.7 from the source tarball

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

git revision missing when building 4.1.7 from the source tarball

Don Lewis-2
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

Matthias Seidel
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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Don Lewis-2
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: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

Jim Jagielski
In reply to this post by Don Lewis-2

> On Sep 18, 2019, at 1:43 AM, Don Lewis <[hidden email]> 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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

Matthias Seidel
Hi Jim,

Am 19.09.19 um 13:47 schrieb Jim Jagielski:

>> On Sep 18, 2019, at 1:43 AM, Don Lewis <[hidden email]> 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>


smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Jim Jagielski
Done in 27a447d8e738b70f74ab05606693d7139127efc4

> On Sep 19, 2019, at 8:25 AM, Matthias Seidel <[hidden email]> wrote:
>
> Hi Jim,
>
> Am 19.09.19 um 13:47 schrieb Jim Jagielski:
>>> On Sep 18, 2019, at 1:43 AM, Don Lewis <[hidden email]> 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: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>

Reply | Threaded
Open this post in threaded view
|

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

Matthias Seidel
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 <[hidden email]> wrote:
>>
>> Hi Jim,
>>
>> Am 19.09.19 um 13:47 schrieb Jim Jagielski:
>>>> On Sep 18, 2019, at 1:43 AM, Don Lewis <[hidden email]> 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: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>


smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Jim Jagielski
In reply to this post by 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.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

Matthias Seidel
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: [hidden email]
> For additional commands, e-mail: [hidden email]
>


smime.p7s (5K) Download Attachment