diff options
author | Todd Gaunt <singularik@iol.unh.edu> | 2016-10-03 16:02:12 -0400 |
---|---|---|
committer | Todd Gaunt <singularik@iol.unh.edu> | 2016-10-03 16:02:12 -0400 |
commit | d863ee1a888954aa9863c33f95e636466b4025a8 (patch) | |
tree | 9826e1915209f8119f78d9bad8bc7f7cd3bb3da4 /tools/pharos-validator/rpm | |
parent | 94f19e02d37b1d7af807854cae910c83d34ce0cd (diff) |
Add pharos-validator tool
Change-Id: I38e077c2c90059e39ee9871abf5d867a875827a3
Signed-off-by: Todd Gaunt <singularik@iol.unh.edu>
Diffstat (limited to 'tools/pharos-validator/rpm')
-rwxr-xr-x | tools/pharos-validator/rpm/buildasroot.sh | 32 | ||||
-rwxr-xr-x | tools/pharos-validator/rpm/installpython3.sh | 5 |
2 files changed, 37 insertions, 0 deletions
diff --git a/tools/pharos-validator/rpm/buildasroot.sh b/tools/pharos-validator/rpm/buildasroot.sh new file mode 100755 index 00000000..94076c26 --- /dev/null +++ b/tools/pharos-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/tools/pharos-validator/rpm/installpython3.sh b/tools/pharos-validator/rpm/installpython3.sh new file mode 100755 index 00000000..8f2d8334 --- /dev/null +++ b/tools/pharos-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 |