Skip to content

Commit

Permalink
[#7] require iRODS 4.1.8 for v1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
trel committed Jan 29, 2016
1 parent 8145799 commit 2509bb8
Showing 1 changed file with 9 additions and 24 deletions.
33 changes: 9 additions & 24 deletions packaging/irods_auth_plugin_krb.list.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# EPM Variables
# =-=-=-=-=-=-=-
%product iRODS KRB Auth Plugin
%copyright 2014, The University of North Carolina at Chapel Hill
%copyright 2016, The University of North Carolina at Chapel Hill
%vendor Renaissance Computing Institute <info@irods-consortium.org>
%license LICENSE
%readme README
Expand All @@ -29,36 +29,21 @@
$IRODS_HOME_DIR=/var/lib/irods
$OS_IRODS_ACCT=irods


# =-=-=-=-=-=-=-
# preinstall
# =-=-=-=-=-=-=-
%preinstall << END_PREINSTALL

# determine whether this is an upgrade
if [ "$$1" -eq "$$1" ] 2>/dev/null ; then
# integer, therefore rpm
if [ $$1 -gt 1 ] ; then
PACKAGEUPGRADE="true"
else
PACKAGEUPGRADE="false"
fi
else
# string, therefore deb
if [ "$$1" = "upgrade" ] ; then
PACKAGEUPGRADE="true"
else
PACKAGEUPGRADE="false"
fi
REQUIRED_VERSION="4.1.8"
DETECTED_VERSION=`python -c 'import json; print json.loads(open("/var/lib/irods/VERSION.json").read())["irods_version"]'`
if [ "$$DETECTED_VERSION" != "$$REQUIRED_VERSION" ] ; then
echo "Local iRODS is $$DETECTED_VERSION"
echo "This plugin requires iRODS $$REQUIRED_VERSION"
exit 1
fi

if [ "$$PACKAGEUPGRADE" = "true" ] ; then
echo "NOP" > /dev/null
else
echo "NOP" > /dev/null
fi

END_PREINSTALL


# =-=-=-=-=-=-=-
# post install
# =-=-=-=-=-=-=-
Expand Down

0 comments on commit 2509bb8

Please sign in to comment.