[Pkg-ganeti-devel] [SCM] Ganeti packaging branch, master, updated. debian/2.7.0-1-31-g53f0717

Apollon Oikonomopoulos apoikos at gmail.com
Wed Jul 17 20:44:11 UTC 2013


The following commit has been merged in the master branch:
commit ec02cfe43e8cac80585e3de967698cb804bae6ee
Author: Apollon Oikonomopoulos <apoikos at gmail.com>
Date:   Tue Jul 16 14:48:05 2013 +0300

    Migrate to dh_install
    
    Remove as much of the logic as possible from debian/rules and migrate to
    dh_install.
    
    The whole application is now installed under debian/tmp, and everything has to
    be copied to the respective packages.

diff --git a/debian/ganeti-haskell.install b/debian/ganeti-haskell.install
new file mode 100644
index 0000000..2778e19
--- /dev/null
+++ b/debian/ganeti-haskell.install
@@ -0,0 +1 @@
+usr/share/man/man7/mon-collector.7
diff --git a/debian/ganeti-htools.install b/debian/ganeti-htools.install
new file mode 100644
index 0000000..25b25e6
--- /dev/null
+++ b/debian/ganeti-htools.install
@@ -0,0 +1,2 @@
+usr/bin/h*
+usr/share/man/man1/h*.1
diff --git a/debian/ganeti.dirs b/debian/ganeti.dirs
index 6ddc405..b7381c3 100644
--- a/debian/ganeti.dirs
+++ b/debian/ganeti.dirs
@@ -3,3 +3,5 @@ etc/bash_completion.d
 usr/lib/ganeti
 usr/lib/ganeti/iallocators
 usr/share/lintian/overrides
+var/lib/ganeti
+var/log/ganeti
diff --git a/debian/ganeti.install b/debian/ganeti.install
new file mode 100644
index 0000000..410d254
--- /dev/null
+++ b/debian/ganeti.install
@@ -0,0 +1,21 @@
+usr/share/man/man7/ganeti*
+usr/share/man/man8/gnt-*
+usr/share/man/man8/ganeti-*
+
+usr/lib/ganeti/
+
+usr/lib/python*/dist-packages/ganeti	/usr/lib/ganeti
+usr/sbin/gnt-*				/usr/lib/ganeti
+usr/sbin/ganeti-*			/usr/lib/ganeti
+
+usr/lib/ganeti/tools/burnin		/usr/lib/ganeti
+usr/lib/ganeti/tools/cfgshell		/usr/lib/ganeti
+usr/lib/ganeti/tools/cfgupgrade		/usr/lib/ganeti
+usr/lib/ganeti/tools/cfgupgrade12	/usr/lib/ganeti
+usr/lib/ganeti/tools/cluster-merge	/usr/lib/ganeti
+usr/lib/ganeti/tools/confd-client	/usr/lib/ganeti
+usr/lib/ganeti/tools/lvmstrap		/usr/lib/ganeti
+usr/lib/ganeti/tools/move-instance	/usr/lib/ganeti
+usr/lib/ganeti/tools/node-cleanup	/usr/lib/ganeti
+usr/lib/ganeti/tools/ovfconverter	/usr/lib/ganeti
+usr/lib/ganeti/tools/sanitize-config	/usr/lib/ganeti
diff --git a/debian/ganeti.links b/debian/ganeti.links
new file mode 100644
index 0000000..5400eb9
--- /dev/null
+++ b/debian/ganeti.links
@@ -0,0 +1,28 @@
+usr/lib/ganeti/gnt-debug usr/sbin/gnt-debug
+usr/lib/ganeti/gnt-job usr/sbin/gnt-job
+usr/lib/ganeti/gnt-os usr/sbin/gnt-os
+usr/lib/ganeti/ganeti-noded usr/sbin/ganeti-noded
+usr/lib/ganeti/gnt-instance usr/sbin/gnt-instance
+usr/lib/ganeti/ganeti-cleaner usr/sbin/ganeti-cleaner
+usr/lib/ganeti/gnt-cluster usr/sbin/gnt-cluster
+usr/lib/ganeti/gnt-node usr/sbin/gnt-node
+usr/lib/ganeti/ganeti-watcher usr/sbin/ganeti-watcher
+usr/lib/ganeti/ganeti-rapi usr/sbin/ganeti-rapi
+usr/lib/ganeti/ganeti-listrunner usr/sbin/ganeti-listrunner
+usr/lib/ganeti/ganeti-masterd usr/sbin/ganeti-masterd
+usr/lib/ganeti/gnt-network usr/sbin/gnt-network
+usr/lib/ganeti/gnt-backup usr/sbin/gnt-backup
+usr/lib/ganeti/gnt-group usr/sbin/gnt-group
+usr/lib/ganeti/gnt-storage usr/sbin/gnt-storage
+
+usr/lib/ganeti/burnin usr/lib/ganeti/tools/burnin
+usr/lib/ganeti/cfgshell usr/lib/ganeti/tools/cfgshell
+usr/lib/ganeti/cfgupgrade usr/lib/ganeti/tools/cfgupgrade
+usr/lib/ganeti/cfgupgrade12 usr/lib/ganeti/tools/cfgupgrade12
+usr/lib/ganeti/cluster-merge usr/lib/ganeti/tools/cluster-merge
+usr/lib/ganeti/confd-client usr/lib/ganeti/tools/confd-client
+usr/lib/ganeti/lvmstrap usr/lib/ganeti/tools/lvmstrap
+usr/lib/ganeti/move-instance usr/lib/ganeti/tools/move-instance
+usr/lib/ganeti/node-cleanup usr/lib/ganeti/tools/node-cleanup
+usr/lib/ganeti/ovfconverter usr/lib/ganeti/tools/ovfconverter
+usr/lib/ganeti/sanitize-config usr/lib/ganeti/tools/sanitize-config
diff --git a/debian/python-ganeti-rapi.dirs b/debian/python-ganeti-rapi.dirs
new file mode 100644
index 0000000..d64a5be
--- /dev/null
+++ b/debian/python-ganeti-rapi.dirs
@@ -0,0 +1 @@
+/usr/share/pyshared/ganeti/rapi
diff --git a/debian/python-ganeti-rapi.install b/debian/python-ganeti-rapi.install
new file mode 100644
index 0000000..2f53b18
--- /dev/null
+++ b/debian/python-ganeti-rapi.install
@@ -0,0 +1 @@
+usr/lib/python*/dist-packages/ganeti/rapi/client.py usr/share/pyshared/ganeti/rapi
diff --git a/debian/rules b/debian/rules
index 25e3138..bb12ceb 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,12 +6,6 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-GANETI_DIR=$(CURDIR)/debian/ganeti
-HTOOLS_DIR=$(CURDIR)/debian/ganeti-htools
-HASKELL_DIR=$(CURDIR)/debian/ganeti-haskell
-RAPI_DIR=$(CURDIR)/debian/python-ganeti-rapi
-PRIVATE_DIR=$(GANETI_DIR)/usr/lib/ganeti
-
 %:
 	dh $@ --with python2
 
@@ -38,52 +32,25 @@ override_dh_auto_clean:
 	dh_auto_clean
 
 override_dh_auto_install:
-	$(MAKE) install DESTDIR=$(GANETI_DIR)
+	dh_auto_install
 	cp $(CURDIR)/doc/examples/ganeti.initd $(CURDIR)/debian/ganeti.init
 	cp $(CURDIR)/doc/examples/ganeti.cron $(CURDIR)/debian/ganeti.cron.d
 	cp $(CURDIR)/doc/examples/ganeti.default $(CURDIR)/debian/ganeti.default
-
 	install -m 0644 $(CURDIR)/doc/examples/bash_completion \
-	  $(GANETI_DIR)/etc/bash_completion.d/ganeti
-
-	rmdir $(GANETI_DIR)/var/run/ganeti
-	rmdir $(GANETI_DIR)/var/run
-
-	# htools
-	mv $(GANETI_DIR)/usr/bin $(HTOOLS_DIR)/usr/
-	mv $(GANETI_DIR)/usr/lib/ganeti/iallocators/hail \
-	   $(HTOOLS_DIR)/usr/lib/ganeti/iallocators/
-
-	for i in htools hail hbal hscan hspace hcheck hinfo hroller; do \
-	  mv $(GANETI_DIR)/usr/share/man/man1/$${i}.1 \
-	     $(HTOOLS_DIR)/usr/share/man/man1/ ; \
-	done
-	rmdir $(GANETI_DIR)/usr/share/man/man1
-
-        # haskell package
-	mv $(GANETI_DIR)/usr/sbin/ganeti-confd $(HASKELL_DIR)/usr/sbin/
-	mv $(GANETI_DIR)/usr/lib/ganeti/mon-collector $(HASKELL_DIR)/usr/lib/ganeti/
-	mv $(GANETI_DIR)/usr/share/man/man8/ganeti-confd.8 $(HASKELL_DIR)/usr/share/man/man8/
-	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 $(PRIVATE_DIR)
-	rm -rf $(GANETI_DIR)/usr/lib/$$(pyversions -d)
-	for file in $(GANETI_DIR)/usr/sbin/*; do \
-	  mv $$file $(PRIVATE_DIR); \
-	  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 ../$$file $(PRIVATE_DIR)/tools/$$file; \
-	done
-
-	# ship the RAPI client as a stand-alone package
-	install -Dp -m 0644 $(PRIVATE_DIR)/ganeti/rapi/client.py $(RAPI_DIR)/usr/share/pyshared/ganeti/rapi/client.py
-	touch $(RAPI_DIR)/usr/share/pyshared/ganeti/__init__.py
-	touch $(RAPI_DIR)/usr/share/pyshared/ganeti/rapi/__init__.py
+	   $(CURDIR)/debian/ganeti/etc/bash_completion.d/ganeti
+	
+	# Hack to make our life a bit easier and be able to use wildcards in .install files
+	mv $(CURDIR)/debian/tmp/usr/lib/ganeti/mon-collector $(CURDIR)/debian/ganeti-haskell/usr/lib/ganeti
+	mv $(CURDIR)/debian/tmp/usr/sbin/ganeti-confd $(CURDIR)/debian/ganeti-haskell/usr/sbin
+	mv $(CURDIR)/debian/tmp/usr/share/man/man8/ganeti-confd.8 \
+	   $(CURDIR)/debian/ganeti-haskell/usr/share/man/man8/
+
+	mv $(CURDIR)/debian/tmp/usr/lib/ganeti/iallocators/hail \
+	   $(CURDIR)/debian/ganeti-htools/usr/lib/ganeti/iallocators
+
+	# Dummy Python module for the RAPI client
+	touch $(CURDIR)/debian/python-ganeti-rapi/usr/share/pyshared/ganeti/__init__.py
+	touch $(CURDIR)/debian/python-ganeti-rapi/usr/share/pyshared/ganeti/rapi/__init__.py
 
 override_dh_installinit:
 	dh_installinit --error-handler=true -i -- defaults 20 80

-- 
Ganeti packaging



More information about the Pkg-ganeti-devel mailing list