Gentoo Archives: gentoo-commits

From: Patrick McLean <chutzpah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/ganeti-instance-image/, app-emulation/ganeti-instance-image/files/
Date: Sat, 08 Sep 2018 00:29:20
Message-Id: 1536366544.0d5f74dae35cfefae3c75c5c12878c09d784555c.chutzpah@gentoo
1 commit: 0d5f74dae35cfefae3c75c5c12878c09d784555c
2 Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 8 00:26:05 2018 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 8 00:29:04 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d5f74da
7
8 app-emulation/ganeti-instance-image: Revision bump, add patch to fix with new lvm2
9
10 Package-Manager: Portage-2.3.49, Repoman-2.3.10
11
12 .../files/ganeti-2.15.2-os-image-common_sh.patch | 43 ++++++++++++++++++
13 .../ganeti-instance-image-0.6-r1.ebuild | 52 ++++++++++++++++++++++
14 2 files changed, 95 insertions(+)
15
16 diff --git a/app-emulation/ganeti-instance-image/files/ganeti-2.15.2-os-image-common_sh.patch b/app-emulation/ganeti-instance-image/files/ganeti-2.15.2-os-image-common_sh.patch
17 new file mode 100644
18 index 00000000000..73e7ab8a923
19 --- /dev/null
20 +++ b/app-emulation/ganeti-instance-image/files/ganeti-2.15.2-os-image-common_sh.patch
21 @@ -0,0 +1,43 @@
22 +--- a/common.sh.in 2018-09-05 23:23:07.811528673 +0000
23 ++++ b/common.sh.in 2018-09-06 00:10:36.993693654 +0000
24 +@@ -284,13 +284,13 @@
25 + blockdev="$1"
26 + filesystem_dev_base=`$KPARTX -l -p- $blockdev | \
27 + grep -m 1 -- "-1.*$blockdev" | \
28 +- $AWK '{print $1}'`
29 ++ $AWK '{print $1}' | sed -r -e 's/-([0-9]{1,2})$/p\1/g'`
30 + if [ -z "$filesystem_dev_base" ]; then
31 + log_error "Cannot interpret kpartx output and get partition mapping"
32 + exit 1
33 + fi
34 + $KPARTX -a -p- $blockdev > /dev/null
35 +- filesystem_dev="/dev/mapper/${filesystem_dev_base/%-1/}"
36 ++ filesystem_dev="/dev/mapper/${filesystem_dev_base/%p1/}"
37 + if [ ! -b "/dev/mapper/$filesystem_dev_base" ]; then
38 + log_error "Can't find kpartx mapped partition: /dev/mapper/$filesystem_dev_base"
39 + exit 1
40 +@@ -302,17 +302,17 @@
41 + filesystem_dev="$1"
42 + partition="$2"
43 + if [ "${SWAP}" = "yes" -a -z "${KERNEL_PATH}" ] ; then
44 +- boot_dev="${filesystem_dev}-1"
45 +- swap_dev="${filesystem_dev}-2"
46 +- root_dev="${filesystem_dev}-3"
47 ++ boot_dev="${filesystem_dev}p1"
48 ++ swap_dev="${filesystem_dev}p2"
49 ++ root_dev="${filesystem_dev}p3"
50 + elif [ "${SWAP}" = "no" -a -z "${KERNEL_PATH}" ] ; then
51 +- boot_dev="${filesystem_dev}-1"
52 +- root_dev="${filesystem_dev}-2"
53 ++ boot_dev="${filesystem_dev}p1"
54 ++ root_dev="${filesystem_dev}p2"
55 + elif [ "${SWAP}" = "yes" -a -n "${KERNEL_PATH}" ] ; then
56 +- swap_dev="${filesystem_dev}-1"
57 ++ swap_dev="${filesystem_dev}p1"
58 + root_dev="${filesystem_dev}-2"
59 + elif [ "${SWAP}" = "no" -a -n "${KERNEL_PATH}" ] ; then
60 +- root_dev="${filesystem_dev}-1"
61 ++ root_dev="${filesystem_dev}p1"
62 + fi
63 + echo "$(eval "echo \${$(echo ${partition}_dev)"})"
64 + }
65
66 diff --git a/app-emulation/ganeti-instance-image/ganeti-instance-image-0.6-r1.ebuild b/app-emulation/ganeti-instance-image/ganeti-instance-image-0.6-r1.ebuild
67 new file mode 100644
68 index 00000000000..6d10cc0ad0d
69 --- /dev/null
70 +++ b/app-emulation/ganeti-instance-image/ganeti-instance-image-0.6-r1.ebuild
71 @@ -0,0 +1,52 @@
72 +# Copyright 1999-2018 Gentoo Foundation
73 +# Distributed under the terms of the GNU General Public License v2
74 +
75 +EAPI=7
76 +
77 +if [[ ${PV} == "9999" ]]; then
78 + EGIT_REPO_URI="git://git.osuosl.org/${PN}.git"
79 + EGIT_BRANCH="master"
80 + inherit git-r3 autotools
81 +else
82 + SRC_URI="http://ftp.osuosl.org/pub/osl/ganeti-instance-image/${P}.tar.gz"
83 +fi
84 +
85 +DESCRIPTION="Scripts to build out CD or image based VMs using Ganeti"
86 +HOMEPAGE="http://code.osuosl.org/projects/ganeti-image"
87 +
88 +LICENSE="GPL-2"
89 +SLOT="0"
90 +KEYWORDS="~amd64 ~x86"
91 +IUSE=""
92 +
93 +DEPEND=""
94 +RDEPEND="app-arch/dump
95 + >=app-emulation/ganeti-2.15.2-r7
96 + app-emulation/qemu
97 + sys-apps/util-linux
98 + sys-fs/multipath-tools
99 + sys-fs/e2fsprogs"
100 +
101 +PATCHES=(
102 + "${FILESDIR}/ganeti-2.15.2-os-image-common_sh.patch"
103 +)
104 +
105 +src_prepare() {
106 + default
107 + if [[ ${PV} == "9999" ]]; then
108 + eautoreconf
109 + fi
110 +}
111 +
112 +src_configure() {
113 + econf --with-default-dir=/etc/ganeti
114 +}
115 +
116 +src_install() {
117 + emake DESTDIR="${D}" install || die "install failed"
118 +
119 + rm -rf "${D}"/usr/share/doc/${PN}
120 + dodoc README.markdown NEWS ChangeLog
121 + insinto /etc/ganeti
122 + newins defaults ${PN}
123 +}