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.
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.
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}
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.
The arguments here means like -d or -n option in %gem_install.
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.
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.
I don't think I am going to change this in near term. Please reopen should this be still issue for you.