Re: RFR: 8288001: SOURCE_DATE_EPOCH should not be set by default

2022-06-14 Thread Magnus Ihse Bursie
On Mon, 13 Jun 2022 06:50:54 GMT, KIRIYAMA Takuya  wrote:

>> At default configuration, SOURCE_DATE_EPOCH is exported as environment 
>> variable in SetupReproducibleBuild. Then, gcc is affected of 
>> SOURCE_DATE_EPOCH environment variable. This value is used only to set 
>> SOURCE_DATE_ISO_8601 (except below), so I removed "export" for 
>> SOURCE_DATE_EPOCH in SetupReproducibleBuild. And, at building ct.sym, 
>> SOURCE_DATE_EPOCH environment variable is needed. So I added setting routine 
>> if SOURCE_DATE_EPOCH is not set.
>> 
>> This fix works fine. With default configuration shows -Xinternalversion 
>> output same as Windows, and with --with-source-date configuration shows 
>> -Xinternalversion output specified timestamp. Would you please review this 
>> fix?
>
> Thank you for your comments.
> I understood the goal of reproducible build. But now, 
> ENABLE_REPRODUCIBLE_BUILD is set to false in default configuration.
> Then I think minimize the effort of SOURCE_DATE_EPOCH when reproducible build 
> is disabled. I wonder why build time information is different from Windows 
> and Linux.

@tkiriyama I have created https://bugs.openjdk.org/browse/JDK-8288396 for the 
approach I championed above, i.e. to always build reproducible instead. As part 
of this, the `-Xinternalversion` time stamp should be of the same format for 
all platforms, given the same set of options to `configure`.

The associated PR is https://github.com/openjdk/jdk/pull/9152. Can you verify 
if this solves your issues, and if so, close this bug?

-

PR: https://git.openjdk.org/jdk/pull/9081


Re: RFR: 8288001: SOURCE_DATE_EPOCH should not be set by default

2022-06-14 Thread Erik Joelsson
On Wed, 8 Jun 2022 07:47:24 GMT, KIRIYAMA Takuya  wrote:

> At default configuration, SOURCE_DATE_EPOCH is exported as environment 
> variable in SetupReproducibleBuild. Then, gcc is affected of 
> SOURCE_DATE_EPOCH environment variable. This value is used only to set 
> SOURCE_DATE_ISO_8601 (except below), so I removed "export" for 
> SOURCE_DATE_EPOCH in SetupReproducibleBuild. And, at building ct.sym, 
> SOURCE_DATE_EPOCH environment variable is needed. So I added setting routine 
> if SOURCE_DATE_EPOCH is not set.
> 
> This fix works fine. With default configuration shows -Xinternalversion 
> output same as Windows, and with --with-source-date configuration shows 
> -Xinternalversion output specified timestamp. Would you please review this 
> fix?

Is the problem that on Windows we get -Xinternalversion in local timezone but 
on Linux we get UTC? That's a difference that may warrant fixing, but I don't 
think this is the way to do it. 

I don't think it makes a practical difference if the timestamp is taken at the 
start of the build or when a certain src file is compiled.

-

PR: https://git.openjdk.org/jdk/pull/9081


Re: RFR: 8288001: SOURCE_DATE_EPOCH should not be set by default

2022-06-14 Thread Magnus Ihse Bursie
On Mon, 13 Jun 2022 09:47:48 GMT, Severin Gehwolf  wrote:

>> What do you mean by "build time information"?
>
> @magicus I think it's `-Xinternalversion` which has different output between 
> Windows and Linux of the same build. But to me that's a feature not a bug. 
> From the PR description:
> 
>> With default configuration shows `-Xinternalversion` output same as Windows, 
>> [...]

@jerboaa I agree. If anything, this PR makes me want to remove the option to 
*not* build reproducible. That way, there will be no discrepancies between 
platforms.

-

PR: https://git.openjdk.org/jdk/pull/9081


Re: RFR: 8288001: SOURCE_DATE_EPOCH should not be set by default

2022-06-13 Thread Severin Gehwolf
On Mon, 13 Jun 2022 07:14:15 GMT, Magnus Ihse Bursie  wrote:

>> At default configuration, SOURCE_DATE_EPOCH is exported as environment 
>> variable in SetupReproducibleBuild. Then, gcc is affected of 
>> SOURCE_DATE_EPOCH environment variable. This value is used only to set 
>> SOURCE_DATE_ISO_8601 (except below), so I removed "export" for 
>> SOURCE_DATE_EPOCH in SetupReproducibleBuild. And, at building ct.sym, 
>> SOURCE_DATE_EPOCH environment variable is needed. So I added setting routine 
>> if SOURCE_DATE_EPOCH is not set.
>> 
>> This fix works fine. With default configuration shows -Xinternalversion 
>> output same as Windows, and with --with-source-date configuration shows 
>> -Xinternalversion output specified timestamp. Would you please review this 
>> fix?
>
> What do you mean by "build time information"?

@magicus I think it's `-Xinternalversion` which has different output between 
Windows and Linux of the same build. But to me that's a feature not a bug. From 
the PR description:

> With default configuration shows `-Xinternalversion` output same as Windows, 
> [...]

-

PR: https://git.openjdk.org/jdk/pull/9081


Re: RFR: 8288001: SOURCE_DATE_EPOCH should not be set by default

2022-06-13 Thread Magnus Ihse Bursie
On Wed, 8 Jun 2022 07:47:24 GMT, KIRIYAMA Takuya  wrote:

> At default configuration, SOURCE_DATE_EPOCH is exported as environment 
> variable in SetupReproducibleBuild. Then, gcc is affected of 
> SOURCE_DATE_EPOCH environment variable. This value is used only to set 
> SOURCE_DATE_ISO_8601 (except below), so I removed "export" for 
> SOURCE_DATE_EPOCH in SetupReproducibleBuild. And, at building ct.sym, 
> SOURCE_DATE_EPOCH environment variable is needed. So I added setting routine 
> if SOURCE_DATE_EPOCH is not set.
> 
> This fix works fine. With default configuration shows -Xinternalversion 
> output same as Windows, and with --with-source-date configuration shows 
> -Xinternalversion output specified timestamp. Would you please review this 
> fix?

What do you mean by "build time information"?

-

PR: https://git.openjdk.org/jdk/pull/9081


Re: RFR: 8288001: SOURCE_DATE_EPOCH should not be set by default

2022-06-13 Thread KIRIYAMA Takuya
On Wed, 8 Jun 2022 07:47:24 GMT, KIRIYAMA Takuya  wrote:

> At default configuration, SOURCE_DATE_EPOCH is exported as environment 
> variable in SetupReproducibleBuild. Then, gcc is affected of 
> SOURCE_DATE_EPOCH environment variable. This value is used only to set 
> SOURCE_DATE_ISO_8601 (except below), so I removed "export" for 
> SOURCE_DATE_EPOCH in SetupReproducibleBuild. And, at building ct.sym, 
> SOURCE_DATE_EPOCH environment variable is needed. So I added setting routine 
> if SOURCE_DATE_EPOCH is not set.
> 
> This fix works fine. With default configuration shows -Xinternalversion 
> output same as Windows, and with --with-source-date configuration shows 
> -Xinternalversion output specified timestamp. Would you please review this 
> fix?

Thank you for your comments.
I understood the goal of reproducible build. But now, ENABLE_REPRODUCIBLE_BUILD 
is set to false in default configuration.
Then I think minimize the effort of SOURCE_DATE_EPOCH when reproducible build 
is disabled. I wonder why build time information is different from Windows and 
Linux.

-

PR: https://git.openjdk.org/jdk/pull/9081


Re: RFR: 8288001: SOURCE_DATE_EPOCH should not be set by default

2022-06-08 Thread Magnus Ihse Bursie
On Wed, 8 Jun 2022 07:47:24 GMT, KIRIYAMA Takuya  wrote:

> At default configuration, SOURCE_DATE_EPOCH is exported as environment 
> variable in SetupReproducibleBuild. Then, gcc is affected of 
> SOURCE_DATE_EPOCH environment variable. This value is used only to set 
> SOURCE_DATE_ISO_8601 (except below), so I removed "export" for 
> SOURCE_DATE_EPOCH in SetupReproducibleBuild. And, at building ct.sym, 
> SOURCE_DATE_EPOCH environment variable is needed. So I added setting routine 
> if SOURCE_DATE_EPOCH is not set.
> 
> This fix works fine. With default configuration shows -Xinternalversion 
> output same as Windows, and with --with-source-date configuration shows 
> -Xinternalversion output specified timestamp. Would you please review this 
> fix?

No no no. The current design is very much intentional. We must export 
`SOURCE_DATE_EPOCH` for gcc to be able to see it.

I wonder just like Severin: *why* do you think this is a problem?

Also, the long term goal is to *only* make reproducible builds. The sole reason 
it is possible to do `--disable-reproducible-builds` is out of an abundance of 
caution, if the changes needed for full reproducibility had unintended negative 
consequences.

-

PR: https://git.openjdk.java.net/jdk/pull/9081


Re: RFR: 8288001: SOURCE_DATE_EPOCH should not be set by default

2022-06-08 Thread Severin Gehwolf
On Wed, 8 Jun 2022 07:47:24 GMT, KIRIYAMA Takuya  wrote:

> At default configuration, SOURCE_DATE_EPOCH is exported as environment 
> variable in SetupReproducibleBuild. Then, gcc is affected of 
> SOURCE_DATE_EPOCH environment variable. This value is used only to set 
> SOURCE_DATE_ISO_8601 (except below), so I removed "export" for 
> SOURCE_DATE_EPOCH in SetupReproducibleBuild. And, at building ct.sym, 
> SOURCE_DATE_EPOCH environment variable is needed. So I added setting routine 
> if SOURCE_DATE_EPOCH is not set.
> 
> This fix works fine. With default configuration shows -Xinternalversion 
> output same as Windows, and with --with-source-date configuration shows 
> -Xinternalversion output specified timestamp. Would you please review this 
> fix?

It's not clear **why** you don't want `SOURCE_DATE_EPOCH` set by default. Could 
you explain? It would be good to make the OpenJDK build reproducible by 
default. The way it works currently, is a first step towards that goal.

-

PR: https://git.openjdk.java.net/jdk/pull/9081