diff options
author | Jack Morgan <jack.morgan@intel.com> | 2016-10-25 11:45:14 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2016-10-25 11:45:14 +0000 |
commit | 026ae4994e15809d25bf9f62e36f6fe5b35b1542 (patch) | |
tree | 83d6f0bb4ee1594b3016ab67696af0f1acdb4d94 /pharos-validator/rpm | |
parent | 61f00f4110b1d33827e3bd19ffef34f10be8273a (diff) | |
parent | 4f0ecb702a601d122f261a134007377435e4aca1 (diff) |
Merge "Add pharos-validator tool"
Diffstat (limited to 'pharos-validator/rpm')
-rwxr-xr-x | pharos-validator/rpm/buildasroot.sh | 32 | ||||
-rwxr-xr-x | pharos-validator/rpm/installpython3.sh | 5 |
2 files changed, 37 insertions, 0 deletions
diff --git a/pharos-validator/rpm/buildasroot.sh b/pharos-validator/rpm/buildasroot.sh new file mode 100755 index 0000000..94076c2 --- /dev/null +++ b/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/pharos-validator/rpm/installpython3.sh b/pharos-validator/rpm/installpython3.sh new file mode 100755 index 0000000..8f2d833 --- /dev/null +++ b/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 |