[Borgbackup] Build Static Borg Binary fail with Vagrantfile

Lars Bendel lars-borgbackup at 12357.de
Thu Jun 21 07:04:21 EDT 2018


Hi Thomas:
>> i'd like to backup my Centos7 and Debian Stretch Systems with borgbackup.
>> Because the versions from the Repositorys are different and old,
> stretch-backports has 1.1.5
>
>> i decided to build the v1.1.6 with the Vagrantfile as static binary,
> there are ready-to-use binaries, see "github releases".

the backports i haven't seen, but befor i mix Version 1.1.5 (on Debian) and 1.1.4 (on Centos) for a repository over ssh, i will fall back for the moment to the pre-compiled binary.

>
>> but that's failed with the error below for both Vagrant boxes (centos7_64 & stretch64)
> the 1.1.x binaries were made on debian wheezy (for better compat with
> old linuxes) and they should work on any linux that has the required glibc.
>
> see Vagrantfile in 1.1-maint git branch.
>
> in the future, this might be moved to debian jessie as wheezy has run
> out of security support.

Because the b.vm.box "debian7-amd64" did not exist anymore, i used the "debian/wheezy64" box and added to install the "curl" package to the vagrantfile.
Then i have test the build with the wheezy64 box but get the same error with "vagrant up" for Centos7 and Stretch at the point "python setup.py clean"

<---- SNIP ---->
  def install_borg(fuse)
    script = <<-EOF
      . ~/.bash_profile
      cd /vagrant/borg
      . borg-env/bin/activate
      pip install -U wheel  # upgrade wheel, too old for 3.5
      cd borg
      pip install -r requirements.d/development.txt
=>    python setup.py clean
<---- /SNIP ---->

if i execute the commands direct in debug mode, it's looks like the borg version can't be parsed or found but i don't know why or what i have forgotten?
Unfortunately C(++), PHP and BASH scripting is no problem but python i have never used. :-(

<---- SNIP2 --->
(borg-env) vagrant at wheezy:/vagrant/borg/borg$ SETUPTOOLS_SCM_DEBUG=1 python setup.py clean
looking for ep setuptools_scm.parse_scm_fallback .
root '/vagrant/borg/borg'
looking for ep setuptools_scm.parse_scm /vagrant/borg/borg
looking for ep setuptools_scm.parse_scm_fallback /vagrant/borg/borg
Traceback (most recent call last):
  File "setup.py", line 856, in <module>
    extras_require=extras_require,
  File "/home/vagrant/.pyenv/versions/3.5.5/lib/python3.5/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/home/vagrant/.pyenv/versions/3.5.5/envs/borg-env/lib/python3.5/site-packages/setuptools/dist.py", line 318, in __init__
    _Distribution.__init__(self, attrs)
  File "/home/vagrant/.pyenv/versions/3.5.5/lib/python3.5/distutils/dist.py", line 281, in __init__
    self.finalize_options()
  File "/home/vagrant/.pyenv/versions/3.5.5/envs/borg-env/lib/python3.5/site-packages/setuptools/dist.py", line 376, in finalize_options
    ep.load()(self, ep.name, value)
  File "/home/vagrant/.pyenv/versions/3.5.5/envs/borg-env/lib/python3.5/site-packages/setuptools_scm/integration.py", line 22, in version_keyword
    dist.metadata.version = get_version(**value)
  File "/home/vagrant/.pyenv/versions/3.5.5/envs/borg-env/lib/python3.5/site-packages/setuptools_scm/__init__.py", line 119, in get_version
    parsed_version = _do_parse(root, parse)
  File "/home/vagrant/.pyenv/versions/3.5.5/envs/borg-env/lib/python3.5/site-packages/setuptools_scm/__init__.py", line 97, in _do_parse
    "use git+https://github.com/user/proj.git#egg=proj" % root)
LookupError: setuptools-scm was unable to detect version for '/vagrant/borg/borg'.
<---- /SNIP2 --->

best regards
   Lars Bendel




More information about the Borgbackup mailing list