[Pkg-ganeti-devel] [ganeti] 26/29: Move all dh templates to debian/templates
Apollon Oikonomopoulos
apoikos at moszumanska.debian.org
Fri Mar 7 10:15:06 UTC 2014
This is an automated email from the git hooks/post-receive script.
apoikos pushed a commit to branch master
in repository ganeti.
commit aa8f08938adae89850bdb23217bf0aa7638f9980
Author: Apollon Oikonomopoulos <apoikos at debian.org>
Date: Fri Mar 7 10:44:52 2014 +0200
Move all dh templates to debian/templates
Also use more standard substitutions (@version@ and @package@) in the
file bodies.
---
debian/ganeti-VER.install | 4 ----
debian/ganeti-VER.prerm | 24 ----------------------
debian/ganeti-haskell-VER.install | 4 ----
debian/ganeti-haskell-VER.lintian-overrides | 8 --------
debian/ganeti-haskell-VER.postinst | 7 -------
debian/ganeti-haskell-VER.prerm | 24 ----------------------
debian/ganeti-haskell-VER.templates | 13 ------------
debian/ganeti-htools-VER.install | 3 ---
debian/ganeti-htools-VER.lintian-overrides | 5 -----
debian/ganeti-htools-VER.postinst | 7 -------
debian/ganeti-htools-VER.prerm | 24 ----------------------
debian/ganeti-htools-VER.templates | 13 ------------
debian/rules | 17 +++++++++++----
debian/templates/ganeti-VER.install | 4 ++++
.../{ => templates}/ganeti-VER.lintian-overrides | 2 +-
debian/templates/ganeti-haskell-VER.install | 4 ++++
.../templates/ganeti-haskell-VER.lintian-overrides | 8 ++++++++
debian/templates/ganeti-htools-VER.install | 3 +++
.../templates/ganeti-htools-VER.lintian-overrides | 5 +++++
.../versioned.postinst} | 0
debian/templates/versioned.prerm | 24 ++++++++++++++++++++++
.../versioned.templates} | 2 +-
22 files changed, 63 insertions(+), 142 deletions(-)
diff --git a/debian/ganeti-VER.install b/debian/ganeti-VER.install
deleted file mode 100644
index 8604f59..0000000
--- a/debian/ganeti-VER.install
+++ /dev/null
@@ -1,4 +0,0 @@
-usr/share/ganeti/VER
-usr/lib/ganeti/VER/usr/lib/ganeti
-usr/lib/ganeti/VER/usr/sbin/ganeti-cleaner
-usr/lib/ganeti/VER/usr/sbin/ganeti-listrunner
diff --git a/debian/ganeti-VER.prerm b/debian/ganeti-VER.prerm
deleted file mode 100644
index a6d526b..0000000
--- a/debian/ganeti-VER.prerm
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-set -e
-
-if [ "$1" = "remove" ]; then
- . /usr/share/debconf/confmodule
-
- if [ /usr/lib/ganeti/default -ef /usr/lib/ganeti/VER ]; then
- db_version 2.0
- db_fset ganeti-VER/abort-removal seen false
- db_subst ganeti-VER/abort-removal version VER
- db_subst ganeti-VER/abort-removal package ganeti-VER
- db_input critical ganeti-VER/abort-removal
- db_go
- db_get ganeti-VER/abort-removal
-
- if [ "$RET" = "true" ]; then
- echo "Aborting removal on user request"
- exit 1;
- fi
- fi
-fi
-
-#DEBHELPER#
diff --git a/debian/ganeti-haskell-VER.install b/debian/ganeti-haskell-VER.install
deleted file mode 100644
index 711d869..0000000
--- a/debian/ganeti-haskell-VER.install
+++ /dev/null
@@ -1,4 +0,0 @@
-usr/lib/ganeti/VER/usr/sbin/ganeti-confd
-usr/lib/ganeti/VER/usr/sbin/ganeti-mond
-usr/lib/ganeti/VER/usr/sbin/ganeti-luxid
-usr/lib/ganeti/VER/usr/lib/ganeti/mon-collector
diff --git a/debian/ganeti-haskell-VER.lintian-overrides b/debian/ganeti-haskell-VER.lintian-overrides
deleted file mode 100644
index d43aa89..0000000
--- a/debian/ganeti-haskell-VER.lintian-overrides
+++ /dev/null
@@ -1,8 +0,0 @@
-ganeti-haskell-VER: hardening-no-fortify-functions usr/lib/ganeti/VER/usr/sbin/ganeti-confd
-ganeti-haskell-VER: hardening-no-fortify-functions usr/lib/ganeti/VER/usr/sbin/ganeti-luxid
-ganeti-haskell-VER: hardening-no-fortify-functions usr/lib/ganeti/VER/usr/sbin/ganeti-mond
-ganeti-haskell-VER: hardening-no-fortify-functions usr/lib/ganeti/VER/usr/lib/ganeti/mon-collector
-
-# We only use debconf during prerm to interactively abort installation of
-# packages that are still in use.
-ganeti-haskell-VER: no-debconf-config
diff --git a/debian/ganeti-haskell-VER.postinst b/debian/ganeti-haskell-VER.postinst
deleted file mode 100644
index 0ae7a18..0000000
--- a/debian/ganeti-haskell-VER.postinst
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-set -e
-
-. /usr/share/debconf/confmodule
-
-#DEBHELPER#
diff --git a/debian/ganeti-haskell-VER.prerm b/debian/ganeti-haskell-VER.prerm
deleted file mode 100644
index a34e406..0000000
--- a/debian/ganeti-haskell-VER.prerm
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-set -e
-
-if [ "$1" = "remove" ]; then
- . /usr/share/debconf/confmodule
-
- if [ /usr/lib/ganeti/default -ef /usr/lib/ganeti/VER ]; then
- db_version 2.0
- db_fset ganeti-haskell-VER/abort-removal seen false
- db_subst ganeti-haskell-VER/abort-removal version VER
- db_subst ganeti-haskell-VER/abort-removal package ganeti-haskell-VER
- db_input critical ganeti-haskell-VER/abort-removal
- db_go
- db_get ganeti-haskell-VER/abort-removal
-
- if [ "$RET" = "true" ]; then
- echo "Aborting removal on user request"
- exit 1;
- fi
- fi
-fi
-
-#DEBHELPER#
diff --git a/debian/ganeti-haskell-VER.templates b/debian/ganeti-haskell-VER.templates
deleted file mode 100644
index dbe9416..0000000
--- a/debian/ganeti-haskell-VER.templates
+++ /dev/null
@@ -1,13 +0,0 @@
-Template: ganeti-haskell-VER/abort-removal
-Type: boolean
-Default: true
-_Description: Abort ${package} removal?
- You are attempting to remove ${package}, but it seems that the running Ganeti
- version is still ${version}.
- .
- This can happen if you upgrade the ganeti package to a new minor version, but
- have not run `gnt-cluster upgrade' yet. Removing ${package} will cause Ganeti to
- stop functioning correctly.
- .
- It is highly recommended to abort removal now and upgrade your cluster before
- removing ${package}.
diff --git a/debian/ganeti-htools-VER.install b/debian/ganeti-htools-VER.install
deleted file mode 100644
index 83501e7..0000000
--- a/debian/ganeti-htools-VER.install
+++ /dev/null
@@ -1,3 +0,0 @@
-usr/lib/ganeti/VER/usr/bin
-usr/share/ganeti/VER/root/usr/share/man/man1/h*
-usr/lib/ganeti/VER/usr/lib/ganeti/iallocators/hail
diff --git a/debian/ganeti-htools-VER.lintian-overrides b/debian/ganeti-htools-VER.lintian-overrides
deleted file mode 100644
index 10ef9d6..0000000
--- a/debian/ganeti-htools-VER.lintian-overrides
+++ /dev/null
@@ -1,5 +0,0 @@
-ganeti-htools-VER: hardening-no-fortify-functions usr/lib/ganeti/VER/usr/bin/htools
-
-# We only use debconf during prerm to interactively abort installation of
-# packages that are still in use.
-ganeti-htools-VER: no-debconf-config
diff --git a/debian/ganeti-htools-VER.postinst b/debian/ganeti-htools-VER.postinst
deleted file mode 100644
index 0ae7a18..0000000
--- a/debian/ganeti-htools-VER.postinst
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-set -e
-
-. /usr/share/debconf/confmodule
-
-#DEBHELPER#
diff --git a/debian/ganeti-htools-VER.prerm b/debian/ganeti-htools-VER.prerm
deleted file mode 100644
index 86e912c..0000000
--- a/debian/ganeti-htools-VER.prerm
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-set -e
-
-if [ "$1" = "remove" ]; then
- . /usr/share/debconf/confmodule
-
- if [ /usr/lib/ganeti/default -ef /usr/lib/ganeti/VER ]; then
- db_version 2.0
- db_fset ganeti-htools-VER/abort-removal seen false
- db_subst ganeti-htools-VER/abort-removal version VER
- db_subst ganeti-htools-VER/abort-removal package ganeti-htools-VER
- db_input critical ganeti-htools-VER/abort-removal
- db_go
- db_get ganeti-htools-VER/abort-removal
-
- if [ "$RET" = "true" ]; then
- echo "Aborting removal on user request"
- exit 1;
- fi
- fi
-fi
-
-#DEBHELPER#
diff --git a/debian/ganeti-htools-VER.templates b/debian/ganeti-htools-VER.templates
deleted file mode 100644
index f6a2794..0000000
--- a/debian/ganeti-htools-VER.templates
+++ /dev/null
@@ -1,13 +0,0 @@
-Template: ganeti-htools-VER/abort-removal
-Type: boolean
-Default: true
-_Description: Abort ${package} removal?
- You are attempting to remove ${package}, but it seems that the running Ganeti
- version is still ${version}.
- .
- This can happen if you upgrade the ganeti package to a new minor version, but
- have not run `gnt-cluster upgrade' yet. Removing ${package} will cause Ganeti to
- stop functioning correctly.
- .
- It is highly recommended to abort removal now and upgrade your cluster before
- removing ${package}.
diff --git a/debian/rules b/debian/rules
index 9f89e54..aadd83d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,12 +14,21 @@ debian/control: debian/control.in vcs-version
sed -s 's/#VER#/$(VER)/g' debian/control.in > debian/control
genfiles:
- for file in debian/*-VER*; do \
- fname="$$(echo $$file | sed 's/VER/$(VER)/')"; \
- sed -e 's/VER/$(VER)/g' $$file >"$$fname"; \
+ for file in debian/templates/*-VER*; do \
+ fname="$$(echo $$file | sed -e 's#VER#$(VER)#' -e 's#templates/##')"; \
+ sed -e 's/@version@/$(VER)/g' $$file >"$$fname"; \
done
-override_dh_auto_configure: genfiles
+ for package in ganeti-haskell-$(VER) ganeti-htools-$(VER) ganeti-$(VER); do \
+ for file in debian/templates/versioned.*; do \
+ kind="$$(echo $$file | sed -r 's#.*\.(.*)#\1#')"; \
+ sed -e "s/@package@/$$package/g" \
+ -e 's/@version@/$(VER)/g' \
+ "$$file" > "debian/$${package}.$${kind}"; \
+ done; \
+ done
+
+override_dh_auto_configure:
./configure \
--prefix=/usr \
--localstatedir=/var \
diff --git a/debian/templates/ganeti-VER.install b/debian/templates/ganeti-VER.install
new file mode 100644
index 0000000..56e6a64
--- /dev/null
+++ b/debian/templates/ganeti-VER.install
@@ -0,0 +1,4 @@
+usr/share/ganeti/@version@
+usr/lib/ganeti/@version@/usr/lib/ganeti
+usr/lib/ganeti/@version@/usr/sbin/ganeti-cleaner
+usr/lib/ganeti/@version@/usr/sbin/ganeti-listrunner
diff --git a/debian/ganeti-VER.lintian-overrides b/debian/templates/ganeti-VER.lintian-overrides
similarity index 75%
rename from debian/ganeti-VER.lintian-overrides
rename to debian/templates/ganeti-VER.lintian-overrides
index 05b1985..7d363ce 100644
--- a/debian/ganeti-VER.lintian-overrides
+++ b/debian/templates/ganeti-VER.lintian-overrides
@@ -1,3 +1,3 @@
# We only use debconf during prerm to interactively abort installation of
# packages that are still in use.
-ganeti-VER: no-debconf-config
+ganeti- at version@: no-debconf-config
diff --git a/debian/templates/ganeti-haskell-VER.install b/debian/templates/ganeti-haskell-VER.install
new file mode 100644
index 0000000..19704f1
--- /dev/null
+++ b/debian/templates/ganeti-haskell-VER.install
@@ -0,0 +1,4 @@
+usr/lib/ganeti/@version@/usr/sbin/ganeti-confd
+usr/lib/ganeti/@version@/usr/sbin/ganeti-mond
+usr/lib/ganeti/@version@/usr/sbin/ganeti-luxid
+usr/lib/ganeti/@version@/usr/lib/ganeti/mon-collector
diff --git a/debian/templates/ganeti-haskell-VER.lintian-overrides b/debian/templates/ganeti-haskell-VER.lintian-overrides
new file mode 100644
index 0000000..a331e4a
--- /dev/null
+++ b/debian/templates/ganeti-haskell-VER.lintian-overrides
@@ -0,0 +1,8 @@
+ganeti-haskell- at version@: hardening-no-fortify-functions usr/lib/ganeti/@version@/usr/sbin/ganeti-confd
+ganeti-haskell- at version@: hardening-no-fortify-functions usr/lib/ganeti/@version@/usr/sbin/ganeti-luxid
+ganeti-haskell- at version@: hardening-no-fortify-functions usr/lib/ganeti/@version@/usr/sbin/ganeti-mond
+ganeti-haskell- at version@: hardening-no-fortify-functions usr/lib/ganeti/@version@/usr/lib/ganeti/mon-collector
+
+# We only use debconf during prerm to interactively abort installation of
+# packages that are still in use.
+ganeti-haskell- at version@: no-debconf-config
diff --git a/debian/templates/ganeti-htools-VER.install b/debian/templates/ganeti-htools-VER.install
new file mode 100644
index 0000000..02e598d
--- /dev/null
+++ b/debian/templates/ganeti-htools-VER.install
@@ -0,0 +1,3 @@
+usr/lib/ganeti/@version@/usr/bin
+usr/share/ganeti/@version@/root/usr/share/man/man1/h*
+usr/lib/ganeti/@version@/usr/lib/ganeti/iallocators/hail
diff --git a/debian/templates/ganeti-htools-VER.lintian-overrides b/debian/templates/ganeti-htools-VER.lintian-overrides
new file mode 100644
index 0000000..32bc985
--- /dev/null
+++ b/debian/templates/ganeti-htools-VER.lintian-overrides
@@ -0,0 +1,5 @@
+ganeti-htools- at version@: hardening-no-fortify-functions usr/lib/ganeti/@version@/usr/bin/htools
+
+# We only use debconf during prerm to interactively abort installation of
+# packages that are still in use.
+ganeti-htools- at version@: no-debconf-config
diff --git a/debian/ganeti-VER.postinst b/debian/templates/versioned.postinst
similarity index 100%
rename from debian/ganeti-VER.postinst
rename to debian/templates/versioned.postinst
diff --git a/debian/templates/versioned.prerm b/debian/templates/versioned.prerm
new file mode 100644
index 0000000..a1ea429
--- /dev/null
+++ b/debian/templates/versioned.prerm
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "remove" ]; then
+ . /usr/share/debconf/confmodule
+
+ if [ /usr/lib/ganeti/default -ef /usr/lib/ganeti/@version@ ]; then
+ db_version 2.0
+ db_fset @package@/abort-removal seen false
+ db_subst @package@/abort-removal version @version@
+ db_subst @package@/abort-removal package @package@
+ db_input critical @package@/abort-removal
+ db_go
+ db_get @package@/abort-removal
+
+ if [ "$RET" = "true" ]; then
+ echo "Aborting removal on user request"
+ exit 1;
+ fi
+ fi
+fi
+
+#DEBHELPER#
diff --git a/debian/ganeti-VER.templates b/debian/templates/versioned.templates
similarity index 93%
rename from debian/ganeti-VER.templates
rename to debian/templates/versioned.templates
index 837a15e..a511dae 100644
--- a/debian/ganeti-VER.templates
+++ b/debian/templates/versioned.templates
@@ -1,4 +1,4 @@
-Template: ganeti-VER/abort-removal
+Template: @package@/abort-removal
Type: boolean
Default: true
_Description: Abort ${package} removal?
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ganeti/ganeti.git
More information about the Pkg-ganeti-devel
mailing list