Building a 32-bit RPM on a 64-bit machine?
Hello again, I would like to be able to create a 32-bit RPM (with no 64-bit library dependencies) on a 64-bit machine. I have a 64-bit, SuSE development machine, and I would like to create an RPM on this 64-bit machine that will install 32-bit software on a 32-bit SuSE machine. Any ideas on the correct way for me to proceed? Thanks for any and all guidance! Joe P.S. Thanks very much Jeff for the answer to my Creating an RPM to install a daemon question. -- __ RPM Package Managerhttp://rpm5.org User Communication List rpm-users@rpm5.org
Re: Building a 32-bit RPM on a 64-bit machine?
On Fri, Oct 29, 2010 at 7:07 AM, Joe Flowers joe.flow...@nofreewill.comwrote: Hello again, I would like to be able to create a 32-bit RPM (with no 64-bit library dependencies) on a 64-bit machine. I have a 64-bit, SuSE development machine, and I would like to create an RPM on this 64-bit machine that will install 32-bit software on a 32-bit SuSE machine. Any ideas on the correct way for me to proceed? Thanks for any and all guidance! Joe P.S. Thanks very much Jeff for the answer to my Creating an RPM to install a daemon question. -- __ RPM Package Managerhttp://rpm5.org User Communication List rpm-users@rpm5.org Joe, I use a 32bit chroot to build all my 32bit rpms along side the 64bit rpms. You will also need to use something like linux32 rpmbuild -ba pkgname.spec to trick some packages that check uname. Matt
Re: Creating an RPM to install a daemon
On Thu, Oct 28, 2010 at 5:10 PM, Joe Flowers joe.flow...@nofreewill.comwrote: Hello Everyone, I am trying to create an RPM that will install a daemon correctly, but I'm not sure if or where I should put the command: chkconfig --level 345 /etc/rc.d/mydaemon on Should this line go somewhere in the Makefile (like the install section), or should it go in the RPM .spec file somewhere? Is there some other command I should use rather than this external chkconfig program? If you want to use the fedora way to do packaging http://fedoraproject.org/wiki/Packaging/SysVInitScript https://fedoraproject.org/wiki/Packaging/ScriptletSnippets http://fedoraproject.org/wiki/Packaging/Guidelines the standard way is (example squid with some my comment) .. Requires(post): /sbin/chkconfig Requires(preun): /sbin/service /sbin/chkconfig Requires(postun): /sbin/service . .. %post /sbin/chkconfig --add squid %preun #last removal if [ $1 = 0 ] ; then service squid stop /dev/null 21 rm -f /var/log/squid/* /sbin/chkconfig --del squid fi %postun #restart the service if it was already running, in update only if [ $1 -ge 1 ] ; then service squid condrestart /dev/null 21 fi If you were curious of why there are if condition based on the number of package installed ($1) that it's because in update RPM performs the following sequence of actions (the install-before-remove sequence tipical of RPM) * Run%pre of new package * Install new files * Run% post of new package * Run% preun of old package * Delete any old files not overwritten by newer ones * Run% postun of old package best regards Thanks! Joe --- __ RPM Package Managerhttp://rpm5.org User Communication List rpm-users@rpm5.org
Re: Building a 32-bit RPM on a 64-bit machine?
It depends if your package use autoconf,automake,libtool or not. BTW, the standard way is setarch i386 rpmbuild --target=i386 --rebuild pippo.src.rpm, or better use an automated tool that do this as mock, for examplehttp://fedoraproject.org/wiki/Projects/Mock. http://fedoraproject.org/wiki/Projects/Mock Regards On Fri, Oct 29, 2010 at 3:07 PM, Joe Flowers joe.flow...@nofreewill.comwrote: Hello again, I would like to be able to create a 32-bit RPM (with no 64-bit library dependencies) on a 64-bit machine. I have a 64-bit, SuSE development machine, and I would like to create an RPM on this 64-bit machine that will install 32-bit software on a 32-bit SuSE machine. Any ideas on the correct way for me to proceed? Thanks for any and all guidance! Joe P.S. Thanks very much Jeff for the answer to my Creating an RPM to install a daemon question. -- __ RPM Package Managerhttp://rpm5.org User Communication List rpm-users@rpm5.org
Re: Building a 32-bit RPM on a 64-bit machine?
On Fri, 29 Oct 2010, Matthew Dawkins wrote: On Fri, Oct 29, 2010 at 7:07 AM, Joe Flowers joe.flow...@nofreewill.comwrote: Joe, I use a 32bit chroot to build all my 32bit rpms along side the 64bit rpms. You will also need to use something like linux32 rpmbuild -ba pkgname.spec to trick some packages that check uname. and as an alternative, we run both 64 bit and 32 bit domU on a 64 bit dom0, and build in each without having to 'jump through hoops' -- Russ herrold __ RPM Package Managerhttp://rpm5.org User Communication List rpm-users@rpm5.org
Re: Building a 32-bit RPM on a 64-bit machine?
On Oct 29, 2010, at 9:07 AM, Joe Flowers wrote: Hello again, I would like to be able to create a 32-bit RPM (with no 64-bit library dependencies) on a 64-bit machine. I have a 64-bit, SuSE development machine, and I would like to create an RPM on this 64-bit machine that will install 32-bit software on a 32-bit SuSE machine. SuSE does multilib differently than RedHat afaik. IIRC, there are 3 products 1) ELF32 only 2) ELF64 only 3) multilib. What's missing is all the needed other persuasion packages on 1) and 2). So what you want is no different than setting up a cross-compiler, or other wise setting up host - target infrastucture. But its rather easy to set up whatever you need with an install into a chroot(2). That does need root access to execute chrott(2). 73 de Jeff __ RPM Package Managerhttp://rpm5.org User Communication List rpm-users@rpm5.org