[Pkg-ganeti-devel] [SCM] Ganeti packaging branch, for-review, updated. debian/2.7.0-1-25-gebccd83

Apollon Oikonomopoulos apoikos at gmail.com
Tue Jul 16 09:39:40 UTC 2013


The following commit has been merged in the for-review branch:
commit ebccd839ab595d80b6d68de9c592fd2277fe9231
Author: Apollon Oikonomopoulos <apoikos at gmail.com>
Date:   Tue Jul 16 12:17:46 2013 +0300

    Change the private module dir to /usr/lib/ganeti
    
    There is no reason to ship one more directory (/usr/share/ganeti2) since we
    have /usr/lib/ganeti already.
    
    The original motivation for using /usr/share/ganeti2 is that it's automatically
    checked by dh_python2, but this should be no excuse for making the package ugly :)

diff --git a/debian/NEWS b/debian/NEWS
index 63191c7..b297a12 100644
--- a/debian/NEWS
+++ b/debian/NEWS
@@ -4,7 +4,7 @@ ganeti2 (2.7.0-2) unstable; urgency=low
   module. This is done because the Ganeti internal APIs are not guaranteed to
   be stable and direct use by 3rd-party applications is discouraged. Thus, any
   3rd-party programs importing Ganeti's Python code, should now live under
-  /usr/share/ganeti2 or include /usr/share/ganeti2 in Python's sys.path.
+  /usr/lib/ganeti or include /usr/lib/ganeti in Python's sys.path.
 
   The RAPI client library, being the only stable external API, is now shipped
   as a public module in its own package, python-ganeti-rapi.
diff --git a/debian/changelog b/debian/changelog
index e6a3c4f..29cf87d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,7 +6,7 @@ ganeti (2.7.0-2) UNRELEASED; urgency=low
     - Switch from dh_pysupport to dh_python2
     - Run the upstream test suite during build
   * Ship the majority of the Python code in a private module under
-    /usr/share/ganeti2
+    /usr/lib/ganeti
   * Ship the RAPI client as a separate package (python-ganeti-rapi)
   * Ship the HTML documentation as ganeti2-doc
     - Depend on libjs-underscore instead of embedding a copy
diff --git a/debian/ganeti2.dirs b/debian/ganeti2.dirs
index c1ba56e..6ddc405 100644
--- a/debian/ganeti2.dirs
+++ b/debian/ganeti2.dirs
@@ -1,5 +1,5 @@
 etc/ganeti
 etc/bash_completion.d
+usr/lib/ganeti
 usr/lib/ganeti/iallocators
 usr/share/lintian/overrides
-usr/share/ganeti2
diff --git a/debian/rules b/debian/rules
index be2b7ed..cd97e5b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,7 +10,7 @@ GANETI_DIR=$(CURDIR)/debian/ganeti2
 HTOOLS_DIR=$(CURDIR)/debian/ganeti-htools
 HASKELL_DIR=$(CURDIR)/debian/ganeti-haskell
 RAPI_DIR=$(CURDIR)/debian/python-ganeti-rapi
-PRIVATE_DIR=$(GANETI_DIR)/usr/share/ganeti2
+PRIVATE_DIR=$(GANETI_DIR)/usr/lib/ganeti
 
 %:
 	dh $@ --with python2
@@ -69,22 +69,17 @@ override_dh_auto_install:
 	mv $(GANETI_DIR)/usr/share/man/man7/mon-collector.7 $(HASKELL_DIR)/usr/share/man/man7/
 
 	# move the python libraries to the private module path
-	mv $(GANETI_DIR)/usr/lib/$$(pyversions -d)/dist-packages/ganeti $(GANETI_DIR)/usr/share/ganeti2/
+	mv $(GANETI_DIR)/usr/lib/$$(pyversions -d)/dist-packages/ganeti $(PRIVATE_DIR)
 	rm -rf $(GANETI_DIR)/usr/lib/$$(pyversions -d)
 	for file in $(GANETI_DIR)/usr/sbin/*; do \
 	  mv $$file $(PRIVATE_DIR); \
-	  ln -s ../share/ganeti2/$$(basename $$file) $$file; \
+	  ln -s ../lib/ganeti/$$(basename $$file) $$file; \
 	done
 
 	# ditto for all python tools needing internal APIs
 	for file in burnin cfgshell cfgupgrade cfgupgrade12 cluster-merge confd-client lvmstrap move-instance ovfconverter sanitize-config; do \
 	  mv $(GANETI_DIR)/usr/lib/ganeti/tools/$$file $(PRIVATE_DIR); \
-	  ln -s ../../../share/ganeti2/$$file $(GANETI_DIR)/usr/lib/ganeti/tools/$$file; \
-	done
-
-	for file in check-cert-expired ensure-dirs import-export node-daemon-setup prepare-node-join; do \
-	  mv $(GANETI_DIR)/usr/lib/ganeti/$$file $(PRIVATE_DIR); \
-	  ln -s ../../share/ganeti2/$$file $(GANETI_DIR)/usr/lib/ganeti/$$file; \
+	  ln -s ../$$file $(PRIVATE_DIR)/tools/$$file; \
 	done
 
 	# ship the RAPI client as a stand-alone package
@@ -97,3 +92,7 @@ override_dh_installinit:
 
 override_dh_installcron:
 	dh_installcron --name=ganeti -i
+
+override_dh_python2:
+	dh_python2
+	dh_python2 /usr/lib/ganeti

-- 
Ganeti packaging



More information about the Pkg-ganeti-devel mailing list