Project

General

Profile

Actions

Bug #13417

closed

exts.mk installed into bundled gems

Added by vo.x (Vit Ondruch) about 7 years ago. Updated about 7 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.5.0dev (2017-04-07 trunk 58269) [x86_64-linux]
[ruby-core:80635]

Description

All bundled gems listed in gems/bundled_gems installs with exts.mk file. This should not happen IMO.

Updated by vo.x (Vit Ondruch) about 7 years ago

This was probably introduced in r57401 or subsequently in r57424?

Updated by nobu (Nobuyoshi Nakada) about 7 years ago

  • Status changed from Open to Feedback

I can't find those files.
What configuration options did you use?

Updated by vo.x (Vit Ondruch) about 7 years ago

Originally I tried the configuration options used by Fedora package 1, but now I am going with default values for Fedora package:

$ ./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info

... snip ...

---
Configuration summary for ruby version 2.5.0

   * Installation prefix: /usr
   * exec prefix:         /usr
   * arch:                x86_64-linux
   * site arch:           ${arch}
   * RUBY_BASE_NAME:      ruby
   * ruby lib prefix:     ${libdir}/${RUBY_BASE_NAME}
   * site libraries path: ${rubylibprefix}/${sitearch}
   * vendor path:         ${rubylibprefix}/vendor_ruby
   * target OS:           linux
   * compiler:            gcc
   * with pthread:        yes
   * enable shared libs:  no
   * dynamic library ext: so
   * CFLAGS:              ${optflags} ${debugflags} ${warnflags}
   * LDFLAGS:             -L. -Wl,-z,relro \
                          -specs=/usr/lib/rpm/redhat/redhat-hardened-ld \
                          -fstack-protector -rdynamic -Wl,-export-dynamic
   * optflags:            -O3 -fno-fast-math
   * debugflags:          -ggdb3
   * warnflags:           -Wall -Wextra -Wno-unused-parameter \
                          -Wno-parentheses -Wno-long-long \
                          -Wno-missing-field-initializers \
                          -Wno-tautological-compare \
                          -Wno-parentheses-equality \
                          -Wno-constant-logical-operand -Wno-self-assign \
                          -Wunused-variable -Werror=implicit-int \
                          -Werror=pointer-arith -Werror=write-strings \
                          -Werror=declaration-after-statement \
                          -Werror=implicit-function-declaration \
                          -Werror=deprecated-declarations \
                          -Wno-packed-bitfield-compat \
                          -Wsuggest-attribute=noreturn \
                          -Wsuggest-attribute=format \
                          -Wimplicit-fallthrough=0
   * strip command:       strip -S -x
   * install doc:         yes
   * man page type:       doc

---

Without any patch etc and the result is still the same:

$ make install DESTDIR=/builddir/build/BUILDROOT/ruby-2.5.0-0.1.r58269.fc27.x86_64

$ cd builddir/build/BUILDROOT/

$ find . -name exts.mk
./ruby-2.5.0-0.1.r58269.fc27.x86_64/usr/lib64/ruby/gems/2.5.0/gems/rake-12.0.0/exts.mk
./ruby-2.5.0-0.1.r58269.fc27.x86_64/usr/lib64/ruby/gems/2.5.0/gems/power_assert-1.0.1/exts.mk
./ruby-2.5.0-0.1.r58269.fc27.x86_64/usr/lib64/ruby/gems/2.5.0/gems/test-unit-3.2.3/exts.mk
./ruby-2.5.0-0.1.r58269.fc27.x86_64/usr/lib64/ruby/gems/2.5.0/gems/minitest-5.10.1/exts.mk
./ruby-2.5.0-0.1.r58269.fc27.x86_64/usr/lib64/ruby/gems/2.5.0/gems/xmlrpc-0.2.1/exts.mk
./ruby-2.5.0-0.1.r58269.fc27.x86_64/usr/lib64/ruby/gems/2.5.0/gems/net-telnet-0.1.1/exts.mk
./ruby-2.5.0-0.1.r58269.fc27.x86_64/usr/lib64/ruby/gems/2.5.0/gems/did_you_mean-1.1.0/exts.mk

Updated by vo.x (Vit Ondruch) about 7 years ago

I put together this patch 1, which should avoid installation of the exts.mk.

The idea is, that only the files which are shipped in the original .gem package and thus referenced in its .gemspec file should be installed. This avoids installation of exts.mk into the destination. If the bundled gem had binary extension, it also avoids installation of the compilation output etc, but I don't consider this to be problems since (1) there is no bundled gem with binary extension ATM (2) the binary extensions are special case anyway and neither the current code handles them well.

Actions #5

Updated by nobu (Nobuyoshi Nakada) about 7 years ago

  • Status changed from Feedback to Closed

Applied in changeset trunk|r58318.


Install only files explicitly referenced by bundled gems.

[Bug #13417]
[Fix GH-1580]
Author: Vít Ondruch

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0