[opensuse-packaging] Overriding a "Requires" in a rubygem package
Hi guys, I am trying to get vagrant-libvirt installable via RPM (so that it is found by vagrant and does not need to be installed via 'vagrant plugin'). Currently, Tumbleweed contains 2.1.0 of rubygem-fog-core, while rubygem-vagrant-libvirt requires 1.43. So, I tried to override this and try if everything falls apart, rather than create another versioned rubygem and get that into Factory... But it does not work. https://build.opensuse.org/package/show/home:ojkastl_buildservice:branches:V... I added a patch 0001-change-dependency-for-fog-core-to-2.1.0.patch that changes the versions in the gemspec file, and added it to the spec via the gem2rpm.yml: :patches: 0001-change-dependency-for-fog-core-to-2.1.0.patch: -p1 This resulted in the following lines in the spec file: %prep %gem_unpack %patch0 -p1 find -type f -print0 | xargs -0 touch -r %{S:0} %gem_build But still somehow 1.43 ends up being required: ######################################################################## sudo zypper in ruby2.5-rubygem-vagrant-libvirt-0.0.43-4.1 Loading repository data... Reading installed packages... Resolving package dependencies... Problem: nothing provides rubygem(ruby:2.5.0:fog-core:1.43) >= 1.43 needed by ruby2.5-rubygem-vagrant-libvirt-0.0.43-4.1.x86_64 ######################################################################## Is there some mechanism that I am overlooking, that dynamically generates the dependencies and does not respect the gemspec file containing my changes? Thanks in advance. Kind Regards, Johannes -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
On Jul 30 2018, Johannes Kastl <kastl@b1-systems.de> wrote:
I added a patch 0001-change-dependency-for-fog-core-to-2.1.0.patch that changes the versions in the gemspec file, and added it to the spec via the gem2rpm.yml: :patches: 0001-change-dependency-for-fog-core-to-2.1.0.patch: -p1
This resulted in the following lines in the spec file:
%prep %gem_unpack %patch0 -p1 find -type f -print0 | xargs -0 touch -r %{S:0} %gem_build
But still somehow 1.43 ends up being required:
There is a reference to fog-core in the metadata, too. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Andreas Schwab schrieb:
There is a reference to fog-core in the metadata, too.
Sorry, but which metadata are you talking about? The metadata.gz inside the gem-file? Do you know a way to modify that one? Johannes -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
Johannes Kastl schrieb:
Do you know a way to modify that one?
sed to the rescue: sed -i '/fog-core/s/1\.43\.0/2.1.0/' vagrant-libvirt-0.0.43.gemspec Inserted before the %gem_build macro, works. And now the package can be installed with the fog-core version currently available in d:l:r:e. I'll check if it actually works and will then decide, whether or not a versioned rubygem package for fog-core 1.43 is still needed... Johannes -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
participants (2)
-
Andreas Schwab
-
Johannes Kastl