w***@yahoo.ca
2008-01-03 14:50:01 UTC
$ make rpm
VER=`cat ../../../distribution_vob/VERSION` ; \
rm -rf ./tmp ; \
rm -rf test-$VER ;\
rm -f test-$VER.tar.gz ;\
rm -rf /var/tmp/test* ;\
mkdir -p ./tmp ;\
mkdir -p /tmp/BUILD ;\
mkdir -p /tmp/SOURCES ;\
cp ../auxiliary/ctestd.conf ./tmp ;\
cp ../auxiliary/ltestd.conf ./tmp ;\
cp ../auxiliary/testd ./tmp/testd.init ;\
cp ../net-test-5.4.1/apps/.libs/testtrap ./tmp ;\
cp ../net-test-5.4.1/agent/.libs/testd ./tmp ;\
cp -d ../net-test-5.4.1/agent/.libs/libnettestagent.so.* ./tmp ;\
cp -d ../net-test-5.4.1/agent/.libs/libnettestmibs.so.* ./tmp ;\
cp -d ../net-test-5.4.1/testlib/.libs/libnettest.so.* ./tmp ;\
cp -d ../net-test-5.4.1/agent/helpers/.libs/libnettesthelpers.so.* ./
tmp ;\
cp ../VERSION ./tmp ;\
cp ../RELEASE ./tmp
VER=`cat ../../../distribution_vob/VERSION` ; \
mv ./tmp "test-$VER/" ; \
tar --check-links -czvf "./test-$VER.tar.gz" ./test-"$VER"/* ; \
cp "./test-$VER.tar.gz" /tmp/SOURCES/
./test-2.3.0/ctestd.conf
./test-2.3.0/libnettestagent.so.15
./test-2.3.0/libnettestagent.so.15.1.0
./test-2.3.0/libnettesthelpers.so.15
./test-2.3.0/libnettesthelpers.so.15.1.0
./test-2.3.0/libnettestmibs.so.15
./test-2.3.0/libnettestmibs.so.15.1.0
./test-2.3.0/libnettest.so.15
./test-2.3.0/libnettest.so.15.1.0
./test-2.3.0/ltestd.conf
./test-2.3.0/RELEASE
./test-2.3.0/testd
./test-2.3.0/testd.init
./test-2.3.0/testtrap
./test-2.3.0/VERSION
rpmbuild -bb ./test.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.16902
+ umask 022
+ cd ./test-2.3.0/BUILD
/var/tmp/rpm-tmp.16902: line 21: cd: ./test-2.3.0/BUILD: No such file
or directory
error: Bad exit status from /var/tmp/rpm-tmp.16902 (%prep)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.16902 (%prep)
make: *** [rpm] Error 1
Please help to fix this error.
The test.spec is as follows:
%define sourced_version %(cat ../../../dist/VERSION)
Release: %(cat ../../../dist/RELEASE)
# Override target directory for binary rpms
%define _rpmdir ../../../dist/packages/linux
%define _prefix /usr/local
%define _topdir /tmp
Summary: test Agent
Name: test
Vendor: mycomp
Version: %{sourced_version}
License: Commercial
Group: Applications/Cryptography
Source: %{name}-%{version}.tar.gz
Packager: test Support
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -
n)
AutoReqProv: no
%description
test Agent
%prep
%setup
%build
%install
%define RPM_BUILD_DIR ./tmp/%{name}-%{version}
rm -rf $RPM_BUILD_ROOT
#make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{_prefix}
mkdir -p $RPM_BUILD_ROOT/%{_libdir}
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
mkdir -p $RPM_BUILD_ROOT/%{_sbindir}
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/test
mkdir -p $RPM_BUILD_ROOT/var/net-test
mkdir -p $RPM_BUILD_ROOT/etc/init.d
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/testtrap
$RPM_BUILD_ROOT/%{_bindir}/testtrap
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/testd
$RPM_BUILD_ROOT/%{_sbindir}/testd
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/libnettest.so.15
$RPM_BUILD_ROOT/%{_libdir}/libnettest.so.15
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/libnettestagent.so.
15 $RPM_BUILD_ROOT/%{_libdir}/libnettestagent.so.15
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/libnettesthelpers.so.
15 $RPM_BUILD_ROOT/%{_libdir}/libnettesthelpers.so.15
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/libnettestmibs.so.15
$RPM_BUILD_ROOT/%{_libdir}/libnettestmibs.so.15
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/ctestd.conf
$RPM_BUILD_ROOT/%{_datadir}/test/testd.conf
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/ltestd.conf
$RPM_BUILD_ROOT/var/net-test/testd.conf
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/testd.init
$RPM_BUILD_ROOT/etc/init.d/testd
%clean
rm -rf $RPM_BUILD_ROOT
%post
if ! grep "/usr/local/lib" -q /etc/ld.so.conf ; then
echo "/usr/local/lib" >> /etc/ld.so.conf
/sbin/ldconfig
fi
# add testd as a service via the init subsystem
chkconfig --add testd
# disable testd initially
chkconfig --level 0123456 testd off
%postun -p /sbin/ldconfig
%preun
chkconfig --del testd
%files
%defattr(-, root, root)
%dir /usr/local
%dir /usr/local/lib
%dir /usr/local/bin
%dir /usr/local/sbin
%attr(0544,root,root) /usr/local/bin/testtrap
%attr(0544,root,root) /usr/local/sbin/testd
%attr(0444,root,root) /usr/local/lib/libnettest.so.15
%attr(0444,root,root) /usr/local/lib/libnettestagent.so.15
%attr(0444,root,root) /usr/local/lib/libnettesthelpers.so.15
%attr(0444,root,root) /usr/local/lib/libnettestmibs.so.15
%attr(0544,root,root) /etc/init.d/testd
%config(noreplace) %attr(0444,root,root) /usr/local/share/test/
testd.conf
%config(noreplace) %attr(0444,root,root) /var/net-test/testd.conf
VER=`cat ../../../distribution_vob/VERSION` ; \
rm -rf ./tmp ; \
rm -rf test-$VER ;\
rm -f test-$VER.tar.gz ;\
rm -rf /var/tmp/test* ;\
mkdir -p ./tmp ;\
mkdir -p /tmp/BUILD ;\
mkdir -p /tmp/SOURCES ;\
cp ../auxiliary/ctestd.conf ./tmp ;\
cp ../auxiliary/ltestd.conf ./tmp ;\
cp ../auxiliary/testd ./tmp/testd.init ;\
cp ../net-test-5.4.1/apps/.libs/testtrap ./tmp ;\
cp ../net-test-5.4.1/agent/.libs/testd ./tmp ;\
cp -d ../net-test-5.4.1/agent/.libs/libnettestagent.so.* ./tmp ;\
cp -d ../net-test-5.4.1/agent/.libs/libnettestmibs.so.* ./tmp ;\
cp -d ../net-test-5.4.1/testlib/.libs/libnettest.so.* ./tmp ;\
cp -d ../net-test-5.4.1/agent/helpers/.libs/libnettesthelpers.so.* ./
tmp ;\
cp ../VERSION ./tmp ;\
cp ../RELEASE ./tmp
VER=`cat ../../../distribution_vob/VERSION` ; \
mv ./tmp "test-$VER/" ; \
tar --check-links -czvf "./test-$VER.tar.gz" ./test-"$VER"/* ; \
cp "./test-$VER.tar.gz" /tmp/SOURCES/
./test-2.3.0/ctestd.conf
./test-2.3.0/libnettestagent.so.15
./test-2.3.0/libnettestagent.so.15.1.0
./test-2.3.0/libnettesthelpers.so.15
./test-2.3.0/libnettesthelpers.so.15.1.0
./test-2.3.0/libnettestmibs.so.15
./test-2.3.0/libnettestmibs.so.15.1.0
./test-2.3.0/libnettest.so.15
./test-2.3.0/libnettest.so.15.1.0
./test-2.3.0/ltestd.conf
./test-2.3.0/RELEASE
./test-2.3.0/testd
./test-2.3.0/testd.init
./test-2.3.0/testtrap
./test-2.3.0/VERSION
rpmbuild -bb ./test.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.16902
+ umask 022
+ cd ./test-2.3.0/BUILD
/var/tmp/rpm-tmp.16902: line 21: cd: ./test-2.3.0/BUILD: No such file
or directory
error: Bad exit status from /var/tmp/rpm-tmp.16902 (%prep)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.16902 (%prep)
make: *** [rpm] Error 1
Please help to fix this error.
The test.spec is as follows:
%define sourced_version %(cat ../../../dist/VERSION)
Release: %(cat ../../../dist/RELEASE)
# Override target directory for binary rpms
%define _rpmdir ../../../dist/packages/linux
%define _prefix /usr/local
%define _topdir /tmp
Summary: test Agent
Name: test
Vendor: mycomp
Version: %{sourced_version}
License: Commercial
Group: Applications/Cryptography
Source: %{name}-%{version}.tar.gz
Packager: test Support
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -
n)
AutoReqProv: no
%description
test Agent
%prep
%setup
%build
%install
%define RPM_BUILD_DIR ./tmp/%{name}-%{version}
rm -rf $RPM_BUILD_ROOT
#make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{_prefix}
mkdir -p $RPM_BUILD_ROOT/%{_libdir}
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
mkdir -p $RPM_BUILD_ROOT/%{_sbindir}
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/test
mkdir -p $RPM_BUILD_ROOT/var/net-test
mkdir -p $RPM_BUILD_ROOT/etc/init.d
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/testtrap
$RPM_BUILD_ROOT/%{_bindir}/testtrap
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/testd
$RPM_BUILD_ROOT/%{_sbindir}/testd
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/libnettest.so.15
$RPM_BUILD_ROOT/%{_libdir}/libnettest.so.15
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/libnettestagent.so.
15 $RPM_BUILD_ROOT/%{_libdir}/libnettestagent.so.15
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/libnettesthelpers.so.
15 $RPM_BUILD_ROOT/%{_libdir}/libnettesthelpers.so.15
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/libnettestmibs.so.15
$RPM_BUILD_ROOT/%{_libdir}/libnettestmibs.so.15
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/ctestd.conf
$RPM_BUILD_ROOT/%{_datadir}/test/testd.conf
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/ltestd.conf
$RPM_BUILD_ROOT/var/net-test/testd.conf
install $RPM_BUILD_DIR/%{name}-%{sourced_version}/testd.init
$RPM_BUILD_ROOT/etc/init.d/testd
%clean
rm -rf $RPM_BUILD_ROOT
%post
if ! grep "/usr/local/lib" -q /etc/ld.so.conf ; then
echo "/usr/local/lib" >> /etc/ld.so.conf
/sbin/ldconfig
fi
# add testd as a service via the init subsystem
chkconfig --add testd
# disable testd initially
chkconfig --level 0123456 testd off
%postun -p /sbin/ldconfig
%preun
chkconfig --del testd
%files
%defattr(-, root, root)
%dir /usr/local
%dir /usr/local/lib
%dir /usr/local/bin
%dir /usr/local/sbin
%attr(0544,root,root) /usr/local/bin/testtrap
%attr(0544,root,root) /usr/local/sbin/testd
%attr(0444,root,root) /usr/local/lib/libnettest.so.15
%attr(0444,root,root) /usr/local/lib/libnettestagent.so.15
%attr(0444,root,root) /usr/local/lib/libnettesthelpers.so.15
%attr(0444,root,root) /usr/local/lib/libnettestmibs.so.15
%attr(0544,root,root) /etc/init.d/testd
%config(noreplace) %attr(0444,root,root) /usr/local/share/test/
testd.conf
%config(noreplace) %attr(0444,root,root) /var/net-test/testd.conf