Hello all,
I would like to install a tar file and extract it later in %post
I made a spec file like this:
%install
mkdir -p $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/tinux
install -m 644 tinux-1.0.0.tar $RPM_BUILD_ROOT/tinux/tinux-1.0.0.tar
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
/tinux/tinux-1.0.0.tar
%post
for file in `tar tvf /tinux/tinux-1.0.0.tar | grep -v /$ | awk -F.
'{print $2}'`; do
echo "*** Updating $file..."
cp -af $file /etc/$file.tunix
cp -af /etc/tinux/$file /etc/$file
done
tar xvf /tinux/tinux-1.0.0.tar /
Now I get an error:
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.40762
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd tinux-1.0.0
+ LANG=C
+ export LANG
+ unset DISPLAY
+ mkdir -p /var/tmp/tinux-buildroot
+ mkdir -p /var/tmp/tinux-buildroot/tinux
+ install -m 644 tinux-1.0.0.tar
/var/tmp/tinux-buildroot/tinux/tinux-1.0.0.tar
+ /usr/lib/rpm/find-debuginfo.sh /usr/src/redhat/BUILD/tinux-1.0.0
0 blocks
find: /var/tmp/tinux-buildroot/usr/lib/debug: No such file or directory
+ /usr/lib/rpm/redhat/brp-compress
+ /usr/lib/rpm/redhat/brp-strip /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
Processing files: tinux-1.0.0-3
D: /var/tmp/tinux-buildroot/tinux/tinux-1.0.0.tar: GNU tar archive
Requires(interp): /bin/sh /bin/sh /bin/sh
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires(pre): /bin/sh
Requires(post): /bin/sh
Requires(postun): /bin/sh
Processing files: tinux-debuginfo-1.0.0-3
Checking for unpackaged file(s): /usr/lib/rpm/check-files
/var/tmp/tinux-buildroot
D: execv(/usr/lib/rpm/check-files) pid 23949
D: waitpid(23949) rc 23949 status 0
error: Installed (but unpackaged) file(s) found:
/tinux-1.0.0.tar
RPM build errors:
Installed (but unpackaged) file(s) found:
/tinux-1.0.0.tar
Thank you very much in advance for the help :)
Best regards,
Rob Hassing
--
Unclassified