Skip to content

Conversation

@jsquyres
Copy link
Member

@jsquyres jsquyres commented Oct 28, 2020

Cherry pick of #8136 and #8152 from master regarding reproducible builds. Thanks to @bmwiedemann for bringing this back to our attention.

Also bring in a MacOS/readlink portability fix.

This code was invoked twice.  Leave it solely in OPAL_CONFIGURE_SETUP,
which is invoked before OPAL_BASIC_SETUP.

Signed-off-by: Jeff Squyres <[email protected]>
(cherry picked from commit 7c36b45)
@bmwiedemann
Copy link
Contributor

This and 4.1 needs one more patch:

orte/tools/orte-info/Makefile.am
-            -DOMPI_BUILD_DATE="\"`date`\"" \
+            -DOMPI_BUILD_DATE="\"`$(top_srcdir)/config/getdate.sh`\"" \

@jsquyres
Copy link
Member Author

@bmwiedemann I notice on master that in one place, we have:

${USER:-`whoami`}

but in other places we just have

$$USER

Should they all be of the form

# With $ or $$, as appropriate
{USER:-`whoami`}

?

@bmwiedemann
Copy link
Contributor

I'd leave it as is. I have seen good PRs with feature-creep in the past that got stalled too long.

@jsquyres
Copy link
Member Author

Ah, I see -- $USER is an automatically-defined shell variable, anyway (I thought it was something unique to Reproducible builds, and therefore might not actually be set).

@rhc54
Copy link
Contributor

rhc54 commented Oct 28, 2020

Is it safe to say we need similar changes in PMIx and PRRTE?

@bmwiedemann
Copy link
Contributor

@rhc54 I tested with our openmpi4 package and these changes (with orte-info) were enough to make it reproducible.

@rhc54
Copy link
Contributor

rhc54 commented Oct 28, 2020

Understood - my apologies. My question was more about building PMIx and PRRTE standalone packages (i.e., when they aren't embedded in OMPI)

@jsquyres
Copy link
Member Author

@rhc54 It would not be a bad thing to also apply this to PMIx or PRRTE. I wouldn't say it's critical, but it's definitely in the "nice to have" category.

@jsquyres jsquyres force-pushed the pr/v4.0.x/reproducible-build branch from 4c95519 to 680f89f Compare October 28, 2020 19:44
@jsquyres
Copy link
Member Author

This PR will also need the MacOS portability fixes from #8152.

@jsquyres
Copy link
Member Author

bot:ompi:retest

@jsquyres jsquyres changed the title v4.0.x: reproducible builds v4.0.x: reproducible builds + portability fix Oct 29, 2020
@jsquyres jsquyres added the NEWS label Oct 29, 2020
ggouaillardet and others added 3 commits October 29, 2020 08:14
If defined, use SOURCE_DATE_EPOCH environment variable; make the build
Reproducible by forcing timestamps.  See
https://reproducible-builds.org/docs/source-date-epoch/ for more
information.

Thanks Bernhard M. Wiedemann for bringing this to our attention.

Fixes open-mpi#3759

**NOTE:** This was cherry-picked from master, and slightly modified /
  amended for the v4.0.x branch.

Signed-off-by: Gilles Gouaillardet <[email protected]>
Signed-off-by: Bernhard M. Wiedemann <[email protected]>
Signed-off-by: Jeff Squyres <[email protected]>
(cherry picked from commit 7b4e8ba)
MacOS does not have "readlink -f" or "realpath", so use the
MacOS-provided Python, which we know has os.path.realpath().

Signed-off-by: Jeff Squyres <[email protected]>
(cherry picked from commit ddf216b)
There are several different flavors of date(1) out there.  Try a few
different CLI options for date(1) to see which one works.

Signed-off-by: Jeff Squyres <[email protected]>
(cherry picked from commit 89920ba)
@jsquyres jsquyres force-pushed the pr/v4.0.x/reproducible-build branch from 8886c89 to 8f73cb1 Compare October 29, 2020 15:15
@gpaulsen gpaulsen merged commit 14d7da1 into open-mpi:v4.0.x Nov 4, 2020
@jsquyres jsquyres deleted the pr/v4.0.x/reproducible-build branch July 17, 2022 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants