mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-11-04 05:12:30 +00:00 
			
		
		
		
	package xcat-probe
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										6
									
								
								makerpm
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								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
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										66
									
								
								xCAT-probe/xCAT-probe.spec
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										66
									
								
								xCAT-probe/xCAT-probe.spec
									
									
									
									
									
										Normal file
									
								
							@@ -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 <zhengar@us.ibm.com>
 | 
			
		||||
- "Create xCAT autotest package"
 | 
			
		||||
 | 
			
		||||
%post
 | 
			
		||||
 | 
			
		||||
%preun
 | 
			
		||||
		Reference in New Issue
	
	Block a user