diff options
author | Joerg Steffens <joerg.steffens@bareos.com> | 2015-09-22 14:43:48 +0300 |
---|---|---|
committer | Joerg Steffens <joerg.steffens@bareos.com> | 2015-09-22 14:43:48 +0300 |
commit | d745636e329ef2b5fcd40c1bdaf00167b2d82a11 (patch) | |
tree | 716d69bc386a7795a8ba5197c4aecd38baf81b7c | |
parent | a6fa4264ba9b6ba7ac9954db2915d80a52a652f0 (diff) |
cleanup, moved bareos-fuse.py to package bareos-fuse
-rwxr-xr-x | bin/bareos-fuse.py | 69 | ||||
-rw-r--r-- | debian/control | 24 | ||||
-rw-r--r-- | packaging/python-bareos.spec | 7 | ||||
-rw-r--r-- | setup.py | 2 |
4 files changed, 9 insertions, 93 deletions
diff --git a/bin/bareos-fuse.py b/bin/bareos-fuse.py deleted file mode 100755 index cf531f7..0000000 --- a/bin/bareos-fuse.py +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/python - -import argparse -import bareos.fuse -import bareos.bsock -import fuse -import logging -import sys - -LOG_FILENAME = '/tmp/bareos-fuse-bsock.log' - -if __name__ == '__main__': - # initialize logging - #logging.basicConfig(filename=LOG_FILENAME,level=logging.DEBUG,format="%(asctime)s %(process)5d(%(threadName)s) %(levelname)-7s %(module)s %(funcName)s( %(message)s )") - if sys.argv[1] == "--test": - logging.basicConfig(level=logging.DEBUG,format="%(levelname)-7s %(module)s %(funcName)s( %(message)s )") - else: - logging.basicConfig(filename=LOG_FILENAME,level=logging.DEBUG,format="%(asctime)s %(levelname)-7s %(module)s %(funcName)s( %(message)s )") - logger = logging.getLogger() - - usage = """ - Bareos Fuse filesystem: displays files from Bareos backups as a (userspace) filesystem. - - """ + fuse.Fuse.fusage - - if sys.argv[1] == "--test": - test = bareos.bareosfuse.BareosWrapper(bsock=director) - print test.readdir("", 0) - test.getattr("") - print test.readdir("/jobs", 0) - test.getattr("/jobs") - print test.readdir("/NOT", 0) - test.getattr("/NOT") - else: - fs = bareos.fuse.BareosFuse( - #version="%prog: " + BAREOS_FUSE_VERSION, - usage = usage, - # required to let "-s" set single-threaded execution - dash_s_do = 'setsingle', - ) - - fs.parser.add_option( - mountopt="address", - metavar="BAREOS_DIRECTOR", - default='localhost', - help="address of the Bareos Director to connect [default: \"%default\"]") - fs.parser.add_option( - mountopt="port", - metavar="PORT", - default='9101', - help="address of the Bareos Director to connect [default: \"%default\"]") - fs.parser.add_option( - mountopt="dirname", - metavar="NAME", - default='', - help="name of the Bareos Director to connect [default: \"%default\"]") - fs.parser.add_option( - mountopt="name", - metavar="NAME", - help="name of the Bareos Named Console") - fs.parser.add_option( - mountopt="password", - metavar="PASSWORD", - default='', - help="password to authenticate at Bareos Director [default: \"%default\"]") - - fs.parse(values=fs, errex=1) - - fs.main() diff --git a/debian/control b/debian/control index 9e85445..a716695 100644 --- a/debian/control +++ b/debian/control @@ -8,24 +8,6 @@ Standards-Version: 3.9.1 Package: python-bareos Architecture: all Depends: ${misc:Depends}, ${python:Depends} -Description: Network socket connection to the Bareos backup system. - python-bareos - ============= - . - Python libraries to access Bareos - . - ## Example - . - . - ### preperation - . - ``` - export PYTHONPATH=. - python - ``` - . - ### calling bareos-director user agent commands - . - ``` - import bareos.bsock - . +Description: Backup Archiving REcovery Open Sourced - Python module + This packages contains a python module to interact with a Bareos backup system. + It also includes some tools based on this module. diff --git a/packaging/python-bareos.spec b/packaging/python-bareos.spec index d9ab6d6..b8ddf85 100644 --- a/packaging/python-bareos.spec +++ b/packaging/python-bareos.spec @@ -20,7 +20,7 @@ Name: python-%{srcname} Version: 0.3 Release: 1%{?dist} -Summary: Python module to interact with a Bareos backup system +Summary: Backup Archiving REcovery Open Sourced - Python module Group: Productivity/Archiving/Backup License: AGPL-3.0 URL: https://github.com/bareos/python-bareos/ @@ -42,7 +42,10 @@ BuildArch: noarch %{?python_provide:%python_provide python-%{srcname}} %description -A python module to interact with a Bareos backup system. Also some tools based on this module. +Bareos - Backup Archiving Recovery Open Sourced - Python module + +This packages contains a python module to interact with a Bareos backup system. +It also includes some tools based on this module. %define pyX_sitelib %(%{pyXcmd} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") @@ -8,7 +8,7 @@ setup( author='Joerg Steffens', author_email='joerg.steffens@bareos.com', packages=find_packages(), - scripts=['bin/bconsole.py', 'bin/bconsole-json.py', 'bin/bareos-fuse.py'], + scripts=['bin/bconsole.py', 'bin/bconsole-json.py'], url='https://github.com/joergsteffens/python-bareos/', # What does your project relate to? keywords='bareos', |