Jelle B.
2012-Oct-29 09:46 UTC
[Puppet Users] RHEL 6 Protected multilib versions Requirment to have both 32 and 64 bit libs installed.
Hi I have seen numerous posts via Google saying this is an issue but not found a puppet based solution for it. Does anyone have an idea how I can make this work ? I do realize I am looking at separate versions and was playing with the idea to force a more locked down versioning to keep them the same but no idea if I can even do this. below the error : (/Stage[main]/Libstdc/Package[libstdc++.i686]/ensure) change from absent to present failed: Execution of ''/usr/bin/yum -d 0 -e 0 -y install libstdc++.i686'' returned 1: Error: Protected multilib versions: libstdc++-4.4.6-4.el6.i686 != libstdc++-4.4.6-3.el6.x86_64#012 You could try using --skip-broken to work around the problem#012 You could try running: rpm -Va --nofiles --nodigest the .pp : class libstdc { Class["rhn"]->Class["libstdc"] package { "libstdc++.i686": ensure => installed, } package { "libstdc++": ensure => installed, } } -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/LcoLU6kHPtoJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
jcbollinger
2012-Oct-29 13:49 UTC
[Puppet Users] Re: RHEL 6 Protected multilib versions Requirment to have both 32 and 64 bit libs installed.
On Monday, October 29, 2012 4:46:56 AM UTC-5, Jelle B. wrote:> > Hi I have seen numerous posts via Google saying this is an issue but not > found a puppet based solution for it. > > Does anyone have an idea how I can make this work ? I do realize I am > looking at separate versions and was playing with the idea to force a more > locked down versioning to keep them the same but no idea if I can even do > this. > > below the error : > > (/Stage[main]/Libstdc/Package[libstdc++.i686]/ensure) change from absent > to present failed: Execution of ''/usr/bin/yum -d 0 -e 0 -y install > libstdc++.i686'' returned 1: Error: Protected multilib versions: > libstdc++-4.4.6-4.el6.i686 != libstdc++-4.4.6-3.el6.x86_64#012 You could > try using --skip-broken to work around the problem#012 You could try > running: rpm -Va --nofiles --nodigest > > the .pp : > > class libstdc { > > Class["rhn"]->Class["libstdc"] > > package { "libstdc++.i686": > ensure => installed, > } > > package { "libstdc++": > ensure => installed, > } > > } > >A setup like that is bound to cause you trouble in Puppet, because Puppet''s yum and rpm Package providers don''t recognize the architecture as part of the resource title. Because Puppet will pass it through to yum, you can, in some circumstances, get it to install the package that way, but Puppet will try to do so again on every run because it will not recognize the package as already installed. In your particular case, you also have trouble because Puppet manages each package via a separate yum / rpm / whatever command. If you were manually doing what you want Puppet to do for you, you would probably name both packages in one yum command, and it would work. If you always want the multilib behavior you''re asking about, then your best bet (for several reasons) would be to update your yum configuration to say so. The setting you are looking for is ''multilib_policy'' in the [main] section of /etc/yum.conf. Set it to "all" (default is "best" in recent RHEL / CentOS / etc.). Having done that, just manage packages by name without worrying about architecture. You can and probably should manage that file via Puppet if you''re going to use it to get the behavior you want; in that case you should set up relationships between your Packages and that File to ensure that the file is managed first. On the other hand, you really shouldn''t need to worry about this sort of question if you are making good use of your package management system. Yum will install appropriate packages for your architecture, and when it does so it will install the packages for any needed libraries, accounting for architecture. Only if you throw pre-built but unpackaged software into the mix do you need to pay attention to installing specific-architecture packages. So don''t do that if you can possibly avoid it. If necessary, you can often wrap a third-party, binary-only software distributions into RPMs. Doing so is actually much easier than the standard approach of building the software from source via the RPM system, and it gets you a package that is easy to install and remove, and that declares its dependencies in a way that yum and the RPM system can read and evaluate (the RPM build system automatically scans the files to install for library dependencies). John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/LfSG5T15AcUJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Tim Mooney
2012-Oct-29 19:43 UTC
Re: [Puppet Users] RHEL 6 Protected multilib versions Requirment to have both 32 and 64 bit libs installed.
In regard to: [Puppet Users] RHEL 6 Protected multilib versions Requirment...:> (/Stage[main]/Libstdc/Package[libstdc++.i686]/ensure) change from absent to > present failed: Execution of ''/usr/bin/yum -d 0 -e 0 -y install > libstdc++.i686'' returned 1: Error: Protected multilib versions: > libstdc++-4.4.6-4.el6.i686 != libstdc++-4.4.6-3.el6.x86_64#012 You could > try using --skip-broken to work around the problem#012 You could try > running: rpm -Va --nofiles --nodigest > > the .pp : > > class libstdc { > > Class["rhn"]->Class["libstdc"]Are you really intending to have Class[''rhn''] applied *before* Class[''libstdc''], because that''s what your arrow chaining says. I would assume you''re trying to install both archs because RHN Satellite needs both but doesn''t have the 32 bit version as an explicit dependency. If that''s the case, you should swap what side of the -> the two classes are on.> package { "libstdc++.i686": > ensure => installed, > } > > package { "libstdc++": > ensure => installed, > }As John said, your best bet is to get the 32 bit version installed because of a dependency of something else. It''s frankly ridiculous that Red Hat provides a product that doesn''t do this correctly, but we can work around that, even without having to try repackage RHN Satellite. This can be done very easily by creating a package that contains no files at all, but lists other packages as requirements. The trick is to have empty %prep/%build/%install/%files sections of your spec file, but list either - package names - exact shared library SONAMES - (as a last resort) full paths to a file or library in the "Requires:" entries for the RPM. An example spec file you might start with to build an RPM is included after my signature. You would just need a RHEL box with the ''rpm-build'' package installed, something like rpmbuild -ba -v rhn-satellite-32bit-deps.spec and then you put that package in your local repo and have puppet package { ''rhn-satellite-32bit-deps'': ensure => installed, } This virtual package then pulls in whatever dependencies you have listed. Tim -- Tim Mooney Tim.Mooney@ndsu.edu Enterprise Computing & Infrastructure 701-231-1076 (Voice) Room 242-J6, IACC Building 701-231-8541 (Fax) North Dakota State University, Fargo, ND 58105-5164 Summary: pull in the 32 bit dependencies for RHN Satellite Name: rhn-satellite-32bit-deps Version: 1.0 Release: 1 Group: Local/Whatever License: Copyright (C) your organization here URL: http://yourcompany/whatever/you/want/here Vendor: Your Company and possibly OU here Distribution: Your distribution name here # # Preference #1: require package names, like "make" or "kernel-headers" # #Requires: # # If you need specific SONAME and arch for a library, that can be # accomplished like this # # the 32 bit version Requires: libstdc++.so.6 # the 64 bit version #Requires: libstdc++.so.6()(64bit) # # Last resort, only use if others don''t work: specify a full path to the file # that some other RPM should be installing. This can generally be # accomplished better by using a package name instead. # #Requires: /usr/bin/bash %description This package contains no files. It exists solely to specify other packages that should be installed when this virtual package is installed. %prep # no software to extract and prepare for compilation exit 0 %build # nothing to build exit 0 %install # nothing to install exit 0 %files # no files contained in this RPM. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.