Skip to content

Commit

Permalink
Fix all builds
Browse files Browse the repository at this point in the history
Full test still wasn't working for all 4 builds.  This makes it work on all 4.
  • Loading branch information
untergeek committed Mar 20, 2018
1 parent f472084 commit 3b27b3e
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 6 deletions.
30 changes: 27 additions & 3 deletions unix_packages/build_official_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,8 @@ esac

# Improve RPM dependency for RHEL/Centos 7
if [ "$VERSION_ID" == "7" ] && [ "$PLATFORM" == "centos" ]; then
DEPFLAG='--depends'
DEP1='openssl-libs >= 1:1.0.2k-8.el7'
else
DEPFLAG=''
DEP1=''
fi

Expand Down Expand Up @@ -160,6 +158,8 @@ sudo mv build/exe.linux-x86_64-${PYVER} /opt/elasticsearch-curator

sudo chown -R root:root /opt/elasticsearch-curator
cd ..

if [ "x${DEP1}" == "x" ]; then
fpm \
-s dir \
-t ${PKGTYPE} \
Expand All @@ -168,7 +168,7 @@ fpm \
--vendor ${VENDOR} \
--maintainer "${MAINTAINER}" \
--license 'Apache-2.0' \
--category tools ${DEPFLAG} "${DEP1}" \
--category tools \
--description 'Have indices in Elasticsearch? This is the tool for you!\n\nLike a museum curator manages the exhibits and collections on display, \nElasticsearch Curator helps you curate, or manage your indices.' \
--after-install ${C_POST_INSTALL} \
--before-remove ${C_PRE_REMOVE} \
Expand All @@ -180,6 +180,30 @@ fpm \
--conflicts python3-elasticsearch-curator \
/opt/elasticsearch-curator

else

fpm \
-s dir \
-t ${PKGTYPE} \
-n elasticsearch-curator \
-v ${1} \
--vendor ${VENDOR} \
--maintainer "${MAINTAINER}" \
--license 'Apache-2.0' \
--category tools \
--depends "${DEP1}" \
--description 'Have indices in Elasticsearch? This is the tool for you!\n\nLike a museum curator manages the exhibits and collections on display, \nElasticsearch Curator helps you curate, or manage your indices.' \
--after-install ${C_POST_INSTALL} \
--before-remove ${C_PRE_REMOVE} \
--after-remove ${C_POST_REMOVE} \
--before-upgrade ${C_PRE_UPGRADE} \
--after-upgrade ${C_POST_UPGRADE} \
--provides elasticsearch-curator \
--conflicts python-elasticsearch-curator \
--conflicts python3-elasticsearch-curator \
/opt/elasticsearch-curator
fi

mv ${WORKDIR}/*.${PKGTYPE} ${PACKAGEDIR}

rm ${C_POST_INSTALL} ${C_PRE_REMOVE} ${C_POST_REMOVE} ${C_PRE_UPGRADE} ${C_POST_UPGRADE}
Expand Down
30 changes: 27 additions & 3 deletions unix_packages/build_package_from_source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,8 @@ esac

# Improve RPM dependency for RHEL/Centos 7
if [ "$VERSION_ID" == "7" ] && [ "$PLATFORM" == "centos" ]; then
DEPFLAG='--depends'
DEP1='openssl-libs >= 1:1.0.2k-8.el7'
else
DEPFLAG=''
DEP1=''
fi

Expand Down Expand Up @@ -156,6 +154,8 @@ sudo mv build/exe.linux-x86_64-${PYVER} /opt/elasticsearch-curator

sudo chown -R root:root /opt/elasticsearch-curator
cd $WORKDIR

if [ "x${DEP1}" == "x" ]; then
fpm \
-s dir \
-t ${PKGTYPE} \
Expand All @@ -164,7 +164,7 @@ fpm \
--vendor ${VENDOR} \
--maintainer "${MAINTAINER}" \
--license 'Apache-2.0' \
--category tools ${DEPFLAG} "${DEP1}" \
--category tools \
--description 'Have indices in Elasticsearch? This is the tool for you!\n\nLike a museum curator manages the exhibits and collections on display, \nElasticsearch Curator helps you curate, or manage your indices.' \
--after-install ${C_POST_INSTALL} \
--before-remove ${C_PRE_REMOVE} \
Expand All @@ -176,6 +176,30 @@ fpm \
--conflicts python3-elasticsearch-curator \
/opt/elasticsearch-curator

else

fpm \
-s dir \
-t ${PKGTYPE} \
-n elasticsearch-curator \
-v ${1} \
--vendor ${VENDOR} \
--maintainer "${MAINTAINER}" \
--license 'Apache-2.0' \
--category tools \
--depends "${DEP1}" \
--description 'Have indices in Elasticsearch? This is the tool for you!\n\nLike a museum curator manages the exhibits and collections on display, \nElasticsearch Curator helps you curate, or manage your indices.' \
--after-install ${C_POST_INSTALL} \
--before-remove ${C_PRE_REMOVE} \
--after-remove ${C_POST_REMOVE} \
--before-upgrade ${C_PRE_UPGRADE} \
--after-upgrade ${C_POST_UPGRADE} \
--provides elasticsearch-curator \
--conflicts python-elasticsearch-curator \
--conflicts python3-elasticsearch-curator \
/opt/elasticsearch-curator
fi

mv ${WORKDIR}/*.${PKGTYPE} ${PACKAGEDIR}

rm ${C_POST_INSTALL} ${C_PRE_REMOVE} ${C_POST_REMOVE} ${C_PRE_UPGRADE} ${C_POST_UPGRADE}
Expand Down

0 comments on commit 3b27b3e

Please sign in to comment.