From 2270a7bc6d5e1033b08f078833af287c14846e72 Mon Sep 17 00:00:00 2001 From: Ben Allan Date: Fri, 21 Jun 2019 18:57:22 -0600 Subject: [PATCH] 42 builds for rhel and toss in draft form --- v42.toss3.unstable/.gitignore | 14 + v42.toss3.unstable/firerpms | 201 ++++++++++ v42.toss3.unstable/firerpms.sos | 112 ++++++ v42.toss3.unstable/inventory.sh | 6 + v42.toss3.unstable/ovis.spec.in | 401 ++++++++++++++++++++ v42.toss3.unstable/patches/ldms-sos-incdir | 13 + v42.toss3.unstable/patches/lib-python-touch | 13 + v42.toss3.unstable/patches/lib-sos-incdir | 11 + v42.toss3.unstable/sos.spec.in | 142 +++++++ 9 files changed, 913 insertions(+) create mode 100644 v42.toss3.unstable/.gitignore create mode 100755 v42.toss3.unstable/firerpms create mode 100755 v42.toss3.unstable/firerpms.sos create mode 100644 v42.toss3.unstable/inventory.sh create mode 100644 v42.toss3.unstable/ovis.spec.in create mode 100644 v42.toss3.unstable/patches/ldms-sos-incdir create mode 100644 v42.toss3.unstable/patches/lib-python-touch create mode 100644 v42.toss3.unstable/patches/lib-sos-incdir create mode 100644 v42.toss3.unstable/sos.spec.in diff --git a/v42.toss3.unstable/.gitignore b/v42.toss3.unstable/.gitignore new file mode 100644 index 0000000..813adf2 --- /dev/null +++ b/v42.toss3.unstable/.gitignore @@ -0,0 +1,14 @@ +ovis +plist +rlist +sos +*log +*.spec +*.tar +*.gz +firerpms.orig +ovisdeps +ovisfiles +sosdeps +sosfiles +sos-*.unstable.spec diff --git a/v42.toss3.unstable/firerpms b/v42.toss3.unstable/firerpms new file mode 100755 index 0000000..fad3424 --- /dev/null +++ b/v42.toss3.unstable/firerpms @@ -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 +OVISREPO=git@github.com: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 diff --git a/v42.toss3.unstable/firerpms.sos b/v42.toss3.unstable/firerpms.sos new file mode 100755 index 0000000..96b8781 --- /dev/null +++ b/v42.toss3.unstable/firerpms.sos @@ -0,0 +1,112 @@ +#!/bin/bash +# +# +packing=v41.rhel7.unstable +sos_branch=ovis-4.2.3 +NetworkRequires=github.com +SOSREPO=git@github.com: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 diff --git a/v42.toss3.unstable/inventory.sh b/v42.toss3.unstable/inventory.sh new file mode 100644 index 0000000..33f8a34 --- /dev/null +++ b/v42.toss3.unstable/inventory.sh @@ -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 diff --git a/v42.toss3.unstable/ovis.spec.in b/v42.toss3.unstable/ovis.spec.in new file mode 100644 index 0000000..621f54c --- /dev/null +++ b/v42.toss3.unstable/ovis.spec.in @@ -0,0 +1,401 @@ +# Set topdir to be builddir/rpm +# note this is intentionally ignored by rpmbuild. must use +# commandline syntax in makefile.am to get this effect. +#% define _topdir %(echo $PWD)/toss +# do not set unfascist build +#%-define _unpackaged_files_terminate_build 0 +#%-define _missing_doc_files_terminate_build 0 + +%define ldms_all System Environment/Libraries +%define build_timestamp %(date +"%Y%m%d_%H%M") +# % global __strip /bin/true +%global _enable_debug_package 0 +%global debug_package %{nil} +%global __os_install_post /usr/lib/rpm/brp-compress %{nil} +%if 0%{?rhel} && 0%{?rhel} <= 6 +%{!?__python2: %global __python2 /opt/python-2.7/bin/python} +%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} +%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} +%endif + +# for rpm and cpio installation both allowed, we need this: +%define relo_usr /@ovis_prefix@ +%define relo_etc /@ovis_sysconfdir@ +%define relo_var /@ovis_localstatedir@ + +# Main package +Summary: OVIS Commands and Libraries +Name: ovis +Version: @VERSION@ +Release: desktop_%{build_timestamp}%{?dist} +License: GPLv2 or BSD +Group: %{ldms_all} +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Source: %{name}-%{version}.tar.gz +Obsoletes: ldms-all +Requires: rpm >= 4.8.0 +@ENABLE_SOS_TRUE@Requires: sosdb-python2, sosdb >= 4.2.1 +@ENABLE_SOS_TRUE@BuildRequires: sosdb-devel +@ENABLE_LDMS_PYTHON_TRUE@Requires: python2 +@ENABLE_SWIG_TRUE@Requires: python2-devel +@ENABLE_SSL_TRUE@Requires: openssl +#@ENABLE_LIBGENDERS_TRUE@Requires: boost-regex boost-program-options +@ENABLE_LIBGENDERS_TRUE@Requires: genders +BuildRequires: gettext-devel gcc glib2-devel +@ENABLE_DOC_TRUE@BuildRequires: doxygen +@ENABLE_OVIS_AUTH_TRUE@BuildRequires: openssl-devel +@ENABLE_SYSCLASSIB_TRUE@BuildRequires: libibverbs-devel +@ENABLE_RDMA_TRUE@BuildRequires: librdmacm-devel +@ENABLE_SWIG_TRUE@BuildRequires: python2 python2-devel +@ENABLE_SWIG_TRUE@BuildRequires: swig +@ENABLE_LIBGENDERS_TRUE@BuildRequires: boost-devel +@ENABLE_LIBGENDERS_TRUE@BuildRequires: genders +@ENABLE_KOKKOS_TRUE@@ENABLE_SOS_TRUE@Requires: python2-numpy +@ENABLE_KOKKOS_TRUE@BuildRequires: bison bison-devel flex flex-devel, libevent >= 2.0.21 +@ENABLE_RABBITKW_TRUE@BuildRequires: librabbitmq librabbitmq-devel +Url: http://ovis.ca.sandia.gov/ + +# relocation prefix0 for file installs other than sysconfdir & localstatedir +Prefix: /usr +# relocation prefix1 for runtime localstatedir post install hooks +Prefix: /var +# relocation prefix2 for runtime sysconfdir post install hooks +Prefix: /etc + + +%description +This package provides the OVIS commands and libraries, OVIS apis and transport libraries, and scalable object store libraries for TOSS 3. +Configured for relocation with @ac_configure_args@ +--prefix=%{relo_usr} +--exec-prefix=%{relo_usr} +--bindir=%{relo_usr}/bin +--sbindir=%{relo_usr}/sbin +--sysconfdir=%{relo_etc} +--datadir=%{relo_usr}/share +--includedir=%{relo_usr}/include +--libdir='${exec_prefix}/lib64' +--libexecdir=%{relo_usr}/libexec +--mandir=%{relo_usr}/share/man +--infodir=%{relo_usr}/share/info +--sharedstatedir=%{relo_var}/lib +--localstatedir=%{relo_var} + + +%prep +%setup -q + +%build +echo bTMPPATH %{_tmppath} +rm -rf $RPM_BUILD_ROOT +echo bBUILDROOT $RPM_BUILD_ROOT +export CFLAGS="@CFLAGS@ %{optflags} -O1 -g" +./configure @ac_configure_args@ --localstatedir=%{relo_var} --prefix=%{relo_usr} --exec-prefix=%{relo_usr} --bindir=%{relo_usr}/bin --sbindir=%{relo_usr}/sbin --sysconfdir=%{relo_etc} --datadir=%{relo_usr}/share --includedir=%{relo_usr}/include --libdir='${exec_prefix}/lib64' --libexecdir=%{relo_usr}/libexec --mandir=%{relo_usr}/share/man --infodir=%{relo_usr}/share/info --sharedstatedir=%{relo_var}/lib + +ncores=`grep -c ^processor /proc/cpuinfo` +make V=1 -j $ncores + +%install +echo TMPPATH %{_tmppath} +echo BUILDROOT $RPM_BUILD_ROOT +make DESTDIR=${RPM_BUILD_ROOT} V=1 install +ls %{buildroot} +mkdir -p %{buildroot}%{_prefix} +(cd %{buildroot}%{_prefix}/..; rmdir `basename %{buildroot}%{_prefix}`) +mv %{buildroot}%{relo_usr} %{buildroot}%{_prefix} +if test -d %{buildroot}%{relo_etc}; then + mv %{buildroot}%{relo_etc} %{buildroot}%{_sysconfdir} +fi + +# sbin wrapper rework +for b in $RPM_BUILD_ROOT%{_sbindir}/ldms*; do + bn=`basename $b` + echo wrapping $bn + dn=`dirname $b` + mv $b $RPM_BUILD_ROOT%{_libdir}/ovis-ldms/$bn + (cd $dn; ln -s .ldms-wrapper $bn) +done +# grunge for no-devel restriction in some environments +@ENABLE_RABBITKW_TRUE@if test -f $RPM_BUILD_ROOT%{_libdir}/ovis-ldms/libstore_rabbitkw.so -o -f $RPM_BUILD_ROOT%{_libdir}/ovis-ldms/libstore_rabbitv3.so; then +@ENABLE_RABBITKW_TRUE@ (cd $RPM_BUILD_ROOT%{_libdir}/ovis-ldms/; ln -s /usr/lib64/librabbitmq.so.4 librabbitmq.so; ln -s /usr/lib64/librabbitmq.so.4 .; ln -s /usr/lib64/librabbitmq.so.4.2.0 . ) +@ENABLE_RABBITKW_TRUE@fi +# remove unpackaged files from the buildroot +rm -f $RPM_BUILD_ROOT%{_libdir}/*.la +rm -f $RPM_BUILD_ROOT%{_libdir}/ovis-ldms/lib*.la +rm $RPM_BUILD_ROOT%{_bindir}/test_* +rm $RPM_BUILD_ROOT%{_bindir}/ldms_ban.sh +find $RPM_BUILD_ROOT%{_docdir}/ovis-ldms-%{version} -maxdepth 1 -type f -exec mv {} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/ \; +@ENABLE_TOSS_SYSTEMD_TRUE@mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/init.d +@ENABLE_TOSS_SYSTEMD_TRUE@mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/systemd/system +@ENABLE_TOSS_SYSTEMD_TRUE@cp $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/sample_init_scripts/genders/sysv/etc/init.d/ldms* $RPM_BUILD_ROOT%{_sysconfdir}/init.d/ +@ENABLE_TOSS_SYSTEMD_TRUE@cp -ar $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/sample_init_scripts/genders/systemd/etc/* $RPM_BUILD_ROOT%{_sysconfdir} +@ENABLE_TOSS_SYSTEMD_TRUE@cp -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/sample_init_scripts/genders/systemd/services/ldms*.service $RPM_BUILD_ROOT%{_prefix}/lib/systemd/system +mkdir -p -m 755 $RPM_BUILD_ROOT%{_localstatedir}/log/ldmsd +mkdir -p -m 755 $RPM_BUILD_ROOT%{_localstatedir}/run/ldmsd +mkdir -p -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ldms.d/ClusterGenders +mkdir -p -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ldms.d/ClusterSecrets +mkdir -p -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ldms.d/plugins-conf + +echo making manifest +./util/relocation/bld_manifest.sh %{buildroot}%{_prefix} %{buildroot}%{_sysconfdir} %{buildroot}%{_localstatedir} > %{buildroot}%{_prefix}/share/doc/ovis-@VERSION@/relocation/manifest + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%{_libdir}/* +%{_bindir}/* +%{_sbindir}/* +%{_sbindir}/.ldms* +#%{_sbindir}/.ldms-wrapper +%{_datadir}/doc/%{name}-%{version}/relocation +%{_docdir}/%{name}-%{version}/COPYING +%{_docdir}/%{name}-%{version}/ChangeLog +%{_docdir}/%{name}-%{version}/AUTHORS +%exclude %{_bindir}/ldms-py*sh +%exclude %{_bindir}/ldms-meminfo.sh +%exclude %{_bindir}/ldms-static-test.sh +%exclude %{_bindir}/ldmsd-wrapper.sh +%exclude %{_bindir}/ldmsd-pre-systemd +%exclude %{_bindir}/ldmsd-pre-sysvinit + +@ENABLE_SOS_TRUE@%exclude %{_libdir}/ovis-ldms/libstore_sos* +@ENABLE_SOS_TRUE@%exclude %{_sbindir}/ldmsd_sos_init +#end core + +# devel +%package devel +Summary: LDMS devel package +Group: %{ldms_grp} +Requires: ovis = @VERSION@ +Obsoletes: ldms-all-devel +%description devel +This is a development package of Lightweight Distributed Metric System (LDMS). +Users who want to implement their own sampler or store must install this +package. + +%files devel +%defattr(-,root,root) +%{_includedir}/*/*.h +%{_includedir}/*/*/*.h +%{_includedir}/ovis-lib-config.h +%{_includedir}/ovis-ldms-config.h +#end devel + +%package test +Summary: LDMS test package +Group: %{ldms_grp} +Requires: ovis = @VERSION@ +Obsoletes: ldms-all-test +%description test +This is a collection of test scripts for (LDMS). +They also serve as examples, but are not usually of direct +interest on compute nodes in production clusters. + +%files test +%defattr(-,root,root) +%{_bindir}/ldms-py*sh +%{_bindir}/ldms-meminfo.sh +%{_bindir}/ldms-static-test.sh +%{_datadir}/doc/ovis-ldms-%{version}/examples/static-test +%{_datadir}/doc/ovis-ldms-%{version}/examples/slurm-test +#end test + +# initscripts +%package initscripts-base +Summary: LDMS base initscripts for libgenders control of %{name} +Group: %{ldms_grp} +Requires: ovis = @VERSION@ +Obsoletes: ldms-all-initscripts +%description initscripts-base +This is the support file set for libgenders based booting of LDMS daemons. +Users normally provide information via /etc/genders (or alternate file) +to make these scripts operate. With a manually written daemon +control file, use of libgenders can be bypassed. + +%files initscripts-base +%defattr(-,root,root) +@ENABLE_TOSS_SYSTEMD_TRUE@%{_sysconfdir}/sysconfig/* +@ENABLE_TOSS_SYSTEMD_TRUE@%config(noreplace) %{_sysconfdir}/sysconfig/ldms.d/ldmsd.local.conf +@ENABLE_TOSS_SYSTEMD_TRUE@%config(noreplace) %{_sysconfdir}/sysconfig/ldms.d/ldmsd.agg.conf +@ENABLE_TOSS_SYSTEMD_TRUE@%config(noreplace) %{_sysconfdir}/sysconfig/ldms.d/ClusterSecrets/ldmsauth.conf +@ENABLE_TOSS_SYSTEMD_TRUE@%config(noreplace) %{_sysconfdir}/sysconfig/ldms.d/ClusterGenders/genders.local +@ENABLE_TOSS_SYSTEMD_TRUE@%config(noreplace) %{_sysconfdir}/sysconfig/ldms.d/ClusterGenders/genders.agg +@ENABLE_TOSS_SYSTEMD_TRUE@%{_bindir}/ldmsd-wrapper.sh + +@ENABLE_TOSS_SYSTEMD_TRUE@%post initscripts-base +# bash $RELO_DIR/relocate-paths.sh $USR $ETC $VAR $RELO_DIR/manifest +bash $RPM_INSTALL_PREFIX0/share/doc/ovis-@VERSION@/relocation/relocate-paths.sh \ + $RPM_INSTALL_PREFIX0 \ + $RPM_INSTALL_PREFIX2 \ + $RPM_INSTALL_PREFIX1 \ + $RPM_INSTALL_PREFIX0/share/doc/ovis-@VERSION@/relocation/manifest + +#end initscripts-base + +@ENABLE_TOSS_SYSTEMD_TRUE@%package initscripts-systemd +@ENABLE_TOSS_SYSTEMD_TRUE@Summary: LDMS systemd scripts for libgenders control of %{name} +@ENABLE_TOSS_SYSTEMD_TRUE@Group: %{ldms_grp} +@ENABLE_TOSS_SYSTEMD_TRUE@Requires: ovis = @VERSION@ ovis-initscripts-base +@ENABLE_TOSS_SYSTEMD_TRUE@%description initscripts-systemd +@ENABLE_TOSS_SYSTEMD_TRUE@This is the libgenders based systemd scripts for LDMS daemons. +@ENABLE_TOSS_SYSTEMD_TRUE@Users normally provide information via /etc/genders (or alternate file) +@ENABLE_TOSS_SYSTEMD_TRUE@to make these scripts operate. They are required to fail out of the box. +@ENABLE_TOSS_SYSTEMD_TRUE@ +@ENABLE_TOSS_SYSTEMD_TRUE@%files initscripts-systemd +@ENABLE_TOSS_SYSTEMD_TRUE@%defattr(-,root,root) +@ENABLE_TOSS_SYSTEMD_TRUE@%config %{_prefix}/lib/systemd/system/ldmsd*.service +@ENABLE_TOSS_SYSTEMD_TRUE@%config %{_bindir}/ldmsd-pre-systemd +@ENABLE_TOSS_SYSTEMD_TRUE@%post initscripts-systemd +@ENABLE_TOSS_SYSTEMD_TRUE@bash $RPM_INSTALL_PREFIX0/share/doc/ovis-@VERSION@/relocation/relocate-paths.sh \ +@ENABLE_TOSS_SYSTEMD_TRUE@ $RPM_INSTALL_PREFIX0 \ +@ENABLE_TOSS_SYSTEMD_TRUE@ $RPM_INSTALL_PREFIX2 \ +@ENABLE_TOSS_SYSTEMD_TRUE@ $RPM_INSTALL_PREFIX1 \ +@ENABLE_TOSS_SYSTEMD_TRUE@ $RPM_INSTALL_PREFIX0/share/doc/ovis-@VERSION@/relocation/manifest +@ENABLE_TOSS_SYSTEMD_TRUE@#end initscripts-systemd + +@ENABLE_TOSS_SYSTEMD_TRUE@# initscripts-sysv +@ENABLE_TOSS_SYSTEMD_TRUE@%package initscripts-sysv +@ENABLE_TOSS_SYSTEMD_TRUE@Summary: LDMS sysv init scripts for libgenders control of %{name} +@ENABLE_TOSS_SYSTEMD_TRUE@Group: %{ldms_grp} +@ENABLE_TOSS_SYSTEMD_TRUE@Requires: ovis = @VERSION@ ovis-initscripts-base +@ENABLE_TOSS_SYSTEMD_TRUE@%description initscripts-sysv +@ENABLE_TOSS_SYSTEMD_TRUE@This is the libgenders based sysv init scripts for LDMS daemons. +@ENABLE_TOSS_SYSTEMD_TRUE@Users must provide information via /etc/genders (or alternate file) +@ENABLE_TOSS_SYSTEMD_TRUE@to make these scripts operate. They are required to fail out of the box. + +@ENABLE_TOSS_SYSTEMD_TRUE@%files initscripts-sysv +@ENABLE_TOSS_SYSTEMD_TRUE@%defattr(-,root,root) +@ENABLE_TOSS_SYSTEMD_TRUE@%config %{_sysconfdir}/init.d/ldms* +@ENABLE_TOSS_SYSTEMD_TRUE@%config %{_bindir}/ldmsd-pre-sysvinit +@ENABLE_TOSS_SYSTEMD_TRUE@%post initscripts-sysv +@ENABLE_TOSS_SYSTEMD_TRUE@bash $RPM_INSTALL_PREFIX0/share/doc/ovis-@VERSION@/relocation/relocate-paths.sh \ +@ENABLE_TOSS_SYSTEMD_TRUE@ $RPM_INSTALL_PREFIX0 \ +@ENABLE_TOSS_SYSTEMD_TRUE@ $RPM_INSTALL_PREFIX2 \ +@ENABLE_TOSS_SYSTEMD_TRUE@ $RPM_INSTALL_PREFIX1 \ +@ENABLE_TOSS_SYSTEMD_TRUE@ $RPM_INSTALL_PREFIX0/share/doc/ovis-@VERSION@/relocation/manifest +@ENABLE_TOSS_SYSTEMD_TRUE@#end initscripts-sysv + + +%package doc +Summary: Documentation files for %{name} +Group: %{ldms_all} +Obsoletes: ldms-all-doc +## Requires: %{name}-devel = %{version}-%{release} +%description doc +Doxygen files for ovis package. +%files doc +%defattr(-,root,root) +%{_mandir}/*/* +%{_datadir}/doc/%{name}-%{version} +%exclude %{_datadir}/doc/%{name}-%{version}/relocation +%exclude %{_datadir}/doc/ovis-ldms-%{version}/examples +## %{_datadir}/doc/ovis-lib-%{version} +## %%docdir %{_defaultdocdir} +%docdir /usr/share/doc +%post doc +bash %{_prefix}/share/doc/ovis-@VERSION@/relocation/relocate-paths.sh \ + $RPM_INSTALL_PREFIX0 \ + $RPM_INSTALL_PREFIX2 \ + $RPM_INSTALL_PREFIX1 \ + %{_prefix}/share/doc/ovis-@VERSION@/relocation/manifest + +%package python2 +Summary: Python files for LDMS +%description python2 +Python files for ovis +# install needs +Requires: ovis >= 3.0.0 python +# build needs +@ENABLE_LDMS_PYTHON_TRUE@BuildRequires: python +@ENABLE_SWIG_TRUE@BuildRequires: python python-devel swig +%files python2 +%defattr(-,root,root) +@ENABLE_SWIG_TRUE@%{_prefix}/lib/python2.7/site-packages/ovis_lib +@ENABLE_SWIG_TRUE@%{_prefix}/lib/python2.7/site-packages/ovis_ldms +@ENABLE_LDMS_PYTHON_TRUE@%{_prefix}/lib/python2.7/site-packages/ldmsd +#%%{python2_sitelib}/* +#end python2 +# see https://fedoraproject.org/wiki/Packaging:Python_Old +# and https://fedoraproject.org/wiki/Packaging:Python + +@ENABLE_SOS_TRUE@%package ldms-sos +@ENABLE_SOS_TRUE@Summary: LDMS sosdb plugins +@ENABLE_SOS_TRUE@Requires: sosdb +@ENABLE_SOS_TRUE@%description ldms-sos +@ENABLE_SOS_TRUE@Libraries and utilities for SOS usage in LDMS +@ENABLE_SOS_TRUE@%files ldms-sos +@ENABLE_SOS_TRUE@%defattr(-,root,root) +@ENABLE_SOS_TRUE@%{_sbindir}/ldmsd_sos_init +@ENABLE_SOS_TRUE@%{_libdir}/ovis-ldms/libstore_sos* +@ENABLE_SOS_TRUE@#end ldms-sos + +%post +bash $RPM_INSTALL_PREFIX0/share/doc/ovis-@VERSION@/relocation/relocate-paths.sh \ + $RPM_INSTALL_PREFIX0 \ + $RPM_INSTALL_PREFIX2 \ + $RPM_INSTALL_PREFIX1 \ + $RPM_INSTALL_PREFIX0/share/doc/ovis-@VERSION@/relocation/manifest + +%post test +bash $RPM_INSTALL_PREFIX0/share/doc/ovis-@VERSION@/relocation/relocate-paths.sh \ + $RPM_INSTALL_PREFIX0 \ + $RPM_INSTALL_PREFIX2 \ + $RPM_INSTALL_PREFIX1 \ + $RPM_INSTALL_PREFIX0/share/doc/ovis-@VERSION@/relocation/manifest + +%post python2 +bash $RPM_INSTALL_PREFIX0/share/doc/ovis-@VERSION@/relocation/relocate-paths.sh \ + $RPM_INSTALL_PREFIX0 \ + $RPM_INSTALL_PREFIX2 \ + $RPM_INSTALL_PREFIX1 \ + $RPM_INSTALL_PREFIX0/share/doc/ovis-@VERSION@/relocation/manifest + +%changelog +* Fri Jun 21 2019 Ben Allan 4.2.3-1 +Update to 4.2.3 with sosdb refactored to a dependency package. +* Thu Oct 25 2018 Ben Allan 3.4.11-1 +Update to 3.4.11 and try lanl suggested require reduction. +* Wed Sep 26 2018 Ben Allan 3.4.10-1 +Update to 3.4.10 and remove runtime librabbitmq-devel dependence. +* Wed Jul 25 2018 Ben Allan 3.4.8-1 +Config support of store_rabbitkw. +* Thu Apr 19 2018 Ben Allan 3.4.6-1 +SOS/baler v3 deprecation. Wrapper file for sbin exec relocation support. +* Wed Oct 18 2017 Ben Allan 3.4.4-4 +Cray relocation scheme +* Thu Aug 31 2017 Ben Allan 3.4.4-2.1 +Update for upstream and override -O2 which produces infinite loop bugs +with toss gcc 4.8.5. +* Wed Apr 26 2017 Ben Allan 3.4.1-1 +Flex array and swig bug patches. Refactor cython dependent bits. +* Wed Mar 29 2017 Ben Allan 3.4.0-1 +Update package refactorization +* Tue Mar 14 2017 Ben Allan 3.3.1-2 +Update package refactorization +* Tue Feb 21 2017 Ben Allan 3.3.1-1 +Update for gender feature. +* Thu Aug 25 2016 Ben Allan 3.0.0-21 +Update for baler features. +* Mon Mar 14 2016 Ben Allan 3.0.0-6 +Update for cray/sos features. +* Tue Mar 01 2016 Ben Allan 3.0.0-3 +ported for LANL monitoring server. +* Tue Nov 03 2015 Ben Allan 3.0.0-2 +ported for LANL monitoring server. +* Tue Oct 13 2015 Ben Allan 3.0.0-1 +update to v3. +* Tue Aug 25 2015 Ben Allan 2.4.5-1 +update to latest upstream. +* Wed Jul 29 2015 Ben Allan 2.4.4-1 +update to latest upstream. +* Thu Jun 18 2015 Ben Allan 2.4.3-1 +packaging of initscripts for ldmsd/ldms-aggd. +* Sat May 23 2015 Ben Allan 2.4.2-1 +update to latest upstream. +* Thu Apr 23 2015 Ben Allan 2.4.1-1 +packaging with sysclassib and procstatutil2 enabled. +* Wed Feb 18 2015 Ben Allan 2.4.0-1 +packaging with separate libevent +* Mon Sep 15 2014 Ben Allan 2.2.0-1 +all-in-one packaging w/libevent diff --git a/v42.toss3.unstable/patches/ldms-sos-incdir b/v42.toss3.unstable/patches/ldms-sos-incdir new file mode 100644 index 0000000..0519013 --- /dev/null +++ b/v42.toss3.unstable/patches/ldms-sos-incdir @@ -0,0 +1,13 @@ +diff --git a/ldms/configure.ac b/ldms/configure.ac +index 7de99a0..4985bbc 100644 +--- a/ldms/configure.ac ++++ b/ldms/configure.ac +@@ -265,7 +265,7 @@ fi + if test -n "$CHECK_SOS"; then + if test "x$WITH_SOS" != "xbuild"; then + OCFLAGS=$CFLAGS +- CFLAGS=-I$SOS_INCDIR ++ CFLAGS=$SOS_INCDIR_FLAG + AC_CHECK_HEADERS(sos/sos.h, + [], + AC_MSG_FAILURE([sos/sos.h not found]) diff --git a/v42.toss3.unstable/patches/lib-python-touch b/v42.toss3.unstable/patches/lib-python-touch new file mode 100644 index 0000000..2447dbe --- /dev/null +++ b/v42.toss3.unstable/patches/lib-python-touch @@ -0,0 +1,13 @@ +diff --git a/lib/python/Makefile.am b/lib/python/Makefile.am +index f775d0b..2f66e44 100644 +--- a/lib/python/Makefile.am ++++ b/lib/python/Makefile.am +@@ -17,7 +17,7 @@ Map.c: Map.pyx Map.pxd + cython --gdb $< -o $@ + + install-data-local: Map.la +- touch $(pythondir)/ovis_lib/__init__.py ++ touch $(DESTDIR)/$(pythondir)/ovis_lib/__init__.py + + clean-local: + rm -rf Map.c diff --git a/v42.toss3.unstable/patches/lib-sos-incdir b/v42.toss3.unstable/patches/lib-sos-incdir new file mode 100644 index 0000000..f40561f --- /dev/null +++ b/v42.toss3.unstable/patches/lib-sos-incdir @@ -0,0 +1,11 @@ +--- a/lib/configure.ac 2019-06-21 17:14:21.834667320 -0600 ++++ b/lib/configure.ac 2019-06-21 17:35:31.059607649 -0600 +@@ -108,7 +108,7 @@ + AX_PYTHON_DEVEL() + if test "x$WITH_SOS" != "xbuild"; then + OCFLAGS=$CFLAGS +- CFLAGS=-I$SOS_INCDIR ++ CFLAGS=$SOS_INCDIR_FLAG + AC_CHECK_HEADERS(sos/sos.h, + [], + AC_MSG_FAILURE([sos/sos.h not found]) diff --git a/v42.toss3.unstable/sos.spec.in b/v42.toss3.unstable/sos.spec.in new file mode 100644 index 0000000..4bb17f9 --- /dev/null +++ b/v42.toss3.unstable/sos.spec.in @@ -0,0 +1,142 @@ +# Set topdir to be builddir/rpm +# note this is intentionally ignored by rpmbuild. must use +# commandline syntax in makefile.am to get this effect. +#% define _topdir %(echo $PWD)/toss +# do not set unfascist build +#%-define _unpackaged_files_terminate_build 0 +#%-define _missing_doc_files_terminate_build 0 + +%define ldms_all System Environment/Libraries +%define build_timestamp %(date +"%Y%m%d_%H%M") +# % global __strip /bin/true +%global _enable_debug_package 0 +%global debug_package %{nil} +%global __os_install_post /usr/lib/rpm/brp-compress %{nil} +%if 0%{?rhel} && 0%{?rhel} <= 6 +%{!?__python2: %global __python2 /opt/python-2.7/bin/python} +%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} +%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} +%endif + +# for rpm and cpio installation both allowed, we will eventually need this: +%define relo_usr /@ovis_prefix@ +%define relo_etc /@ovis_sysconfdir@ +%define relo_var /@ovis_localstatedir@ +# rpm relocation is not yet supported due to sos configure.ac not supporting it. + +# Main package +Summary: OVIS SOS Commands and Libraries +Name: sosdb +Version: @VERSION@ +Release: desktop_%{build_timestamp}%{?dist} +License: GPLv2 or BSD +Group: %{ldms_all} +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Source: %{name}-%{version}.tar.gz +Requires: rpm >= 4.8.0 +BuildRequires: gcc glib2-devel +@ENABLE_PYTHON_TRUE@Requires: python2 +@ENABLE_PYTHON_TRUE@Requires: python2-devel +@ENABLE_PYTHON_TRUE@Requires: python2-numpy +@ENABLE_PYTHON_TRUE@Requires: python2-cython +@ENABLE_PYTHON_TRUE@BuildRequires: python2-devel +@ENABLE_PYTHON_TRUE@BuildRequires: python2-numpy +@ENABLE_PYTHON_TRUE@BuildRequires: python2-cython +@ENABLE_DOC_TRUE@BuildRequires: doxygen +Url: http://ovis.ca.sandia.gov/ + +# relocation prefix0 for file installs other than sysconfdir & localstatedir +Prefix: /usr +# relocation prefix1 for runtime localstatedir post install hooks +Prefix: /var +# relocation prefix2 for runtime sysconfdir post install hooks +Prefix: /etc + + +%description +This package provides the OVIS sosdb commands and libraries TOSS 3. + + +%prep +%setup -q + +%build +echo bTMPPATH %{_tmppath} +rm -rf $RPM_BUILD_ROOT +echo bBUILDROOT $RPM_BUILD_ROOT +export CFLAGS="@CFLAGS@ %{optflags} -O1 -g" +./configure @ac_configure_args@ --localstatedir=%{relo_var} --prefix=%{relo_usr} --exec-prefix=%{relo_usr} --bindir=%{relo_usr}/bin --sbindir=%{relo_usr}/sbin --sysconfdir=%{relo_etc} --datadir=%{relo_usr}/share --includedir=%{relo_usr}/include --libdir='${exec_prefix}/lib64' --libexecdir=%{relo_usr}/libexec --mandir=%{relo_usr}/share/man --infodir=%{relo_usr}/share/info --sharedstatedir=%{relo_var}/lib + +ncores=`grep -c ^processor /proc/cpuinfo` +make V=1 -j $ncores + +%install +echo TMPPATH %{_tmppath} +echo BUILDROOT $RPM_BUILD_ROOT +make DESTDIR=${RPM_BUILD_ROOT} V=1 install +ls %{buildroot} +mkdir -p %{buildroot}%{_prefix} +(cd %{buildroot}%{_prefix}/..; rmdir `basename %{buildroot}%{_prefix}`) +mv %{buildroot}%{relo_usr} %{buildroot}%{_prefix} +if test -d %{buildroot}%{relo_etc}; then + mv %{buildroot}%{relo_etc} %{buildroot}%{_sysconfdir} +fi + +# remove unpackaged files from the buildroot +rm -f $RPM_BUILD_ROOT%{_libdir}/*.la +rm -f $RPM_BUILD_ROOT%{_libdir}/sos/lib*.la +#rm $RPM_BUILD_ROOT%{_bindir}/test_* +#find $RPM_BUILD_ROOT%{_docdir}/ovis-ldms-%{version} -maxdepth 1 -type f -exec mv {} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/ \; + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%{_libdir}/* +%{_bindir}/* +#end core + +# devel +%package devel +Summary: OVIS SOS DB devel package +Group: %{ldms_grp} +Requires: sosdb = @VERSION@ +Obsoletes: ldms-all-devel +%description devel +This is a development package of Scalable Object Store +Users who want to use sosdb from C must install this package. + +%files devel +%defattr(-,root,root) +%{_includedir}/*/*.h +#end devel + +%package doc +Summary: Documentation files for %{name} +Group: %{ldms_all} +%description doc +Doxygen files for ovis sosdb package. +%files doc +%defattr(-,root,root) +%{_mandir}/*/* +%{_datadir}/doc/%{name} +%docdir /usr/share/doc + +%package python2 +Summary: Python files for SOS DB +%description python2 +Python files for ovis sosdb +# install needs +Requires: sosdb = @VERSION@ +# build needs +@ENABLE_PYTHON_TRUE@BuildRequires: python python-devel cython numpy +%files python2 +%defattr(-,root,root) +@ENABLE_PYTHON_TRUE@%{_prefix}/lib/python2.7/site-packages/sosdb +#end sosdb + +%changelog +* Fri Jun 21 2019 Ben Allan 4.2.1-1 +First packaging of stand-alone sos for TOSS 3. Not relocatable. +