[Rpm-maint] Planning for rpm 4.13.0 (-rc2)

Thierry Vignaud thierry.vignaud at gmail.com
Mon Oct 17 13:07:46 UTC 2016


On 17 October 2016 at 12:06, Vít Ondruch <vondruch at redhat.com> wrote:
> Dne 17.10.2016 v 11:30 Thierry Vignaud napsal(a):
>> On 17 October 2016 at 10:10, Panu Matilainen <pmatilai at laiskiainen.org> wrote:
>>>> What is the chance to get [1, 2] into the release? I mildly remember,
>>>> that once I was offered to get this patch into Fedora, but that never
>>>> materialized and now it is almost a year. I don't think this is
>>>> controversial change which should make anything break.
>>>>
>>>> Thx for considering.
>>>>
>>>>
>>>> Vít
>>>>
>>>>
>>>> [1] https://github.com/rpm-software-management/rpm/pull/27
>>>> [2]
>>>>
>>>> https://github.com/rpm-software-management/rpm/commit/89d1dd0a7c63c7497d334e9f240ce7e36ca89434
>>>
>>> Hmm, that has actually been in Mageia for over a year so it's certainly
>>> gotten its share of soak-time (so at least it's not breaking anything else)
>>> and people are probably depending on it in Mageia so it'd be a reasonable
>>> candidate.
>> Actually, it's been here at least in Mageia from much more earlier:
>> http://svnweb.mageia.org/packages/cauldron/rpm/current/SOURCES/rpm-4.6.1-setup-rubygems.patch?view=markup&pathrev=343
>>
>> I think the original patch went in in October 2010, previously we were
>> using a separate %gem_unpack macro
>>
>> But it's not the same implementation as the one that has been merged
>> in master. Mageia one is:
>> http://svnweb.mageia.org/packages/cauldron/rpm/current/SOURCES/rpm-4.12.90-setup-rubygems.patch?revision=860276&view=markup
>>
>> But if it works the same, Mageia will be happy to drop one more patch :-)
>
> They are a bit different indeed. These are two main differences I can see:
>
> 1) The upstream patch is using 'gem' command to unpack the sources
> instead of using 'tar'. The advantage of this approach is that it should
> be always able to unpack every gem. Please note that historically, the
> .gem format was internally different and the format might change again
> in the future. The disadvantage is the dependency on external tool, but
> this is just soft dependency, since RPM can handle the missing 'gem'
> command gracefully.
>
> 2) There is provided the %{gem_name}.gemspec file alongside the unpacked
> code, which is in Fedora used to repackage patched gem, prior installation.

As it turns out, there's at least one other difference which breaks
build for us:
eg for ruby-gemcutter
(http://svnweb.mageia.org/packages/cauldron/ruby-gemcutter/current/SPECS/ruby-gemcutter.spec?revision=947391&view=markup)
our implementation creates eg:
BUILD/ruby-gemcutter-0.7.1
whereas the patch merged upstream creates eg:
BUILD/gemcutter-0.7.1

This breaks the couple packages I tried.
This would need to patch the macros we ships with ruby-RubyGems
(see attached rubygems.macros.diff)

Then the build succeeds
(see attached build.diff)
-------------- next part --------------
--- /tmp/rubygems.macros	2016-10-17 14:35:07.904237907 +0200
+++ /etc/rpm/macros.d/rubygems.macros	2016-10-17 14:43:29.890878794 +0200
@@ -13,8 +13,7 @@
 %gem_name %{?oname}%{!?oname:%(echo %{name}|cut -d\- -f2-)}
 
 %gem_setup \
-%setup -q \
-tar xmf data.tar.gz \
+%setup -q -n %{gem_name}-%{version} \
 if [ ! -f %{gem_name}.gemspec ]; then \
         %{_bindir}/gem specification -l --ruby %{SOURCE0} > %{gem_name}.gemspec \
 fi \
-------------- next part --------------
--- LOG1	2016-10-17 14:26:05.103145564 +0200
+++ LOG2	2016-10-17 14:43:37.727029153 +0200
@@ -5,29 +5,29 @@
 processing package ruby-gemcutter-0.7.1-%mkrel 12
 building binary packages
 succeeded!
-Executing(%prep): /bin/sh -e /home/tv/mga/pkgs/N/ruby-gemcutter/BUILDROOT/rpm-tmp.2jNRu2
+Executing(%prep): /bin/sh -e /home/tv/mga/pkgs/N/ruby-gemcutter/BUILDROOT/rpm-tmp.4n5bXt
 + umask 022
 + cd /home/tv/mga/pkgs/N/ruby-gemcutter/BUILD
 + '[' 1 -eq 1 ']'
 + '[' 1 -eq 1 ']'
 + '[' 1 -eq 1 ']'
 + cd /home/tv/mga/pkgs/N/ruby-gemcutter/BUILD
-+ rm -rf ruby-gemcutter-0.7.1
-+ /usr/bin/mkdir -p ruby-gemcutter-0.7.1
-+ cd ruby-gemcutter-0.7.1
-+ /usr/bin/tar -xmof /home/tv/mga/pkgs/N/ruby-gemcutter/SOURCES/gemcutter-0.7.1.gem
-+ '[' -f data.tar.gz ']'
-+ tar -xmof data.tar.gz
++ rm -rf gemcutter-0.7.1
++ /usr/bin/gem unpack /home/tv/mga/pkgs/N/ruby-gemcutter/SOURCES/gemcutter-0.7.1.gem
+Unpacked gem: '/home/tv/mga/pkgs/N/ruby-gemcutter/BUILD/gemcutter-0.7.1'
++ /usr/bin/gem spec /home/tv/mga/pkgs/N/ruby-gemcutter/SOURCES/gemcutter-0.7.1.gem --ruby
++ STATUS=0
++ '[' 0 -ne 0 ']'
++ cd gemcutter-0.7.1
 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
-+ tar xmf data.tar.gz
 + '[' '!' -f gemcutter.gemspec ']'
 + /usr/bin/gem specification -l --ruby /home/tv/mga/pkgs/N/ruby-gemcutter/SOURCES/gemcutter-0.7.1.gem
 + sed -i -e 's/`git ls-files`/`find -type f`/' -e 's/`git ls-files -- \(.*\)`/`find \1 -type f`/' -e 's/`git ls-files \(.*\)`/`find \1 -type f`/' -e 's/ s.version = .*/ s.version = "0.7.1"/' gemcutter.gemspec
 + exit 0
-Executing(%build): /bin/sh -e /home/tv/mga/pkgs/N/ruby-gemcutter/BUILDROOT/rpm-tmp.Wm8fQU
+Executing(%build): /bin/sh -e /home/tv/mga/pkgs/N/ruby-gemcutter/BUILDROOT/rpm-tmp.Hn33Rp
 + umask 022
 + cd /home/tv/mga/pkgs/N/ruby-gemcutter/BUILD
-+ cd ruby-gemcutter-0.7.1
++ cd gemcutter-0.7.1
 + '[' 1 -eq 1 ']'
 + '[' 1 -eq 1 ']'
 + '[' '!' -f gemcutter.gemspec ']'
@@ -58,7 +58,7 @@
   Version: 0.7.1
   File: gemcutter-0.7.1.gem
 + exit 0
-Executing(%install): /bin/sh -e /home/tv/mga/pkgs/N/ruby-gemcutter/BUILDROOT/rpm-tmp.D9xmAN
+Executing(%install): /bin/sh -e /home/tv/mga/pkgs/N/ruby-gemcutter/BUILDROOT/rpm-tmp.fdASam
 + umask 022
 + cd /home/tv/mga/pkgs/N/ruby-gemcutter/BUILD
 + '[' 1 -eq 1 ']'
@@ -67,7 +67,7 @@
 ++ dirname /home/tv/mga/pkgs/N/ruby-gemcutter/BUILDROOT/ruby-gemcutter-0.7.1-12.mga6.x86_64
 + mkdir -p /home/tv/mga/pkgs/N/ruby-gemcutter/BUILDROOT
 + mkdir /home/tv/mga/pkgs/N/ruby-gemcutter/BUILDROOT/ruby-gemcutter-0.7.1-12.mga6.x86_64
-+ cd ruby-gemcutter-0.7.1
++ cd gemcutter-0.7.1
 + '[' 1 -eq 1 ']'
 + /usr/bin/gem install gemcutter-0.7.1.gem --local --env-shebang --rdoc --ri --force --ignore-dependencies --install-dir /home/tv/mga/pkgs/N/ruby-gemcutter/BUILDROOT/ruby-gemcutter-0.7.1-12.mga6.x86_64/usr/share/gems --bindir /home/tv/mga/pkgs/N/ruby-gemcutter/BUILDROOT/ruby-gemcutter-0.7.1-12.mga6.x86_64/usr/bin
 ********************************************************************************
@@ -88,7 +88,7 @@
 1 gem installed
 + rm -fr /home/tv/mga/pkgs/N/ruby-gemcutter/BUILDROOT/ruby-gemcutter-0.7.1-12.mga6.x86_64/usr/share/gems/cache /home/tv/mga/pkgs/N/ruby-gemcutter/BUILDROOT/ruby-gemcutter-0.7.1-12.mga6.x86_64/usr/share/gems/extensions /home/tv/mga/pkgs/N/ruby-gemcutter/BUILDROOT/ruby-gemcutter-0.7.1-12.mga6.x86_64/usr/share/gems/gems/gemcutter-0.7.1/ext /home/tv/mga/pkgs/N/ruby-gemcutter/BUILDROOT/ruby-gemcutter-0.7.1-12.mga6.x86_64/usr/share/gems/gems/gemcutter-0.7.1/gemcutter.gemspec
 + rm -f /home/tv/mga/pkgs/N/ruby-gemcutter/BUILDROOT/ruby-gemcutter-0.7.1-12.mga6.x86_64/usr/lib64/gems/ruby/gemcutter-0.7.1/gem_make.out /home/tv/mga/pkgs/N/ruby-gemcutter/BUILDROOT/ruby-gemcutter-0.7.1-12.mga6.x86_64/usr/lib64/gems/ruby/gemcutter-0.7.1/mkmf.log
-+ /usr/lib/rpm/find-debuginfo.sh --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 10000000 -m /home/tv/mga/pkgs/N/ruby-gemcutter/BUILD/ruby-gemcutter-0.7.1
++ /usr/lib/rpm/find-debuginfo.sh --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 10000000 -m /home/tv/mga/pkgs/N/ruby-gemcutter/BUILD/gemcutter-0.7.1
 
 + '[' -n '' ']'
 + /usr/share/spec-helper/clean_files
@@ -132,10 +132,10 @@
 Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/tv/mga/pkgs/N/ruby-gemcutter/BUILDROOT/ruby-gemcutter-0.7.1-12.mga6.x86_64
 Wrote: /home/tv/mga/pkgs/N/ruby-gemcutter/RPMS/noarch/ruby-gemcutter-0.7.1-12.mga6.noarch.rpm
 Wrote: /home/tv/mga/pkgs/N/ruby-gemcutter/RPMS/noarch/ruby-gemcutter-doc-0.7.1-12.mga6.noarch.rpm
-Executing(%clean): /bin/sh -e /home/tv/mga/pkgs/N/ruby-gemcutter/BUILDROOT/rpm-tmp.WQEGNL
+Executing(%clean): /bin/sh -e /home/tv/mga/pkgs/N/ruby-gemcutter/BUILDROOT/rpm-tmp.mCKUHn
 + umask 022
 + cd /home/tv/mga/pkgs/N/ruby-gemcutter/BUILD
-+ cd ruby-gemcutter-0.7.1
++ cd gemcutter-0.7.1
 + /usr/bin/rm -rf /home/tv/mga/pkgs/N/ruby-gemcutter/BUILDROOT/ruby-gemcutter-0.7.1-12.mga6.x86_64
 + exit 0
 rpmlint ***********************************************************************


More information about the Rpm-maint mailing list