diff --git a/contrib/debian/README.source b/contrib/debian/README.source new file mode 100644 index 00000000..53bdf293 --- /dev/null +++ b/contrib/debian/README.source @@ -0,0 +1,2 @@ +This package uses the patch management system quilt as documented in +/usr/share/doc/quilt/README.source. diff --git a/contrib/debian/changelog b/contrib/debian/changelog index 734a3d49..9155a9d0 100644 --- a/contrib/debian/changelog +++ b/contrib/debian/changelog @@ -1,3 +1,27 @@ +holland (1.0.8-1) unstable; urgency=low + + * New upstream release + + -- Andrew Garner Wed, 09 Jan 2013 15:10:45 +0000 + +holland (1.0.6-3) unstable; urgency=low + + * Installed holland command as /usr/sbin/holland to fix regression from + previous releases + + -- Andrew Garner Wed, 30 May 2012 15:10:45 +0000 + +holland (1.0.6-2) unstable; urgency=low + + * Adding missing ${python:Depends} to all subpackages + * Removed mysql-client version requirement + * Removed python-support dependency and use dh_python2 + * Remove namespace_package support + * Build sphinx html documentation + * Add missing mysqldump-lvm.conf global plugin config + + -- Andrew Garner Sat, 05 May 2012 11:12:27 -0500 + holland (1.0.6-1) unstable; urgency=low * New upstream release diff --git a/contrib/debian/control b/contrib/debian/control index e4207290..ee9644b4 100644 --- a/contrib/debian/control +++ b/contrib/debian/control @@ -2,20 +2,18 @@ Source: holland Section: utils Priority: optional Maintainer: Andrew Garner -Build-Depends: - debhelper (>= 5), - python (>= 2.3.5-11), - python-setuptools (>= 0.6b3-1~), - python-sphinx (>= 0.4) -Build-Depends-Indep: python-support (>= 0.5.6) -Standards-Version: 3.8.0 -XS-Homepage: https://gforge.rackspace.com/gf/project/holland/ +Build-Depends: debhelper (>= 7.0.50), quilt +Build-Depends-Indep: python (>= 2.6.6-3), python-sphinx, + python-setuptools, libjs-jquery +Homepage: http://hollandbackup.org +Standards-Version: 3.9.2 + Package: holland Architecture: all -Depends: ${python:Depends}, python-pkg-resources (>= 0.6b3-1~) -Description: A pluggable backup utility - A pluggable backup framework which focuses on, but is not limited to, highly +Depends: ${python:Depends}, ${misc:Depends}, python-pkg-resources +Description: pluggable backup manager + Pluggable backup framework which focuses on, but is not limited to, highly configurable database backups. . Holland Mythos @@ -30,11 +28,10 @@ Description: A pluggable backup utility The ocean represents our customers, and the rising tide of MySQL backup needs at Rackspace. . - The dike represents Rackspace. Package: holland-common Architecture: all -Depends: holland (>= ${source:Version}), python-mysqldb (>= 1.2) +Depends: ${python:Depends}, ${misc:Depends}, holland (>= ${source:Version}), python-mysqldb (>= 1.2) Recommends: mysql-client Description: Holland Common Library Plugins This package provides the common holland plugins that are generally used by @@ -42,44 +39,32 @@ Description: Holland Common Library Plugins Package: holland-mysqldump Architecture: all -Depends: holland (>= ${source:Version}), holland-common(>= ${source:Version}), mysql-client +Depends: ${python:Depends}, ${misc:Depends}, holland (>= ${source:Version}), holland-common(>= ${source:Version}), mysql-client Description: Holland MySQL Dump Backup Provider Plugin This package provides the holland mysqldump plugin. Package: holland-example Architecture: all -Depends: holland (>= ${source:Version}) +Depends: ${python:Depends}, ${misc:Depends}, holland (>= ${source:Version}) Description: Holland Example Backup Provider Plugin This package provides the holland example plugin. -Package: holland-maatkit -Architecture: all -Depends: holland (>= ${source:Version}), maatkit, holland-common (>= ${source:Version}) -Description: Holland Maatkit Library Plugins - This package provides the holland maatkit plugin. - -Package: holland-mysqlhotcopy -Architecture: all -Depends: holland (>= ${source:Version}), holland-common (>= ${source:Version}) -Description: Holland MySQL Hot Copy Backup Provider Plugin - This package provides the Holland mysqlhotcopy plugin. - Package: holland-mysqllvm Architecture: all -Depends: holland (>= ${source:Version}), holland-common (>= ${source:Version}) +Depends: ${python:Depends}, ${misc:Depends}, holland (>= ${source:Version}), holland-common (>= ${source:Version}) Replaces: holland-mysql-lvm Description: Holland MySQL Hot Copy Backup Provider Plugin This package provides the Holland mysql-lvm plugin. Package: holland-xtrabackup Architecture: all -Depends: holland (>= ${source:Version}), holland-common (>= ${source:Version}), mysql-client +Depends: ${python:Depends}, ${misc:Depends}, holland (>= ${source:Version}), holland-common (>= ${source:Version}), mysql-client Description: Holland xtrabackup Backup plugin This package provides the holland xtrabackup plugin. Package: holland-pgdump Architecture: all -Depends: holland (>= ${source:Version}), holland-common(>= ${source:Version}) +Depends: ${python:Depends}, ${misc:Depends}, holland (>= ${source:Version}), holland-common(>= ${source:Version}) Description: Holland Postgres Backup Provider Plugin This package provides the holland pgdump plugin. diff --git a/contrib/debian/holland-common.files b/contrib/debian/holland-common.files deleted file mode 100644 index c108ed7b..00000000 --- a/contrib/debian/holland-common.files +++ /dev/null @@ -1,10 +0,0 @@ -usr/lib/python*.*/*-packages/holland/lib/compression.py* -usr/lib/python*.*/*-packages/holland/lib/which.py* -usr/lib/python*.*/*-packages/holland/lib/safefilename.py* -usr/lib/python*.*/*-packages/holland/lib/multdict.py* -usr/lib/python*.*/*-packages/holland/lib/archive/ -usr/lib/python*.*/*-packages/holland/lib/mysql/ -usr/lib/python*.*/*-packages/holland.lib.common-*.egg-info -usr/lib/python*.*/*-packages/holland.lib.common-*-nspkg.pth -usr/lib/python*.*/*-packages/holland.lib.mysql-*.egg-info -usr/lib/python*.*/*-packages/holland.lib.mysql-*-nspkg.pth diff --git a/contrib/debian/holland-common.install b/contrib/debian/holland-common.install new file mode 100644 index 00000000..7328be74 --- /dev/null +++ b/contrib/debian/holland-common.install @@ -0,0 +1,8 @@ +debian/tmp/usr/lib/python*.*/*-packages/holland/lib/compression.py* +debian/tmp/usr/lib/python*.*/*-packages/holland/lib/which.py* +debian/tmp/usr/lib/python*.*/*-packages/holland/lib/safefilename.py* +debian/tmp/usr/lib/python*.*/*-packages/holland/lib/multidict.py* +debian/tmp/usr/lib/python*.*/*-packages/holland/lib/archive/ +debian/tmp/usr/lib/python*.*/*-packages/holland/lib/mysql/ +debian/tmp/usr/lib/python*.*/*-packages/holland.lib.common-*.egg-info +debian/tmp/usr/lib/python*.*/*-packages/holland.lib.mysql-*.egg-info diff --git a/contrib/debian/holland-example.files b/contrib/debian/holland-example.files deleted file mode 100644 index 4c203c80..00000000 --- a/contrib/debian/holland-example.files +++ /dev/null @@ -1,4 +0,0 @@ -usr/lib/python*.*/*-packages/holland.backup.example-*.egg-info -usr/lib/python*.*/*-packages/holland.backup.example-*-nspkg.pth -usr/lib/python*.*/*-packages/holland/backup/example.py* -etc/holland/providers/example.conf diff --git a/contrib/debian/holland-example.install b/contrib/debian/holland-example.install new file mode 100644 index 00000000..5cbd407f --- /dev/null +++ b/contrib/debian/holland-example.install @@ -0,0 +1,3 @@ +debian/tmp/usr/lib/python*.*/*-packages/holland.backup.example-*.egg-info +debian/tmp/usr/lib/python*.*/*-packages/holland/backup/example.py* +config/providers/example.conf etc/holland/providers/ diff --git a/contrib/debian/holland-maatkit.files b/contrib/debian/holland-maatkit.files deleted file mode 100644 index f4b9f243..00000000 --- a/contrib/debian/holland-maatkit.files +++ /dev/null @@ -1,4 +0,0 @@ -usr/lib/python*.*/*-packages/holland.backup.maatkit-*.egg-info -usr/lib/python*.*/*-packages/holland.backup.maatkit-*-nspkg.pth -usr/lib/python*.*/*-packages/holland/backup/maatkit.py* -etc/holland/providers/maatkit.conf diff --git a/contrib/debian/holland-mysqldump.files b/contrib/debian/holland-mysqldump.files deleted file mode 100644 index 77e36ac4..00000000 --- a/contrib/debian/holland-mysqldump.files +++ /dev/null @@ -1,4 +0,0 @@ -usr/lib/python*.*/*-packages/holland.backup.mysqldump-*.egg-info -usr/lib/python*.*/*-packages/holland.backup.mysqldump-*-nspkg.pth -usr/lib/python*.*/*-packages/holland/backup/mysqldump/ -etc/holland/providers/mysqldump.conf diff --git a/contrib/debian/holland-mysqldump.install b/contrib/debian/holland-mysqldump.install new file mode 100644 index 00000000..b12ed489 --- /dev/null +++ b/contrib/debian/holland-mysqldump.install @@ -0,0 +1,3 @@ +debian/tmp/usr/lib/python*.*/*-packages/holland.backup.mysqldump-*.egg-info +debian/tmp/usr/lib/python*.*/*-packages/holland/backup/mysqldump/ +config/providers/mysqldump.conf etc/holland/providers/ diff --git a/contrib/debian/holland-mysqlhotcopy.files b/contrib/debian/holland-mysqlhotcopy.files deleted file mode 100644 index 4c61d8d5..00000000 --- a/contrib/debian/holland-mysqlhotcopy.files +++ /dev/null @@ -1,4 +0,0 @@ -usr/lib/python*.*/*-packages/holland.backup.mysqlhotcopy-*.egg-info -usr/lib/python*.*/*-packages/holland.backup.mysqlhotcopy-*-nspkg.pth -usr/lib/python*.*/*-packages/holland/backup/mysqlhotcopy.py* -etc/holland/providers/mysqlhotcopy.conf diff --git a/contrib/debian/holland-mysqllvm.files b/contrib/debian/holland-mysqllvm.files deleted file mode 100644 index 752f016e..00000000 --- a/contrib/debian/holland-mysqllvm.files +++ /dev/null @@ -1,7 +0,0 @@ -usr/lib/python*.*/*-packages/holland.backup.mysql_lvm-*.egg-info -usr/lib/python*.*/*-packages/holland.backup.mysql_lvm-*-nspkg.pth -usr/lib/python*.*/*-packages/holland/backup/mysql_lvm/ -usr/lib/python*.*/*-packages/holland.lib.lvm-*.egg-info -usr/lib/python*.*/*-packages/holland.lib.lvm-*-nspkg.pth -usr/lib/python*.*/*-packages/holland/lib/lvm/ -etc/holland/providers/mysql-lvm.conf diff --git a/contrib/debian/holland-mysqllvm.install b/contrib/debian/holland-mysqllvm.install new file mode 100644 index 00000000..931eb7cf --- /dev/null +++ b/contrib/debian/holland-mysqllvm.install @@ -0,0 +1,6 @@ +debian/tmp/usr/lib/python*.*/*-packages/holland.backup.mysql_lvm-*.egg-info +debian/tmp/usr/lib/python*.*/*-packages/holland/backup/mysql_lvm/ +debian/tmp/usr/lib/python*.*/*-packages/holland.lib.lvm-*.egg-info +debian/tmp/usr/lib/python*.*/*-packages/holland/lib/lvm/ +config/providers/mysql-lvm.conf etc/holland/providers/ +config/providers/mysqldump-lvm.conf etc/holland/providers/ diff --git a/contrib/debian/holland-pgdump.files b/contrib/debian/holland-pgdump.files deleted file mode 100644 index 35f45952..00000000 --- a/contrib/debian/holland-pgdump.files +++ /dev/null @@ -1,4 +0,0 @@ -usr/lib/python*.*/*-packages/holland.backup.pgdump-*.egg-info -usr/lib/python*.*/*-packages/holland.backup.pgdump-*-nspkg.pth -usr/lib/python*.*/*-packages/holland/backup/pgdump/ -etc/holland/providers/pgdump.conf diff --git a/contrib/debian/holland-pgdump.install b/contrib/debian/holland-pgdump.install new file mode 100644 index 00000000..f6617742 --- /dev/null +++ b/contrib/debian/holland-pgdump.install @@ -0,0 +1,3 @@ +debian/tmp/usr/lib/python*.*/*-packages/holland.backup.pgdump-*.egg-info +debian/tmp/usr/lib/python*.*/*-packages/holland/backup/pgdump/ +config/providers/pgdump.conf etc/holland/providers/ diff --git a/contrib/debian/holland-xtrabackup.files b/contrib/debian/holland-xtrabackup.files deleted file mode 100644 index fb35cb46..00000000 --- a/contrib/debian/holland-xtrabackup.files +++ /dev/null @@ -1,4 +0,0 @@ -usr/lib/python*.*/*-packages/holland.backup.xtrabackup-*.egg-info -usr/lib/python*.*/*-packages/holland.backup.xtrabackup-*-nspkg.pth -usr/lib/python*.*/*-packages/holland/backup/xtrabackup/ -etc/holland/providers/xtrabackup.conf diff --git a/contrib/debian/holland-xtrabackup.install b/contrib/debian/holland-xtrabackup.install new file mode 100644 index 00000000..57e9b8d3 --- /dev/null +++ b/contrib/debian/holland-xtrabackup.install @@ -0,0 +1,3 @@ +debian/tmp/usr/lib/python*.*/*-packages/holland.backup.xtrabackup-*.egg-info +debian/tmp/usr/lib/python*.*/*-packages/holland/backup/xtrabackup/ +config/providers/xtrabackup.conf etc/holland/providers/ diff --git a/contrib/debian/holland.docs b/contrib/debian/holland.docs index b6166468..491c28d8 100644 --- a/contrib/debian/holland.docs +++ b/contrib/debian/holland.docs @@ -1,2 +1,2 @@ README -docs/build/text +docs/html diff --git a/contrib/debian/holland.files b/contrib/debian/holland.files deleted file mode 100644 index 4b25cca7..00000000 --- a/contrib/debian/holland.files +++ /dev/null @@ -1,9 +0,0 @@ -usr/lib/python*.*/*-packages/holland-*.egg-info -usr/lib/python*.*/*-packages/holland-*-nspkg.pth -usr/lib/python*.*/*-packages/holland/core/ -usr/lib/python*.*/*-packages/holland/commands/*.py* -etc/holland/holland.conf -etc/holland/README -etc/holland/providers/README -etc/holland/backupsets/default.conf -usr/sbin/holland diff --git a/contrib/debian/holland.install b/contrib/debian/holland.install new file mode 100644 index 00000000..625499bc --- /dev/null +++ b/contrib/debian/holland.install @@ -0,0 +1,11 @@ +debian/tmp/usr/lib/python*.*/*-packages/holland-*.egg-info +debian/tmp/usr/lib/python*.*/*-packages/holland/core/ +debian/tmp/usr/lib/python*.*/*-packages/holland/__init__.py +debian/tmp/usr/lib/python*.*/*-packages/holland/lib/__init__.py +debian/tmp/usr/lib/python*.*/*-packages/holland/backup/__init__.py +debian/tmp/usr/lib/python*.*/*-packages/holland/commands/*.py +debian/tmp/usr/bin/holland usr/sbin/ +config/holland.conf etc/holland/ +config/README etc/holland/ +config/providers/README etc/holland/providers/ +config/backupsets/default.conf etc/holland/backupsets/ diff --git a/contrib/debian/patches/100-holland-disable-namespaces.patch b/contrib/debian/patches/100-holland-disable-namespaces.patch new file mode 100644 index 00000000..1c2f96b3 --- /dev/null +++ b/contrib/debian/patches/100-holland-disable-namespaces.patch @@ -0,0 +1,49 @@ +diff --git a/holland/__init__.py b/holland/__init__.py +index b0d6433..792d600 100644 +--- a/holland/__init__.py ++++ b/holland/__init__.py +@@ -1 +1 @@ +-__import__('pkg_resources').declare_namespace(__name__) +\ No newline at end of file ++# +diff --git a/holland/backup/__init__.py b/holland/backup/__init__.py +index b528f0a..792d600 100644 +--- a/holland/backup/__init__.py ++++ b/holland/backup/__init__.py +@@ -1,6 +1 @@ +-try: +- import pkg_resources +- pkg_resources.declare_namespace(__name__) +-except ImportError: +- from pkgutil import extend_path +- __path__ = extend_path(__path__, __name__) ++# +diff --git a/holland/commands/__init__.py b/holland/commands/__init__.py +index de40ea7..792d600 100644 +--- a/holland/commands/__init__.py ++++ b/holland/commands/__init__.py +@@ -1 +1 @@ +-__import__('pkg_resources').declare_namespace(__name__) ++# +diff --git a/holland/lib/__init__.py b/holland/lib/__init__.py +index b528f0a..792d600 100644 +--- a/holland/lib/__init__.py ++++ b/holland/lib/__init__.py +@@ -1,6 +1 @@ +-try: +- import pkg_resources +- pkg_resources.declare_namespace(__name__) +-except ImportError: +- from pkgutil import extend_path +- __path__ = extend_path(__path__, __name__) ++# +diff --git a/setup.py b/setup.py +index 7fe171f..7a41544 100644 +--- a/setup.py ++++ b/setup.py +@@ -37,5 +37,4 @@ setup(name="holland", + purge = holland.commands.purge:Purge + #restore = holland.commands.restore:Restore + """, +- namespace_packages=['holland', 'holland.backup', 'holland.lib', 'holland.commands'], + ) diff --git a/contrib/debian/patches/series b/contrib/debian/patches/series new file mode 100644 index 00000000..59e91d95 --- /dev/null +++ b/contrib/debian/patches/series @@ -0,0 +1 @@ +100-holland-disable-namespaces.patch diff --git a/contrib/debian/pyversions b/contrib/debian/pyversions deleted file mode 100644 index 57a7586e..00000000 --- a/contrib/debian/pyversions +++ /dev/null @@ -1 +0,0 @@ -2.3- diff --git a/contrib/debian/rules b/contrib/debian/rules index a39e9b11..2357f6f4 100755 --- a/contrib/debian/rules +++ b/contrib/debian/rules @@ -1,101 +1,51 @@ #!/usr/bin/make -f -# -*- makefile -*- -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - --include /usr/share/python/python.mk - -PYTHON=python -PLUGINDIR=/usr/share/holland/plugins -SBINDIR=/usr/sbin -HOLLAND_CORE=$(CURDIR) - -configure: configure-stamp -configure-stamp: - dh_testdir - touch configure-stamp - - -build: build-stamp -build-stamp: configure-stamp - dh_testdir - touch $@ - -clean: - dh_testdir - dh_testroot - rm -f build-stamp configure-stamp - - @for ADDON in $(HOLLAND_CORE); \ - do cd $$ADDON ; \ - $(PYTHON) setup.py $(if $(DH_VERBOSE),,-q) clean; \ - done - - @for PLUGIN in $(shell ls -d $(CURDIR)/plugins/*/); \ - do cd $$PLUGIN ; \ - $(PYTHON) setup.py $(if $(DH_VERBOSE),,-q) clean; \ - done - dh_clean - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - cd docs && make text - @for ADDON in $(HOLLAND_CORE); \ - do cd $$ADDON ; \ - $(PYTHON) setup.py $(if $(DH_VERBOSE),,-q) install \ - --no-compile \ - --prefix=/usr \ - --root=$(CURDIR)/debian/tmp \ - --install-scripts=$(SBINDIR) \ - --single-version-externally-managed \ - $(py_setup_install_args); \ - done - - @for PLUGIN in $(shell ls -d $(CURDIR)/plugins/*/); \ - do cd $$PLUGIN ; \ - $(PYTHON) setup.py $(if $(DH_VERBOSE),,-q) install \ - --no-compile \ - --prefix=/usr \ - --root=$(CURDIR)/debian/tmp \ - --install-scripts=$(SBINDIR) \ - --single-version-externally-managed \ - $(py_setup_install_args); \ - done - - mkdir -p $(CURDIR)/debian/tmp/etc/holland - mkdir -p $(CURDIR)/debian/tmp/etc/holland/backupsets - mkdir -p $(CURDIR)/debian/tmp/etc/holland/providers - @for name in $(shell ls $(CURDIR)/config/); \ - do cp -a $(CURDIR)/config/$$name $(CURDIR)/debian/tmp/etc/holland; \ - done -# This should probably be a patch - @sed -i 's/^backupsets = default/backupsets = /g' $(CURDIR)/debian/tmp/etc/holland/holland.conf - -binary-indep: install - dh_testdir - dh_testroot - dh_installchangelogs +export DH_VERBOSE=1 + +%: + dh $@ --with quilt --with sphinxdoc --with python2 --buildsystem=python_distutils + +override_dh_auto_clean: + rm -rf docs/html/ + find -type d \( -name '*.egg-info' -or -name 'build' \) | xargs rm -fr + dh_auto_clean + +override_dh_auto_build: + dh_auto_build + dh_auto_build -Dplugins/holland.lib.common + dh_auto_build -Dplugins/holland.lib.mysql + dh_auto_build -Dplugins/holland.lib.lvm + dh_auto_build -Dplugins/holland.backup.mysqldump + dh_auto_build -Dplugins/holland.backup.mysql_lvm + dh_auto_build -Dplugins/holland.backup.pgdump + dh_auto_build -Dplugins/holland.backup.example + dh_auto_build -Dplugins/holland.backup.xtrabackup + + # Build the HTML documentation. + PYTHONPATH=. sphinx-build -N -q -E -b html docs/source/ docs/html/ + +override_dh_auto_install: + dh_auto_install -O--buildsystem=python_distutils + dh_auto_install -O--buildsystem=python_distutils -Dplugins/holland.lib.common + dh_auto_install -O--buildsystem=python_distutils -Dplugins/holland.lib.mysql + dh_auto_install -O--buildsystem=python_distutils -Dplugins/holland.lib.lvm + dh_auto_install -O--buildsystem=python_distutils -Dplugins/holland.backup.mysqldump + dh_auto_install -O--buildsystem=python_distutils -Dplugins/holland.backup.mysql_lvm + dh_auto_install -O--buildsystem=python_distutils -Dplugins/holland.backup.pgdump + dh_auto_install -O--buildsystem=python_distutils -Dplugins/holland.backup.example + dh_auto_install -O--buildsystem=python_distutils -Dplugins/holland.backup.xtrabackup + find debian/tmp/ \( -name '*.pth' -or -name 'namespace_packages.txt' \) -delete + +override_dh_installdocs: dh_installdocs - dh_installexamples - dh_install - dh_movefiles - dh_installlogrotate -# dh_installcron - dh_installman - dh_pysupport - dh_link - dh_strip - dh_compress - dh_fixperms -X etc/holland/backupsets -X var/log/holland - dh_installdeb - dh_gencontrol - dh_md5sums - dh_builddeb + # Remove embedded copy of libjs-jquery + cd debian/holland/usr/share/doc/holland/html/_static \ + && rm jquery.js \ + && ln -s ../../../../javascript/jquery/jquery.js . + +override_dh_compress: + dh_compress -X.txt -binary: binary-indep -.PHONY: build clean binary install configure +override_dh_python2: + # only build for current python version + dh_python2 -V $(shell pyversions -vd)