Bug 1425220 - rubygem-rspec-support: RPM directory is different from directory used in prep/check
Summary: rubygem-rspec-support: RPM directory is different from directory used in prep...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: rubygem-rspec-support
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Mamoru TASAKA
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1419061
TreeView+ depends on / blocked
 
Reported: 2017-02-20 21:54 UTC by Jun Aruga
Modified: 2018-05-04 14:49 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-04 14:49:34 UTC
Type: Bug


Attachments (Terms of Use)

Description Jun Aruga 2017-02-20 21:54:40 UTC
Description of problem:

I found below patch was applied in prep section.
rubygem-rspec-support-3.6.0.beta2-fix-for-ruby-2.4.0.patch

This patch modifies lib/rspec/support/object_formatter.rb.

However the file in rubygem-rspec-support-3.5.0-2.fc26.noarch.rpm is not modified for the patch.


Why?
Because seeing build.log carefully.

%prep section => Apply patch for directory [A]
%build section => %gem_install => install files from [B] to [C] => patch in %prep section is not applied!
%check section => Test for directory [A] => the tests are passed by chance.

[A] /builddir/build/BUILD/rspec-support-3.5.0/rspec-support-3.5.0
[B] /builddir/build/BUILD/rspec-support-3.5.0/
[C] /builddir/build/BUILD/rspec-support-3.5.0/usr/share/gems/gems/rspec-support-3.5.0


Possible Solutions:

Below package's cases using *-tests.tar.gz file looks better instead of using rubygem-%{gem_name}-%{version}-full.tar.gz to prevent this kind of mistake?

- rubygem-flexmock
  http://pkgs.fedoraproject.org/cgit/rpms/rubygem-flexmock.git/tree/rubygem-flexmock.spec
  %{gem_name}-v%{version}-test-missing-files.tar.gz

- rubygem-activesupport
  http://pkgs.fedoraproject.org/cgit/rpms/rubygem-activesupport.git/tree/rubygem-activesupport.spec
  %{gem_name}-%{version}-tests.tgz


Version-Release number of selected component (if applicable):
rubygem-rspec-support-3.5.0-2.fc26


How reproducible:


Steps to Reproduce:
1. mock -r fedora-rawhide-x86_64 rubygem-rspec-support-3.5.0-2.fc26.src.rpm

To see files in RPM file.
2. rpm2cpio rubygem-rspec-support-3.5.0-2.fc26.noarch.rpm | cpio -idmv

Actual results:
Patches in %prep section are not applied.

Expected results:
Patches in %prep section are applied.


Additional info:

Not only rubygem-rspec-support, at least below packages might also have a same issue.

$ grep -r full.tar.gz */*.spec

- rubygem-byebug
- rubygem-rspec-core
- rubygem-rspec-expectations
- rubygem-rspec-mocks

Comment 1 Jun Aruga 2017-02-20 22:11:10 UTC
> - rubygem-byebug
> - rubygem-rspec-core
> - rubygem-rspec-expectations
> - rubygem-rspec-mocks

Hi Mamoru,
I am considering to create BZ tickets for these packages too, after I am going to talk with you about the solution.
1 BZ ticket for 1 package looks good.
I can help you to fix it in cooperation, if you like.

Comment 2 Mamoru TASAKA 2017-02-21 00:59:05 UTC
(In reply to Jun Aruga from comment #0)
> Description of problem:
> 
> I found below patch was applied in prep section.
> rubygem-rspec-support-3.6.0.beta2-fix-for-ruby-2.4.0.patch

Note that the above change is made by _you_.

(Patch0 is okay, this is meant to modify only test suite file)

Comment 4 Jun Aruga 2017-02-21 07:57:53 UTC
> https://bugzilla.redhat.com/show_bug.cgi?id=1419061#c1

Ah sorry I made mistake for fixing it.
I should not put %patch1 next line of %patch0.

 ( 
 cd %{gem_name}-%{version}
 %patch0 -p1
+%patch1 -p1
 )

Comment 5 Jun Aruga 2017-02-21 14:07:06 UTC
> - rubygem-rspec-support
> - rubygem-byebug
> - rubygem-rspec-core
> - rubygem-rspec-expectations

Thank you for your quick fixing, I checked above 4 packages have already been fixed.

> - rubygem-rspec-mocks

Comment 6 Fedora End Of Life 2017-02-28 12:23:49 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 7 Fedora End Of Life 2018-05-03 08:45:47 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. 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 '26'.

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 26 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 8 Jun Aruga 2018-05-04 14:49:34 UTC
> - rubygem-rspec-mocks

It looks fixed on rawhide and f26.


Note You need to log in before you can comment on or make changes to this bug.