barbican/rpmbuild/package_dependencies.sh
Sig Sigler 45795fadbb Modify python-dateutil RPM build process
The current build process for the python-dateutil RPM generates a
package that when installed lays a number of files on a filesystem
that only root can read.  This is problematic for non-root owned
processes that are trying to read these files.  Adding this patch
opens up those files to reading by process that aren't running as
root.  For example, this would allow for the running of the
reference uWSGI based implementation as a non-root user.

Fixes: bug #1288033
Change-Id: I3bff45bab272de888992cb42a8b8709a3fcd8ec6
2014-03-05 10:24:41 -06:00

137 lines
4.2 KiB
Bash
Executable File

#!/bin/bash
# ---------------------
# Barbican Dependencies
# ---------------------
pushd $WORKSPACE/rpmbuild
export PYENV_VERSION=system
fpm -s python -t rpm -n python-falcon-barbican -v 0.1.6 falcon
fpm -s python -t rpm uWSGI
fpm -s python -t rpm -n python-wsgiref-barbican -v 0.1.2 wsgiref
fpm -s python -t rpm pysqlite
fpm -s python -t rpm -v 0.13.0 eventlet
fpm -s python -t rpm oslo.config
fpm -s python -t rpm oslo.messaging
fpm -s python -t rpm iso8601
fpm -s python -t rpm -v 3.0.8 kombu
fpm -s python -t rpm -n python-webob-barbican -v 1.2.3 webob
# --> # python-webob.noarch 0.9.6.1-3.el6 exists, but is incompatible
fpm -s python -t rpm -n python-pastedeploy-barbican -v 1.5.0 PasteDeploy
# --> python-paste-deploy 1.3.3-2.1.el6
# Rename keystoneclient due to odd dependency issue with yum repo.
fpm -s python -t rpm -n python-keystoneclient-barbican -v 0.4.1 python-keystoneclient
fpm -s python -t rpm -v 0.12 stevedore
fpm -s python -t rpm -n python-crypto pycrypto
# --> python-crypto 2.0.1-22.el6 exists, but is too old
################################################################################
# Modified python-dateutil RPM build process via fpm #
# python-dateutil RPM file permissions are too restrictive when generated by a #
# default fpm call, i.e. fpm -s python -t rpm python-dateutil, so this #
# modified process addresses that problem. #
################################################################################
pypi_pdu_version="python-dateutil-2.2"
pypi_pdu_version_md5="c1f654d0ff7e33999380a8ba9783fd5c"
fpm_tmp_dir=$(mktemp -d --suffix=-fpm-python-dateutil)
if [ $? -ne 0 ]
then
echo "Unable to create tmp dir for python-dateutil fpm build." 1>&2
exit 1
fi
wget -P $fpm_tmp_dir \
https://pypi.python.org/packages/source/p/python-dateutil/\
$pypi_pdu_version.tar.gz --no-check-certificate
echo "$pypi_pdu_version_md5 $fpm_tmp_dir/$pypi_pdu_version.tar.gz" \
| md5sum -c -
if [ $? -ne 0 ]
then
echo "The md5 check for python-dateutil from pypi failed." 1>&2
rm -rf $fpm_tmp_dir
exit 1
fi
tar xvfz $fpm_tmp_dir/$pypi_pdu_version.tar.gz -C $fpm_tmp_dir
find $fpm_tmp_dir/$pypi_pdu_version/python_dateutil.egg-info -type f \
-exec chmod go+r {} \;
chmod go+rx $fpm_tmp_dir/$pypi_pdu_version/python_dateutil.egg-info
chmod go+r \
$fpm_tmp_dir/$pypi_pdu_version/dateutil/zoneinfo/zoneinfo--latest.tar.gz
fpm -s python -t rpm $fpm_tmp_dir/$pypi_pdu_version/setup.py
rm -rf $fpm_tmp_dir
################################################
# End python-dateutil modified fpm build process
################################################
fpm -s python -t rpm -v 1.3.0 jsonschema
fpm -s python -t rpm -v 0.7.10 SQLAlchemy
# --> python-sqlalchemy 0.5.5-3.el6_2 exists, but is incompatible
fpm -s python -t rpm alembic
# ---------------------
# Indirect dependencies
# ---------------------
# oslo copy-pasta depends on
fpm -s python -t rpm netaddr
fpm -s python -t rpm Babel
fpm -s python -t rpm pytz
#oslo messaging depends on
fpm -s python -t rpm pyyaml
# python-alembic
fpm -s python -t rpm mako
# --> mako needs markupsafe
# python-markupsafe 0.9.2-4.el6
# fpm -s python -t rpm markupsafe
fpm -s python -t rpm argparse
# python-eventlet
fpm -s python -t rpm greenlet
# python-falcon
fpm -s python -t rpm six
fpm -s python -t rpm ordereddict
# python-keystoneclient
# fpm -s python -t rpm six
# fpm -s python -t rpm argparse
fpm -s python -t rpm d2to1
fpm -s python -t rpm -v 0.5.21 pbr
# --> pbr needs setuptools-git
fpm -s python -t rpm setuptools-git
fpm -s python -t rpm prettytable
fpm -s python -t rpm requests
fpm -s python -t rpm simplejson
# python-kombu
fpm -s python -t rpm anyjson
fpm -s python -t rpm -v 1.3.3 amqp
# --> latest amqp is incompatible
fpm -s python -t rpm importlib
# fpm -s python -t rpm ordereddict
# oslo.config
# fpm -s python -t rpm argparse
# python-stevedore
# fpm -s python -t rpm argparse
# -------------------------------
# Upload to yum-repo.cloudkeep.io
# -------------------------------
scp *.rpm rpmbuild@yum-repo.cloudkeep.io:/var/www/html/centos/6/barbican/x86_64/
ssh rpmbuild@yum-repo.cloudkeep.io 'createrepo /var/www/html/centos/6/barbican/x86_64/'
popd