[Pkg-libvirt-commits] [libguestfs] 43/165: virt-p2v: Install the binary in libexecdir.
Hilko Bengen
bengen at moszumanska.debian.org
Sat Aug 30 08:24:24 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch experimental
in repository libguestfs.
commit a09146386ce14e8899b8816894afe83f78604480
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Fri May 16 08:45:47 2014 +0100
virt-p2v: Install the binary in libexecdir.
Previously it wasn't installed at all. However it makes sense to
install it somewhere so that it can be placed in a package (a
requirement if we're going to create a kickstart). By placing it in
libexecdir it is hopefully clear that it should not be used.
Note on Red Hat distros, libexecdir is usually /usr/libexec. On
Debian it is usually /usr/lib/libguestfs.
---
.gitignore | 1 +
p2v-iso/Makefile.am | 11 +++++++++--
p2v-iso/{launch-virt-p2v => launch-virt-p2v.in} | 3 ++-
p2v-iso/virt-builder-target.sh.in | 14 ++++++++++----
p2v/Makefile.am | 9 +++++----
5 files changed, 27 insertions(+), 11 deletions(-)
diff --git a/.gitignore b/.gitignore
index a0b1590..32b9503 100644
--- a/.gitignore
+++ b/.gitignore
@@ -318,6 +318,7 @@ Makefile.in
/p2v/stamp-virt-p2v.pod
/p2v/virt-p2v
/p2v/virt-p2v.1
+/p2v-iso/launch-virt-p2v
/p2v-iso/virt-builder-target.sh
/perl/bindtests.pl
/perl/blib
diff --git a/p2v-iso/Makefile.am b/p2v-iso/Makefile.am
index c825aba..9e3c636 100644
--- a/p2v-iso/Makefile.am
+++ b/p2v-iso/Makefile.am
@@ -20,11 +20,18 @@ include $(top_srcdir)/subdir-rules.mk
EXTRA_DIST = \
README \
issue \
- launch-virt-p2v \
+ launch-virt-p2v.in \
p2v.service \
virt-builder-target.sh.in
# You need to read the README file before trying any of these targets.
-virt-builder-target: virt-builder-target.sh
+virt-builder-target: virt-builder-target.sh launch-virt-p2v
srcdir=$(srcdir) $(top_builddir)/run ./virt-builder-target.sh
+
+# Deal with stupid autotools libexecdir-not-expandable crap.
+launch-virt-p2v: launch-virt-p2v.in
+ rm -f $@ $@-t
+ sed 's,@''libexecdir@,$(libexecdir),g' < $< > $@-t
+ chmod 0555 $@-t
+ mv $@-t $@
diff --git a/p2v-iso/launch-virt-p2v b/p2v-iso/launch-virt-p2v.in
similarity index 94%
rename from p2v-iso/launch-virt-p2v
rename to p2v-iso/launch-virt-p2v.in
index 06675a0..36a4502 100755
--- a/p2v-iso/launch-virt-p2v
+++ b/p2v-iso/launch-virt-p2v.in
@@ -1,4 +1,5 @@
#!/bin/bash -
+# @configure_input@
# (C) Copyright 2014 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -18,4 +19,4 @@
# This normally runs from systemd which deals with logging.
cd /
-xinit /usr/bin/virt-p2v
+xinit @libexecdir@/virt-p2v
diff --git a/p2v-iso/virt-builder-target.sh.in b/p2v-iso/virt-builder-target.sh.in
index 70cf5da..dbfce4d 100644
--- a/p2v-iso/virt-builder-target.sh.in
+++ b/p2v-iso/virt-builder-target.sh.in
@@ -62,6 +62,11 @@ case "@DISTRO@" in
exit 1
esac
+# Deal with stupid autotools libexecdir-not-expandable crap.
+prefix="@prefix@"
+exec_prefix="@exec_prefix@"
+libexecdir="@libexecdir@"
+
# Run virt-builder. Note we controversially assume systemd here. We
# could provide a sysvinit fallback if required.
virt-builder "$OSVERSION" \
@@ -69,10 +74,11 @@ virt-builder "$OSVERSION" \
--update \
--install $deps \
--root-password password:p2v \
- --upload $srcdir/issue:/etc/issue \
- --upload $srcdir/issue:/etc/issue.net \
- --upload ../p2v/virt-p2v:/usr/bin/ \
- --upload $srcdir/launch-virt-p2v:/usr/bin/ \
+ --upload "$srcdir"/issue:/etc/issue \
+ --upload "$srcdir"/issue:/etc/issue.net \
+ --mkdir "$libexecdir" \
+ --upload ../p2v/virt-p2v:"$libexecdir" \
+ --upload "$srcdir"/launch-virt-p2v:/usr/bin/ \
--upload p2v.service:/etc/systemd/system/ \
--mkdir /etc/systemd/system/default.target.wants \
--link /etc/systemd/system/p2v.service:/etc/systemd/system/default.target.wants/p2v.service \
diff --git a/p2v/Makefile.am b/p2v/Makefile.am
index e57b571..9db0de3 100644
--- a/p2v/Makefile.am
+++ b/p2v/Makefile.am
@@ -23,10 +23,11 @@ EXTRA_DIST = \
CLEANFILES = stamp-virt-p2v.pod
# Although virt-p2v is a regular binary, it is not usually installed
-# since it only functions when contained in an ISO or PXE image which
-# is used to boot the physical machine (since otherwise virt-p2v would
-# not be able to get a consistent snapshot of the physical disks).
-noinst_PROGRAMS = virt-p2v
+# in /usr/bin since it only functions when contained in an ISO or PXE
+# image which is used to boot the physical machine (since otherwise
+# virt-p2v would not be able to get a consistent snapshot of the
+# physical disks).
+libexec_PROGRAMS = virt-p2v
# Note that miniexpect comes from here:
# http://git.annexia.org/?p=miniexpect.git;a=summary
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list