diff options
author | Daniel Black <dragonheart@gentoo.org> | 2006-12-22 08:06:35 +0000 |
---|---|---|
committer | Daniel Black <dragonheart@gentoo.org> | 2006-12-22 08:06:35 +0000 |
commit | 25f0d9a4f19f0411303cce27db6d777575c2d0a8 (patch) | |
tree | 93538738fb92a241d95d608581234233b44f3086 /sys-fs/cowloop | |
parent | Use mirror:// in SRC_URI and remove older version. (diff) | |
download | historical-25f0d9a4f19f0411303cce27db6d777575c2d0a8.tar.gz historical-25f0d9a4f19f0411303cce27db6d777575c2d0a8.tar.bz2 historical-25f0d9a4f19f0411303cce27db6d777575c2d0a8.zip |
vfs_statfs fix thanks to the watchful eye of upstream maintainer
H.J. Thomassen
Package-Manager: portage-2.1.2_rc3-r9
Diffstat (limited to 'sys-fs/cowloop')
-rw-r--r-- | sys-fs/cowloop/ChangeLog | 10 | ||||
-rw-r--r-- | sys-fs/cowloop/cowloop-3.0-r1.ebuild | 53 | ||||
-rw-r--r-- | sys-fs/cowloop/files/cowloop-3.0-vfs_statfs.patch | 34 | ||||
-rw-r--r-- | sys-fs/cowloop/files/digest-cowloop-3.0-r1 | 3 |
4 files changed, 99 insertions, 1 deletions
diff --git a/sys-fs/cowloop/ChangeLog b/sys-fs/cowloop/ChangeLog index c931badfca99..1355b23a7ae4 100644 --- a/sys-fs/cowloop/ChangeLog +++ b/sys-fs/cowloop/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-fs/cowloop # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/cowloop/ChangeLog,v 1.13 2006/12/19 06:48:15 dragonheart Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/cowloop/ChangeLog,v 1.14 2006/12/22 08:06:35 dragonheart Exp $ + +*cowloop-3.0-r1 (22 Dec 2006) + + 22 Dec 2006; Daniel Black <dragonheart@gentoo.org> + +files/cowloop-3.0-vfs_statfs.patch, -cowloop-3.0.ebuild, + +cowloop-3.0-r1.ebuild: + vfs_statfs fix thanks to the watchful eye of upstream maintainer + H.J. Thomassen 19 Dec 2006; Daniel Black <dragonheart@gentoo.org> +files/cowloop-3.0-cflags.patch, +files/cowloop-3.0-config_h.patch, diff --git a/sys-fs/cowloop/cowloop-3.0-r1.ebuild b/sys-fs/cowloop/cowloop-3.0-r1.ebuild new file mode 100644 index 000000000000..7a0d63ddaaa1 --- /dev/null +++ b/sys-fs/cowloop/cowloop-3.0-r1.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/cowloop/cowloop-3.0-r1.ebuild,v 1.1 2006/12/22 08:06:35 dragonheart Exp $ + +inherit linux-mod toolchain-funcs + +DESCRIPTION="A copy-on-write loop driver (block device) to be used on top of any other block driver" +HOMEPAGE="http://www.atconsultancy.nl/cowloop/" +SRC_URI="http://www.atconsultancy.nl/cowloop/packages/${P}.tar.gz" + +LICENSE="GPL-2" +KEYWORDS="~ppc ~x86" +IUSE="" +DEPEND="virtual/libc + virtual/linux-sources" + +S=${WORKDIR}/${P}/src +MODULE_NAMES="cowloop(fs:)" +BUILD_PARAMS="-C ${KV_DIR} SUBDIRS=${S} -I." +BUILD_TARGETS="modules" + +pkg_setup() { + linux-mod_pkg_setup + einfo "Linux kernel ${KV_FULL}" + if kernel_is lt 2 6 + then + eerror "This version only works with 2.6 kernels" + eerror "For 2.4 kernel support, use version 1.4" + die "No compatible kernel detected!" + fi +} + +src_unpack() { + unpack ${A} + epatch ${FILESDIR}/${P}-cflags.patch + epatch ${FILESDIR}/${P}-config_h.patch + epatch ${FILESDIR}/${P}-vfs_statfs.patch +} + +src_compile() { + touch .gpl_license_accepted + linux-mod_src_compile + CC="$(tc-getCC)" emake utils || die "make failed" +} + +src_install() { + linux-mod_src_install + emake DESTDIR="${D}" install-utils install-man || die 'make failed' + dodoc "${S}"/../RELEASENOTES "${S}"/../HOWTO ../doc/* + dodir /etc/udev/rules.d + echo 'KERNEL=="cowctl" NAME="cow/ctl"' > ${D}/etc/udev/rules.d/70-cow.rules + echo 'KERNEL=="cowloop[0-9]*" NAME="cow/%n"' >> ${D}/etc/udev/rules.d/70-cow.rules +} diff --git a/sys-fs/cowloop/files/cowloop-3.0-vfs_statfs.patch b/sys-fs/cowloop/files/cowloop-3.0-vfs_statfs.patch new file mode 100644 index 000000000000..d982f5e8b6ac --- /dev/null +++ b/sys-fs/cowloop/files/cowloop-3.0-vfs_statfs.patch @@ -0,0 +1,34 @@ +--- cowloop-3.0/src/cowloop.c.orig 2006-12-22 18:28:09.000000000 +1100 ++++ cowloop-3.0/src/cowloop.c 2006-12-22 18:31:13.000000000 +1100 +@@ -238,6 +238,7 @@ + #include <linux/config.h> + #endif + #include <linux/module.h> ++#include <linux/version.h> + #include <linux/moduleparam.h> + #include <linux/init.h> + #include <linux/errno.h> +@@ -1507,7 +1508,11 @@ + cowdev->cowwrites % SPCDFLINTVL == 0 ) { + struct kstatfs ks; + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)) + if (vfs_statfs(cowdev->cowfp->f_dentry->d_inode->i_sb, &ks)==0){ ++#else ++ if (vfs_statfs(cowdev->cowfp->f_dentry, &ks)==0){ ++#endif + if (ks.f_bavail <= SPCMINBLK) { + switch (ks.f_bavail) { + case 0: +@@ -1814,7 +1819,11 @@ + /* + ** administer total and available size of filesystem holding cowfile + */ ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)) + if (vfs_statfs(cowdev->cowfp->f_dentry->d_inode->i_sb, &ks) == 0) { ++#else ++ if (vfs_statfs(cowdev->cowfp->f_dentry, &ks) == 0) { ++#endif + cowdev->blksize = ks.f_bsize; + cowdev->blktotal = ks.f_blocks; + cowdev->blkavail = ks.f_bavail; diff --git a/sys-fs/cowloop/files/digest-cowloop-3.0-r1 b/sys-fs/cowloop/files/digest-cowloop-3.0-r1 new file mode 100644 index 000000000000..2a22368ef4af --- /dev/null +++ b/sys-fs/cowloop/files/digest-cowloop-3.0-r1 @@ -0,0 +1,3 @@ +MD5 da951eed8952bd05b8b372ed8a59b2e6 cowloop-3.0.tar.gz 129034 +RMD160 10614214e43be983df652c941dcab74f76bc076e cowloop-3.0.tar.gz 129034 +SHA256 bf71e90c216f862ece4a48401fa5517cfcc91267e8648e30524ed2b9097489ce cowloop-3.0.tar.gz 129034 |