Building a generic package archive with all dependencies for easy cross-platform deployments

Asked by Muhammad Shoaib

I am trying to build a one big archive that contains a generic(in terms of arch) version of duplicity installed with its dependencies(with optional ones). My target is to have a tar.gz archive containing compiled and working binaries of duplicity with:
1- librsync
2- ncftp
3- python-boto

(and python is available on almost all distributions so thats not needed)

I have tried to do the following:
1- Using CDE from http://www.stanford.edu/~pgbovine/cde.html
Tried a restore operation so duplicity and all its dependencies such as python-boto and ncftp would be included in execution process. At the end i do get a big cde-package folder but unfortunately that specific to the user who executed duplicity, so if i make a cde package on a server using a user, say root, then it would also have to run as root on other servers. I have been struggling to change this.

2- Building all packages in a prefixed environment
Worked fine except duplicity can't find librsync. Here is my custom script that i use to execute duplicity after some env variable setups:

#!/bin/sh

binPath=$(dirname $0)
libPath=$binPath/../lib

export PATH=$binPath:$PATH
export PYTHONPATH=$libPath/python2.7/site-packages:$PYTHONPATH
export LD_LIBRARY_PATH=$libPath:$LD_LIBRARY_PATH

$binPath/duplicity

echo
echo PATH:
echo ----------
echo $PATH
echo
echo PYTHONPATH
echo ----------
echo $PYTHONPATH
echo
echo LD_LIBRARY_PATH
echo ----------------
echo $LD_LIBRARY_PATH
echo

Output given by this script is:

Traceback (most recent call last):
  File "/home/shoaibi/tmp/duply-experiments/duply_64b_compiled/bin/duplicity", line 45, in <module>
    from duplicity import collections
  File "/home/shoaibi/tmp/duply-experiments/duply_64b_compiled/lib/python2.7/site-packages/duplicity/collections.py", line 29, in <module>
    from duplicity import path
  File "/home/shoaibi/tmp/duply-experiments/duply_64b_compiled/lib/python2.7/site-packages/duplicity/path.py", line 36, in <module>
    from duplicity import librsync
  File "/home/shoaibi/tmp/duply-experiments/duply_64b_compiled/lib/python2.7/site-packages/duplicity/librsync.py", line 29, in <module>
    import _librsync
ImportError: librsync.so.1: cannot open shared object file: No such file or directory

PATH:
----------
/home/shoaibi/tmp/duply-experiments/duply_64b_compiled/bin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/games:/var/www/yii/framework:/home/shoaibi/rootfs/aws/rds/bin:/home/shoaibi/rootfs/aws/ec2/bin:/home/shoaibi/rootfs/aws/cfn/bin:/home/shoaibi/rootfs/aws/as/bin:/home/shoaibi/rootfs/aws/cw/bin

PYTHONPATH
----------
/home/shoaibi/tmp/duply-experiments/duply_64b_compiled/bin/../lib/python2.7/site-packages:

LD_LIBRARY_PATH
----------------
/home/shoaibi/tmp/duply-experiments/duply_64b_compiled/bin/../lib:

while:
ls ~/tmp/duply-experiments/duply_64b_compiled/lib]$ ls
librsync.a librsync.la python2.7

So, that fails too. I have tried to override the LD_LIBRARY_PATH but that doesn't take into effect. I have also tried building duplicity with:
LDFLAGS="-L ~/tmp/duply-experiments/duply_64b_compiled/lib" python setup.py install
but its no use.

Finally, i am building the archive so i can drop it on one of my hostgator FTPs, create cron in cpanel and have it working. Consider an environment where a user doesn't have shell access except from cron, let alone sudo access to modify /etc/ld.conf to have it work.

So, any suggestions?

Question information

Language:
English Edit question
Status:
Expired
For:
Duplicity Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.