Skip to content

Commit

Permalink
42 builds for rhel and toss in draft form
Browse files Browse the repository at this point in the history
  • Loading branch information
baallan committed Jun 22, 2019
1 parent ff7c083 commit 2270a7b
Show file tree
Hide file tree
Showing 9 changed files with 913 additions and 0 deletions.
14 changes: 14 additions & 0 deletions v42.toss3.unstable/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
ovis
plist
rlist
sos
*log
*.spec
*.tar
*.gz
firerpms.orig
ovisdeps
ovisfiles
sosdeps
sosfiles
sos-*.unstable.spec
201 changes: 201 additions & 0 deletions v42.toss3.unstable/firerpms
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
#!/bin/bash
#
#
packing=v41.rhel7.unstable
ovis_branch=OVIS-4.2.3
sospkg= ; # if set empty, disable sos in ldms
sospkg=sosdb-4.2.1
NetworkRequires=github.com
[email protected]:ovis-hpc/ovis.git

if test -n "$MODULEPATH"; then
module purge
module load python2-cython
module load python2-numpy
fi
. ../support/package-functions

if test -n "$sospkg"; then
USESOS="--enable-sos"
SOS_OPTS="--with-sos=/usr"
else
USESOS="--disable-sos"
SOS_OPTS=""
fi

prefix=/genetha
PACK_OPTS="
--disable-rpath
--disable-static
--prefix=$prefix
--with-pkglibdir=ovis-ldms
"
DOC_OPTS="
--enable-doc
--enable-doc-html
"
SECURITY_OPTS="
--enable-ovis_auth
--enable-ssl
"
NETWORK_OPTS="
--enable-ovis_event
--enable-zap
--enable-sock
--enable-rdma
--disable-mmap
"
CRAY_LOCATIONS=""

IFACE_OPTS="
--enable-swig
--disable-readline
--enable-ldms-python
--enable-python
--enable-libgenders
--enable-genderssystemd
"
STORE_OPTS="
$USESOS
--enable-flatfile
--enable-csv
--enable-store
--disable-rabbitv3
--enable-rabbitkw
"
SAMPLER_OPTS="
--disable-kokkos
--disable-cray_power_sampler
--disable-cray_system_sampler
--disable-aries-gpcdr
--disable-gpcdlocal
--disable-aries-mmr
--disable-ugni
--disable-perfevent
--disable-papi
--disable-procdiskstats
--disable-atasmart
--disable-hadoop
--disable-generic_sampler
--disable-switchx
--disable-sensors
--enable-dstat
--enable-llnl-edac
--enable-sysclassib
--enable-opa2
--enable-jobinfo
--enable-perf
--enable-jobid
--enable-array_example
--enable-procinterrupts
--enable-procnetdev
--enable-procnfs
--enable-procsensors
--enable-procstat
--enable-vmstat
--enable-meminfo
--enable-lustre
--enable-slurmtest
--enable-filesingle
"
allconfig="$PACK_OPTS $SECURITY_OPTS $NETWORK_OPTS $IFACE_OPTS $STORE_OPTS $SAMPLER_OPTS $CRAY_LOCATIONS $SOS_OPTS"

if ! pack_prechecks "$allconfig"; then
echo "Check dependencies listed above, install needed packages, and try again"
exit 1
fi

dn=$(pwd)
bn=$(basename $dn)
if test "$bn" = "$packing" -a -f ovis.spec.in; then
: in the right place
else
echo This must be run from $packing, which should be clean and at any rate will be overwritten.
exit 1
fi

specdir=$dn

/bin/rm -rf ovis
if ! git clone $OVISREPO ovis; then
echo cannot checkout ovis.
exit 1
fi

cd ovis
if ! git checkout $ovis_branch; then
echo cannot checkout ovis branch $ovis_branch.
exit 1
fi
cd ..


cd ovis
patches="lib-sos-incdir ldms-sos-incdir lib-python-touch"
for i in $patches; do
patch -p1 < ../patches/$i
git commit -a -m "add $packing distribution patches: $i"
done
VERSION=$(pack_get_ac_version configure.ac)
PACKAGE=$(pack_get_ac_name configure.ac)
# Find SHA of latest checkin someone tagged
COMMIT_ID="$(git log -1 --pretty="%H")"
BASE_COMMIT_ID="$(git rev-parse $ovis_branch)"

# Get most recent tag id for this branch
TAG_ID="$(git describe --tags --abbrev=0)"
TARGET=${PACKAGE}-${VERSION}.tar
REPO_DIR=`pwd`
OUTPUT_DIR=`pwd`/Tars
# Create output dir
mkdir -p $OUTPUT_DIR
# populate outdir inputs
git archive --prefix=${PACKAGE=}-${VERSION}/ $COMMIT_ID --format=tar --output=${OUTPUT_DIR}/$TARGET
cd ..

sleep 0.1

cd $OUTPUT_DIR

# Untar archive
echo "Untarring archive"
tar xf $TARGET && \
(cd ${PACKAGE}-${VERSION} && \
./autogen.sh)
if ! test -f ${PACKAGE}-${VERSION}/configure; then
echo "unable to generate ovis build files"
exit 1
fi

# Tar back up excluding unwanted files and dirs
echo "tarring archive with excludes from "
echo "$REPO_DIR/util/tar-excludes.txt"
TAR_OPTS="-X $REPO_DIR/util/tar-excludes.txt"
tar czf $TARGET.gz $TAR_OPTS ${PACKAGE}-${VERSION}

echo "Relocating cruft"
rm -rf old
mkdir old
mv -f ${PACKAGE}-${VERSION} $TARGET old
specfile=tmp-ovis-${packing}.spec
tar zxf $TARGET.gz && \
cd ${PACKAGE}-${VERSION} && \
echo "================ configure for $packing rpms =============" && \
./configure CC=gcc CXX=g++ $allconfig && \
echo "============================= make $packing rpms =============" && \
make dist-gzip && \
mkdir -p $packing/{BUILD,RPMS,SOURCES,SPECS,SRPMS} && \
cp $TARGET.gz $packing/SOURCES && \
./config.status --file=-:$specdir/ovis.spec.in | \
./ldms/config.status --file=-:- | \
./lib/config.status --file=$specdir/$specfile:- && \
rpmbuild -v --define "_topdir `pwd`/$packing" -ba $specdir/$specfile && \
touch completed
if ! test -f completed; then
echo FAIL
else
echo PASS
cd $dn
echo the droids you seek may be:
find . -name '*.rpm'
fi
112 changes: 112 additions & 0 deletions v42.toss3.unstable/firerpms.sos
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
#!/bin/bash
#
#
packing=v41.rhel7.unstable
sos_branch=ovis-4.2.3
NetworkRequires=github.com
[email protected]:ovis-hpc/sos.git

. ../support/package-functions

prefix=/usr
PACK_OPTS="
--disable-static
--prefix=$prefix
"
DOC_OPTS="
--enable-doc
--enable-doc-html
--enable-doc-man
--enable-doc-graph
"

IFACE_OPTS="
--enable-python
"

allconfig="$PACK_OPTS $IFACE_OPTS $DOC_OPTS"

if ! pack_prechecks_sos "$allconfig"; then
echo "Check dependencies listed above, install needed packages, and try again"
exit 1
fi

dn=$(pwd)
bn=$(basename $dn)
if test "$bn" = "$packing" -a -f sos.spec.in; then
: in the right place
else
echo This must be run from $packing, which should be clean and at any rate will be overwritten.
exit 1
fi

specdir=$dn
SOSTAR=sos.tar

/bin/rm -rf sos
if ! git clone $SOSREPO sos; then
echo cannot checkout sos
exit 1
fi

cd sos
if ! git checkout $sos_branch; then
echo cannot checkout sos branch $sos_branch
exit 1
fi

VERSION=$(pack_get_ac_version configure.ac)
PACKAGE=$(pack_get_ac_name configure.ac)
# Find SHA of latest checkin someone tagged
COMMIT_ID="$(git log -1 --pretty="%H")"
BASE_COMMIT_ID="$(git rev-parse $ovis_branch)"

# Get most recent tag id for this branch
TAG_ID="$(git describe --tags --abbrev=0)"
TARGET=${PACKAGE}-${VERSION}.tar
REPO_DIR=`pwd`
OUTPUT_DIR=`pwd`/Tars
# Create output dir
mkdir -p $OUTPUT_DIR
# populate outdir inputs
git archive --prefix=${PACKAGE=}-${VERSION}/ $COMMIT_ID --format=tar --output=${OUTPUT_DIR}/$TARGET
cd ..

cd $OUTPUT_DIR

# Untar archive and generate build files
echo "Untarring archive"
tar xf $TARGET && \
(cd ${PACKAGE}-${VERSION} && \
./autogen.sh)
if ! test -f ${PACKAGE}-${VERSION}/configure; then
echo "unable to generate sos build files"
exit 1
fi

tar czf $TARGET.gz ${PACKAGE}-${VERSION}

echo "Relocating cruft"
rm -rf old
mkdir old
mv -f ${PACKAGE}-${VERSION} $TARGET old
specfile=sos-${packing}.spec
tar zxf $TARGET.gz && \
cd ${PACKAGE}-${VERSION} && \
echo "================ configure for $packing rpms =============" && \
./configure CC=gcc CXX=g++ $allconfig && \
echo "============================= make $packing rpms =============" && \
make dist-gzip && \
mkdir -p $packing/{BUILD,RPMS,SOURCES,SPECS,SRPMS} && \
cp $TARGET.gz $packing/SOURCES && \
./config.status --file=$specdir/$specfile:$specdir/sos.spec.in && \
rpmbuild -v --define "_topdir `pwd`/$packing" -ba $specdir/$specfile && \
touch completed
if ! test -f completed; then
echo FAIL
else
echo PASS
cd $dn
echo the droids you seek may be:
find . -name '*.rpm'
fi
6 changes: 6 additions & 0 deletions v42.toss3.unstable/inventory.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# this dumps the file lists and dependency lists
# for the generated rpms
for i in ./sos/Tars/sosdb-4.*/v41.rhel7.unstable/RPMS/x86_64/*rpm; do echo $i; echo $i; rpm -qp --requires $i; echo; done > sosdeps
for i in ./sos/Tars/sosdb-4.*/v41.rhel7.unstable/RPMS/x86_64/*rpm; do echo $i; echo $i; rpm -qpl $i; echo; done > sosfiles
for i in ./ovis/Tars/ovis-4.*/v41.rhel7.unstable/RPMS/x86_64/*rpm; do echo $i; echo $i; rpm -qp --requires $i; echo; done > ovisdeps
for i in ./ovis/Tars/ovis-4.*/v41.rhel7.unstable/RPMS/x86_64/*rpm; do echo $i; echo $i; rpm -qpl $i; echo; done > ovisfiles
Loading

0 comments on commit 2270a7b

Please sign in to comment.