Bug 1121649

Summary: RFE - drop %{nil} from end of %{gem_install}
Product: [Fedora] Fedora Reporter: Steve Traylen <steve.traylen>
Component: rubyAssignee: Jeroen van Meeuwen <vanmeeuwen+fedora>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: bkabrda, hhorak, mmorsi, mtasaka, s, steve.traylen, tagoh, tross, vanmeeuwen+fedora, vondruch
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-25 16:13:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Steve Traylen 2014-07-21 13:28:53 UTC
I want to add some extra options to a %{gem_install}.

within

rpm -qf /etc/rpm/macros.rubygems 
rubygems-devel-2.1.11-115.fc20.noarch

at least

%gem_install is defined as 

%gem_install(d:n:) \
mkdir -p %{-d*}%{!?-d:.%{gem_dir}} \
\
CONFIGURE_ARGS="--with-cflags='%{optflags}' $CONFIGURE_ARGS" \\\
gem install \\\
        -V \\\
        --local \\\
        --install-dir %{-d*}%{!?-d:.%{gem_dir}} \\\
        --bindir .%{_bindir} \\\
        --force \\\
        --document=ri,rdoc \\\
        --backtrace \\\
        %{-n*}%{!?-n:%{gem_name}-%{version}.gem} \
%{nil}


with that explicit blank line in. This makes it "hard" to add
another option. e.g for rubygem-gpgme which I am looking at you have
to do

%global my_gem_install %(echo '%{gem_install}' |  sed '/^$/d')

%install

%my_gem_install -- --use-system-libraries

Obviously it looks like this %{nil} was added on purpose but this
is inconsistent with %{make}, %{configure}, .. where you can add extra
options.

Steve.

Comment 1 Vít Ondruch 2014-07-21 13:52:19 UTC
This was the commit which introduced the %{nil}:

http://pkgs.fedoraproject.org/cgit/ruby.git/commit/?id=a9ecc1d6877a484225c25217aa4ed00ae9890cb0

As far as I remember, prior this change was introduced, there had been issues with lines such as:

%{gem_install}
echo 'some other sommand here'

In this case, RPM squashed the 'echo' commnad to the gem install command, which was not working correctly.

Of course I might remember incorrectly, or I might be totally wrong. Since I understand your usecase and I'd love to see it supported, I am open to any suggesting, which would resolve this matter.

Comment 2 Steve Traylen 2014-07-22 10:11:21 UTC
I can't think why

%{gem_install}
echo 'X'

would go wrong assuming both the %{nil} and '\' are removed as
were added in the commit?

Looking at e.g configure 


# The configure macro should be invoked as %configure (rather than %{configure})
# because the rest of the arguments will be expanded using %*.

%configure \
  CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
  CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
  FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
  %{_configure} --host=%{_host} --build=%{_build} \\\
        --program-prefix=%{?_program_prefix} \\\
 ...
        --sharedstatedir=%{_sharedstatedir} \\\
        --mandir=%{_mandir} \\\
        --infodir=%{_infodir}

Comment 3 Mamoru TASAKA 2014-07-22 11:18:33 UTC
I have not examined this bug in detail yet, however there is a big difference between %configure and %gem_install in that %gem_install accepts "the arguments" while %configure does not.

Comment 4 Mamoru TASAKA 2014-07-22 11:21:19 UTC
The arguments here means like -d or -n option in %gem_install.

Comment 5 Fedora End Of Life 2015-05-29 12:25:47 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Fedora End Of Life 2016-11-24 11:11:30 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 7 Vít Ondruch 2016-11-25 16:13:21 UTC
I don't think I am going to change this in near term. Please reopen should this be still issue for you.