Gentoo Archives: gentoo-commits

From: Sebastian Pipping <sping@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/betagarden:master commit in: sys-fs/wrapfs/files/, sys-fs/wrapfs/
Date: Mon, 03 Jun 2013 23:58:19
Message-Id: 1370303821.988b8ba17abb56af6c333c6733eabe25637fcccf.sping@gentoo
1 commit: 988b8ba17abb56af6c333c6733eabe25637fcccf
2 Author: Sebastian Pipping <sebastian <AT> pipping <DOT> org>
3 AuthorDate: Mon Jun 3 23:50:29 2013 +0000
4 Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 3 23:57:01 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/betagarden.git;a=commit;h=988b8ba1
7
8 sys-fs/wrapfs: Integrate from sping overlay, include snapshot script and updated ebuild
9
10 ---
11 .../files/extract-module-snapshot-tarball.sh | 97 ++++++++++++++++++++++
12 sys-fs/wrapfs/metadata.xml | 8 ++
13 sys-fs/wrapfs/wrapfs-0.1_p20101202.ebuild | 35 ++++++++
14 sys-fs/wrapfs/wrapfs-0.1_p20110704.ebuild | 31 +++++++
15 sys-fs/wrapfs/wrapfs-0.1_p20111027.ebuild | 31 +++++++
16 sys-fs/wrapfs/wrapfs-0.1_p20130604.ebuild | 31 +++++++
17 6 files changed, 233 insertions(+)
18
19 diff --git a/sys-fs/wrapfs/files/extract-module-snapshot-tarball.sh b/sys-fs/wrapfs/files/extract-module-snapshot-tarball.sh
20 new file mode 100755
21 index 0000000..882a602
22 --- /dev/null
23 +++ b/sys-fs/wrapfs/files/extract-module-snapshot-tarball.sh
24 @@ -0,0 +1,97 @@
25 +#! /usr/bin/env bash
26 +# Copyright (C) 2010-2013 Sebastian Pipping <sebastian@×××××××.org>
27 +# Licensed under GPL v2 or later
28 +#
29 +# Purpose:
30 +# Makes a wrapfs snapshot tarball to allow distribution as a standlone kernel module
31 +#
32 +# Usage:
33 +# $ ./files/extract-module-snapshot-tarball.sh
34 +
35 +die() {
36 + echo $@
37 + exit 1
38 +}
39 +
40 +
41 +# Fetch latest sources from Git
42 +if [[ -d .wrapfs-latest ]]; then
43 + cd .wrapfs-latest || die
44 + git remote update || die
45 + git checkout master || die
46 + git reset --hard origin/master || die
47 + echo
48 +else
49 + git clone --depth 1 git://git.fsl.cs.sunysb.edu/wrapfs-latest.git .wrapfs-latest || die
50 + echo
51 + cd .wrapfs-latest || die
52 +fi
53 +
54 +
55 +# Ensure usable kernel version string
56 +if [[ ! -e include/config/kernel.release ]]; then
57 + if [[ ! -e .config ]]; then
58 + make allnoconfig || die
59 + fi
60 + make include/config/kernel.release || die
61 + echo
62 +fi
63 +
64 +
65 +VERSION=$(/bin/grep '^WRAPFS_VERSION=' fs/wrapfs/Makefile | sed 's/WRAPFS_VERSION="\(.\+\)"/\1/')
66 +[ $(wc -l <<<"${VERSION}") == 1 ] || die 'grepping WRAPFS_VERSION failed'
67 +VERSION="${VERSION}_p$(date +'%Y%m%d')"
68 +DISTNAME="wrapfs-${VERSION}"
69 +TARBALL_NAME="${DISTNAME}".tar
70 +
71 +
72 +# Reset
73 +if [[ -n "${DISTNAME}" && -d "${DISTNAME}" ]]; then
74 + echo 'Cleaning up...'
75 + rm -Rfv "${DISTNAME}"
76 + echo
77 +fi
78 +mkdir -p "${DISTNAME}" || die 'mkdir failed'
79 +
80 +
81 +# Code
82 +cp fs/wrapfs/*.{c,h} "${DISTNAME}"/ || die 'cp failed'
83 +
84 +# Patch: Integrate WRAPFS_SUPER_MAGIC
85 +wrapfs_super_magic_line=$(fgrep WRAPFS_SUPER_MAGIC include/uapi/linux/magic.h)
86 +[ $(wc -l <<<"${wrapfs_super_magic_line}") == 1 ] || die 'grepping WRAPFS_SUPER_MAGIC failed'
87 +sed 's|^#include "wrapfs.h"|&\n'"${wrapfs_super_magic_line}"'|' -i "${DISTNAME}"/super.c
88 +
89 +# Patch: Turn into module, update version
90 +sed \
91 + -e 's|^WRAPFS_VERSION=.*|WRAPFS_VERSION="'"${VERSION}"'"|' \
92 + -e 's|$(CONFIG_WRAP_FS)|m|' \
93 + fs/wrapfs/Makefile \
94 + > "${DISTNAME}"/Makefile
95 +
96 +# Docs
97 +cp Documentation/filesystems/wrapfs.txt "${DISTNAME}"/README || die 'cp failed'
98 +cp include/config/kernel.release "${DISTNAME}"/LINUX_VERSION || die 'cp failed'
99 +
100 +# Author and contact info
101 +fgrep -A6 WRAPFS MAINTAINERS > "${DISTNAME}"/AUTHORS
102 +
103 +# Install instructions
104 +cat <<-EOF >"${DISTNAME}"/INSTALL
105 + tar -xvjf ${DISTNAME}.tar.xz
106 + cd ${DISTNAME}
107 + make -C /lib/modules/\`uname -r\`/build M=\`pwd\` modules
108 + sudo make -C /lib/modules/\`uname -r\`/build M=\`pwd\` modules_install
109 + sudo insmod /lib/modules/`uname -r`/extra/wrapfs.ko
110 +EOF
111 +
112 +
113 +# Archive
114 +echo 'Archiving...'
115 +rm -f ../"${TARBALL_NAME}"{,.xz}
116 +tar -cvf ../"${TARBALL_NAME}" "${DISTNAME}"
117 +xz ../"${TARBALL_NAME}"
118 +echo
119 +
120 +target_kernel=$(cat include/config/kernel.release)
121 +echo "Done. Target kernel is \"${target_kernel}\", tarball created at \"${TARBALL_NAME}.xz\"."
122
123 diff --git a/sys-fs/wrapfs/metadata.xml b/sys-fs/wrapfs/metadata.xml
124 new file mode 100644
125 index 0000000..16bcc9f
126 --- /dev/null
127 +++ b/sys-fs/wrapfs/metadata.xml
128 @@ -0,0 +1,8 @@
129 +<?xml version="1.0" encoding="UTF-8"?>
130 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
131 +<pkgmetadata>
132 + <maintainer>
133 + <email>sping@g.o</email>
134 + <name>Sebastian Pipping</name>
135 + </maintainer>
136 +</pkgmetadata>
137
138 diff --git a/sys-fs/wrapfs/wrapfs-0.1_p20101202.ebuild b/sys-fs/wrapfs/wrapfs-0.1_p20101202.ebuild
139 new file mode 100644
140 index 0000000..b346eff
141 --- /dev/null
142 +++ b/sys-fs/wrapfs/wrapfs-0.1_p20101202.ebuild
143 @@ -0,0 +1,35 @@
144 +# Copyright 1999-2010 Gentoo Foundation
145 +# Distributed under the terms of the GNU General Public License v2
146 +# $Header: $
147 +
148 +EAPI="3"
149 +
150 +inherit eutils linux-mod
151 +
152 +DESCRIPTION="Stackable passthru file system for Linux."
153 +HOMEPAGE="http://wrapfs.filesystems.org/"
154 +SRC_URI="http://www.hartwork.org/public/${P}.tar.bz2"
155 +
156 +LICENSE="GPL-2"
157 +SLOT="0"
158 +KEYWORDS="~amd64 ~x86"
159 +IUSE=""
160 +
161 +DEPEND=""
162 +RDEPEND=""
163 +
164 +pkg_setup() {
165 + linux-mod_pkg_setup
166 + MODULE_NAMES="wrapfs(extra:)"
167 + BUILD_TARGETS="wrapfs.ko"
168 + BUILD_PARAMS="-C ${KERNEL_DIR} M=${S} modules"
169 +}
170 +
171 +src_prepare() {
172 + epatch "${FILESDIR}"/${P}-2.6.39.patch
173 +}
174 +
175 +src_install() {
176 + dodoc AUTHORS README
177 + linux-mod_src_install
178 +}
179
180 diff --git a/sys-fs/wrapfs/wrapfs-0.1_p20110704.ebuild b/sys-fs/wrapfs/wrapfs-0.1_p20110704.ebuild
181 new file mode 100644
182 index 0000000..d2bc46b
183 --- /dev/null
184 +++ b/sys-fs/wrapfs/wrapfs-0.1_p20110704.ebuild
185 @@ -0,0 +1,31 @@
186 +# Copyright 1999-2010 Gentoo Foundation
187 +# Distributed under the terms of the GNU General Public License v2
188 +# $Header: $
189 +
190 +EAPI="3"
191 +
192 +inherit linux-mod
193 +
194 +DESCRIPTION="Stackable passthru file system for Linux."
195 +HOMEPAGE="http://wrapfs.filesystems.org/"
196 +SRC_URI="http://www.hartwork.org/public/${P}.tar.bz2"
197 +
198 +LICENSE="GPL-2"
199 +SLOT="0"
200 +KEYWORDS="~amd64 ~x86"
201 +IUSE=""
202 +
203 +DEPEND=""
204 +RDEPEND=""
205 +
206 +pkg_setup() {
207 + linux-mod_pkg_setup
208 + MODULE_NAMES="wrapfs(extra:)"
209 + BUILD_TARGETS="wrapfs.ko"
210 + BUILD_PARAMS="-C ${KERNEL_DIR} M=${S} modules"
211 +}
212 +
213 +src_install() {
214 + dodoc AUTHORS README
215 + linux-mod_src_install
216 +}
217
218 diff --git a/sys-fs/wrapfs/wrapfs-0.1_p20111027.ebuild b/sys-fs/wrapfs/wrapfs-0.1_p20111027.ebuild
219 new file mode 100644
220 index 0000000..d2bc46b
221 --- /dev/null
222 +++ b/sys-fs/wrapfs/wrapfs-0.1_p20111027.ebuild
223 @@ -0,0 +1,31 @@
224 +# Copyright 1999-2010 Gentoo Foundation
225 +# Distributed under the terms of the GNU General Public License v2
226 +# $Header: $
227 +
228 +EAPI="3"
229 +
230 +inherit linux-mod
231 +
232 +DESCRIPTION="Stackable passthru file system for Linux."
233 +HOMEPAGE="http://wrapfs.filesystems.org/"
234 +SRC_URI="http://www.hartwork.org/public/${P}.tar.bz2"
235 +
236 +LICENSE="GPL-2"
237 +SLOT="0"
238 +KEYWORDS="~amd64 ~x86"
239 +IUSE=""
240 +
241 +DEPEND=""
242 +RDEPEND=""
243 +
244 +pkg_setup() {
245 + linux-mod_pkg_setup
246 + MODULE_NAMES="wrapfs(extra:)"
247 + BUILD_TARGETS="wrapfs.ko"
248 + BUILD_PARAMS="-C ${KERNEL_DIR} M=${S} modules"
249 +}
250 +
251 +src_install() {
252 + dodoc AUTHORS README
253 + linux-mod_src_install
254 +}
255
256 diff --git a/sys-fs/wrapfs/wrapfs-0.1_p20130604.ebuild b/sys-fs/wrapfs/wrapfs-0.1_p20130604.ebuild
257 new file mode 100644
258 index 0000000..19d701f
259 --- /dev/null
260 +++ b/sys-fs/wrapfs/wrapfs-0.1_p20130604.ebuild
261 @@ -0,0 +1,31 @@
262 +# Copyright 1999-2010 Gentoo Foundation
263 +# Distributed under the terms of the GNU General Public License v2
264 +# $Header: $
265 +
266 +EAPI="4"
267 +
268 +inherit linux-mod
269 +
270 +DESCRIPTION="Stackable passthru file system for Linux."
271 +HOMEPAGE="http://wrapfs.filesystems.org/"
272 +SRC_URI="http://www.hartwork.org/public/${P}.tar.xz"
273 +
274 +LICENSE="GPL-2"
275 +SLOT="0"
276 +KEYWORDS="~amd64 ~x86"
277 +IUSE=""
278 +
279 +DEPEND=""
280 +RDEPEND=""
281 +
282 +pkg_setup() {
283 + linux-mod_pkg_setup
284 + MODULE_NAMES="wrapfs(extra:)"
285 + BUILD_TARGETS="wrapfs.ko"
286 + BUILD_PARAMS="-C ${KERNEL_DIR} M=${S} modules"
287 +}
288 +
289 +src_install() {
290 + dodoc AUTHORS README
291 + linux-mod_src_install
292 +}