diff --git a/xCAT-server-2.0/usr/lib/xcat/monitoring/monitorctrl.pm b/xCAT-server-2.0/usr/lib/xcat/monitoring/monitorctrl.pm index 1819f06ba..52a4e655c 100644 --- a/xCAT-server-2.0/usr/lib/xcat/monitoring/monitorctrl.pm +++ b/xCAT-server-2.0/usr/lib/xcat/monitoring/monitorctrl.pm @@ -8,7 +8,7 @@ use xCAT::Table; use xCAT::MsgUtils; use xCAT::Utils; use xCAT::Client; -require("/usr/lib/xcat/plugins/notification.pm"); +require($::XCATPREFIX."/lib/xcat/plugins/notification.pm"); #the list store the names of the monitoring products and the file name and module names. #the names are stored in the "pname" column of the monitoring table. diff --git a/xCAT-server-2.0/usr/lib/xcat/monitoring/xcatmon.pm b/xCAT-server-2.0/usr/lib/xcat/monitoring/xcatmon.pm index 8e7390d1a..39dc0badb 100644 --- a/xCAT-server-2.0/usr/lib/xcat/monitoring/xcatmon.pm +++ b/xCAT-server-2.0/usr/lib/xcat/monitoring/xcatmon.pm @@ -5,7 +5,7 @@ package xCAT_monitoring::xcatmon; #use xCAT::NodeRange; #use Socket; #use xCAT::Utils; -use xCAT::GlobalDef; +#use xCAT::GlobalDef; use xCAT::Utils; diff --git a/xCAT-server-2.0/usr/lib/xcat/plugins/centos.pm b/xCAT-server-2.0/usr/lib/xcat/plugins/centos.pm index 32041ed29..c67a315c9 100644 --- a/xCAT-server-2.0/usr/lib/xcat/plugins/centos.pm +++ b/xCAT-server-2.0/usr/lib/xcat/plugins/centos.pm @@ -188,12 +188,12 @@ sub mkinstall { my $os = $ent->{os}; my $arch = $ent->{arch}; my $profile = $ent->{profile}; - unless (-r "/usr/share/xcat/install/centos/".$ent->{profile}.".tmpl") { + unless (-r $::XCATPREFIX."/share/xcat/install/centos/".$ent->{profile}.".tmpl") { $callback->({error=>["No kickstart template exists for ".$ent->{profile}],errorcode=>[1]}); next; } #Call the Template class to do substitution to produce a kickstart file in the autoinst dir - xCAT::Template->subvars("/usr/share/xcat/install/centos/".$ent->{profile}.".tmpl","/install/autoinst/".$node,$node); + xCAT::Template->subvars($::XCATPREFIX."/share/xcat/install/centos/".$ent->{profile}.".tmpl","/install/autoinst/".$node,$node); mkpath "/install/postscripts/"; xCAT::Postage->writescript($node,"/install/postscripts/".$node); if (-r "/install/$os/$arch/images/pxeboot/vmlinuz" diff --git a/xCAT-server-2.0/usr/lib/xcat/plugins/conserver.pm b/xCAT-server-2.0/usr/lib/xcat/plugins/conserver.pm index 82443b6f2..35e5c585b 100644 --- a/xCAT-server-2.0/usr/lib/xcat/plugins/conserver.pm +++ b/xCAT-server-2.0/usr/lib/xcat/plugins/conserver.pm @@ -174,7 +174,7 @@ sub donodeent { push @$content," port ".$cfgent->{termport}.";\n"; } else { #a script method... push @$content," type exec;\n"; - push @$content," exec /usr/share/xcat/cons/".$cmeth." ".$node.";\n" + push @$content," exec ".$::XCATPREFIX."/share/xcat/cons/".$cmeth." ".$node.";\n" } push @$content,"}\n"; push @$content,"#xCAT END $node CONS\n"; diff --git a/xCAT-server-2.0/usr/lib/xcat/plugins/monctrlcmds.pm b/xCAT-server-2.0/usr/lib/xcat/plugins/monctrlcmds.pm index c669a22af..c7acf8cd3 100644 --- a/xCAT-server-2.0/usr/lib/xcat/plugins/monctrlcmds.pm +++ b/xCAT-server-2.0/usr/lib/xcat/plugins/monctrlcmds.pm @@ -4,7 +4,7 @@ package xCAT_plugin::monctrlcmds; use xCAT::NodeRange; use xCAT::Table; use xCAT::MsgUtils; -require("/usr/lib/xcat/monitoring/monitorctrl.pm"); +require($::XCATPREFIX."/lib/xcat/monitoring/monitorctrl.pm"); 1; diff --git a/xCAT-server-2.0/usr/lib/xcat/plugins/rhel.pm b/xCAT-server-2.0/usr/lib/xcat/plugins/rhel.pm index f5e3cd8aa..878c6b50c 100644 --- a/xCAT-server-2.0/usr/lib/xcat/plugins/rhel.pm +++ b/xCAT-server-2.0/usr/lib/xcat/plugins/rhel.pm @@ -182,23 +182,23 @@ sub mkinstall { my $os = $ent->{os}; my $arch = $ent->{arch}; my $profile = $ent->{profile}; - unless (-r "/usr/share/xcat/install/rh/".$ent->{profile}.".tmpl" or - -r "/usr/share/xcat/install/rh/$profile.$arch.tmpl" or - -r "/usr/share/xcat/install/rh/$profile.$os.tmpl" or - -r "/usr/share/xcat/install/rh/$profile.$os.$arch.tmpl") { + unless (-r $::XCATPREFIX."/share/xcat/install/rh/".$ent->{profile}.".tmpl" or + -r $::XCATPREFIX."/share/xcat/install/rh/$profile.$arch.tmpl" or + -r $::XCATPREFIX."/share/xcat/install/rh/$profile.$os.tmpl" or + -r $::XCATPREFIX."/share/xcat/install/rh/$profile.$os.$arch.tmpl") { $callback->({error=>["No kickstart template exists for ".$ent->{profile}],errorcode=>[1]}); next; } #Call the Template class to do substitution to produce a kickstart file in the autoinst dir - if ( -r "/usr/share/xcat/install/rh/$profile.$os.$arch.tmpl" ) { - xCAT::Template->subvars("/usr/share/xcat/install/rh/$profile.$os.$arch.tmpl","/install/autoinst/".$node,$node); - } elsif ( -r "/usr/share/xcat/install/rh/$profile.$arch.tmpl" ) { - xCAT::Template->subvars("/usr/share/xcat/install/rh/$profile.$arch.tmpl","/install/autoinst/".$node,$node); - } elsif ( -r "/usr/share/xcat/install/rh/$profile.$os.tmpl" ) { - xCAT::Template->subvars("/usr/share/xcat/install/rh/$profile.$os.tmpl","/install/autoinst/".$node,$node); + if ( -r $::XCATPREFIX."/share/xcat/install/rh/$profile.$os.$arch.tmpl" ) { + xCAT::Template->subvars($::XCATPREFIX."/share/xcat/install/rh/$profile.$os.$arch.tmpl","/install/autoinst/".$node,$node); + } elsif ( -r $::XCATPREFIX."/share/xcat/install/rh/$profile.$arch.tmpl" ) { + xCAT::Template->subvars($::XCATPREFIX."/share/xcat/install/rh/$profile.$arch.tmpl","/install/autoinst/".$node,$node); + } elsif ( -r $::XCATPREFIX."/share/xcat/install/rh/$profile.$os.tmpl" ) { + xCAT::Template->subvars($::XCATPREFIX."/share/xcat/install/rh/$profile.$os.tmpl","/install/autoinst/".$node,$node); } else { - xCAT::Template->subvars("/usr/share/xcat/install/rh/".$ent->{profile}.".tmpl","/install/autoinst/".$node,$node); + xCAT::Template->subvars($::XCATPREFIX."/share/xcat/install/rh/".$ent->{profile}.".tmpl","/install/autoinst/".$node,$node); } mkpath "/install/postscripts/"; xCAT::Postage->writescript($node,"/install/postscripts/".$node); diff --git a/xCAT-server-2.0/usr/lib/xcat/plugins/sles.pm b/xCAT-server-2.0/usr/lib/xcat/plugins/sles.pm index eb515dec2..bf3746b92 100644 --- a/xCAT-server-2.0/usr/lib/xcat/plugins/sles.pm +++ b/xCAT-server-2.0/usr/lib/xcat/plugins/sles.pm @@ -53,23 +53,23 @@ sub mkinstall { my $arch = $ent->{arch}; my $profile = $ent->{profile}; unless ( - -r "/usr/share/xcat/install/sles/$profile.tmpl" or - -r "/usr/share/xcat/install/sles/$profile.$arch.tmpl" or - -r "/usr/share/xcat/install/sles/$profile.$os.tmpl" or - -r "/usr/share/xcat/install/sles/$profile.$os.$arch.tmpl" + -r $::XCATPREFIX."/share/xcat/install/sles/$profile.tmpl" or + -r $::XCATPREFIX."/share/xcat/install/sles/$profile.$arch.tmpl" or + -r $::XCATPREFIX."/share/xcat/install/sles/$profile.$os.tmpl" or + -r $::XCATPREFIX."/share/xcat/install/sles/$profile.$os.$arch.tmpl" ) { $callback->({error=>["No AutoYaST template exists for ".$ent->{profile}],errorcode=>[1]}); next; } #Call the Template class to do substitution to produce a kickstart file in the autoinst dir - if (-r "/usr/share/xcat/install/sles/$profile.$os.$arch.tmpl") { - xCAT::Template->subvars("/usr/share/xcat/install/sles/$profile.$os.$arch.tmpl","/install/autoinst/$node",$node); - } elsif (-r "/usr/share/xcat/install/sles/$profile.$arch.tmpl") { - xCAT::Template->subvars("/usr/share/xcat/install/sles/$profile.$arch.tmpl","/install/autoinst/$node",$node); - } elsif (-r "/usr/share/xcat/install/sles/$profile.$os.tmpl") { - xCAT::Template->subvars("/usr/share/xcat/install/sles/$profile.$os.tmpl","/install/autoinst/$node",$node); - } elsif (-r "/usr/share/xcat/install/sles/$profile.tmpl") { - xCAT::Template->subvars("/usr/share/xcat/install/sles/$profile.tmpl","/install/autoinst/$node",$node); + if (-r $::XCATPREFIX."/share/xcat/install/sles/$profile.$os.$arch.tmpl") { + xCAT::Template->subvars($::XCATPREFIX."/share/xcat/install/sles/$profile.$os.$arch.tmpl","/install/autoinst/$node",$node); + } elsif (-r $::XCATPREFIX."/share/xcat/install/sles/$profile.$arch.tmpl") { + xCAT::Template->subvars($::XCATPREFIX."/share/xcat/install/sles/$profile.$arch.tmpl","/install/autoinst/$node",$node); + } elsif (-r $::XCATPREFIX."/share/xcat/install/sles/$profile.$os.tmpl") { + xCAT::Template->subvars($::XCATPREFIX."/share/xcat/install/sles/$profile.$os.tmpl","/install/autoinst/$node",$node); + } elsif (-r $::XCATPREFIX."/share/xcat/install/sles/$profile.tmpl") { + xCAT::Template->subvars($::XCATPREFIX."/share/xcat/install/sles/$profile.tmpl","/install/autoinst/$node",$node); } mkpath "/install/postscripts/"; xCAT::Postage->writescript($node,"/install/postscripts/".$node); diff --git a/xCAT-server-2.0/usr/sbin/xcatd b/xCAT-server-2.0/usr/sbin/xcatd index c30760982..8fb86be09 100755 --- a/xCAT-server-2.0/usr/sbin/xcatd +++ b/xCAT-server-2.0/usr/sbin/xcatd @@ -15,7 +15,6 @@ use Getopt::Long; use Sys::Syslog; use xCAT::NotifHandler; -require("/usr/lib/xcat/monitoring/monitorctrl.pm"); Getopt::Long::Configure("bundling"); @@ -30,7 +29,6 @@ GetOptions( 'pidfile|p=s' => \$pidfile ); -my $plugins_dir='/usr/lib/xcat/plugins'; my $quit = 0; my $port; my $sport; @@ -40,6 +38,7 @@ my $sitetab=xCAT::Table->new('site'); unless ($sitetab) { print ("ERROR: Unable to open basic site table for configuration\n"); } +$::XCATPREFIX = '/usr'; my ($tmp) = $sitetab->getAttribs({'key'=>'xcatdport'},'value'); unless ($tmp) { die "ERROR:Need xcatdport defined in site table, try chtab key=xcatdport site.value=3001"; @@ -47,8 +46,14 @@ unless ($tmp) { $port = $tmp->{value}; $sport = $tmp->{value}+1; +($tmp) = $sitetab->getAttribs({'key'=>'xcatprefix'},'value'); +if ($tmp and $tmp->{value}) { + $::XCATPREFIX = $tmp->{value}; +} +require($::XCATPREFIX."/lib/xcat/monitoring/monitorctrl.pm"); +my $plugins_dir=$::XCATPREFIX.'/lib/xcat/plugins'; ($tmp) = $sitetab->getAttribs({'key'=>'xcatconfdir'},'value'); -$xcatdir = ($tmp ? $tmp->{value} : "/etc/xcat"); +$xcatdir = (($tmp and $tmp->{value}) ? $tmp->{value} : "/etc/xcat"); my $progname; $SIG{PIPE} = sub { die "SIGPIPE $$progname encountered a broken pipe (probably Ctrl-C by client)" }; diff --git a/xCAT-server-2.0/usr/sbin/xcatnodemon b/xCAT-server-2.0/usr/sbin/xcatnodemon index 8cba57a5e..7690bfb2f 100755 --- a/xCAT-server-2.0/usr/sbin/xcatnodemon +++ b/xCAT-server-2.0/usr/sbin/xcatnodemon @@ -2,7 +2,7 @@ # IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html use xCAT::Table; -use xCAT::GlobalDef; +#use xCAT::GlobalDef; require("/usr/lib/xcat/monitoring/monitorctrl.pm"); ################################################################# diff --git a/xCAT-server-2.0/usr/share/xcat/install/rh/compute.ppc64.tmpl b/xCAT-server-2.0/usr/share/xcat/install/rh/compute.ppc64.tmpl new file mode 100644 index 000000000..200d99d21 --- /dev/null +++ b/xCAT-server-2.0/usr/share/xcat/install/rh/compute.ppc64.tmpl @@ -0,0 +1,181 @@ +#RedHat Enterprise Linux 4 AS Only +#egan@us.ibm.com +# + +lang en_US +langsupport en_US +network --bootproto dhcp + +# +# Where's the source? +# nfs --server hostname.of.server or IP --dir /path/to/RH/CD/image +# +#nfs --server #XCATVAR:INSTALL_NFS# --dir #XCATVAR:INSTALL_SRC_DIR# +url --url http://#TABLE:noderes:$NODE:nfsserver#/install/#TABLE:nodetype:$NODE:os#/#TABLE:nodetype:$NODE:arch# + +#device ethernet e100 +keyboard "us" + +# +# Clear the MBR +# +zerombr yes + +# +# Wipe out the disk +# +clearpart --all --initlabel +#clearpart --linux +key --skip + +# +# Customize to fit your needs +# + +#No RAID +#/boot really significant for this sort of setup nowadays? +part None --fstype "PPC PReP Boot" --size 8 +part /boot --size 50 --fstype ext3 +part swap --size 1024 +part / --size 1 --grow --fstype ext3 + +#RAID 0 /scr for performance +#part / --size 1024 --ondisk sda +#part swap --size 512 --ondisk sda +#part /var --size 1024 --ondisk sdb +#part swap --size 512 --ondisk sdb +#part raid.01 --size 1 --grow --ondisk sda +#part raid.02 --size 1 --grow --ondisk sdb +#raid /scr --level 0 --device md0 raid.01 raid.02 + +#Full RAID 1 Sample +#part raid.01 --size 50 --ondisk sda +#part raid.02 --size 50 --ondisk sdb +#raid /boot --level 1 --device md0 raid.01 raid.02 +# +#part raid.11 --size 1024 --ondisk sda +#part raid.12 --size 1024 --ondisk sdb +#raid / --level 1 --device md1 raid.11 raid.12 +# +#part raid.21 --size 1024 --ondisk sda +#part raid.22 --size 1024 --ondisk sdb +#raid /var --level 1 --device md2 raid.21 raid.22 +# +#part raid.31 --size 1024 --ondisk sda +#part raid.32 --size 1024 --ondisk sdb +#raid swap --level 1 --device md3 raid.31 raid.32 +# +#part raid.41 --size 1 --grow --ondisk sda +#part raid.42 --size 1 --grow --ondisk sdb +#raid /scr --level 1 --device md4 raid.41 raid.42 + +# +# bootloader config +# --append +# --useLilo +# --md5pass +# +bootloader + +# +# install or upgrade +# +install + +# +# text mode install (default is graphical) +# +text + +# +# firewall +# +firewall --disabled + +# +# mouse selection +# +#mouse genericps/2 --emulthree +mouse none + +# +# Select a zone +# Add the --utc switch if your hardware clock is set to GMT +# +#timezone US/Hawaii +#timezone US/Pacific +#timezone US/Mountain +#timezone US/Central +#timezone US/Eastern +timezone --utc #TABLE:site:key=timezone:value# + +# +# Don't do X +# +skipx + + +# +# To generate an encrypted root password use: +# +# perl -e 'print crypt("blah","Xa") . "\n";'p +# openssl passwd -apr1 -salt xxxxxxxx password +# +# where "blah" is your root password. +# +#rootpw --iscrypted XaLGAVe1C41x2 +#rootpw XaLGAVe1C41x2 --iscrypted +rootpw --iscrypted #CRYPT:passwd:key=system,username=root:password# +#rootpw --iscrypted #COMMAND:perl -e 'print crypt("#TABLE:passwd.tab:rootpw:1#","Xa") . "\n";'p# + +# +# NIS setup: auth --enablenis --nisdomain sensenet +# --nisserver neptune --useshadow --enablemd5 +# +# OR +auth --useshadow --enablemd5 + +# +# SE Linux +# +selinux --disabled + +# +# Reboot after installation +# +reboot + +# +#end of section +# +%packages --resolvedeps +@ Network Servers +@ System Tools +@ X Window System +@ Legacy Software Development +autofs +ksh +tcsh +ntp +tftp +xinetd +rsh +rsh-server +psacct +nfs-utils +net-snmp +rsync +yp-tools +ypserv +ypbind +m4 +sendmail-cf +gdb +binutils +openssh-server +util-linux +compat-libstdc++-33 +%pre +#INCLUDE:../scripts/pre.rh# +%post +#INCLUDE:../scripts/post.rh# diff --git a/xCAT-server-2.0/usr/share/xcat/install/rh/iscsi.ppc64.tmpl b/xCAT-server-2.0/usr/share/xcat/install/rh/iscsi.ppc64.tmpl new file mode 100644 index 000000000..575d4cf88 --- /dev/null +++ b/xCAT-server-2.0/usr/share/xcat/install/rh/iscsi.ppc64.tmpl @@ -0,0 +1,184 @@ +#RedHat Enterprise Linux 4 AS Only +#egan@us.ibm.com +# + +lang en_US +langsupport en_US +network --bootproto dhcp + +# +# Where's the source? +# nfs --server hostname.of.server or IP --dir /path/to/RH/CD/image +# +#nfs --server #XCATVAR:INSTALL_NFS# --dir #XCATVAR:INSTALL_SRC_DIR# +url --url http://#TABLE:noderes:$NODE:nfsserver#/install/#TABLE:nodetype:$NODE:os#/#TABLE:nodetype:$NODE:arch# + +#device ethernet e100 +keyboard "us" + +# +# Clear the MBR +# +zerombr yes + +# +# Wipe out the disk +# +clearpart --all --initlabel +#clearpart --linux +key --skip + +# +# Customize to fit your needs +# + +iscsiname #TABLE:nodelist:$NODE:node# +iscsi --ipaddr #TABLE:iscsi:$NODE:server# --user "#TABLE:iscsi:$NODE:userid#" --password "#TABLE:iscsi:$NODE:passwd#" + +#No RAID +#/boot really significant for this sort of setup nowadays? +part None --fstype "PPC PReP Boot" --size 8 +part /boot --size 50 --fstype ext3 +part swap --size 1024 +part / --size 1 --grow --fstype ext3 + +#RAID 0 /scr for performance +#part / --size 1024 --ondisk sda +#part swap --size 512 --ondisk sda +#part /var --size 1024 --ondisk sdb +#part swap --size 512 --ondisk sdb +#part raid.01 --size 1 --grow --ondisk sda +#part raid.02 --size 1 --grow --ondisk sdb +#raid /scr --level 0 --device md0 raid.01 raid.02 + +#Full RAID 1 Sample +#part raid.01 --size 50 --ondisk sda +#part raid.02 --size 50 --ondisk sdb +#raid /boot --level 1 --device md0 raid.01 raid.02 +# +#part raid.11 --size 1024 --ondisk sda +#part raid.12 --size 1024 --ondisk sdb +#raid / --level 1 --device md1 raid.11 raid.12 +# +#part raid.21 --size 1024 --ondisk sda +#part raid.22 --size 1024 --ondisk sdb +#raid /var --level 1 --device md2 raid.21 raid.22 +# +#part raid.31 --size 1024 --ondisk sda +#part raid.32 --size 1024 --ondisk sdb +#raid swap --level 1 --device md3 raid.31 raid.32 +# +#part raid.41 --size 1 --grow --ondisk sda +#part raid.42 --size 1 --grow --ondisk sdb +#raid /scr --level 1 --device md4 raid.41 raid.42 + +# +# bootloader config +# --append +# --useLilo +# --md5pass +# +bootloader + +# +# install or upgrade +# +install + +# +# text mode install (default is graphical) +# +text + +# +# firewall +# +firewall --disabled + +# +# mouse selection +# +#mouse genericps/2 --emulthree +mouse none + +# +# Select a zone +# Add the --utc switch if your hardware clock is set to GMT +# +#timezone US/Hawaii +#timezone US/Pacific +#timezone US/Mountain +#timezone US/Central +#timezone US/Eastern +timezone --utc #TABLE:site:key=timezone:value# + +# +# Don't do X +# +skipx + + +# +# To generate an encrypted root password use: +# +# perl -e 'print crypt("blah","Xa") . "\n";'p +# openssl passwd -apr1 -salt xxxxxxxx password +# +# where "blah" is your root password. +# +#rootpw --iscrypted XaLGAVe1C41x2 +#rootpw XaLGAVe1C41x2 --iscrypted +rootpw --iscrypted #CRYPT:passwd:key=system,username=root:password# +#rootpw --iscrypted #COMMAND:perl -e 'print crypt("#TABLE:passwd.tab:rootpw:1#","Xa") . "\n";'p# + +# +# NIS setup: auth --enablenis --nisdomain sensenet +# --nisserver neptune --useshadow --enablemd5 +# +# OR +auth --useshadow --enablemd5 + +# +# SE Linux +# +selinux --disabled + +# +# Reboot after installation +# +reboot + +# +#end of section +# +%packages --resolvedeps +@ Network Servers +@ System Tools +@ X Window System +@ Legacy Software Development +autofs +ksh +tcsh +ntp +tftp +xinetd +rsh +rsh-server +psacct +nfs-utils +net-snmp +rsync +yp-tools +ypserv +ypbind +m4 +sendmail-cf +gdb +binutils +openssh-server +util-linux +compat-libstdc++-33 +%pre +#INCLUDE:../scripts/pre.rh# +%post +#INCLUDE:../scripts/post.rh# diff --git a/xCAT-server-2.0/xCAT-server.spec b/xCAT-server-2.0/xCAT-server.spec index 21e6d2cce..f79b6cbb6 100644 --- a/xCAT-server-2.0/xCAT-server.spec +++ b/xCAT-server-2.0/xCAT-server.spec @@ -8,7 +8,7 @@ Source: xCAT-server-2.0.tar.gz Packager: IBM Corp. Vendor: IBM Corp. Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}} -Prefix: %{_prefix} +Prefix: /usr BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root # AIX will build with an arch of "ppc" @@ -31,51 +31,52 @@ xCAT-server provides the core server and configuration management components of %build %install rm -rf $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT/usr/sbin -mkdir -p $RPM_BUILD_ROOT/usr/share/xcat/install -mkdir -p $RPM_BUILD_ROOT/usr/share/xcat/ca -mkdir -p $RPM_BUILD_ROOT/usr/share/xcat/scripts -mkdir -p $RPM_BUILD_ROOT/usr/share/xcat/cons -mkdir -p $RPM_BUILD_ROOT/usr/lib/xcat/plugins +mkdir -p $RPM_BUILD_ROOT/%{prefix}/sbin +mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/install +mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/ca +mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/scripts +mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/cons +mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/xcat/plugins mkdir -p $RPM_BUILD_ROOT/opt/csm/pm/dsh/Context -mkdir -p $RPM_BUILD_ROOT/usr/lib/xcat/monitoring/samples +mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/xcat/monitoring/samples %ifos linux -cp -a usr/share/xcat/install/* $RPM_BUILD_ROOT/usr/share/xcat/install/ +cp -a share/xcat/install/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/install/ %else -cp -hpR usr/share/xcat/install/* $RPM_BUILD_ROOT/usr/share/xcat/install/ +cp -hpR share/xcat/install/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/install/ %endif -cp usr/sbin/* $RPM_BUILD_ROOT/usr/sbin -chmod 755 $RPM_BUILD_ROOT/usr/sbin/* +cp sbin/* $RPM_BUILD_ROOT/%{prefix}/sbin +chmod 755 $RPM_BUILD_ROOT/%{prefix}/sbin/* -cp usr/share/xcat/ca/* $RPM_BUILD_ROOT/usr/share/xcat/ca -chmod 644 $RPM_BUILD_ROOT/usr/share/xcat/ca/* +cp share/xcat/ca/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/ca +chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/xcat/ca/* -cp usr/share/xcat/scripts/* $RPM_BUILD_ROOT/usr/share/xcat/scripts -cp usr/share/xcat/cons/* $RPM_BUILD_ROOT/usr/share/xcat/cons -chmod 755 $RPM_BUILD_ROOT/usr/share/xcat/cons/* -ln -sf /usr/share/xcat/cons/hmc $RPM_BUILD_ROOT/usr/share/xcat/cons/ivm +cp share/xcat/scripts/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/scripts +cp share/xcat/cons/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/cons +chmod 755 $RPM_BUILD_ROOT/%{prefix}/share/xcat/cons/* +ln -sf /%{prefix}/share/xcat/cons/hmc $RPM_BUILD_ROOT/%{prefix}/share/xcat/cons/ivm -cp usr/lib/xcat/plugins/* $RPM_BUILD_ROOT/usr/lib/xcat/plugins -chmod 644 $RPM_BUILD_ROOT/usr/lib/xcat/plugins/* +cp lib/xcat/plugins/* $RPM_BUILD_ROOT/%{prefix}/lib/xcat/plugins +chmod 644 $RPM_BUILD_ROOT/%{prefix}/lib/xcat/plugins/* -cp usr/lib/xcat/dsh/Context/* $RPM_BUILD_ROOT/opt/csm/pm/dsh/Context +cp lib/xcat/dsh/Context/* $RPM_BUILD_ROOT/opt/csm/pm/dsh/Context chmod 644 $RPM_BUILD_ROOT/opt/csm/pm/dsh/Context/* -cp -r usr/lib/xcat/monitoring/* $RPM_BUILD_ROOT/usr/lib/xcat/monitoring -chmod 644 $RPM_BUILD_ROOT/usr/lib/xcat/monitoring/* +cp -r lib/xcat/monitoring/* $RPM_BUILD_ROOT/%{prefix}/lib/xcat/monitoring +chmod 644 $RPM_BUILD_ROOT/%{prefix}/lib/xcat/monitoring/* -chmod 755 $RPM_BUILD_ROOT/usr/lib/xcat/monitoring/samples -#cp usr/lib/xcat/monitoring/samples/* $RPM_BUILD_ROOT/usr/lib/xcat/monitoring/samples -chmod 644 $RPM_BUILD_ROOT/usr/lib/xcat/monitoring/samples/* +chmod 755 $RPM_BUILD_ROOT/%{prefix}/lib/xcat/monitoring/samples +#cp lib/xcat/monitoring/samples/* $RPM_BUILD_ROOT/%{prefix}/lib/xcat/monitoring/samples +chmod 644 $RPM_BUILD_ROOT/%{prefix}/lib/xcat/monitoring/samples/* -cp usr/lib/xcat/shfunctions $RPM_BUILD_ROOT/usr/lib/xcat -chmod 644 $RPM_BUILD_ROOT/usr/lib/xcat/shfunctions -mkdir -p $RPM_BUILD_ROOT/etc/xcat +cp lib/xcat/shfunctions $RPM_BUILD_ROOT/%{prefix}/lib/xcat +chmod 644 $RPM_BUILD_ROOT/%{prefix}/lib/xcat/shfunctions mkdir -p $RPM_BUILD_ROOT/etc/init.d cp etc/init.d/xcatd $RPM_BUILD_ROOT/etc/init.d +#TODO: the next has to me moved to postscript, to detect /etc/xcat vs /etc/opt/xcat +mkdir -p $RPM_BUILD_ROOT/etc/xcat cp etc/xcat/postscripts.rules $RPM_BUILD_ROOT/etc/xcat/ @@ -86,19 +87,15 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %doc README %doc LICENSE.html -/usr/sbin/* -/usr/share/xcat/install -/usr/share/xcat/ca/* -/usr/share/xcat/scripts/* -/usr/share/xcat/cons/* -/usr/lib/xcat/plugins/* -/usr/lib/xcat/monitoring -/usr/lib/xcat/shfunctions +%{prefix} /opt/csm /etc/xcat /etc/init.d/xcatd %changelog +* Fri Nov 20 2007 - Jarrod Johnson +- Changes for relocatible rpm. + * Wed May 2 2007 - Norm Nott - Made changes to make this work on AIX