[#89806] [Ruby trunk Bug#15306] Generate prelude.c using miniruby — v.ondruch@...
Issue #15306 has been reported by vo.x (Vit Ondruch).
3 messages
2018/11/15
[ruby-core:89831] [Ruby trunk Bug#15304] Package build with extensions is not reproducible
From:
lewo@...
Date:
2018-11-16 08:21:44 UTC
List:
ruby-core #89831
Issue #15304 has been updated by lewo (lewo lewo). nobu (Nobuyoshi Nakada) wrote: > Why are such files packaged? These files are written by `gem intall` in the directory specified by the `--install-dir` option. Distributions are taking this whole direcory to create the distribution package (`.deb` for instance). I think the `mkmf.log` should not be written in the `install-dir`. But what about the `Makefile`? Could it be still used after the ruby gem build? If not, it could also be removed from the `install-dir`. What do you think about removing these two files (`Makefile` and `mkmf.log`) from the `--install-dir` ? ---------------------------------------- Bug #15304: Package build with extensions is not reproducible https://bugs.ruby-lang.org/issues/15304#change-74890 * Author: lewo (lewo lewo) * Status: Third Party's Issue * Priority: Normal * Assignee: * Target version: * ruby -v: * Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN ---------------------------------------- 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` and `gem_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? [1] https://tests.reproducible-builds.org/archlinux/community/ruby-msgpack/ruby-msgpack-1.2.4-1-x86_64.pkg.tar.xz.html#ruby-msgpack--.-.----x--_--.pkg.tar---usr-lib-ruby-gems--.-.--gems-msgpack--.-.--ext-msgpack-Makefile -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>