1 |
commit: c541f97435478b52bc632eeddd8c8911811cc838 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Aug 25 23:42:07 2018 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Aug 26 00:06:42 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c541f974 |
7 |
|
8 |
app-emulation/containers-storage: add btrfs dep (bug 664574) |
9 |
|
10 |
Add btrfs USE flag, and also a device-mapper USE flag. |
11 |
Use GOCACHE=off to hopefully avoid the reported /root/cache |
12 |
sandbox violation. |
13 |
|
14 |
Reported-by: Toralf Förster <toralf <AT> gentoo.org> |
15 |
Closes: https://bugs.gentoo.org/664574 |
16 |
Package-Manager: Portage-2.3.48, Repoman-2.3.10 |
17 |
|
18 |
.../containers-storage-0_pre20180730.ebuild | 28 +++++++++++++++------- |
19 |
app-emulation/containers-storage/metadata.xml | 8 +++++++ |
20 |
2 files changed, 28 insertions(+), 8 deletions(-) |
21 |
|
22 |
diff --git a/app-emulation/containers-storage/containers-storage-0_pre20180730.ebuild b/app-emulation/containers-storage/containers-storage-0_pre20180730.ebuild |
23 |
index ab4de85d15b..cd2ef64ffa5 100644 |
24 |
--- a/app-emulation/containers-storage/containers-storage-0_pre20180730.ebuild |
25 |
+++ b/app-emulation/containers-storage/containers-storage-0_pre20180730.ebuild |
26 |
@@ -14,19 +14,25 @@ DESCRIPTION="containers/storage library" |
27 |
HOMEPAGE="https://github.com/containers/storage" |
28 |
LICENSE="Apache-2.0" |
29 |
SLOT="0" |
30 |
-IUSE="ostree test" |
31 |
+IUSE="btrfs +device-mapper ostree test" |
32 |
EGO_PN="${HOMEPAGE#*//}" |
33 |
EGIT_COMMIT="17c7d1fee5603ccf6dd97edc14162fc1510e7e23" |
34 |
SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz |
35 |
${EGO_VENDOR_URI}" |
36 |
-RDEPEND="sys-fs/lvm2:= |
37 |
+RDEPEND=" |
38 |
+ btrfs? ( sys-fs/btrfs-progs ) |
39 |
+ device-mapper? ( sys-fs/lvm2:= ) |
40 |
ostree? ( |
41 |
dev-libs/glib:= |
42 |
dev-util/ostree:= |
43 |
)" |
44 |
DEPEND="${RDEPEND} |
45 |
dev-go/go-md2man |
46 |
- test? ( sys-apps/util-linux )" |
47 |
+ test? ( |
48 |
+ sys-fs/btrfs-progs |
49 |
+ sys-fs/lvm2 |
50 |
+ sys-apps/util-linux |
51 |
+ )" |
52 |
RESTRICT="test? ( userpriv ) !test? ( test )" |
53 |
|
54 |
src_unpack() { |
55 |
@@ -36,6 +42,14 @@ src_unpack() { |
56 |
src_prepare() { |
57 |
default |
58 |
|
59 |
+ [[ -f ${S}/src/${EGO_PN}/hack/btrfs_tag.sh ]] || die |
60 |
+ use btrfs || { echo -e "#!/bin/sh\necho btrfs_noversion exclude_graphdriver_btrfs" > \ |
61 |
+ "${S}/src/${EGO_PN}/hack/btrfs_tag.sh" || die; } |
62 |
+ |
63 |
+ [[ -f ${S}/src/${EGO_PN}/hack/libdm_tag.sh ]] || die |
64 |
+ use device-mapper || { echo -e "#!/bin/sh\necho btrfs_noversion exclude_graphdriver_devicemapper" > \ |
65 |
+ "${S}/src/${EGO_PN}/hack/libdm_tag.sh" || die; } |
66 |
+ |
67 |
[[ -f ${S}/src/${EGO_PN}/hack/ostree_tag.sh ]] || die |
68 |
use ostree || { echo -e "#!/bin/sh\ntrue" > \ |
69 |
"${S}/src/${EGO_PN}/hack/ostree_tag.sh" || die; } |
70 |
@@ -65,8 +79,6 @@ src_prepare() { |
71 |
-e 's:TestCopyCaseH(:_\0:' \ |
72 |
-e 's:TestCopyCaseHFSym(:_\0:' \ |
73 |
-e 's:TestCopyCaseJ(:_\0:' \ |
74 |
- -e 's:TestCopyCaseEFSym(:_\0:' \ |
75 |
- -e 's:TestCopyCaseG(:_\0:' \ |
76 |
-e 's:TestCopyCaseJFSym(:_\0:' \ |
77 |
-i "${S}/src/${EGO_PN}/pkg/archive/copy_unix_test.go" || die |
78 |
sed -e 's:TestMount(:_\0:' \ |
79 |
@@ -78,9 +90,9 @@ src_compile() { |
80 |
ln -s "${S}/src/${EGO_PN}/vendor/github.com/pquerna/ffjson" "${WORKDIR}/${P}/src/github.com/pquerna/ffjson" || die |
81 |
mkdir -p "${S}/bin" || die |
82 |
cd "${S}/bin" || die |
83 |
- GOPATH="${S}" GOBIN="${S}/bin" \ |
84 |
+ GOPATH="${S}" GOBIN="${S}/bin" GOCACHE=off \ |
85 |
go build -v -work -x ${EGO_BUILD_FLAGS} "${S}/src/github.com/pquerna/ffjson/ffjson.go" || die |
86 |
- GOPATH="${S}" GOBIN="${S}/bin" PATH="${S}/bin:${PATH}" \ |
87 |
+ GOPATH="${S}" GOBIN="${S}/bin" PATH="${S}/bin:${PATH}" GOCACHE=off \ |
88 |
emake -C "${S}/src/${EGO_PN}" containers-storage docs |
89 |
} |
90 |
|
91 |
@@ -93,5 +105,5 @@ src_install() { |
92 |
} |
93 |
|
94 |
src_test() { |
95 |
- GOPATH="${S}" unshare -m emake -C "${S}/src/${EGO_PN}" local-test-unit |
96 |
+ GOPATH="${S}" GOCACHE=off unshare -m emake -C "${S}/src/${EGO_PN}" local-test-unit |
97 |
} |
98 |
|
99 |
diff --git a/app-emulation/containers-storage/metadata.xml b/app-emulation/containers-storage/metadata.xml |
100 |
index 5bf567e579a..17371971e52 100644 |
101 |
--- a/app-emulation/containers-storage/metadata.xml |
102 |
+++ b/app-emulation/containers-storage/metadata.xml |
103 |
@@ -6,6 +6,14 @@ |
104 |
<name>Zac Medico</name> |
105 |
</maintainer> |
106 |
<use> |
107 |
+ <flag name="btrfs"> |
108 |
+ Enables dependencies for the "btrfs" graph driver, including |
109 |
+ necessary kernel flags. |
110 |
+ </flag> |
111 |
+ <flag name="device-mapper"> |
112 |
+ Enables dependencies for the "devicemapper" graph driver, including |
113 |
+ necessary kernel flags. |
114 |
+ </flag> |
115 |
<flag name="ostree"> |
116 |
Enables dependencies for handling of OSTree images. |
117 |
</flag> |