Linux RPMBuild issue
So I looked at that link and understand how the %setup macro works and fixed that, but now my rpmbuild is failing in the install section. I guess I'm not clear on how to get my source file mike.tar.gz into the build directory when I don't know what the pathway will be beforehand. Any help is appreciated.
SPEC FILE
Summary: My first rpm script package
Name: MikeMntr
Version: 1
Release: 1
Source0: mike.tar.gz
License: GPL
Group: MyJunk
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-buildroot
%description
Make some relevant package description here
%prep
%setup -n mikerpm
%build
%install
tar -zxpf $RPM_BUILD_ROOT/mike.tar.gz -C"/tmp/"
%clean
rm -rf $RPM_BUILD_ROOT
%post
echo " "
echo "This will display after rpm installs the package!"
%files
%dir /tmp/mikerpm
/tmp/mikerpm/test.txt
MY RPMBUILD OUTPUT
$rpmbuild -ba ../SPECS/mike2.spec
Executing(%prep): /bin/sh -e /appl/jrpm/rpmbuild/tmp/rpm-tmp.8z7gtK
+ umask 022
+ cd /appl/jrpm/rpmbuild/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /appl/jrpm/rpmbuild/BUILD
+ rm -rf mikerpm
+ /usr/bin/gzip -dc /appl/jrpm/rpmbuild/SOURCES/mike.tar.gz
+ /bin/tar -xvvf -
drwxrwxr-x jrpm/jrpm 0 2013-05-15 13:38 mikerpm/
-rw-rw-r-- jrpm/jrpm 21 2013-05-15 13:38 mikerpm/test.txt
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd mikerpm
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /appl/jrpm/rpmbuild/tmp/rpm-tmp.ErHqWh
+ umask 022
+ cd /appl/jrpm/rpmbuild/BUILD
+ cd mikerpm
+ LANG=C
+ export LANG
+ unset DISPLAY
+ exit 0
Executing(%install): /bin/sh -e /appl/jrpm/rpmbuild/tmp/rpm-tmp.S5rorP
+ umask 022
+ cd /appl/jrpm/rpmbuild/BUILD
+ '[' /appl/jrpm/rpmbuild/BUILDROOT/MikeMntr-1-1.x86_64 '!=' / ']'
+ rm -rf /appl/jrpm/rpmbuild/BUILDROOT/MikeMntr-1-1.x86_64
++ dirname /appl/jrpm/rpmbuild/BUILDROOT/MikeMntr-1-1.x86_64
+ mkdir -p /appl/jrpm/rpmbuild/BUILDROOT
+ mkdir /appl/jrpm/rpmbuild/BUILDROOT/MikeMntr-1-1.x86_64
+ cd mikerpm
+ LANG=C
+ export LANG
+ unset DISPLAY
+ tar -zxpf /appl/jrpm/rpmbuild/BUILDROOT/MikeMntr-1-1.x86_64/mike.tar.gz -C/tmp/
tar (child): /appl/jrpm/rpmbuild/BUILDROOT/MikeMntr-1-1.x86_64/mike.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
error: Bad exit status from /appl/jrpm/rpmbuild/tmp/rpm-tmp.S5rorP (%install)
RPM build errors:
Bad exit status from /appl/jrpm/rpmbuild/tmp/rpm-tmp.S5rorP (%install)
|