LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 06-17-2009, 01:32 PM   #1
pitbull7270
LQ Newbie
 
Registered: Feb 2009
Posts: 11

Rep: Reputation: 0
rpmbuild help with aix packages


I have been tasked with creating some RPMs for AIX. I am building the packages on RHEL 5.2 x86_64. While trying to build the packages using rpmbuild they are unable to install the packages on AIX unless they use --ignoreos. They do not want to use the ignoreos flag. What am I missing?

[root@rhel52 SPECS]# rpmbuild --target ppc64-ibm-AIX -bb test.spec

(root@hostname) /tmp # rpm -ivh test-1-1.noarch.rpm
package test-1-1 is for a different operating system
 
Old 06-18-2009, 09:48 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,688
Blog Entries: 54

Rep: Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955
If "--ignoreos" means wrong "--buildarch" or "--buildos" then posting your .spec %defines and 'rpm --showrc' could help?
 
Old 06-18-2009, 10:42 AM   #3
pitbull7270
LQ Newbie
 
Registered: Feb 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Here is the spec file, it is a test one right now to put a file on the server
[root@rhel52 SPECS]# cat test.spec
Summary: rpmbuild test
Name: test
Version: 1
Release: 1
Source: %{name}.tar
License: commercial
Group: System Environment/Utilities
Buildroot: %{_builddir}/%{name}-%{version}-root
#Requires: kickweb
AutoReqProv: no
Buildarch: noarch

%define __find_requires %{nil}
%define __find_depends %{nil}
%define __os_install_post %{nil}
%define _enable_debug_packages %{nil}
%define debug_package %{nil}

%description
test1
%prep
%setup -c
%build
%install
mkdir -p ${RPM_BUILD_ROOT}
cp -xav * ${RPM_BUILD_ROOT}/.
%clean
if [ "$RPM_BUILD_ROOT" != "" -a "$RPM_BUILD_ROOT" != "." -a \
"$RPM_BUILD_ROOT" != "/" ]
then
rm -rf $RPM_BUILD_ROOT
fi
%files
/usr/local/sbin/test
Attached Files
File Type: txt rpm-showrc.txt (23.7 KB, 4 views)
 
Old 06-18-2009, 11:10 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,688
Blog Entries: 54

Rep: Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955
I don't deal with AIX but somehow I get the idea stuff is mssing, like os_compat doesn't include aix.*? Could you please also post 'rpm --showrc' from one of your AIX?
 
Old 06-19-2009, 08:58 AM   #5
pitbull7270
LQ Newbie
 
Registered: Feb 2009
Posts: 11

Original Poster
Rep: Reputation: 0
I do see in the /usr/lib/rpm/rpmrc aix, ppc, and all the other os_canon, arch_canon, and os_compat lines. Attached is the output of the rpm --showrc on aix.
Attached Files
File Type: txt rpm-showrc-aix.txt (10.9 KB, 3 views)
 
Old 06-19-2009, 09:33 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,688
Blog Entries: 54

Rep: Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955
OK. Have a look at Building for other platforms of the rpm5.org RPM Guide: "Warning. Set the target with care. Make sure you can really build executable programs for that architecture. If you try to compile a system that uses the GNU configure system to configure the build, your target will likely be ignored", then move to Creating Non-Linux RPMS: " The key issues with cross-building are the following: *You must compile any executables with a cross compiler for the proper target platform. *You must set the target platform in the RPMs you build. *You must manage dependencies, and likely need to turn off the automatic generation of dependencies.".
Does the doc help you get started?
 
Old 06-19-2009, 10:08 AM   #7
pitbull7270
LQ Newbie
 
Registered: Feb 2009
Posts: 11

Original Poster
Rep: Reputation: 0
I read through a lot of the max rpm book and will do so again. I am not compiling any packages, just taking repositories of files and tarring up for placement on target systems. I will look through the link that you posted as well. I was just curious to see if anyone has gotten this to work, and what flags they used, or files they modified.
 
Old 06-19-2009, 10:46 AM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,688
Blog Entries: 54

Rep: Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955Reputation: 2955
Quote:
Originally Posted by pitbull7270 View Post
I am not compiling any packages, just taking repositories of files and tarring up for placement on target systems.
Ah, I see. That's not exactly what "creating some RPMs for AIX." and "I am building the packages" conveyed to me. Since you must set the target platform in the RPMs I guess the "Buildarch: noarch" should be aix6.1-something. If that isn't enough you'll have to find out exactly what "--target ppc64-ibm-AIX" should define and %_define it manually. Those defines you could read from your AIX --showrc output.
 
Old 07-13-2011, 04:12 PM   #9
rbolla
LQ Newbie
 
Registered: Jul 2011
Posts: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by pitbull7270 View Post
I have been tasked with creating some RPMs for AIX. I am building the packages on RHEL 5.2 x86_64. While trying to build the packages using rpmbuild they are unable to install the packages on AIX unless they use --ignoreos. They do not want to use the ignoreos flag. What am I missing?

[root@rhel52 SPECS]# rpmbuild --target ppc64-ibm-AIX -bb test.spec

(root@hostname) /tmp # rpm -ivh test-1-1.noarch.rpm
package test-1-1 is for a different operating system
Pitbull7270,
try using the actual aix version in the --target arg AIX5.3 or AIX6.1 or whatever the oS version is in your case.

--target ppc64-ibm-AIX5.3
or
--target ppc64-ibm-AIX6.1
 
  


Reply

Tags
aix, rhel, rpm, rpmbuild


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
not able to ftp from aix to aix server manoj.linux AIX 3 09-05-2008 01:15 AM
LXer: Java on AIX: Data Collection For AIX Core Dumps LXer Syndicated Linux News 0 05-17-2007 07:46 PM
AIX 4.3.2 Maintenance packages ? jamesps AIX 16 02-03-2005 02:02 PM
System hangs in update of AIX from 4.3.3 to AIX 5.2 jmurray67 AIX 2 07-25-2004 09:25 PM


All times are GMT -5. The time now is 08:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration