LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   rpmbuild help with aix packages (https://www.linuxquestions.org/questions/linux-software-2/rpmbuild-help-with-aix-packages-733660/)

pitbull7270 06-17-2009 12:32 PM

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

unSpawn 06-18-2009 08:48 AM

If "--ignoreos" means wrong "--buildarch" or "--buildos" then posting your .spec %defines and 'rpm --showrc' could help?

pitbull7270 06-18-2009 09:42 AM

1 Attachment(s)
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

unSpawn 06-18-2009 10:10 AM

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?

pitbull7270 06-19-2009 07:58 AM

1 Attachment(s)
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.

unSpawn 06-19-2009 08:33 AM

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?

pitbull7270 06-19-2009 09:08 AM

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.

unSpawn 06-19-2009 09:46 AM

Quote:

Originally Posted by pitbull7270 (Post 3579620)
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.

rbolla 07-13-2011 03:12 PM

Quote:

Originally Posted by pitbull7270 (Post 3577367)
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


All times are GMT -5. The time now is 03:34 AM.