← Back to team overview

duplicity-team team mailing list archive

Re: [Question #191468]: Building a generic package archive with all dependencies for easy cross-platform deployments

 

You need to compile/link it to a shared object file, librsync.so, an
archive file, librsync.la won't do it.

-rw-r--r-- 1 root root 113144 2009-11-06 03:09 /usr/lib/librsync.a
-rw-r--r-- 1 root root    835 2009-11-06 03:09 /usr/lib/librsync.la
lrwxrwxrwx 1 root root     17 2011-07-10 08:26 /usr/lib/librsync.so ->
librsync.so.1.0.2
lrwxrwxrwx 1 root root     17 2011-07-10 08:26 /usr/lib/librsync.so.1 ->
librsync.so.1.0.2
-rw-r--r-- 1 root root  55640 2009-11-06 03:09 /usr/lib/librsync.so.1.0.2

...Ken

On Fri, Mar 23, 2012 at 1:50 AM, Muhammad Shoaib <
question191468@xxxxxxxxxxxxxxxxxxxxx> wrote:

> New question #191468 on Duplicity:
> https://answers.launchpad.net/duplicity/+question/191468
>
> 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?
>
>
> --
> You received this question notification because you are a member of
> duplicity-team, which is an answer contact for Duplicity.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~duplicity-team
> Post to     : duplicity-team@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~duplicity-team
> More help   : https://help.launchpad.net/ListHelp
>

References