From 4b269fba0ca273dfa3acf44c9f5490f01e0c3d87 Mon Sep 17 00:00:00 2001 From: Trevor Bramwell Date: Fri, 22 Sep 2017 12:23:36 -0700 Subject: Rename pharos-dashboard and pharos-validator As subdirectories of the pharos-tools repo, there is little need to keep the pharos prefix. Change-Id: Ica3d79411f409df638647300036c0664183c2725 Signed-off-by: Trevor Bramwell --- validator/rpm/buildasroot.sh | 32 ++++++++++++++++++++++++++++++++ validator/rpm/installpython3.sh | 5 +++++ 2 files changed, 37 insertions(+) create mode 100755 validator/rpm/buildasroot.sh create mode 100755 validator/rpm/installpython3.sh (limited to 'validator/rpm') diff --git a/validator/rpm/buildasroot.sh b/validator/rpm/buildasroot.sh new file mode 100755 index 0000000..94076c2 --- /dev/null +++ b/validator/rpm/buildasroot.sh @@ -0,0 +1,32 @@ +#! /usr/bin/env bash +# Builds the pharosvalidator package as root (it must be built as root) +# then copies the finished package to /tmp. The script can either be called +# as root or with sudo + +tarball=pharos-validator-1.tar.gz +specfile=pharosvalidator.spec +arch=x86_64 + +if [ "$(id -u)" != 0 ]; then + echo "This script must be run as root (or with sudo)" + exit 1 +fi; + +rpmdev-setuptree + +cp "$specfile" ~/rpmbuild/SPECS/ + +# Prepare the "source package" for the rpm build process using .spec file +pushd ../../ +tar -cvf "$tarball" pharos-validator +cp "$tarball" ~/rpmbuild/SOURCES +popd + + +cd ~/rpmbuild/ + +rpmlint SPECS/"$specfile" +printf "\n\nRPM BUILD PROCESS\n\n" +rpmbuild -ba SPECS/"$specfile" + +cp -rfv RPMS/"$arch"/* /tmp/ diff --git a/validator/rpm/installpython3.sh b/validator/rpm/installpython3.sh new file mode 100755 index 0000000..8f2d833 --- /dev/null +++ b/validator/rpm/installpython3.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env python3 +# This script is to be handed out (possibly find a different python3 source) so that server provisioners may install python3 in centOS7 + +sudo yum install -y https://centos7.iuscommunity.org/ius-release.rpm +sudo yum install -y python35u python35u-pip -- cgit 1.2.3-korg