[DISCUSS] configuration for Reproducible Builds

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

[DISCUSS] configuration for Reproducible Builds

Hervé BOUTEMY
Achieving Reproducible Builds require only one parameter: plugins that create
zip or tar archives require a fixed timestamp for entries

Putting that parameter as a pom property with a well known name and value
format permits to share the configuration between every packaging plugin.
This also has the advantage that child poms will inherit from parent value,
and eventually override.

The question is: *what property name and what value format should we keep?*

For the PoC, I chose to extrapolate from a convention from Reproducible Builds
project, which is very Linux-oriented: SOURCE_DATE_EPOCH environment variable,
that I transformed into source-date-epoch property name, keeping the "date +
%s" value
https://reproducible-builds.org/docs/source-date-epoch/


But I feel we can do a more user-readable solution by choosing another name
and format, like "reproducible-build-timestamp" with an ISO-8601 combined date
and time representation


WDYT? Any other idea?

Regards,

Hervé



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

Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSS] configuration for Reproducible Builds

rfscholte
I would think that all project.* properties represent the pom.xml and are  
immutable. To be more precise: the same pom.xml should effectively stay  
the same with every build.
Instead this seems more related the (maven)session, right?

Robert

On Sun, 29 Sep 2019 11:19:45 +0200, Hervé BOUTEMY <[hidden email]>  
wrote:

> regarding the property name, I had an idea:
>
> why not do like we already did for  ${project.build.sourceEncoding}, ie.  
> mimic
> a future element in pom.xml, in build?
>
> could be project.build.timestamp?
>
> Le samedi 28 septembre 2019, 17:55:24 CEST Hervé BOUTEMY a écrit :
>> Achieving Reproducible Builds require only one parameter: plugins that
>> create zip or tar archives require a fixed timestamp for entries
>>
>> Putting that parameter as a pom property with a well known name and  
>> value
>> format permits to share the configuration between every packaging  
>> plugin.
>> This also has the advantage that child poms will inherit from parent  
>> value,
>> and eventually override.
>>
>> The question is: *what property name and what value format should we  
>> keep?*
>>
>> For the PoC, I chose to extrapolate from a convention from Reproducible
>> Builds project, which is very Linux-oriented: SOURCE_DATE_EPOCH  
>> environment
>> variable, that I transformed into source-date-epoch property name,  
>> keeping
>> the "date + %s" value
>> https://reproducible-builds.org/docs/source-date-epoch/
>>
>>
>> But I feel we can do a more user-readable solution by choosing another  
>> name
>> and format, like "reproducible-build-timestamp" with an ISO-8601  
>> combined
>> date and time representation
>>
>>
>> WDYT? Any other idea?
>>
>> Regards,
>>
>> Hervé
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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]

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

Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSS] configuration for Reproducible Builds

Hervé BOUTEMY
Le dimanche 29 septembre 2019, 12:41:17 CEST Enrico Olivelli a écrit :

> Il dom 29 set 2019, 12:16 Robert Scholte <[hidden email]> ha scritto:
> > I would think that all project.* properties represent the pom.xml and are
> > immutable. To be more precise: the same pom.xml should effectively stay
> > the same with every build.
> > Instead this seems more related the (maven)session, right?
>
> If I understand correctly the value f this property is to be committed in
> the source code.
> Some thoughts:
> - it should default to 'now' sampled at the beginning of the session
which session? since there will be new sessions every now and then, when
someone builds

> - it can be overridden with a value writen in the pom or on a source file
> - it must be sampled and commited as final value during a 'release process'
IMHO, not *must* but *can* or *should*: it it stays at a past timestamp, there
won't be any big harm.
But if it can be the timestamp of the release process, it can be better for
people who look at zip entries timestamp (if anybody looks at it: do you look
at it?)

Regards,

Hervé

>
>
> Enrico
>
> > Robert
> >
> > On Sun, 29 Sep 2019 11:19:45 +0200, Hervé BOUTEMY <[hidden email]>
> >
> > wrote:
> > > regarding the property name, I had an idea:
> > >
> > > why not do like we already did for  ${project.build.sourceEncoding},
> >
> > ie.
> >
> > > mimic
> > > a future element in pom.xml, in build?
> > >
> > > could be project.build.timestamp?
> > >
> > > Le samedi 28 septembre 2019, 17:55:24 CEST Hervé BOUTEMY a écrit :
> > >> Achieving Reproducible Builds require only one parameter: plugins that
> > >> create zip or tar archives require a fixed timestamp for entries
> > >>
> > >> Putting that parameter as a pom property with a well known name and
> > >> value
> > >> format permits to share the configuration between every packaging
> > >> plugin.
> > >> This also has the advantage that child poms will inherit from parent
> > >> value,
> > >> and eventually override.
> > >>
> > >> The question is: *what property name and what value format should we
> > >> keep?*
> > >>
> > >> For the PoC, I chose to extrapolate from a convention from Reproducible
> > >> Builds project, which is very Linux-oriented: SOURCE_DATE_EPOCH
> > >> environment
> > >> variable, that I transformed into source-date-epoch property name,
> > >> keeping
> > >> the "date + %s" value
> > >> https://reproducible-builds.org/docs/source-date-epoch/
> > >>
> > >>
> > >> But I feel we can do a more user-readable solution by choosing another
> > >> name
> > >> and format, like "reproducible-build-timestamp" with an ISO-8601
> > >> combined
> > >> date and time representation
> > >>
> > >>
> > >> WDYT? Any other idea?
> > >>
> > >> Regards,
> > >>
> > >> Hervé
> > >>
> > >>
> > >>
> > >> ---------------------------------------------------------------------
> > >> 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]
> >
> > ---------------------------------------------------------------------
> > 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: [DISCUSS] configuration for Reproducible Builds

Hervé BOUTEMY
In reply to this post by Hervé BOUTEMY
Le dimanche 29 septembre 2019, 16:31:35 CEST Robert Scholte a écrit :

> On Sun, 29 Sep 2019 12:41:17 +0200, Enrico Olivelli <[hidden email]>
>
> wrote:
> > Il dom 29 set 2019, 12:16 Robert Scholte <[hidden email]> ha
> >
> > scritto:
> >> I would think that all project.* properties represent the pom.xml and
> >> are
> >> immutable. To be more precise: the same pom.xml should effectively stay
> >> the same with every build.
> >> Instead this seems more related the (maven)session, right?
> >
> > If I understand correctly the value f this property is to be committed in
> > the source code.
> > Some thoughts:
> > - it should default to 'now' sampled at the beginning of the session
> > - it can be overridden with a value writen in the pom or on a source file
> > - it must be sampled and commited as final value during a 'release
> > process'
>
> There is already a property with a similar name: maven.build.timestamp
> We need to keep in mind when thinking of a good name: which one is used
> for what?
>
> Reading the mail again, it looks like it is not about the timestamp of the
> build. It is more about setting the lastModified value (and maybe also
> created + opened?) of files inside the archive.
> I would prefer a name that clearly reflects that.
+1 you're right, need to find a better name
reproducibleTimestamp?
outputTimestamp?

>
> I don't like the idea of being able to set a property that starts with
> `project.`.
> Based on stack overflow people find it sometimes hard to understand, so we
> should be very clear about this:
> `project.` represents project-roottag of the pom.xml, and with this you
> can read any value, but you cannot SET a value.
yes, this is the objective of the choice: in the future, when we have Build vs
Consumer POM as discussed in parallel, my intent is to add an element to the
POM
= exactly like we'll do for project.build.sourceEncoding and
project.reporting.outputEncoding

>
> Is this value important for snapshots too?
the fact that there is a value is important, not the precise value itself.
And if we do care about the value, for SNAPSHOTs, any timestamp from the
previous release to the next one may make sense: I imagine the timestamp from
the last release would be a perfect value for the whole duration of a SNASPHOT
lifecycle

> If not, it shouldn't be too
> hard to adjust the maven-release-plugin for setting an explicit value.
then during the next release, having maven-release-plugin update the value
would make sense

Regards,

Hervé

>
> Robert
>
> [1]
> https://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Av
> ailable_Variables
> > Enrico
> >
> >> Robert
> >>
> >> On Sun, 29 Sep 2019 11:19:45 +0200, Hervé BOUTEMY
> >> <[hidden email]>
> >>
> >> wrote:
> >> > regarding the property name, I had an idea:
> >> >
> >> > why not do like we already did for  ${project.build.sourceEncoding},
> >>
> >> ie.
> >>
> >> > mimic
> >> > a future element in pom.xml, in build?
> >> >
> >> > could be project.build.timestamp?
> >> >
> >> > Le samedi 28 septembre 2019, 17:55:24 CEST Hervé BOUTEMY a écrit :
> >> >> Achieving Reproducible Builds require only one parameter: plugins
> >>
> >> that
> >>
> >> >> create zip or tar archives require a fixed timestamp for entries
> >> >>
> >> >> Putting that parameter as a pom property with a well known name and
> >> >> value
> >> >> format permits to share the configuration between every packaging
> >> >> plugin.
> >> >> This also has the advantage that child poms will inherit from parent
> >> >> value,
> >> >> and eventually override.
> >> >>
> >> >> The question is: *what property name and what value format should we
> >> >> keep?*
> >> >>
> >> >> For the PoC, I chose to extrapolate from a convention from
> >>
> >> Reproducible
> >>
> >> >> Builds project, which is very Linux-oriented: SOURCE_DATE_EPOCH
> >> >> environment
> >> >> variable, that I transformed into source-date-epoch property name,
> >> >> keeping
> >> >> the "date + %s" value
> >> >> https://reproducible-builds.org/docs/source-date-epoch/
> >> >>
> >> >>
> >> >> But I feel we can do a more user-readable solution by choosing
> >>
> >> another
> >>
> >> >> name
> >> >> and format, like "reproducible-build-timestamp" with an ISO-8601
> >> >> combined
> >> >> date and time representation
> >> >>
> >> >>
> >> >> WDYT? Any other idea?
> >> >>
> >> >> Regards,
> >> >>
> >> >> Hervé
> >> >>
> >> >>
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> 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]
> >>
> >> ---------------------------------------------------------------------
> >> 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]





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

Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSS] configuration for Reproducible Builds

Romain Manni-Bucau
In reply to this post by Hervé BOUTEMY
Hi all,

Wonder if it can't "just" (this is not a small task but in terms of design
it is small ;)) be a flag on higher level archiver plugins
(maven-jar-plugin being the first one we'll all have in mind).
I take as a reference jib here which takes into account a creation time for
that case (
https://github.com/GoogleContainerTools/jib/blob/master/jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/JibPluginConfiguration.java#L190
).
Long story short, they have ~3 modes:

1. set epoch + 1s (there are issue setting epoch directly)
2. set a constant time configured by the user
3. respect file time (not reproducible but enable to disable it)

At the end it means we don't need a project.build.* property but just to
enrich plugins (maybe let's start with jar one) to handle that.

I also wonder if I'm too biased on the topic but if I would have to work on
it now with our current ecosystem, I would "just" (again ;)) use
maven-shade-plugin and a set of transformers to handle all files which can
have not deterministic changes.
This enables to get the feature immediately without anything specific in
maven core and handle even external plugin generated files through external
transformers - a real reproducible build feature would need this extension
anyway, think about frontend resources included in META-INF/resources for
example.
Only missing piece in shade plugin is the Jar reproducibility handling but
this is likely very doable since we already have JarOutputStream impl at
apache which can host it IMHO.

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le dim. 29 sept. 2019 à 17:45, Hervé BOUTEMY <[hidden email]> a
écrit :

> Le dimanche 29 septembre 2019, 12:29:47 CEST Karl Heinz Marbaise a écrit :
> > Hi Hervé,
> >
> > On 29.09.19 11:19, Hervé BOUTEMY wrote:
> > > regarding the property name, I had an idea:
> > >
> > > why not do like we already did for  ${project.build.sourceEncoding},
> ie.
> > > mimic a future element in pom.xml, in build?
> > >
> > > could be project.build.timestamp?
> >
> > This sounds like the best idea...
> >
> >
> > This would mean to define something like this:
> >
> > <properties>
> >    <project.build.timestamp>..</project.build.timestamp>
> > </properties>
> >
> > But now there are coming up some questions:
> >
> > * Is that the real value to be used?
> > * Or should it activate the mechanism ? (boolean?)
> we can define both a boolean and a timestamp
> but the timestamp de-facto means also a boolean: defined means true,
> undefined
> means false
>
> >
> > <properties>
> >    <project.build.timestamp.usage>true</project.build.timestamp.usage>
> > </properties>
> >
> >
> > * Or should we use it by default and giving the user the opportunity
> >    to overrite the current timestamp by fixed timestamp for building ?
> >    This means we would define only the real time to be used during
> >    building. No need for a kind of activation etc.
> >    So you could call Maven via:
> >
> >    mvn -Dproject.build.timestamp=... package
> >
> >
> > * Or do we need a combination of the above
> >
> >    First activate, define the format and the timestamp to be used.
> >
> >
> > Furthermore do we need to define a format either which could look like
> this:
> >
> > <properties>
> >    <project.build.timestamp.usage>true</project.build.timestamp.usage>
> >    <project.build.timestamp>..</project.build.timestamp>
> >
> <project.build.timestamp.format>ISO-8601</project.build.timestamp.format>
> > </properties>
> letting the format as a third parameter is of course feasible, but adds
> complexity: is it really necessary? Isn't ISO-8601 sufficient to you?
>
> >
> >
> > Kind regards
> > Karl Heinz Marbaise
> >
> > > Le samedi 28 septembre 2019, 17:55:24 CEST Hervé BOUTEMY a écrit :
> > >> Achieving Reproducible Builds require only one parameter: plugins that
> > >> create zip or tar archives require a fixed timestamp for entries
> > >>
> > >> Putting that parameter as a pom property with a well known name and
> value
> > >> format permits to share the configuration between every packaging
> plugin.
> > >> This also has the advantage that child poms will inherit from parent
> > >> value,
> > >> and eventually override.
> > >>
> > >> The question is: *what property name and what value format should we
> > >> keep?*
> > >>
> > >> For the PoC, I chose to extrapolate from a convention from
> Reproducible
> > >> Builds project, which is very Linux-oriented: SOURCE_DATE_EPOCH
> > >> environment
> > >> variable, that I transformed into source-date-epoch property name,
> > >> keeping
> > >> the "date + %s" value
> > >> https://reproducible-builds.org/docs/source-date-epoch/
> > >>
> > >>
> > >> But I feel we can do a more user-readable solution by choosing another
> > >> name
> > >> and format, like "reproducible-build-timestamp" with an ISO-8601
> combined
> > >> date and time representation
> > >>
> > >>
> > >> WDYT? Any other idea?
> > >>
> > >> Regards,
> > >>
> > >> Hervé
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSS] configuration for Reproducible Builds

Tibor Digana
Can somebody explain a realistic USE CASE when you trigger two consequent
builds (with no changes in sources) and that you expect identical MD5 of
the build artifacts (JAR)?
This can be achieved only when the "timeStamp" in properties is fixed
unmodified in POM.
Does it make sense to call it timeStamp if it is not related to build time
nothing but some kind of , well I don't know what time because the time is
incremental and does not stop.
Even not very pragmatic to control it because you as USER have to correlate
MD5 with the algorith which produces the timeStamp and its changes.
If no MD5 has changed, the timeStamp would not change either. And here is
the problem: what if this rule is broken? And another problem: how you want
to ensure that the timeStamp is changed if and only if the changes have
been done. Somehow connected to the previous discussion with the
Incremental Build.

On Sun, Sep 29, 2019 at 5:55 PM Romain Manni-Bucau <[hidden email]>
wrote:

> Hi all,
>
> Wonder if it can't "just" (this is not a small task but in terms of design
> it is small ;)) be a flag on higher level archiver plugins
> (maven-jar-plugin being the first one we'll all have in mind).
> I take as a reference jib here which takes into account a creation time for
> that case (
>
> https://github.com/GoogleContainerTools/jib/blob/master/jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/JibPluginConfiguration.java#L190
> ).
> Long story short, they have ~3 modes:
>
> 1. set epoch + 1s (there are issue setting epoch directly)
> 2. set a constant time configured by the user
> 3. respect file time (not reproducible but enable to disable it)
>
> At the end it means we don't need a project.build.* property but just to
> enrich plugins (maybe let's start with jar one) to handle that.
>
> I also wonder if I'm too biased on the topic but if I would have to work on
> it now with our current ecosystem, I would "just" (again ;)) use
> maven-shade-plugin and a set of transformers to handle all files which can
> have not deterministic changes.
> This enables to get the feature immediately without anything specific in
> maven core and handle even external plugin generated files through external
> transformers - a real reproducible build feature would need this extension
> anyway, think about frontend resources included in META-INF/resources for
> example.
> Only missing piece in shade plugin is the Jar reproducibility handling but
> this is likely very doable since we already have JarOutputStream impl at
> apache which can host it IMHO.
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://rmannibucau.metawerx.net/> | Old Blog
> <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> <
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> >
>
>
> Le dim. 29 sept. 2019 à 17:45, Hervé BOUTEMY <[hidden email]> a
> écrit :
>
> > Le dimanche 29 septembre 2019, 12:29:47 CEST Karl Heinz Marbaise a écrit
> :
> > > Hi Hervé,
> > >
> > > On 29.09.19 11:19, Hervé BOUTEMY wrote:
> > > > regarding the property name, I had an idea:
> > > >
> > > > why not do like we already did for  ${project.build.sourceEncoding},
> > ie.
> > > > mimic a future element in pom.xml, in build?
> > > >
> > > > could be project.build.timestamp?
> > >
> > > This sounds like the best idea...
> > >
> > >
> > > This would mean to define something like this:
> > >
> > > <properties>
> > >    <project.build.timestamp>..</project.build.timestamp>
> > > </properties>
> > >
> > > But now there are coming up some questions:
> > >
> > > * Is that the real value to be used?
> > > * Or should it activate the mechanism ? (boolean?)
> > we can define both a boolean and a timestamp
> > but the timestamp de-facto means also a boolean: defined means true,
> > undefined
> > means false
> >
> > >
> > > <properties>
> > >    <project.build.timestamp.usage>true</project.build.timestamp.usage>
> > > </properties>
> > >
> > >
> > > * Or should we use it by default and giving the user the opportunity
> > >    to overrite the current timestamp by fixed timestamp for building ?
> > >    This means we would define only the real time to be used during
> > >    building. No need for a kind of activation etc.
> > >    So you could call Maven via:
> > >
> > >    mvn -Dproject.build.timestamp=... package
> > >
> > >
> > > * Or do we need a combination of the above
> > >
> > >    First activate, define the format and the timestamp to be used.
> > >
> > >
> > > Furthermore do we need to define a format either which could look like
> > this:
> > >
> > > <properties>
> > >    <project.build.timestamp.usage>true</project.build.timestamp.usage>
> > >    <project.build.timestamp>..</project.build.timestamp>
> > >
> > <project.build.timestamp.format>ISO-8601</project.build.timestamp.format>
> > > </properties>
> > letting the format as a third parameter is of course feasible, but adds
> > complexity: is it really necessary? Isn't ISO-8601 sufficient to you?
> >
> > >
> > >
> > > Kind regards
> > > Karl Heinz Marbaise
> > >
> > > > Le samedi 28 septembre 2019, 17:55:24 CEST Hervé BOUTEMY a écrit :
> > > >> Achieving Reproducible Builds require only one parameter: plugins
> that
> > > >> create zip or tar archives require a fixed timestamp for entries
> > > >>
> > > >> Putting that parameter as a pom property with a well known name and
> > value
> > > >> format permits to share the configuration between every packaging
> > plugin.
> > > >> This also has the advantage that child poms will inherit from parent
> > > >> value,
> > > >> and eventually override.
> > > >>
> > > >> The question is: *what property name and what value format should we
> > > >> keep?*
> > > >>
> > > >> For the PoC, I chose to extrapolate from a convention from
> > Reproducible
> > > >> Builds project, which is very Linux-oriented: SOURCE_DATE_EPOCH
> > > >> environment
> > > >> variable, that I transformed into source-date-epoch property name,
> > > >> keeping
> > > >> the "date + %s" value
> > > >> https://reproducible-builds.org/docs/source-date-epoch/
> > > >>
> > > >>
> > > >> But I feel we can do a more user-readable solution by choosing
> another
> > > >> name
> > > >> and format, like "reproducible-build-timestamp" with an ISO-8601
> > combined
> > > >> date and time representation
> > > >>
> > > >>
> > > >> WDYT? Any other idea?
> > > >>
> > > >> Regards,
> > > >>
> > > >> Hervé
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSS] configuration for Reproducible Builds

Tibor Digana
yes Hunter, exactly this was one possibility.
The names of the property can be just like in the HTTP Headers:
Last-Modified
If-Modified-Since -> maybe here can be also the commit hash, not only time
in millis/UTC
ETag

and every module may have different value ;-) then. and then the SCM... has
to resolve " If-Modified-Since " to the TIME.
The missing "..." is some layer useful in the incremental build too.
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSS] configuration for Reproducible Builds

Romain Manni-Bucau
scm does not work cause one common use case is to rebuild from source the
same artifacts (debian rebuild from source AFAIK, even java apps)
since scm can be "proxied", copied etc then the source can differ and
therefore commits can be differents but the content can be the same
this is why jib uses epoch+1s to enforce reproducibility.
that said once you have the timestamp the code is the same so let's not
block on that, worse case we would enable to plug a value resolver with a
few default strategy.
this is not the central part of the feature IMHO.

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le dim. 29 sept. 2019 à 19:58, Tibor Digana <[hidden email]> a
écrit :

> yes Hunter, exactly this was one possibility.
> The names of the property can be just like in the HTTP Headers:
> Last-Modified
> If-Modified-Since -> maybe here can be also the commit hash, not only time
> in millis/UTC
> ETag
>
> and every module may have different value ;-) then. and then the SCM... has
> to resolve " If-Modified-Since " to the TIME.
> The missing "..." is some layer useful in the incremental build too.
>
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSS] configuration for Reproducible Builds

Paul Hammant
In reply to this post by Tibor Digana
Hunter wrote:

 What if that timestamp was based upon the scm's last commit timestamp
> instead of the time of the build?
>

Folks: remember that Subversion works differently to Git. With subversion
there's no hash, just an integer that goes up constantly for everything in
the larger repo. Your trunk/master/release-branch may not have changed in
10 mins, but the repo might have done for an unrelated project/dir.

You're best to make a merkle tree for all files in the checkout (ignoring
target/). You can do that with Subversion too of course even though it does
not itself maintain a Merkle tree of the current set of files nor the
history (as Git goes).  Full disclosure - I am obsessed with Merkle trees
(but not blockchain).
Reply | Threaded
Open this post in threaded view
|

Re: [DISCUSS] configuration for Reproducible Builds

Romain Manni-Bucau
In reply to this post by Hervé BOUTEMY
While default stays not reproducible (keep in mind we enrich with dated
timestamp or build user metadata in jar quite commonly and i dont think we
want to sed/drop it) and reproducible mode gets an explicit flag in plugins
it sounds very promishing to me, in particular for containers case.

Le dim. 29 sept. 2019 à 21:32, Emmanuel Bourg <[hidden email]> a écrit :

> Le 29/09/2019 à 20:46, Hervé BOUTEMY a écrit :
>
> > This is exactly how I see Reproducible Builds for the future:
> > - select versions of plugins that bring reproducible output
> > - either inherit or define a local timestamp
> >
> > et voilà, it's so easy (once plugins support)...
>
> How do you plan to capture the elements of the build environment
> necessary to build identical artifacts (JDK used, command line
> parameters) ? As project properties too?
>
> Emmanuel Bourg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>