"gem unpack" support in RPM's %setup macro

Vít Ondruch vondruch at redhat.com
Tue Nov 10 16:31:45 UTC 2015

Dne 10.11.2015 v 15:52 Vít Ondruch napsal(a):
> Hi guys,
> For a long time, I thought that it would be interesting to have .gem
> expansion support in %setup macro. This would simply our .spec files a
> bit. Finally, I gave a go to this idea and proposed this to RPM upstream
> [1]. Please let me know (preferably via the PR) if you can foresee any
> issues with this approach.
> Thanks.
> Vít
> [1] https://github.com/rpm-software-management/rpm/pull/27

Just as an example, this would be the .spec file difference for

$ git diff
diff --git a/rubygem-sqlite3.spec b/rubygem-sqlite3.spec
index 5f98c93..a2df0cd 100644
--- a/rubygem-sqlite3.spec
+++ b/rubygem-sqlite3.spec
@@ -34,15 +34,12 @@ BuildArch: noarch
 Documentation for %{name}
-gem unpack %{SOURCE0}
-%setup -q -D -T -n  %{gem_name}-%{version}
+%setup -q -n %{gem_name}-%{version}
 %patch0 -p1
-gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
-gem build %{gem_name}.gemspec
+gem build ../%{gem_name}-%{version}.gemspec

More information about the ruby-sig mailing list