Refine FSM packaging, make SHA1 optional
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13107 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
84e654bb84
commit
55819f9bab
@ -24,7 +24,10 @@ use File::Path;
|
||||
use Socket;
|
||||
use strict;
|
||||
use Symbol;
|
||||
use Digest::SHA1 qw/sha1/;
|
||||
my $sha1support = eval {
|
||||
require Digest::SHA1;
|
||||
1;
|
||||
};
|
||||
use IPC::Open3;
|
||||
use IO::Select;
|
||||
use xCAT::GlobalDef;
|
||||
@ -113,9 +116,9 @@ sub genUUID
|
||||
$mac = lc($mac);
|
||||
$uuid .= $mac;
|
||||
return $uuid;
|
||||
} elsif ($args{url}) { #generate a UUIDv5 from URL
|
||||
} elsif ($args{url} and $sha1support) { #generate a UUIDv5 from URL
|
||||
#6ba7b810-9dad-11d1-80b4-00c04fd430c8 is the uuid for URL namespace
|
||||
my $sum = sha1('6ba7b810-9dad-11d1-80b4-00c04fd430c8'.$args{url});
|
||||
my $sum = Digest::SHA1::sha1('6ba7b810-9dad-11d1-80b4-00c04fd430c8'.$args{url});
|
||||
my @data = unpack("C*",$sum);
|
||||
splice @data,16;
|
||||
$data[6] = $data[6] & 0xf;
|
||||
|
@ -11,6 +11,8 @@ Vendor: IBM Corp.
|
||||
Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
|
||||
Prefix: /opt/xcat
|
||||
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root
|
||||
%define fsm %(if [ "$fsm" = "1" ];then echo 1; else echo 0; fi)
|
||||
|
||||
|
||||
# AIX will build with an arch of "ppc"
|
||||
%ifos linux
|
||||
@ -89,6 +91,9 @@ chmod 444 $RPM_BUILD_ROOT/%{prefix}/share/man/man8/*
|
||||
# cp share/doc/xCAT2onAIX.odt $RPM_BUILD_ROOT/%{prefix}/share/doc
|
||||
# cp share/doc/xCAT2onAIX.pdf $RPM_BUILD_ROOT/%{prefix}/share/doc
|
||||
# %endif
|
||||
%if %fsm
|
||||
rm -f $RPM_BUILD_ROOT/%{prefix}/bin/*setup
|
||||
%else
|
||||
cp -r share/doc/* $RPM_BUILD_ROOT/%{prefix}/share/doc
|
||||
chmod 755 $RPM_BUILD_ROOT/%{prefix}/share/doc/*
|
||||
# These were built dynamically during the build phase
|
||||
@ -102,6 +107,7 @@ chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/doc/man5/*
|
||||
chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/doc/man8/*
|
||||
cp LICENSE.html $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT-client
|
||||
chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/doc/packages/xCAT-client/*
|
||||
%endif
|
||||
|
||||
cp share/xcat/tools/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/tools
|
||||
#cp usr/share/xcat/scripts/setup-local-client.sh $RPM_BUILD_ROOT/usr/share/xcat/scripts/setup-local-client.sh
|
||||
|
@ -12,6 +12,7 @@ Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
|
||||
Prefix: /opt/xcat
|
||||
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root
|
||||
|
||||
%define fsm %(if [ "$fsm" = "1" ];then echo 1; else echo 0; fi)
|
||||
%ifnos linux
|
||||
AutoReqProv: no
|
||||
%endif
|
||||
@ -20,7 +21,11 @@ AutoReqProv: no
|
||||
# also need to fix Requires for AIX
|
||||
%ifos linux
|
||||
BuildArch: noarch
|
||||
%if %fsm
|
||||
Requires: perl-IO-Socket-SSL perl-XML-Simple
|
||||
%else
|
||||
Requires: perl-IO-Socket-SSL perl-XML-Simple perl-IO-Tty perl-Crypt-SSLeay make
|
||||
%endif
|
||||
Obsoletes: atftp-xcat
|
||||
%endif
|
||||
|
||||
@ -33,7 +38,6 @@ Provides: xCAT-server = %{epoch}:%{version}
|
||||
xCAT-server provides the core server and configuration management components of xCAT. This package should be installed on your management server
|
||||
|
||||
%define zvm %(if [ "$zvm" = "1" ];then echo 1; else echo 0; fi)
|
||||
%define fsm %(if [ "$fsm" = "1" ];then echo 1; else echo 0; fi)
|
||||
|
||||
# %define VERBOSE %(if [ "$VERBOSE" = "1" -o "$VERBOSE" = "yes" ];then echo 1; else echo 0; fi)
|
||||
# %define NOVERBOSE %(if [ "$VERBOSE" = "1" -o "$VERBOSE" = "yes" ];then echo 0; else echo 1; fi)
|
||||
@ -206,8 +210,10 @@ rm -rf $RPM_BUILD_ROOT/%{prefix}/share/xcat/cons
|
||||
rm $RPM_BUILD_ROOT/%{prefix}/sbin/stopstartxcatd
|
||||
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/hpblade.pm
|
||||
rm $RPM_BUILD_ROOT/%{prefix}/share/xcat/tools/detect_dhcpd
|
||||
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/AAsn.pm
|
||||
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/hpilo.pm
|
||||
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/ipmi.pm
|
||||
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/blade.pm
|
||||
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/ipmi.pm.legacy
|
||||
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/nodediscover.pm
|
||||
rm $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin/switch.pm
|
||||
|
Loading…
Reference in New Issue
Block a user