2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-21 11:12:04 +00:00

Make all the rpm packages have the exactly same version and release numbers

This commit is contained in:
GONG Jie 2016-11-23 16:48:07 +08:00
parent 72ae599ef1
commit 65c2911888
22 changed files with 145 additions and 189 deletions

1
Release Normal file
View File

@ -0,0 +1 @@
snap000000000000

View File

@ -8,7 +8,7 @@
# - On AIX: Install openssl and openssh installp pkgs and run updtvpkg. Install from http://www.perzl.org/aix/ :
# apr, apr-util, bash, bzip2, db4, expat, gdbm, gettext, glib2, gmp, info, libidn, neon, openssl (won't
# conflict with the installp version - but i don't think you need this), pcre, perl-DBD-SQLite, perl-DBI,
# popt, python, readline, rsynce, sqlite, subversion, unixODBC, zlib.
# popt, python, readline, rsynce, sqlite, subversion, unixODBC, zlib.
# Install wget from http://www-03.ibm.com/systems/power/software/aix/linux/toolbox/alpha.html
# - Run this script from the xcat-core directory. It will create the other directories that are needed.
#
@ -24,7 +24,7 @@
# (but the tarball file name will be like a released tarball, not a snap build). When you are ready to
# release this build, use PROMOTE=1 without PREGA
# BUILDALL=1 - build all rpms, whether they changed or not. Should be used for snap builds that are in prep for a release.
# UP=0 or UP=1 - override the default upload behavior
# UP=0 or UP=1 - override the default upload behavior
# GITUP=<filename> - control which rpms get built by specifying a coregitup file
# EMBED=<embedded-environment> - the environment for which a minimal version of xcat should be built, e.g. zvm or flex
# VERBOSE=1 - to see lots of verbose output
@ -39,10 +39,10 @@ UPLOADUSER=litingt
USER=xcat
SERVER=xcat.org
FILES_PATH="files"
FRS=/var/www/${SERVER}/${FILES_PATH}
FRS="/var/www/${SERVER}/${FILES_PATH}"
RELEASE=github.com/xcat2/xcat-core/releases
YUMDIR=$FRS
YUMDIR="${FRS}"
YUMREPOURL="http://${SERVER}/${FILES_PATH}/xcat/repos/yum"
if [ "$1" = "-h" ] || [ "$1" = "-help" ] || [ "$1" = "--help" ]; then
@ -71,8 +71,8 @@ ALLBUILD="perl-xCAT xCAT-client xCAT-server xCAT-test xCAT-buildkit xCAT xCATsn
ZVMBUILD="perl-xCAT xCAT-server xCAT-UI"
ZVMLINK="xCAT-client xCAT xCATsn"
# xCAT and xCATsn have PCM specific configuration - conserver-xcat, syslinux-xcat
# xCAT-server has PCM specific configuration - RESTAPI(perl-JSON)
# xCAT-client has PCM specific configuration - getxcatdocs(perl-JSON)
# xCAT-server has PCM specific configuration - RESTAPI(perl-JSON)
# xCAT-client has PCM specific configuration - getxcatdocs(perl-JSON)
PCMBUILD="xCAT xCAT-server xCAT-client xCATsn"
PCMLINK="perl-xCAT xCAT-buildkit xCAT-genesis-scripts-x86_64 xCAT-genesis-scripts-ppc64 xCAT-vlan xCAT-probe"
# Note: for FSM, the FlexCAT rpm is built separately from gsa/git
@ -103,7 +103,7 @@ OSNAME=$(uname)
if [ "$OSNAME" != "AIX" ]; then
GSA=http://pokgsa.ibm.com/projects/x/xcat/build/linux
if [ "$(id -u)" == "0" ]; then
# Get a lock, so can not do 2 builds at once
exec 8>/var/lock/xcatbld-$REL.lock
@ -186,10 +186,11 @@ function setversionvars {
BUILD_TIME=`date`
BUILD_MACHINE=`hostname`
COMMIT_ID=`git rev-parse --short HEAD`
XCAT_RELEASE="snap$(date '+%Y%m%d%H%M')"
echo "$XCAT_RELEASE" >Release
}
if [ "$PROMOTE" != 1 ]; then # very long if statement to not do builds if we are promoting
if [ "$PROMOTE" != 1 ]; then # very long if statement to not do builds if we are promoting ### @LINE460 ###
# we are doing a snap build
CORE="core-snap"
if [ "$OSNAME" = "AIX" ]; then
@ -217,14 +218,14 @@ else
#echo "source=$source"
fi
#
# If no pre-defined update file is provided, do a "git pull" to try and detect
#
# If no pre-defined update file is provided, do a "git pull" to try and detect
# if anything has changed in the source directories
#
#
SOMETHINGCHANGED=0
if [ "$GIT" = "1" ]; then
#
# To enable local sandbox build, GITPULL is disabled by default.
#
# To enable local sandbox build, GITPULL is disabled by default.
#
if [ "$GITPULL" = "1" ] || [ ${PWD} == *"autobuild"* ]; then
# TODO: This is really not necessary since the autobuild scripts
@ -339,7 +340,7 @@ if [ "$OSNAME" != "AIX" ]; then
fi
# Build the xCAT and xCATsn rpms for all platforms
for rpmname in xCAT xCATsn; do
for rpmname in xCAT xCATsn; do
if [[ " $EMBEDBUILD " != *\ $rpmname\ * ]]; then continue; fi
if [ $SOMETHINGCHANGED == 1 -o "$BUILDALL" == 1 ]; then # used to be: if $GREP -E "^[UAD] +$rpmname/" $GITUP; then
UPLOAD=1
@ -402,48 +403,49 @@ fi
# Prepare the RPMs for pkging and upload
WGET_CMD="wget"
if [ ! -z ${LOG} ]; then
if [ ! -z ${LOG} ]; then
WGET_CMD="wget -o ${LOG}"
fi
# get gpg keys in place
if [ "$OSNAME" != "AIX" ]; then
if [ -z "$RPMSIGN" -o "$RPMSIGN" == "1" ]; then
mkdir -p $HOME/.gnupg
for i in pubring.gpg secring.gpg trustdb.gpg; do
if [ ! -f $HOME/.gnupg/$i ] || [ `wc -c $HOME/.gnupg/$i|cut -f 1 -d' '` == 0 ]; then
rm -f $HOME/.gnupg/$i
${WGET_CMD} -P $HOME/.gnupg $GSA/keys/$i
chmod 600 $HOME/.gnupg/$i
mkdir -p $HOME/.gnupg
for i in pubring.gpg secring.gpg trustdb.gpg; do
if [ ! -f $HOME/.gnupg/$i ] ||
[ `wc -c $HOME/.gnupg/$i|cut -f 1 -d' '` == 0 ]; then
rm -f $HOME/.gnupg/$i
${WGET_CMD} -P $HOME/.gnupg $GSA/keys/$i
chmod 600 $HOME/.gnupg/$i
fi
done
# tell rpm to use gpg to sign
MACROS=$HOME/.rpmmacros
if ! $GREP '%_signature gpg' $MACROS 2>/dev/null; then
echo '%_signature gpg' >> $MACROS
fi
done
# tell rpm to use gpg to sign
MACROS=$HOME/.rpmmacros
if ! $GREP '%_signature gpg' $MACROS 2>/dev/null; then
echo '%_signature gpg' >> $MACROS
if ! $GREP '%_gpg_name' $MACROS 2>/dev/null; then
echo '%_gpg_name xCAT Security Key' >> $MACROS
fi
echo "Signing RPMs..."
build-utils/rpmsign.exp `find $DESTDIR -type f -name '*.rpm'` | grep -v -E '(already contains identical signature|was already signed|rpm --quiet --resign|WARNING: standard input reopened)'
build-utils/rpmsign.exp $SRCDIR/*rpm | grep -v -E '(already contains identical signature|was already signed|rpm --quiet --resign|WARNING: standard input reopened)'
createrepo --checksum sha $DESTDIR # specifying checksum so the repo will work on rhel5
createrepo --checksum sha $SRCDIR
rm -f $SRCDIR/repodata/repomd.xml.asc
rm -f $DESTDIR/repodata/repomd.xml.asc
gpg -a --detach-sign $DESTDIR/repodata/repomd.xml
gpg -a --detach-sign $SRCDIR/repodata/repomd.xml
if [ ! -f $DESTDIR/repodata/repomd.xml.key ]; then
${WGET_CMD} -q -P $DESTDIR/repodata $GSA/keys/repomd.xml.key
fi
if [ ! -f $SRCDIR/repodata/repomd.xml.key ]; then
${WGET_CMD} -P $SRCDIR/repodata $GSA/keys/repomd.xml.key
fi
else
createrepo --checksum sha $DESTDIR
createrepo --checksum sha $SRCDIR
fi
if ! $GREP '%_gpg_name' $MACROS 2>/dev/null; then
echo '%_gpg_name xCAT Security Key' >> $MACROS
fi
echo "Signing RPMs..."
build-utils/rpmsign.exp `find $DESTDIR -type f -name '*.rpm'` | grep -v -E '(already contains identical signature|was already signed|rpm --quiet --resign|WARNING: standard input reopened)'
build-utils/rpmsign.exp $SRCDIR/*rpm | grep -v -E '(already contains identical signature|was already signed|rpm --quiet --resign|WARNING: standard input reopened)'
createrepo --checksum sha $DESTDIR # specifying checksum so the repo will work on rhel5
createrepo --checksum sha $SRCDIR
rm -f $SRCDIR/repodata/repomd.xml.asc
rm -f $DESTDIR/repodata/repomd.xml.asc
gpg -a --detach-sign $DESTDIR/repodata/repomd.xml
gpg -a --detach-sign $SRCDIR/repodata/repomd.xml
if [ ! -f $DESTDIR/repodata/repomd.xml.key ]; then
${WGET_CMD} -q -P $DESTDIR/repodata $GSA/keys/repomd.xml.key
fi
if [ ! -f $SRCDIR/repodata/repomd.xml.key ]; then
${WGET_CMD} -P $SRCDIR/repodata $GSA/keys/repomd.xml.key
fi
else
createrepo --checksum sha $DESTDIR
createrepo --checksum sha $SRCDIR
fi
fi
# set group and permissions correctly on the built rpms
@ -455,7 +457,7 @@ chmod -R g+w $DESTDIR
chgrp -R $SYSGRP $SRCDIR
chmod -R g+w $SRCDIR
else # end of very long if-not-promote
else # end of very long if-not-promote ### @LINE193 ###
# we are only promoting (not building)
setversionvars
setbranch
@ -490,7 +492,7 @@ EOF
#!/bin/sh
cd `dirname $0`
REPOFILE=`basename xCAT-*.repo`
if [[ $REPOFILE == "xCAT-*.repo" ]]; then
if [ $REPOFILE = "xCAT-*.repo" ]; then
echo "ERROR: For xcat-dep, please execute $0 in the correct <os>/<arch> subdirectory"
exit 1
fi
@ -498,10 +500,10 @@ fi
# default to RHEL yum, if doesn't exist try Zypper
#
DIRECTORY="/etc/yum.repos.d"
if [[ ! -d ${DIRECTORY} ]]; then
DIRECTORY="/etc/zypp/repos.d"
if [ ! -d "$DIRECTORY" ]; then
DIRECTORY="/etc/zypp/repos.d"
fi
sed -e 's|baseurl=.*|baseurl=file://'"`pwd`"'|' $REPOFILE | sed -e 's|gpgkey=.*|gpgkey=file://'"`pwd`"'/repodata/repomd.xml.key|' > ${DIRECTORY}/$REPOFILE
sed -e 's|baseurl=.*|baseurl=file://'"`pwd`"'|' $REPOFILE | sed -e 's|gpgkey=.*|gpgkey=file://'"`pwd`"'/repodata/repomd.xml.key|' > "$DIRECTORY/$REPOFILE"
cd -
EOF2
chmod 775 mklocalrepo.sh
@ -521,6 +523,7 @@ fi
#
BUILDINFO=$XCATCORE/buildinfo
echo "VERSION=$VER" > $BUILDINFO
echo "RELEASE=$XCAT_RELEASE" >> $BUILDINFO
echo "BUILD_TIME=$BUILD_TIME" >> $BUILDINFO
echo "BUILD_MACHINE=$BUILD_MACHINE" >> $BUILDINFO
echo "COMMIT_ID=$COMMIT_ID" >> $BUILDINFO
@ -545,7 +548,7 @@ if [ -n "$UP" ] && [ "$UP" == 0 ]; then
fi
#else we will continue
# Upload the individual RPMs to xcat.org
# Upload the individual RPMs to xcat.org
if [ "$OSNAME" = "AIX" ]; then
YUM=aix
else
@ -561,13 +564,13 @@ if [ "$REL" = "devel" -o "$PREGA" != 1 ]; then
do : ; done
fi
# Upload the individual source RPMs to xcat.org
# Upload the individual source RPMs to xcat.org
i=0
echo "Uploading src RPMs from $SRCD to $YUMDIR/$YUM/$REL$EMBEDDIR/ ..."
while [ $((i+=1)) -le 5 ] && ! rsync -urLv --delete $SRCD $USER@$SERVER:$YUMDIR/$YUM/$REL$EMBEDDIR/
do : ; done
# Upload the tarball to xcat.org
# Upload the tarball to xcat.org
if [ "$PROMOTE" = 1 -a "$REL" != "devel" -a "$PREGA" != 1 ]; then
# upload tarball to FRS area
i=0

View File

@ -1,7 +1,7 @@
Summary: xCAT perl libraries
Name: perl-xCAT
Version: %{?version:%{version}}%{!?version:%(cat Version)}
Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
Release: %{?release:%{release}}%{!?release:%(cat Release)}
Epoch: 4
License: EPL
Group: System Environment/Libraries
@ -17,8 +17,6 @@ BuildArch: noarch
#Requires: perl-SOAP-Lite
%endif
Provides: perl-xCAT = %{epoch}:%{version}
%description
Provides perl xCAT libraries for core functionality. Required for all xCAT installations.
Includes xCAT::Table, xCAT::NodeRange, among others.

View File

@ -1,7 +1,7 @@
Summary: Install and configuration utilities for IBM HPC products in an xCAT cluster
Name: xCAT-IBMhpc
Version: %{?version:%{version}}%{!?version:%(cat Version)}
Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
Release: %{?release:%{release}}%{!?release:%(cat Release)}
Epoch: 4
License: EPL
Group: Applications/System
@ -20,7 +20,7 @@ AutoReqProv: no
# also need to fix Requires for AIX
%ifos linux
BuildArch: noarch
#Requires:
#Requires:
%endif
Requires: perl-xCAT >= %{epoch}:%{version}
@ -85,7 +85,3 @@ fi
%post
%preun

View File

@ -1,7 +1,7 @@
Summary: Executables and data of the xCAT baremetal driver for OpenStack
Name: xCAT-OpenStack-baremetal
Version: %{?version:%{version}}%{!?version:%(cat Version)}
Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
Release: %{?release:%{release}}%{!?release:%(cat Release)}
Epoch: 4
License: IBM
Group: Applications/System

View File

@ -1,7 +1,7 @@
Summary: Meta-Metapackage for a common, default xCAT management node setup with OpenStack
Summary: Meta-Metapackage for a common, default xCAT management node setup with OpenStack
Name: xCAT-OpenStack
Version: %{?version:%{version}}%{!?version:%(cat Version)}
Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
Release: %{?release:%{release}}%{!?release:%(cat Release)}
License: EPL
Group: Applications/System
Vendor: IBM Corp.
@ -16,8 +16,8 @@ Provides: xCAT-OpenStack = %{version}
Requires: xCAT
%description
xCAT-OpenStack is an xCAT management node package intended for at-scale
management with OpenStack, including hardware management and software
xCAT-OpenStack is an xCAT management node package intended for at-scale
management with OpenStack, including hardware management and software
management.
%prep
@ -28,7 +28,6 @@ management.
# Then convert the pods to man pages and html pages.
./db2man
%install
mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_schema
mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin
@ -89,9 +88,8 @@ rm -rf $RPM_BUILD_ROOT
%ifos linux
if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image
if [ -f $RPM_INSTALL_PREFIX0/sbin/xcatd ]; then
/etc/init.d/xcatd restart
/etc/init.d/xcatd restart
fi
fi
%endif
exit 0

View File

@ -1,7 +1,7 @@
Summary: Utilities to make xCAT work in a SoftLayer environment
Name: xCAT-SoftLayer
Version: %{?version:%{version}}%{!?version:%(cat Version)}
Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
Release: %{?release:%{release}}%{!?release:%(cat Release)}
Epoch: 4
License: EPL
Group: Applications/System

View File

@ -1,12 +1,12 @@
Summary: Web Client for xCAT 2
Name: xCAT-UI
Version: %{?version:%{version}}%{!?version:%(cat Version)}
Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
Release: %{?release:%{release}}%{!?release:%(cat Release)}
License: EPL
Group: Applications/System
URL: http://xcat.org
URL: https://xcat.org/
Packager: IBM
Vendor: IBM
Vendor: IBM Corp.
Source: xCAT-UI-%{version}.tar.gz
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root

View File

@ -1,7 +1,7 @@
Summary: xCAT buildkit tools and sample kit
Name: xCAT-buildkit
Version: %{?version:%{version}}%{!?version:%(cat Version)}
Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
Release: %{?release:%{release}}%{!?release:%(cat Release)}
Epoch: 4
License: EPL
Group: Applications/System
@ -20,15 +20,13 @@ AutoReqProv: no
# also need to fix Requires for AIX
%ifos linux
BuildArch: noarch
#Requires:
#Requires:
%endif
# No dependencies on any other xCAT rpms
# so that this rpm can be installed in a separate build server
Requires: /usr/bin/rpmbuild
Provides: xCAT-buildkit = %{epoch}:%{version}
%description
xCAT-buildkit provides the buildkit tool and sample kit files to build an xCAT kit.
@ -41,8 +39,6 @@ mkdir -p share/doc/man1
pod2man pods/man1/buildkit.1.pod > share/man/man1/buildkit.1
pod2html pods/man1/buildkit.1.pod > share/doc/man1/buildkit.1.html
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/kits
@ -57,7 +53,6 @@ chmod 444 $RPM_BUILD_ROOT/%{prefix}/share/man/man1/*
cp share/doc/man1/* $RPM_BUILD_ROOT/%{prefix}/share/doc/man1
chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/doc/man1/*
%ifos linux
cp -aR share/xcat/kits/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/kits/
#chmod -R 644 $RPM_BUILD_ROOT/%{prefix}/share/xcat/kits/*
@ -110,7 +105,3 @@ fi
%post
%preun

View File

@ -1,7 +1,7 @@
Summary: Core executables and data of the xCAT management project
Name: xCAT-client
Version: %{?version:%{version}}%{!?version:%(cat Version)}
Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
Release: %{?release:%{release}}%{!?release:%(cat Release)}
Epoch: 4
License: EPL
Group: Applications/System
@ -21,15 +21,13 @@ BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root
BuildArch: noarch
%endif
Provides: xCAT-client = %{epoch}:%{version}
Requires: perl-xCAT >= %{epoch}:%{version}
Requires: perl-xCAT = 4:%{version}-%{release}
# fping or nmap is needed by pping (in case xCAT-client is installed by itself on a remote client)
%ifos linux
Requires: nmap perl-XML-Simple perl-XML-Parser
%else
Requires: expat
Requires: expat
%endif
%description
@ -355,4 +353,3 @@ if [ $1 == 0 ]; then #This means only on -e
rm -f /etc/profile.d/xcat.*
fi
%endif

View File

@ -1,7 +1,7 @@
Summary: xCAT integration with confluent systems management server
Name: xCAT-confluent
Version: %{?version:%{version}}%{!?version:%(cat Version)}
Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
Release: %{?release:%{release}}%{!?release:%(cat Release)}
Epoch: 4
License: EPL
Group: Applications/System

View File

@ -1,7 +1,7 @@
Summary: Packages for installation of CSM nodes
Name: xCAT-csm
Version: %{?version:%{version}}%{!?version:%(cat Version)}
Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
Release: %{?release:%{release}}%{!?release:%(cat Release)}
Epoch: 4
License: IBM
Group: Applications/System

View File

@ -1,6 +1,6 @@
%define version %%REPLACE_CURRENT_VERSION%%
Version: %{?version:%{version}}%{!?version:%(cat Version)}
Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
Release: %{?release:%{release}}%{!?release:%(cat Release)}
%ifarch i386 i586 i686 x86
%define tarch x86
%endif
@ -27,7 +27,7 @@ Group: System/Utilities
License: Various (see individual packages for details)
Vendor: IBM Corp.
Summary: xCAT Genesis netboot image
URL: http://xcat.org
URL: https://xcat.org/
Source1: xCAT-genesis-base-%{tarch}.tar.bz2
Buildroot: %{_localstatedir}/tmp/xCAT-genesis

View File

@ -1,7 +1,7 @@
BuildArch: noarch
%define name xCAT-genesis-builder
Version: %{?version:%{version}}%{!?version:%(cat Version)}
Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
Release: %{?release:%{release}}%{!?release:%(cat Release)}
Epoch: 1
AutoReq: false
Requires: ipmitool screen btrfs-progs lldpad rpm-build compat-libstdc++-33 mstflint xfsprogs nc reiserfs-utils
@ -15,7 +15,7 @@ Group: System/Utilities
License: EPL
Vendor: IBM Corp.
Summary: Tooling to create xCAT's discovery/maintenance/debugging environment
URL: http://xcat.org
URL: https://xcat.org/
Source1: xCAT-genesis-builder.tar.bz2
Buildroot: %{_localstatedir}/tmp/xCAT-genesis-builder

View File

@ -13,8 +13,8 @@ BuildArch: noarch
%define __spec_install_post :
%define debug_package %{nil}
%define __prelink_undo_cmd %{nil}
Version: %{?version:%{version}}%{!?version:%{version}}
Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
Version: %{?version:%{version}}%{!?version:%(cat Version)}
Release: %{?release:%{release}}%{!?release:%(cat Release)}
Epoch: 1
AutoReq: false
Prefix: /opt/xcat
@ -22,14 +22,12 @@ AutoProv: false
Obsoletes: xCAT-genesis-%{tarch}
Provides: xCAT-genesis-%{tarch}
Name: %{name}
Group: System/Utilities
License: EPL
Vendor: IBM Corp
Summary: xCAT Genesis netboot image - Core content
URL: http://xcat.org
URL: https://xcat.org/
Source1: xCAT-genesis-scripts.tar.bz2
Requires: xCAT-genesis-base-%{tarch} >= 2:2.13.0
@ -41,7 +39,6 @@ xCAT genesis (Genesis Enhanced Netboot Environment for System Information and Se
This package reperesents the EPL content that is more tightly bound to specific xcat-core versions
%Prep
%Build
%Install
@ -55,7 +52,6 @@ rm opt/xcat/share/xcat/netboot/genesis/%{tarch}/fs/*.spec
rm opt/xcat/share/xcat/netboot/genesis/%{tarch}/fs/LICENSE.html
cd -
# Since this rpm is being installed/updated, we need to run mknb to combine it with
# xCAT-genesis-base-x86_64, but mknb will not work during an initial install of xcat
# until the xCAT meta pkg has run xcatconfig or xCATsn has started xcatd. Use of a trigger
@ -72,7 +68,6 @@ echo "If you are installing/updating xCAT-genesis-base separately, not as part o
mkdir -p /etc/xcat
touch /etc/xcat/genesis-scripts-updated
%Files
%defattr(-,root,root)
#%dir %attr(-,root,root) %{rpminstallroot}
@ -103,5 +98,5 @@ touch /etc/xcat/genesis-scripts-updated
%{rpminstallroot}/etc/udev/rules.d/99-imm.rules
%{rpminstallroot}/etc/udev/rules.d/98-mlx.rules
%{rpminstallroot}/sbin/setupimmnic
%{rpminstallroot}/sbin/loadmlxeth
%{rpminstallroot}/sbin/loadmlxeth
%exclude %{rpminstallroot}/debian/*

View File

@ -1,7 +1,7 @@
Summary: xCAT diagnostic tool
Summary: xCAT diagnostic tool
Name: xCAT-probe
Version: %{?version:%{version}}%{!?version:%(cat Version)}
Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
Release: %{?release:%{release}}%{!?release:%(cat Release)}
Epoch: 4
License: EPL
Group: Applications/System
@ -17,14 +17,12 @@ BuildArch: noarch
%endif
%ifos linux
#Below tools are required by sub-command 'xcatmn'
#Below tools are required by sub-command 'xcatmn'
Requires: /usr/bin/nslookup
Requires: /usr/bin/tftp
Requires: /usr/bin/wget
%endif
Provides: xCAT-probe = %{version}
%description
xCAT-probe provides a toolkits to probe potential issues with the xCAT cluster.

View File

@ -1,7 +1,7 @@
Summary: RMC monitoring plug-in for xCAT
Name: xCAT-rmc
Version: %{?version:%{version}}%{!?version:%(cat Version)}
Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
Release: %{?release:%{release}}%{!?release:%(cat Release)}
Epoch: 4
License: EPL
Group: System Environment/Libraries
@ -15,10 +15,8 @@ BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root
BuildArch: noarch
%endif
Requires: perl-xCAT >= %{epoch}:%{version}
Requires: xCAT-server >= %{epoch}:%{version}
Provides: xCAT-rmc = %{version}
Requires: perl-xCAT = 4:%{version}-%{release}
Requires: xCAT-server = 4:%{version}-%{release}
%description
Provides RMC monitoring plug-in module for xCAT, configuration scripts, predefined conditions, responses and sensors.
@ -42,7 +40,6 @@ chmod 755 $RPM_BUILD_ROOT/%{prefix}/sbin/rmcmon/*
cp lib/perl/TEAL/* $RPM_BUILD_ROOT/%{prefix}/lib/perl/TEAL
%clean
rm -rf $RPM_BUILD_ROOT
@ -82,7 +79,7 @@ else
needCopyFiles=1;
fi
fi
if [ $needCopyFiles -eq 1 ]; then
echo "Copying files to /install/postscripts directory..."
mkdir -p /install/postscripts
@ -90,23 +87,23 @@ if [ $needCopyFiles -eq 1 ]; then
mkdir -p /install/postscripts/rmcmon/scripts
cp $RPM_INSTALL_PREFIX0/sbin/rmcmon/configrmcnode /install/postscripts
chmod 755 /install/postscripts/configrmcnode
FILES_TO_COPY=`cat $RPM_INSTALL_PREFIX0/sbin/rmcmon/scripts_to_node|tr '\n' ' '`
FILES_TO_COPY=`cat $RPM_INSTALL_PREFIX0/sbin/rmcmon/scripts_to_node|tr '\n' ' '`
for file in $FILES_TO_COPY
do
#echo "file=$file"
cp $RPM_INSTALL_PREFIX0/sbin/rmcmon/$file /install/postscripts/rmcmon/scripts
done
chmod 755 /install/postscripts/rmcmon/scripts/*
cp -r $RPM_INSTALL_PREFIX0/lib/perl/xCAT_monitoring/rmc/resources/node/* /install/postscripts/rmcmon/resources/node
fi
fi
%ifos linux
if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image
if [ -f $RPM_INSTALL_PREFIX0/sbin/xcatd ]; then
/etc/init.d/xcatd restart
/etc/init.d/xcatd restart
fi
fi
%else
@ -117,13 +114,7 @@ fi
echo "Do not restartxcatd in not running system"
else
XCATROOT=$RPM_INSTALL_PREFIX0 $RPM_INSTALL_PREFIX0/sbin/restartxcatd -r
fi
fi
fi
%endif
exit 0

View File

@ -1,7 +1,7 @@
Summary: Server and configuration utilities of the xCAT management project
Name: xCAT-server
Version: %{?version:%{version}}%{!?version:%(cat Version)}
Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
Release: %{?release:%{release}}%{!?release:%(cat Release)}
Epoch: 4
License: EPL
Group: Applications/System
@ -47,11 +47,8 @@ Requires: perl-IO-Tty perl-Crypt-SSLeay make
%endif
%endif
Requires: perl-xCAT >= %{epoch}:%{version}
Requires: xCAT-client >= %{epoch}:%{version}
Provides: xCAT-server = %{epoch}:%{version}
Requires: perl-xCAT = 4:%{version}-%{release}
Requires: xCAT-client = 4:%{version}-%{release}
%description
xCAT-server provides the core server and configuration management components of xCAT. This package should be installed on your management server
@ -349,8 +346,8 @@ echo "ScriptAlias /xcatws %{prefix}/ws/xcatws.cgi" >> $RPM_BUILD_ROOT/etc/xcat/c
cat $RPM_BUILD_ROOT/%{prefix}/ws/xcat-ws.conf.apache22 >> $RPM_BUILD_ROOT/etc/xcat/conf.orig/xcat-ws.conf.apache22
cat $RPM_BUILD_ROOT/%{prefix}/ws/xcat-ws.conf.apache24 >> $RPM_BUILD_ROOT/etc/xcat/conf.orig/xcat-ws.conf.apache24
#install lower version(<2.4) apache/httpd conf files by default
cp $RPM_BUILD_ROOT/etc/xcat/conf.orig/xcat-ws.conf.apache22 $RPM_BUILD_ROOT/etc/apache2/conf.d/xcat-ws.conf
cp $RPM_BUILD_ROOT/etc/xcat/conf.orig/xcat-ws.conf.apache22 $RPM_BUILD_ROOT/etc/httpd/conf.d/xcat-ws.conf
cp $RPM_BUILD_ROOT/etc/xcat/conf.orig/xcat-ws.conf.apache22 $RPM_BUILD_ROOT/etc/apache2/conf.d/xcat-ws.conf
cp $RPM_BUILD_ROOT/etc/xcat/conf.orig/xcat-ws.conf.apache22 $RPM_BUILD_ROOT/etc/httpd/conf.d/xcat-ws.conf
%endif
@ -401,7 +398,7 @@ fi
%endif
# The Juniper directory is switched to Jun and a sylink is created
if [ -d $RPM_INSTALL_PREFIX0/share/xcat/devicetype/EthSwitch/Juniper ]; then
if [ -d $RPM_INSTALL_PREFIX0/share/xcat/devicetype/EthSwitch/Juniper ]; then
# need to remove the old directory otherwise the symlink won't get creatd correctly
rm -rf $RPM_INSTALL_PREFIX0/share/xcat/devicetype/EthSwitch/Juniper
fi
@ -428,17 +425,16 @@ fi
%else
if [ "$1" -gt "1" ]; then #only on upgrade for AIX...
#migration issue for monitoring
XCATROOT=$RPM_INSTALL_PREFIX0 $RPM_INSTALL_PREFIX0/sbin/chtab filename=monitorctrl.pm notification -d
XCATROOT=$RPM_INSTALL_PREFIX0 $RPM_INSTALL_PREFIX0/sbin/chtab filename=monitorctrl.pm notification -d
fi
fi
%endif
#Apply the correct httpd/apache configuration file according to the httpd/apache version
if [ -n "$(httpd -v 2>&1 |grep -e '^Server version\s*:.*\/2.4')" ]
then
rm -rf /etc/httpd/conf.d/xcat-ws.conf
cp /etc/xcat/conf.orig/xcat-ws.conf.apache24 /etc/httpd/conf.d/xcat-ws.conf
cp /etc/xcat/conf.orig/xcat-ws.conf.apache24 /etc/httpd/conf.d/xcat-ws.conf
fi
if [ -n "$(apachectl -v 2>&1 |grep -e '^Server version\s*:.*\/2.4')" ]
@ -453,7 +449,6 @@ then
cp /etc/xcat/conf.orig/xcat-ws.conf.apache24 /etc/apache2/conf.d/xcat-ws.conf
fi
exit 0
%preun

View File

@ -1,7 +1,7 @@
Summary: xCAT automated test tool
Name: xCAT-test
Version: %{?version:%{version}}%{!?version:%(cat Version)}
Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
Release: %{?release:%{release}}%{!?release:%(cat Release)}
Epoch: 4
License: EPL
Group: Applications/System
@ -17,8 +17,6 @@ BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root
BuildArch: noarch
%endif
Provides: xCAT-test = %{version}
%description
Provides automated test tool and buckets to help test xCAT commands automatically.

View File

@ -1,7 +1,7 @@
Summary: Executables and data of the xCAT vlan management project
Name: xCAT-vlan
Version: %{?version:%{version}}%{!?version:%(cat Version)}
Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
Release: %{?release:%{release}}%{!?release:%(cat Release)}
Epoch: 4
License: IBM
Group: Applications/System
@ -16,11 +16,7 @@ BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root
BuildArch: noarch
%endif
Provides: xCAT-vlan = %{epoch}:%{version}
Requires: xCAT-client
Requires: xCAT-client = 4:%{version}-%{release}
%description
xCAT-vlan provides the xCAT vlan confiuration.
@ -45,14 +41,12 @@ mkdir -p $RPM_BUILD_ROOT/install/postscripts
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/man/man1
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/doc/man1
set +x
cp xCAT/* $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT
cp -R xCAT_plugin/* $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin
cp install/postscripts/* $RPM_BUILD_ROOT/install/postscripts
# These were built dynamically in the build phase
cp share/man/man1/* $RPM_BUILD_ROOT/%{prefix}/share/man/man1
chmod 444 $RPM_BUILD_ROOT/%{prefix}/share/man/man1/*
@ -68,7 +62,6 @@ ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/rmvlan
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/lsvlan
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/chvlanports
%clean
# This step does not happen until *after* the %files packaging below
rm -rf $RPM_BUILD_ROOT
@ -80,7 +73,6 @@ rm -rf $RPM_BUILD_ROOT
%{prefix}
/install/postscripts
%changelog
%post
@ -104,5 +96,3 @@ rm -rf $RPM_BUILD_ROOT
exit 0
%preun

View File

@ -1,9 +1,10 @@
Summary: Meta-package for a common, default xCAT setup
Name: xCAT
Version: %{?version:%{version}}%{!?version:%(cat Version)}
Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
Release: %{?release:%{release}}%{!?release:%(cat Release)}
License: EPL
Group: Applications/System
URL: https://xcat.org/
Vendor: IBM Corp.
Packager: IBM Corp.
Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
@ -13,7 +14,7 @@ BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root
Source1: xcat.conf
Source2: postscripts.tar.gz
Source3: templates.tar.gz
Source5: xCATMN
Source5: xCATMN
%ifos linux
Source4: prescripts.tar.gz
@ -25,7 +26,12 @@ Source7: xcat.conf.apach24
Provides: xCAT = %{version}
Conflicts: xCATsn
Requires: xCAT-server xCAT-client perl-DBD-SQLite xCAT-probe >= 2.12.1 xCAT-genesis-scripts-x86_64 xCAT-genesis-scripts-ppc64
Requires: perl-DBD-SQLite
Requires: xCAT-client = 4:%{version}-%{release}
Requires: xCAT-server = 4:%{version}-%{release}
Requires: xCAT-probe = 4:%{version}-%{release}
Requires: xCAT-genesis-scripts-x86_64 = 1:%{version}-%{release}
Requires: xCAT-genesis-scripts-ppc64 = 1:%{version}-%{release}
%define pcm %(if [ "$pcm" = "1" ];then echo 1; else echo 0; fi)
%define notpcm %(if [ "$pcm" = "1" ];then echo 0; else echo 1; fi)
@ -34,7 +40,7 @@ Requires: xCAT-server xCAT-client perl-DBD-SQLite xCAT-probe >= 2.12.1 xCAT-gene
Requires: httpd nfs-utils nmap bind perl(CGI)
# on RHEL7, need to specify it explicitly
Requires: net-tools
Requires: /usr/bin/killall
Requires: /usr/bin/killall
# On RHEL this pulls in dhcp, on SLES it pulls in dhcp-server
Requires: /usr/sbin/dhcpd
# On RHEL this pulls in openssh-server, on SLES it pulls in openssh
@ -101,7 +107,7 @@ tar -xf postscripts.tar
# this is now handled by requiring /usr/sbin/dhcpd
#if [ -e "/etc/SuSE-release" ]; then
# In SuSE, dhcp-server provides the dhcp server, which is different from the RedHat.
# When building the package, we cannot add "dhcp-server" into the "Requires", because RedHat doesn't
# When building the package, we cannot add "dhcp-server" into the "Requires", because RedHat doesn't
# have such one package.
# so there's only one solution, Yes, it looks ugly.
#rpm -q dhcp-server >/dev/null
@ -190,13 +196,13 @@ then
fi
if [ -n "$(apachectl -v 2>&1 |grep -e '^Server version\s*:.*\/2.4')" ]
then
then
rm -rf /etc/apache2/conf.d/xcat.conf
cp /etc/xcat/conf.orig/xcat.conf.apach24 /etc/apache2/conf.d/xcat.conf
fi
if [ -n "$(apache2ctl -v 2>&1 |grep -e '^Server version\s*:.*\/2.4')" ]
then
then
rm -rf /etc/apache2/conf.d/xcat.conf
cp /etc/xcat/conf.orig/xcat.conf.apach24 /etc/apache2/conf.d/xcat.conf
fi
@ -237,7 +243,6 @@ exit 0
%clean
%files
%{prefix}
# one for sles, one for rhel. yes, it's ugly...
@ -259,10 +264,8 @@ exit 0
%postun
if [ "$1" = "0" ]; then
%ifnos linux
if grep "^xcatd" /etc/inittab >/dev/null
then
@ -271,4 +274,3 @@ fi
%endif
true # so on aix we do not end up with an empty if stmt
fi

View File

@ -1,7 +1,7 @@
Summary: Metapackage for a common, default xCAT service node setup
Name: xCATsn
Version: %{?version:%{version}}%{!?version:%(cat Version)}
Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
Release: %{?release:%{release}}%{!?release:%(cat Release)}
Epoch: 4
License: EPL
Group: Applications/System
@ -13,11 +13,15 @@ BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root
#BuildArch: noarch
Source1: xcat.conf
Source2: license.tar.gz
Source3: xCATSN
Source3: xCATSN
Source5: templates.tar.gz
Source6: xcat.conf.apach24
Provides: xCATsn = %{version}
Requires: xCAT-server xCAT-client perl-DBD-SQLite xCAT-genesis-scripts-x86_64 xCAT-genesis-scripts-ppc64 xCAT-probe >= 2.12.2
Requires: perl-DBD-SQLite
Requires: xCAT-client = 4:%{version}-%{release}
Requires: xCAT-server = 4:%{version}-%{release}
Requires: xCAT-probe = 4:%{version}-%{release}
Requires: xCAT-genesis-scripts-x86_64 = 1:%{version}-%{release}
Requires: xCAT-genesis-scripts-ppc64 = 1:%{version}-%{release}
Conflicts: xCAT
@ -38,7 +42,7 @@ Requires: /usr/bin/ssh
%ifnarch s390x
Requires: /etc/xinetd.d/tftp
# yaboot-xcat is pulled in so any MN can manage ppc nodes
#Requires: yaboot-xcat
#Requires: yaboot-xcat
# Stty is only needed for rcons on ppc64 nodes, but for mixed clusters require it on both x and p
Requires: perl-IO-Stty
%endif
@ -74,7 +78,7 @@ Requires: syslinux-xcat
%description
xCATsn is a service node management package intended for at-scale management,
including hardware management and software management.
including hardware management and software management.
%prep
@ -181,9 +185,9 @@ if [ "$1" = "1" ]; then #Only if installing for the first time..
# setup sqlite if no other database
%ifos linux
if [ -f "/proc/cmdline" ]; then #check to make sure this is not image install
if [ ! -s /etc/xcat/cfgloc ]; then # database is sqlite
%ifos linux
if [ -f "/proc/cmdline" ]; then #check to make sure this is not image install
if [ ! -s /etc/xcat/cfgloc ]; then # database is sqlite
$RPM_INSTALL_PREFIX0/sbin/xcatconfig -d
fi
fi
@ -207,16 +211,16 @@ else # SuSE
fi
# start xcatd on linux
[ -e "/etc/init.d/$apachedaemon" ] && chkconfig $apachedaemon on
[ -e "/usr/lib/systemd/system/$apacheserviceunit" ] && systemctl enable $apacheserviceunit
[ -e "/usr/lib/systemd/system/$apacheserviceunit" ] && systemctl enable $apacheserviceunit
if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image
XCATROOT=$RPM_INSTALL_PREFIX0 /etc/init.d/xcatd restart
[ -e "/etc/init.d/$apachedaemon" ] && /etc/init.d/$apachedaemon reload
[ -e "/usr/lib/systemd/system/$apacheserviceunit" ] && systemctl reload $apacheserviceunit
[ -e "/etc/init.d/$apachedaemon" ] && /etc/init.d/$apachedaemon reload
[ -e "/usr/lib/systemd/system/$apacheserviceunit" ] && systemctl reload $apacheserviceunit
fi
echo "xCATsn is now installed"
%else
# start xcatd on AIX
XCATROOT=$RPM_INSTALL_PREFIX0 $RPM_INSTALL_PREFIX0/sbin/restartxcatd
XCATROOT=$RPM_INSTALL_PREFIX0 $RPM_INSTALL_PREFIX0/sbin/restartxcatd
echo "xCATsn is now installed"
%endif
@ -237,7 +241,6 @@ if [ -f "/proc/cmdline" -a -f "/etc/xcat/genesis-scripts-updated" ]; then
fi
%endif
%clean
%files