diff options
author | Henrik Brix Andersen <brix@gentoo.org> | 2005-12-06 21:31:25 +0000 |
---|---|---|
committer | Henrik Brix Andersen <brix@gentoo.org> | 2005-12-06 21:31:25 +0000 |
commit | 4fadf6566318bf63b5381e46b102a91126dfe0f9 (patch) | |
tree | 37972d3cbf70a8efc7d264123ccc6430e2811d90 /sys-kernel/suspend2-sources | |
parent | Stable on amd64. Bug #114363. (diff) | |
download | gentoo-2-4fadf6566318bf63b5381e46b102a91126dfe0f9.tar.gz gentoo-2-4fadf6566318bf63b5381e46b102a91126dfe0f9.tar.bz2 gentoo-2-4fadf6566318bf63b5381e46b102a91126dfe0f9.zip |
Revision bump to include various bug fixes from upstream.
(Portage version: 2.0.51.22-r3)
Diffstat (limited to 'sys-kernel/suspend2-sources')
9 files changed, 453 insertions, 2 deletions
diff --git a/sys-kernel/suspend2-sources/ChangeLog b/sys-kernel/suspend2-sources/ChangeLog index 66474717e7e7..4c73181f1988 100644 --- a/sys-kernel/suspend2-sources/ChangeLog +++ b/sys-kernel/suspend2-sources/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for sys-kernel/suspend2-sources # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/suspend2-sources/ChangeLog,v 1.26 2005/12/02 17:00:01 brix Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/suspend2-sources/ChangeLog,v 1.27 2005/12/06 21:31:25 brix Exp $ + +*suspend2-sources-2.6.14-r7 (06 Dec 2005) + + 06 Dec 2005; Henrik Brix Andersen <brix@gentoo.org> + +files/suspend2-2.2-rc14-do-correct-init-routine.patch, + +files/suspend2-2.2-rc14-freeze-fses-in-reverse-mount-order.patch, + +files/suspend2-2.2-rc14-remove-pfn_to_kaddr.patch, + +files/suspend2-2.2-rc14-select-hotplug-cpu-instead-of-depending-on.patch, + +files/suspend2-2.2-rc14-test-filewriter.patch, + +suspend2-sources-2.6.14-r7.ebuild: + Revision bump to include various bug fixes from upstream. *suspend2-sources-2.6.14-r6 (02 Dec 2005) diff --git a/sys-kernel/suspend2-sources/Manifest b/sys-kernel/suspend2-sources/Manifest index 3e198361a01f..20d48fb2cbc7 100644 --- a/sys-kernel/suspend2-sources/Manifest +++ b/sys-kernel/suspend2-sources/Manifest @@ -3,15 +3,19 @@ MD5 df999badafc06dd65c6f777b684ad9d6 suspend2-sources-2.6.13-r1.ebuild 2006 MD5 2cee4a689fad003d7e2e33b9533d0c84 suspend2-sources-2.6.13.ebuild 2063 MD5 5cfda97b5ce288a6978bc4cb747df913 suspend2-sources-2.6.14-r5.ebuild 1809 MD5 3d963bf6d8c5faa596abbb068dec2318 suspend2-sources-2.6.13-r3.ebuild 1967 +MD5 1cc951b1bc8fd8657225a8a9e6eb3179 suspend2-sources-2.6.14-r7.ebuild 1959 MD5 9a1a245c42ac8ba5b633d8c1c4e51382 suspend2-sources-2.6.13-r5.ebuild 1967 MD5 aa65b078bf0942f139815933db9c3a46 suspend2-sources-2.6.14-r4.ebuild 1762 MD5 5d404bb0571ae11e7702c33c9577af76 suspend2-sources-2.6.13-r2.ebuild 1967 -MD5 88c6d595d741aa318317a028ce54e613 ChangeLog 5961 +MD5 bd809f1353aba07a6a2d34de9ae8b14e ChangeLog 6465 MD5 e40cb3df546efa5003fe3778c5a50854 metadata.xml 275 MD5 a24f87b3199f5a851070c6ce817dc3ca suspend2-sources-2.6.14.ebuild 1758 MD5 ef0d8e7f3382db7f92650dca96517ac3 suspend2-sources-2.6.14-r6.ebuild 1762 MD5 8c885e50de95004ba759a137c3f93495 files/101-software-suspend-2.2-rc3-for-2.6.13-gcc4.patch 877 +MD5 10e1c89732c17d3cb31f8742aedcee13 files/suspend2-2.2-rc14-remove-pfn_to_kaddr.patch 1149 MD5 4c9a2a6532217c3e54a52f6633e33c9f files/suspend2-2.2-rc13-filewriter.patch 5283 +MD5 3a1912556d15f96edb9a356555dadf67 files/suspend2-2.2-rc14-do-correct-init-routine.patch 744 +MD5 ae183cf8eb4f23506651725c3ba32f67 files/suspend2-2.2-rc14-test-filewriter.patch 6262 MD5 5ff92c313009119044ed51956fb509f9 files/digest-suspend2-sources-2.6.13-r1 310 MD5 16d093ac8154cc561af7a4a90179d885 files/digest-suspend2-sources-2.6.13-r2 310 MD5 63ce46eba91fa8e586a2a26ed6432987 files/digest-suspend2-sources-2.6.13-r3 310 @@ -20,6 +24,9 @@ MD5 906ae7417b7d3ae2f2bf7859812f8396 files/digest-suspend2-sources-2.6.13-r5 310 MD5 92ba5acc4df4d19ceaa8d998eb57738d files/digest-suspend2-sources-2.6.14-r4 303 MD5 92ba5acc4df4d19ceaa8d998eb57738d files/digest-suspend2-sources-2.6.14-r5 303 MD5 55fb5d3c6fea0515663795871515faf9 files/digest-suspend2-sources-2.6.14-r6 303 +MD5 55fb5d3c6fea0515663795871515faf9 files/digest-suspend2-sources-2.6.14-r7 303 MD5 d1eff82a3bab3c5b67dec45a552888e4 files/linux-2.6.13-poweroff.patch 500 +MD5 185ab2bbe913834d2839b1f010120e5b files/suspend2-2.2-rc14-freeze-fses-in-reverse-mount-order.patch 2487 +MD5 55ffe19645dea1cc8df6866ff95737dd files/suspend2-2.2-rc14-select-hotplug-cpu-instead-of-depending-on.patch 671 MD5 a67db8b8f894652b4d1456406d307a37 files/digest-suspend2-sources-2.6.13 310 MD5 ae95e997f0e9496adfb824ee7f166c5d files/digest-suspend2-sources-2.6.14 301 diff --git a/sys-kernel/suspend2-sources/files/digest-suspend2-sources-2.6.14-r7 b/sys-kernel/suspend2-sources/files/digest-suspend2-sources-2.6.14-r7 new file mode 100644 index 000000000000..484cd3408cad --- /dev/null +++ b/sys-kernel/suspend2-sources/files/digest-suspend2-sources-2.6.14-r7 @@ -0,0 +1,4 @@ +MD5 66d02cbd723876c6d69846a067875a22 linux-2.6.14.tar.bz2 39172170 +MD5 d7c6b3a322fd6f164af6b363e3adbe22 genpatches-2.6.14-5.base.tar.bz2 33008 +MD5 9f4f1a2c33dcbf0e90cd03d8429ff0af genpatches-2.6.14-5.extras.tar.bz2 142535 +MD5 6b24ba97453135f430594bb2fac8c007 suspend2-2.2-rc14-for-2.6.14.tar.bz2 114943 diff --git a/sys-kernel/suspend2-sources/files/suspend2-2.2-rc14-do-correct-init-routine.patch b/sys-kernel/suspend2-sources/files/suspend2-2.2-rc14-do-correct-init-routine.patch new file mode 100644 index 000000000000..fe33c7fbf631 --- /dev/null +++ b/sys-kernel/suspend2-sources/files/suspend2-2.2-rc14-do-correct-init-routine.patch @@ -0,0 +1,14 @@ +diff -ruNp 9130-do-correct-init-routine.patch-old/kernel/power/io.c 9130-do-correct-init-routine.patch-new/kernel/power/io.c +--- 9130-do-correct-init-routine.patch-old/kernel/power/io.c 2005-12-04 23:44:17.000000000 +1000 ++++ 9130-do-correct-init-routine.patch-new/kernel/power/io.c 2005-12-04 23:43:42.000000000 +1000 +@@ -191,8 +191,8 @@ static int rw_init_plugins(int write, in + } + + /* Initialise writer */ +- if ((write && active_writer->read_init(which)) || +- (!write && active_writer->write_init(which))) { ++ if ((write && active_writer->write_init(which)) || ++ (!write && active_writer->read_init(which))) { + abort_suspend("Failed to initialise the writer."); + if (!write) + active_writer->ops.writer.invalidate_image(); diff --git a/sys-kernel/suspend2-sources/files/suspend2-2.2-rc14-freeze-fses-in-reverse-mount-order.patch b/sys-kernel/suspend2-sources/files/suspend2-2.2-rc14-freeze-fses-in-reverse-mount-order.patch new file mode 100644 index 000000000000..87e0242d7961 --- /dev/null +++ b/sys-kernel/suspend2-sources/files/suspend2-2.2-rc14-freeze-fses-in-reverse-mount-order.patch @@ -0,0 +1,94 @@ +diff -ruNp 9140-freeze-fses-in-reverse-mount-order.patch-old/kernel/power/process.c 9140-freeze-fses-in-reverse-mount-order.patch-new/kernel/power/process.c +--- 9140-freeze-fses-in-reverse-mount-order.patch-old/kernel/power/process.c 2005-12-05 10:00:42.000000000 +1000 ++++ 9140-freeze-fses-in-reverse-mount-order.patch-new/kernel/power/process.c 2005-12-05 09:53:03.000000000 +1000 +@@ -66,25 +66,26 @@ static atomic_t nr_kernelspace_frozen; + + struct frozen_fs + { ++ struct list_head fsb_list; + struct super_block *sb; +- struct frozen_fs *next; +-} *frozen_fs_list; ++}; ++ ++LIST_HEAD(frozen_fs_list); + + void freezer_make_fses_rw(void) + { +- while (frozen_fs_list) { +- struct frozen_fs *this; +- char b[255]; ++ struct frozen_fs *fs, *next_fs; + +- this = frozen_fs_list; +- frozen_fs_list = frozen_fs_list->next; +- +- bdevname(this->sb->s_bdev, b); ++ list_for_each_entry_safe(fs, next_fs, &frozen_fs_list, fsb_list) { ++ char b[255]; ++ ++ bdevname(fs->sb->s_bdev, b); + + printk("Thawing %s.\n", b); +- thaw_bdev(this->sb->s_bdev, this->sb); ++ thaw_bdev(fs->sb->s_bdev, fs->sb); + +- kfree(this); ++ list_del(&fs->fsb_list); ++ kfree(fs); + } + } + +@@ -94,31 +95,33 @@ void freezer_make_fses_rw(void) + */ + int freezer_make_fses_ro(void) + { +- struct frozen_fs *new; ++ struct frozen_fs *fs; + struct super_block *sb; + ++ /* Generate the list */ + list_for_each_entry(sb, &super_blocks, s_list) { +- if (!sb->s_root || !sb->s_bdev) +- continue; ++ char b[255]; + +- if (sb->s_frozen == SB_FREEZE_TRANS) ++ if (!sb->s_root || !sb->s_bdev || ++ (sb->s_frozen == SB_FREEZE_TRANS) || ++ (sb->s_flags & MS_RDONLY)) + continue; + +- if (!(sb->s_flags & MS_RDONLY)) { +- char b[255]; +- +- new = kmalloc(sizeof(struct frozen_fs), GFP_ATOMIC); +- new->sb = sb; +- new->next = frozen_fs_list; +- +- bdevname(sb->s_bdev, b); +- +- printk("Attemting to freeze %s.\n", b); +- +- freeze_bdev(sb->s_bdev); +- +- frozen_fs_list = new; +- } ++ bdevname(sb->s_bdev, b); ++ printk("Adding %s to freeze list.\n", b); ++ fs = kmalloc(sizeof(struct frozen_fs), GFP_ATOMIC); ++ fs->sb = sb; ++ list_add_tail(&fs->fsb_list, &frozen_fs_list); ++ }; ++ ++ /* Do the freezing in reverse order so filesystems dependant ++ * upon others are frozen in the right order. (Eg loopback ++ * on ext3). */ ++ list_for_each_entry_reverse(fs, &frozen_fs_list, fsb_list) { ++ char b[255]; ++ bdevname(fs->sb->s_bdev, b); ++ printk("Attempting to freeze %s.\n", b); ++ freeze_bdev(fs->sb->s_bdev); + } + + return 0; diff --git a/sys-kernel/suspend2-sources/files/suspend2-2.2-rc14-remove-pfn_to_kaddr.patch b/sys-kernel/suspend2-sources/files/suspend2-2.2-rc14-remove-pfn_to_kaddr.patch new file mode 100644 index 000000000000..ecf45c0a4a2b --- /dev/null +++ b/sys-kernel/suspend2-sources/files/suspend2-2.2-rc14-remove-pfn_to_kaddr.patch @@ -0,0 +1,24 @@ +diff -ruNp 9110-remove-pfn_to_kaddr.patch-old/kernel/power/atomic_copy.c 9110-remove-pfn_to_kaddr.patch-new/kernel/power/atomic_copy.c +--- 9110-remove-pfn_to_kaddr.patch-old/kernel/power/atomic_copy.c 2005-12-03 18:44:01.000000000 +1000 ++++ 9110-remove-pfn_to_kaddr.patch-new/kernel/power/atomic_copy.c 2005-12-03 17:58:45.000000000 +1000 +@@ -254,8 +254,8 @@ static inline void copyback_low(void) + + while (origoffset < max_pfn) { + if (!is_highmem(o_zone)) { +- origpage = (unsigned long *) pfn_to_kaddr(origoffset); +- copypage = (unsigned long *) pfn_to_kaddr(copyoffset); ++ origpage = (unsigned long *) __va(origoffset << PAGE_SHIFT); ++ copypage = (unsigned long *) __va(copyoffset << PAGE_SHIFT); + + loop = (PAGE_SIZE / sizeof(unsigned long)) - 1; + +@@ -291,7 +291,7 @@ void copyback_high(void) + while (origoffset < max_pfn) { + if (PageHighMem(pfn_to_page(origoffset))) { + origpage = (unsigned long *) kmap_atomic(pfn_to_page(origoffset), KM_USER1); +- copypage = (unsigned long *) pfn_to_kaddr(copyoffset); ++ copypage = (unsigned long *) __va(copyoffset << PAGE_SHIFT); + + memcpy(origpage, copypage, PAGE_SIZE); + + diff --git a/sys-kernel/suspend2-sources/files/suspend2-2.2-rc14-select-hotplug-cpu-instead-of-depending-on.patch b/sys-kernel/suspend2-sources/files/suspend2-2.2-rc14-select-hotplug-cpu-instead-of-depending-on.patch new file mode 100644 index 000000000000..112cdff9dc12 --- /dev/null +++ b/sys-kernel/suspend2-sources/files/suspend2-2.2-rc14-select-hotplug-cpu-instead-of-depending-on.patch @@ -0,0 +1,13 @@ +diff -ruNp 9120-select-hotplug-cpu-instead-of-depending-on.patch-old/kernel/power/Kconfig 9120-select-hotplug-cpu-instead-of-depending-on.patch-new/kernel/power/Kconfig +--- 9120-select-hotplug-cpu-instead-of-depending-on.patch-old/kernel/power/Kconfig 2005-12-03 22:29:19.000000000 +1000 ++++ 9120-select-hotplug-cpu-instead-of-depending-on.patch-new/kernel/power/Kconfig 2005-12-03 22:25:08.000000000 +1000 +@@ -103,7 +103,8 @@ config SUSPEND2_CRYPTO + menuconfig SUSPEND2 + bool "Suspend2" + select DYN_PAGEFLAGS +- depends on PM && (!SMP || SUSPEND_SMP) ++ depends on PM ++ select HOTPLUG_CPU if SMP + ---help--- + Suspend2 is the 'new and improved' suspend support. + diff --git a/sys-kernel/suspend2-sources/files/suspend2-2.2-rc14-test-filewriter.patch b/sys-kernel/suspend2-sources/files/suspend2-2.2-rc14-test-filewriter.patch new file mode 100644 index 000000000000..d40dab54e704 --- /dev/null +++ b/sys-kernel/suspend2-sources/files/suspend2-2.2-rc14-test-filewriter.patch @@ -0,0 +1,220 @@ +diff -ruNp 9200-test-filewriter.patch-old/kernel/power/suspend_file.c 9200-test-filewriter.patch-new/kernel/power/suspend_file.c +--- 9200-test-filewriter.patch-old/kernel/power/suspend_file.c 2005-12-06 13:36:12.000000000 +1000 ++++ 9200-test-filewriter.patch-new/kernel/power/suspend_file.c 2005-12-06 10:46:59.000000000 +1000 +@@ -305,14 +305,30 @@ static void filewriter_get_target_info(c + return; + } + ++ target_file = NULL; + resume_dev_t = name_to_dev_t(target); + if (!resume_dev_t) { + printk("Open file %s returned %p and name_to_devt failed.\n", target, target_file); ++ if (!resume_dev_t) { ++ struct kstat stat; ++ int error = vfs_stat(target, &stat); ++ if (error) { ++ printk("Stating the file also failed. Nothing more we can do.\n"); ++ return; ++ } ++ resume_dev_t = stat.rdev; ++ } + return; + } + target_bdev = open_by_devnum(resume_dev_t, FMODE_READ); ++ if (IS_ERR(target_bdev)) { ++ printk("Got a dev_num (%lx) but failed to open it.\n", ++ (unsigned long) resume_dev_t); ++ return; ++ } + printk("Set bdev in get target info.\n"); + used_devt = 1; ++ target_inode = target_bdev->bd_inode; + } else + target_inode = target_file->f_mapping->host; + +@@ -344,8 +360,10 @@ static void filewriter_get_target_info(c + return; + cleanup: + target_inode = NULL; +- filp_close(target_file, NULL); +- target_file = NULL; ++ if (target_file) { ++ filp_close(target_file, NULL); ++ target_file = NULL; ++ } + get_target_info(0); + } + +@@ -948,6 +966,65 @@ static void filewriter_mark_resume_attem + filewriter_signature_op(MARK_RESUME_ATTEMPTED); + } + ++static void filewriter_set_resume2(void) ++{ ++ char *buffer = (char *) get_zeroed_page(GFP_ATOMIC); ++ char *buffer2 = (char *) get_zeroed_page(GFP_ATOMIC); ++ unsigned long sector = bmap(target_inode, 0); ++ int offset = 0; ++ ++ if (target_bdev) { ++ set_devinfo(target_bdev, target_inode->i_blkbits); ++ ++ bdevname(target_bdev, buffer2); ++ offset += snprintf(buffer + offset, PAGE_SIZE - offset, ++ "/dev/%s", buffer2); ++ ++ if (sector) ++ offset += snprintf(buffer + offset, PAGE_SIZE - offset, ++ ":0x%lx", sector << devinfo.bmap_shift); ++ } else ++ offset += snprintf(buffer + offset, PAGE_SIZE - offset, ++ "%s is not a valid target.", filewriter_target); ++ ++ sprintf(resume2_file, "file:%s", buffer); ++ ++ free_page((unsigned long) buffer); ++ free_page((unsigned long) buffer2); ++ ++ attempt_to_parse_resume_device(); ++} ++ ++static int __test_filewriter_target(char *target, int resume_time) ++{ ++ filewriter_get_target_info(filewriter_target, 0, 0); ++ if (filewriter_signature_op(GET_IMAGE_EXISTS) > -1) { ++ printk(name_suspend "Filewriter: File signature found.\n"); ++ if (!resume_time) ++ filewriter_set_resume2(); ++ ++ suspend_bio_ops.set_posn(&filewriter_posn); ++ suspend_bio_ops.set_devinfo(&devinfo); ++ ++ return 0; ++ } ++ ++ if (*filewriter_target) ++ printk(KERN_ERR name_suspend ++ "Filewriter: Sorry. No signature found at %s.\n", ++ filewriter_target); ++ else ++ printk(KERN_ERR name_suspend ++ "Filewriter: Sorry. No signature found.\n"); ++ ++ return 1; ++} ++ ++static void test_filewriter_target(void) ++{ ++ __test_filewriter_target(filewriter_target, 0); ++} ++ + /* + * Parse Image Location + * +@@ -969,7 +1046,7 @@ static void filewriter_mark_resume_attem + static int filewriter_parse_sig_location(char *commandline, int only_writer) + { + char *thischar, *devstart = NULL, *colon = NULL, *at_symbol = NULL; +- int signature_found, result = -EINVAL, target_blocksize = 0; ++ int result = -EINVAL, target_blocksize = 0; + + if (strncmp(commandline, "file:", 5)) { + if (!only_writer) +@@ -1020,11 +1097,6 @@ static int filewriter_parse_sig_location + + filewriter_get_target_info(commandline, 0, 1); + +- if (colon) +- *colon = ':'; +- if (at_symbol) +- *at_symbol = '@'; +- + if (!target_bdev || IS_ERR(target_bdev)) { + target_bdev = NULL; + result = -1; +@@ -1034,52 +1106,15 @@ static int filewriter_parse_sig_location + if (target_blocksize) + set_devinfo(target_bdev, generic_ffs(target_blocksize)); + +- signature_found = filewriter_signature_op(GET_IMAGE_EXISTS); +- +- if (signature_found > -1) { +- printk(name_suspend "Filewriter: File signature found.\n"); +- result = 0; +- } else { +- if (*filewriter_target) +- printk(KERN_ERR name_suspend +- "Filewriter: Sorry. No signature found at %s\n", +- filewriter_target); +- else +- printk(KERN_ERR name_suspend +- "Filewriter: Sorry. No signature found.\n"); +- } ++ result = __test_filewriter_target(commandline, 1); + + out: +- return result; +-} +- +-static void filewriter_set_resume2(void) +-{ +- char *buffer = (char *) get_zeroed_page(GFP_ATOMIC); +- char *buffer2 = (char *) get_zeroed_page(GFP_ATOMIC); +- unsigned long sector = bmap(target_inode, 0); +- int offset = 0; +- +- if (target_bdev) { +- set_devinfo(target_bdev, target_inode->i_blkbits); +- +- bdevname(target_bdev, buffer2); +- offset += snprintf(buffer + offset, PAGE_SIZE - offset, +- "/dev/%s", buffer2); +- +- if (sector) +- offset += snprintf(buffer + offset, PAGE_SIZE - offset, +- ":0x%lx", sector << devinfo.bmap_shift); +- } else +- offset += snprintf(buffer + offset, PAGE_SIZE - offset, +- "%s is not a valid target.", filewriter_target); +- +- sprintf(resume2_file, "file:%s", buffer); +- +- free_page((unsigned long) buffer); +- free_page((unsigned long) buffer2); ++ if (colon) ++ *colon = ':'; ++ if (at_symbol) ++ *at_symbol = '@'; + +- attempt_to_parse_resume_device(); ++ return result; + } + + /* filewriter_save_config_info +@@ -1107,26 +1142,6 @@ static void filewriter_load_config_info( + strcpy(filewriter_target, buffer); + } + +-static void test_filewriter_target(void) +-{ +- filewriter_get_target_info(filewriter_target, 0, 0); +- if (filewriter_signature_op(GET_IMAGE_EXISTS) > -1) { +- printk(name_suspend "Filewriter: File signature found.\n"); +- filewriter_set_resume2(); +- +- suspend_bio_ops.set_posn(&filewriter_posn); +- suspend_bio_ops.set_devinfo(&devinfo); +- } else { +- if (*filewriter_target) +- printk(KERN_ERR name_suspend +- "Filewriter: Sorry. No signature found at %s.\n", +- filewriter_target); +- else +- printk(KERN_ERR name_suspend +- "Filewriter: Sorry. No signature found.\n"); +- } +-} +- + static int filewriter_initialise(int starting_cycle) + { + int result = 0; diff --git a/sys-kernel/suspend2-sources/suspend2-sources-2.6.14-r7.ebuild b/sys-kernel/suspend2-sources/suspend2-sources-2.6.14-r7.ebuild new file mode 100644 index 000000000000..28636be4e54f --- /dev/null +++ b/sys-kernel/suspend2-sources/suspend2-sources-2.6.14-r7.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/suspend2-sources/suspend2-sources-2.6.14-r7.ebuild,v 1.1 2005/12/06 21:31:25 brix Exp $ + +ETYPE="sources" +K_WANT_GENPATCHES="base extras" +K_GENPATCHES_VER="5" + +inherit eutils kernel-2 +detect_version +detect_arch + +DESCRIPTION="Software Suspend 2 + Gentoo patchset sources" +HOMEPAGE="http://dev.gentoo.org/~dsd/genpatches http://www.suspend2.net" + +SUSPEND2_VERSION="2.2-rc14" +SUSPEND2_TARGET="${PV}" +SUSPEND2_SRC="suspend2-${SUSPEND2_VERSION}-for-${SUSPEND2_TARGET}" +SUSPEND2_URI="http://www.suspend2.net/downloads/all/${SUSPEND2_SRC}.tar.bz2" + +UNIPATCH_LIST="${DISTDIR}/${SUSPEND2_SRC}.tar.bz2 +${FILESDIR}/suspend2-2.2-rc14-do-correct-init-routine.patch +${FILESDIR}/suspend2-2.2-rc14-freeze-fses-in-reverse-mount-order.patch +${FILESDIR}/suspend2-2.2-rc14-remove-pfn_to_kaddr.patch +${FILESDIR}/suspend2-2.2-rc14-select-hotplug-cpu-instead-of-depending-on.patch +${FILESDIR}/suspend2-2.2-rc14-test-filewriter.patch" +UNIPATCH_STRICTORDER="yes" +UNIPATCH_DOCS="${WORKDIR}/patches/${SUSPEND2_SRC}/Changelog.txt +${WORKDIR}/patches/${SUSPEND2_SRC}/ToDo" + +SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${ARCH_URI} ${SUSPEND2_URI}" + +KEYWORDS="~x86" + +IUSE="ultra1" +RDEPEND="${RDEPEND} + >=sys-apps/suspend2-userui-0.6.1 + >=sys-power/hibernate-script-1.12" + +K_EXTRAEINFO="If there are issues with this kernel, please direct any +queries to the suspend2-users mailing list: +http://lists.suspend2.net/mailman/listinfo/suspend2-users/" + +pkg_setup() { + if use sparc; then + # hme lockup hack on ultra1 + use ultra1 || UNIPATCH_EXCLUDE="${UNIPATCH_EXCLUDE} 1399_sparc-U1-hme-lockup.patch" + fi +} + +pkg_postinst() { + postinst_sources + + echo + + if [ "${ARCH}" = "sparc" ]; then + if [ x"`cat /proc/openprom/name 2>/dev/null`" \ + = x"'SUNW,Ultra-1'" ]; then + einfo "For users with an Enterprise model Ultra 1 using the HME" + einfo "network interface, please emerge the kernel using the" + einfo "following command: USE=ultra1 emerge ${PN}" + fi + fi +} |