mirror of
https://github.com/xcat2/xcat-dep.git
synced 2024-11-24 18:40:05 +00:00
Updated zHCP source for APIs in z/VM 6.1 and 6.2.
Former-commit-id: 8d111a9549ae070a1e084db713ceeedaa1506aaa
This commit is contained in:
parent
d9723be57c
commit
78cf8ab6f1
Binary file not shown.
@ -1,9 +1,9 @@
|
||||
%define name zhcp
|
||||
|
||||
Summary: zhcp
|
||||
Summary: System z hardware control point (zHCP)
|
||||
Name: %{name}
|
||||
Version: 1.4
|
||||
Release: 1
|
||||
Version: 2.0
|
||||
Release: snap%(date +"%Y%m%d%H%M")
|
||||
Source: zhcp-build.tar.gz
|
||||
Vendor: IBM
|
||||
License: IBM Copyright 2012 Eclipse Public License
|
||||
@ -13,7 +13,8 @@ Prefix: /opt/zhcp
|
||||
|
||||
%description
|
||||
The System z hardware control point (zHCP) is C program API to interface with
|
||||
z/VM SMAPI.
|
||||
z/VM SMAPI. It is used by xCAT to manage virtual machines running Linux on
|
||||
System z.
|
||||
|
||||
%prep
|
||||
tar -zxvf ../SOURCES/zhcp-build.tar.gz -C ../BUILD/ --strip 1
|
||||
@ -27,13 +28,50 @@ make post
|
||||
make clean
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/bin
|
||||
ln -sf %{prefix}/bin/smcli $RPM_BUILD_ROOT/usr/bin
|
||||
ln -sfd %{prefix}/bin/smcli $RPM_BUILD_ROOT/usr/bin
|
||||
chmod 644 $RPM_BUILD_ROOT/usr/bin/smcli
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1/
|
||||
cp smcli.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/
|
||||
mkdir -p $RPM_BUILD_ROOT/var/opt/zhcp
|
||||
cp config/tracing.conf $RPM_BUILD_ROOT/var/opt/zhcp
|
||||
|
||||
%post
|
||||
echo "/opt/zhcp/lib" > /etc/ld.so.conf.d/zhcp.conf
|
||||
|
||||
# Create log file for zHCP
|
||||
mkdir -p /var/log/zhcp
|
||||
touch /var/log/zhcp/zhcp.log
|
||||
|
||||
# syslog located in different directories in Red Hat/SUSE
|
||||
ZHCP_LOG_HEADER="# Logging for xCAT zHCP"
|
||||
ZHCP_LOG="/var/log/zhcp/zhcp.log"
|
||||
echo "Configuring syslog"
|
||||
|
||||
# SUSE Linux Enterprise Server
|
||||
if [ -e "/etc/init.d/syslog" ]; then
|
||||
# Syslog is the standard for log messages
|
||||
grep ${ZHCP_LOG} /etc/syslog.conf > /dev/null || (echo -e "\n${ZHCP_LOG_HEADER}\nlocal4.* ${ZHCP_LOG}" >> /etc/syslog.conf)
|
||||
fi
|
||||
if [ -e "/etc/syslog-ng/syslog-ng.conf" ]; then
|
||||
# Syslog-ng is the replacement for syslogd
|
||||
grep ${ZHCP_LOG} /etc/syslog-ng/syslog-ng.conf > /dev/null || (echo -e "\n${ZHCP_LOG_HEADER}\n\
|
||||
filter f_xcat_zhcp { facility(local4); };\n\
|
||||
destination zhcplog { file(\"${ZHCP_LOG}\"); };\n\
|
||||
log { source(src); filter(f_xcat_zhcp); destination(zhcplog); };" >> /etc/syslog-ng/syslog-ng.conf)
|
||||
fi
|
||||
|
||||
# Red Hat Enterprise Linux
|
||||
if [ -e "/etc/rc.d/init.d/rsyslog" ]; then
|
||||
grep ${ZHCP_LOG} /etc/rsyslog.conf > /dev/null || (echo -e "\n${ZHCP_LOG_HEADER}\nlocal4.* ${ZHCP_LOG}" >> /etc/rsyslog.conf)
|
||||
fi
|
||||
|
||||
# Restart syslog
|
||||
if [ -e "/etc/redhat-release" ]; then
|
||||
/etc/rc.d/init.d/rsyslog restart
|
||||
else
|
||||
/etc/init.d/syslog restart
|
||||
fi
|
||||
|
||||
/sbin/ldconfig
|
||||
|
||||
%preun
|
||||
@ -46,6 +84,7 @@ rm -rf /usr/share/man/man1/smcli.1.gz
|
||||
# Files provided by this package
|
||||
%defattr(-,root,root)
|
||||
/opt/zhcp/*
|
||||
/usr/bin/smcli
|
||||
/usr/share/man/man1/smcli.1.gz
|
||||
%config(noreplace) /usr/bin/smcli
|
||||
%config(noreplace) /usr/share/man/man1/smcli.1.gz
|
||||
%config(noreplace) /var/opt/zhcp/tracing.conf
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user