diff --git a/build-ubunturepo b/build-ubunturepo index 153b2f986..e9e2e854c 100755 --- a/build-ubunturepo +++ b/build-ubunturepo @@ -223,7 +223,7 @@ then if [ ! -d ../../$package_dir_name ];then mkdir -p "../../$package_dir_name" fi - packages="xCAT-client xCAT-genesis-scripts perl-xCAT xCAT-server xCAT xCATsn xCAT-test xCAT-buildkit xCAT-vlan xCAT-confluent" + packages="xCAT-client xCAT-genesis-scripts perl-xCAT xCAT-server xCAT xCATsn xCAT-test xCAT-buildkit xCAT-vlan xCAT-confluent xCAT-probe" target_archs=(amd64 ppc64el) for file in `echo $packages` do @@ -242,6 +242,12 @@ then cd $file dch -v $pkg_version -b -c debian/changelog $build_string if [ "$target_arch" = "all" ]; then + if [ $file_low = "xcat-probe" ]; then + CURDIR=$(pwd) + mkdir -p ${CURDIR}/xCAT-probe/lib/perl/xCAT/ + cp -f ${CURDIR}/perl-xCAT/xCAT/NetworkUtils.pm ${CURDIR}/xCAT-probe/lib/perl/xCAT/ + cp -f ${CURDIR}/perl-xCAT/xCAT/GlobalDef.pm ${CURDIR}/xCAT-probe/lib/perl/xCAT/ + fi dpkg-buildpackage -uc -us else dpkg-buildpackage -uc -us -a$target_arch diff --git a/buildcore.sh b/buildcore.sh index 13494774c..9f3d3aec0 100755 --- a/buildcore.sh +++ b/buildcore.sh @@ -67,7 +67,7 @@ if [ -z "$UP" ]; then fi # These are the rpms that should be built for each kind of xcat build -ALLBUILD="perl-xCAT xCAT-client xCAT-server xCAT-test xCAT-buildkit xCAT xCATsn xCAT-genesis-scripts xCAT-SoftLayer xCAT-vlan xCAT-confluent" +ALLBUILD="perl-xCAT xCAT-client xCAT-server xCAT-test xCAT-buildkit xCAT xCATsn xCAT-genesis-scripts xCAT-SoftLayer xCAT-vlan xCAT-confluent xCAT-probe" ZVMBUILD="perl-xCAT xCAT-server xCAT-UI" ZVMLINK="xCAT-client xCAT xCATsn" # xCAT and xCATsn have PCM specific configuration - conserver-xcat, syslinux-xcat @@ -288,7 +288,7 @@ if [ "$OSNAME" = "AIX" ]; then fi # Build the rest of the noarch rpms -for rpmname in xCAT-client xCAT-server xCAT-IBMhpc xCAT-rmc xCAT-UI xCAT-test xCAT-buildkit xCAT-SoftLayer xCAT-vlan xCAT-confluent; do +for rpmname in xCAT-client xCAT-server xCAT-IBMhpc xCAT-rmc xCAT-UI xCAT-test xCAT-buildkit xCAT-SoftLayer xCAT-vlan xCAT-confluent xCAT-probe; do if [[ " $EMBEDBUILD " != *\ $rpmname\ * ]]; then continue; fi if [ "$OSNAME" = "AIX" -a "$rpmname" = "xCAT-buildkit" ]; then continue; fi # do not build xCAT-buildkit on aix if [ "$OSNAME" = "AIX" -a "$rpmname" = "xCAT-SoftLayer" ]; then continue; fi # do not build xCAT-softlayer on aix diff --git a/makerpm b/makerpm index 3aae57418..b14bf907e 100755 --- a/makerpm +++ b/makerpm @@ -40,6 +40,12 @@ function makenoarch { fi fi fi + if [ $RPMNAME = "xCAT-probe" ]; then + CURDIR=$(pwd) + mkdir -p ${CURDIR}/xCAT-probe/lib/perl/xCAT/ + cp -f ${CURDIR}/perl-xCAT/xCAT/NetworkUtils.pm ${CURDIR}/xCAT-probe/lib/perl/xCAT/ + cp -f ${CURDIR}/perl-xCAT/xCAT/GlobalDef.pm ${CURDIR}/xCAT-probe/lib/perl/xCAT/ + fi tar --exclude .svn -czf $RPMROOT/SOURCES/$RPMNAME-$VER.tar.gz $RPMNAME rm -f $RPMROOT/SRPMS/$RPMNAME-$VER*rpm $RPMROOT/RPMS/noarch/$RPMNAME-$VER*rpm rpmbuild $QUIET -ta $RPMROOT/SOURCES/$RPMNAME-$VER.tar.gz diff --git a/xCAT-probe/xCAT-probe.spec b/xCAT-probe/xCAT-probe.spec new file mode 100644 index 000000000..be947916e --- /dev/null +++ b/xCAT-probe/xCAT-probe.spec @@ -0,0 +1,66 @@ +Summary: xCAT automated test tool +Name: xCAT-probe +Version: %(cat Version) +Release: snap%(date +"%Y%m%d%H%M") +Epoch: 4 +License: EPL +Group: Applications/System +Source: xCAT-probe-%(cat Version).tar.gz +Packager: IBM Corp. +Vendor: IBM Corp. +Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}} +Prefix: /opt/xcat +BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root + +# AIX will build with an arch of "ppc" +%ifos linux +BuildArch: noarch +%endif + +Provides: xCAT-probe = %{version} + +%description +Provides a toolkits to help probe all the possible issues in xCAT + +%prep +%setup -q -n xCAT-probe +%build + +# Convert pods to man pages and html pages + +%install +# The install phase puts all of the files in the paths they should be in when the rpm is +# installed on a system. The RPM_BUILD_ROOT is a simulated root file system and usually +# has a value like: /var/tmp/xCAT-probe-2.0-snap200802270932-root +rm -rf $RPM_BUILD_ROOT + +mkdir -p $RPM_BUILD_ROOT/%{prefix}/bin +mkdir -p $RPM_BUILD_ROOT/%{prefix}/probe/ + +cp xcatprobe $RPM_BUILD_ROOT/%{prefix}/bin +chmod 755 $RPM_BUILD_ROOT/%{prefix}/bin/* + +cp -r subcmds $RPM_BUILD_ROOT/%{prefix}/probe/ +chmod 755 $RPM_BUILD_ROOT/%{prefix}/probe/subcmds/* + +cp -r lib $RPM_BUILD_ROOT/%{prefix}/probe/ +chmod 644 $RPM_BUILD_ROOT/%{prefix}/probe/lib/perl/* +chmod 644 $RPM_BUILD_ROOT/%{prefix}/probe/lib/perl/xCAT/* + +%clean +# This step does not happen until *after* the %files packaging below +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +#%doc LICENSE.html +# Just package everything that has been copied into RPM_BUILD_ROOT +%{prefix} + +%changelog +* Tue Sep 14 2010 - Airong Zheng +- "Create xCAT autotest package" + +%post + +%preun