Actions
Bug #15304
closedPackage build with extensions is not reproducible
Bug #15304:
Package build with extensions is not reproducible
Description
The build of a package with extensions, such as msgpack, is not reproducible due to temporary filenames appearing in the generated Makefile [1]:
grep gem lib/ruby/gems/2.5.0/gems/msgpack-1.2.4/ext/msgpack/Makefile
sitearchdir = $(DESTDIR)./.gem.20181114-6835-czlel4
sitelibdir = $(DESTDIR)./.gem.20181114-6835-czlel4
This issue comes from the creation of temporary files: the name is different across builds. More precisely, I've identified the following lines
- https://github.com/ruby/ruby/blob/trunk/lib/rubygems/ext/ext_conf_builder.rb#L16
- https://github.com/ruby/ruby/blob/trunk/lib/rubygems/ext/ext_conf_builder.rb#L29
There are several choices to fix this:
- use deterministic temporary filename: is there a lib to do this?
- provide these filenames as arguments and the use actual logic if these filenames are not provided: how to provide such filename?
- remove
Makefile
andgem_make.out
files: I don't know how they are useful - surely some other way to fix this...
I'm not a ruby programmer so I don't really know how it is difficult to implement these solutions.
What do you think about this?
Actions