diff options
author | Joe Peterson <lavajoe@gentoo.org> | 2008-08-18 17:10:33 +0000 |
---|---|---|
committer | Joe Peterson <lavajoe@gentoo.org> | 2008-08-18 17:10:33 +0000 |
commit | df3e2ca4851faaa30594a9cc3751552e41ef4941 (patch) | |
tree | a48dd21acee4bb1f905faf586dc76f3a4439f40f /sys-fs/btrfs | |
parent | fix building with --as-needed, bug #235004 (diff) | |
download | gentoo-2-df3e2ca4851faaa30594a9cc3751552e41ef4941.tar.gz gentoo-2-df3e2ca4851faaa30594a9cc3751552e41ef4941.tar.bz2 gentoo-2-df3e2ca4851faaa30594a9cc3751552e41ef4941.zip |
Add patch to compile with post-2.6.26 kernels
(Portage version: 2.2_rc8/cvs/Linux 2.6.26-gentoo i686)
Diffstat (limited to 'sys-fs/btrfs')
-rw-r--r-- | sys-fs/btrfs/ChangeLog | 8 | ||||
-rw-r--r-- | sys-fs/btrfs/btrfs-0.16-r1.ebuild | 67 | ||||
-rw-r--r-- | sys-fs/btrfs/files/btrfs-0.16-new-kernels.patch | 45 |
3 files changed, 119 insertions, 1 deletions
diff --git a/sys-fs/btrfs/ChangeLog b/sys-fs/btrfs/ChangeLog index 5a039f14d0de..b972bbcbcf47 100644 --- a/sys-fs/btrfs/ChangeLog +++ b/sys-fs/btrfs/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-fs/btrfs # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/btrfs/ChangeLog,v 1.11 2008/08/06 04:04:52 lavajoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-fs/btrfs/ChangeLog,v 1.12 2008/08/18 17:10:32 lavajoe Exp $ + +*btrfs-0.16-r1 (18 Aug 2008) + + 18 Aug 2008; Joe Peterson <lavajoe@gentoo.org> + +files/btrfs-0.16-new-kernels.patch, +btrfs-0.16-r1.ebuild: + Add patch to compile with post-2.6.26 kernels *btrfs-0.16 (05 Aug 2008) diff --git a/sys-fs/btrfs/btrfs-0.16-r1.ebuild b/sys-fs/btrfs/btrfs-0.16-r1.ebuild new file mode 100644 index 000000000000..bd9773ca51dc --- /dev/null +++ b/sys-fs/btrfs/btrfs-0.16-r1.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/btrfs/btrfs-0.16-r1.ebuild,v 1.1 2008/08/18 17:10:33 lavajoe Exp $ + +inherit eutils linux-mod + +DESCRIPTION="A checksumming copy-on-write filesystem" +HOMEPAGE="http://btrfs.wiki.kernel.org/" +SRC_URI="http://www.kernel.org/pub/linux/kernel/people/mason/btrfs/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="" +RDEPEND="${DEPEND}" + +pkg_setup() +{ + linux-mod_pkg_setup + + BUILD_TARGETS="all" + BUILD_PARAMS="KERNELDIR=${KV_OUT_DIR}" + MODULE_NAMES="btrfs(fs:${S}/" + + if ! kernel_is 2 6; then + eerror "Need a 2.6 kernel to compile against!" + die "Need a 2.6 kernel to compile against!" + fi + + if ! linux_chkconfig_present LIBCRC32C; then + eerror "You need to enable LIBCRC32C in your kernel!" + die "You need to enable LIBCRC32C in your kernel!" + fi +} + +src_unpack() { + unpack ${A} + cd "${S}" + + # Apply hot fixes + #epatch "${FILESDIR}/${P}-hotfix.patch" + epatch "${FILESDIR}/${P}-new-kernels.patch" +} + +src_install() +{ + linux-mod_src_install + + dodoc INSTALL TODO +} + +pkg_postinst() { + linux-mod_pkg_postinst + + ewarn "WARNING: Btrfs is under heavy development and is not suitable for" + ewarn " any uses other than benchmarking and review." + ewarn " The Btrfs disk format is not yet finalized." + ewarn + ewarn " Also, it is highly recommended that the versions of" + ewarn " btrfs and btrfs-progs match." + ewarn + ewarn "Note: THE DISK FORMAT HAS CHANGED!" + ewarn " You must backup your data and re-create your btrfs" + ewarn " filesystem(s) for use with this version." +} diff --git a/sys-fs/btrfs/files/btrfs-0.16-new-kernels.patch b/sys-fs/btrfs/files/btrfs-0.16-new-kernels.patch new file mode 100644 index 000000000000..ef992a765453 --- /dev/null +++ b/sys-fs/btrfs/files/btrfs-0.16-new-kernels.patch @@ -0,0 +1,45 @@ +diff -Nurp /var/tmp/portage/sys-fs/btrfs-0.16/work/btrfs-0.16/compat.h ./compat.h +--- /var/tmp/portage/sys-fs/btrfs-0.16/work/btrfs-0.16/compat.h 2008-08-05 12:13:37.000000000 -0600 ++++ ./compat.h 2008-08-18 10:59:06.974647262 -0600 +@@ -1,6 +1,9 @@ + #ifndef _COMPAT_H_ + #define _COMPAT_H_ + ++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,26) ++#define trylock_page(page) (!TestSetPageLocked(page)) ++#endif + + /* + * Even if AppArmor isn't enabled, it still has different prototypes. +diff -Nurp /var/tmp/portage/sys-fs/btrfs-0.16/work/btrfs-0.16/ctree.h ./ctree.h +--- /var/tmp/portage/sys-fs/btrfs-0.16/work/btrfs-0.16/ctree.h 2008-08-05 12:13:37.000000000 -0600 ++++ ./ctree.h 2008-08-18 10:59:07.004646324 -0600 +@@ -1648,7 +1648,7 @@ int btrfs_csum_truncate(struct btrfs_tra + /* inode.c */ + + /* RHEL and EL kernels have a patch that renames PG_checked to FsMisc */ +-#ifdef ClearPageFsMisc ++#if defined(ClearPageFsMisc) && !defined(ClearPageChecked) + #define ClearPageChecked ClearPageFsMisc + #define SetPageChecked SetPageFsMisc + #define PageChecked PageFsMisc +diff -Nurp /var/tmp/portage/sys-fs/btrfs-0.16/work/btrfs-0.16/extent_io.c ./extent_io.c +--- /var/tmp/portage/sys-fs/btrfs-0.16/work/btrfs-0.16/extent_io.c 2008-08-05 12:13:37.000000000 -0600 ++++ ./extent_io.c 2008-08-18 10:59:07.044650492 -0600 +@@ -14,6 +14,7 @@ + #include <linux/pagevec.h> + #include "extent_io.h" + #include "extent_map.h" ++#include "compat.h" + + /* temporary define until extent_map moves out of btrfs */ + struct kmem_cache *btrfs_cache_create(const char *name, size_t size, +@@ -3055,7 +3056,7 @@ int read_extent_buffer_pages(struct exte + for (i = start_i; i < num_pages; i++) { + page = extent_buffer_page(eb, i); + if (!wait) { +- if (TestSetPageLocked(page)) ++ if (!trylock_page(page)) + goto unlock_exit; + } else { + lock_page(page); |