LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 12: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, 08:48 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
If "--ignoreos" means wrong "--buildarch" or "--buildos" then posting your .spec %defines and 'rpm --showrc' could help?
 
Old 06-18-2009, 09: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, 34 views)
 
Old 06-18-2009, 10:10 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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, 07: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, 96 views)
 
Old 06-19-2009, 08:33 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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, 09: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, 09:46 AM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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, 03: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



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 12:15 AM
LXer: Java on AIX: Data Collection For AIX Core Dumps LXer Syndicated Linux News 0 05-17-2007 06:46 PM
AIX 4.3.2 Maintenance packages ? jamesps AIX 16 02-03-2005 01:02 PM
System hangs in update of AIX from 4.3.3 to AIX 5.2 jmurray67 AIX 2 07-25-2004 08:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:28 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
Open Source Consulting | Domain Registration