From 65c29118882236ae56fdb5b1aa95dc64dae92d93 Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Wed, 23 Nov 2016 16:48:07 +0800 Subject: [PATCH 1/5] Make all the rpm packages have the exactly same version and release numbers --- Release | 1 + buildcore.sh | 117 +++++++++--------- perl-xCAT/perl-xCAT.spec | 4 +- xCAT-IBMhpc/xCAT-IBMhpc.spec | 8 +- .../xCAT-OpenStack-baremetal.spec | 2 +- xCAT-OpenStack/xCAT-OpenStack.spec | 12 +- xCAT-SoftLayer/xCAT-SoftLayer.spec | 2 +- xCAT-UI/xCAT-UI.spec | 6 +- xCAT-buildkit/xCAT-buildkit.spec | 13 +- xCAT-client/xCAT-client.spec | 9 +- xCAT-confluent/xCAT-confluent.spec | 2 +- xCAT-csm/xCAT-csm.spec | 2 +- xCAT-genesis-builder/xCAT-genesis-base.spec | 4 +- .../xCAT-genesis-builder.spec | 4 +- .../xCAT-genesis-scripts.spec | 13 +- xCAT-probe/xCAT-probe.spec | 8 +- xCAT-rmc/xCAT-rmc.spec | 31 ++--- xCAT-server/xCAT-server.spec | 23 ++-- xCAT-test/xCAT-test.spec | 4 +- xCAT-vlan/xCAT-vlan.spec | 14 +-- xCAT/xCAT.spec | 24 ++-- xCATsn/xCATsn.spec | 31 ++--- 22 files changed, 145 insertions(+), 189 deletions(-) create mode 100644 Release diff --git a/Release b/Release new file mode 100644 index 000000000..a33a0ed75 --- /dev/null +++ b/Release @@ -0,0 +1 @@ +snap000000000000 diff --git a/buildcore.sh b/buildcore.sh index 0343d0376..da51c3884 100755 --- a/buildcore.sh +++ b/buildcore.sh @@ -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= - control which rpms get built by specifying a coregitup file # EMBED= - 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 / 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 diff --git a/perl-xCAT/perl-xCAT.spec b/perl-xCAT/perl-xCAT.spec index b1bb44274..86c15f41a 100644 --- a/perl-xCAT/perl-xCAT.spec +++ b/perl-xCAT/perl-xCAT.spec @@ -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. diff --git a/xCAT-IBMhpc/xCAT-IBMhpc.spec b/xCAT-IBMhpc/xCAT-IBMhpc.spec index 32ed7f3d8..52bddba3e 100644 --- a/xCAT-IBMhpc/xCAT-IBMhpc.spec +++ b/xCAT-IBMhpc/xCAT-IBMhpc.spec @@ -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 - - - - diff --git a/xCAT-OpenStack-baremetal/xCAT-OpenStack-baremetal.spec b/xCAT-OpenStack-baremetal/xCAT-OpenStack-baremetal.spec index c82d9b36e..ff45e5bd6 100644 --- a/xCAT-OpenStack-baremetal/xCAT-OpenStack-baremetal.spec +++ b/xCAT-OpenStack-baremetal/xCAT-OpenStack-baremetal.spec @@ -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 diff --git a/xCAT-OpenStack/xCAT-OpenStack.spec b/xCAT-OpenStack/xCAT-OpenStack.spec index b1fae31be..a502b20d5 100644 --- a/xCAT-OpenStack/xCAT-OpenStack.spec +++ b/xCAT-OpenStack/xCAT-OpenStack.spec @@ -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 - diff --git a/xCAT-SoftLayer/xCAT-SoftLayer.spec b/xCAT-SoftLayer/xCAT-SoftLayer.spec index 7166d1e9d..683b98ea8 100644 --- a/xCAT-SoftLayer/xCAT-SoftLayer.spec +++ b/xCAT-SoftLayer/xCAT-SoftLayer.spec @@ -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 diff --git a/xCAT-UI/xCAT-UI.spec b/xCAT-UI/xCAT-UI.spec index 0881b8f8a..15b714315 100644 --- a/xCAT-UI/xCAT-UI.spec +++ b/xCAT-UI/xCAT-UI.spec @@ -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 diff --git a/xCAT-buildkit/xCAT-buildkit.spec b/xCAT-buildkit/xCAT-buildkit.spec index 6809507c7..0d91f6d07 100644 --- a/xCAT-buildkit/xCAT-buildkit.spec +++ b/xCAT-buildkit/xCAT-buildkit.spec @@ -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 - - - - diff --git a/xCAT-client/xCAT-client.spec b/xCAT-client/xCAT-client.spec index d44961f2a..44235d213 100644 --- a/xCAT-client/xCAT-client.spec +++ b/xCAT-client/xCAT-client.spec @@ -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 - diff --git a/xCAT-confluent/xCAT-confluent.spec b/xCAT-confluent/xCAT-confluent.spec index 44111fb73..8b3dc9e1f 100644 --- a/xCAT-confluent/xCAT-confluent.spec +++ b/xCAT-confluent/xCAT-confluent.spec @@ -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 diff --git a/xCAT-csm/xCAT-csm.spec b/xCAT-csm/xCAT-csm.spec index e0d993026..b173e3043 100644 --- a/xCAT-csm/xCAT-csm.spec +++ b/xCAT-csm/xCAT-csm.spec @@ -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 diff --git a/xCAT-genesis-builder/xCAT-genesis-base.spec b/xCAT-genesis-builder/xCAT-genesis-base.spec index 989980591..d891671bd 100755 --- a/xCAT-genesis-builder/xCAT-genesis-base.spec +++ b/xCAT-genesis-builder/xCAT-genesis-base.spec @@ -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 diff --git a/xCAT-genesis-builder/xCAT-genesis-builder.spec b/xCAT-genesis-builder/xCAT-genesis-builder.spec index 91d301d44..4f85cde25 100644 --- a/xCAT-genesis-builder/xCAT-genesis-builder.spec +++ b/xCAT-genesis-builder/xCAT-genesis-builder.spec @@ -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 diff --git a/xCAT-genesis-scripts/xCAT-genesis-scripts.spec b/xCAT-genesis-scripts/xCAT-genesis-scripts.spec index 2dcd33925..e0e7c7f0e 100755 --- a/xCAT-genesis-scripts/xCAT-genesis-scripts.spec +++ b/xCAT-genesis-scripts/xCAT-genesis-scripts.spec @@ -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/* diff --git a/xCAT-probe/xCAT-probe.spec b/xCAT-probe/xCAT-probe.spec index 26e5d5404..8a1fda11b 100644 --- a/xCAT-probe/xCAT-probe.spec +++ b/xCAT-probe/xCAT-probe.spec @@ -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. diff --git a/xCAT-rmc/xCAT-rmc.spec b/xCAT-rmc/xCAT-rmc.spec index 56f57d6fd..235d0d2da 100644 --- a/xCAT-rmc/xCAT-rmc.spec +++ b/xCAT-rmc/xCAT-rmc.spec @@ -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 - - - - - - diff --git a/xCAT-server/xCAT-server.spec b/xCAT-server/xCAT-server.spec index a3670db9d..f4fb5acb9 100644 --- a/xCAT-server/xCAT-server.spec +++ b/xCAT-server/xCAT-server.spec @@ -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 diff --git a/xCAT-test/xCAT-test.spec b/xCAT-test/xCAT-test.spec index f5aca2460..6906896da 100644 --- a/xCAT-test/xCAT-test.spec +++ b/xCAT-test/xCAT-test.spec @@ -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. diff --git a/xCAT-vlan/xCAT-vlan.spec b/xCAT-vlan/xCAT-vlan.spec index 6e46f2ebe..487dbcb12 100755 --- a/xCAT-vlan/xCAT-vlan.spec +++ b/xCAT-vlan/xCAT-vlan.spec @@ -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 - - diff --git a/xCAT/xCAT.spec b/xCAT/xCAT.spec index d1d935e3f..7944f6108 100644 --- a/xCAT/xCAT.spec +++ b/xCAT/xCAT.spec @@ -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 - diff --git a/xCATsn/xCATsn.spec b/xCATsn/xCATsn.spec index ed793aee6..db20b979f 100644 --- a/xCATsn/xCATsn.spec +++ b/xCATsn/xCATsn.spec @@ -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 From 06254c61268ed3e9ac2974351b1b178fcbc199b5 Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Wed, 4 Jan 2017 15:16:11 +0800 Subject: [PATCH 2/5] Fix pattern matching in buildcore.sh, change it back --- buildcore.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildcore.sh b/buildcore.sh index da51c3884..ba6d5096a 100755 --- a/buildcore.sh +++ b/buildcore.sh @@ -492,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 / subdirectory" exit 1 fi From 398494a32ce1dc4d91ad396f8abc1228a4dc94ac Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Thu, 5 Jan 2017 11:07:45 +0800 Subject: [PATCH 3/5] Fix typo. Remove unused lines. --- xCAT-buildkit/xCAT-buildkit.spec | 1 - xCAT-genesis-scripts/xCAT-genesis-scripts.spec | 2 +- xCATsn/xCATsn.spec | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/xCAT-buildkit/xCAT-buildkit.spec b/xCAT-buildkit/xCAT-buildkit.spec index 0d91f6d07..8531dac38 100644 --- a/xCAT-buildkit/xCAT-buildkit.spec +++ b/xCAT-buildkit/xCAT-buildkit.spec @@ -20,7 +20,6 @@ AutoReqProv: no # also need to fix Requires for AIX %ifos linux BuildArch: noarch -#Requires: %endif # No dependencies on any other xCAT rpms diff --git a/xCAT-genesis-scripts/xCAT-genesis-scripts.spec b/xCAT-genesis-scripts/xCAT-genesis-scripts.spec index e0e7c7f0e..b85e7e79a 100755 --- a/xCAT-genesis-scripts/xCAT-genesis-scripts.spec +++ b/xCAT-genesis-scripts/xCAT-genesis-scripts.spec @@ -25,7 +25,7 @@ Provides: xCAT-genesis-%{tarch} Name: %{name} Group: System/Utilities License: EPL -Vendor: IBM Corp +Vendor: IBM Corp. Summary: xCAT Genesis netboot image - Core content URL: https://xcat.org/ Source1: xCAT-genesis-scripts.tar.bz2 diff --git a/xCATsn/xCATsn.spec b/xCATsn/xCATsn.spec index db20b979f..be4ebb3ac 100644 --- a/xCATsn/xCATsn.spec +++ b/xCATsn/xCATsn.spec @@ -41,8 +41,6 @@ Requires: /usr/sbin/dhcpd 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 # 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 From 4dcb72abb9c087332c6e5530d210e76b7a6ac9a6 Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Fri, 6 Jan 2017 00:08:23 +0800 Subject: [PATCH 4/5] Remove some unused comments --- xCAT-IBMhpc/xCAT-IBMhpc.spec | 1 - .../kits/kit_template/source_packages/sample/pkg2/pkg2.spec | 1 - .../kits/kit_template/source_packages/sample/pkg3/pkg3.spec | 1 - xCAT/xCAT.spec | 3 --- 4 files changed, 6 deletions(-) diff --git a/xCAT-IBMhpc/xCAT-IBMhpc.spec b/xCAT-IBMhpc/xCAT-IBMhpc.spec index 52bddba3e..5de637f3d 100644 --- a/xCAT-IBMhpc/xCAT-IBMhpc.spec +++ b/xCAT-IBMhpc/xCAT-IBMhpc.spec @@ -20,7 +20,6 @@ AutoReqProv: no # also need to fix Requires for AIX %ifos linux BuildArch: noarch -#Requires: %endif Requires: perl-xCAT >= %{epoch}:%{version} diff --git a/xCAT-buildkit/share/xcat/kits/kit_template/source_packages/sample/pkg2/pkg2.spec b/xCAT-buildkit/share/xcat/kits/kit_template/source_packages/sample/pkg2/pkg2.spec index d513149d9..a6d191cd9 100644 --- a/xCAT-buildkit/share/xcat/kits/kit_template/source_packages/sample/pkg2/pkg2.spec +++ b/xCAT-buildkit/share/xcat/kits/kit_template/source_packages/sample/pkg2/pkg2.spec @@ -14,7 +14,6 @@ BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root %ifos linux BuildArch: noarch -#Requires: %endif Provides: pkg2 = %{epoch}:%{version} diff --git a/xCAT-buildkit/share/xcat/kits/kit_template/source_packages/sample/pkg3/pkg3.spec b/xCAT-buildkit/share/xcat/kits/kit_template/source_packages/sample/pkg3/pkg3.spec index 17270eeaf..a4d361cf6 100644 --- a/xCAT-buildkit/share/xcat/kits/kit_template/source_packages/sample/pkg3/pkg3.spec +++ b/xCAT-buildkit/share/xcat/kits/kit_template/source_packages/sample/pkg3/pkg3.spec @@ -14,7 +14,6 @@ BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root %ifos linux BuildArch: noarch -#Requires: %endif Provides: pkg3 = %{epoch}:%{version} diff --git a/xCAT/xCAT.spec b/xCAT/xCAT.spec index 7944f6108..4572e89e6 100644 --- a/xCAT/xCAT.spec +++ b/xCAT/xCAT.spec @@ -10,7 +10,6 @@ Packager: IBM Corp. Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}} Prefix: /opt/xcat BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root -#BuildArch: noarch Source1: xcat.conf Source2: postscripts.tar.gz Source3: templates.tar.gz @@ -48,8 +47,6 @@ Requires: /usr/bin/ssh %ifnarch s390x Requires: /etc/xinetd.d/tftp Requires: xCAT-buildkit -# yaboot-xcat is pulled in so any MN can manage ppc nodes -#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 From 2bf267cb81c1832cd88f940d375baa70662c8cf1 Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Mon, 9 Jan 2017 21:34:18 +0800 Subject: [PATCH 5/5] Backup file `Release', and restore the saved copy after the packages building. --- buildcore.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/buildcore.sh b/buildcore.sh index ba6d5096a..9ea023521 100755 --- a/buildcore.sh +++ b/buildcore.sh @@ -190,6 +190,31 @@ function setversionvars { echo "$XCAT_RELEASE" >Release } +RELEASE_FILE="Release" +RELEASE_FILE_SAVE="${RELEASE_FILE}.save.998" + +function internal_backup() +{ + # Create a backup for file `Release' + if [ ! -f "${RELEASE_FILE_SAVE}" ] + then + mv "${RELEASE_FILE}" "${RELEASE_FILE_SAVE}" + cp "${RELEASE_FILE_SAVE}" "${RELEASE_FILE}" + fi +} + +function internal_cleanup() +{ + # Restore file `Release' + if [ -f "${RELEASE_FILE_SAVE}" ] + then + mv "${RELEASE_FILE_SAVE}" "${RELEASE_FILE}" + fi +} + +internal_backup +trap internal_cleanup 0 + 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"