-DIST zfs-0.6.0-rc13.tar.gz 1490582 SHA256 3e689fc0704237c7d755c65e34ed214a262535afefafde4aef0f112f8c833a09 SHA512 c9bbf1fb7f293a0f5b1247e17c411073994bf419d5f6c1b781efeeb4022f62851e8ea3cf7ee0330b0609bfe13b8084c48f00e942ce52323d706733cccf49699e WHIRLPOOL 97083a6f5d66addc9bc7b3cc3f7dd3bc1696980affbd4033d71cd09ecad413ffb666a8a185dfa2e4f20dd4003746ad61d12142f7a6556db5b34008716c933798
-DIST zfs-0.6.0-rc14.tar.gz 1527612 SHA256 5eae8ef790b26e0dd7c801cc0a235a631ad91d67f148a444d912dbeb24b9a12d SHA512 ad38544ced150ce500c78507782e53a8534815b819e5b9aefda6d670fb7905e31a42cdb4d45164700df48673ea7c42bd1d29a60f1f00e25271b3906de9212d15 WHIRLPOOL cfd4de541eb6c18ee4df8950883525d1b1887e0d9c5f840d97353a5d716ed639f1ab3dc0fe4d8368a890564f10053026bcc738b6066c4488647f1b83be54288d
-DIST zfs-0.6.1.tar.gz 1535521 SHA256 42ed127f74af0ecafc14800a5d2b766655f5ea821098aba92446c1c447093fad SHA512 ef583639f15a5b2e4582760bb013ab5091abc15bae17884d811afec707aff337248102a22fb9fb6f62f99cb3477a8ae82edfdcfdfb962276f593173a5dfe5871 WHIRLPOOL a6791fc2d384e03073abc850f99ba761afd18073337264d8a7bc08b4ddc6fff52df5ce11addc9a3ac7cdfdd9ce9bd779208e515cda631ec19de05fbf9f92307b
-DIST zfs-0.6.2.tar.gz 1558656 SHA256 91b844bf7a42df22d7533e8004289270b7859b8fcbca3bff8087a79b131318b4 SHA512 008f9decdea3e92f6d74f5369ec9df5776b15efbb9f2bc01012999b71e1f2bc5b46b310a329b60545907dcc78773ec79eb6d21aca49d911f33299fd0a36e1a4b WHIRLPOOL 587279866b6ffa2bfebc91f00cb28de85f7f186426a0292f44c6cde7ca3a51c1911fc0ee431c25c3ee0866174522f90ce04b54de4aa3dc0829ba3a719e47af58
-DIST zfs-0.6.3-patches-r1.tar.xz 87852 SHA256 71b5286f77cb6a6c2b97cee406dfd4788f7b40b6675c4a56fc630a47e90d5280 SHA512 e2fa573c7b30a3811e9e1596d35b65f5d013ed5bac43e364b44ffab734398a3294979c152a80ec9a722611cc7c971aec217d8e1a37cc9240a3fa2dddb5b90e3b WHIRLPOOL f2da02d5c7d2385e7de1e858c31d299632ca864d422f0c94e5d3b8674d24beeb073ad2600698350306a9e70dbeef390f0e513d19c126502fceec18795c203d50
-DIST zfs-0.6.3.tar.gz 1665270 SHA256 00caeae63cc724d3dd741aeb36fd2dc03d2158794bd6a5e925cdc8d7e5d3da8c SHA512 8c7741f5f227eb031d79fe87bf7d60e790a098fa6caede462d556c97d798832f97f5a377cbb74fc99b8d198e5f3cc1a3491f69fcdaa0408933dbadd132013416 WHIRLPOOL db9791da12c441c89667b194154b209f5aa69ea46d5327cfcde0b3a910cf1f0e5ca448909824e45b31252a1907280b711fb6ba04eb313d09de0ffbf5e6e304fe
-DIST zfs-0.6.4.2.tar.gz 1738601 SHA256 26af2924cbb891b79203a31827cba4cdc310162d5f7b9e2d643eb6576aa19015 SHA512 87a28997b8f9d36e189410171db583402418a55782b7b7f333993e98c5e17ccc4b6cd5825f38b904294c87e3dfdfb7748bd71cc371589c1358f16c942e0c18db WHIRLPOOL 1700de7da56311a7b608c99a821e2fa97a6145ccc88f3d8eff12f778421ba7b7b9cc5f5fbe5f1acd2ea2fd1db778c200a2ea961e3859a8fc89d80474894293f1
-DIST zfs-0.6.5.10.tar.gz 2597676 SHA256 90a0ca76667076e9f58776216cb761f68761eb0192f8b0c45893f84cabc6f27e SHA512 822004d11a1a7c0e258cce049bfee0248dd1ac225a922c1e4a25c8593f23e9b1d7aa4a45a1122f6904025ea0a8c7f4884ec4ab353bfa9c734aedb0969b8d6eb4 WHIRLPOOL 87596a0e89afd3b7da1476c996c87491ee3962f0accd0c1a50d9cd9ab4dd49b3c1c71e14c6eeeddfc53db9bba665bc525ef9580da8082b1e4426bce54ee83401
DIST zfs-0.6.5.11.tar.gz 2521959 SHA256 136b3061737f1a43f5310919cacbf1b8a0db72b792ef8b1606417aff16dab59d SHA512 877052da2a0cdc78b10cb5041da55e31242db2618c502997f4df9aa46a14482c7f33adce8d21aaf16164a9fe52edc358922ea89c8e109c3247e107bf607d6451 WHIRLPOOL 867f6b22726ca13e43a5ff7a832610bbfd44e6c367bd314a20a7f0a03364b1c3bda1d7b3d7c3502e08249b8d8d9e8034e93d0200abb70f793352f7689e19deac
-DIST zfs-0.6.5.2.tar.gz 1817267 SHA256 aecd2bc5189f2a71a45eb222230146bed231af4f35af5ec7af83a74987c3d595 SHA512 7f0b20feca91d5ab952c1d49ae94d241f8868825b163a3d5f2ad0fd7adcac3ab246a3e6a755019a833be553fbbfd6609828d8123f49a43b42bf76cfd64f234ec WHIRLPOOL 00fd628ef2267366b6f0705e6436ac55b260aabc3588c7f58a7042dfbfe95a0478740b4579326638d28f10ffc8f2d5b3ed21b9f8297e72344ec439fe30310634
-DIST zfs-0.6.5.3-patches-p3.tar.xz 88736 SHA256 031cd97765f890d9b78e1a5746cbd2a3ce06c7208693ec75c0b47324ac67b97a SHA512 8f17cc6e02a35828a57a7c2a437d9d18a41203b6e3f9e154b2ab863296b64596dc827afeeb0f993e37f47881d0f2ed4834f270d0ba843ab84b21c491cc352576 WHIRLPOOL 20f69c0a936bb612d5e3b551d4bf904aca3aff6d885d72f67f3b14cd720094ec13e383032ee4e322b0e81017d8ffcfafb47bf07f273badef34f7210d687ddacc
-DIST zfs-0.6.5.3.tar.gz 2524218 SHA256 49e6f9760ea172cb756f7357e4bcb90ee0293028540a68d62ed087724276131f SHA512 325cb91b7ddbcd6aa0bb9fc41eb0099dbb047a4e32d096fd414799729ef68cbc9c2e15714092eff8044a681af4ab552bd9ac1949cc673c6c5c3de1a23d9895ec WHIRLPOOL 957c3a75bb11befd4b74583883f2f11f717deb6bda368939b342049e809aa191a9ee8d1e709eaddc2a831418c7fdb5e763f918ff56d45f03baf4569ef8a4a070
DIST zfs-0.6.5.4-patches-p1.tar.xz 64004 SHA256 83877d9b7c629730838325fd5b16bcb54259520e200f0539de9b8edfdcee9403 SHA512 9203356b43bdad2ed78c946af8c95c9fc4d2996b41a09a3b1f5a8657d2742ac69d10b4a87d443db497d591878cf7a70ebb19762b0df135ee25f4e8d2ed6ad71f WHIRLPOOL ff5788356d6a85608d22ea2c010a799464922614204c7eea06b57930a44ee876e596a053a773205de0543d36c04337d60c32594939e8e64d3022906c51c4d4e6
DIST zfs-0.6.5.4.tar.gz 2506470 SHA256 780862ec2301ccace412a324787e9df762cff6046e73e2ac0ebdce9e2bd59b0f SHA512 90c87cd95fd06cf34755358e7cc4053d19f351316133f0b808e7585a3fc8f82e7c0f49072c2995d0520de5104fd04d91a166a0d5b6c923c82dfb2fb4f7f57a01 WHIRLPOOL eacd2ec09afdbc3f6d946583116296fadcd7d0dea5158c89f82f6d0b02e0cbf075712015bfa5f321ae5815cf86af13b39ce93e5026e6a00da58d9ddb04d12320
-DIST zfs-0.6.5.6.tar.gz 2561093 SHA256 c349d46d86b4f61cd53a0891acad916cfc3f0d6754127db7f60a0bd98185aeff SHA512 94c55a50f0f9a90ce07a45dc72bb2730b2a41373ab5a12845df00ef38bb22e4a80ab2fb6e31a9c3a45e51516cdea441bb9da1d0acf71f2f88b38c7c3e9e995b0 WHIRLPOOL 6fcbe473bfce90f800989bac506fa6d4cf5662ad9ca617a477f1251c1625de906495a45759d6190e5a24dcf05f2ed3dd7ea1c0b2f243165a60e5efd098082935
-DIST zfs-0.6.5.7.tar.gz 2537816 SHA256 4a9e271bb9a6af8d564e4d5800e4fff36224f1697b923a7253659bdda80dc590 SHA512 559b826ae1a176217b92d8407729e2c5feeffb117dc9affaa8c9c2134d996b6c3cbe095f7a0c4666c9b131742491f1304eeb292e13e0df0b6d001fa620568af2 WHIRLPOOL bf2e0865de35496cc995738ddde34df797b0c5047c0dd17e5b755803ef16e7c16f8ba89927106a1f6131c2f75a6749c31a72dff95fc0fee186b308c50ce0b4f4
-DIST zfs-0.6.5.8.tar.gz 2521921 SHA256 d77f43f7dc38381773e2c34531954c52f3de80361b7bb10c933a7482f89cfe84 SHA512 e5b53a9531b865e7c650892c0deb1ee81db086a33538cd667a087a8a8d33a0ad93a30ae5e800096abfc4dc8ed00843da924230082e204fb7543dd401ef41fcde WHIRLPOOL 623bf8ee51d59dcd1842bf41ccf19c2eb6813fb1e88dea1ea1c6f1388c11484b798546bdcb94500735a0e9e5f9099a4df43308760b353b5b62ff56af035f88bd
-DIST zfs-0.6.5.9.tar.gz 2610650 SHA256 b724b57dbddae59246fdc15f88f1224061c712945bb36412a2087e0c7760d77f SHA512 6e175f32421cf0f9e13429f12f0fac0564dc7059ab076831d0ebc4f6a17412160ca3526ebdf894bc7666e82580355b08701dd01c411d3177f82e7330b4529a37 WHIRLPOOL 149d730a26363b50691363b314669756d218c4a16e6d06e319c2b0866c5f8ed6e2da2396a516297c127d3343d51d78072d8b7371e3f4d327d30fa43c90be5cd3
-DIST zfs-0.6.5.tar.gz 1816180 SHA256 542121940122c922c9d21a2bb39bca4e4a9db2f6bbfd2e576630840e256d4c82 SHA512 58480ee9b0780f1f21d12504abc226be3e6df1939214f6a8f245315d1fa0b9da56b3a744df26426ee78f13684a4ca288df6dddc50f8f91d9d0b4c542980a9c53 WHIRLPOOL fdb5580ec8d4abe57069ce453c1d91225019758ecf5d31856a7897ac7e4b51c6a8ae3258e822f684fbd70a0a7d7410c65c37a569f37d132767522118c587cc24
-DIST zfs-0.7.0.tar.gz 6714094 SHA256 6907524f5ca4149b799fe65cd31b552b0ae90dba5dc20524e1a24fc708d807d2 SHA512 6e6cbf54399fc85b74b76a6ceb3f30e94903f755fe6386fccc56b5e6d307a907759e4b62acec5d32e8383ef1083423eaff8dee2b0ef01a99459171a42b47d217 WHIRLPOOL 74687be4220bab51f18fdd3c047400c4261acf16f38086c2485f5cb9d79af87f5adfafced92860b021814aece7446cb18e9ca310a363b90c6bac39343b72a4b6
-DIST zfs-0.7.1.tar.gz 6376234 SHA256 231b104979ddacfeb1889e1dec175337276e7b3b109d40656089744b5caf3ef6 SHA512 64b0a3b5eeaf09ce824e3e029880a8e5dcb3e4567d1fb2fa24c89d8e55fee1ebe2d2f3a9f77d5468cc5637074e27d5ba7696b566829c93fd69c610b288200a37 WHIRLPOOL 700c83aadca96578ae8d6a9795f91c0c25b69afcc6ec6c02141daafcbcd550ae413438e96c4821c5c90816e0e29366ecfc3e7289623f14c255722c37d9f9a7f6
-DIST zfs-0.7.2.tar.gz 6389699 SHA256 f75f4d8bbb8241e3d06321b53914e53fa22d1ccc8be89819b578b46e5d3e5cf4 SHA512 fd10350b3ba5906b8d4968cee4f9febcc475b49e7d5499209566f7cfa39f29c4c2c1a4bae0698ce98244fa66657e7956a8c170de1e5f13b1bc05d2861d2c7722 WHIRLPOOL b1e270bddf9d34a6d60a9f3d80f767d6a19a7c2ae5b51d3fe83fb28432e267d494cd5b4f003b6049a074e8bf65fa9179793dec0b40f366cea493f7993dd3d19d
DIST zfs-0.7.3.tar.gz 6393145 SHA256 cb8fc606835d3f91471e49aca31a6a0a71733b1cbe74fa510e0fe0efa670fe51 SHA512 fe116fd787050f7bc099fe3ed5335c2d18711e5e665af5be13b3971939258e036e273432e80106e704f037d1f6e3114b12e26b01f97b575723f8bd46acdcbf61 WHIRLPOOL 4a7442898bd8855c24c8cdbd8d58b02dfb41ba5e55096ad20afb61c9a2903fd5aa7808fa525dfaaa20bd85ab05e1f44828f8c557ee15c7f2b5dd1174b1810e63
-DIST zfs-kmod-0.6.2-p2.tar.xz 28636 SHA256 12882463a38a5a57cf2bb3c14c5783f9511f6dc7b163a47575f2f3dcc24f26f6 SHA512 5792660ae8f5013d12e70d608e9cffa92a8c4089a88a5e78728ee88204b3f970d452d5b0b3874e02be49ebbc139e07139be7b5a86ca40bc8b23cb11a7198a9a8 WHIRLPOOL 0e4c57b363cdd3d736efbd1355567b18e22439bd3b20ef40b27f6b97ad4570c7cc99a11b196ac25359d1966c1a70e178f4fd1687b60450f148ccda47b07282a9
+++ /dev/null
-From 1c50c992bafd96773dc3950d382a89806df8cc9c Mon Sep 17 00:00:00 2001
-From: Brian Behlendorf <behlendorf1@llnl.gov>
-Date: Wed, 9 Jan 2013 11:09:06 -0800
-Subject: [PATCH] Revert "Avoid ELOOP on auto-mounted snapshots"
-
-This reverts commit 7afcf5b1da83549bfba70a61fae7a00eaa63c2b0 which
-accidentally introduced a regression with the .zfs snapshot directory.
-While the updated code still does correctly mount the requested
-snapshot. It updates the vfsmount such that it references the
-original dataset vfsmount. The result is that the snapshot itself
-isn't visible.
-
-Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Issue #816
----
- module/zfs/zpl_ctldir.c | 7 -------
- 1 file changed, 7 deletions(-)
-
-diff --git a/module/zfs/zpl_ctldir.c b/module/zfs/zpl_ctldir.c
-index a2d8fa9..7dfaf6e 100644
---- a/module/zfs/zpl_ctldir.c
-+++ b/module/zfs/zpl_ctldir.c
-@@ -357,13 +357,6 @@
- return ERR_PTR(error);
-
- /*
-- * Ensure path->dentry points to the dentry for the root of the
-- * newly-mounted snapshot, otherwise this function may be called
-- * repeatedly which can lead to an incorrect ELOOP error return.
-- */
-- follow_up(path);
--
-- /*
- * Rather than returning the new vfsmount for the snapshot we must
- * return NULL to indicate a mount collision. This is done because
- * the user space mount calls do_add_mount() which adds the vfsmount
---
-1.7.10
-
+++ /dev/null
-diff --git a/module/zfs/dsl_dataset.c b/module/zfs/dsl_dataset.c
-index 21fdd08..872d44a 100644
---- a/module/zfs/dsl_dataset.c
-+++ b/module/zfs/dsl_dataset.c
-@@ -20,7 +20,7 @@
- */
- /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
-- * Copyright (c) 2011 by Delphix. All rights reserved.
-+ * Copyright (c) 2012 by Delphix. All rights reserved.
- * Copyright (c) 2012, Joyent, Inc. All rights reserved.
- */
-
-@@ -4158,9 +4220,13 @@ struct dsl_ds_releasearg {
- dsl_dataset_t *snap;
- uint64_t used, comp, uncomp;
-
-- err = dsl_dataset_hold_obj(dp, snapobj, FTAG, &snap);
-- if (err != 0)
-- break;
-+ if (snapobj == new->ds_object) {
-+ snap = new;
-+ } else {
-+ err = dsl_dataset_hold_obj(dp, snapobj, FTAG, &snap);
-+ if (err != 0)
-+ break;
-+ }
-
- if (snap->ds_phys->ds_prev_snap_txg ==
- oldsnap->ds_phys->ds_creation_txg) {
-@@ -4189,7 +4255,8 @@ struct dsl_ds_releasearg {
- * was not a snapshot of/before new.
- */
- snapobj = snap->ds_phys->ds_prev_snap_obj;
-- dsl_dataset_rele(snap, FTAG);
-+ if (snap != new)
-+ dsl_dataset_rele(snap, FTAG);
- if (snapobj == 0) {
- err = EINVAL;
- break;
+++ /dev/null
-From 37f000c5aa76613e644cf3e5b1ec7bd2df6f7451 Mon Sep 17 00:00:00 2001
-From: Ned Bass <bass6@llnl.gov>
-Date: Wed, 26 Dec 2012 14:56:41 -0800
-Subject: [PATCH] Fix gcc array subscript above bounds warning
-
-In a debug build, certain GCC versions flag an array bounds warning in
-the below code from dnode_sync.c
-
- } else {
- int i;
- ASSERT(dn->dn_next_nblkptr[txgoff] < dnp->dn_nblkptr);
- /* the blkptrs we are losing better be unallocated */
- for (i = dn->dn_next_nblkptr[txgoff];
- i < dnp->dn_nblkptr; i++)
- ASSERT(BP_IS_HOLE(&dnp->dn_blkptr[i]));
-
-This usage is in fact safe, since the ASSERT ensures the index does
-not exceed to maximum possible number of block pointers. However gcc
-can't determine that the assignment 'i = dn->dn_next_nblkptr[txgoff];'
-falls within the array bounds so it issues a warning. To avoid this,
-initialize i to zero to make gcc happy but skip the elements before
-dn->dn_next_nblkptr[txgoff] in the loop body. Since a dnode contains
-at most 3 block pointers this overhead should be negligible.
-
-Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Closes #950
----
- module/zfs/dnode_sync.c | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/module/zfs/dnode_sync.c b/module/zfs/dnode_sync.c
-index af636dc..f2dda86 100644
---- a/module/zfs/dnode_sync.c
-+++ b/module/zfs/dnode_sync.c
-@@ -666,9 +666,10 @@
- int i;
- ASSERT(dn->dn_next_nblkptr[txgoff] < dnp->dn_nblkptr);
- /* the blkptrs we are losing better be unallocated */
-- for (i = dn->dn_next_nblkptr[txgoff];
-- i < dnp->dn_nblkptr; i++)
-- ASSERT(BP_IS_HOLE(&dnp->dn_blkptr[i]));
-+ for (i = 0; i < dnp->dn_nblkptr; i++) {
-+ if (i >= dn->dn_next_nblkptr[txgoff])
-+ ASSERT(BP_IS_HOLE(&dnp->dn_blkptr[i]));
-+ }
- #endif
- }
- mutex_enter(&dn->dn_mtx);
---
-1.7.10
-
+++ /dev/null
-From dd26aa535b395735ca61ea2a3e618aded45eb05e Mon Sep 17 00:00:00 2001
-From: Brian Behlendorf <behlendorf1@llnl.gov>
-Date: Mon, 4 Feb 2013 16:35:54 -0800
-Subject: [PATCH] Cast 'zfs bad bloc' to ULL for x86
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Explicitly case this value to an unsigned long long for 32-bit
-systems to inform the compiler that a long type should not be
-used. Otherwise we get the following compiler error:
-
- dmu_send.c:376: error: integer constant is too large for
- ‘long’ type
-
-Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
----
- module/zfs/dmu_send.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/module/zfs/dmu_send.c b/module/zfs/dmu_send.c
-index 0cf3c4a..921c3d7 100644
---- a/module/zfs/dmu_send.c
-+++ b/module/zfs/dmu_send.c
-@@ -373,7 +373,7 @@
- for (ptr = abuf->b_data;
- (char *)ptr < (char *)abuf->b_data + blksz;
- ptr++)
-- *ptr = 0x2f5baddb10c;
-+ *ptr = 0x2f5baddb10cULL;
- } else {
- return (EIO);
- }
---
-1.7.10
-
+++ /dev/null
-diff --git a/config/kernel.m4 b/config/kernel.m4
-index 5623785..9d5aa46 100644
---- a/config/kernel.m4
-+++ b/config/kernel.m4
-@@ -16,7 +16,6 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
- ZFS_AC_KERNEL_INVALIDATE_BDEV_ARGS
- ZFS_AC_KERNEL_BDEV_LOGICAL_BLOCK_SIZE
- ZFS_AC_KERNEL_BDEV_PHYSICAL_BLOCK_SIZE
-- ZFS_AC_KERNEL_BIO_EMPTY_BARRIER
- ZFS_AC_KERNEL_BIO_FAILFAST
- ZFS_AC_KERNEL_BIO_FAILFAST_DTD
- ZFS_AC_KERNEL_REQ_FAILFAST_MASK
-diff --git a/module/zfs/vdev_disk.c b/module/zfs/vdev_disk.c
-index cbf0a4d..e902a70 100644
---- a/module/zfs/vdev_disk.c
-+++ b/module/zfs/vdev_disk.c
-@@ -604,8 +604,6 @@
- return __vdev_disk_physio(bdev, NULL, kbuf, size, offset, flags);
- }
-
--/* 2.6.24 API change */
--#ifdef HAVE_BIO_EMPTY_BARRIER
- BIO_END_IO_PROTO(vdev_disk_io_flush_completion, bio, size, rc)
- {
- zio_t *zio = bio->bi_private;
-@@ -646,13 +644,6 @@
-
- return 0;
- }
--#else
--static int
--vdev_disk_io_flush(struct block_device *bdev, zio_t *zio)
--{
-- return ENOTSUP;
--}
--#endif /* HAVE_BIO_EMPTY_BARRIER */
-
- static int
- vdev_disk_io_start(zio_t *zio)
---
-1.7.10
-
+++ /dev/null
-From d75af3c0ebb4e31ece087aeecfeff282cb6f1361 Mon Sep 17 00:00:00 2001
-From: Etienne Dechamps <etienne@edechamps.fr>
-Date: Sun, 24 Feb 2013 12:42:28 +0000
-Subject: [PATCH] Use -Werror for all kernel configure tests.
-
-As a matter of fact, we're already using -Werror for most tests because
-of a bug in kernel-bio-empty-barrier.m4 which sets -Werror without
-reverting it afterwards. This meant that all tests which ran after this
-one was using -Werror.
-
-This patch simply makes it clear that we're using -Werror and makes
-the code more readable and more predictable.
-
-Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Closes #1317
----
- config/kernel-bio-empty-barrier.m4 | 1 -
- config/kernel-bio-end-io-t-args.m4 | 3 ---
- config/kernel-security-inode-init.m4 | 6 ------
- config/kernel.m4 | 2 +-
- 4 files changed, 1 insertion(+), 11 deletions(-)
-
-diff --git a/config/kernel-bio-empty-barrier.m4 b/config/kernel-bio-empty-barrier.m4
-index 99549fe..fda16b3 100644
---- a/config/kernel-bio-empty-barrier.m4
-+++ b/config/kernel-bio-empty-barrier.m4
-@@ -4,7 +4,6 @@ dnl # Empty write barriers are now supported and we should use them.
- dnl #
- AC_DEFUN([ZFS_AC_KERNEL_BIO_EMPTY_BARRIER], [
- AC_MSG_CHECKING([whether bio_empty_barrier() is defined])
-- EXTRA_KCFLAGS="-Werror"
- ZFS_LINUX_TRY_COMPILE([
- #include <linux/bio.h>
- ],[
-diff --git a/config/kernel-bio-end-io-t-args.m4 b/config/kernel-bio-end-io-t-args.m4
-index ced4861..44e4826 100644
---- a/config/kernel-bio-end-io-t-args.m4
-+++ b/config/kernel-bio-end-io-t-args.m4
-@@ -9,8 +9,6 @@ dnl # to void.
- dnl #
- AC_DEFUN([ZFS_AC_KERNEL_BIO_END_IO_T_ARGS], [
- AC_MSG_CHECKING([whether bio_end_io_t wants 2 args])
-- tmp_flags="$EXTRA_KCFLAGS"
-- EXTRA_KCFLAGS="-Werror"
- ZFS_LINUX_TRY_COMPILE([
- #include <linux/bio.h>
- ],[
-@@ -25,5 +23,4 @@ AC_DEFUN([ZFS_AC_KERNEL_BIO_END_IO_T_ARGS], [
- ],[
- AC_MSG_RESULT(no)
- ])
-- EXTRA_KCFLAGS="$tmp_flags"
- ])
-diff --git a/config/kernel-security-inode-init.m4 b/config/kernel-security-inode-init.m4
-index c21588a..a62176d 100644
---- a/config/kernel-security-inode-init.m4
-+++ b/config/kernel-security-inode-init.m4
-@@ -7,8 +7,6 @@ dnl # security checks will just be skipped.
- dnl #
- AC_DEFUN([ZFS_AC_KERNEL_6ARGS_SECURITY_INODE_INIT_SECURITY], [
- AC_MSG_CHECKING([whether security_inode_init_security wants 6 args])
-- tmp_flags="$EXTRA_KCFLAGS"
-- EXTRA_KCFLAGS="-Werror"
- ZFS_LINUX_TRY_COMPILE([
- #include <linux/security.h>
- ],[
-@@ -27,7 +25,6 @@ AC_DEFUN([ZFS_AC_KERNEL_6ARGS_SECURITY_INODE_INIT_SECURITY], [
- ],[
- AC_MSG_RESULT(no)
- ])
-- EXTRA_KCFLAGS="$tmp_flags"
- ])
-
- dnl #
-@@ -39,8 +36,6 @@ dnl # and the EVM xattr.
- dnl #
- AC_DEFUN([ZFS_AC_KERNEL_CALLBACK_SECURITY_INODE_INIT_SECURITY], [
- AC_MSG_CHECKING([whether security_inode_init_security wants callback])
-- tmp_flags="$EXTRA_KCFLAGS"
-- EXTRA_KCFLAGS="-Werror"
- ZFS_LINUX_TRY_COMPILE([
- #include <linux/security.h>
- ],[
-@@ -57,5 +52,4 @@ AC_DEFUN([ZFS_AC_KERNEL_CALLBACK_SECURITY_INODE_INIT_SECURITY], [
- ],[
- AC_MSG_RESULT(no)
- ])
-- EXTRA_KCFLAGS="$tmp_flags"
- ])
-diff --git a/config/kernel.m4 b/config/kernel.m4
-index 6d28074..5623785 100644
---- a/config/kernel.m4
-+++ b/config/kernel.m4
-@@ -488,7 +488,7 @@ AC_DEFUN([ZFS_LINUX_COMPILE_IFELSE], [
- modpost_flag=''
- test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
- AS_IF(
-- [AC_TRY_COMMAND(cp conftest.c build && make [$2] -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag) >/dev/null && AC_TRY_COMMAND([$3])],
-+ [AC_TRY_COMMAND(cp conftest.c build && make [$2] -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag) >/dev/null && AC_TRY_COMMAND([$3])],
- [$4],
- [_AC_MSG_LOG_CONFTEST m4_ifvaln([$5],[$5])]
- )
---
-1.7.10
-
+++ /dev/null
-From ead579050140bfa010d06f6e0fea3f680c781b38 Mon Sep 17 00:00:00 2001
-From: Richard Yao <ryao@cs.stonybrook.edu>
-Date: Thu, 14 Feb 2013 18:54:04 -0500
-Subject: [PATCH] Eliminate runtime function pointer modifications in
- autotools checks
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-PaX/GrSecurity patched kernels implement a dialect of C that relies on a
-GCC plugin for enforcement. A basic idea in this dialect is that
-function pointers in structures should not change during runtime.
-This causes code that modifies function pointers at runtime to fail to
-compile in many instances. The autotools checks rely on whether or
-not small test cases compile against a given kernel. Some
-autotools checks assume some default case if other cases fail. When one
-of these autotools checks tests a PaX/GrSecurity patched kernel by
-modifying a function pointer at runtime, the default case will be used.
-
-Early detection of such situations is possible by relying on compiler
-warnings, which are compiler errors when --enable-debug is used.
-Unfortunately, very few people build ZFS with --enable-debug. The more
-common situation is that these issues manifest themselves as runtime
-failures in the form of NULL pointer exceptions.
-
-Previous patches that addressed such issues with PaX/GrSecurity
-compatibility largely relied on rewriting autotools checks to avoid
-runtime function pointer modification or the addition of PaX/GrSecurity
-specific checks. This patch takes the previous work to its logical
-conclusion by eliminating the use of runtime function pointer
-modification. This permits the removal of PaX-specific autotools checks
-in favor of ones that work across all supported kernels.
-
-This should resolve issues that were reported to occur with
-PaX/GrSecurity-patched Linux 3.7.5 kernels on Gentoo Linux.
-
-https://bugs.gentoo.org/show_bug.cgi?id=457176
-
-We should be able to prevent future regressions in PaX/GrSecurity
-compatibility by ensuring that all changes to ZFSOnLinux avoid runtime
-function pointer modification. At the same time, this does not solve the
-issue of silent failures triggering default cases in the autotools
-check, which is what permitted these regressions to become runtime
-failures in the first place. This will need to be addressed in a future
-patch.
-
-Reported-by: Marcin Mirosław <bug@mejor.pl>
-Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu>
----
- config/kernel-bdev-block-device-operations.m4 | 21 +++----
- config/kernel-bio-end-io-t-args.m4 | 6 +-
- config/kernel-create-nameidata.m4 | 12 ++--
- config/kernel-dentry-operations.m4 | 6 +-
- config/kernel-dirty-inode.m4 | 8 +--
- config/kernel-fallocate.m4 | 37 +++--------
- config/kernel-fsync.m4 | 84 ++++---------------------
- config/kernel-lookup-nameidata.m4 | 9 +--
- config/kernel-mkdir-umode-t.m4 | 7 ++-
- config/kernel-shrink.m4 | 21 +++----
- 10 files changed, 62 insertions(+), 149 deletions(-)
-
-diff --git a/config/kernel-bdev-block-device-operations.m4 b/config/kernel-bdev-block-device-operations.m4
-index 28c3032..1674af0 100644
---- a/config/kernel-bdev-block-device-operations.m4
-+++ b/config/kernel-bdev-block-device-operations.m4
-@@ -7,24 +7,21 @@ AC_DEFUN([ZFS_AC_KERNEL_BDEV_BLOCK_DEVICE_OPERATIONS], [
- EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
- ZFS_LINUX_TRY_COMPILE([
- #include <linux/blkdev.h>
-- ],[
-- int (*blk_open) (struct block_device *, fmode_t) = NULL;
-- int (*blk_release) (struct gendisk *, fmode_t) = NULL;
-- int (*blk_ioctl) (struct block_device *, fmode_t,
-- unsigned, unsigned long) = NULL;
-- int (*blk_compat_ioctl) (struct block_device *, fmode_t,
-- unsigned, unsigned long) = NULL;
-- struct block_device_operations blk_ops = {
-+
-+ int blk_open (struct block_device *bdev, fmode_t mode) { return 0; }
-+ int blk_release (struct gendisk *g, fmode_t mode) { return 0; }
-+ int blk_ioctl (struct block_device *bdev, fmode_t mode,
-+ unsigned x, unsigned long y) { return 0; }
-+ int blk_compat_ioctl (struct block_device * bdev, fmode_t mode,
-+ unsigned x, unsigned long y) { return 0; }
-+ static struct block_device_operations blk_ops __attribute__ ((unused)) = {
- .open = blk_open,
- .release = blk_release,
- .ioctl = blk_ioctl,
- .compat_ioctl = blk_compat_ioctl,
- };
-+ ],[
-
-- blk_ops.open(NULL, 0);
-- blk_ops.release(NULL, 0);
-- blk_ops.ioctl(NULL, 0, 0, 0);
-- blk_ops.compat_ioctl(NULL, 0, 0, 0);
- ],[
- AC_MSG_RESULT(struct block_device)
- AC_DEFINE(HAVE_BDEV_BLOCK_DEVICE_OPERATIONS, 1,
-diff --git a/config/kernel-bio-end-io-t-args.m4 b/config/kernel-bio-end-io-t-args.m4
-index ced4861..fe5707a 100644
---- a/config/kernel-bio-end-io-t-args.m4
-+++ b/config/kernel-bio-end-io-t-args.m4
-@@ -13,11 +13,9 @@ AC_DEFUN([ZFS_AC_KERNEL_BIO_END_IO_T_ARGS], [
- EXTRA_KCFLAGS="-Werror"
- ZFS_LINUX_TRY_COMPILE([
- #include <linux/bio.h>
-+ void wanted_end_io(struct bio * bio, int x) { return; }
- ],[
-- void (*wanted_end_io)(struct bio *, int) = NULL;
-- bio_end_io_t *local_end_io __attribute__ ((unused));
--
-- local_end_io = wanted_end_io;
-+ bio_end_io_t *local_end_io __attribute__ ((unused)) = wanted_end_io;
- ],[
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_2ARGS_BIO_END_IO_T, 1,
-diff --git a/config/kernel-create-nameidata.m4 b/config/kernel-create-nameidata.m4
-index 100f077..c779715 100644
---- a/config/kernel-create-nameidata.m4
-+++ b/config/kernel-create-nameidata.m4
-@@ -5,18 +5,18 @@ AC_DEFUN([ZFS_AC_KERNEL_CREATE_NAMEIDATA], [
- AC_MSG_CHECKING([whether iops->create() takes struct nameidata])
- ZFS_LINUX_TRY_COMPILE([
- #include <linux/fs.h>
-- ],[
- #ifdef HAVE_MKDIR_UMODE_T
-- int (*inode_create) (struct inode *,struct dentry *,
-- umode_t, struct nameidata *) = NULL;
-+ int inode_create (struct inode *inode ,struct dentry *dentry,
-+ umode_t umode, struct nameidata *nidata) { return 0; }
- #else
-- int (*inode_create) (struct inode *,struct dentry *,
-- int, struct nameidata *) = NULL;
-+ int inode_create (struct inode *inode,struct dentry *dentry,
-+ int umode, struct nameidata * nidata) { return 0; }
- #endif
-- struct inode_operations iops __attribute__ ((unused)) = {
-+ static struct inode_operations iops __attribute__ ((unused)) = {
- .create = inode_create,
- };
- ],[
-+ ],[
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_CREATE_NAMEIDATA, 1,
- [iops->create() operation takes nameidata])
-diff --git a/config/kernel-dentry-operations.m4 b/config/kernel-dentry-operations.m4
-index dfbea7d..b89c51d 100644
---- a/config/kernel-dentry-operations.m4
-+++ b/config/kernel-dentry-operations.m4
-@@ -5,12 +5,12 @@ AC_DEFUN([ZFS_AC_KERNEL_D_REVALIDATE_NAMEIDATA], [
- AC_MSG_CHECKING([whether dops->d_revalidate() takes struct nameidata])
- ZFS_LINUX_TRY_COMPILE([
- #include <linux/dcache.h>
-- ],[
-- int (*revalidate) (struct dentry *, struct nameidata *) = NULL;
-- struct dentry_operations dops __attribute__ ((unused)) = {
-+ int revalidate (struct dentry *dentry, struct nameidata *nidata) { return 0; }
-+ static struct dentry_operations dops __attribute__ ((unused)) = {
- .d_revalidate = revalidate,
- };
- ],[
-+ ],[
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_D_REVALIDATE_NAMEIDATA, 1,
- [dops->d_revalidate() operation takes nameidata])
-diff --git a/config/kernel-dirty-inode.m4 b/config/kernel-dirty-inode.m4
-index 2ededf1..86e3425 100644
---- a/config/kernel-dirty-inode.m4
-+++ b/config/kernel-dirty-inode.m4
-@@ -8,11 +8,11 @@ AC_DEFUN([ZFS_AC_KERNEL_DIRTY_INODE_WITH_FLAGS], [
- AC_MSG_CHECKING([whether sops->dirty_inode() wants flags])
- ZFS_LINUX_TRY_COMPILE([
- #include <linux/fs.h>
-+ void dirty_inode (struct inode * a, int b) { return; }
-+ static struct super_operations sops __attribute__ ((unused)) = {
-+ .dirty_inode = dirty_inode,
-+ };
- ],[
-- void (*dirty_inode) (struct inode *, int) = NULL;
-- struct super_operations sops __attribute__ ((unused));
--
-- sops.dirty_inode = dirty_inode;
- ],[
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_DIRTY_INODE_WITH_FLAGS, 1,
-diff --git a/config/kernel-fallocate.m4 b/config/kernel-fallocate.m4
-index 6ac5ae6..0041ef2 100644
---- a/config/kernel-fallocate.m4
-+++ b/config/kernel-fallocate.m4
-@@ -5,12 +5,12 @@ AC_DEFUN([ZFS_AC_KERNEL_FILE_FALLOCATE], [
- AC_MSG_CHECKING([whether fops->fallocate() exists])
- ZFS_LINUX_TRY_COMPILE([
- #include <linux/fs.h>
-- ],[
-- long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL;
-- struct file_operations fops __attribute__ ((unused)) = {
-- .fallocate = fallocate,
-+ long test_fallocate(struct file *file, int mode, loff_t offset, loff_t len) { return 0; }
-+ static const struct file_operations fops __attribute__ ((unused)) = {
-+ .fallocate = test_fallocate,
- };
- ],[
-+ ],[
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_FILE_FALLOCATE, 1, [fops->fallocate() exists])
- ],[
-@@ -25,34 +25,14 @@ AC_DEFUN([ZFS_AC_KERNEL_INODE_FALLOCATE], [
- AC_MSG_CHECKING([whether iops->fallocate() exists])
- ZFS_LINUX_TRY_COMPILE([
- #include <linux/fs.h>
-- ],[
-- long (*fallocate) (struct inode *, int, loff_t, loff_t) = NULL;
-- struct inode_operations fops __attribute__ ((unused)) = {
-- .fallocate = fallocate,
-+ long test_fallocate (struct inode *inode, int mode, loff_t offset, loff_t len) { return 0; }
-+ static const struct inode_operations fops __attribute__ ((unused)) = {
-+ .fallocate = test_fallocate,
- };
- ],[
-- AC_MSG_RESULT(yes)
-- AC_DEFINE(HAVE_INODE_FALLOCATE, 1, [fops->fallocate() exists])
-- ],[
-- AC_MSG_RESULT(no)
-- ])
--])
--
--dnl #
--dnl # PaX Linux 2.6.38 - 3.x API
--dnl #
--AC_DEFUN([ZFS_AC_PAX_KERNEL_FILE_FALLOCATE], [
-- AC_MSG_CHECKING([whether fops->fallocate() exists])
-- ZFS_LINUX_TRY_COMPILE([
-- #include <linux/fs.h>
-- ],[
-- long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL;
-- struct file_operations_no_const fops __attribute__ ((unused)) = {
-- .fallocate = fallocate,
-- };
- ],[
- AC_MSG_RESULT(yes)
-- AC_DEFINE(HAVE_FILE_FALLOCATE, 1, [fops->fallocate() exists])
-+ AC_DEFINE(HAVE_INODE_FALLOCATE, 1, [fops->fallocate() exists])
- ],[
- AC_MSG_RESULT(no)
- ])
-@@ -65,5 +45,4 @@ dnl #
- AC_DEFUN([ZFS_AC_KERNEL_FALLOCATE], [
- ZFS_AC_KERNEL_FILE_FALLOCATE
- ZFS_AC_KERNEL_INODE_FALLOCATE
-- ZFS_AC_PAX_KERNEL_FILE_FALLOCATE
- ])
-diff --git a/config/kernel-fsync.m4 b/config/kernel-fsync.m4
-index ca00d93..9ac0c79 100644
---- a/config/kernel-fsync.m4
-+++ b/config/kernel-fsync.m4
-@@ -4,11 +4,11 @@ dnl #
- AC_DEFUN([ZFS_AC_KERNEL_FSYNC_WITH_DENTRY], [
- ZFS_LINUX_TRY_COMPILE([
- #include <linux/fs.h>
-+ int test_fsync (struct file *f, struct dentry *dentry, int x) { return 0; }
-+ static const struct file_operations fops __attribute__ ((unused)) = {
-+ .fsync = test_fsync,
-+ };
- ],[
-- int (*fsync) (struct file *, struct dentry *, int) = NULL;
-- struct file_operations fops __attribute__ ((unused));
--
-- fops.fsync = fsync;
- ],[
- AC_MSG_RESULT([dentry])
- AC_DEFINE(HAVE_FSYNC_WITH_DENTRY, 1,
-@@ -23,11 +23,11 @@ dnl #
- AC_DEFUN([ZFS_AC_KERNEL_FSYNC_WITHOUT_DENTRY], [
- ZFS_LINUX_TRY_COMPILE([
- #include <linux/fs.h>
-+ int test_fsync (struct file *f, int x) { return 0; }
-+ static const struct file_operations fops __attribute__ ((unused)) = {
-+ .fsync = test_fsync,
-+ };
- ],[
-- int (*fsync) (struct file *, int) = NULL;
-- struct file_operations fops __attribute__ ((unused));
--
-- fops.fsync = fsync;
- ],[
- AC_MSG_RESULT([no dentry])
- AC_DEFINE(HAVE_FSYNC_WITHOUT_DENTRY, 1,
-@@ -42,68 +42,11 @@ dnl #
- AC_DEFUN([ZFS_AC_KERNEL_FSYNC_RANGE], [
- ZFS_LINUX_TRY_COMPILE([
- #include <linux/fs.h>
-+ int test_fsync (struct file *f, loff_t a, loff_t b, int c) { return 0; }
-+ static const struct file_operations fops __attribute__ ((unused)) = {
-+ .fsync = test_fsync,
-+ };
- ],[
-- int (*fsync) (struct file *, loff_t, loff_t, int) = NULL;
-- struct file_operations fops __attribute__ ((unused));
--
-- fops.fsync = fsync;
-- ],[
-- AC_MSG_RESULT([range])
-- AC_DEFINE(HAVE_FSYNC_RANGE, 1,
-- [fops->fsync() with range])
-- ],[
-- ])
--])
--
--dnl #
--dnl # PaX Linux 2.6.x - 2.6.34 API
--dnl #
--AC_DEFUN([ZFS_AC_PAX_KERNEL_FSYNC_WITH_DENTRY], [
-- ZFS_LINUX_TRY_COMPILE([
-- #include <linux/fs.h>
-- ],[
-- int (*fsync) (struct file *, struct dentry *, int) = NULL;
-- file_operations_no_const fops __attribute__ ((unused));
--
-- fops.fsync = fsync;
-- ],[
-- AC_MSG_RESULT([dentry])
-- AC_DEFINE(HAVE_FSYNC_WITH_DENTRY, 1,
-- [fops->fsync() with dentry])
-- ],[
-- ])
--])
--
--dnl #
--dnl # PaX Linux 2.6.35 - Linux 3.0 API
--dnl #
--AC_DEFUN([ZFS_AC_PAX_KERNEL_FSYNC_WITHOUT_DENTRY], [
-- ZFS_LINUX_TRY_COMPILE([
-- #include <linux/fs.h>
-- ],[
-- int (*fsync) (struct file *, int) = NULL;
-- file_operations_no_const fops __attribute__ ((unused));
--
-- fops.fsync = fsync;
-- ],[
-- AC_MSG_RESULT([no dentry])
-- AC_DEFINE(HAVE_FSYNC_WITHOUT_DENTRY, 1,
-- [fops->fsync() without dentry])
-- ],[
-- ])
--])
--
--dnl #
--dnl # PaX Linux 3.1 - 3.x API
--dnl #
--AC_DEFUN([ZFS_AC_PAX_KERNEL_FSYNC_RANGE], [
-- ZFS_LINUX_TRY_COMPILE([
-- #include <linux/fs.h>
-- ],[
-- int (*fsync) (struct file *, loff_t, loff_t, int) = NULL;
-- file_operations_no_const fops __attribute__ ((unused));
--
-- fops.fsync = fsync;
- ],[
- AC_MSG_RESULT([range])
- AC_DEFINE(HAVE_FSYNC_RANGE, 1,
-@@ -117,7 +60,4 @@ AC_DEFUN([ZFS_AC_KERNEL_FSYNC], [
- ZFS_AC_KERNEL_FSYNC_WITH_DENTRY
- ZFS_AC_KERNEL_FSYNC_WITHOUT_DENTRY
- ZFS_AC_KERNEL_FSYNC_RANGE
-- ZFS_AC_PAX_KERNEL_FSYNC_WITH_DENTRY
-- ZFS_AC_PAX_KERNEL_FSYNC_WITHOUT_DENTRY
-- ZFS_AC_PAX_KERNEL_FSYNC_RANGE
- ])
-diff --git a/config/kernel-lookup-nameidata.m4 b/config/kernel-lookup-nameidata.m4
-index 5e30be4..20b8cca 100644
---- a/config/kernel-lookup-nameidata.m4
-+++ b/config/kernel-lookup-nameidata.m4
-@@ -5,13 +5,14 @@ AC_DEFUN([ZFS_AC_KERNEL_LOOKUP_NAMEIDATA], [
- AC_MSG_CHECKING([whether iops->lookup() takes struct nameidata])
- ZFS_LINUX_TRY_COMPILE([
- #include <linux/fs.h>
-- ],[
-- struct dentry * (*inode_lookup) (struct inode *,struct dentry *,
-- struct nameidata *) = NULL;
-- struct inode_operations iops __attribute__ ((unused)) = {
-+ struct dentry * inode_lookup (struct inode * inode,
-+ struct dentry * dentry, struct nameidata * nidata)
-+ { return NULL; }
-+ static struct inode_operations iops __attribute__ ((unused)) = {
- .lookup = inode_lookup,
- };
- ],[
-+ ],[
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_LOOKUP_NAMEIDATA, 1,
- [iops->lookup() operation takes nameidata])
-diff --git a/config/kernel-mkdir-umode-t.m4 b/config/kernel-mkdir-umode-t.m4
-index dd5d94b..ce8aa8f 100644
---- a/config/kernel-mkdir-umode-t.m4
-+++ b/config/kernel-mkdir-umode-t.m4
-@@ -10,12 +10,13 @@ AC_DEFUN([ZFS_AC_KERNEL_MKDIR_UMODE_T], [
- AC_MSG_CHECKING([whether iops->create()/mkdir()/mknod() take umode_t])
- ZFS_LINUX_TRY_COMPILE([
- #include <linux/fs.h>
-- ],[
-- int (*mkdir) (struct inode *,struct dentry *,umode_t) = NULL;
-- struct inode_operations iops __attribute__ ((unused)) = {
-+ int mkdir (struct inode * inode, struct dentry * dentry, umode_t umode)
-+ { return 0; }
-+ static struct inode_operations iops __attribute__ ((unused)) = {
- .mkdir = mkdir,
- };
- ],[
-+ ],[
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_MKDIR_UMODE_T, 1,
- [iops->create()/mkdir()/mknod() take umode_t])
-diff --git a/config/kernel-shrink.m4 b/config/kernel-shrink.m4
-index ea748c9..ce4b965 100644
---- a/config/kernel-shrink.m4
-+++ b/config/kernel-shrink.m4
-@@ -8,15 +8,14 @@ AC_DEFUN([ZFS_AC_KERNEL_SHRINK], [
- AC_MSG_CHECKING([whether super_block has s_shrink])
- ZFS_LINUX_TRY_COMPILE([
- #include <linux/fs.h>
-- ],[
-- int (*shrink)(struct shrinker *, struct shrink_control *sc)
-- __attribute__ ((unused)) = NULL;
-- struct super_block sb __attribute__ ((unused)) = {
-+ int shrink(struct shrinker * s, struct shrink_control *sc) { return 0; }
-+ static struct super_block sb __attribute__ ((unused)) = {
- .s_shrink.shrink = shrink,
- .s_shrink.seeks = DEFAULT_SEEKS,
- .s_shrink.batch = 0,
- };
- ],[
-+ ],[
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_SHRINK, 1, [struct super_block has s_shrink])
-
-@@ -29,13 +28,12 @@ AC_DEFUN([ZFS_AC_KERNEL_NR_CACHED_OBJECTS], [
- AC_MSG_CHECKING([whether sops->nr_cached_objects() exists])
- ZFS_LINUX_TRY_COMPILE([
- #include <linux/fs.h>
-- ],[
-- int (*nr_cached_objects)(struct super_block *)
-- __attribute__ ((unused)) = NULL;
-- struct super_operations sops __attribute__ ((unused)) = {
-+ int nr_cached_objects(struct super_block * sb) { return 0; }
-+ static struct super_operations sops __attribute__ ((unused)) = {
- .nr_cached_objects = nr_cached_objects,
- };
- ],[
-+ ],[
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_NR_CACHED_OBJECTS, 1,
- [sops->nr_cached_objects() exists])
-@@ -48,13 +46,12 @@ AC_DEFUN([ZFS_AC_KERNEL_FREE_CACHED_OBJECTS], [
- AC_MSG_CHECKING([whether sops->free_cached_objects() exists])
- ZFS_LINUX_TRY_COMPILE([
- #include <linux/fs.h>
-- ],[
-- void (*free_cached_objects)(struct super_block *, int)
-- __attribute__ ((unused)) = NULL;
-- struct super_operations sops __attribute__ ((unused)) = {
-+ void free_cached_objects(struct super_block * sb, int x) { return; }
-+ static struct super_operations sops __attribute__ ((unused)) = {
- .free_cached_objects = free_cached_objects,
- };
- ],[
-+ ],[
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_FREE_CACHED_OBJECTS, 1,
- [sops->free_cached_objects() exists])
---
-1.7.10
-
+++ /dev/null
-commit 3d8c9c9de0a5e1f1b496fcef2750a01a45860b04
-Author: Richard Yao <ryao@cs.stonybrook.edu>
-Date: Mon Mar 4 15:52:11 2013 -0500
-
- Linux 3.9 compat: Undefine GCC_VERSION
-
- The mainline kernel started defining GCC_VERSION with commit
- torvalds/linux@3f3f8d2f48acfd8ed3b8e6b7377935da57b27b16. Unfortunately,
- LZ4 also defines this macro, but the two defintions are incompatible. We
- undefine GCC_VERSION in lz4.c to handle this.
-
- Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu>
-
-diff --git a/module/zfs/lz4.c b/module/zfs/lz4.c
-index b9850c0..8afaad1 100644
---- a/module/zfs/lz4.c
-+++ b/module/zfs/lz4.c
-@@ -243,6 +243,14 @@ lz4_decompress(void *s_start, void *d_start, size_t s_len, size_t d_len, int n)
- /* Disable restrict */
- #define restrict
-
-+/*
-+ * Linux : GCC_VERSION is defined as of 3.9-rc1, so undefine it.
-+ * torvalds/linux@3f3f8d2f48acfd8ed3b8e6b7377935da57b27b16
-+ */
-+#ifdef GCC_VERSION
-+#undef GCC_VERSION
-+#endif
-+
- #define GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__)
-
- #if (GCC_VERSION >= 302) || (__INTEL_COMPILER >= 800) || defined(__clang__)
\ No newline at end of file
+++ /dev/null
-From 7f235381a0e501df55ebe2de10b69124e928d175 Mon Sep 17 00:00:00 2001
-From: Brian Behlendorf <behlendorf1@llnl.gov>
-Date: Mon, 11 Feb 2013 12:55:24 -0800
-Subject: [PATCH] Add explicit MAXNAMELEN check
-
-It turns out that the Linux VFS doesn't strictly handle all cases
-where a component path name exceeds MAXNAMELEN. It does however
-appear to correctly handle MAXPATHLEN for us.
-
-The right way to handle this appears to be to add an explicit
-check to the zpl_lookup() function. Several in-tree filesystems
-handle this case the same way.
-
-Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Issue #1279
----
- module/zfs/zpl_inode.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/module/zfs/zpl_inode.c b/module/zfs/zpl_inode.c
-index e406288..8c8ec24 100644
---- a/module/zfs/zpl_inode.c
-+++ b/module/zfs/zpl_inode.c
-@@ -41,6 +41,9 @@
- struct inode *ip;
- int error;
-
-+ if (dlen(dentry) > ZFS_MAXNAMELEN)
-+ return ERR_PTR(-ENAMETOOLONG);
-+
- crhold(cr);
- error = -zfs_lookup(dir, dname(dentry), &ip, 0, cr, NULL, NULL);
- ASSERT3S(error, <=, 0);
---
-1.7.10
-
+++ /dev/null
-From 546c978bbd3f132a88609cab15ec0e954eaa62b8 Mon Sep 17 00:00:00 2001
-From: Brian Behlendorf <behlendorf1@llnl.gov>
-Date: Thu, 21 Feb 2013 12:14:44 -0800
-Subject: [PATCH] Enable zfs_arc_memory_throttle_disable by default
-
-The zfs_arc_memory_throttle_disable module option was introduced
-by commit 0c5493d47059f25ce9dbf20c9fe87655f55102a1 to resolve a
-memory miscalculation which could result in the txg_sync thread
-spinning.
-
-When this was first introduced the default behavior was left
-unchanged until enough real world usage confirmed there were no
-unexpected issues. We've now reached that point. Linux's
-direct reclaim is working as expected so we're enabling this
-behavior by default.
-
-This helps pave the way to retire the spl_kmem_availrmem()
-functionality in the SPL layer. This was the only caller.
-
-Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Issue #938
----
- module/zfs/arc.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/module/zfs/arc.c b/module/zfs/arc.c
-index 09924db..b7499ee 100644
---- a/module/zfs/arc.c
-+++ b/module/zfs/arc.c
-@@ -189,7 +189,7 @@
- int zfs_arc_grow_retry = 0;
- int zfs_arc_shrink_shift = 0;
- int zfs_arc_p_min_shift = 0;
--int zfs_arc_memory_throttle_disable = 0;
-+int zfs_arc_memory_throttle_disable = 1;
- int zfs_disable_dup_eviction = 0;
- int zfs_arc_meta_prune = 0;
-
---
-1.8.1.5
-
+++ /dev/null
-From 3db3ff4a787acf068b122562fb5be5aecec2611f Mon Sep 17 00:00:00 2001
-From: Richard Yao <ryao@gentoo.org>
-Date: Tue, 2 Jul 2013 00:07:15 -0400
-Subject: [PATCH] Use MAXPATHLEN instead of sizeof in snprintf
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This silences a GCC 4.8.0 warning by fixing a programming error
-caught by static analysis:
-
-../../cmd/ztest/ztest.c: In function ‘ztest_vdev_aux_add_remove’:
-../../cmd/ztest/ztest.c:2584:33: error: argument to ‘sizeof’
- in ‘snprintf’ call is the same expression as the destination;
- did you mean to provide an explicit length?
- [-Werror=sizeof-pointer-memaccess]
- (void) snprintf(path, sizeof (path), ztest_aux_template,
- ^
-
-Signed-off-by: Richard Yao <ryao@gentoo.org>
-Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Closes #1480
----
- cmd/ztest/ztest.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c
-index b38d7b1..93a5f1e 100644
---- a/cmd/ztest/ztest.c
-+++ b/cmd/ztest/ztest.c
-@@ -2581,7 +2581,7 @@ enum ztest_object {
- zs->zs_vdev_aux = 0;
- for (;;) {
- int c;
-- (void) snprintf(path, sizeof (path), ztest_aux_template,
-+ (void) snprintf(path, MAXPATHLEN, ztest_aux_template,
- ztest_opts.zo_dir, ztest_opts.zo_pool, aux,
- zs->zs_vdev_aux);
- for (c = 0; c < sav->sav_count; c++)
---
-1.8.1.6
-
+++ /dev/null
-From 8f1e11b6105bf46a4258958eb3dcae2ab21ed8b2 Mon Sep 17 00:00:00 2001
-From: Caleb James DeLisle <calebdelisle@lavabit.com>
-Date: Tue, 16 Apr 2013 05:23:39 -0400
-Subject: [PATCH] Remove .readdir from zpl_file_operations table
-
-The zpl_readdir() function shouldn't be registered as part of
-the zpl_file_operations table, it must only be part of the
-zpl_dir_file_operations table. By removing this callback
-the VFS will now correctly return ENOTDIR when calling
-getdents() on a file.
-
-Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Closes #1404
----
- module/zfs/zpl_file.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/module/zfs/zpl_file.c b/module/zfs/zpl_file.c
-index 9c27b7f..db6a72c 100644
---- a/module/zfs/zpl_file.c
-+++ b/module/zfs/zpl_file.c
-@@ -446,7 +446,6 @@
- .llseek = generic_file_llseek,
- .read = zpl_read,
- .write = zpl_write,
-- .readdir = zpl_readdir,
- .mmap = zpl_mmap,
- .fsync = zpl_fsync,
- #ifdef HAVE_FILE_FALLOCATE
---
-1.8.1.6
-
+++ /dev/null
-From 57f5a2008e2e6acf58934cf43c5fdca0faffa73e Mon Sep 17 00:00:00 2001
-From: Brian Behlendorf <behlendorf1@llnl.gov>
-Date: Thu, 25 Apr 2013 16:29:22 -0700
-Subject: [PATCH] Fix txg_quiesce thread deadlock
-
-A deadlock was accidentally introduced by commit e95853a which
-can occur when the system is under memory pressure. What happens
-is that while the txg_quiesce thread is holding the tx->tx_cpu
-locks it enters memory reclaim. In the context of this memory
-reclaim it then issues synchronous I/O to a ZVOL swap device.
-Because the txg_quiesce thread is holding the tx->tx_cpu locks
-a new txg cannot be opened to handle the I/O. Deadlock.
-
-The fix is straight forward. Move the memory allocation outside
-the critical region where the tx->tx_cpu locks are held. And for
-good measure change the offending allocation to KM_PUSHPAGE to
-ensure it never attempts to issue I/O during reclaim.
-
-Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Issue #1274
----
- module/zfs/dsl_pool.c | 2 +-
- module/zfs/txg.c | 14 +++++++-------
- 2 files changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/module/zfs/dsl_pool.c b/module/zfs/dsl_pool.c
-index 704f034..771b265 100644
---- a/module/zfs/dsl_pool.c
-+++ b/module/zfs/dsl_pool.c
-@@ -143,7 +143,7 @@
- {
- txg_history_t *th, *rm;
-
-- th = kmem_zalloc(sizeof(txg_history_t), KM_SLEEP);
-+ th = kmem_zalloc(sizeof(txg_history_t), KM_PUSHPAGE);
- mutex_init(&th->th_lock, NULL, MUTEX_DEFAULT, NULL);
- th->th_kstat.txg = txg;
- th->th_kstat.state = TXG_STATE_OPEN;
-diff --git a/module/zfs/txg.c b/module/zfs/txg.c
-index c7c3df3..7c820af 100644
---- a/module/zfs/txg.c
-+++ b/module/zfs/txg.c
-@@ -367,6 +367,13 @@
- tx->tx_open_txg++;
-
- /*
-+ * Now that we've incremented tx_open_txg, we can let threads
-+ * enter the next transaction group.
-+ */
-+ for (c = 0; c < max_ncpus; c++)
-+ mutex_exit(&tx->tx_cpu[c].tc_lock);
-+
-+ /*
- * Measure how long the txg was open and replace the kstat.
- */
- th = dsl_pool_txg_history_get(dp, txg);
-@@ -376,13 +383,6 @@
- dsl_pool_txg_history_add(dp, tx->tx_open_txg);
-
- /*
-- * Now that we've incremented tx_open_txg, we can let threads
-- * enter the next transaction group.
-- */
-- for (c = 0; c < max_ncpus; c++)
-- mutex_exit(&tx->tx_cpu[c].tc_lock);
--
-- /*
- * Quiesce the transaction group by waiting for everyone to txg_exit().
- */
- start = gethrtime();
---
-1.8.1.6
-
+++ /dev/null
-From f706421173c571371afff5e2a2ee0784c5e3f95d Mon Sep 17 00:00:00 2001
-From: Brian Behlendorf <behlendorf1@llnl.gov>
-Date: Wed, 17 Apr 2013 13:07:36 -0700
-Subject: [PATCH] Correctly return ERANGE in getxattr(2)
-
-According to the getxattr(2) man page the ERANGE errno should be
-returned when the size of the value buffer is to small to hold the
-result. Prior to this patch the implementation would just truncate
-the value to size bytes.
-
-Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Closes #1408
----
- module/zfs/zpl_xattr.c | 12 ++++++++++--
- 1 file changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/module/zfs/zpl_xattr.c b/module/zfs/zpl_xattr.c
-index c03764f..a7e38e6 100644
---- a/module/zfs/zpl_xattr.c
-+++ b/module/zfs/zpl_xattr.c
-@@ -225,6 +225,11 @@
- goto out;
- }
-
-+ if (size < i_size_read(xip)) {
-+ error = -ERANGE;
-+ goto out;
-+ }
-+
- error = zpl_read_common(xip, value, size, 0, UIO_SYSSPACE, 0, cr);
- out:
- if (xip)
-@@ -263,9 +268,12 @@
- if (!size)
- return (nv_size);
-
-- memcpy(value, nv_value, MIN(size, nv_size));
-+ if (size < nv_size)
-+ return (-ERANGE);
-+
-+ memcpy(value, nv_value, nv_size);
-
-- return (MIN(size, nv_size));
-+ return (nv_size);
- }
-
- static int
---
-1.8.1.6
-
+++ /dev/null
-From 0377189b884fab7db02a95088e05712c7cf336f7 Mon Sep 17 00:00:00 2001
-From: Brian Behlendorf <behlendorf1@llnl.gov>
-Date: Wed, 8 May 2013 09:20:04 -0700
-Subject: [PATCH] Only check directory xattr on ENOENT
-
-When SA xattrs are enabled only fallback to checking the directory
-xattrs when the name is not found as a SA xattr. Otherwise, the SA
-error which should be returned to the caller is overwritten by the
-directory xattr errors. Positive return values indicating success
-will also be immediately returned.
-
-In the case of #1437 the ERANGE error was being correctly returned
-by zpl_xattr_get_sa() only to be overridden with ENOENT which was
-returned by the subsequent unnessisary call to zpl_xattr_get_dir().
-
-Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Closes #1437
----
- module/zfs/zpl_xattr.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/module/zfs/zpl_xattr.c b/module/zfs/zpl_xattr.c
-index a7e38e6..eb2c00d 100644
---- a/module/zfs/zpl_xattr.c
-+++ b/module/zfs/zpl_xattr.c
-@@ -288,7 +288,7 @@
-
- if (zsb->z_use_sa && zp->z_is_sa) {
- error = zpl_xattr_get_sa(ip, name, value, size);
-- if (error >= 0)
-+ if (error != -ENOENT)
- goto out;
- }
-
---
-1.8.1.6
-
+++ /dev/null
-From ab68b6e5db29abcd20c0c7b12a8c2fa570031c8b Mon Sep 17 00:00:00 2001
-From: Tim Chase <tim@chase2k.com>
-Date: Mon, 24 Jun 2013 22:03:56 -0500
-Subject: [PATCH] Fix zfs_sb_teardown/zfs_resume_fs NULL dereference
-
-Fix a pair of conditions in which a concurrent umount can cause
-NULL pointer dereferences:
-
-* zfs_sb_teardown - prevent a NULL dereference by not calling
- dmu_objset_pool with a null z_os.
-
-* zfs_resume_fs - don't try to unmount with a null z_os. This
- change makes the ZoL code more consistent
- with both Illumos and FreeBSD.
-
-Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Closes #1543
----
- module/zfs/zfs_vfsops.c | 13 ++++++++-----
- 1 file changed, 8 insertions(+), 5 deletions(-)
-
-diff --git a/module/zfs/zfs_vfsops.c b/module/zfs/zfs_vfsops.c
-index e618f2b..602c332 100644
---- a/module/zfs/zfs_vfsops.c
-+++ b/module/zfs/zfs_vfsops.c
-@@ -1056,10 +1056,12 @@
- }
-
- /*
-- * Drain the iput_taskq to ensure all active references to the
-+ * If someone has not already unmounted this file system,
-+ * drain the iput_taskq to ensure all active references to the
- * zfs_sb_t have been handled only then can it be safely destroyed.
- */
-- taskq_wait(dsl_pool_iput_taskq(dmu_objset_pool(zsb->z_os)));
-+ if (zsb->z_os)
-+ taskq_wait(dsl_pool_iput_taskq(dmu_objset_pool(zsb->z_os)));
-
- /*
- * Close the zil. NB: Can't close the zil while zfs_inactive
-@@ -1480,10 +1482,11 @@
-
- if (err) {
- /*
-- * Since we couldn't reopen zfs_sb_t, force
-- * unmount this file system.
-+ * Since we couldn't reopen zfs_sb_t or, setup the
-+ * sa framework, force unmount this file system.
- */
-- (void) zfs_umount(zsb->z_sb);
-+ if (zsb->z_os)
-+ (void) zfs_umount(zsb->z_sb);
- }
- return (err);
- }
---
-1.8.1.6
-
+++ /dev/null
-From 76351672c222f28ea1b681097a9eff58a6791555 Mon Sep 17 00:00:00 2001
-From: Brian Behlendorf <behlendorf1@llnl.gov>
-Date: Thu, 11 Jul 2013 14:11:32 -0700
-Subject: [PATCH] Fix zfsctl_expire_snapshot() deadlock
-
-It is possible for an automounted snapshot which is expiring to
-deadlock with a manual unmount of the snapshot. This can occur
-because taskq_cancel_id() will block if the task is currently
-executing until it completes. But it will never complete because
-zfsctl_unmount_snapshot() is holding the zsb->z_ctldir_lock which
-zfsctl_expire_snapshot() must acquire.
-
----------------------- z_unmount/0:2153 ---------------------
- mutex_lock <blocking on zsb->z_ctldir_lock>
- zfsctl_unmount_snapshot
- zfsctl_expire_snapshot
- taskq_thread
-
-------------------------- zfs:10690 -------------------------
- taskq_wait_id <waiting for z_unmount to exit>
- taskq_cancel_id
- __zfsctl_unmount_snapshot
- zfsctl_unmount_snapshot <takes zsb->z_ctldir_lock>
- zfs_unmount_snap
- zfs_ioc_destroy_snaps_nvl
- zfsdev_ioctl
- do_vfs_ioctl
-
-We resolve the deadlock by dropping the zsb->z_ctldir_lock before
-calling __zfsctl_unmount_snapshot(). The lock is only there to
-prevent concurrent modification to the zsb->z_ctldir_snaps AVL
-tree. Moreover, we're careful to remove the zfs_snapentry_t from
-the AVL tree before dropping the lock which ensures no other tasks
-can find it. On failure it's added back to the tree.
-
-Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Signed-off-by: Chris Dunlap <cdunlap@llnl.gov>
-Closes #1527
----
- module/zfs/zfs_ctldir.c | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/module/zfs/zfs_ctldir.c b/module/zfs/zfs_ctldir.c
-index 4fa530b..168f853 100644
---- a/module/zfs/zfs_ctldir.c
-+++ b/module/zfs/zfs_ctldir.c
-@@ -732,7 +732,11 @@ struct inode *
- sep = avl_find(&zsb->z_ctldir_snaps, &search, NULL);
- if (sep) {
- avl_remove(&zsb->z_ctldir_snaps, sep);
-+ mutex_exit(&zsb->z_ctldir_lock);
-+
- error = __zfsctl_unmount_snapshot(sep, flags);
-+
-+ mutex_enter(&zsb->z_ctldir_lock);
- if (error == EBUSY)
- avl_add(&zsb->z_ctldir_snaps, sep);
- else
-@@ -767,7 +771,11 @@ struct inode *
- while (sep != NULL) {
- next = AVL_NEXT(&zsb->z_ctldir_snaps, sep);
- avl_remove(&zsb->z_ctldir_snaps, sep);
-+ mutex_exit(&zsb->z_ctldir_lock);
-+
- error = __zfsctl_unmount_snapshot(sep, flags);
-+
-+ mutex_enter(&zsb->z_ctldir_lock);
- if (error == EBUSY) {
- avl_add(&zsb->z_ctldir_snaps, sep);
- (*count)++;
---
-1.8.1.6
-
+++ /dev/null
-diff --git a/module/zfs/spa.c b/module/zfs/spa.c
-index e986e92..65f78b7 100644
---- a/module/zfs/spa.c
-+++ b/module/zfs/spa.c
-@@ -64,6 +64,7 @@
- #include <sys/zfs_ioctl.h>
- #include <sys/dsl_scan.h>
- #include <sys/zfeature.h>
-+#include <sys/zvol.h>
-
- #ifdef _KERNEL
- #include <sys/bootprops.h>
-@@ -2856,6 +2857,7 @@ spa_open_common(const char *pool, spa_t **spapp, void *tag, nvlist_t *nvpolicy,
- spa_load_state_t state = SPA_LOAD_OPEN;
- int error;
- int locked = B_FALSE;
-+ int firstopen = B_FALSE;
-
- *spapp = NULL;
-
-@@ -2879,6 +2881,8 @@ spa_open_common(const char *pool, spa_t **spapp, void *tag, nvlist_t *nvpolicy,
- if (spa->spa_state == POOL_STATE_UNINITIALIZED) {
- zpool_rewind_policy_t policy;
-
-+ firstopen = B_TRUE;
-+
- zpool_get_rewind_policy(nvpolicy ? nvpolicy : spa->spa_config,
- &policy);
- if (policy.zrp_request & ZPOOL_DO_REWIND)
-@@ -2953,6 +2957,11 @@ spa_open_common(const char *pool, spa_t **spapp, void *tag, nvlist_t *nvpolicy,
- mutex_exit(&spa_namespace_lock);
- }
-
-+#ifdef _KERNEL
-+ if (firstopen)
-+ zvol_create_minors(spa->spa_name);
-+#endif
-+
- *spapp = spa;
-
- return (0);
-@@ -4010,6 +4019,10 @@ spa_import(const char *pool, nvlist_t *config, nvlist_t *props, uint64_t flags)
- mutex_exit(&spa_namespace_lock);
- spa_history_log_version(spa, LOG_POOL_IMPORT);
-
-+#ifdef _KERNEL
-+ zvol_create_minors(pool);
-+#endif
-+
- return (0);
- }
-
-diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c
-index 1226b2c..a9184a1 100644
---- a/module/zfs/zfs_ioctl.c
-+++ b/module/zfs/zfs_ioctl.c
-@@ -1268,9 +1268,6 @@ zfs_ioc_pool_import(zfs_cmd_t *zc)
- error = err;
- }
-
-- if (error == 0)
-- zvol_create_minors(zc->zc_name);
--
- nvlist_free(config);
-
- if (props)
-diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c
-index 43a7bb6..e35c91b 100644
---- a/module/zfs/zvol.c
-+++ b/module/zfs/zvol.c
-@@ -1215,6 +1215,9 @@ zvol_alloc(dev_t dev, const char *name)
-
- zv = kmem_zalloc(sizeof (zvol_state_t), KM_SLEEP);
-
-+ spin_lock_init(&zv->zv_lock);
-+ list_link_init(&zv->zv_next);
-+
- zv->zv_queue = blk_init_queue(zvol_request, &zv->zv_lock);
- if (zv->zv_queue == NULL)
- goto out_kmem;
-@@ -1248,9 +1251,6 @@ zvol_alloc(dev_t dev, const char *name)
- sizeof (rl_t), offsetof(rl_t, r_node));
- zv->zv_znode.z_is_zvol = TRUE;
-
-- spin_lock_init(&zv->zv_lock);
-- list_link_init(&zv->zv_next);
--
- zv->zv_disk->major = zvol_major;
- zv->zv_disk->first_minor = (dev & MINORMASK);
- zv->zv_disk->fops = &zvol_ops;
-@@ -1561,30 +1561,36 @@ zvol_init(void)
- {
- int error;
-
-+ list_create(&zvol_state_list, sizeof (zvol_state_t),
-+ offsetof(zvol_state_t, zv_next));
-+ mutex_init(&zvol_state_lock, NULL, MUTEX_DEFAULT, NULL);
-+
- zvol_taskq = taskq_create(ZVOL_DRIVER, zvol_threads, maxclsyspri,
- zvol_threads, INT_MAX, TASKQ_PREPOPULATE);
- if (zvol_taskq == NULL) {
- printk(KERN_INFO "ZFS: taskq_create() failed\n");
-- return (-ENOMEM);
-+ error = -ENOMEM;
-+ goto out1;
- }
-
- error = register_blkdev(zvol_major, ZVOL_DRIVER);
- if (error) {
- printk(KERN_INFO "ZFS: register_blkdev() failed %d\n", error);
-- taskq_destroy(zvol_taskq);
-- return (error);
-+ goto out2;
- }
-
- blk_register_region(MKDEV(zvol_major, 0), 1UL << MINORBITS,
- THIS_MODULE, zvol_probe, NULL, NULL);
-
-- mutex_init(&zvol_state_lock, NULL, MUTEX_DEFAULT, NULL);
-- list_create(&zvol_state_list, sizeof (zvol_state_t),
-- offsetof(zvol_state_t, zv_next));
-+ return (0);
-
-- (void) zvol_create_minors(NULL);
-+out2:
-+ taskq_destroy(zvol_taskq);
-+out1:
-+ mutex_destroy(&zvol_state_lock);
-+ list_destroy(&zvol_state_list);
-
-- return (0);
-+ return (error);
- }
-
- void
-diff --git a/scripts/zconfig.sh b/scripts/zconfig.sh
-index 141348c..281166c 100755
---- a/scripts/zconfig.sh
-+++ b/scripts/zconfig.sh
-@@ -264,8 +264,9 @@ test_4() {
- zconfig_zvol_device_stat 0 ${POOL_NAME} ${FULL_ZVOL_NAME} \
- ${FULL_SNAP_NAME} ${FULL_CLONE_NAME} || fail 9
-
-- # Load the modules, wait 1 second for udev
-+ # Load the modules, list the pools to ensure they are opened
- ${ZFS_SH} zfs="spa_config_path=${TMP_CACHE}" || fail 10
-+ ${ZPOOL} list &>/dev/null
-
- # Verify the devices were created
- zconfig_zvol_device_stat 10 ${POOL_NAME} ${FULL_ZVOL_NAME} \
-diff --git a/udev/rules.d/90-zfs.rules.in b/udev/rules.d/90-zfs.rules.in
-index 52e1d63..a2715d2 100644
---- a/udev/rules.d/90-zfs.rules.in
-+++ b/udev/rules.d/90-zfs.rules.in
-@@ -1,4 +1,4 @@
--SUBSYSTEM!="block", GOTO="zfs_end"
-+SUBSYSTEM!="block|misc", GOTO="zfs_end"
- ACTION!="add|change", GOTO="zfs_end"
-
- ENV{ID_FS_TYPE}=="zfs", RUN+="/sbin/modprobe zfs"
-@@ -7,4 +7,6 @@ ENV{ID_FS_TYPE}=="zfs_member", RUN+="/sbin/modprobe zfs"
- KERNEL=="null", SYMLINK+="root"
- SYMLINK=="null", SYMLINK+="root"
-
-+SUBSYSTEM=="misc", KERNEL=="zfs", RUN+="@sbindir@/zpool list"
-+
- LABEL="zfs_end"
+++ /dev/null
-commit a1d9543a39942be56879ca9338078afc77c25cea
-Author: Chris Dunlop <chris@onthe.net.au>
-Date: Mon Jun 3 16:58:52 2013 +1000
-
- 3.10 API change: block_device_operations->release() returns void
-
- Linux kernel commit torvalds/linux@db2a144 changed the return type
- of block_device_operations->release() to void. Detect the expected
- prototype and defined our callout accordingly.
-
- Signed-off-by: Chris Dunlop <chris@onthe.net.au>
- Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
- Closes #1494
-
-diff --git a/config/kernel-bdev-block-device-operations.m4 b/config/kernel-bdev-block-device-operations.m4
-index 8b5e0a3..faacc19 100644
---- a/config/kernel-bdev-block-device-operations.m4
-+++ b/config/kernel-bdev-block-device-operations.m4
-@@ -10,7 +10,6 @@ AC_DEFUN([ZFS_AC_KERNEL_BDEV_BLOCK_DEVICE_OPERATIONS], [
-
- int blk_open(struct block_device *bdev, fmode_t mode)
- { return 0; }
-- int blk_release(struct gendisk *g, fmode_t mode) { return 0; }
- int blk_ioctl(struct block_device *bdev, fmode_t mode,
- unsigned x, unsigned long y) { return 0; }
- int blk_compat_ioctl(struct block_device * bdev, fmode_t mode,
-@@ -19,7 +18,7 @@ AC_DEFUN([ZFS_AC_KERNEL_BDEV_BLOCK_DEVICE_OPERATIONS], [
- static const struct block_device_operations
- bops __attribute__ ((unused)) = {
- .open = blk_open,
-- .release = blk_release,
-+ .release = NULL,
- .ioctl = blk_ioctl,
- .compat_ioctl = blk_compat_ioctl,
- };
-diff --git a/config/kernel-block-device-operations-release-void.m4 b/config/kernel-block-device-operations-release-void.m4
-new file mode 100644
-index 0000000..a73f858
---- /dev/null
-+++ b/config/kernel-block-device-operations-release-void.m4
-@@ -0,0 +1,29 @@
-+dnl #
-+dnl # 3.10.x API change
-+dnl #
-+AC_DEFUN([ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID], [
-+ AC_MSG_CHECKING([whether block_device_operations.release is void])
-+ tmp_flags="$EXTRA_KCFLAGS"
-+ EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
-+ ZFS_LINUX_TRY_COMPILE([
-+ #include <linux/blkdev.h>
-+
-+ void blk_release(struct gendisk *g, fmode_t mode) { return; }
-+
-+ static const struct block_device_operations
-+ bops __attribute__ ((unused)) = {
-+ .open = NULL,
-+ .release = blk_release,
-+ .ioctl = NULL,
-+ .compat_ioctl = NULL,
-+ };
-+ ],[
-+ ],[
-+ AC_MSG_RESULT(void)
-+ AC_DEFINE(HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID, 1,
-+ [struct block_device_operations.release returns void])
-+ ],[
-+ AC_MSG_RESULT(int)
-+ ])
-+ EXTRA_KCFLAGS="$tmp_flags"
-+])
-diff --git a/config/kernel.m4 b/config/kernel.m4
-index 7b8e3b0..46c0255 100644
---- a/config/kernel.m4
-+++ b/config/kernel.m4
-@@ -7,6 +7,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
- ZFS_AC_TEST_MODULE
- ZFS_AC_KERNEL_CONFIG
- ZFS_AC_KERNEL_BDEV_BLOCK_DEVICE_OPERATIONS
-+ ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID
- ZFS_AC_KERNEL_TYPE_FMODE_T
- ZFS_AC_KERNEL_KOBJ_NAME_LEN
- ZFS_AC_KERNEL_3ARG_BLKDEV_GET
-diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c
-index e35c91b..b516156 100644
---- a/module/zfs/zvol.c
-+++ b/module/zfs/zvol.c
-@@ -1024,7 +1024,11 @@ out_mutex:
- return (error);
- }
-
-+#ifdef HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID
-+static void
-+#else
- static int
-+#endif
- zvol_release(struct gendisk *disk, fmode_t mode)
- {
- zvol_state_t *zv = disk->private_data;
-@@ -1044,7 +1048,9 @@ zvol_release(struct gendisk *disk, fmode_t mode)
- if (drop_mutex)
- mutex_exit(&zvol_state_lock);
-
-+#ifndef HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID
- return (0);
-+#endif
- }
-
- static int
+++ /dev/null
-From 96165264ad0afe7a5d440ef49f9712a188486266 Mon Sep 17 00:00:00 2001
-From: Richard Yao <ryao@gentoo.org>
-Date: Fri, 18 Sep 2015 08:32:52 -0400
-Subject: [PATCH] Discard on zvols should not exceed the length of a block
-
-37f9dac592bf5889c3efb305c48ac39b4c7dd140 replaced the end-start
-calculation with a cached value, but neglected to update it on discard
-operations. This can cause us to discard data not requested, causing
-data loss on zvols.
-
-Reported-by: Richard Connon <richard.connon@zynstra.com>
-Signed-off-by: Richard Yao <ryao@gentoo.org>
----
- module/zfs/zvol.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c
-index 492f8ff..c5a8071 100644
---- a/module/zfs/zvol.c
-+++ b/module/zfs/zvol.c
-@@ -661,6 +661,7 @@ zvol_discard(struct bio *bio)
- if (!(bio->bi_rw & REQ_SECURE)) {
- start = P2ROUNDUP(start, zv->zv_volblocksize);
- end = P2ALIGN(end, zv->zv_volblocksize);
-+ size = end - start;
- }
- #endif
-
---
-2.4.6
-
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-AT_M4DIR="config"
-AUTOTOOLS_AUTORECONF="1"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-inherit bash-completion-r1 flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
-
-if [ ${PV} == "9999" ] ; then
- inherit git-2
- EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
-else
- inherit eutils versionator
- MY_PV=$(replace_version_separator 3 '-')
- SRC_URI="https://github.com/zfsonlinux/zfs/archive/zfs-${MY_PV}.tar.gz"
- S="${WORKDIR}/zfs-zfs-${MY_PV}"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="CDDL debug? ( GPL-2+ )"
-SLOT="0"
-IUSE="custom-cflags debug +rootfs"
-RESTRICT="test"
-
-DEPEND="
- =sys-kernel/spl-${PV}*
- virtual/awk
- dev-lang/perl
-"
-
-RDEPEND="${DEPEND}
- !sys-fs/zfs-fuse
-"
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="!DEBUG_LOCK_ALLOC
- BLK_DEV_LOOP
- EFI_PARTITION
- IOSCHED_NOOP
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK} BLK_DEV_INITRD
- DEVTMPFS"
-
- kernel_is ge 2 6 26 || die "Linux 2.6.26 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 3 8 || die "Linux 3.8 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- if [ ${PV} != "9999" ]
- then
- # Fix regression where snapshots are not visible
- epatch "${FILESDIR}/${P}-fix-invisible-snapshots.patch"
-
- # Fix deadlock involving concurrent `zfs destroy` and `zfs list` commands
- epatch "${FILESDIR}/${P}-fix-recursive-reader.patch"
-
- # Fix USE=debug build failure involving GCC 4.7
- epatch "${FILESDIR}/${P}-gcc-4.7-compat.patch"
-
- # Cast constant for 32-bit compatibility
- epatch "${FILESDIR}/${PN}-0.6.0_rc14-cast-const-for-32bit-compatibility.patch"
-
- # Handle missing name length check in Linux VFS
- epatch "${FILESDIR}/${PN}-0.6.0_rc14-vfs-name-length-compatibility.patch"
-
- # Fix barrier regression on Linux 2.6.37 and later
- epatch "${FILESDIR}/${PN}-0.6.0_rc14-flush-properly.patch"
- fi
-
- # Remove GPLv2-licensed ZPIOS unless we are debugging
- use debug || sed -e 's/^subdir-m += zpios$//' -i "${S}/module/Makefile.in"
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- $(use_enable debug)
- dodoc AUTHORS COPYRIGHT DISCLAIMER README.markdown
- )
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- if use x86 || use arm
- then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-AT_M4DIR="config"
-AUTOTOOLS_AUTORECONF="1"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-inherit bash-completion-r1 flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
-
-if [ ${PV} == "9999" ] ; then
- inherit git-2
- MY_PV=9999
- EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
-else
- inherit eutils versionator
- MY_PV=$(replace_version_separator 3 '-')
- SRC_URI="https://github.com/zfsonlinux/zfs/archive/zfs-${MY_PV}.tar.gz"
- S="${WORKDIR}/zfs-zfs-${MY_PV}"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="CDDL debug? ( GPL-2+ )"
-SLOT="0"
-IUSE="custom-cflags debug +rootfs"
-RESTRICT="test"
-
-DEPEND="
- =sys-kernel/spl-${PV}*
- dev-lang/perl
- virtual/awk
-"
-
-RDEPEND="${DEPEND}
- !sys-fs/zfs-fuse
-"
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="!DEBUG_LOCK_ALLOC
- BLK_DEV_LOOP
- EFI_PARTITION
- IOSCHED_NOOP
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK} BLK_DEV_INITRD
- DEVTMPFS"
-
- kernel_is ge 2 6 26 || die "Linux 2.6.26 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 3 9 || die "Linux 3.9 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- if [ ${PV} != "9999" ]
- then
- # Cast constant for 32-bit compatibility
- epatch "${FILESDIR}/${P}-cast-const-for-32bit-compatibility.patch"
-
- # Handle missing name length check in Linux VFS
- epatch "${FILESDIR}/${P}-vfs-name-length-compatibility.patch"
-
- # Fix NULL pointer exception on hardened kernels, bug #457176
- epatch "${FILESDIR}/${P}-improved-hardened-support.patch"
-
- # Fix barrier regression on Linux 2.6.37 and later
- epatch "${FILESDIR}/${P}-flush-properly.patch"
-
- # Improve accuracy of autotools checks
- epatch "${FILESDIR}/${P}-improved-autotools-checks.patch"
-
- # Linux 3.9 Support
- epatch "${FILESDIR}/${P}-linux-3.9-compat.patch"
-
- # Do not second guess Linux's memory management
- epatch "${FILESDIR}/${P}-zfs_arc_memory_throttle_disable.patch"
- fi
-
- # Remove GPLv2-licensed ZPIOS unless we are debugging
- use debug || sed -e 's/^subdir-m += zpios$//' -i "${S}/module/Makefile.in"
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- $(use_enable debug)
- )
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install
- dodoc AUTHORS COPYRIGHT DISCLAIMER README.markdown
-
- # Provide /usr/src/zfs symlink for lustre
- dosym "$(basename $(echo "${ED}/usr/src/zfs-"*))/${KV_FULL}" /usr/src/zfs
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- if use x86 || use arm
- then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
- ewarn "This version of ZFSOnLinux introduces support for features flags."
- ewarn "If you upgrade your pools to make use of feature flags, you will lose"
- ewarn "the ability to import them using older versions of ZFSOnLinux."
- ewarn "Any new pools will be created with feature flag support and will"
- ewarn "not be compatible with older versions of ZFSOnLinux. To create a new"
- ewarn "pool that is backward compatible, use zpool create -o version=28 ..."
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-AT_M4DIR="config"
-AUTOTOOLS_AUTORECONF="1"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-inherit bash-completion-r1 flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
-
-if [ ${PV} == "9999" ] ; then
- inherit git-2
- MY_PV=9999
- EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
-else
- inherit eutils versionator
- MY_PV=$(replace_version_separator 3 '-')
- SRC_URI="https://github.com/zfsonlinux/zfs/archive/zfs-${MY_PV}.tar.gz"
- S="${WORKDIR}/zfs-zfs-${MY_PV}"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="CDDL debug? ( GPL-2+ )"
-SLOT="0"
-IUSE="custom-cflags debug +rootfs"
-RESTRICT="test"
-
-DEPEND="
- =sys-kernel/spl-${PV}*
- dev-lang/perl
- virtual/awk
-"
-
-RDEPEND="${DEPEND}
- !sys-fs/zfs-fuse
-"
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="!DEBUG_LOCK_ALLOC
- BLK_DEV_LOOP
- EFI_PARTITION
- IOSCHED_NOOP
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- !UIDGID_STRICT_TYPE_CHECKS
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK} BLK_DEV_INITRD
- DEVTMPFS"
-
- kernel_is ge 2 6 26 || die "Linux 2.6.26 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 3 10 || die "Linux 3.10 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- if [ ${PV} != "9999" ]
- then
- # Correctness fix for getdents
- epatch "${FILESDIR}/${P}-fix-getdents.patch"
-
- # Prevent possible deadlock regression
- epatch "${FILESDIR}/${P}-fix-txg_quiesce-deadlock.patch"
-
- # Correctness fixes for xattr
- epatch "${FILESDIR}/${P}-fix-xattr-behavior-1.patch"
- epatch "${FILESDIR}/${P}-fix-xattr-behavior-2.patch"
-
- # Make certain that zvols always appear
- epatch "${FILESDIR}/${P}-fix-zvol-initialization-r1.patch"
-
- # Linux 3.10 Compatibility
- epatch "${FILESDIR}/${PN}-0.6.1-linux-3.10-compat.patch"
-
- # ARC Read Panic Fix
- epatch "${FILESDIR}/${PN}-0.6.1-fix-arc-read-panic.patch"
-
- # Fix zfsctl_expire_snapshot deadlock
- epatch "${FILESDIR}/${PN}-0.6.1-fix-zfsctl_expire_snapshot-deadlock.patch"
-
- # Fix NULL pointer dereference in zfsctl_expire_snapshot
- epatch "${FILESDIR}/${PN}-0.6.1-fix-zfs_sb_teardown-NULL-pointer-deref.patch"
- fi
-
- # Remove GPLv2-licensed ZPIOS unless we are debugging
- use debug || sed -e 's/^subdir-m += zpios$//' -i "${S}/module/Makefile.in"
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- $(use_enable debug)
- )
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install
- dodoc AUTHORS COPYRIGHT DISCLAIMER README.markdown
-
- # Provide /usr/src/zfs symlink for lustre
- dosym "$(basename $(echo "${ED}/usr/src/zfs-"*))/${KV_FULL}" /usr/src/zfs
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/zfs" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/zfs"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/zfs"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-
- if use x86 || use arm
- then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
- ewarn "This version of ZFSOnLinux includes support for features flags."
- ewarn "If you upgrade your pools to make use of feature flags, you will lose"
- ewarn "the ability to import them using older versions of ZFSOnLinux."
- ewarn "Any new pools will be created with feature flag support and will"
- ewarn "not be compatible with older versions of ZFSOnLinux. To create a new"
- ewarn "pool that is backward compatible, use zpool create -o version=28 ..."
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-AT_M4DIR="config"
-AUTOTOOLS_AUTORECONF="1"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-inherit bash-completion-r1 flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
-
-if [ ${PV} == "9999" ] ; then
- inherit git-2
- MY_PV=9999
- EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
-else
- inherit eutils versionator
- MY_PV=$(replace_version_separator 3 '-')
- SRC_URI="https://github.com/zfsonlinux/zfs/archive/zfs-${MY_PV}.tar.gz
- https://dev.gentoo.org/~ryao/dist/${PN}-${MY_PV}-p2.tar.xz"
- S="${WORKDIR}/zfs-zfs-${MY_PV}"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="CDDL debug? ( GPL-2+ )"
-SLOT="0"
-IUSE="custom-cflags debug +rootfs"
-RESTRICT="test"
-
-DEPEND="
- =sys-kernel/spl-${PV}*
- dev-lang/perl
- virtual/awk
-"
-
-RDEPEND="${DEPEND}
- !sys-fs/zfs-fuse
-"
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="!DEBUG_LOCK_ALLOC
- BLK_DEV_LOOP
- EFI_PARTITION
- IOSCHED_NOOP
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK} BLK_DEV_INITRD
- DEVTMPFS"
-
- kernel_is ge 2 6 26 || die "Linux 2.6.26 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 3 12 || die "Linux 3.12 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Remove GPLv2-licensed ZPIOS unless we are debugging
- use debug || sed -e 's/^subdir-m += zpios$//' -i "${S}/module/Makefile.in"
-
- if [ ${PV} != "9999" ]
- then
- # Apply patch set
- EPATCH_SUFFIX="patch" \
- EPATCH_FORCE="yes" \
- epatch "${WORKDIR}/${PN}-${MY_PV}-patches"
- fi
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- $(use_enable debug)
- )
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install
- dodoc AUTHORS COPYRIGHT DISCLAIMER README.markdown
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/zfs" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/zfs"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/zfs"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-
- if use x86 || use arm
- then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
- ewarn "This version of ZFSOnLinux includes support for features flags."
- ewarn "If you upgrade your pools to make use of feature flags, you will lose"
- ewarn "the ability to import them using older versions of ZFSOnLinux."
- ewarn "Any new pools will be created with feature flag support and will"
- ewarn "not be compatible with older versions of ZFSOnLinux. To create a new"
- ewarn "pool that is backward compatible, use zpool create -o version=28 ..."
-}
+++ /dev/null
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-AT_M4DIR="config"
-AUTOTOOLS_AUTORECONF="1"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-inherit flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
-
-if [ ${PV} == "9999" ] ; then
- inherit git-2
- EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
-else
- inherit eutils versionator
- SRC_URI="https://github.com/zfsonlinux/zfs/archive/zfs-${PV}.tar.gz
- https://dev.gentoo.org/~ryao/dist/zfs-${PV}-patches-${PR}.tar.xz"
- S="${WORKDIR}/zfs-zfs-${PV}"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="CDDL debug? ( GPL-2+ )"
-SLOT="0"
-IUSE="custom-cflags debug +rootfs"
-RESTRICT="debug? ( strip ) test"
-
-DEPEND="
- =sys-kernel/spl-${PV}*
- dev-lang/perl
- virtual/awk
-"
-
-RDEPEND="${DEPEND}
- !sys-fs/zfs-fuse
-"
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="!DEBUG_LOCK_ALLOC
- BLK_DEV_LOOP
- EFI_PARTITION
- IOSCHED_NOOP
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- !PAX_RANDKSTACK
- !PAX_USERCOPY_SLABS
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK}
- BLK_DEV_INITRD
- DEVTMPFS
- "
-
- kernel_is ge 2 6 26 || die "Linux 2.6.26 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 3 17 || die "Linux 3.17 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- if [ ${PV} != "9999" ]
- then
- # Apply patch set
- EPATCH_SUFFIX="patch" \
- EPATCH_FORCE="yes" \
- epatch "${WORKDIR}/zfs-${PV}-patches"
- fi
-
- # Remove GPLv2-licensed ZPIOS unless we are debugging
- use debug || sed -e 's/^subdir-m += zpios$//' -i "${S}/module/Makefile.in"
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- local SPL_PATH="$(basename $(echo "${EROOT}usr/src/spl-"*))"
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(${myeconfargs}
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-spl="${EROOT}usr/src/${SPL_PATH}"
- --with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}"
- $(use_enable debug)
- )
-
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
- dodoc AUTHORS COPYRIGHT DISCLAIMER README.markdown
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/zfs" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/zfs"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/zfs"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-
- if use x86 || use arm
- then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
- ewarn "This version of ZFSOnLinux includes support for features flags."
- ewarn "If you upgrade your pools to make use of feature flags, you will lose"
- ewarn "the ability to import them using older versions of ZFSOnLinux."
- ewarn "Any new pools will be created with feature flag support and will"
- ewarn "not be compatible with older versions of ZFSOnLinux. To create a new"
- ewarn "pool that is backward compatible, use zpool create -o version=28 ..."
-}
+++ /dev/null
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-AT_M4DIR="config"
-AUTOTOOLS_AUTORECONF="1"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-inherit flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
-
-if [ ${PV} == "9999" ] ; then
- inherit git-2
- EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
-else
- inherit eutils versionator
- SRC_URI="https://github.com/zfsonlinux/zfs/archive/zfs-${PV}.tar.gz"
- S="${WORKDIR}/zfs-zfs-${PV}"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="CDDL debug? ( GPL-2+ )"
-SLOT="0"
-IUSE="custom-cflags debug +rootfs"
-RESTRICT="debug? ( strip ) test"
-
-DEPEND="
- =sys-kernel/spl-${PV}*
- dev-lang/perl
- virtual/awk
-"
-
-RDEPEND="${DEPEND}
- !sys-fs/zfs-fuse
-"
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="!DEBUG_LOCK_ALLOC
- BLK_DEV_LOOP
- EFI_PARTITION
- IOSCHED_NOOP
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- !PAX_USERCOPY_SLABS
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK}
- BLK_DEV_INITRD
- DEVTMPFS
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 1 || die "Linux 4.1 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Remove GPLv2-licensed ZPIOS unless we are debugging
- use debug || sed -e 's/^subdir-m += zpios$//' -i "${S}/module/Makefile.in"
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- local SPL_PATH="$(basename $(echo "${EROOT}usr/src/spl-"*))"
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(${myeconfargs}
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-spl="${EROOT}usr/src/${SPL_PATH}"
- --with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}"
- $(use_enable debug)
- )
-
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
- dodoc AUTHORS COPYRIGHT DISCLAIMER README.markdown
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/zfs" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/zfs"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/zfs"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-
- if use x86 || use arm
- then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
- ewarn "This version of ZFSOnLinux includes support for new feature flags"
- ewarn "that are incompatible with ZFSOnLinux 0.6.3 and GRUB2 support for"
- ewarn "/boot with the new feature flags is not yet available."
- ewarn "Do *NOT* upgrade root pools to use the new feature flags."
- ewarn "Any new pools will be created with the new feature flags by default"
- ewarn "and will not be compatible with older versions of ZFSOnLinux. To"
- ewarn "create a newpool that is backward compatible, use "
- ewarn "zpool create -o version=28 ..."
- ewarn "Then explicitly enable older features. Note that the LZ4 feature has"
- ewarn "been upgraded to support metadata compression and has not been"
- ewarn "tested against the older GRUB2 code base. GRUB2 support will be"
- ewarn "updated as soon as the GRUB2 developers and Open ZFS community write"
- ewarn "GRUB2 patchese that pass mutual review."
-}
+++ /dev/null
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-AT_M4DIR="config"
-AUTOTOOLS_AUTORECONF="1"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-inherit flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
-
-if [ ${PV} == "9999" ] ; then
- inherit git-2
- EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
-else
- inherit eutils versionator
- SRC_URI="https://github.com/zfsonlinux/zfs/archive/zfs-${PV}.tar.gz"
- S="${WORKDIR}/zfs-zfs-${PV}"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="CDDL debug? ( GPL-2+ )"
-SLOT="0"
-IUSE="custom-cflags debug +rootfs"
-RESTRICT="debug? ( strip ) test"
-
-DEPEND="
- =sys-kernel/spl-${PV}*
- dev-lang/perl
- virtual/awk
-"
-
-RDEPEND="${DEPEND}
- !sys-fs/zfs-fuse
-"
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="!DEBUG_LOCK_ALLOC
- BLK_DEV_LOOP
- EFI_PARTITION
- IOSCHED_NOOP
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- !PAX_USERCOPY_SLABS
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK}
- BLK_DEV_INITRD
- DEVTMPFS
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 2 || die "Linux 4.2 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- if [ ${PV} != "9999" ]
- then
- # Fix zvol data loss regression
- # https://github.com/zfsonlinux/zfs/pull/3798
- epatch "${FILESDIR}/${P}-discard-on-zvol-fix.patch"
- fi
-
- # Remove GPLv2-licensed ZPIOS unless we are debugging
- use debug || sed -e 's/^subdir-m += zpios$//' -i "${S}/module/Makefile.in"
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- local SPL_PATH="$(basename $(echo "${EROOT}usr/src/spl-"*))"
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(${myeconfargs}
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-spl="${EROOT}usr/src/${SPL_PATH}"
- --with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}"
- $(use_enable debug)
- )
-
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
- dodoc AUTHORS COPYRIGHT DISCLAIMER README.markdown
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/zfs" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/zfs"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/zfs"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-
- if use x86 || use arm
- then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
- ewarn "This version of ZFSOnLinux includes support for new feature flags"
- ewarn "that are incompatible with previous versions. GRUB2 support for"
- ewarn "/boot with the new feature flags is not yet available."
- ewarn "Do *NOT* upgrade root pools to use the new feature flags."
- ewarn "Any new pools will be created with the new feature flags by default"
- ewarn "and will not be compatible with older versions of ZFSOnLinux. To"
- ewarn "create a newpool that is backward compatible wih GRUB2, use "
- ewarn
- ewarn "zpool create -d -o feature@async_destroy=enabled "
- ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled"
- ewarn " -o feature@spacemap_histogram=enabled"
- ewarn " -o feature@enabled_txg=enabled "
- ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled"
- ewarn " ..."
- ewarn
- ewarn "GRUB2 support will be updated as soon as either the GRUB2"
- ewarn "developers do a tag or the Gentoo developers find time to backport"
- ewarn "support from GRUB2 HEAD."
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-if [ ${PV} == "9999" ]; then
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz"
- S="${WORKDIR}/zfs-${PV}"
- KEYWORDS=" ~amd64"
-fi
-
-inherit flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="CDDL debug? ( GPL-2+ )"
-SLOT="0"
-IUSE="custom-cflags debug +rootfs"
-RESTRICT="debug? ( strip ) test"
-
-DEPEND="
- =sys-kernel/spl-${PV}*
- dev-lang/perl
- virtual/awk
-"
-
-RDEPEND="${DEPEND}
- !sys-fs/zfs-fuse
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-DOCS=( AUTHORS COPYRIGHT DISCLAIMER README.markdown )
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="!DEBUG_LOCK_ALLOC
- EFI_PARTITION
- IOSCHED_NOOP
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK}
- BLK_DEV_INITRD
- DEVTMPFS
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 12 || die "Linux 4.12 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Remove GPLv2-licensed ZPIOS unless we are debugging
- use debug || sed -e 's/^subdir-m += zpios$//' -i "${S}/module/Makefile.in"
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- local SPL_PATH="$(basename $(echo "${EROOT}usr/src/spl-"*))"
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(${myeconfargs}
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-spl="${EROOT}usr/src/${SPL_PATH}"
- --with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}"
- $(use_enable debug)
- )
-
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/zfs" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/zfs"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/zfs"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-
- if use x86 || use arm
- then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
- ewarn "This version of ZFSOnLinux includes support for new feature flags"
- ewarn "that are incompatible with previous versions. GRUB2 support for"
- ewarn "/boot with the new feature flags is not yet available."
- ewarn "Do *NOT* upgrade root pools to use the new feature flags."
- ewarn "Any new pools will be created with the new feature flags by default"
- ewarn "and will not be compatible with older versions of ZFSOnLinux. To"
- ewarn "create a newpool that is backward compatible wih GRUB2, use "
- ewarn
- ewarn "zpool create -d -o feature@async_destroy=enabled "
- ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled"
- ewarn " -o feature@spacemap_histogram=enabled"
- ewarn " -o feature@enabled_txg=enabled "
- ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled"
- ewarn " ..."
- ewarn
- ewarn "GRUB2 support will be updated as soon as either the GRUB2"
- ewarn "developers do a tag or the Gentoo developers find time to backport"
- ewarn "support from GRUB2 HEAD."
-}
+++ /dev/null
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-AT_M4DIR="config"
-AUTOTOOLS_AUTORECONF="1"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-inherit flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
-
-if [ ${PV} == "9999" ] ; then
- inherit git-2
- EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
-else
- inherit eutils versionator
- SRC_URI="https://github.com/zfsonlinux/zfs/archive/zfs-${PV}.tar.gz"
- S="${WORKDIR}/zfs-zfs-${PV}"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="CDDL debug? ( GPL-2+ )"
-SLOT="0"
-IUSE="custom-cflags debug +rootfs"
-RESTRICT="debug? ( strip ) test"
-
-DEPEND="
- =sys-kernel/spl-${PV}*
- dev-lang/perl
- virtual/awk
-"
-
-RDEPEND="${DEPEND}
- !sys-fs/zfs-fuse
-"
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="!DEBUG_LOCK_ALLOC
- EFI_PARTITION
- IOSCHED_NOOP
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- !PAX_USERCOPY_SLABS
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK}
- BLK_DEV_INITRD
- DEVTMPFS
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 3 || die "Linux 4.3 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Remove GPLv2-licensed ZPIOS unless we are debugging
- use debug || sed -e 's/^subdir-m += zpios$//' -i "${S}/module/Makefile.in"
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- local SPL_PATH="$(basename $(echo "${EROOT}usr/src/spl-"*))"
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(${myeconfargs}
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-spl="${EROOT}usr/src/${SPL_PATH}"
- --with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}"
- $(use_enable debug)
- )
-
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
- dodoc AUTHORS COPYRIGHT DISCLAIMER README.markdown
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/zfs" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/zfs"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/zfs"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-
- if use x86 || use arm
- then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
- ewarn "This version of ZFSOnLinux includes support for new feature flags"
- ewarn "that are incompatible with previous versions. GRUB2 support for"
- ewarn "/boot with the new feature flags is not yet available."
- ewarn "Do *NOT* upgrade root pools to use the new feature flags."
- ewarn "Any new pools will be created with the new feature flags by default"
- ewarn "and will not be compatible with older versions of ZFSOnLinux. To"
- ewarn "create a newpool that is backward compatible wih GRUB2, use "
- ewarn
- ewarn "zpool create -d -o feature@async_destroy=enabled "
- ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled"
- ewarn " -o feature@spacemap_histogram=enabled"
- ewarn " -o feature@enabled_txg=enabled "
- ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled"
- ewarn " ..."
- ewarn
- ewarn "GRUB2 support will be updated as soon as either the GRUB2"
- ewarn "developers do a tag or the Gentoo developers find time to backport"
- ewarn "support from GRUB2 HEAD."
-}
+++ /dev/null
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-AT_M4DIR="config"
-AUTOTOOLS_AUTORECONF="1"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-if [ ${PV} == "9999" ]; then
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz
- https://dev.gentoo.org/~ryao/dist/zfs-${PV}-patches-p3.tar.xz"
- S="${WORKDIR}/zfs-${PV}"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-inherit flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="CDDL debug? ( GPL-2+ )"
-SLOT="0"
-IUSE="custom-cflags debug +rootfs"
-RESTRICT="debug? ( strip ) test"
-
-DEPEND="
- =sys-kernel/spl-${PV}*
- dev-lang/perl
- virtual/awk
-"
-
-RDEPEND="${DEPEND}
- !<sys-kernel/spl-0.6.5.3-r1
- !sys-fs/zfs-fuse
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-DOCS=( AUTHORS COPYRIGHT DISCLAIMER README.markdown )
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="!DEBUG_LOCK_ALLOC
- EFI_PARTITION
- IOSCHED_NOOP
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK}
- BLK_DEV_INITRD
- DEVTMPFS
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 4 || die "Linux 4.4 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- if [ ${PV} != "9999" ]
- then
- # Apply patch set
- EPATCH_SUFFIX="patch" \
- EPATCH_FORCE="yes" \
- epatch "${WORKDIR}/zfs-${PV}-patches"
- fi
-
- # Remove GPLv2-licensed ZPIOS unless we are debugging
- use debug || sed -e 's/^subdir-m += zpios$//' -i "${S}/module/Makefile.in"
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- local SPL_PATH="$(basename $(echo "${EROOT}usr/src/spl-"*))"
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(${myeconfargs}
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-spl="${EROOT}usr/src/${SPL_PATH}"
- --with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}"
- $(use_enable debug)
- )
-
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/zfs" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/zfs"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/zfs"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-
- if use x86 || use arm
- then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
- ewarn "This version of ZFSOnLinux includes support for new feature flags"
- ewarn "that are incompatible with previous versions. GRUB2 support for"
- ewarn "/boot with the new feature flags is not yet available."
- ewarn "Do *NOT* upgrade root pools to use the new feature flags."
- ewarn "Any new pools will be created with the new feature flags by default"
- ewarn "and will not be compatible with older versions of ZFSOnLinux. To"
- ewarn "create a newpool that is backward compatible wih GRUB2, use "
- ewarn
- ewarn "zpool create -d -o feature@async_destroy=enabled "
- ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled"
- ewarn " -o feature@spacemap_histogram=enabled"
- ewarn " -o feature@enabled_txg=enabled "
- ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled"
- ewarn " ..."
- ewarn
- ewarn "GRUB2 support will be updated as soon as either the GRUB2"
- ewarn "developers do a tag or the Gentoo developers find time to backport"
- ewarn "support from GRUB2 HEAD."
-}
+++ /dev/null
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-if [ ${PV} == "9999" ]; then
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz"
- S="${WORKDIR}/zfs-${PV}"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-inherit flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="CDDL debug? ( GPL-2+ )"
-SLOT="0"
-IUSE="custom-cflags debug +rootfs"
-RESTRICT="debug? ( strip ) test"
-
-DEPEND="
- =sys-kernel/spl-${PV}*
- dev-lang/perl
- virtual/awk
-"
-
-RDEPEND="${DEPEND}
- !sys-fs/zfs-fuse
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-DOCS=( AUTHORS COPYRIGHT DISCLAIMER README.markdown )
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="!DEBUG_LOCK_ALLOC
- EFI_PARTITION
- IOSCHED_NOOP
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK}
- BLK_DEV_INITRD
- DEVTMPFS
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 3 || die "Linux 4.3 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Remove GPLv2-licensed ZPIOS unless we are debugging
- use debug || sed -e 's/^subdir-m += zpios$//' -i "${S}/module/Makefile.in"
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- local SPL_PATH="$(basename $(echo "${EROOT}usr/src/spl-"*))"
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(${myeconfargs}
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-spl="${EROOT}usr/src/${SPL_PATH}"
- --with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}"
- $(use_enable debug)
- )
-
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/zfs" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/zfs"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/zfs"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-
- if use x86 || use arm
- then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
- ewarn "This version of ZFSOnLinux includes support for new feature flags"
- ewarn "that are incompatible with previous versions. GRUB2 support for"
- ewarn "/boot with the new feature flags is not yet available."
- ewarn "Do *NOT* upgrade root pools to use the new feature flags."
- ewarn "Any new pools will be created with the new feature flags by default"
- ewarn "and will not be compatible with older versions of ZFSOnLinux. To"
- ewarn "create a newpool that is backward compatible wih GRUB2, use "
- ewarn
- ewarn "zpool create -d -o feature@async_destroy=enabled "
- ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled"
- ewarn " -o feature@spacemap_histogram=enabled"
- ewarn " -o feature@enabled_txg=enabled "
- ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled"
- ewarn " ..."
- ewarn
- ewarn "GRUB2 support will be updated as soon as either the GRUB2"
- ewarn "developers do a tag or the Gentoo developers find time to backport"
- ewarn "support from GRUB2 HEAD."
-}
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
+++ /dev/null
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-if [ ${PV} == "9999" ]; then
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz"
- S="${WORKDIR}/zfs-${PV}"
- KEYWORDS=" ~amd64"
-fi
-
-inherit flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="CDDL debug? ( GPL-2+ )"
-SLOT="0"
-IUSE="custom-cflags debug +rootfs"
-RESTRICT="debug? ( strip ) test"
-
-DEPEND="
- =sys-kernel/spl-${PV}*
- dev-lang/perl
- virtual/awk
-"
-
-RDEPEND="${DEPEND}
- !sys-fs/zfs-fuse
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-DOCS=( AUTHORS COPYRIGHT DISCLAIMER README.markdown )
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="!DEBUG_LOCK_ALLOC
- EFI_PARTITION
- IOSCHED_NOOP
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK}
- BLK_DEV_INITRD
- DEVTMPFS
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 3 || die "Linux 4.3 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Remove GPLv2-licensed ZPIOS unless we are debugging
- use debug || sed -e 's/^subdir-m += zpios$//' -i "${S}/module/Makefile.in"
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- local SPL_PATH="$(basename $(echo "${EROOT}usr/src/spl-"*))"
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(${myeconfargs}
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-spl="${EROOT}usr/src/${SPL_PATH}"
- --with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}"
- $(use_enable debug)
- )
-
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/zfs" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/zfs"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/zfs"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-
- if use x86 || use arm
- then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
- ewarn "This version of ZFSOnLinux includes support for new feature flags"
- ewarn "that are incompatible with previous versions. GRUB2 support for"
- ewarn "/boot with the new feature flags is not yet available."
- ewarn "Do *NOT* upgrade root pools to use the new feature flags."
- ewarn "Any new pools will be created with the new feature flags by default"
- ewarn "and will not be compatible with older versions of ZFSOnLinux. To"
- ewarn "create a newpool that is backward compatible wih GRUB2, use "
- ewarn
- ewarn "zpool create -d -o feature@async_destroy=enabled "
- ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled"
- ewarn " -o feature@spacemap_histogram=enabled"
- ewarn " -o feature@enabled_txg=enabled "
- ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled"
- ewarn " ..."
- ewarn
- ewarn "GRUB2 support will be updated as soon as either the GRUB2"
- ewarn "developers do a tag or the Gentoo developers find time to backport"
- ewarn "support from GRUB2 HEAD."
-}
+++ /dev/null
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-if [ ${PV} == "9999" ]; then
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz"
- S="${WORKDIR}/zfs-${PV}"
- KEYWORDS=" ~amd64"
-fi
-
-inherit flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="CDDL debug? ( GPL-2+ )"
-SLOT="0"
-IUSE="custom-cflags debug +rootfs"
-RESTRICT="debug? ( strip ) test"
-
-DEPEND="
- =sys-kernel/spl-${PV}*
- dev-lang/perl
- virtual/awk
-"
-
-RDEPEND="${DEPEND}
- !sys-fs/zfs-fuse
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-DOCS=( AUTHORS COPYRIGHT DISCLAIMER README.markdown )
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="!DEBUG_LOCK_ALLOC
- EFI_PARTITION
- IOSCHED_NOOP
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK}
- BLK_DEV_INITRD
- DEVTMPFS
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 5 || die "Linux 4.5 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Remove GPLv2-licensed ZPIOS unless we are debugging
- use debug || sed -e 's/^subdir-m += zpios$//' -i "${S}/module/Makefile.in"
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- local SPL_PATH="$(basename $(echo "${EROOT}usr/src/spl-"*))"
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(${myeconfargs}
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-spl="${EROOT}usr/src/${SPL_PATH}"
- --with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}"
- $(use_enable debug)
- )
-
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/zfs" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/zfs"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/zfs"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-
- if use x86 || use arm
- then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
- ewarn "This version of ZFSOnLinux includes support for new feature flags"
- ewarn "that are incompatible with previous versions. GRUB2 support for"
- ewarn "/boot with the new feature flags is not yet available."
- ewarn "Do *NOT* upgrade root pools to use the new feature flags."
- ewarn "Any new pools will be created with the new feature flags by default"
- ewarn "and will not be compatible with older versions of ZFSOnLinux. To"
- ewarn "create a newpool that is backward compatible wih GRUB2, use "
- ewarn
- ewarn "zpool create -d -o feature@async_destroy=enabled "
- ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled"
- ewarn " -o feature@spacemap_histogram=enabled"
- ewarn " -o feature@enabled_txg=enabled "
- ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled"
- ewarn " ..."
- ewarn
- ewarn "GRUB2 support will be updated as soon as either the GRUB2"
- ewarn "developers do a tag or the Gentoo developers find time to backport"
- ewarn "support from GRUB2 HEAD."
-}
+++ /dev/null
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-if [ ${PV} == "9999" ]; then
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz"
- S="${WORKDIR}/zfs-${PV}"
- KEYWORDS=" ~amd64"
-fi
-
-inherit flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="CDDL debug? ( GPL-2+ )"
-SLOT="0"
-IUSE="custom-cflags debug +rootfs"
-RESTRICT="debug? ( strip ) test"
-
-DEPEND="
- =sys-kernel/spl-${PV}*
- dev-lang/perl
- virtual/awk
-"
-
-RDEPEND="${DEPEND}
- !sys-fs/zfs-fuse
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-DOCS=( AUTHORS COPYRIGHT DISCLAIMER README.markdown )
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="!DEBUG_LOCK_ALLOC
- EFI_PARTITION
- IOSCHED_NOOP
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK}
- BLK_DEV_INITRD
- DEVTMPFS
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 6 || die "Linux 4.6 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Remove GPLv2-licensed ZPIOS unless we are debugging
- use debug || sed -e 's/^subdir-m += zpios$//' -i "${S}/module/Makefile.in"
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- local SPL_PATH="$(basename $(echo "${EROOT}usr/src/spl-"*))"
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(${myeconfargs}
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-spl="${EROOT}usr/src/${SPL_PATH}"
- --with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}"
- $(use_enable debug)
- )
-
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/zfs" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/zfs"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/zfs"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-
- if use x86 || use arm
- then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
- ewarn "This version of ZFSOnLinux includes support for new feature flags"
- ewarn "that are incompatible with previous versions. GRUB2 support for"
- ewarn "/boot with the new feature flags is not yet available."
- ewarn "Do *NOT* upgrade root pools to use the new feature flags."
- ewarn "Any new pools will be created with the new feature flags by default"
- ewarn "and will not be compatible with older versions of ZFSOnLinux. To"
- ewarn "create a newpool that is backward compatible wih GRUB2, use "
- ewarn
- ewarn "zpool create -d -o feature@async_destroy=enabled "
- ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled"
- ewarn " -o feature@spacemap_histogram=enabled"
- ewarn " -o feature@enabled_txg=enabled "
- ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled"
- ewarn " ..."
- ewarn
- ewarn "GRUB2 support will be updated as soon as either the GRUB2"
- ewarn "developers do a tag or the Gentoo developers find time to backport"
- ewarn "support from GRUB2 HEAD."
-}
+++ /dev/null
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-if [ ${PV} == "9999" ]; then
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz"
- S="${WORKDIR}/zfs-${PV}"
- KEYWORDS=" ~amd64"
-fi
-
-inherit flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="CDDL debug? ( GPL-2+ )"
-SLOT="0"
-IUSE="custom-cflags debug +rootfs"
-RESTRICT="debug? ( strip ) test"
-
-DEPEND="
- =sys-kernel/spl-${PV}*
- dev-lang/perl
- virtual/awk
-"
-
-RDEPEND="${DEPEND}
- !sys-fs/zfs-fuse
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-DOCS=( AUTHORS COPYRIGHT DISCLAIMER README.markdown )
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="!DEBUG_LOCK_ALLOC
- EFI_PARTITION
- IOSCHED_NOOP
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK}
- BLK_DEV_INITRD
- DEVTMPFS
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 8 || die "Linux 4.8 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Remove GPLv2-licensed ZPIOS unless we are debugging
- use debug || sed -e 's/^subdir-m += zpios$//' -i "${S}/module/Makefile.in"
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- local SPL_PATH="$(basename $(echo "${EROOT}usr/src/spl-"*))"
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(${myeconfargs}
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-spl="${EROOT}usr/src/${SPL_PATH}"
- --with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}"
- $(use_enable debug)
- )
-
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/zfs" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/zfs"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/zfs"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-
- if use x86 || use arm
- then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
- ewarn "This version of ZFSOnLinux includes support for new feature flags"
- ewarn "that are incompatible with previous versions. GRUB2 support for"
- ewarn "/boot with the new feature flags is not yet available."
- ewarn "Do *NOT* upgrade root pools to use the new feature flags."
- ewarn "Any new pools will be created with the new feature flags by default"
- ewarn "and will not be compatible with older versions of ZFSOnLinux. To"
- ewarn "create a newpool that is backward compatible wih GRUB2, use "
- ewarn
- ewarn "zpool create -d -o feature@async_destroy=enabled "
- ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled"
- ewarn " -o feature@spacemap_histogram=enabled"
- ewarn " -o feature@enabled_txg=enabled "
- ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled"
- ewarn " ..."
- ewarn
- ewarn "GRUB2 support will be updated as soon as either the GRUB2"
- ewarn "developers do a tag or the Gentoo developers find time to backport"
- ewarn "support from GRUB2 HEAD."
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-if [ ${PV} == "9999" ]; then
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz"
- S="${WORKDIR}/zfs-${PV}"
- KEYWORDS=" ~amd64"
-fi
-
-inherit flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="CDDL debug? ( GPL-2+ )"
-SLOT="0"
-IUSE="custom-cflags debug +rootfs"
-RESTRICT="debug? ( strip ) test"
-
-DEPEND="
- =sys-kernel/spl-${PV}*
- dev-lang/perl
- virtual/awk
-"
-
-RDEPEND="${DEPEND}
- !sys-fs/zfs-fuse
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-DOCS=( AUTHORS COPYRIGHT DISCLAIMER README.markdown )
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="!DEBUG_LOCK_ALLOC
- EFI_PARTITION
- IOSCHED_NOOP
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK}
- BLK_DEV_INITRD
- DEVTMPFS
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 10 || die "Linux 4.10 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Remove GPLv2-licensed ZPIOS unless we are debugging
- use debug || sed -e 's/^subdir-m += zpios$//' -i "${S}/module/Makefile.in"
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- local SPL_PATH="$(basename $(echo "${EROOT}usr/src/spl-"*))"
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(${myeconfargs}
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-spl="${EROOT}usr/src/${SPL_PATH}"
- --with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}"
- $(use_enable debug)
- )
-
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/zfs" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/zfs"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/zfs"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-
- if use x86 || use arm
- then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
- ewarn "This version of ZFSOnLinux includes support for new feature flags"
- ewarn "that are incompatible with previous versions. GRUB2 support for"
- ewarn "/boot with the new feature flags is not yet available."
- ewarn "Do *NOT* upgrade root pools to use the new feature flags."
- ewarn "Any new pools will be created with the new feature flags by default"
- ewarn "and will not be compatible with older versions of ZFSOnLinux. To"
- ewarn "create a newpool that is backward compatible wih GRUB2, use "
- ewarn
- ewarn "zpool create -d -o feature@async_destroy=enabled "
- ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled"
- ewarn " -o feature@spacemap_histogram=enabled"
- ewarn " -o feature@enabled_txg=enabled "
- ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled"
- ewarn " ..."
- ewarn
- ewarn "GRUB2 support will be updated as soon as either the GRUB2"
- ewarn "developers do a tag or the Gentoo developers find time to backport"
- ewarn "support from GRUB2 HEAD."
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-if [ ${PV} == "9999" ]; then
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz"
- S="${WORKDIR}/zfs-${PV}"
- KEYWORDS=" ~amd64"
-fi
-
-inherit flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="CDDL debug? ( GPL-2+ )"
-SLOT="0"
-IUSE="custom-cflags debug +rootfs"
-RESTRICT="debug? ( strip ) test"
-
-DEPEND="
- =sys-kernel/spl-${PV}*
- dev-lang/perl
- virtual/awk
-"
-
-RDEPEND="${DEPEND}
- !sys-fs/zfs-fuse
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-DOCS=( AUTHORS COPYRIGHT DISCLAIMER README.markdown )
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="!DEBUG_LOCK_ALLOC
- EFI_PARTITION
- IOSCHED_NOOP
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK}
- BLK_DEV_INITRD
- DEVTMPFS
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 12 || die "Linux 4.12 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Remove GPLv2-licensed ZPIOS unless we are debugging
- use debug || sed -e 's/^subdir-m += zpios$//' -i "${S}/module/Makefile.in"
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- local SPL_PATH="$(basename $(echo "${EROOT}usr/src/spl-"*))"
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(${myeconfargs}
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-spl="${EROOT}usr/src/${SPL_PATH}"
- --with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}"
- $(use_enable debug)
- )
-
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/zfs" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/zfs"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/zfs"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-
- if use x86 || use arm
- then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
- ewarn "This version of ZFSOnLinux includes support for new feature flags"
- ewarn "that are incompatible with previous versions. GRUB2 support for"
- ewarn "/boot with the new feature flags is not yet available."
- ewarn "Do *NOT* upgrade root pools to use the new feature flags."
- ewarn "Any new pools will be created with the new feature flags by default"
- ewarn "and will not be compatible with older versions of ZFSOnLinux. To"
- ewarn "create a newpool that is backward compatible wih GRUB2, use "
- ewarn
- ewarn "zpool create -d -o feature@async_destroy=enabled "
- ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled"
- ewarn " -o feature@spacemap_histogram=enabled"
- ewarn " -o feature@enabled_txg=enabled "
- ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled"
- ewarn " ..."
- ewarn
- ewarn "GRUB2 support will be updated as soon as either the GRUB2"
- ewarn "developers do a tag or the Gentoo developers find time to backport"
- ewarn "support from GRUB2 HEAD."
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-if [ ${PV} == "9999" ]; then
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz"
- S="${WORKDIR}/zfs-${PV}"
- KEYWORDS=" ~amd64"
-fi
-
-inherit flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="CDDL debug? ( GPL-2+ )"
-SLOT="0"
-IUSE="custom-cflags debug +rootfs"
-RESTRICT="debug? ( strip ) test"
-
-DEPEND="
- =sys-kernel/spl-${PV}*
- dev-lang/perl
- virtual/awk
-"
-
-RDEPEND="${DEPEND}
- !sys-fs/zfs-fuse
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-DOCS=( AUTHORS COPYRIGHT DISCLAIMER README.markdown )
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="!DEBUG_LOCK_ALLOC
- EFI_PARTITION
- IOSCHED_NOOP
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK}
- BLK_DEV_INITRD
- DEVTMPFS
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 12 || die "Linux 4.12 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Remove GPLv2-licensed ZPIOS unless we are debugging
- use debug || sed -e 's/^subdir-m += zpios$//' -i "${S}/module/Makefile.in"
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- local SPL_PATH="$(basename $(echo "${EROOT}usr/src/spl-"*))"
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(${myeconfargs}
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-spl="${EROOT}usr/src/${SPL_PATH}"
- --with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}"
- $(use_enable debug)
- )
-
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/zfs" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/zfs"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/zfs"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-
- if use x86 || use arm
- then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
- ewarn "This version of ZFSOnLinux includes support for new feature flags"
- ewarn "that are incompatible with previous versions. GRUB2 support for"
- ewarn "/boot with the new feature flags is not yet available."
- ewarn "Do *NOT* upgrade root pools to use the new feature flags."
- ewarn "Any new pools will be created with the new feature flags by default"
- ewarn "and will not be compatible with older versions of ZFSOnLinux. To"
- ewarn "create a newpool that is backward compatible wih GRUB2, use "
- ewarn
- ewarn "zpool create -d -o feature@async_destroy=enabled "
- ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled"
- ewarn " -o feature@spacemap_histogram=enabled"
- ewarn " -o feature@enabled_txg=enabled "
- ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled"
- ewarn " ..."
- ewarn
- ewarn "GRUB2 support will be updated as soon as either the GRUB2"
- ewarn "developers do a tag or the Gentoo developers find time to backport"
- ewarn "support from GRUB2 HEAD."
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-if [ ${PV} == "9999" ]; then
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz"
- S="${WORKDIR}/zfs-${PV}"
- KEYWORDS=" ~amd64"
-fi
-
-inherit flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="CDDL debug? ( GPL-2+ )"
-SLOT="0"
-IUSE="custom-cflags debug +rootfs"
-RESTRICT="debug? ( strip ) test"
-
-DEPEND="
- =sys-kernel/spl-${PV}*
- dev-lang/perl
- virtual/awk
-"
-
-RDEPEND="${DEPEND}
- !sys-fs/zfs-fuse
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-DOCS=( AUTHORS COPYRIGHT DISCLAIMER README.markdown )
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="!DEBUG_LOCK_ALLOC
- EFI_PARTITION
- IOSCHED_NOOP
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK}
- BLK_DEV_INITRD
- DEVTMPFS
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 13 || die "Linux 4.13 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Remove GPLv2-licensed ZPIOS unless we are debugging
- use debug || sed -e 's/^subdir-m += zpios$//' -i "${S}/module/Makefile.in"
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- local SPL_PATH="$(basename $(echo "${EROOT}usr/src/spl-"*))"
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(${myeconfargs}
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-spl="${EROOT}usr/src/${SPL_PATH}"
- --with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}"
- $(use_enable debug)
- )
-
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/zfs" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/zfs"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/zfs"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-
- if use x86 || use arm
- then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
- ewarn "This version of ZFSOnLinux includes support for new feature flags"
- ewarn "that are incompatible with previous versions. GRUB2 support for"
- ewarn "/boot with the new feature flags is not yet available."
- ewarn "Do *NOT* upgrade root pools to use the new feature flags."
- ewarn "Any new pools will be created with the new feature flags by default"
- ewarn "and will not be compatible with older versions of ZFSOnLinux. To"
- ewarn "create a newpool that is backward compatible wih GRUB2, use "
- ewarn
- ewarn "zpool create -d -o feature@async_destroy=enabled "
- ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled"
- ewarn " -o feature@spacemap_histogram=enabled"
- ewarn " -o feature@enabled_txg=enabled "
- ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled"
- ewarn " ..."
- ewarn
- ewarn "GRUB2 support will be updated as soon as either the GRUB2"
- ewarn "developers do a tag or the Gentoo developers find time to backport"
- ewarn "support from GRUB2 HEAD."
-}
-DIST zfs-0.6.0-rc13.tar.gz 1490582 SHA256 3e689fc0704237c7d755c65e34ed214a262535afefafde4aef0f112f8c833a09 SHA512 c9bbf1fb7f293a0f5b1247e17c411073994bf419d5f6c1b781efeeb4022f62851e8ea3cf7ee0330b0609bfe13b8084c48f00e942ce52323d706733cccf49699e WHIRLPOOL 97083a6f5d66addc9bc7b3cc3f7dd3bc1696980affbd4033d71cd09ecad413ffb666a8a185dfa2e4f20dd4003746ad61d12142f7a6556db5b34008716c933798
-DIST zfs-0.6.0-rc14.tar.gz 1527612 SHA256 5eae8ef790b26e0dd7c801cc0a235a631ad91d67f148a444d912dbeb24b9a12d SHA512 ad38544ced150ce500c78507782e53a8534815b819e5b9aefda6d670fb7905e31a42cdb4d45164700df48673ea7c42bd1d29a60f1f00e25271b3906de9212d15 WHIRLPOOL cfd4de541eb6c18ee4df8950883525d1b1887e0d9c5f840d97353a5d716ed639f1ab3dc0fe4d8368a890564f10053026bcc738b6066c4488647f1b83be54288d
-DIST zfs-0.6.1.tar.gz 1535521 SHA256 42ed127f74af0ecafc14800a5d2b766655f5ea821098aba92446c1c447093fad SHA512 ef583639f15a5b2e4582760bb013ab5091abc15bae17884d811afec707aff337248102a22fb9fb6f62f99cb3477a8ae82edfdcfdfb962276f593173a5dfe5871 WHIRLPOOL a6791fc2d384e03073abc850f99ba761afd18073337264d8a7bc08b4ddc6fff52df5ce11addc9a3ac7cdfdd9ce9bd779208e515cda631ec19de05fbf9f92307b
-DIST zfs-0.6.2.tar.gz 1558656 SHA256 91b844bf7a42df22d7533e8004289270b7859b8fcbca3bff8087a79b131318b4 SHA512 008f9decdea3e92f6d74f5369ec9df5776b15efbb9f2bc01012999b71e1f2bc5b46b310a329b60545907dcc78773ec79eb6d21aca49d911f33299fd0a36e1a4b WHIRLPOOL 587279866b6ffa2bfebc91f00cb28de85f7f186426a0292f44c6cde7ca3a51c1911fc0ee431c25c3ee0866174522f90ce04b54de4aa3dc0829ba3a719e47af58
-DIST zfs-0.6.3-patches-r1.tar.xz 87852 SHA256 71b5286f77cb6a6c2b97cee406dfd4788f7b40b6675c4a56fc630a47e90d5280 SHA512 e2fa573c7b30a3811e9e1596d35b65f5d013ed5bac43e364b44ffab734398a3294979c152a80ec9a722611cc7c971aec217d8e1a37cc9240a3fa2dddb5b90e3b WHIRLPOOL f2da02d5c7d2385e7de1e858c31d299632ca864d422f0c94e5d3b8674d24beeb073ad2600698350306a9e70dbeef390f0e513d19c126502fceec18795c203d50
-DIST zfs-0.6.3.tar.gz 1665270 SHA256 00caeae63cc724d3dd741aeb36fd2dc03d2158794bd6a5e925cdc8d7e5d3da8c SHA512 8c7741f5f227eb031d79fe87bf7d60e790a098fa6caede462d556c97d798832f97f5a377cbb74fc99b8d198e5f3cc1a3491f69fcdaa0408933dbadd132013416 WHIRLPOOL db9791da12c441c89667b194154b209f5aa69ea46d5327cfcde0b3a910cf1f0e5ca448909824e45b31252a1907280b711fb6ba04eb313d09de0ffbf5e6e304fe
-DIST zfs-0.6.4.2.tar.gz 1738601 SHA256 26af2924cbb891b79203a31827cba4cdc310162d5f7b9e2d643eb6576aa19015 SHA512 87a28997b8f9d36e189410171db583402418a55782b7b7f333993e98c5e17ccc4b6cd5825f38b904294c87e3dfdfb7748bd71cc371589c1358f16c942e0c18db WHIRLPOOL 1700de7da56311a7b608c99a821e2fa97a6145ccc88f3d8eff12f778421ba7b7b9cc5f5fbe5f1acd2ea2fd1db778c200a2ea961e3859a8fc89d80474894293f1
-DIST zfs-0.6.5.10.tar.gz 2597676 SHA256 90a0ca76667076e9f58776216cb761f68761eb0192f8b0c45893f84cabc6f27e SHA512 822004d11a1a7c0e258cce049bfee0248dd1ac225a922c1e4a25c8593f23e9b1d7aa4a45a1122f6904025ea0a8c7f4884ec4ab353bfa9c734aedb0969b8d6eb4 WHIRLPOOL 87596a0e89afd3b7da1476c996c87491ee3962f0accd0c1a50d9cd9ab4dd49b3c1c71e14c6eeeddfc53db9bba665bc525ef9580da8082b1e4426bce54ee83401
DIST zfs-0.6.5.11.tar.gz 2521959 SHA256 136b3061737f1a43f5310919cacbf1b8a0db72b792ef8b1606417aff16dab59d SHA512 877052da2a0cdc78b10cb5041da55e31242db2618c502997f4df9aa46a14482c7f33adce8d21aaf16164a9fe52edc358922ea89c8e109c3247e107bf607d6451 WHIRLPOOL 867f6b22726ca13e43a5ff7a832610bbfd44e6c367bd314a20a7f0a03364b1c3bda1d7b3d7c3502e08249b8d8d9e8034e93d0200abb70f793352f7689e19deac
-DIST zfs-0.6.5.2.tar.gz 1817267 SHA256 aecd2bc5189f2a71a45eb222230146bed231af4f35af5ec7af83a74987c3d595 SHA512 7f0b20feca91d5ab952c1d49ae94d241f8868825b163a3d5f2ad0fd7adcac3ab246a3e6a755019a833be553fbbfd6609828d8123f49a43b42bf76cfd64f234ec WHIRLPOOL 00fd628ef2267366b6f0705e6436ac55b260aabc3588c7f58a7042dfbfe95a0478740b4579326638d28f10ffc8f2d5b3ed21b9f8297e72344ec439fe30310634
-DIST zfs-0.6.5.3-patches-p0.tar.xz 63780 SHA256 cc6d2881304738619b9d00bc55fbd358119b35cbb345cae2ecf538051f1b7fe7 SHA512 4a531fd10d1d4d9c9cabaad9c13d8112eab3641249a7ce44599288bc4510b444d132833fae2fdf922eff43670ce77d32972c7b5b4a7d70f80c3365a0dcc89b70 WHIRLPOOL adc20e7917a518c790007499763210a4d27a164abe00a86f76d64f56f0fafc459f5d5c483019acacc136e41c57894e669fd58956b3f0ac0bcafeb1e02fec7988
-DIST zfs-0.6.5.3-patches-p2.tar.xz 85996 SHA256 0e38b1bd7e2eb96c74b3eaab49c14f1f65fa02dc42b62b6015200185bfc911c7 SHA512 0a8fb131cc9a5a239a7434593000259a581b20ee7c6fef87ec2ea78281b7887151e219ebe66603b9dafaa4fa22cbf8c55175e1f6b36af4502c147c478f0b3e38 WHIRLPOOL 726bf1c05605943a205e2e70099c6cf8c7ba8cc9bbf34d45a2d56cea87c1e23166700979e47c82dd91bd1778e297dd211a0e6f48e0eab2392471218bcb5853ce
-DIST zfs-0.6.5.3-patches-p3.tar.xz 88736 SHA256 031cd97765f890d9b78e1a5746cbd2a3ce06c7208693ec75c0b47324ac67b97a SHA512 8f17cc6e02a35828a57a7c2a437d9d18a41203b6e3f9e154b2ab863296b64596dc827afeeb0f993e37f47881d0f2ed4834f270d0ba843ab84b21c491cc352576 WHIRLPOOL 20f69c0a936bb612d5e3b551d4bf904aca3aff6d885d72f67f3b14cd720094ec13e383032ee4e322b0e81017d8ffcfafb47bf07f273badef34f7210d687ddacc
-DIST zfs-0.6.5.3-patches-p4.tar.xz 89140 SHA256 34114671614aec3b33b17e6fc66a31549b3dd3e1d21ccd68d6987a1e1641f86b SHA512 3f8a4490e654a2d13bf4d31ee688276243244d4e0ab7c7911d597730bbbf6c9d7dea8e075409de4c22e871928cd647ce3064a671a1259f3adaf2b27bcc5370b8 WHIRLPOOL a63c0a2eff6c29c9600e4aaafa7120a0c1bd9bdf9b2f1e52d5a85df2c02e5e924ed74a406919cff9353a77c697dcf4248749ad6a7137f17dc427c7f0d63ea99a
-DIST zfs-0.6.5.3.tar.gz 2524218 SHA256 49e6f9760ea172cb756f7357e4bcb90ee0293028540a68d62ed087724276131f SHA512 325cb91b7ddbcd6aa0bb9fc41eb0099dbb047a4e32d096fd414799729ef68cbc9c2e15714092eff8044a681af4ab552bd9ac1949cc673c6c5c3de1a23d9895ec WHIRLPOOL 957c3a75bb11befd4b74583883f2f11f717deb6bda368939b342049e809aa191a9ee8d1e709eaddc2a831418c7fdb5e763f918ff56d45f03baf4569ef8a4a070
-DIST zfs-0.6.5.4-patches-p1.tar.xz 64004 SHA256 83877d9b7c629730838325fd5b16bcb54259520e200f0539de9b8edfdcee9403 SHA512 9203356b43bdad2ed78c946af8c95c9fc4d2996b41a09a3b1f5a8657d2742ac69d10b4a87d443db497d591878cf7a70ebb19762b0df135ee25f4e8d2ed6ad71f WHIRLPOOL ff5788356d6a85608d22ea2c010a799464922614204c7eea06b57930a44ee876e596a053a773205de0543d36c04337d60c32594939e8e64d3022906c51c4d4e6
DIST zfs-0.6.5.4-patches-p2.tar.xz 63912 SHA256 bbcfe43ee4a46deed86543d23abd31bbc662408f56ef8f7c9500dc25fecd49c4 SHA512 9f598c2a750b92dadddb677a6a9dda4573fa91421a82270d8104d718da4b945a4d5412bab92037a033cec1ec177f2a0eb52207babd023847918e3754054ec5e9 WHIRLPOOL bab1330c7489dd172c522300698f6a2d670a2f6ddcf8cd2566d1daffe8b41a3667755ad1ab377d07716af66449f7332974bcd7df4647bb028b5f5279c59c428c
DIST zfs-0.6.5.4.tar.gz 2506470 SHA256 780862ec2301ccace412a324787e9df762cff6046e73e2ac0ebdce9e2bd59b0f SHA512 90c87cd95fd06cf34755358e7cc4053d19f351316133f0b808e7585a3fc8f82e7c0f49072c2995d0520de5104fd04d91a166a0d5b6c923c82dfb2fb4f7f57a01 WHIRLPOOL eacd2ec09afdbc3f6d946583116296fadcd7d0dea5158c89f82f6d0b02e0cbf075712015bfa5f321ae5815cf86af13b39ce93e5026e6a00da58d9ddb04d12320
-DIST zfs-0.6.5.6.tar.gz 2561093 SHA256 c349d46d86b4f61cd53a0891acad916cfc3f0d6754127db7f60a0bd98185aeff SHA512 94c55a50f0f9a90ce07a45dc72bb2730b2a41373ab5a12845df00ef38bb22e4a80ab2fb6e31a9c3a45e51516cdea441bb9da1d0acf71f2f88b38c7c3e9e995b0 WHIRLPOOL 6fcbe473bfce90f800989bac506fa6d4cf5662ad9ca617a477f1251c1625de906495a45759d6190e5a24dcf05f2ed3dd7ea1c0b2f243165a60e5efd098082935
-DIST zfs-0.6.5.7.tar.gz 2537816 SHA256 4a9e271bb9a6af8d564e4d5800e4fff36224f1697b923a7253659bdda80dc590 SHA512 559b826ae1a176217b92d8407729e2c5feeffb117dc9affaa8c9c2134d996b6c3cbe095f7a0c4666c9b131742491f1304eeb292e13e0df0b6d001fa620568af2 WHIRLPOOL bf2e0865de35496cc995738ddde34df797b0c5047c0dd17e5b755803ef16e7c16f8ba89927106a1f6131c2f75a6749c31a72dff95fc0fee186b308c50ce0b4f4
-DIST zfs-0.6.5.8.tar.gz 2521921 SHA256 d77f43f7dc38381773e2c34531954c52f3de80361b7bb10c933a7482f89cfe84 SHA512 e5b53a9531b865e7c650892c0deb1ee81db086a33538cd667a087a8a8d33a0ad93a30ae5e800096abfc4dc8ed00843da924230082e204fb7543dd401ef41fcde WHIRLPOOL 623bf8ee51d59dcd1842bf41ccf19c2eb6813fb1e88dea1ea1c6f1388c11484b798546bdcb94500735a0e9e5f9099a4df43308760b353b5b62ff56af035f88bd
-DIST zfs-0.6.5.9.tar.gz 2610650 SHA256 b724b57dbddae59246fdc15f88f1224061c712945bb36412a2087e0c7760d77f SHA512 6e175f32421cf0f9e13429f12f0fac0564dc7059ab076831d0ebc4f6a17412160ca3526ebdf894bc7666e82580355b08701dd01c411d3177f82e7330b4529a37 WHIRLPOOL 149d730a26363b50691363b314669756d218c4a16e6d06e319c2b0866c5f8ed6e2da2396a516297c127d3343d51d78072d8b7371e3f4d327d30fa43c90be5cd3
-DIST zfs-0.7.0.tar.gz 6714094 SHA256 6907524f5ca4149b799fe65cd31b552b0ae90dba5dc20524e1a24fc708d807d2 SHA512 6e6cbf54399fc85b74b76a6ceb3f30e94903f755fe6386fccc56b5e6d307a907759e4b62acec5d32e8383ef1083423eaff8dee2b0ef01a99459171a42b47d217 WHIRLPOOL 74687be4220bab51f18fdd3c047400c4261acf16f38086c2485f5cb9d79af87f5adfafced92860b021814aece7446cb18e9ca310a363b90c6bac39343b72a4b6
-DIST zfs-0.7.1.tar.gz 6376234 SHA256 231b104979ddacfeb1889e1dec175337276e7b3b109d40656089744b5caf3ef6 SHA512 64b0a3b5eeaf09ce824e3e029880a8e5dcb3e4567d1fb2fa24c89d8e55fee1ebe2d2f3a9f77d5468cc5637074e27d5ba7696b566829c93fd69c610b288200a37 WHIRLPOOL 700c83aadca96578ae8d6a9795f91c0c25b69afcc6ec6c02141daafcbcd550ae413438e96c4821c5c90816e0e29366ecfc3e7289623f14c255722c37d9f9a7f6
-DIST zfs-0.7.2.tar.gz 6389699 SHA256 f75f4d8bbb8241e3d06321b53914e53fa22d1ccc8be89819b578b46e5d3e5cf4 SHA512 fd10350b3ba5906b8d4968cee4f9febcc475b49e7d5499209566f7cfa39f29c4c2c1a4bae0698ce98244fa66657e7956a8c170de1e5f13b1bc05d2861d2c7722 WHIRLPOOL b1e270bddf9d34a6d60a9f3d80f767d6a19a7c2ae5b51d3fe83fb28432e267d494cd5b4f003b6049a074e8bf65fa9179793dec0b40f366cea493f7993dd3d19d
DIST zfs-0.7.3.tar.gz 6393145 SHA256 cb8fc606835d3f91471e49aca31a6a0a71733b1cbe74fa510e0fe0efa670fe51 SHA512 fe116fd787050f7bc099fe3ed5335c2d18711e5e665af5be13b3971939258e036e273432e80106e704f037d1f6e3114b12e26b01f97b575723f8bd46acdcbf61 WHIRLPOOL 4a7442898bd8855c24c8cdbd8d58b02dfb41ba5e55096ad20afb61c9a2903fd5aa7808fa525dfaaa20bd85ab05e1f44828f8c557ee15c7f2b5dd1174b1810e63
-DIST zfs-kmod-0.6.2-p4.tar.xz 63984 SHA256 9167edc4be86e3fcda6b3c198e51f92ab0c95ac5baca11666c28029a628cdac9 SHA512 13e4ec415c35d2f268d89565745f5898c0943423577a2ba6714b3a069c5a80f244cd06dff91464f38dd4ed60673d1145ead080bb03a56d4be33e328f948ffa64 WHIRLPOOL 8c399ec67119ed4fbebb5599d00f888918678bc4e4ea369b4bdc5c75bfc90fc76396087624c8011de370a54ff103bccaa8922d05ac7ccebb2b3481bbbcf44b19
+++ /dev/null
-# Copyright (c) 2010, Aneurin Price <aneurin.price@gmail.com>
-
-# Permission is hereby granted, free of charge, to any person
-# obtaining a copy of this software and associated documentation
-# files (the "Software"), to deal in the Software without
-# restriction, including without limitation the rights to use,
-# copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following
-# conditions:
-
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
-
-__zfs_get_commands()
-{
- zfs 2>&1 | awk '/^\t[a-z]/ {print $1}' | uniq
-}
-
-__zfs_get_properties()
-{
- zfs get 2>&1 | awk '$2 == "YES" || $2 == "NO" {print $1}'; echo all
-}
-
-__zfs_get_editable_properties()
-{
- zfs get 2>&1 | awk '$2 == "YES" {printf("%s=\n", $1)}'
-}
-
-__zfs_get_inheritable_properties()
-{
- zfs get 2>&1 | awk '$3 == "YES" {print $1}'
-}
-
-__zfs_list_datasets()
-{
- zfs list -H -o name
-}
-
-__zfs_list_filesystems()
-{
- zfs list -H -o name -t filesystem
-}
-
-__zfs_list_snapshots()
-{
- zfs list -H -o name -t snapshot
-}
-
-__zfs_list_volumes()
-{
- zfs list -H -o name -t volume
-}
-
-__zfs_argument_chosen()
-{
- for word in $(seq $((COMP_CWORD-1)) -1 2)
- do
- local prev="${COMP_WORDS[$word]}"
- for property in $@
- do
- if [ "x$prev" = "x$property" ]
- then
- return 0
- fi
- done
- done
- return 1
-}
-
-__zfs_complete_ordered_arguments()
-{
- local list1=$1
- local list2=$2
- local cur=$3
- local extra=$4
- if __zfs_argument_chosen $list1
- then
- COMPREPLY=($(compgen -W "$list2 $extra" -- "$cur"))
- else
- COMPREPLY=($(compgen -W "$list1 $extra" -- "$cur"))
- fi
-}
-
-__zfs_complete()
-{
- local cur prev cmd cmds
- COMPREPLY=()
- cur="${COMP_WORDS[COMP_CWORD]}"
- prev="${COMP_WORDS[COMP_CWORD-1]}"
- cmd="${COMP_WORDS[1]}"
- cmds=$(__zfs_get_commands)
-
- if [ "${prev##*/}" = "zfs" ]
- then
- COMPREPLY=($(compgen -W "$cmds -?" -- "$cur"))
- return 0
- fi
-
- case "${cmd}" in
- clone)
- __zfs_complete_ordered_arguments "$(__zfs_list_snapshots)" "$(__zfs_list_filesystems) $(__zfs_list_volumes)" $cur
- return 0
- ;;
- get)
- __zfs_complete_ordered_arguments "$(__zfs_get_properties)" "$(__zfs_list_datasets)" "$cur" "-H -r -p"
- return 0
- ;;
- inherit)
- __zfs_complete_ordered_arguments "$(__zfs_get_inheritable_properties)" "$(__zfs_list_datasets)" $cur
- return 0
- ;;
- list)
- if [ "x$prev" = "x-o" ]
- then
- COMPREPLY=($(compgen -W "$(__zfs_get_properties)" -- "${cur##*,}"))
- local existing_opts=$(expr "$cur" : '\(.*,\)')
- if [ ! "x$existing_opts" = "x" ]
- then
- COMPREPLY=( "${COMPREPLY[@]/#/${existing_opts}}" )
- fi
- else
- COMPREPLY=($(compgen -W "$(__zfs_list_datasets) -H -r -o" -- "$cur"))
- fi
- return 0
- ;;
- promote)
- COMPREPLY=($(compgen -W "$(__zfs_list_filesystems)" -- "$cur"))
- return 0
- ;;
- rollback|send)
- COMPREPLY=($(compgen -W "$(__zfs_list_snapshots)" -- "$cur"))
- return 0
- ;;
- snapshot)
- COMPREPLY=($(compgen -W "$(__zfs_list_filesystems) $(__zfs_list_volumes)" -- "$cur"))
- return 0
- ;;
- set)
- __zfs_complete_ordered_arguments "$(__zfs_get_editable_properties)" "$(__zfs_list_filesystems) $(__zfs_list_volumes)" $cur
- return 0
- ;;
- *)
- COMPREPLY=($(compgen -W "$(__zfs_list_datasets)" -- "$cur"))
- return 0
- ;;
- esac
-
-}
-
-__zpool_get_commands()
-{
- zpool 2>&1 | awk '/^\t[a-z]/ {print $1}' | uniq
-}
-
-__zpool_get_properties()
-{
- zpool get 2>&1 | awk '$2 == "YES" || $2 == "NO" {print $1}'; echo all
-}
-
-__zpool_get_editable_properties()
-{
- zpool get 2>&1 | awk '$2 == "YES" {printf("%s=\n", $1)}'
-}
-
-__zpool_list_pools()
-{
- zpool list -H -o name
-}
-
-__zpool_complete()
-{
- local cur prev cmd cmds
- COMPREPLY=()
- cur="${COMP_WORDS[COMP_CWORD]}"
- prev="${COMP_WORDS[COMP_CWORD-1]}"
- cmd="${COMP_WORDS[1]}"
- cmds=$(__zpool_get_commands)
-
- if [ "${prev##*/}" = "zpool" ]
- then
- COMPREPLY=($(compgen -W "$cmds" -- "$cur"))
- return 0
- fi
-
- case "${cmd}" in
- get)
- __zfs_complete_ordered_arguments "$(__zpool_get_properties)" "$(__zpool_list_pools)" $cur
- return 0
- ;;
- import)
- if [ "x$prev" = "x-d" ]
- then
- _filedir -d
- else
- COMPREPLY=($(compgen -W "$(__zpool_list_pools) -d" -- "$cur"))
- fi
- return 0
- ;;
- set)
- __zfs_complete_ordered_arguments "$(__zpool_get_editable_properties)" "$(__zpool_list_pools)" $cur
- return 0
- ;;
- add|attach|clear|create|detach|offline|online|remove|replace)
- local pools="$(__zpool_list_pools)"
- if __zfs_argument_chosen $pools
- then
- _filedir
- else
- COMPREPLY=($(compgen -W "$pools" -- "$cur"))
- fi
- return 0
- ;;
- *)
- COMPREPLY=($(compgen -W "$(__zpool_list_pools)" -- "$cur"))
- return 0
- ;;
- esac
-
-}
-
-complete -F __zfs_complete zfs
-complete -o filenames -F __zpool_complete zpool
+++ /dev/null
-#!/sbin/openrc-run
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-depend() {
- need zfs
-}
-
-start() {
- ebegin "Starting ZFS Event daemon"
-
- checkpath -q -d -m 0755 /var/run/zed
-
- start-stop-daemon --start -q \
- --exec /sbin/zed -- -M \
- -p /var/run/zed/pid
- eend $?
-
-}
-
-stop() {
-ebegin "Stopping ZFS Event daemon"
- start-stop-daemon --stop -q --pidfile /var/run/zed/pid
-eend $?
-}
+++ /dev/null
-From 399f60c8b47f7513d078a7c181ff132e2cafdd15 Mon Sep 17 00:00:00 2001
-From: Richard Yao <ryao@cs.stonybrook.edu>
-Date: Tue, 5 Feb 2013 18:14:30 -0500
-Subject: [PATCH] Fix function relocations in libzpool
-
-binutils 2.23.1 fails in situations that generate function relocations
-on PowerPC and possibly other architectures. This causes linking of
-libzpool to fail because it depends on libnvpair. We add a dependency on
-libnvpair to lib/libzpool/Makefile.am to correct that.
-
-Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu>
-Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Closes #1267
----
- lib/libzpool/Makefile.am | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/lib/libzpool/Makefile.am b/lib/libzpool/Makefile.am
-index 3e62de6..cbba388 100644
---- a/lib/libzpool/Makefile.am
-+++ b/lib/libzpool/Makefile.am
-@@ -94,7 +94,8 @@ libzpool_la_SOURCES = \
-
- libzpool_la_LIBADD = \
- $(top_builddir)/lib/libunicode/libunicode.la \
-- $(top_builddir)/lib/libuutil/libuutil.la
-+ $(top_builddir)/lib/libuutil/libuutil.la \
-+ $(top_builddir)/lib/libnvpair/libnvpair.la
-
- libzpool_la_LDFLAGS = -pthread -version-info 1:1:0
-
---
-1.7.10
-
+++ /dev/null
-From 5d3dc3fb72518a4c191e3a014622b74365eb3a74 Mon Sep 17 00:00:00 2001
-From: Mike Leddy <mike.leddy@gmail.com>
-Date: Thu, 4 Jul 2013 01:02:05 -0300
-Subject: [PATCH] Avoid abort() in vn_rdwr(): libzpool/kernel.c
-
-Make sure that buffer is aligned to 512 bytes on linux so that
-pread call combined with O_DIRECT does not return EINVAL.
-
-Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Closes #1570
----
- cmd/zdb/zdb.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c
-index 936974b..a2b6bfe 100644
---- a/cmd/zdb/zdb.c
-+++ b/cmd/zdb/zdb.c
-@@ -2844,7 +2844,7 @@
- psize = size;
- lsize = size;
-
-- pbuf = umem_alloc(SPA_MAXBLOCKSIZE, UMEM_NOFAIL);
-+ pbuf = umem_alloc_aligned(SPA_MAXBLOCKSIZE, 512, UMEM_NOFAIL);
- lbuf = umem_alloc(SPA_MAXBLOCKSIZE, UMEM_NOFAIL);
-
- BP_ZERO(bp);
---
-1.8.1.6
-
+++ /dev/null
-From 3db3ff4a787acf068b122562fb5be5aecec2611f Mon Sep 17 00:00:00 2001
-From: Richard Yao <ryao@gentoo.org>
-Date: Tue, 2 Jul 2013 00:07:15 -0400
-Subject: [PATCH] Use MAXPATHLEN instead of sizeof in snprintf
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This silences a GCC 4.8.0 warning by fixing a programming error
-caught by static analysis:
-
-../../cmd/ztest/ztest.c: In function ‘ztest_vdev_aux_add_remove’:
-../../cmd/ztest/ztest.c:2584:33: error: argument to ‘sizeof’
- in ‘snprintf’ call is the same expression as the destination;
- did you mean to provide an explicit length?
- [-Werror=sizeof-pointer-memaccess]
- (void) snprintf(path, sizeof (path), ztest_aux_template,
- ^
-
-Signed-off-by: Richard Yao <ryao@gentoo.org>
-Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Closes #1480
----
- cmd/ztest/ztest.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c
-index b38d7b1..93a5f1e 100644
---- a/cmd/ztest/ztest.c
-+++ b/cmd/ztest/ztest.c
-@@ -2581,7 +2581,7 @@ enum ztest_object {
- zs->zs_vdev_aux = 0;
- for (;;) {
- int c;
-- (void) snprintf(path, sizeof (path), ztest_aux_template,
-+ (void) snprintf(path, MAXPATHLEN, ztest_aux_template,
- ztest_opts.zo_dir, ztest_opts.zo_pool, aux,
- zs->zs_vdev_aux);
- for (c = 0; c < sav->sav_count; c++)
---
-1.8.1.6
-
+++ /dev/null
-diff --git a/module/zfs/spa.c b/module/zfs/spa.c
-index e986e92..65f78b7 100644
---- a/module/zfs/spa.c
-+++ b/module/zfs/spa.c
-@@ -64,6 +64,7 @@
- #include <sys/zfs_ioctl.h>
- #include <sys/dsl_scan.h>
- #include <sys/zfeature.h>
-+#include <sys/zvol.h>
-
- #ifdef _KERNEL
- #include <sys/bootprops.h>
-@@ -2856,6 +2857,7 @@ spa_open_common(const char *pool, spa_t **spapp, void *tag, nvlist_t *nvpolicy,
- spa_load_state_t state = SPA_LOAD_OPEN;
- int error;
- int locked = B_FALSE;
-+ int firstopen = B_FALSE;
-
- *spapp = NULL;
-
-@@ -2879,6 +2881,8 @@ spa_open_common(const char *pool, spa_t **spapp, void *tag, nvlist_t *nvpolicy,
- if (spa->spa_state == POOL_STATE_UNINITIALIZED) {
- zpool_rewind_policy_t policy;
-
-+ firstopen = B_TRUE;
-+
- zpool_get_rewind_policy(nvpolicy ? nvpolicy : spa->spa_config,
- &policy);
- if (policy.zrp_request & ZPOOL_DO_REWIND)
-@@ -2953,6 +2957,11 @@ spa_open_common(const char *pool, spa_t **spapp, void *tag, nvlist_t *nvpolicy,
- mutex_exit(&spa_namespace_lock);
- }
-
-+#ifdef _KERNEL
-+ if (firstopen)
-+ zvol_create_minors(spa->spa_name);
-+#endif
-+
- *spapp = spa;
-
- return (0);
-@@ -4010,6 +4019,10 @@ spa_import(const char *pool, nvlist_t *config, nvlist_t *props, uint64_t flags)
- mutex_exit(&spa_namespace_lock);
- spa_history_log_version(spa, LOG_POOL_IMPORT);
-
-+#ifdef _KERNEL
-+ zvol_create_minors(pool);
-+#endif
-+
- return (0);
- }
-
-diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c
-index 1226b2c..a9184a1 100644
---- a/module/zfs/zfs_ioctl.c
-+++ b/module/zfs/zfs_ioctl.c
-@@ -1268,9 +1268,6 @@ zfs_ioc_pool_import(zfs_cmd_t *zc)
- error = err;
- }
-
-- if (error == 0)
-- zvol_create_minors(zc->zc_name);
--
- nvlist_free(config);
-
- if (props)
-diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c
-index 43a7bb6..e35c91b 100644
---- a/module/zfs/zvol.c
-+++ b/module/zfs/zvol.c
-@@ -1215,6 +1215,9 @@ zvol_alloc(dev_t dev, const char *name)
-
- zv = kmem_zalloc(sizeof (zvol_state_t), KM_SLEEP);
-
-+ spin_lock_init(&zv->zv_lock);
-+ list_link_init(&zv->zv_next);
-+
- zv->zv_queue = blk_init_queue(zvol_request, &zv->zv_lock);
- if (zv->zv_queue == NULL)
- goto out_kmem;
-@@ -1248,9 +1251,6 @@ zvol_alloc(dev_t dev, const char *name)
- sizeof (rl_t), offsetof(rl_t, r_node));
- zv->zv_znode.z_is_zvol = TRUE;
-
-- spin_lock_init(&zv->zv_lock);
-- list_link_init(&zv->zv_next);
--
- zv->zv_disk->major = zvol_major;
- zv->zv_disk->first_minor = (dev & MINORMASK);
- zv->zv_disk->fops = &zvol_ops;
-@@ -1561,30 +1561,36 @@ zvol_init(void)
- {
- int error;
-
-+ list_create(&zvol_state_list, sizeof (zvol_state_t),
-+ offsetof(zvol_state_t, zv_next));
-+ mutex_init(&zvol_state_lock, NULL, MUTEX_DEFAULT, NULL);
-+
- zvol_taskq = taskq_create(ZVOL_DRIVER, zvol_threads, maxclsyspri,
- zvol_threads, INT_MAX, TASKQ_PREPOPULATE);
- if (zvol_taskq == NULL) {
- printk(KERN_INFO "ZFS: taskq_create() failed\n");
-- return (-ENOMEM);
-+ error = -ENOMEM;
-+ goto out1;
- }
-
- error = register_blkdev(zvol_major, ZVOL_DRIVER);
- if (error) {
- printk(KERN_INFO "ZFS: register_blkdev() failed %d\n", error);
-- taskq_destroy(zvol_taskq);
-- return (error);
-+ goto out2;
- }
-
- blk_register_region(MKDEV(zvol_major, 0), 1UL << MINORBITS,
- THIS_MODULE, zvol_probe, NULL, NULL);
-
-- mutex_init(&zvol_state_lock, NULL, MUTEX_DEFAULT, NULL);
-- list_create(&zvol_state_list, sizeof (zvol_state_t),
-- offsetof(zvol_state_t, zv_next));
-+ return (0);
-
-- (void) zvol_create_minors(NULL);
-+out2:
-+ taskq_destroy(zvol_taskq);
-+out1:
-+ mutex_destroy(&zvol_state_lock);
-+ list_destroy(&zvol_state_list);
-
-- return (0);
-+ return (error);
- }
-
- void
-diff --git a/scripts/zconfig.sh b/scripts/zconfig.sh
-index 141348c..281166c 100755
---- a/scripts/zconfig.sh
-+++ b/scripts/zconfig.sh
-@@ -264,8 +264,9 @@ test_4() {
- zconfig_zvol_device_stat 0 ${POOL_NAME} ${FULL_ZVOL_NAME} \
- ${FULL_SNAP_NAME} ${FULL_CLONE_NAME} || fail 9
-
-- # Load the modules, wait 1 second for udev
-+ # Load the modules, list the pools to ensure they are opened
- ${ZFS_SH} zfs="spa_config_path=${TMP_CACHE}" || fail 10
-+ ${ZPOOL} list &>/dev/null
-
- # Verify the devices were created
- zconfig_zvol_device_stat 10 ${POOL_NAME} ${FULL_ZVOL_NAME} \
-diff --git a/udev/rules.d/90-zfs.rules.in b/udev/rules.d/90-zfs.rules.in
-index 52e1d63..a2715d2 100644
---- a/udev/rules.d/90-zfs.rules.in
-+++ b/udev/rules.d/90-zfs.rules.in
-@@ -1,4 +1,4 @@
--SUBSYSTEM!="block", GOTO="zfs_end"
-+SUBSYSTEM!="block|misc", GOTO="zfs_end"
- ACTION!="add|change", GOTO="zfs_end"
-
- ENV{ID_FS_TYPE}=="zfs", RUN+="/sbin/modprobe zfs"
-@@ -7,4 +7,6 @@ ENV{ID_FS_TYPE}=="zfs_member", RUN+="/sbin/modprobe zfs"
- KERNEL=="null", SYMLINK+="root"
- SYMLINK=="null", SYMLINK+="root"
-
-+SUBSYSTEM=="misc", KERNEL=="zfs", RUN+="@sbindir@/zpool list"
-+
- LABEL="zfs_end"
+++ /dev/null
-commit 75c2fb953c99bba008f1ef72ee71136002749f51
-Author: Richard Yao <ryao@cs.stonybrook.edu>
-Date: Tue May 28 20:08:15 2013 -0400
-
- Improve OpenRC init script
-
- The current zfs OpenRC script's dependencies cause OpenRC to attempt to
- unmount ZFS filesystems at shutdown while things were still using them,
- which would fail. This is a cosmetic issue, but it should still be
- addressed. It probably does not affect systems where the rootfs is a
- legacy filesystem, but any system with the rootfs on ZFS needs to run
- the ZFS init script after the system is ready to shutdown filesystems.
-
- OpenRC's shutdown process occurs in the reverse order of the startup
- process. Therefore running the ZFS shutdown procedure after filesystems
- are ready to be unmounted requires running the startup procedure before
- fstab. This patch changes the dependencies of the script to expliclty
- run before fstab at boot when the rootfs is ZFS and to run after fstab
- at boot whenever the rootfs is not ZFS. This should cover most use
- cases.
-
- The only cases not covered well by this are systems with legacy
- root filesystems where people want to configure fstab to mount a non-ZFS
- filesystem off a zvol and possibly also systems whose pools are stored
- on network block devices. The former requires that the ZFS script run
- before fstab, which could cause ZFS datasets to mount too early and
- appear under the fstab mount points. The latter requires that the ZFS
- script run after networking starts, which precludes the ability to store
- any system information on ZFS. An additional OpenRC script could be
- written to handle non-root pools on network block devices, but that will
- depend on user demand and developer time.
-
- Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu>
-
-diff --git a/etc/init.d/zfs.gentoo.in b/etc/init.d/zfs.gentoo.in
-index 5b8671e..0034e02 100644
---- a/etc/init.d/zfs.gentoo.in
-+++ b/etc/init.d/zfs.gentoo.in
-@@ -10,9 +10,16 @@ fi
-
- depend()
- {
-+ # Try to allow people to mix and match fstab with ZFS in a way that makes sense.
-+ if [ "$(mountinfo -s /)" = 'zfs' ]
-+ then
-+ before localmount
-+ else
-+ after localmount
-+ fi
-+
- # bootmisc will log to /var which may be a different zfs than root.
-- before net bootmisc
-- after udev localmount
-+ before bootmisc logger
- keyword -lxc -openvz -prefix -vserver
- }
-
+++ /dev/null
-commit 3cb750b249717b43cbfcde78b44b0e38a2a61dc2
-Author: James Lee <jlee@thestaticvoid.com>
-Date: Sat Sep 19 22:00:36 2015 -0400
-
- zfs-import: Perform verbatim import using cache file
-
- This change modifies the import service to use the default cache file
- to perform a verbatim import of pools at boot. This fixes code that
- searches all devices and imported all visible pools.
-
- Using the cache file is in keeping with the way ZFS has always worked,
- how Solaris, Illumos, FreeBSD, and systemd performs imports, and is how
- it is written in the man page (zpool(1M,8)):
-
- All pools in this cache are automatically imported when the
- system boots.
-
- Importantly, the cache contains important information for importing
- multipath devices, and helps control which pools get imported in more
- dynamic environments like SANs, which may have thousands of visible
- and constantly changing pools, which the ZFS_POOL_EXCEPTIONS variable
- is not equipped to handle. Verbatim imports prevent rogue pools from
- being automatically imported and mounted where they shouldn't be.
-
- The change also stops the service from exporting pools at shutdown.
- Exporting pools is only meant to be performed explicitly by the
- administrator of the system.
-
- The old behavior of searching and importing all visible pools is
- preserved and can be switched on by heeding the warning and toggling
- the ZPOOL_IMPORT_ALL_VISIBLE variable in /etc/default/zfs.
-
- Closes #3777
- Closes #3526
-
-diff --git a/etc/init.d/zfs-import.in b/etc/init.d/zfs-import.in
-index 5e21929..2258638 100755
---- a/etc/init.d/zfs-import.in
-+++ b/etc/init.d/zfs-import.in
-@@ -1,11 +1,10 @@
- #!@SHELL@
- #
--# zfs-import This script will import/export zfs pools.
-+# zfs-import This script will import ZFS pools
- #
- # chkconfig: 2345 01 99
--# description: This script will import/export zfs pools during system
--# boot/shutdown.
--# It is also responsible for all userspace zfs services.
-+# description: This script will perform a verbatim import of ZFS pools
-+# during system boot.
- # probe: true
- #
- ### BEGIN INIT INFO
-@@ -17,7 +16,7 @@
- # X-Start-Before: checkfs
- # X-Stop-After: zfs-mount
- # Short-Description: Import ZFS pools
--# Description: Run the `zpool import` or `zpool export` commands.
-+# Description: Run the `zpool import` command.
- ### END INIT INFO
- #
- # NOTE: Not having '$local_fs' on Required-Start but only on Required-Stop
-@@ -43,6 +42,16 @@ do_depend()
- keyword -lxc -openvz -prefix -vserver
- }
-
-+# Use the zpool cache file to import pools
-+do_verbatim_import()
-+{
-+ if [ -f "$ZPOOL_CACHE" ]
-+ then
-+ zfs_action "Importing ZFS pool(s)" \
-+ "$ZPOOL" import -c "$ZPOOL_CACHE" -N -a
-+ fi
-+}
-+
- # Support function to get a list of all pools, separated with ';'
- find_pools()
- {
-@@ -60,8 +69,8 @@ find_pools()
- echo "${pools%%;}" # Return without the last ';'.
- }
-
--# Import all pools
--do_import()
-+# Find and import all visible pools, even exported ones
-+do_import_all_visible()
- {
- local already_imported available_pools pool npools
- local exception dir ZPOOL_IMPORT_PATH RET=0 r=1
-@@ -109,7 +118,7 @@ do_import()
- fi
- fi
-
-- # Filter out any exceptions...
-+ # Filter out any exceptions...
- if [ -n "$ZFS_POOL_EXCEPTIONS" ]
- then
- local found=""
-@@ -249,41 +258,15 @@ do_import()
- return "$RET"
- }
-
--# Export all pools
--do_export()
-+do_import()
- {
-- local already_imported pool root_pool RET r
-- RET=0
--
-- root_pool=$(get_root_pool)
--
-- [ -n "$init" ] && zfs_log_begin_msg "Exporting ZFS pool(s)"
--
-- # Find list of already imported pools.
-- already_imported=$(find_pools "$ZPOOL" list -H -oname)
--
-- OLD_IFS="$IFS" ; IFS=";"
-- for pool in $already_imported; do
-- [ "$pool" = "$root_pool" ] && continue
--
-- if [ -z "$init" ]
-- then
-- # Interactive - one 'Importing ...' line per pool
-- zfs_log_begin_msg "Exporting ZFS pool $pool"
-- else
-- # Not interactive - a dot for each pool.
-- zfs_log_progress_msg "."
-- fi
--
-- "$ZPOOL" export "$pool"
-- r="$?" ; RET=$((RET + r))
-- [ -z "$init" ] && zfs_log_end_msg "$r"
-- done
-- IFS="$OLD_IFS"
--
-- [ -n "$init" ] && zfs_log_end_msg "$RET"
--
-- return "$RET"
-+ if check_boolean "$ZPOOL_IMPORT_ALL_VISIBLE"
-+ then
-+ do_import_all_visible
-+ else
-+ # This is the default option
-+ do_verbatim_import
-+ fi
- }
-
- # Output the status and list of pools
-@@ -323,14 +306,6 @@ do_start()
- fi
- }
-
--do_stop()
--{
-- # Check to see if the module is even loaded.
-- check_module_loaded "zfs" || exit 0
--
-- do_export
--}
--
- # ----------------------------------------------------
-
- if [ ! -e /etc/gentoo-release ]
-@@ -340,7 +315,7 @@ then
- do_start
- ;;
- stop)
-- do_stop
-+ # no-op
- ;;
- status)
- do_status
-@@ -350,7 +325,7 @@ then
- ;;
- *)
- [ -n "$1" ] && echo "Error: Unknown command $1."
-- echo "Usage: $0 {start|stop|status}"
-+ echo "Usage: $0 {start|status}"
- exit 3
- ;;
- esac
-@@ -360,6 +335,5 @@ else
- # Create wrapper functions since Gentoo don't use the case part.
- depend() { do_depend; }
- start() { do_start; }
-- stop() { do_stop; }
- status() { do_status; }
- fi
-diff --git a/etc/init.d/zfs.in b/etc/init.d/zfs.in
-index eabb7e4..d81ef22 100644
---- a/etc/init.d/zfs.in
-+++ b/etc/init.d/zfs.in
-@@ -16,6 +16,24 @@ ZFS_SHARE='yes'
- # Run `zfs unshare -a` during system stop?
- ZFS_UNSHARE='yes'
-
-+# By default, a verbatim import of all pools is performed at boot based on the
-+# contents of the default zpool cache file. The contents of the cache are
-+# managed automatically by the 'zpool import' and 'zpool export' commands.
-+#
-+# By setting this to 'yes', the system will instead search all devices for
-+# pools and attempt to import them all at boot, even those that have been
-+# exported. Under this mode, the search path can be controlled by the
-+# ZPOOL_IMPORT_PATH variable and a list of pools that should not be imported
-+# can be listed in the ZFS_POOL_EXCEPTIONS variable.
-+#
-+# Note that importing all visible pools may include pools that you don't
-+# expect, such as those on removable devices and SANs, and those pools may
-+# proceed to mount themselves in places you do not want them to. The results
-+# can be unpredictable and possibly dangerous. Only enable this option if you
-+# understand this risk and have complete physical control over your system and
-+# SAN to prevent the insertion of malicious pools.
-+ZPOOL_IMPORT_ALL_VISIBLE='no'
-+
- # Specify specific path(s) to look for device nodes and/or links for the
- # pool import(s). See zpool(8) for more information about this variable.
- # It supersedes the old USE_DISK_BY_ID which indicated that it would only
-@@ -23,6 +41,18 @@ ZFS_UNSHARE='yes'
- # The old variable will still work in the code, but is deprecated.
- #ZPOOL_IMPORT_PATH="/dev/disk/by-vdev:/dev/disk/by-id"
-
-+# List of pools that should NOT be imported at boot
-+# when ZPOOL_IMPORT_ALL_VISIBLE is 'yes'.
-+# This is a space separated list.
-+#ZFS_POOL_EXCEPTIONS="test2"
-+
-+# List of pools that SHOULD be imported at boot by the initramfs
-+# instead of trying to import all available pools. If this is set
-+# then ZFS_POOL_EXCEPTIONS is ignored.
-+# Only applicable for Debian GNU/Linux {dkms,initramfs}.
-+# This is a semi-colon separated list.
-+#ZFS_POOL_IMPORT="pool1;pool2"
-+
- # Should the datasets be mounted verbosely?
- # A mount counter will be used when mounting if set to 'yes'.
- VERBOSE_MOUNT='no'
-@@ -97,17 +127,6 @@ ZFS_INITRD_POST_MODPROBE_SLEEP='0'
- # Example: If root FS is 'rpool/ROOT/rootfs', this would make sense.
- #ZFS_INITRD_ADDITIONAL_DATASETS="rpool/ROOT/usr rpool/ROOT/var"
-
--# List of pools that should NOT be imported at boot?
--# This is a space separated list.
--#ZFS_POOL_EXCEPTIONS="test2"
--
--# List of pools to import?
--# If this variable is set, there will be NO auto-import of ANY other
--# pool. In essence, there will be no auto detection of availible pools.
--# This is a semi-colon separated list.
--# Makes the variable ZFS_POOL_EXCEPTIONS above redundant (won't be checked).
--#ZFS_POOL_IMPORT="pool1;pool2"
--
- # Optional arguments for the ZFS Event Daemon (ZED).
- # See zed(8) for more information on available options.
- #ZED_ARGS="-M"
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-AT_M4DIR="config"
-AUTOTOOLS_AUTORECONF="1"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-if [ ${PV} == "9999" ] ; then
- inherit git-2 linux-mod
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
-else
- inherit eutils versionator
- MY_PV=$(replace_version_separator 3 '-')
- SRC_URI="https://github.com/zfsonlinux/${PN}/archive/${PN}-${MY_PV}.tar.gz"
- S="${WORKDIR}/${PN}-${PN}-${MY_PV}"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-inherit bash-completion-r1 flag-o-matic toolchain-funcs autotools-utils udev
-
-DESCRIPTION="Userland utilities for ZFS Linux kernel module"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="BSD-2 CDDL MIT"
-SLOT="0"
-IUSE="custom-cflags kernel-builtin +rootfs test-suite static-libs"
-RESTRICT="test"
-
-COMMON_DEPEND="
- sys-apps/util-linux[static-libs?]
- sys-libs/zlib[static-libs(+)?]
- virtual/awk
-"
-DEPEND="${COMMON_DEPEND}
- virtual/pkgconfig
-"
-
-RDEPEND="${COMMON_DEPEND}
- !=sys-apps/grep-2.13*
- !kernel-builtin? ( =sys-fs/zfs-kmod-${PV}* )
- !sys-fs/zfs-fuse
- !prefix? ( virtual/udev )
- test-suite? (
- sys-apps/util-linux
- sys-devel/bc
- sys-block/parted
- sys-fs/lsscsi
- sys-fs/mdadm
- sys-process/procps
- virtual/modutils
- )
- rootfs? (
- app-arch/cpio
- app-misc/pax-utils
- )
-"
-
-pkg_setup() {
- :
-}
-
-src_prepare() {
- # Update paths
- sed -e "s|/sbin/lsmod|/bin/lsmod|" \
- -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
- -e "s|/sbin/parted|/usr/sbin/parted|" \
- -i scripts/common.sh.in
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=user
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-udevdir="$(get_udevdir)"
- )
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install
- gen_usr_ldscript -a uutil nvpair zpool zfs
- rm -rf "${ED}usr/share/dracut"
- use test-suite || rm -rf "${ED}usr/libexec"
-
- newbashcomp "${FILESDIR}/bash-completion" zfs
-
-}
-
-pkg_postinst() {
-
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- einfo "Adding ${P} to the module database to ensure that the"
- einfo "kernel modules and userland utilities stay in sync."
- update_moduledb
- fi
-
- [ -e "${EROOT}etc/runlevels/boot/zfs" ] \
- || ewarn 'You should add zfs to the boot runlevel.'
-
- if [ -e "${EROOT}etc/runlevels/shutdown/zfs-shutdown" ]
- then
- einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
- rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
- fi
-
-}
-
-pkg_postrm() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- remove_moduledb
- fi
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-AT_M4DIR="config"
-AUTOTOOLS_AUTORECONF="1"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-if [ ${PV} == "9999" ] ; then
- inherit git-2 linux-mod
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
-else
- inherit eutils versionator
- MY_PV=$(replace_version_separator 3 '-')
- SRC_URI="https://github.com/zfsonlinux/${PN}/archive/${PN}-${MY_PV}.tar.gz"
- S="${WORKDIR}/${PN}-${PN}-${MY_PV}"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-inherit bash-completion-r1 flag-o-matic toolchain-funcs autotools-utils udev
-
-DESCRIPTION="Userland utilities for ZFS Linux kernel module"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="BSD-2 CDDL MIT"
-SLOT="0"
-IUSE="custom-cflags kernel-builtin +rootfs test-suite static-libs"
-RESTRICT="test"
-
-COMMON_DEPEND="
- sys-apps/util-linux[static-libs?]
- sys-libs/zlib[static-libs(+)?]
- virtual/awk
-"
-DEPEND="${COMMON_DEPEND}
- virtual/pkgconfig
-"
-
-RDEPEND="${COMMON_DEPEND}
- !=sys-apps/grep-2.13*
- !kernel-builtin? ( =sys-fs/zfs-kmod-${PV}* )
- !sys-fs/zfs-fuse
- !prefix? ( virtual/udev )
- test-suite? (
- sys-apps/util-linux
- sys-devel/bc
- sys-block/parted
- sys-fs/lsscsi
- sys-fs/mdadm
- sys-process/procps
- virtual/modutils
- )
- rootfs? (
- app-arch/cpio
- app-misc/pax-utils
- !<sys-boot/grub-2.00-r2:2
- )
-"
-
-pkg_setup() {
- :
-}
-
-src_prepare() {
- # Update paths
- sed -e "s|/sbin/lsmod|/bin/lsmod|" \
- -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
- -e "s|/sbin/parted|/usr/sbin/parted|" \
- -i scripts/common.sh.in
-
- if [ ${PV} != "9999" ]
- then
- epatch "${FILESDIR}/${P}-fix-libzpool-function-relocations.patch"
- fi
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=user
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-udevdir="$(get_udevdir)"
- )
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install
- gen_usr_ldscript -a uutil nvpair zpool zfs
- rm -rf "${ED}usr/share/dracut"
- use test-suite || rm -rf "${ED}usr/libexec"
-
- newbashcomp "${FILESDIR}/bash-completion" zfs
-
-}
-
-pkg_postinst() {
-
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- einfo "Adding ${P} to the module database to ensure that the"
- einfo "kernel modules and userland utilities stay in sync."
- update_moduledb
- fi
-
- [ -e "${EROOT}etc/runlevels/boot/zfs" ] \
- || ewarn 'You should add zfs to the boot runlevel.'
-
- if [ -e "${EROOT}etc/runlevels/shutdown/zfs-shutdown" ]
- then
- einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
- rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
- fi
-
-}
-
-pkg_postrm() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- remove_moduledb
- fi
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-AT_M4DIR="config"
-AUTOTOOLS_AUTORECONF="1"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-if [ ${PV} == "9999" ] ; then
- inherit git-2 linux-mod
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
-else
- inherit eutils versionator
- MY_PV=$(replace_version_separator 3 '-')
- SRC_URI="https://github.com/zfsonlinux/${PN}/archive/${PN}-${MY_PV}.tar.gz"
- S="${WORKDIR}/${PN}-${PN}-${MY_PV}"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-inherit bash-completion-r1 flag-o-matic toolchain-funcs autotools-utils udev systemd
-
-DESCRIPTION="Userland utilities for ZFS Linux kernel module"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="BSD-2 CDDL MIT"
-SLOT="0"
-IUSE="bash-completion custom-cflags kernel-builtin +rootfs selinux test-suite static-libs"
-RESTRICT="test"
-
-COMMON_DEPEND="
- selinux? ( sys-libs/libselinux )
- sys-apps/util-linux[static-libs?]
- sys-libs/zlib[static-libs(+)?]
- virtual/awk
-"
-DEPEND="${COMMON_DEPEND}
- virtual/pkgconfig
-"
-
-RDEPEND="${COMMON_DEPEND}
- !=sys-apps/grep-2.13*
- !kernel-builtin? ( =sys-fs/zfs-kmod-${PV}* )
- !sys-fs/zfs-fuse
- !prefix? ( virtual/udev )
- test-suite? (
- sys-apps/util-linux
- sys-devel/bc
- sys-block/parted
- sys-fs/lsscsi
- sys-fs/mdadm
- sys-process/procps
- virtual/modutils
- )
- rootfs? (
- app-arch/cpio
- app-misc/pax-utils
- !<sys-boot/grub-2.00-r2:2
- )
-"
-
-pkg_setup() {
- :
-}
-
-src_prepare() {
- if [ ${PV} != "9999" ]
- then
- # Fix OpenRC dependencies
- epatch "${FILESDIR}/${P}-gentoo-openrc-dependencies.patch"
-
- # Make zvol initialization asynchronous
- epatch "${FILESDIR}/${P}-fix-zvol-initialization-r1.patch"
-
- # Use MAXPATHLEN to silence GCC 4.8 warning
- epatch "${FILESDIR}/${P}-fix-gcc-4.8-warning.patch"
-
- # Avoid zdb abort
- epatch "${FILESDIR}/${P}-avoid-zdb-abort.patch"
- fi
-
- # Update paths
- sed -e "s|/sbin/lsmod|/bin/lsmod|" \
- -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
- -e "s|/sbin/parted|/usr/sbin/parted|" \
- -i scripts/common.sh.in
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=user
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-udevdir="$(get_udevdir)"
- $(use_with selinux)
- )
- autotools-utils_src_configure
-
- # prepare systemd unit and helper script
- cat "${FILESDIR}/zfs.service.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs.service" || die
- cat "${FILESDIR}/zfs-init.sh.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs-init.sh" || die
-}
-
-src_install() {
- autotools-utils_src_install
- gen_usr_ldscript -a uutil nvpair zpool zfs
- rm -rf "${ED}usr/lib/dracut"
- use test-suite || rm -rf "${ED}usr/share/zfs"
-
- use bash-completion && newbashcomp "${FILESDIR}/bash-completion" zfs
-
- exeinto /usr/libexec
- doexe "${T}/zfs-init.sh"
- systemd_dounit "${T}/zfs.service"
-}
-
-pkg_postinst() {
-
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- einfo "Adding ${P} to the module database to ensure that the"
- einfo "kernel modules and userland utilities stay in sync."
- update_moduledb
- fi
-
- [ -e "${EROOT}etc/runlevels/boot/zfs" ] \
- || ewarn 'You should add zfs to the boot runlevel.'
-
- if [ -e "${EROOT}etc/runlevels/shutdown/zfs-shutdown" ]
- then
- einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
- rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
- fi
-
-}
-
-pkg_postrm() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- remove_moduledb
- fi
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-PYTHON_COMPAT=( python{2_7,3_4} )
-
-inherit python-r1
-
-AT_M4DIR="config"
-AUTOTOOLS_AUTORECONF="1"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-if [ ${PV} == "9999" ] ; then
- inherit git-2 linux-mod
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
-else
- inherit eutils versionator
- MY_PV=$(replace_version_separator 3 '-')
- SRC_URI="https://github.com/zfsonlinux/${PN}/archive/${PN}-${MY_PV}.tar.gz
- https://dev.gentoo.org/~ryao/dist/${PN}-kmod-${MY_PV}-p4.tar.xz"
- S="${WORKDIR}/${PN}-${PN}-${MY_PV}"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-inherit bash-completion-r1 flag-o-matic toolchain-funcs autotools-utils udev systemd
-
-DESCRIPTION="Userland utilities for ZFS Linux kernel module"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="BSD-2 CDDL bash-completion? ( MIT )"
-SLOT="0"
-IUSE="bash-completion custom-cflags debug kernel-builtin +rootfs selinux test-suite static-libs"
-RESTRICT="test"
-
-COMMON_DEPEND="
- selinux? ( sys-libs/libselinux )
- sys-apps/util-linux[static-libs?]
- sys-libs/zlib[static-libs(+)?]
- virtual/awk
-"
-DEPEND="${COMMON_DEPEND}
- virtual/pkgconfig
-"
-
-RDEPEND="${COMMON_DEPEND}
- !=sys-apps/grep-2.13*
- !kernel-builtin? ( =sys-fs/zfs-kmod-${PV}* )
- !sys-fs/zfs-fuse
- !prefix? ( virtual/udev )
- test-suite? (
- sys-apps/util-linux
- sys-devel/bc
- sys-block/parted
- sys-fs/lsscsi
- sys-fs/mdadm
- sys-process/procps
- virtual/modutils
- )
- rootfs? (
- app-arch/cpio
- app-misc/pax-utils
- !<sys-boot/grub-2.00-r2:2
- )
-"
-
-pkg_setup() {
- :
-}
-
-src_prepare() {
- if [ ${PV} != "9999" ]
- then
- # Apply patch set
- EPATCH_SUFFIX="patch" \
- EPATCH_FORCE="yes" \
- epatch "${WORKDIR}/${PN}-kmod-${MY_PV}-patches"
- fi
-
- # Update paths
- sed -e "s|/sbin/lsmod|/bin/lsmod|" \
- -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
- -e "s|/sbin/parted|/usr/sbin/parted|" \
- -i scripts/common.sh.in
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=user
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-udevdir="$(get_udevdir)"
- --with-blkid
- $(use_enable debug)
- $(use_with selinux)
- )
- autotools-utils_src_configure
-
- # prepare systemd unit and helper script
- cat "${FILESDIR}/zfs.service.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs.service" || die
- cat "${FILESDIR}/zfs-init.sh.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs-init.sh" || die
-}
-
-src_install() {
- autotools-utils_src_install
- gen_usr_ldscript -a uutil nvpair zpool zfs
- rm -rf "${ED}usr/lib/dracut"
- use test-suite || rm -rf "${ED}usr/share/zfs"
-
- use bash-completion && newbashcomp "${FILESDIR}/bash-completion-r1" zfs
-
- exeinto /usr/libexec
- doexe "${T}/zfs-init.sh"
- systemd_dounit "${T}/zfs.service"
-}
-
-pkg_postinst() {
-
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- einfo "Adding ${P} to the module database to ensure that the"
- einfo "kernel modules and userland utilities stay in sync."
- update_moduledb
- fi
-
- [ -e "${EROOT}etc/runlevels/boot/zfs" ] \
- || ewarn 'You should add zfs to the boot runlevel.'
-
- if [ -e "${EROOT}etc/runlevels/shutdown/zfs-shutdown" ]
- then
- einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
- rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
- fi
-
-}
-
-pkg_postrm() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- remove_moduledb
- fi
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-PYTHON_COMPAT=( python{2_7,3_4} )
-
-inherit python-r1
-
-AT_M4DIR="config"
-AUTOTOOLS_AUTORECONF="1"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-if [ ${PV} == "9999" ] ; then
- inherit git-2 linux-mod
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
-else
- inherit eutils versionator
- SRC_URI="https://github.com/zfsonlinux/${PN}/archive/${P}.tar.gz
- https://dev.gentoo.org/~ryao/dist/${P}-patches-r1.tar.xz"
- S="${WORKDIR}/${PN}-${P}"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-inherit bash-completion-r1 flag-o-matic toolchain-funcs autotools-utils udev systemd
-
-DESCRIPTION="Userland utilities for ZFS Linux kernel module"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="BSD-2 CDDL bash-completion? ( MIT )"
-SLOT="0"
-IUSE="bash-completion custom-cflags debug kernel-builtin +rootfs test-suite static-libs"
-RESTRICT="test"
-
-COMMON_DEPEND="
- sys-apps/util-linux[static-libs?]
- sys-libs/zlib[static-libs(+)?]
- virtual/awk
-"
-DEPEND="${COMMON_DEPEND}
- virtual/pkgconfig
-"
-
-RDEPEND="${COMMON_DEPEND}
- !=sys-apps/grep-2.13*
- !kernel-builtin? ( =sys-fs/zfs-kmod-${PV}* )
- !sys-fs/zfs-fuse
- !prefix? ( virtual/udev )
- test-suite? (
- sys-apps/util-linux
- sys-devel/bc
- sys-block/parted
- sys-fs/lsscsi
- sys-fs/mdadm
- sys-process/procps
- virtual/modutils
- )
- rootfs? (
- app-arch/cpio
- app-misc/pax-utils
- !<sys-boot/grub-2.00-r2:2
- )
-"
-
-pkg_setup() {
- :
-}
-
-src_prepare() {
- if [ ${PV} != "9999" ]
- then
- # Apply patch set
- EPATCH_SUFFIX="patch" \
- EPATCH_FORCE="yes" \
- epatch "${WORKDIR}/${P}-patches"
- fi
-
-# Update paths
- sed -e "s|/sbin/lsmod|/bin/lsmod|" \
- -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
- -e "s|/sbin/parted|/usr/sbin/parted|" \
- -i scripts/common.sh.in
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=user
- --with-dracutdir="/usr/$(get_libdir)/dracut"
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-udevdir="$(get_udevdir)"
- --with-blkid
- $(use_enable debug)
- )
- autotools-utils_src_configure
-
- # prepare systemd unit and helper script
- cat "${FILESDIR}/zfs.service.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs.service" || die
- cat "${FILESDIR}/zfs-init.sh.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs-init.sh" || die
-}
-
-src_install() {
- autotools-utils_src_install
- gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core
- use test-suite || rm -rf "${ED}usr/share/zfs"
-
- use bash-completion && newbashcomp "${FILESDIR}/bash-completion-r1" zfs
-
- exeinto /usr/libexec
- doexe "${T}/zfs-init.sh"
- systemd_dounit "${T}/zfs.service"
-}
-
-pkg_postinst() {
-
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- einfo "Adding ${P} to the module database to ensure that the"
- einfo "kernel modules and userland utilities stay in sync."
- update_moduledb
- fi
-
- [ -e "${EROOT}etc/runlevels/boot/zfs" ] \
- || ewarn 'You should add zfs to the boot runlevel.'
-
- if [ -e "${EROOT}etc/runlevels/shutdown/zfs-shutdown" ]
- then
- einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
- rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
- fi
-
-}
-
-pkg_postrm() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- remove_moduledb
- fi
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-PYTHON_COMPAT=( python{2_7,3_4} )
-
-inherit python-r1
-
-AT_M4DIR="config"
-AUTOTOOLS_AUTORECONF="1"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-if [ ${PV} == "9999" ] ; then
- inherit git-2 linux-mod
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
-else
- inherit eutils versionator
- SRC_URI="https://github.com/zfsonlinux/${PN}/archive/${P}.tar.gz"
- S="${WORKDIR}/${PN}-${P}"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-inherit bash-completion-r1 flag-o-matic toolchain-funcs autotools-utils udev systemd
-
-DESCRIPTION="Userland utilities for ZFS Linux kernel module"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="BSD-2 CDDL bash-completion? ( MIT )"
-SLOT="0"
-IUSE="bash-completion custom-cflags debug kernel-builtin +rootfs test-suite static-libs"
-RESTRICT="test"
-
-COMMON_DEPEND="
- sys-apps/util-linux[static-libs?]
- sys-libs/zlib[static-libs(+)?]
- virtual/awk
-"
-DEPEND="${COMMON_DEPEND}
- virtual/pkgconfig
-"
-
-RDEPEND="${COMMON_DEPEND}
- !=sys-apps/grep-2.13*
- !kernel-builtin? ( =sys-fs/zfs-kmod-${PV}* )
- !sys-fs/zfs-fuse
- !prefix? ( virtual/udev )
- test-suite? (
- sys-apps/util-linux
- sys-devel/bc
- sys-block/parted
- sys-fs/lsscsi
- sys-fs/mdadm
- sys-process/procps
- virtual/modutils
- )
- rootfs? (
- app-arch/cpio
- app-misc/pax-utils
- !<sys-boot/grub-2.00-r2:2
- )
-"
-
-pkg_setup() {
- :
-}
-
-src_prepare() {
- # Update paths
- sed -e "s|/sbin/lsmod|/bin/lsmod|" \
- -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
- -e "s|/sbin/parted|/usr/sbin/parted|" \
- -i scripts/common.sh.in
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=user
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-udevdir="$(get_udevdir)"
- --with-blkid
- $(use_enable debug)
- )
- autotools-utils_src_configure
-
- # prepare systemd unit and helper script
- cat "${FILESDIR}/zfs.service.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs.service" || die
- cat "${FILESDIR}/zfs-init.sh.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs-init.sh" || die
-}
-
-src_install() {
- autotools-utils_src_install
- gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core
- rm -rf "${ED}usr/lib/dracut"
- use test-suite || rm -rf "${ED}usr/share/zfs"
-
- use bash-completion && newbashcomp "${FILESDIR}/bash-completion-r1" zfs
-
- exeinto /usr/libexec
- doexe "${T}/zfs-init.sh"
- systemd_dounit "${T}/zfs.service"
- doinitd "${FILESDIR}/zed"
-}
-
-pkg_postinst() {
-
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- einfo "Adding ${P} to the module database to ensure that the"
- einfo "kernel modules and userland utilities stay in sync."
- update_moduledb
- fi
-
- [ -e "${EROOT}etc/runlevels/boot/zfs" ] \
- || ewarn 'You should add zfs to the boot runlevel.'
-
- if [ -e "${EROOT}etc/runlevels/shutdown/zfs-shutdown" ]
- then
- einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
- rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
- fi
-
-}
-
-pkg_postrm() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- remove_moduledb
- fi
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-PYTHON_COMPAT=( python{2_7,3_4,3_5} )
-
-if [ ${PV} == "9999" ] ; then
- inherit git-r3 linux-mod
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
-else
- SRC_URI="https://github.com/zfsonlinux/${PN}/releases/download/${P}/${P}.tar.gz"
- KEYWORDS=" ~amd64"
-fi
-
-inherit autotools-utils bash-completion-r1 flag-o-matic linux-info python-r1 systemd toolchain-funcs udev
-
-DESCRIPTION="Userland utilities for ZFS Linux kernel module"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="BSD-2 CDDL MIT"
-SLOT="0"
-IUSE="custom-cflags debug kernel-builtin +rootfs test-suite static-libs"
-RESTRICT="test"
-
-COMMON_DEPEND="
- sys-apps/util-linux[static-libs?]
- sys-libs/zlib[static-libs(+)?]
- virtual/awk
-"
-DEPEND="${COMMON_DEPEND}
- virtual/pkgconfig
-"
-
-RDEPEND="${COMMON_DEPEND}
- !=sys-apps/grep-2.13*
- !kernel-builtin? ( =sys-fs/zfs-kmod-${PV}* )
- !sys-fs/zfs-fuse
- !prefix? ( virtual/udev )
- test-suite? (
- sys-apps/util-linux
- sys-devel/bc
- sys-block/parted
- sys-fs/lsscsi
- sys-fs/mdadm
- sys-process/procps
- virtual/modutils
- )
- rootfs? (
- app-arch/cpio
- app-misc/pax-utils
- !<sys-boot/grub-2.00-r2:2
- )
- sys-fs/udev-init-scripts
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-pkg_setup() {
- if use kernel_linux && use test-suite; then
- linux-info_pkg_setup
- if ! linux_config_exists; then
- ewarn "Cannot check the linux kernel configuration."
- else
- # recheck that we don't have usblp to collide with libusb
- if use test-suite; then
- if linux_chkconfig_present BLK_DEV_LOOP; then
- eerror "The ZFS test suite requires loop device support enabled."
- eerror "Please enable it:"
- eerror " CONFIG_BLK_DEV_LOOP=y"
- eerror "in /usr/src/linux/.config or"
- eerror " Device Drivers --->"
- eerror " Block devices --->"
- eerror " [ ] Loopback device support"
- fi
- fi
- fi
- fi
-
-}
-
-src_prepare() {
- # Update paths
- sed -e "s|/sbin/lsmod|/bin/lsmod|" \
- -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
- -e "s|/sbin/parted|/usr/sbin/parted|" \
- -i scripts/common.sh.in
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=user
- --with-dracutdir="/usr/$(get_libdir)/dracut"
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-udevdir="$(get_udevdir)"
- --with-blkid
- $(use_enable debug)
- )
- autotools-utils_src_configure
-
- # prepare systemd unit and helper script
- cat "${FILESDIR}/zfs.service.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs.service" || die
- cat "${FILESDIR}/zfs-init.sh.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs-init.sh" || die
-}
-
-src_install() {
- autotools-utils_src_install
- gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core
- use test-suite || rm -rf "${ED}usr/share/zfs"
-
- newbashcomp "${FILESDIR}/bash-completion-r1" zfs
- bashcomp_alias zfs zpool
-
- exeinto /usr/libexec
- doexe "${T}/zfs-init.sh"
- systemd_dounit "${T}/zfs.service"
-}
-
-pkg_postinst() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- einfo "Adding ${P} to the module database to ensure that the"
- einfo "kernel modules and userland utilities stay in sync."
- update_moduledb
- fi
-
- if [ -e "${EROOT}etc/runlevels/boot/zfs" ]
- then
- einfo 'The zfs boot script has been split into the zfs-import,'
- einfo 'zfs-mount and zfs-share scripts.'
- einfo
- einfo 'You had the zfs script in your boot runlevel. For your'
- einfo 'convenience, it has been automatically removed and the three'
- einfo 'scripts that replace it have been configured to start.'
- einfo 'The zfs-import and zfs-mount scripts have been added to the boot'
- einfo 'runlevel while the zfs-share script is in the default runlevel.'
-
- rm "${EROOT}etc/runlevels/boot/zfs"
- ln -snf "${EROOT}etc/init.d/zfs-import" \
- "${EROOT}etc/runlevels/boot/zfs-import"
- ln -snf "${EROOT}etc/init.d/zfs-mount" \
- "${EROOT}etc/runlevels/boot/zfs-mount"
- ln -snf "${EROOT}etc/init.d/zfs-share" \
- "${EROOT}etc/runlevels/default/zfs-share"
- else
- [ -e "${EROOT}etc/runlevels/boot/zfs-import" ] || \
- einfo "You should add zfs-import to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/boot/zfs-mount" ] || \
- einfo "You should add zfs-mount to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/default/zfs-share" ] || \
- einfo "You should add zfs-share to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/default/zed" ]
- then
- einfo 'The downstream OpenRC zed script has replaced by the upstream'
- einfo 'OpenRC zfs-zed script.'
- einfo
- einfo 'You had the zed script in your default runlevel. For your'
- einfo 'convenience, it has been automatically removed and the zfs-zed'
- einfo 'script that replaced it has been configured to start.'
-
- rm "${EROOT}etc/runlevels/boot/zed"
- ln -snf "${EROOT}etc/init.d/zfs-sed" \
- "${EROOT}etc/runlevels/default/zfs-zed"
- else
- [ -e "${EROOT}etc/runlevels/default/zfs-zed" ] || \
- einfo "You should add zfs-zed to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/shutdown/zfs-shutdown" ]
- then
- einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
- rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
- fi
-
-}
-
-pkg_postrm() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- remove_moduledb
- fi
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-PYTHON_COMPAT=( python{2_7,3_4} )
-
-inherit python-r1 linux-info
-
-AT_M4DIR="config"
-AUTOTOOLS_AUTORECONF="1"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-if [ ${PV} == "9999" ] ; then
- inherit git-2 linux-mod
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
-else
- inherit eutils versionator
- SRC_URI="https://github.com/zfsonlinux/${PN}/archive/${P}.tar.gz"
- S="${WORKDIR}/${PN}-${P}"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-inherit bash-completion-r1 flag-o-matic toolchain-funcs autotools-utils udev systemd
-
-DESCRIPTION="Userland utilities for ZFS Linux kernel module"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="BSD-2 CDDL bash-completion? ( MIT )"
-SLOT="0"
-IUSE="bash-completion custom-cflags debug kernel-builtin +rootfs test-suite static-libs"
-RESTRICT="test"
-
-COMMON_DEPEND="
- sys-apps/util-linux[static-libs?]
- sys-libs/zlib[static-libs(+)?]
- virtual/awk
-"
-DEPEND="${COMMON_DEPEND}
- virtual/pkgconfig
-"
-
-RDEPEND="${COMMON_DEPEND}
- !=sys-apps/grep-2.13*
- !kernel-builtin? ( =sys-fs/zfs-kmod-${PV}* )
- !sys-fs/zfs-fuse
- !prefix? ( virtual/udev )
- test-suite? (
- sys-apps/util-linux
- sys-devel/bc
- sys-block/parted
- sys-fs/lsscsi
- sys-fs/mdadm
- sys-process/procps
- virtual/modutils
- )
- rootfs? (
- app-arch/cpio
- app-misc/pax-utils
- !<sys-boot/grub-2.00-r2:2
- )
- !>=sys-fs/udev-init-scripts-28
-"
-
-pkg_setup() {
- if use kernel_linux && use test-suite; then
- linux-info_pkg_setup
- if ! linux_config_exists; then
- ewarn "Cannot check the linux kernel configuration."
- else
- # recheck that we don't have usblp to collide with libusb
- if use test-suite; then
- if linux_chkconfig_present BLK_DEV_LOOP; then
- eerror "The ZFS test suite requires loop device support enabled."
- eerror "Please enable it:"
- eerror " CONFIG_BLK_DEV_LOOP=y"
- eerror "in /usr/src/linux/.config or"
- eerror " Device Drivers --->"
- eerror " Block devices --->"
- eerror " [ ] Loopback device support"
- fi
- fi
- fi
- fi
-
-}
-
-src_prepare() {
-if [ ${PV} != "9999" ]
- then
- # Fix OpenRC scripts
- epatch "${FILESDIR}/zfs-0.6.5-fix-openrc-scripts.patch"
- fi
-
- # Update paths
- sed -e "s|/sbin/lsmod|/bin/lsmod|" \
- -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
- -e "s|/sbin/parted|/usr/sbin/parted|" \
- -i scripts/common.sh.in
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=user
- --with-dracutdir="/usr/$(get_libdir)/dracut"
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-udevdir="$(get_udevdir)"
- --with-blkid
- $(use_enable debug)
- )
- autotools-utils_src_configure
-
- # prepare systemd unit and helper script
- cat "${FILESDIR}/zfs.service.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs.service" || die
- cat "${FILESDIR}/zfs-init.sh.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs-init.sh" || die
-}
-
-src_install() {
- autotools-utils_src_install
- gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core
- use test-suite || rm -rf "${ED}usr/share/zfs"
-
- use bash-completion && newbashcomp "${FILESDIR}/bash-completion-r1" zfs
-
- exeinto /usr/libexec
- doexe "${T}/zfs-init.sh"
- systemd_dounit "${T}/zfs.service"
-}
-
-pkg_postinst() {
-
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- einfo "Adding ${P} to the module database to ensure that the"
- einfo "kernel modules and userland utilities stay in sync."
- update_moduledb
- fi
-
- if [ -e "${EROOT}etc/runlevels/boot/zfs" ]
- then
- einfo 'The zfs boot script has been split into the zfs-import,'
- einfo 'zfs-mount and zfs-share scripts.'
- einfo
- einfo 'You had the zfs script in your boot runlevel. For your'
- einfo 'convenience, it has been automatically removed and the three'
- einfo 'scripts that replace it have been configured to start.'
- einfo 'The zfs-import and zfs-mount scripts have been added to the boot'
- einfo 'runlevel while the zfs-share script is in the default runlevel.'
-
- rm "${EROOT}etc/runlevels/boot/zfs"
- ln -snf "${EROOT}etc/init.d/zfs-import" \
- "${EROOT}etc/runlevels/boot/zfs-import"
- ln -snf "${EROOT}etc/init.d/zfs-mount" \
- "${EROOT}etc/runlevels/boot/zfs-mount"
- ln -snf "${EROOT}etc/init.d/zfs-share" \
- "${EROOT}etc/runlevels/default/zfs-share"
- else
- [ -e "${EROOT}etc/runlevels/boot/zfs-import" ] || \
- einfo "You should add zfs-import to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/boot/zfs-mount" ] || \
- einfo "You should add zfs-mount to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/default/zfs-share" ] || \
- einfo "You should add zfs-share to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/default/zed" ]
- then
- einfo 'The downstream OpenRC zed script has replaced by the upstream'
- einfo 'OpenRC zfs-zed script.'
- einfo
- einfo 'You had the zed script in your default runlevel. For your'
- einfo 'convenience, it has been automatically removed and the zfs-zed'
- einfo 'script that replaced it has been configured to start.'
-
- rm "${EROOT}etc/runlevels/boot/zed"
- ln -snf "${EROOT}etc/init.d/zfs-sed" \
- "${EROOT}etc/runlevels/default/zfs-zed"
- else
- [ -e "${EROOT}etc/runlevels/default/zfs-zed" ] || \
- einfo "You should add zfs-zed to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/shutdown/zfs-shutdown" ]
- then
- einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
- rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
- fi
-
-}
-
-pkg_postrm() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- remove_moduledb
- fi
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-PYTHON_COMPAT=( python{2_7,3_4,3_5} )
-
-if [ ${PV} == "9999" ] ; then
- inherit git-r3 linux-mod
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
-else
- SRC_URI="https://github.com/zfsonlinux/${PN}/releases/download/${P}/${P}.tar.gz
- https://dev.gentoo.org/~ryao/dist/${P}-patches-p0.tar.xz"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-inherit autotools-utils bash-completion-r1 flag-o-matic linux-info python-r1 systemd toolchain-funcs udev
-
-DESCRIPTION="Userland utilities for ZFS Linux kernel module"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="BSD-2 CDDL MIT"
-SLOT="0"
-IUSE="custom-cflags debug kernel-builtin +rootfs test-suite static-libs"
-RESTRICT="test"
-
-COMMON_DEPEND="
- sys-apps/util-linux[static-libs?]
- sys-libs/zlib[static-libs(+)?]
- virtual/awk
-"
-DEPEND="${COMMON_DEPEND}
- virtual/pkgconfig
-"
-
-RDEPEND="${COMMON_DEPEND}
- !=sys-apps/grep-2.13*
- !kernel-builtin? (
- =sys-fs/zfs-kmod-${PV}*
- !<sys-fs/zfs-kmod-0.6.5.3-r1
- )
- !sys-fs/zfs-fuse
- !prefix? ( virtual/udev )
- test-suite? (
- sys-apps/util-linux
- sys-devel/bc
- sys-block/parted
- sys-fs/lsscsi
- sys-fs/mdadm
- sys-process/procps
- virtual/modutils
- )
- rootfs? (
- app-arch/cpio
- app-misc/pax-utils
- !<sys-boot/grub-2.00-r2:2
- )
- !>=sys-fs/udev-init-scripts-28
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-pkg_setup() {
- if use kernel_linux && use test-suite; then
- linux-info_pkg_setup
- if ! linux_config_exists; then
- ewarn "Cannot check the linux kernel configuration."
- else
- # recheck that we don't have usblp to collide with libusb
- if use test-suite; then
- if linux_chkconfig_present BLK_DEV_LOOP; then
- eerror "The ZFS test suite requires loop device support enabled."
- eerror "Please enable it:"
- eerror " CONFIG_BLK_DEV_LOOP=y"
- eerror "in /usr/src/linux/.config or"
- eerror " Device Drivers --->"
- eerror " Block devices --->"
- eerror " [ ] Loopback device support"
- fi
- fi
- fi
- fi
-
-}
-
-src_prepare() {
- if [ ${PV} != "9999" ]
- then
- # Apply patch set
- EPATCH_SUFFIX="patch" \
- EPATCH_FORCE="yes" \
- epatch "${WORKDIR}/${P}-patches"
- fi
-
- # Update paths
- sed -e "s|/sbin/lsmod|/bin/lsmod|" \
- -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
- -e "s|/sbin/parted|/usr/sbin/parted|" \
- -i scripts/common.sh.in
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=user
- --with-dracutdir="/usr/$(get_libdir)/dracut"
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-udevdir="$(get_udevdir)"
- --with-blkid
- $(use_enable debug)
- )
- autotools-utils_src_configure
-
- # prepare systemd unit and helper script
- cat "${FILESDIR}/zfs.service.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs.service" || die
- cat "${FILESDIR}/zfs-init.sh.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs-init.sh" || die
-}
-
-src_install() {
- autotools-utils_src_install
- gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core
- use test-suite || rm -rf "${ED}usr/share/zfs"
-
- newbashcomp "${FILESDIR}/bash-completion-r1" zfs
- bashcomp_alias zfs zpool
-
- exeinto /usr/libexec
- doexe "${T}/zfs-init.sh"
- systemd_dounit "${T}/zfs.service"
-}
-
-pkg_postinst() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- einfo "Adding ${P} to the module database to ensure that the"
- einfo "kernel modules and userland utilities stay in sync."
- update_moduledb
- fi
-
- if [ -e "${EROOT}etc/runlevels/boot/zfs" ]
- then
- einfo 'The zfs boot script has been split into the zfs-import,'
- einfo 'zfs-mount and zfs-share scripts.'
- einfo
- einfo 'You had the zfs script in your boot runlevel. For your'
- einfo 'convenience, it has been automatically removed and the three'
- einfo 'scripts that replace it have been configured to start.'
- einfo 'The zfs-import and zfs-mount scripts have been added to the boot'
- einfo 'runlevel while the zfs-share script is in the default runlevel.'
-
- rm "${EROOT}etc/runlevels/boot/zfs"
- ln -snf "${EROOT}etc/init.d/zfs-import" \
- "${EROOT}etc/runlevels/boot/zfs-import"
- ln -snf "${EROOT}etc/init.d/zfs-mount" \
- "${EROOT}etc/runlevels/boot/zfs-mount"
- ln -snf "${EROOT}etc/init.d/zfs-share" \
- "${EROOT}etc/runlevels/default/zfs-share"
- else
- [ -e "${EROOT}etc/runlevels/boot/zfs-import" ] || \
- einfo "You should add zfs-import to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/boot/zfs-mount" ] || \
- einfo "You should add zfs-mount to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/default/zfs-share" ] || \
- einfo "You should add zfs-share to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/default/zed" ]
- then
- einfo 'The downstream OpenRC zed script has replaced by the upstream'
- einfo 'OpenRC zfs-zed script.'
- einfo
- einfo 'You had the zed script in your default runlevel. For your'
- einfo 'convenience, it has been automatically removed and the zfs-zed'
- einfo 'script that replaced it has been configured to start.'
-
- rm "${EROOT}etc/runlevels/boot/zed"
- ln -snf "${EROOT}etc/init.d/zfs-sed" \
- "${EROOT}etc/runlevels/default/zfs-zed"
- else
- [ -e "${EROOT}etc/runlevels/default/zfs-zed" ] || \
- einfo "You should add zfs-zed to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/shutdown/zfs-shutdown" ]
- then
- einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
- rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
- fi
-
- einfo "sys-kernel/spl-0.6.5.3-r1, sys-fs/zfs-kmod-0.6.5.3-r1 and "
- einfo "sys-fs/zfs-0.6.5.3-r1 have introduced a partial stable "
- einfo "/dev/zfs API developed by ClusterHQ. This means that situations "
- einfo "arising from the kernel modules and userland tools being "
- einfo "mismatched on future updates will not cause problems."
- einfo
- einfo "In specific, this should solve the failure to mount filesystems when "
- einfo "old modules are cached in an old initramfs provided that those "
- einfo "modules support this API"
- if use rootfs
- then
- einfo
- ewarn "The older modules will *NOT* work with the new userland code."
- ewarn "It is very important that you update your initramfs after this "
- ewarn "update."
- fi
-}
-
-pkg_postrm() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- remove_moduledb
- fi
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-PYTHON_COMPAT=( python{2_7,3_4,3_5} )
-
-AT_M4DIR="config"
-AUTOTOOLS_AUTORECONF="1"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-if [ ${PV} == "9999" ] ; then
- inherit git-r3 linux-mod
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
-else
- SRC_URI="https://github.com/zfsonlinux/${PN}/releases/download/${P}/${P}.tar.gz
- https://dev.gentoo.org/~ryao/dist/${P}-patches-p2.tar.xz"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-inherit autotools-utils bash-completion-r1 flag-o-matic linux-info python-r1 systemd toolchain-funcs udev
-
-DESCRIPTION="Userland utilities for ZFS Linux kernel module"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="BSD-2 CDDL MIT"
-SLOT="0"
-IUSE="custom-cflags debug kernel-builtin +rootfs test-suite static-libs"
-RESTRICT="test"
-
-COMMON_DEPEND="
- sys-apps/util-linux[static-libs?]
- sys-libs/zlib[static-libs(+)?]
- virtual/awk
-"
-DEPEND="${COMMON_DEPEND}
- virtual/pkgconfig
-"
-
-RDEPEND="${COMMON_DEPEND}
- !=sys-apps/grep-2.13*
- !kernel-builtin? (
- =sys-fs/zfs-kmod-${PV}*
- !<sys-fs/zfs-kmod-0.6.5.3-r1
- )
- !sys-fs/zfs-fuse
- !prefix? ( virtual/udev )
- test-suite? (
- sys-apps/util-linux
- sys-devel/bc
- sys-block/parted
- sys-fs/lsscsi
- sys-fs/mdadm
- sys-process/procps
- virtual/modutils
- )
- rootfs? (
- app-arch/cpio
- app-misc/pax-utils
- !<sys-boot/grub-2.00-r2:2
- )
- !>=sys-fs/udev-init-scripts-28
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-pkg_setup() {
- if use kernel_linux && use test-suite; then
- linux-info_pkg_setup
- if ! linux_config_exists; then
- ewarn "Cannot check the linux kernel configuration."
- else
- # recheck that we don't have usblp to collide with libusb
- if use test-suite; then
- if linux_chkconfig_present BLK_DEV_LOOP; then
- eerror "The ZFS test suite requires loop device support enabled."
- eerror "Please enable it:"
- eerror " CONFIG_BLK_DEV_LOOP=y"
- eerror "in /usr/src/linux/.config or"
- eerror " Device Drivers --->"
- eerror " Block devices --->"
- eerror " [ ] Loopback device support"
- fi
- fi
- fi
- fi
-
-}
-
-src_prepare() {
- if [ ${PV} != "9999" ]
- then
- # Apply patch set
- EPATCH_SUFFIX="patch" \
- EPATCH_FORCE="yes" \
- epatch "${WORKDIR}/${P}-patches"
- fi
-
- # Update paths
- sed -e "s|/sbin/lsmod|/bin/lsmod|" \
- -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
- -e "s|/sbin/parted|/usr/sbin/parted|" \
- -i scripts/common.sh.in
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=user
- --with-dracutdir="/usr/$(get_libdir)/dracut"
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-udevdir="$(get_udevdir)"
- --with-blkid
- $(use_enable debug)
- )
- autotools-utils_src_configure
-
- # prepare systemd unit and helper script
- cat "${FILESDIR}/zfs.service.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs.service" || die
- cat "${FILESDIR}/zfs-init.sh.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs-init.sh" || die
-}
-
-src_install() {
- autotools-utils_src_install
- gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core
- use test-suite || rm -rf "${ED}usr/share/zfs"
-
- newbashcomp "${FILESDIR}/bash-completion-r1" zfs
- bashcomp_alias zfs zpool
-
- exeinto /usr/libexec
- doexe "${T}/zfs-init.sh"
- systemd_dounit "${T}/zfs.service"
-}
-
-pkg_postinst() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- einfo "Adding ${P} to the module database to ensure that the"
- einfo "kernel modules and userland utilities stay in sync."
- update_moduledb
- fi
-
- if [ -e "${EROOT}etc/runlevels/boot/zfs" ]
- then
- einfo 'The zfs boot script has been split into the zfs-import,'
- einfo 'zfs-mount and zfs-share scripts.'
- einfo
- einfo 'You had the zfs script in your boot runlevel. For your'
- einfo 'convenience, it has been automatically removed and the three'
- einfo 'scripts that replace it have been configured to start.'
- einfo 'The zfs-import and zfs-mount scripts have been added to the boot'
- einfo 'runlevel while the zfs-share script is in the default runlevel.'
-
- rm "${EROOT}etc/runlevels/boot/zfs"
- ln -snf "${EROOT}etc/init.d/zfs-import" \
- "${EROOT}etc/runlevels/boot/zfs-import"
- ln -snf "${EROOT}etc/init.d/zfs-mount" \
- "${EROOT}etc/runlevels/boot/zfs-mount"
- ln -snf "${EROOT}etc/init.d/zfs-share" \
- "${EROOT}etc/runlevels/default/zfs-share"
- else
- [ -e "${EROOT}etc/runlevels/boot/zfs-import" ] || \
- einfo "You should add zfs-import to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/boot/zfs-mount" ] || \
- einfo "You should add zfs-mount to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/default/zfs-share" ] || \
- einfo "You should add zfs-share to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/default/zed" ]
- then
- einfo 'The downstream OpenRC zed script has replaced by the upstream'
- einfo 'OpenRC zfs-zed script.'
- einfo
- einfo 'You had the zed script in your default runlevel. For your'
- einfo 'convenience, it has been automatically removed and the zfs-zed'
- einfo 'script that replaced it has been configured to start.'
-
- rm "${EROOT}etc/runlevels/boot/zed"
- ln -snf "${EROOT}etc/init.d/zfs-sed" \
- "${EROOT}etc/runlevels/default/zfs-zed"
- else
- [ -e "${EROOT}etc/runlevels/default/zfs-zed" ] || \
- einfo "You should add zfs-zed to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/shutdown/zfs-shutdown" ]
- then
- einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
- rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
- fi
-
- einfo "sys-kernel/spl-0.6.5.3-r1, sys-fs/zfs-kmod-0.6.5.3-r1 and "
- einfo "sys-fs/zfs-0.6.5.3-r1 have introduced a partial stable "
- einfo "/dev/zfs API developed by ClusterHQ. This means that situations "
- einfo "arising from the kernel modules and userland tools being "
- einfo "mismatched on future updates will not cause problems."
- einfo
- einfo "In specific, this should solve the failure to mount filesystems when "
- einfo "old modules are cached in an old initramfs provided that those "
- einfo "modules support this API"
- if use rootfs
- then
- einfo
- ewarn "The older modules will *NOT* work with the new userland code."
- ewarn "It is very important that you update your initramfs after this "
- ewarn "update."
- fi
-}
-
-pkg_postrm() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- remove_moduledb
- fi
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-PYTHON_COMPAT=( python{2_7,3_4,3_5} )
-
-AT_M4DIR="config"
-AUTOTOOLS_AUTORECONF="1"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-if [ ${PV} == "9999" ] ; then
- inherit git-r3 linux-mod
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
-else
- SRC_URI="https://github.com/zfsonlinux/${PN}/releases/download/${P}/${P}.tar.gz
- https://dev.gentoo.org/~ryao/dist/${P}-patches-p3.tar.xz"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-inherit autotools-utils bash-completion-r1 flag-o-matic linux-info python-r1 systemd toolchain-funcs udev
-
-DESCRIPTION="Userland utilities for ZFS Linux kernel module"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="BSD-2 CDDL MIT"
-SLOT="0"
-IUSE="custom-cflags debug kernel-builtin +rootfs test-suite static-libs"
-RESTRICT="test"
-
-COMMON_DEPEND="
- sys-apps/util-linux[static-libs?]
- sys-libs/zlib[static-libs(+)?]
- virtual/awk
-"
-DEPEND="${COMMON_DEPEND}
- virtual/pkgconfig
-"
-
-RDEPEND="${COMMON_DEPEND}
- !=sys-apps/grep-2.13*
- !kernel-builtin? (
- =sys-fs/zfs-kmod-${PV}*
- !<sys-fs/zfs-kmod-0.6.5.3-r1
- )
- !sys-fs/zfs-fuse
- !prefix? ( virtual/udev )
- test-suite? (
- sys-apps/util-linux
- sys-devel/bc
- sys-block/parted
- sys-fs/lsscsi
- sys-fs/mdadm
- sys-process/procps
- virtual/modutils
- )
- rootfs? (
- app-arch/cpio
- app-misc/pax-utils
- !<sys-boot/grub-2.00-r2:2
- )
- !>=sys-fs/udev-init-scripts-28
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-pkg_setup() {
- if use kernel_linux && use test-suite; then
- linux-info_pkg_setup
- if ! linux_config_exists; then
- ewarn "Cannot check the linux kernel configuration."
- else
- # recheck that we don't have usblp to collide with libusb
- if use test-suite; then
- if linux_chkconfig_present BLK_DEV_LOOP; then
- eerror "The ZFS test suite requires loop device support enabled."
- eerror "Please enable it:"
- eerror " CONFIG_BLK_DEV_LOOP=y"
- eerror "in /usr/src/linux/.config or"
- eerror " Device Drivers --->"
- eerror " Block devices --->"
- eerror " [ ] Loopback device support"
- fi
- fi
- fi
- fi
-
-}
-
-src_prepare() {
- if [ ${PV} != "9999" ]
- then
- # Apply patch set
- EPATCH_SUFFIX="patch" \
- EPATCH_FORCE="yes" \
- epatch "${WORKDIR}/${P}-patches"
- fi
-
- # Update paths
- sed -e "s|/sbin/lsmod|/bin/lsmod|" \
- -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
- -e "s|/sbin/parted|/usr/sbin/parted|" \
- -i scripts/common.sh.in
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=user
- --with-dracutdir="/usr/$(get_libdir)/dracut"
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-udevdir="$(get_udevdir)"
- --with-blkid
- $(use_enable debug)
- )
- autotools-utils_src_configure
-
- # prepare systemd unit and helper script
- cat "${FILESDIR}/zfs.service.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs.service" || die
- cat "${FILESDIR}/zfs-init.sh.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs-init.sh" || die
-}
-
-src_install() {
- autotools-utils_src_install
- gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core
- use test-suite || rm -rf "${ED}usr/share/zfs"
-
- newbashcomp "${FILESDIR}/bash-completion-r1" zfs
- bashcomp_alias zfs zpool
-
- exeinto /usr/libexec
- doexe "${T}/zfs-init.sh"
- systemd_dounit "${T}/zfs.service"
-}
-
-pkg_postinst() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- einfo "Adding ${P} to the module database to ensure that the"
- einfo "kernel modules and userland utilities stay in sync."
- update_moduledb
- fi
-
- if [ -e "${EROOT}etc/runlevels/boot/zfs" ]
- then
- einfo 'The zfs boot script has been split into the zfs-import,'
- einfo 'zfs-mount and zfs-share scripts.'
- einfo
- einfo 'You had the zfs script in your boot runlevel. For your'
- einfo 'convenience, it has been automatically removed and the three'
- einfo 'scripts that replace it have been configured to start.'
- einfo 'The zfs-import and zfs-mount scripts have been added to the boot'
- einfo 'runlevel while the zfs-share script is in the default runlevel.'
-
- rm "${EROOT}etc/runlevels/boot/zfs"
- ln -snf "${EROOT}etc/init.d/zfs-import" \
- "${EROOT}etc/runlevels/boot/zfs-import"
- ln -snf "${EROOT}etc/init.d/zfs-mount" \
- "${EROOT}etc/runlevels/boot/zfs-mount"
- ln -snf "${EROOT}etc/init.d/zfs-share" \
- "${EROOT}etc/runlevels/default/zfs-share"
- else
- [ -e "${EROOT}etc/runlevels/boot/zfs-import" ] || \
- einfo "You should add zfs-import to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/boot/zfs-mount" ] || \
- einfo "You should add zfs-mount to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/default/zfs-share" ] || \
- einfo "You should add zfs-share to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/default/zed" ]
- then
- einfo 'The downstream OpenRC zed script has replaced by the upstream'
- einfo 'OpenRC zfs-zed script.'
- einfo
- einfo 'You had the zed script in your default runlevel. For your'
- einfo 'convenience, it has been automatically removed and the zfs-zed'
- einfo 'script that replaced it has been configured to start.'
-
- rm "${EROOT}etc/runlevels/boot/zed"
- ln -snf "${EROOT}etc/init.d/zfs-sed" \
- "${EROOT}etc/runlevels/default/zfs-zed"
- else
- [ -e "${EROOT}etc/runlevels/default/zfs-zed" ] || \
- einfo "You should add zfs-zed to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/shutdown/zfs-shutdown" ]
- then
- einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
- rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
- fi
-
- einfo "sys-kernel/spl-0.6.5.3-r1, sys-fs/zfs-kmod-0.6.5.3-r1 and "
- einfo "sys-fs/zfs-0.6.5.3-r1 have introduced a partial stable "
- einfo "/dev/zfs API developed by ClusterHQ. This means that situations "
- einfo "arising from the kernel modules and userland tools being "
- einfo "mismatched on future updates will not cause problems."
- einfo
- einfo "In specific, this should solve the failure to mount filesystems when "
- einfo "old modules are cached in an old initramfs provided that those "
- einfo "modules support this API"
- if use rootfs
- then
- einfo
- ewarn "The older modules will *NOT* work with the new userland code."
- ewarn "It is very important that you update your initramfs after this "
- ewarn "update."
- fi
-}
-
-pkg_postrm() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- remove_moduledb
- fi
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-PYTHON_COMPAT=( python{2_7,3_4,3_5} )
-
-AT_M4DIR="config"
-AUTOTOOLS_AUTORECONF="1"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-if [ ${PV} == "9999" ] ; then
- inherit git-r3 linux-mod
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
-else
- SRC_URI="https://github.com/zfsonlinux/${PN}/releases/download/${P}/${P}.tar.gz
- https://dev.gentoo.org/~ryao/dist/${P}-patches-p$((${PR#r} - 1)).tar.xz"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-inherit autotools-utils bash-completion-r1 flag-o-matic linux-info python-r1 systemd toolchain-funcs udev
-
-DESCRIPTION="Userland utilities for ZFS Linux kernel module"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="BSD-2 CDDL MIT"
-SLOT="0"
-IUSE="custom-cflags debug kernel-builtin +rootfs test-suite static-libs"
-RESTRICT="test"
-
-COMMON_DEPEND="
- sys-apps/util-linux[static-libs?]
- sys-libs/zlib[static-libs(+)?]
- virtual/awk
-"
-DEPEND="${COMMON_DEPEND}
- virtual/pkgconfig
-"
-
-RDEPEND="${COMMON_DEPEND}
- !=sys-apps/grep-2.13*
- !kernel-builtin? (
- =sys-fs/zfs-kmod-${PV}*
- !<sys-fs/zfs-kmod-0.6.5.3-r1
- )
- !sys-fs/zfs-fuse
- !prefix? ( virtual/udev )
- test-suite? (
- sys-apps/util-linux
- sys-devel/bc
- sys-block/parted
- sys-fs/lsscsi
- sys-fs/mdadm
- sys-process/procps
- virtual/modutils
- )
- rootfs? (
- app-arch/cpio
- app-misc/pax-utils
- !<sys-boot/grub-2.00-r2:2
- )
- !>=sys-fs/udev-init-scripts-28
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-pkg_setup() {
- if use kernel_linux && use test-suite; then
- linux-info_pkg_setup
- if ! linux_config_exists; then
- ewarn "Cannot check the linux kernel configuration."
- else
- # recheck that we don't have usblp to collide with libusb
- if use test-suite; then
- if linux_chkconfig_present BLK_DEV_LOOP; then
- eerror "The ZFS test suite requires loop device support enabled."
- eerror "Please enable it:"
- eerror " CONFIG_BLK_DEV_LOOP=y"
- eerror "in /usr/src/linux/.config or"
- eerror " Device Drivers --->"
- eerror " Block devices --->"
- eerror " [ ] Loopback device support"
- fi
- fi
- fi
- fi
-
-}
-
-src_prepare() {
- if [ ${PV} != "9999" ]
- then
- # Apply patch set
- EPATCH_SUFFIX="patch" \
- EPATCH_FORCE="yes" \
- epatch "${WORKDIR}/${P}-patches"
- fi
-
- # Update paths
- sed -e "s|/sbin/lsmod|/bin/lsmod|" \
- -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
- -e "s|/sbin/parted|/usr/sbin/parted|" \
- -i scripts/common.sh.in
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=user
- --with-dracutdir="/usr/$(get_libdir)/dracut"
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-udevdir="$(get_udevdir)"
- --with-blkid
- $(use_enable debug)
- )
- autotools-utils_src_configure
-
- # prepare systemd unit and helper script
- cat "${FILESDIR}/zfs.service.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs.service" || die
- cat "${FILESDIR}/zfs-init.sh.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs-init.sh" || die
-}
-
-src_install() {
- autotools-utils_src_install
- gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core
- use test-suite || rm -rf "${ED}usr/share/zfs"
-
- newbashcomp "${FILESDIR}/bash-completion-r1" zfs
- bashcomp_alias zfs zpool
-
- exeinto /usr/libexec
- doexe "${T}/zfs-init.sh"
- systemd_dounit "${T}/zfs.service"
-}
-
-pkg_postinst() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- einfo "Adding ${P} to the module database to ensure that the"
- einfo "kernel modules and userland utilities stay in sync."
- update_moduledb
- fi
-
- if [ -e "${EROOT}etc/runlevels/boot/zfs" ]
- then
- einfo 'The zfs boot script has been split into the zfs-import,'
- einfo 'zfs-mount and zfs-share scripts.'
- einfo
- einfo 'You had the zfs script in your boot runlevel. For your'
- einfo 'convenience, it has been automatically removed and the three'
- einfo 'scripts that replace it have been configured to start.'
- einfo 'The zfs-import and zfs-mount scripts have been added to the boot'
- einfo 'runlevel while the zfs-share script is in the default runlevel.'
-
- rm "${EROOT}etc/runlevels/boot/zfs"
- ln -snf "${EROOT}etc/init.d/zfs-import" \
- "${EROOT}etc/runlevels/boot/zfs-import"
- ln -snf "${EROOT}etc/init.d/zfs-mount" \
- "${EROOT}etc/runlevels/boot/zfs-mount"
- ln -snf "${EROOT}etc/init.d/zfs-share" \
- "${EROOT}etc/runlevels/default/zfs-share"
- else
- [ -e "${EROOT}etc/runlevels/boot/zfs-import" ] || \
- einfo "You should add zfs-import to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/boot/zfs-mount" ] || \
- einfo "You should add zfs-mount to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/default/zfs-share" ] || \
- einfo "You should add zfs-share to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/default/zed" ]
- then
- einfo 'The downstream OpenRC zed script has replaced by the upstream'
- einfo 'OpenRC zfs-zed script.'
- einfo
- einfo 'You had the zed script in your default runlevel. For your'
- einfo 'convenience, it has been automatically removed and the zfs-zed'
- einfo 'script that replaced it has been configured to start.'
-
- rm "${EROOT}etc/runlevels/boot/zed"
- ln -snf "${EROOT}etc/init.d/zfs-sed" \
- "${EROOT}etc/runlevels/default/zfs-zed"
- else
- [ -e "${EROOT}etc/runlevels/default/zfs-zed" ] || \
- einfo "You should add zfs-zed to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/shutdown/zfs-shutdown" ]
- then
- einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
- rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
- fi
-
- einfo "sys-kernel/spl-0.6.5.3-r1, sys-fs/zfs-kmod-0.6.5.3-r1 and "
- einfo "sys-fs/zfs-0.6.5.3-r1 have introduced a partial stable "
- einfo "/dev/zfs API developed by ClusterHQ. This means that situations "
- einfo "arising from the kernel modules and userland tools being "
- einfo "mismatched on future updates will not cause problems."
- einfo
- einfo "In specific, this should solve the failure to mount filesystems when "
- einfo "old modules are cached in an old initramfs provided that those "
- einfo "modules support this API"
- if use rootfs
- then
- einfo
- ewarn "The older modules will *NOT* work with the new userland code."
- ewarn "It is very important that you update your initramfs after this "
- ewarn "update."
- fi
-}
-
-pkg_postrm() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- remove_moduledb
- fi
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-PYTHON_COMPAT=( python{2_7,3_4,3_5} )
-
-if [ ${PV} == "9999" ] ; then
- inherit git-r3 linux-mod
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
-else
- SRC_URI="https://github.com/zfsonlinux/${PN}/releases/download/${P}/${P}.tar.gz"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-inherit autotools-utils bash-completion-r1 flag-o-matic linux-info python-r1 systemd toolchain-funcs udev
-
-DESCRIPTION="Userland utilities for ZFS Linux kernel module"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="BSD-2 CDDL MIT"
-SLOT="0"
-IUSE="custom-cflags debug kernel-builtin +rootfs test-suite static-libs"
-RESTRICT="test"
-
-COMMON_DEPEND="
- sys-apps/util-linux[static-libs?]
- sys-libs/zlib[static-libs(+)?]
- virtual/awk
-"
-DEPEND="${COMMON_DEPEND}
- virtual/pkgconfig
-"
-
-RDEPEND="${COMMON_DEPEND}
- !=sys-apps/grep-2.13*
- !kernel-builtin? ( =sys-fs/zfs-kmod-${PV}* )
- !sys-fs/zfs-fuse
- !prefix? ( virtual/udev )
- test-suite? (
- sys-apps/util-linux
- sys-devel/bc
- sys-block/parted
- sys-fs/lsscsi
- sys-fs/mdadm
- sys-process/procps
- virtual/modutils
- )
- rootfs? (
- app-arch/cpio
- app-misc/pax-utils
- !<sys-boot/grub-2.00-r2:2
- )
- !>=sys-fs/udev-init-scripts-28
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-pkg_setup() {
- if use kernel_linux && use test-suite; then
- linux-info_pkg_setup
- if ! linux_config_exists; then
- ewarn "Cannot check the linux kernel configuration."
- else
- # recheck that we don't have usblp to collide with libusb
- if use test-suite; then
- if linux_chkconfig_present BLK_DEV_LOOP; then
- eerror "The ZFS test suite requires loop device support enabled."
- eerror "Please enable it:"
- eerror " CONFIG_BLK_DEV_LOOP=y"
- eerror "in /usr/src/linux/.config or"
- eerror " Device Drivers --->"
- eerror " Block devices --->"
- eerror " [ ] Loopback device support"
- fi
- fi
- fi
- fi
-
-}
-
-src_prepare() {
- # Update paths
- sed -e "s|/sbin/lsmod|/bin/lsmod|" \
- -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
- -e "s|/sbin/parted|/usr/sbin/parted|" \
- -i scripts/common.sh.in
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=user
- --with-dracutdir="/usr/$(get_libdir)/dracut"
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-udevdir="$(get_udevdir)"
- --with-blkid
- $(use_enable debug)
- )
- autotools-utils_src_configure
-
- # prepare systemd unit and helper script
- cat "${FILESDIR}/zfs.service.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs.service" || die
- cat "${FILESDIR}/zfs-init.sh.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs-init.sh" || die
-}
-
-src_install() {
- autotools-utils_src_install
- gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core
- use test-suite || rm -rf "${ED}usr/share/zfs"
-
- newbashcomp "${FILESDIR}/bash-completion-r1" zfs
- bashcomp_alias zfs zpool
-
- exeinto /usr/libexec
- doexe "${T}/zfs-init.sh"
- systemd_dounit "${T}/zfs.service"
-}
-
-pkg_postinst() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- einfo "Adding ${P} to the module database to ensure that the"
- einfo "kernel modules and userland utilities stay in sync."
- update_moduledb
- fi
-
- if [ -e "${EROOT}etc/runlevels/boot/zfs" ]
- then
- einfo 'The zfs boot script has been split into the zfs-import,'
- einfo 'zfs-mount and zfs-share scripts.'
- einfo
- einfo 'You had the zfs script in your boot runlevel. For your'
- einfo 'convenience, it has been automatically removed and the three'
- einfo 'scripts that replace it have been configured to start.'
- einfo 'The zfs-import and zfs-mount scripts have been added to the boot'
- einfo 'runlevel while the zfs-share script is in the default runlevel.'
-
- rm "${EROOT}etc/runlevels/boot/zfs"
- ln -snf "${EROOT}etc/init.d/zfs-import" \
- "${EROOT}etc/runlevels/boot/zfs-import"
- ln -snf "${EROOT}etc/init.d/zfs-mount" \
- "${EROOT}etc/runlevels/boot/zfs-mount"
- ln -snf "${EROOT}etc/init.d/zfs-share" \
- "${EROOT}etc/runlevels/default/zfs-share"
- else
- [ -e "${EROOT}etc/runlevels/boot/zfs-import" ] || \
- einfo "You should add zfs-import to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/boot/zfs-mount" ] || \
- einfo "You should add zfs-mount to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/default/zfs-share" ] || \
- einfo "You should add zfs-share to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/default/zed" ]
- then
- einfo 'The downstream OpenRC zed script has replaced by the upstream'
- einfo 'OpenRC zfs-zed script.'
- einfo
- einfo 'You had the zed script in your default runlevel. For your'
- einfo 'convenience, it has been automatically removed and the zfs-zed'
- einfo 'script that replaced it has been configured to start.'
-
- rm "${EROOT}etc/runlevels/boot/zed"
- ln -snf "${EROOT}etc/init.d/zfs-sed" \
- "${EROOT}etc/runlevels/default/zfs-zed"
- else
- [ -e "${EROOT}etc/runlevels/default/zfs-zed" ] || \
- einfo "You should add zfs-zed to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/shutdown/zfs-shutdown" ]
- then
- einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
- rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
- fi
-
-}
-
-pkg_postrm() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- remove_moduledb
- fi
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-PYTHON_COMPAT=( python{2_7,3_4,3_5} )
-
-AT_M4DIR="config"
-AUTOTOOLS_AUTORECONF="1"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-if [ ${PV} == "9999" ] ; then
- inherit git-r3 linux-mod
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
-else
- SRC_URI="https://github.com/zfsonlinux/${PN}/releases/download/${P}/${P}.tar.gz
- https://dev.gentoo.org/~ryao/dist/${P}-patches-p${PR#r}.tar.xz"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-inherit autotools-utils bash-completion-r1 flag-o-matic linux-info python-r1 systemd toolchain-funcs udev
-
-DESCRIPTION="Userland utilities for ZFS Linux kernel module"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="BSD-2 CDDL MIT"
-SLOT="0"
-IUSE="custom-cflags debug kernel-builtin +rootfs test-suite static-libs"
-RESTRICT="test"
-
-COMMON_DEPEND="
- sys-apps/util-linux[static-libs?]
- sys-libs/zlib[static-libs(+)?]
- virtual/awk
-"
-DEPEND="${COMMON_DEPEND}
- virtual/pkgconfig
-"
-
-RDEPEND="${COMMON_DEPEND}
- !=sys-apps/grep-2.13*
- !kernel-builtin? (
- =sys-fs/zfs-kmod-${PV}*
- !<sys-fs/zfs-kmod-0.6.5.3-r1
- )
- !sys-fs/zfs-fuse
- !prefix? ( virtual/udev )
- test-suite? (
- sys-apps/util-linux
- sys-devel/bc
- sys-block/parted
- sys-fs/lsscsi
- sys-fs/mdadm
- sys-process/procps
- virtual/modutils
- )
- rootfs? (
- app-arch/cpio
- app-misc/pax-utils
- !<sys-boot/grub-2.00-r2:2
- )
- !>=sys-fs/udev-init-scripts-28
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-pkg_setup() {
- if use kernel_linux && use test-suite; then
- linux-info_pkg_setup
- if ! linux_config_exists; then
- ewarn "Cannot check the linux kernel configuration."
- else
- # recheck that we don't have usblp to collide with libusb
- if use test-suite; then
- if linux_chkconfig_present BLK_DEV_LOOP; then
- eerror "The ZFS test suite requires loop device support enabled."
- eerror "Please enable it:"
- eerror " CONFIG_BLK_DEV_LOOP=y"
- eerror "in /usr/src/linux/.config or"
- eerror " Device Drivers --->"
- eerror " Block devices --->"
- eerror " [ ] Loopback device support"
- fi
- fi
- fi
- fi
-
-}
-
-src_prepare() {
- if [ ${PV} != "9999" ]
- then
- # Apply patch set
- EPATCH_SUFFIX="patch" \
- EPATCH_FORCE="yes" \
- epatch "${WORKDIR}/${P}-patches"
- fi
-
- # Update paths
- sed -e "s|/sbin/lsmod|/bin/lsmod|" \
- -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
- -e "s|/sbin/parted|/usr/sbin/parted|" \
- -i scripts/common.sh.in
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=user
- --with-dracutdir="/usr/$(get_libdir)/dracut"
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-udevdir="$(get_udevdir)"
- --with-blkid
- $(use_enable debug)
- )
- autotools-utils_src_configure
-
- # prepare systemd unit and helper script
- cat "${FILESDIR}/zfs.service.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs.service" || die
- cat "${FILESDIR}/zfs-init.sh.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs-init.sh" || die
-}
-
-src_install() {
- autotools-utils_src_install
- gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core
- use test-suite || rm -rf "${ED}usr/share/zfs"
-
- newbashcomp "${FILESDIR}/bash-completion-r1" zfs
- bashcomp_alias zfs zpool
-
- exeinto /usr/libexec
- doexe "${T}/zfs-init.sh"
- systemd_dounit "${T}/zfs.service"
-}
-
-pkg_postinst() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- einfo "Adding ${P} to the module database to ensure that the"
- einfo "kernel modules and userland utilities stay in sync."
- update_moduledb
- fi
-
- if [ -e "${EROOT}etc/runlevels/boot/zfs" ]
- then
- einfo 'The zfs boot script has been split into the zfs-import,'
- einfo 'zfs-mount and zfs-share scripts.'
- einfo
- einfo 'You had the zfs script in your boot runlevel. For your'
- einfo 'convenience, it has been automatically removed and the three'
- einfo 'scripts that replace it have been configured to start.'
- einfo 'The zfs-import and zfs-mount scripts have been added to the boot'
- einfo 'runlevel while the zfs-share script is in the default runlevel.'
-
- rm "${EROOT}etc/runlevels/boot/zfs"
- ln -snf "${EROOT}etc/init.d/zfs-import" \
- "${EROOT}etc/runlevels/boot/zfs-import"
- ln -snf "${EROOT}etc/init.d/zfs-mount" \
- "${EROOT}etc/runlevels/boot/zfs-mount"
- ln -snf "${EROOT}etc/init.d/zfs-share" \
- "${EROOT}etc/runlevels/default/zfs-share"
- else
- [ -e "${EROOT}etc/runlevels/boot/zfs-import" ] || \
- einfo "You should add zfs-import to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/boot/zfs-mount" ] || \
- einfo "You should add zfs-mount to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/default/zfs-share" ] || \
- einfo "You should add zfs-share to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/default/zed" ]
- then
- einfo 'The downstream OpenRC zed script has replaced by the upstream'
- einfo 'OpenRC zfs-zed script.'
- einfo
- einfo 'You had the zed script in your default runlevel. For your'
- einfo 'convenience, it has been automatically removed and the zfs-zed'
- einfo 'script that replaced it has been configured to start.'
-
- rm "${EROOT}etc/runlevels/boot/zed"
- ln -snf "${EROOT}etc/init.d/zfs-sed" \
- "${EROOT}etc/runlevels/default/zfs-zed"
- else
- [ -e "${EROOT}etc/runlevels/default/zfs-zed" ] || \
- einfo "You should add zfs-zed to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/shutdown/zfs-shutdown" ]
- then
- einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
- rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
- fi
-
- einfo "sys-kernel/spl-0.6.5.3-r1, sys-fs/zfs-kmod-0.6.5.3-r1 and "
- einfo "sys-fs/zfs-0.6.5.3-r1 have introduced a partial stable "
- einfo "/dev/zfs API developed by ClusterHQ. This means that situations "
- einfo "arising from the kernel modules and userland tools being "
- einfo "mismatched on future updates will not cause problems."
- einfo
- einfo "In specific, this should solve the failure to mount filesystems when "
- einfo "old modules are cached in an old initramfs provided that those "
- einfo "modules support this API"
- if use rootfs
- then
- einfo
- ewarn "The older modules will *NOT* work with the new userland code."
- ewarn "It is very important that you update your initramfs after this "
- ewarn "update."
- fi
-}
-
-pkg_postrm() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- remove_moduledb
- fi
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-PYTHON_COMPAT=( python{2_7,3_4,3_5} )
-
-if [ ${PV} == "9999" ] ; then
- inherit git-r3 linux-mod
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
-else
- SRC_URI="https://github.com/zfsonlinux/${PN}/releases/download/${P}/${P}.tar.gz"
- KEYWORDS=" ~amd64"
-fi
-
-inherit autotools-utils bash-completion-r1 flag-o-matic linux-info python-r1 systemd toolchain-funcs udev
-
-DESCRIPTION="Userland utilities for ZFS Linux kernel module"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="BSD-2 CDDL MIT"
-SLOT="0"
-IUSE="custom-cflags debug kernel-builtin +rootfs test-suite static-libs"
-RESTRICT="test"
-
-COMMON_DEPEND="
- sys-apps/util-linux[static-libs?]
- sys-libs/zlib[static-libs(+)?]
- virtual/awk
-"
-DEPEND="${COMMON_DEPEND}
- virtual/pkgconfig
-"
-
-RDEPEND="${COMMON_DEPEND}
- !=sys-apps/grep-2.13*
- !kernel-builtin? ( =sys-fs/zfs-kmod-${PV}* )
- !sys-fs/zfs-fuse
- !prefix? ( virtual/udev )
- test-suite? (
- sys-apps/util-linux
- sys-devel/bc
- sys-block/parted
- sys-fs/lsscsi
- sys-fs/mdadm
- sys-process/procps
- virtual/modutils
- )
- rootfs? (
- app-arch/cpio
- app-misc/pax-utils
- !<sys-boot/grub-2.00-r2:2
- )
- !>=sys-fs/udev-init-scripts-28
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-pkg_setup() {
- if use kernel_linux && use test-suite; then
- linux-info_pkg_setup
- if ! linux_config_exists; then
- ewarn "Cannot check the linux kernel configuration."
- else
- # recheck that we don't have usblp to collide with libusb
- if use test-suite; then
- if linux_chkconfig_present BLK_DEV_LOOP; then
- eerror "The ZFS test suite requires loop device support enabled."
- eerror "Please enable it:"
- eerror " CONFIG_BLK_DEV_LOOP=y"
- eerror "in /usr/src/linux/.config or"
- eerror " Device Drivers --->"
- eerror " Block devices --->"
- eerror " [ ] Loopback device support"
- fi
- fi
- fi
- fi
-
-}
-
-src_prepare() {
- # Update paths
- sed -e "s|/sbin/lsmod|/bin/lsmod|" \
- -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
- -e "s|/sbin/parted|/usr/sbin/parted|" \
- -i scripts/common.sh.in
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=user
- --with-dracutdir="/usr/$(get_libdir)/dracut"
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-udevdir="$(get_udevdir)"
- --with-blkid
- $(use_enable debug)
- )
- autotools-utils_src_configure
-
- # prepare systemd unit and helper script
- cat "${FILESDIR}/zfs.service.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs.service" || die
- cat "${FILESDIR}/zfs-init.sh.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs-init.sh" || die
-}
-
-src_install() {
- autotools-utils_src_install
- gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core
- use test-suite || rm -rf "${ED}usr/share/zfs"
-
- newbashcomp "${FILESDIR}/bash-completion-r1" zfs
- bashcomp_alias zfs zpool
-
- exeinto /usr/libexec
- doexe "${T}/zfs-init.sh"
- systemd_dounit "${T}/zfs.service"
-}
-
-pkg_postinst() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- einfo "Adding ${P} to the module database to ensure that the"
- einfo "kernel modules and userland utilities stay in sync."
- update_moduledb
- fi
-
- if [ -e "${EROOT}etc/runlevels/boot/zfs" ]
- then
- einfo 'The zfs boot script has been split into the zfs-import,'
- einfo 'zfs-mount and zfs-share scripts.'
- einfo
- einfo 'You had the zfs script in your boot runlevel. For your'
- einfo 'convenience, it has been automatically removed and the three'
- einfo 'scripts that replace it have been configured to start.'
- einfo 'The zfs-import and zfs-mount scripts have been added to the boot'
- einfo 'runlevel while the zfs-share script is in the default runlevel.'
-
- rm "${EROOT}etc/runlevels/boot/zfs"
- ln -snf "${EROOT}etc/init.d/zfs-import" \
- "${EROOT}etc/runlevels/boot/zfs-import"
- ln -snf "${EROOT}etc/init.d/zfs-mount" \
- "${EROOT}etc/runlevels/boot/zfs-mount"
- ln -snf "${EROOT}etc/init.d/zfs-share" \
- "${EROOT}etc/runlevels/default/zfs-share"
- else
- [ -e "${EROOT}etc/runlevels/boot/zfs-import" ] || \
- einfo "You should add zfs-import to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/boot/zfs-mount" ] || \
- einfo "You should add zfs-mount to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/default/zfs-share" ] || \
- einfo "You should add zfs-share to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/default/zed" ]
- then
- einfo 'The downstream OpenRC zed script has replaced by the upstream'
- einfo 'OpenRC zfs-zed script.'
- einfo
- einfo 'You had the zed script in your default runlevel. For your'
- einfo 'convenience, it has been automatically removed and the zfs-zed'
- einfo 'script that replaced it has been configured to start.'
-
- rm "${EROOT}etc/runlevels/boot/zed"
- ln -snf "${EROOT}etc/init.d/zfs-sed" \
- "${EROOT}etc/runlevels/default/zfs-zed"
- else
- [ -e "${EROOT}etc/runlevels/default/zfs-zed" ] || \
- einfo "You should add zfs-zed to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/shutdown/zfs-shutdown" ]
- then
- einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
- rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
- fi
-
-}
-
-pkg_postrm() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- remove_moduledb
- fi
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-PYTHON_COMPAT=( python{2_7,3_4,3_5} )
-
-if [ ${PV} == "9999" ] ; then
- inherit git-r3 linux-mod
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
-else
- SRC_URI="https://github.com/zfsonlinux/${PN}/releases/download/${P}/${P}.tar.gz"
- KEYWORDS=" ~amd64"
-fi
-
-inherit autotools-utils bash-completion-r1 flag-o-matic linux-info python-r1 systemd toolchain-funcs udev
-
-DESCRIPTION="Userland utilities for ZFS Linux kernel module"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="BSD-2 CDDL MIT"
-SLOT="0"
-IUSE="custom-cflags debug kernel-builtin +rootfs test-suite static-libs"
-RESTRICT="test"
-
-COMMON_DEPEND="
- sys-apps/util-linux[static-libs?]
- sys-libs/zlib[static-libs(+)?]
- virtual/awk
-"
-DEPEND="${COMMON_DEPEND}
- virtual/pkgconfig
-"
-
-RDEPEND="${COMMON_DEPEND}
- !=sys-apps/grep-2.13*
- !kernel-builtin? ( =sys-fs/zfs-kmod-${PV}* )
- !sys-fs/zfs-fuse
- !prefix? ( virtual/udev )
- test-suite? (
- sys-apps/util-linux
- sys-devel/bc
- sys-block/parted
- sys-fs/lsscsi
- sys-fs/mdadm
- sys-process/procps
- virtual/modutils
- )
- rootfs? (
- app-arch/cpio
- app-misc/pax-utils
- !<sys-boot/grub-2.00-r2:2
- )
- !>=sys-fs/udev-init-scripts-28
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-pkg_setup() {
- if use kernel_linux && use test-suite; then
- linux-info_pkg_setup
- if ! linux_config_exists; then
- ewarn "Cannot check the linux kernel configuration."
- else
- # recheck that we don't have usblp to collide with libusb
- if use test-suite; then
- if linux_chkconfig_present BLK_DEV_LOOP; then
- eerror "The ZFS test suite requires loop device support enabled."
- eerror "Please enable it:"
- eerror " CONFIG_BLK_DEV_LOOP=y"
- eerror "in /usr/src/linux/.config or"
- eerror " Device Drivers --->"
- eerror " Block devices --->"
- eerror " [ ] Loopback device support"
- fi
- fi
- fi
- fi
-
-}
-
-src_prepare() {
- # Update paths
- sed -e "s|/sbin/lsmod|/bin/lsmod|" \
- -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
- -e "s|/sbin/parted|/usr/sbin/parted|" \
- -i scripts/common.sh.in
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=user
- --with-dracutdir="/usr/$(get_libdir)/dracut"
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-udevdir="$(get_udevdir)"
- --with-blkid
- $(use_enable debug)
- )
- autotools-utils_src_configure
-
- # prepare systemd unit and helper script
- cat "${FILESDIR}/zfs.service.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs.service" || die
- cat "${FILESDIR}/zfs-init.sh.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs-init.sh" || die
-}
-
-src_install() {
- autotools-utils_src_install
- gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core
- use test-suite || rm -rf "${ED}usr/share/zfs"
-
- newbashcomp "${FILESDIR}/bash-completion-r1" zfs
- bashcomp_alias zfs zpool
-
- exeinto /usr/libexec
- doexe "${T}/zfs-init.sh"
- systemd_dounit "${T}/zfs.service"
-}
-
-pkg_postinst() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- einfo "Adding ${P} to the module database to ensure that the"
- einfo "kernel modules and userland utilities stay in sync."
- update_moduledb
- fi
-
- if [ -e "${EROOT}etc/runlevels/boot/zfs" ]
- then
- einfo 'The zfs boot script has been split into the zfs-import,'
- einfo 'zfs-mount and zfs-share scripts.'
- einfo
- einfo 'You had the zfs script in your boot runlevel. For your'
- einfo 'convenience, it has been automatically removed and the three'
- einfo 'scripts that replace it have been configured to start.'
- einfo 'The zfs-import and zfs-mount scripts have been added to the boot'
- einfo 'runlevel while the zfs-share script is in the default runlevel.'
-
- rm "${EROOT}etc/runlevels/boot/zfs"
- ln -snf "${EROOT}etc/init.d/zfs-import" \
- "${EROOT}etc/runlevels/boot/zfs-import"
- ln -snf "${EROOT}etc/init.d/zfs-mount" \
- "${EROOT}etc/runlevels/boot/zfs-mount"
- ln -snf "${EROOT}etc/init.d/zfs-share" \
- "${EROOT}etc/runlevels/default/zfs-share"
- else
- [ -e "${EROOT}etc/runlevels/boot/zfs-import" ] || \
- einfo "You should add zfs-import to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/boot/zfs-mount" ] || \
- einfo "You should add zfs-mount to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/default/zfs-share" ] || \
- einfo "You should add zfs-share to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/default/zed" ]
- then
- einfo 'The downstream OpenRC zed script has replaced by the upstream'
- einfo 'OpenRC zfs-zed script.'
- einfo
- einfo 'You had the zed script in your default runlevel. For your'
- einfo 'convenience, it has been automatically removed and the zfs-zed'
- einfo 'script that replaced it has been configured to start.'
-
- rm "${EROOT}etc/runlevels/boot/zed"
- ln -snf "${EROOT}etc/init.d/zfs-sed" \
- "${EROOT}etc/runlevels/default/zfs-zed"
- else
- [ -e "${EROOT}etc/runlevels/default/zfs-zed" ] || \
- einfo "You should add zfs-zed to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/shutdown/zfs-shutdown" ]
- then
- einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
- rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
- fi
-
-}
-
-pkg_postrm() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- remove_moduledb
- fi
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-PYTHON_COMPAT=( python{2_7,3_4,3_5} )
-
-if [ ${PV} == "9999" ] ; then
- inherit git-r3 linux-mod
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
-else
- SRC_URI="https://github.com/zfsonlinux/${PN}/releases/download/${P}/${P}.tar.gz"
- KEYWORDS=" ~amd64"
-fi
-
-inherit autotools-utils bash-completion-r1 flag-o-matic linux-info python-r1 systemd toolchain-funcs udev
-
-DESCRIPTION="Userland utilities for ZFS Linux kernel module"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="BSD-2 CDDL MIT"
-SLOT="0"
-IUSE="custom-cflags debug kernel-builtin +rootfs test-suite static-libs"
-RESTRICT="test"
-
-COMMON_DEPEND="
- sys-apps/util-linux[static-libs?]
- sys-libs/zlib[static-libs(+)?]
- virtual/awk
-"
-DEPEND="${COMMON_DEPEND}
- virtual/pkgconfig
-"
-
-RDEPEND="${COMMON_DEPEND}
- !=sys-apps/grep-2.13*
- !kernel-builtin? ( =sys-fs/zfs-kmod-${PV}* )
- !sys-fs/zfs-fuse
- !prefix? ( virtual/udev )
- test-suite? (
- sys-apps/util-linux
- sys-devel/bc
- sys-block/parted
- sys-fs/lsscsi
- sys-fs/mdadm
- sys-process/procps
- virtual/modutils
- )
- rootfs? (
- app-arch/cpio
- app-misc/pax-utils
- !<sys-boot/grub-2.00-r2:2
- )
- !>=sys-fs/udev-init-scripts-28
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-pkg_setup() {
- if use kernel_linux && use test-suite; then
- linux-info_pkg_setup
- if ! linux_config_exists; then
- ewarn "Cannot check the linux kernel configuration."
- else
- # recheck that we don't have usblp to collide with libusb
- if use test-suite; then
- if linux_chkconfig_present BLK_DEV_LOOP; then
- eerror "The ZFS test suite requires loop device support enabled."
- eerror "Please enable it:"
- eerror " CONFIG_BLK_DEV_LOOP=y"
- eerror "in /usr/src/linux/.config or"
- eerror " Device Drivers --->"
- eerror " Block devices --->"
- eerror " [ ] Loopback device support"
- fi
- fi
- fi
- fi
-
-}
-
-src_prepare() {
- # Update paths
- sed -e "s|/sbin/lsmod|/bin/lsmod|" \
- -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
- -e "s|/sbin/parted|/usr/sbin/parted|" \
- -i scripts/common.sh.in
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=user
- --with-dracutdir="/usr/$(get_libdir)/dracut"
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-udevdir="$(get_udevdir)"
- --with-blkid
- $(use_enable debug)
- )
- autotools-utils_src_configure
-
- # prepare systemd unit and helper script
- cat "${FILESDIR}/zfs.service.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs.service" || die
- cat "${FILESDIR}/zfs-init.sh.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs-init.sh" || die
-}
-
-src_install() {
- autotools-utils_src_install
- gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core
- use test-suite || rm -rf "${ED}usr/share/zfs"
-
- newbashcomp "${FILESDIR}/bash-completion-r1" zfs
- bashcomp_alias zfs zpool
-
- exeinto /usr/libexec
- doexe "${T}/zfs-init.sh"
- systemd_dounit "${T}/zfs.service"
-}
-
-pkg_postinst() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- einfo "Adding ${P} to the module database to ensure that the"
- einfo "kernel modules and userland utilities stay in sync."
- update_moduledb
- fi
-
- if [ -e "${EROOT}etc/runlevels/boot/zfs" ]
- then
- einfo 'The zfs boot script has been split into the zfs-import,'
- einfo 'zfs-mount and zfs-share scripts.'
- einfo
- einfo 'You had the zfs script in your boot runlevel. For your'
- einfo 'convenience, it has been automatically removed and the three'
- einfo 'scripts that replace it have been configured to start.'
- einfo 'The zfs-import and zfs-mount scripts have been added to the boot'
- einfo 'runlevel while the zfs-share script is in the default runlevel.'
-
- rm "${EROOT}etc/runlevels/boot/zfs"
- ln -snf "${EROOT}etc/init.d/zfs-import" \
- "${EROOT}etc/runlevels/boot/zfs-import"
- ln -snf "${EROOT}etc/init.d/zfs-mount" \
- "${EROOT}etc/runlevels/boot/zfs-mount"
- ln -snf "${EROOT}etc/init.d/zfs-share" \
- "${EROOT}etc/runlevels/default/zfs-share"
- else
- [ -e "${EROOT}etc/runlevels/boot/zfs-import" ] || \
- einfo "You should add zfs-import to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/boot/zfs-mount" ] || \
- einfo "You should add zfs-mount to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/default/zfs-share" ] || \
- einfo "You should add zfs-share to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/default/zed" ]
- then
- einfo 'The downstream OpenRC zed script has replaced by the upstream'
- einfo 'OpenRC zfs-zed script.'
- einfo
- einfo 'You had the zed script in your default runlevel. For your'
- einfo 'convenience, it has been automatically removed and the zfs-zed'
- einfo 'script that replaced it has been configured to start.'
-
- rm "${EROOT}etc/runlevels/boot/zed"
- ln -snf "${EROOT}etc/init.d/zfs-sed" \
- "${EROOT}etc/runlevels/default/zfs-zed"
- else
- [ -e "${EROOT}etc/runlevels/default/zfs-zed" ] || \
- einfo "You should add zfs-zed to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/shutdown/zfs-shutdown" ]
- then
- einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
- rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
- fi
-
-}
-
-pkg_postrm() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- remove_moduledb
- fi
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-PYTHON_COMPAT=( python{2_7,3_4,3_5} )
-
-if [ ${PV} == "9999" ] ; then
- inherit git-r3 linux-mod
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
-else
- SRC_URI="https://github.com/zfsonlinux/${PN}/releases/download/${P}/${P}.tar.gz"
- KEYWORDS=" ~amd64"
-fi
-
-inherit autotools-utils bash-completion-r1 flag-o-matic linux-info python-r1 systemd toolchain-funcs udev
-
-DESCRIPTION="Userland utilities for ZFS Linux kernel module"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="BSD-2 CDDL MIT"
-SLOT="0"
-IUSE="custom-cflags debug kernel-builtin +rootfs test-suite static-libs"
-RESTRICT="test"
-
-COMMON_DEPEND="
- sys-apps/util-linux[static-libs?]
- sys-libs/zlib[static-libs(+)?]
- virtual/awk
-"
-DEPEND="${COMMON_DEPEND}
- virtual/pkgconfig
-"
-
-RDEPEND="${COMMON_DEPEND}
- !=sys-apps/grep-2.13*
- !kernel-builtin? ( =sys-fs/zfs-kmod-${PV}* )
- !sys-fs/zfs-fuse
- !prefix? ( virtual/udev )
- test-suite? (
- sys-apps/util-linux
- sys-devel/bc
- sys-block/parted
- sys-fs/lsscsi
- sys-fs/mdadm
- sys-process/procps
- virtual/modutils
- )
- rootfs? (
- app-arch/cpio
- app-misc/pax-utils
- !<sys-boot/grub-2.00-r2:2
- )
- sys-fs/udev-init-scripts
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-pkg_setup() {
- if use kernel_linux && use test-suite; then
- linux-info_pkg_setup
- if ! linux_config_exists; then
- ewarn "Cannot check the linux kernel configuration."
- else
- # recheck that we don't have usblp to collide with libusb
- if use test-suite; then
- if linux_chkconfig_present BLK_DEV_LOOP; then
- eerror "The ZFS test suite requires loop device support enabled."
- eerror "Please enable it:"
- eerror " CONFIG_BLK_DEV_LOOP=y"
- eerror "in /usr/src/linux/.config or"
- eerror " Device Drivers --->"
- eerror " Block devices --->"
- eerror " [ ] Loopback device support"
- fi
- fi
- fi
- fi
-
-}
-
-src_prepare() {
- # Update paths
- sed -e "s|/sbin/lsmod|/bin/lsmod|" \
- -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
- -e "s|/sbin/parted|/usr/sbin/parted|" \
- -i scripts/common.sh.in
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=user
- --with-dracutdir="/usr/$(get_libdir)/dracut"
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-udevdir="$(get_udevdir)"
- --with-blkid
- $(use_enable debug)
- )
- autotools-utils_src_configure
-
- # prepare systemd unit and helper script
- cat "${FILESDIR}/zfs.service.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs.service" || die
- cat "${FILESDIR}/zfs-init.sh.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs-init.sh" || die
-}
-
-src_install() {
- autotools-utils_src_install
- gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core
- use test-suite || rm -rf "${ED}usr/share/zfs"
-
- newbashcomp "${FILESDIR}/bash-completion-r1" zfs
- bashcomp_alias zfs zpool
-
- exeinto /usr/libexec
- doexe "${T}/zfs-init.sh"
- systemd_dounit "${T}/zfs.service"
-}
-
-pkg_postinst() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- einfo "Adding ${P} to the module database to ensure that the"
- einfo "kernel modules and userland utilities stay in sync."
- update_moduledb
- fi
-
- if [ -e "${EROOT}etc/runlevels/boot/zfs" ]
- then
- einfo 'The zfs boot script has been split into the zfs-import,'
- einfo 'zfs-mount and zfs-share scripts.'
- einfo
- einfo 'You had the zfs script in your boot runlevel. For your'
- einfo 'convenience, it has been automatically removed and the three'
- einfo 'scripts that replace it have been configured to start.'
- einfo 'The zfs-import and zfs-mount scripts have been added to the boot'
- einfo 'runlevel while the zfs-share script is in the default runlevel.'
-
- rm "${EROOT}etc/runlevels/boot/zfs"
- ln -snf "${EROOT}etc/init.d/zfs-import" \
- "${EROOT}etc/runlevels/boot/zfs-import"
- ln -snf "${EROOT}etc/init.d/zfs-mount" \
- "${EROOT}etc/runlevels/boot/zfs-mount"
- ln -snf "${EROOT}etc/init.d/zfs-share" \
- "${EROOT}etc/runlevels/default/zfs-share"
- else
- [ -e "${EROOT}etc/runlevels/boot/zfs-import" ] || \
- einfo "You should add zfs-import to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/boot/zfs-mount" ] || \
- einfo "You should add zfs-mount to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/default/zfs-share" ] || \
- einfo "You should add zfs-share to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/default/zed" ]
- then
- einfo 'The downstream OpenRC zed script has replaced by the upstream'
- einfo 'OpenRC zfs-zed script.'
- einfo
- einfo 'You had the zed script in your default runlevel. For your'
- einfo 'convenience, it has been automatically removed and the zfs-zed'
- einfo 'script that replaced it has been configured to start.'
-
- rm "${EROOT}etc/runlevels/boot/zed"
- ln -snf "${EROOT}etc/init.d/zfs-sed" \
- "${EROOT}etc/runlevels/default/zfs-zed"
- else
- [ -e "${EROOT}etc/runlevels/default/zfs-zed" ] || \
- einfo "You should add zfs-zed to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/shutdown/zfs-shutdown" ]
- then
- einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
- rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
- fi
-
-}
-
-pkg_postrm() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- remove_moduledb
- fi
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-PYTHON_COMPAT=( python{2_7,3_4,3_5} )
-
-if [ ${PV} == "9999" ] ; then
- inherit git-r3 linux-mod
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
-else
- SRC_URI="https://github.com/zfsonlinux/${PN}/releases/download/${P}/${P}.tar.gz"
- KEYWORDS=" ~amd64"
-fi
-
-inherit autotools-utils bash-completion-r1 flag-o-matic linux-info python-r1 systemd toolchain-funcs udev
-
-DESCRIPTION="Userland utilities for ZFS Linux kernel module"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="BSD-2 CDDL MIT"
-SLOT="0"
-IUSE="custom-cflags debug kernel-builtin +rootfs test-suite static-libs"
-RESTRICT="test"
-
-COMMON_DEPEND="
- sys-apps/util-linux[static-libs?]
- sys-libs/zlib[static-libs(+)?]
- virtual/awk
-"
-DEPEND="${COMMON_DEPEND}
- virtual/pkgconfig
-"
-
-RDEPEND="${COMMON_DEPEND}
- !=sys-apps/grep-2.13*
- !kernel-builtin? ( =sys-fs/zfs-kmod-${PV}* )
- !sys-fs/zfs-fuse
- !prefix? ( virtual/udev )
- test-suite? (
- sys-apps/util-linux
- sys-devel/bc
- sys-block/parted
- sys-fs/lsscsi
- sys-fs/mdadm
- sys-process/procps
- virtual/modutils
- )
- rootfs? (
- app-arch/cpio
- app-misc/pax-utils
- !<sys-boot/grub-2.00-r2:2
- )
- !>=sys-fs/udev-init-scripts-28
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-pkg_setup() {
- if use kernel_linux && use test-suite; then
- linux-info_pkg_setup
- if ! linux_config_exists; then
- ewarn "Cannot check the linux kernel configuration."
- else
- # recheck that we don't have usblp to collide with libusb
- if use test-suite; then
- if linux_chkconfig_present BLK_DEV_LOOP; then
- eerror "The ZFS test suite requires loop device support enabled."
- eerror "Please enable it:"
- eerror " CONFIG_BLK_DEV_LOOP=y"
- eerror "in /usr/src/linux/.config or"
- eerror " Device Drivers --->"
- eerror " Block devices --->"
- eerror " [ ] Loopback device support"
- fi
- fi
- fi
- fi
-
-}
-
-src_prepare() {
- # Update paths
- sed -e "s|/sbin/lsmod|/bin/lsmod|" \
- -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
- -e "s|/sbin/parted|/usr/sbin/parted|" \
- -i scripts/common.sh.in
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=user
- --with-dracutdir="/usr/$(get_libdir)/dracut"
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-udevdir="$(get_udevdir)"
- --with-blkid
- $(use_enable debug)
- )
- autotools-utils_src_configure
-
- # prepare systemd unit and helper script
- cat "${FILESDIR}/zfs.service.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs.service" || die
- cat "${FILESDIR}/zfs-init.sh.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs-init.sh" || die
-}
-
-src_install() {
- autotools-utils_src_install
- gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core
- use test-suite || rm -rf "${ED}usr/share/zfs"
-
- newbashcomp "${FILESDIR}/bash-completion-r1" zfs
- bashcomp_alias zfs zpool
-
- exeinto /usr/libexec
- doexe "${T}/zfs-init.sh"
- systemd_dounit "${T}/zfs.service"
-}
-
-pkg_postinst() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- einfo "Adding ${P} to the module database to ensure that the"
- einfo "kernel modules and userland utilities stay in sync."
- update_moduledb
- fi
-
- if [ -e "${EROOT}etc/runlevels/boot/zfs" ]
- then
- einfo 'The zfs boot script has been split into the zfs-import,'
- einfo 'zfs-mount and zfs-share scripts.'
- einfo
- einfo 'You had the zfs script in your boot runlevel. For your'
- einfo 'convenience, it has been automatically removed and the three'
- einfo 'scripts that replace it have been configured to start.'
- einfo 'The zfs-import and zfs-mount scripts have been added to the boot'
- einfo 'runlevel while the zfs-share script is in the default runlevel.'
-
- rm "${EROOT}etc/runlevels/boot/zfs"
- ln -snf "${EROOT}etc/init.d/zfs-import" \
- "${EROOT}etc/runlevels/boot/zfs-import"
- ln -snf "${EROOT}etc/init.d/zfs-mount" \
- "${EROOT}etc/runlevels/boot/zfs-mount"
- ln -snf "${EROOT}etc/init.d/zfs-share" \
- "${EROOT}etc/runlevels/default/zfs-share"
- else
- [ -e "${EROOT}etc/runlevels/boot/zfs-import" ] || \
- einfo "You should add zfs-import to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/boot/zfs-mount" ] || \
- einfo "You should add zfs-mount to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/default/zfs-share" ] || \
- einfo "You should add zfs-share to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/default/zed" ]
- then
- einfo 'The downstream OpenRC zed script has replaced by the upstream'
- einfo 'OpenRC zfs-zed script.'
- einfo
- einfo 'You had the zed script in your default runlevel. For your'
- einfo 'convenience, it has been automatically removed and the zfs-zed'
- einfo 'script that replaced it has been configured to start.'
-
- rm "${EROOT}etc/runlevels/boot/zed"
- ln -snf "${EROOT}etc/init.d/zfs-sed" \
- "${EROOT}etc/runlevels/default/zfs-zed"
- else
- [ -e "${EROOT}etc/runlevels/default/zfs-zed" ] || \
- einfo "You should add zfs-zed to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/shutdown/zfs-shutdown" ]
- then
- einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
- rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
- fi
-
-}
-
-pkg_postrm() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- remove_moduledb
- fi
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-PYTHON_COMPAT=( python{2_7,3_4,3_5} )
-
-if [ ${PV} == "9999" ] ; then
- inherit git-r3 linux-mod
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
-else
- SRC_URI="https://github.com/zfsonlinux/${PN}/releases/download/${P}/${P}.tar.gz"
- KEYWORDS=" ~amd64"
-fi
-
-inherit autotools-utils bash-completion-r1 flag-o-matic linux-info python-r1 systemd toolchain-funcs udev
-
-DESCRIPTION="Userland utilities for ZFS Linux kernel module"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="BSD-2 CDDL MIT"
-SLOT="0"
-IUSE="custom-cflags debug kernel-builtin +rootfs test-suite static-libs"
-RESTRICT="test"
-
-COMMON_DEPEND="
- sys-apps/util-linux[static-libs?]
- sys-libs/zlib[static-libs(+)?]
- virtual/awk
-"
-DEPEND="${COMMON_DEPEND}
- virtual/pkgconfig
-"
-
-RDEPEND="${COMMON_DEPEND}
- !=sys-apps/grep-2.13*
- !kernel-builtin? ( =sys-fs/zfs-kmod-${PV}* )
- !sys-fs/zfs-fuse
- !prefix? ( virtual/udev )
- test-suite? (
- sys-apps/util-linux
- sys-devel/bc
- sys-block/parted
- sys-fs/lsscsi
- sys-fs/mdadm
- sys-process/procps
- virtual/modutils
- )
- rootfs? (
- app-arch/cpio
- app-misc/pax-utils
- !<sys-boot/grub-2.00-r2:2
- )
- sys-fs/udev-init-scripts
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-pkg_setup() {
- if use kernel_linux && use test-suite; then
- linux-info_pkg_setup
- if ! linux_config_exists; then
- ewarn "Cannot check the linux kernel configuration."
- else
- # recheck that we don't have usblp to collide with libusb
- if use test-suite; then
- if linux_chkconfig_present BLK_DEV_LOOP; then
- eerror "The ZFS test suite requires loop device support enabled."
- eerror "Please enable it:"
- eerror " CONFIG_BLK_DEV_LOOP=y"
- eerror "in /usr/src/linux/.config or"
- eerror " Device Drivers --->"
- eerror " Block devices --->"
- eerror " [ ] Loopback device support"
- fi
- fi
- fi
- fi
-
-}
-
-src_prepare() {
- # Update paths
- sed -e "s|/sbin/lsmod|/bin/lsmod|" \
- -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
- -e "s|/sbin/parted|/usr/sbin/parted|" \
- -i scripts/common.sh.in
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=user
- --with-dracutdir="/usr/$(get_libdir)/dracut"
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-udevdir="$(get_udevdir)"
- --with-blkid
- $(use_enable debug)
- )
- autotools-utils_src_configure
-
- # prepare systemd unit and helper script
- cat "${FILESDIR}/zfs.service.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs.service" || die
- cat "${FILESDIR}/zfs-init.sh.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs-init.sh" || die
-}
-
-src_install() {
- autotools-utils_src_install
- gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core
- use test-suite || rm -rf "${ED}usr/share/zfs"
-
- newbashcomp "${FILESDIR}/bash-completion-r1" zfs
- bashcomp_alias zfs zpool
-
- exeinto /usr/libexec
- doexe "${T}/zfs-init.sh"
- systemd_dounit "${T}/zfs.service"
-}
-
-pkg_postinst() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- einfo "Adding ${P} to the module database to ensure that the"
- einfo "kernel modules and userland utilities stay in sync."
- update_moduledb
- fi
-
- if [ -e "${EROOT}etc/runlevels/boot/zfs" ]
- then
- einfo 'The zfs boot script has been split into the zfs-import,'
- einfo 'zfs-mount and zfs-share scripts.'
- einfo
- einfo 'You had the zfs script in your boot runlevel. For your'
- einfo 'convenience, it has been automatically removed and the three'
- einfo 'scripts that replace it have been configured to start.'
- einfo 'The zfs-import and zfs-mount scripts have been added to the boot'
- einfo 'runlevel while the zfs-share script is in the default runlevel.'
-
- rm "${EROOT}etc/runlevels/boot/zfs"
- ln -snf "${EROOT}etc/init.d/zfs-import" \
- "${EROOT}etc/runlevels/boot/zfs-import"
- ln -snf "${EROOT}etc/init.d/zfs-mount" \
- "${EROOT}etc/runlevels/boot/zfs-mount"
- ln -snf "${EROOT}etc/init.d/zfs-share" \
- "${EROOT}etc/runlevels/default/zfs-share"
- else
- [ -e "${EROOT}etc/runlevels/boot/zfs-import" ] || \
- einfo "You should add zfs-import to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/boot/zfs-mount" ] || \
- einfo "You should add zfs-mount to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/default/zfs-share" ] || \
- einfo "You should add zfs-share to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/default/zed" ]
- then
- einfo 'The downstream OpenRC zed script has replaced by the upstream'
- einfo 'OpenRC zfs-zed script.'
- einfo
- einfo 'You had the zed script in your default runlevel. For your'
- einfo 'convenience, it has been automatically removed and the zfs-zed'
- einfo 'script that replaced it has been configured to start.'
-
- rm "${EROOT}etc/runlevels/boot/zed"
- ln -snf "${EROOT}etc/init.d/zfs-sed" \
- "${EROOT}etc/runlevels/default/zfs-zed"
- else
- [ -e "${EROOT}etc/runlevels/default/zfs-zed" ] || \
- einfo "You should add zfs-zed to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/shutdown/zfs-shutdown" ]
- then
- einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
- rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
- fi
-
-}
-
-pkg_postrm() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- remove_moduledb
- fi
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-PYTHON_COMPAT=( python{2_7,3_4,3_5} )
-
-if [ ${PV} == "9999" ] ; then
- inherit git-r3 linux-mod
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
-else
- SRC_URI="https://github.com/zfsonlinux/${PN}/releases/download/${P}/${P}.tar.gz"
- KEYWORDS=" ~amd64"
-fi
-
-inherit autotools-utils bash-completion-r1 flag-o-matic linux-info python-r1 systemd toolchain-funcs udev
-
-DESCRIPTION="Userland utilities for ZFS Linux kernel module"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="BSD-2 CDDL MIT"
-SLOT="0"
-IUSE="custom-cflags debug kernel-builtin +rootfs test-suite static-libs"
-RESTRICT="test"
-
-COMMON_DEPEND="
- sys-apps/util-linux[static-libs?]
- sys-libs/zlib[static-libs(+)?]
- virtual/awk
-"
-DEPEND="${COMMON_DEPEND}
- virtual/pkgconfig
-"
-
-RDEPEND="${COMMON_DEPEND}
- !=sys-apps/grep-2.13*
- !kernel-builtin? ( =sys-fs/zfs-kmod-${PV}* )
- !sys-fs/zfs-fuse
- !prefix? ( virtual/udev )
- test-suite? (
- sys-apps/util-linux
- sys-devel/bc
- sys-block/parted
- sys-fs/lsscsi
- sys-fs/mdadm
- sys-process/procps
- virtual/modutils
- )
- rootfs? (
- app-arch/cpio
- app-misc/pax-utils
- !<sys-boot/grub-2.00-r2:2
- !<sys-kernel/genkernel-3.5.1.1
- !<sys-kernel/genkernel-next-67
- !<sys-kernel/bliss-initramfs-7.1.0
- !<sys-kernel/dracut-044-r1
- )
- sys-fs/udev-init-scripts
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-pkg_setup() {
- if use kernel_linux && use test-suite; then
- linux-info_pkg_setup
- if ! linux_config_exists; then
- ewarn "Cannot check the linux kernel configuration."
- else
- # recheck that we don't have usblp to collide with libusb
- if use test-suite; then
- if linux_chkconfig_present BLK_DEV_LOOP; then
- eerror "The ZFS test suite requires loop device support enabled."
- eerror "Please enable it:"
- eerror " CONFIG_BLK_DEV_LOOP=y"
- eerror "in /usr/src/linux/.config or"
- eerror " Device Drivers --->"
- eerror " Block devices --->"
- eerror " [ ] Loopback device support"
- fi
- fi
- fi
- fi
-
-}
-
-src_prepare() {
- # Update paths
- sed -e "s|/sbin/lsmod|/bin/lsmod|" \
- -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
- -e "s|/sbin/parted|/usr/sbin/parted|" \
- -i scripts/common.sh.in
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=user
- --with-dracutdir="/usr/$(get_libdir)/dracut"
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-udevdir="$(get_udevdir)"
- --with-blkid
- $(use_enable debug)
- )
- autotools-utils_src_configure
-
- # prepare systemd unit and helper script
- cat "${FILESDIR}/zfs.service.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs.service" || die
- cat "${FILESDIR}/zfs-init.sh.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs-init.sh" || die
-}
-
-src_install() {
- autotools-utils_src_install
- gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core
- use test-suite || rm -rf "${ED}usr/share/zfs"
-
- newbashcomp "${FILESDIR}/bash-completion-r1" zfs
- bashcomp_alias zfs zpool
-
- exeinto /usr/libexec
- doexe "${T}/zfs-init.sh"
- systemd_dounit "${T}/zfs.service"
-}
-
-pkg_postinst() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- einfo "Adding ${P} to the module database to ensure that the"
- einfo "kernel modules and userland utilities stay in sync."
- update_moduledb
- fi
-
- if [ -e "${EROOT}etc/runlevels/boot/zfs" ]
- then
- einfo 'The zfs boot script has been split into the zfs-import,'
- einfo 'zfs-mount and zfs-share scripts.'
- einfo
- einfo 'You had the zfs script in your boot runlevel. For your'
- einfo 'convenience, it has been automatically removed and the three'
- einfo 'scripts that replace it have been configured to start.'
- einfo 'The zfs-import and zfs-mount scripts have been added to the boot'
- einfo 'runlevel while the zfs-share script is in the default runlevel.'
-
- rm "${EROOT}etc/runlevels/boot/zfs"
- ln -snf "${EROOT}etc/init.d/zfs-import" \
- "${EROOT}etc/runlevels/boot/zfs-import"
- ln -snf "${EROOT}etc/init.d/zfs-mount" \
- "${EROOT}etc/runlevels/boot/zfs-mount"
- ln -snf "${EROOT}etc/init.d/zfs-share" \
- "${EROOT}etc/runlevels/default/zfs-share"
- else
- [ -e "${EROOT}etc/runlevels/boot/zfs-import" ] || \
- einfo "You should add zfs-import to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/boot/zfs-mount" ] || \
- einfo "You should add zfs-mount to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/default/zfs-share" ] || \
- einfo "You should add zfs-share to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/default/zed" ]
- then
- einfo 'The downstream OpenRC zed script has replaced by the upstream'
- einfo 'OpenRC zfs-zed script.'
- einfo
- einfo 'You had the zed script in your default runlevel. For your'
- einfo 'convenience, it has been automatically removed and the zfs-zed'
- einfo 'script that replaced it has been configured to start.'
-
- rm "${EROOT}etc/runlevels/boot/zed"
- ln -snf "${EROOT}etc/init.d/zfs-sed" \
- "${EROOT}etc/runlevels/default/zfs-zed"
- else
- [ -e "${EROOT}etc/runlevels/default/zfs-zed" ] || \
- einfo "You should add zfs-zed to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/shutdown/zfs-shutdown" ]
- then
- einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
- rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
- fi
-
-}
-
-pkg_postrm() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- remove_moduledb
- fi
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-PYTHON_COMPAT=( python{2_7,3_4,3_5} )
-
-if [ ${PV} == "9999" ] ; then
- inherit git-r3 linux-mod
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="git://github.com/zfsonlinux/${PN}.git"
-else
- SRC_URI="https://github.com/zfsonlinux/${PN}/releases/download/${P}/${P}.tar.gz"
- KEYWORDS=" ~amd64"
-fi
-
-inherit autotools-utils bash-completion-r1 flag-o-matic linux-info python-r1 systemd toolchain-funcs udev
-
-DESCRIPTION="Userland utilities for ZFS Linux kernel module"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="BSD-2 CDDL MIT"
-SLOT="0"
-IUSE="custom-cflags debug kernel-builtin +rootfs test-suite static-libs"
-RESTRICT="test"
-
-COMMON_DEPEND="
- sys-apps/util-linux[static-libs?]
- sys-libs/zlib[static-libs(+)?]
- virtual/awk
-"
-DEPEND="${COMMON_DEPEND}
- virtual/pkgconfig
-"
-
-RDEPEND="${COMMON_DEPEND}
- !=sys-apps/grep-2.13*
- !kernel-builtin? ( =sys-fs/zfs-kmod-${PV}* )
- !sys-fs/zfs-fuse
- !prefix? ( virtual/udev )
- test-suite? (
- sys-apps/util-linux
- sys-devel/bc
- sys-block/parted
- sys-fs/lsscsi
- sys-fs/mdadm
- sys-process/procps
- virtual/modutils
- )
- rootfs? (
- app-arch/cpio
- app-misc/pax-utils
- !<sys-boot/grub-2.00-r2:2
- !<sys-kernel/genkernel-3.5.1.1
- !<sys-kernel/genkernel-next-67
- !<sys-kernel/bliss-initramfs-7.1.0
- !<sys-kernel/dracut-044-r1
- )
- sys-fs/udev-init-scripts
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-pkg_setup() {
- if use kernel_linux && use test-suite; then
- linux-info_pkg_setup
- if ! linux_config_exists; then
- ewarn "Cannot check the linux kernel configuration."
- else
- # recheck that we don't have usblp to collide with libusb
- if use test-suite; then
- if linux_chkconfig_present BLK_DEV_LOOP; then
- eerror "The ZFS test suite requires loop device support enabled."
- eerror "Please enable it:"
- eerror " CONFIG_BLK_DEV_LOOP=y"
- eerror "in /usr/src/linux/.config or"
- eerror " Device Drivers --->"
- eerror " Block devices --->"
- eerror " [ ] Loopback device support"
- fi
- fi
- fi
- fi
-
-}
-
-src_prepare() {
- # Update paths
- sed -e "s|/sbin/lsmod|/bin/lsmod|" \
- -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
- -e "s|/sbin/parted|/usr/sbin/parted|" \
- -i scripts/common.sh.in
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=user
- --with-dracutdir="/usr/$(get_libdir)/dracut"
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-udevdir="$(get_udevdir)"
- --with-blkid
- $(use_enable debug)
- )
- autotools-utils_src_configure
-
- # prepare systemd unit and helper script
- cat "${FILESDIR}/zfs.service.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs.service" || die
- cat "${FILESDIR}/zfs-init.sh.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs-init.sh" || die
-}
-
-src_install() {
- autotools-utils_src_install
- gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core
- use test-suite || rm -rf "${ED}usr/share/zfs"
-
- newbashcomp "${FILESDIR}/bash-completion-r1" zfs
- bashcomp_alias zfs zpool
-
- exeinto /usr/libexec
- doexe "${T}/zfs-init.sh"
- systemd_dounit "${T}/zfs.service"
-}
-
-pkg_postinst() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- einfo "Adding ${P} to the module database to ensure that the"
- einfo "kernel modules and userland utilities stay in sync."
- update_moduledb
- fi
-
- if [ -e "${EROOT}etc/runlevels/boot/zfs" ]
- then
- einfo 'The zfs boot script has been split into the zfs-import,'
- einfo 'zfs-mount and zfs-share scripts.'
- einfo
- einfo 'You had the zfs script in your boot runlevel. For your'
- einfo 'convenience, it has been automatically removed and the three'
- einfo 'scripts that replace it have been configured to start.'
- einfo 'The zfs-import and zfs-mount scripts have been added to the boot'
- einfo 'runlevel while the zfs-share script is in the default runlevel.'
-
- rm "${EROOT}etc/runlevels/boot/zfs"
- ln -snf "${EROOT}etc/init.d/zfs-import" \
- "${EROOT}etc/runlevels/boot/zfs-import"
- ln -snf "${EROOT}etc/init.d/zfs-mount" \
- "${EROOT}etc/runlevels/boot/zfs-mount"
- ln -snf "${EROOT}etc/init.d/zfs-share" \
- "${EROOT}etc/runlevels/default/zfs-share"
- else
- [ -e "${EROOT}etc/runlevels/boot/zfs-import" ] || \
- einfo "You should add zfs-import to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/boot/zfs-mount" ] || \
- einfo "You should add zfs-mount to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/default/zfs-share" ] || \
- einfo "You should add zfs-share to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/default/zed" ]
- then
- einfo 'The downstream OpenRC zed script has replaced by the upstream'
- einfo 'OpenRC zfs-zed script.'
- einfo
- einfo 'You had the zed script in your default runlevel. For your'
- einfo 'convenience, it has been automatically removed and the zfs-zed'
- einfo 'script that replaced it has been configured to start.'
-
- rm "${EROOT}etc/runlevels/boot/zed"
- ln -snf "${EROOT}etc/init.d/zfs-sed" \
- "${EROOT}etc/runlevels/default/zfs-zed"
- else
- [ -e "${EROOT}etc/runlevels/default/zfs-zed" ] || \
- einfo "You should add zfs-zed to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/shutdown/zfs-shutdown" ]
- then
- einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
- rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
- fi
-
-}
-
-pkg_postrm() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- remove_moduledb
- fi
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-PYTHON_COMPAT=( python{2_7,3_4,3_5} )
-
-if [ ${PV} == "9999" ] ; then
- inherit git-r3 linux-mod
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="git://github.com/zfsonlinux/${PN}.git"
-else
- SRC_URI="https://github.com/zfsonlinux/${PN}/releases/download/${P}/${P}.tar.gz"
- KEYWORDS=" ~amd64"
-fi
-
-inherit autotools-utils bash-completion-r1 flag-o-matic linux-info python-r1 systemd toolchain-funcs udev
-
-DESCRIPTION="Userland utilities for ZFS Linux kernel module"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="BSD-2 CDDL MIT"
-SLOT="0"
-IUSE="custom-cflags debug kernel-builtin +rootfs test-suite static-libs"
-RESTRICT="test"
-
-COMMON_DEPEND="
- sys-apps/util-linux[static-libs?]
- sys-libs/zlib[static-libs(+)?]
- virtual/awk
-"
-DEPEND="${COMMON_DEPEND}
- virtual/pkgconfig
-"
-
-RDEPEND="${COMMON_DEPEND}
- !=sys-apps/grep-2.13*
- !kernel-builtin? ( =sys-fs/zfs-kmod-${PV}* )
- !sys-fs/zfs-fuse
- !prefix? ( virtual/udev )
- test-suite? (
- sys-apps/util-linux
- sys-devel/bc
- sys-block/parted
- sys-fs/lsscsi
- sys-fs/mdadm
- sys-process/procps
- virtual/modutils
- )
- rootfs? (
- app-arch/cpio
- app-misc/pax-utils
- !<sys-boot/grub-2.00-r2:2
- !<sys-kernel/genkernel-3.5.1.1
- !<sys-kernel/genkernel-next-67
- !<sys-kernel/bliss-initramfs-7.1.0
- !<sys-kernel/dracut-044-r1
- )
- sys-fs/udev-init-scripts
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-pkg_setup() {
- if use kernel_linux && use test-suite; then
- linux-info_pkg_setup
- if ! linux_config_exists; then
- ewarn "Cannot check the linux kernel configuration."
- else
- # recheck that we don't have usblp to collide with libusb
- if use test-suite; then
- if linux_chkconfig_present BLK_DEV_LOOP; then
- eerror "The ZFS test suite requires loop device support enabled."
- eerror "Please enable it:"
- eerror " CONFIG_BLK_DEV_LOOP=y"
- eerror "in /usr/src/linux/.config or"
- eerror " Device Drivers --->"
- eerror " Block devices --->"
- eerror " [ ] Loopback device support"
- fi
- fi
- fi
- fi
-
-}
-
-src_prepare() {
- # Update paths
- sed -e "s|/sbin/lsmod|/bin/lsmod|" \
- -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
- -e "s|/sbin/parted|/usr/sbin/parted|" \
- -i scripts/common.sh.in
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=user
- --with-dracutdir="/usr/$(get_libdir)/dracut"
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-udevdir="$(get_udevdir)"
- --with-blkid
- $(use_enable debug)
- )
- autotools-utils_src_configure
-
- # prepare systemd unit and helper script
- cat "${FILESDIR}/zfs.service.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs.service" || die
- cat "${FILESDIR}/zfs-init.sh.in" | \
- sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
- -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
- > "${T}/zfs-init.sh" || die
-}
-
-src_install() {
- autotools-utils_src_install
- gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core
- use test-suite || rm -rf "${ED}usr/share/zfs"
-
- newbashcomp "${FILESDIR}/bash-completion-r1" zfs
- bashcomp_alias zfs zpool
-
- exeinto /usr/libexec
- doexe "${T}/zfs-init.sh"
- systemd_dounit "${T}/zfs.service"
-}
-
-pkg_postinst() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- einfo "Adding ${P} to the module database to ensure that the"
- einfo "kernel modules and userland utilities stay in sync."
- update_moduledb
- fi
-
- if [ -e "${EROOT}etc/runlevels/boot/zfs" ]
- then
- einfo 'The zfs boot script has been split into the zfs-import,'
- einfo 'zfs-mount and zfs-share scripts.'
- einfo
- einfo 'You had the zfs script in your boot runlevel. For your'
- einfo 'convenience, it has been automatically removed and the three'
- einfo 'scripts that replace it have been configured to start.'
- einfo 'The zfs-import and zfs-mount scripts have been added to the boot'
- einfo 'runlevel while the zfs-share script is in the default runlevel.'
-
- rm "${EROOT}etc/runlevels/boot/zfs"
- ln -snf "${EROOT}etc/init.d/zfs-import" \
- "${EROOT}etc/runlevels/boot/zfs-import"
- ln -snf "${EROOT}etc/init.d/zfs-mount" \
- "${EROOT}etc/runlevels/boot/zfs-mount"
- ln -snf "${EROOT}etc/init.d/zfs-share" \
- "${EROOT}etc/runlevels/default/zfs-share"
- else
- [ -e "${EROOT}etc/runlevels/boot/zfs-import" ] || \
- einfo "You should add zfs-import to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/boot/zfs-mount" ] || \
- einfo "You should add zfs-mount to the boot runlevel."
- [ -e "${EROOT}etc/runlevels/default/zfs-share" ] || \
- einfo "You should add zfs-share to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/default/zed" ]
- then
- einfo 'The downstream OpenRC zed script has replaced by the upstream'
- einfo 'OpenRC zfs-zed script.'
- einfo
- einfo 'You had the zed script in your default runlevel. For your'
- einfo 'convenience, it has been automatically removed and the zfs-zed'
- einfo 'script that replaced it has been configured to start.'
-
- rm "${EROOT}etc/runlevels/boot/zed"
- ln -snf "${EROOT}etc/init.d/zfs-sed" \
- "${EROOT}etc/runlevels/default/zfs-zed"
- else
- [ -e "${EROOT}etc/runlevels/default/zfs-zed" ] || \
- einfo "You should add zfs-zed to the default runlevel."
- fi
-
- if [ -e "${EROOT}etc/runlevels/shutdown/zfs-shutdown" ]
- then
- einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
- rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
- fi
-
-}
-
-pkg_postrm() {
- if ! use kernel-builtin && [ ${PV} = "9999" ]
- then
- remove_moduledb
- fi
-}
-DIST spl-0.6.0-rc13.tar.gz 210192 SHA256 500d9c9297f2b7abdc4fce43efe05dddda2edbe403f9ca76d01ae632f798ee1f SHA512 630b63c15e98ada397bc8b8a1a5b6a48255ffa5d7fad8dd0ed9ad7fbede32f3557651effcc99234ffef1a1b9bb13e289c0ca5a2cf60307e0a57ac3a93b709f6b WHIRLPOOL 9330dd1567421e610a714b69d096bbae66c102baaf90fa3daed45cc1a2928eb3dd0e8537f3cf83a7fb2b157bf52ff37b031bcf6c9f52760acd6e480ad335b69a
-DIST spl-0.6.0-rc14.tar.gz 210495 SHA256 92785e2c2c6caf93ec31175e192a18b27458613a99e6578041f6029875b061e3 SHA512 85d066a97d62ce60f60c552d121c20d5a719e95e0eb6d7ec1b10e29acca1e3429a751bcbb811e9cee2a14282c8908684cb9ee0df9cbc8e53ddfe47da18df4cf9 WHIRLPOOL 6473236476dd9a2d392e2f71fee6810ed83e68f309d1eaaa5fbad1f73ae567ad629db97a2bc81a4ad9e28991f4be3d4100c1b9ab0f65941206afe6e5b03f64ab
-DIST spl-0.6.1.tar.gz 213191 SHA256 24d73eeeb0b08bcc162342c5236f116b90ed0a2e69344ae34de744f61c2e3663 SHA512 116117235b4730b5e7041107188747fa2872fb204a08d67a03e1ec95d6302ca57aa17edd12e6f9284492a844e60d446a25d1172d7a2ce53075c36bd889879b31 WHIRLPOOL 4554eb9ba4a2b60fbfc7d73ada4b5c7ce20b26d6655f0a8d9fe5479d11124acc27cf2ba6eab5af4e4a08c886b06687dcbb656322c8e26c43f07b4066770f9a4d
-DIST spl-0.6.2-p4.tar.xz 9076 SHA256 8b434bb53da79c5adb5339b36bddf4d19c4e8d5df7a8a5d2a4ca1bcf7336094e SHA512 77ca1ce0235edb85cf36243ad45710ee8759dcc49bacddc661a986d558eb9cd92671ce256c88287e056732882a038b12bb0d9ae131229819702a06de18c50bc1 WHIRLPOOL afc335ba0a7d24a610f272e6a65460326b91ab91652bf66525e14110a811b2490de65847560989f793aab8d473794c56836e438cb7f1e19d4e253373178f0a72
-DIST spl-0.6.2.tar.gz 215032 SHA256 a8147eaba030ca71bf8c47b46a2c7ae92f9b4ef60aa8ccfa7368f395faeb85ac SHA512 ef5b77046259ec754e0a41f90b51c27207bf91e832d54a8502232b19cfaff711de301f24945ca739faeac2544b3ef22a57f58cf6298d756a1ebaff06f765b8a9 WHIRLPOOL ab7229691a6f56ab3f98513fd0e32048c11dd7cf3ea61e438bac2d97ebd8cd92eeeb422ef1c4e639572feb3e8f69c0840b861f654ca31de481601ef54295be37
-DIST spl-0.6.3-patches-r1.tar.xz 15996 SHA256 7f1cf74c9be5c14eeff529ce0a45d7dcca33cc08e5b9e7d17fc79dd5a58719d7 SHA512 6eeee3a18466bbe8ca903910d807a3242bff0c12848d4fc6e226fe40592cd6cd9109bc5ee301867f0512b5cf2ad28eab2988e261c69fd200c5dd6eb6d8027b2c WHIRLPOOL 93578cfa435dc343edc8087a0d49aa90ddc457bf75292b0c10ce30836e00f27ea0c4768a62270a6ec559238b778ccfcde71c15740a8242f9f93c7d84934c5f72
-DIST spl-0.6.3.tar.gz 221430 SHA256 5d60dfbe86a50e65dbce17f538d8d0874a0cc293374f59eed46cd2dd1809a944 SHA512 c4b82f1e279c7581d0082c044157e8a933edf53233c8c7c8202117454cfda0473ab85fbb56ac0b6da09a4d6798e33020a9c55bf23e25d630efa3265545c3defc WHIRLPOOL eaf001a96a80264e16ce416da38b988eabbfd2fce17690151a496a3141c32e92e5d00791e2d9c009ae0cf6910f80434c10f02a700752fc664f6bf6723bb03dba
-DIST spl-0.6.4.2.tar.gz 190421 SHA256 05c428f48acc55287c0662a90cfc087985b8ef3694dc057cfb16e1fa2ebbda43 SHA512 6a295651622dd1819bc9ef8f693c6a3cf73dbb084a4789ad508dda644bfcaa1984c5487ea0e16c8d6d468da59a3fae2e9309b2b13cd869a4af4ea675c394bbe3 WHIRLPOOL e270b66ac9e22c806876e727ef040c3cfb2c304889de982f1c54a1625f7bf0214d3b6f8baac42cb3710aa23897f1b1bc67ef633fe35cb1b2c4b57196390a0fad
-DIST spl-0.6.5.10.tar.gz 576268 SHA256 cace7e53dd092f44e0909452dbef74adaebbe8ff0bb59b24341b0c5dafff1b45 SHA512 775cf359b5734a52eb0c54c6de8f314a9522194569f2af083117341799344839b174c1594d5e17b5ffa9aa39fa5011dec04e1a9f0c42908bf989849db3a1c876 WHIRLPOOL 6282d6dced15a359bac04863aa492ae79012a9f86d28f323eb5c67214287c52f8670f30c3b5d98692732b36dc3325680f873953d81951bcb67259da46b9f96ac
DIST spl-0.6.5.11.tar.gz 531710 SHA256 ebab87a064985f93122ad82721ca54569a5ef20dc3579f84d18075210cf316ac SHA512 eae1641a0d528cb9182deccd309625e13abf3db88ba1cbb54947055b23d1f94b62c045f939d5e952784f19719eea5fdf85d65c5abd22b9db167ea7780bc55722 WHIRLPOOL bc528e07624f01bdd41080548ad2098e05167b9d2492a1d27ed5cdd065f843c648dfffb46634d85b9c52325ba9c3e6f921d8d9318e1c040c2d7c6e545426200f
-DIST spl-0.6.5.2.tar.gz 193153 SHA256 2642b69870b32e0feeaa57fbfcef546a330064bd4e5805c4862a97287a9287ca SHA512 9db23daf6cc1d6aaa926c987e284d7dbbc538876d6a8b9636d3126efc2be9d54b5ae2cb9cb3a89b604b3d4106374d85d9ad2c1acaf940a1299c1620ee1526d3f WHIRLPOOL cc99f131f9dfcc9ef84237f16491c8c5417af70c57dcbc3dba448c83f93636d5161b301f4fefa4fa8c54c56a1864cd9ce5d5fc758697803bac880839ea57e359
-DIST spl-0.6.5.3-patches-p0.tar.xz 4968 SHA256 8e652d41eba421720bcecee99077d3f3c375153809426011f04a2c64aa181ca7 SHA512 cdc053d7ad537cec3b0e7d777d6a341d1b48d6f49613f77db3831b86f54cef098748b944a353c3bf920974a812d650b65116fe26906ff7921ea69cfa5fef9691 WHIRLPOOL ff9e6a193a8585738f57fec59a3513fe69856019569e90c95da306ab853b0c5a8266bb457ef1f4df0c4bcd20dfbde1062c616d3ee55621b288ab796c733d9589
-DIST spl-0.6.5.3.tar.gz 556179 SHA256 637c1eccd721f5d3bb1570621d2cd6646ec0488608482c0dbeb2838cf4bb310c SHA512 24a0c97f1a425e44d12f43519c23ba78672c06d65a03833a8d3827e4c762a873283c90ce66f64b9b186ab815f0b005e69da537e120b8b53877d0f13e649bac57 WHIRLPOOL e67f50c8adc4ac2b770dfaeb479fa8a8c87270c8314b5366dd95665a30adb2f1fb29db9719a0431cc18adc6865ea6f222c1b443f2b95b764cede8db50f49333d
DIST spl-0.6.5.4-patches-p1.tar.xz 2020 SHA256 0a554d86ff1874b09263fbec2ee8e03dbae24f4c45cf54c9e8a8d2fcf3a21207 SHA512 2650f06bf23045bd2805ef58baa2561534373862e1fbbaf189cf93283aa8e18cbee989b4e81751b37da3058aeba357cf8e46db97331379e1b5eafde7faa33851 WHIRLPOOL 8054310c8d62d17f45566e67f886e025b5798c1ebb32bf66f3b91b440a42869d09a45030e5d8695687ace829fe21f43289647dafd206d1021626fffb35a2979e
DIST spl-0.6.5.4.tar.gz 556298 SHA256 a49ff1dd255215da18ea60bf76dc5b764ddc1aa40d86f4e842b63185357b1504 SHA512 a50d804008237820d6a8e7d938f6699df2966836ebedf0b6a4421f55bd6c24ae69e8f80eaf3aa2b7f6ed308983ab4ca11abfb32f98c8d070e4957b4802e00cac WHIRLPOOL 4c9150fec7e5539e391ffd078e7aa4412d47416749187d62e36136d945514694b09920e595c391ed3fedcf5d13f7486539f49ca33e166909d8a8b2fc99b39a37
-DIST spl-0.6.5.6.tar.gz 559142 SHA256 167595fe76eb5497c3a1ffe396b6300155d0cbe46d06824a710099ca1ae1b8bd SHA512 23c6d2f041a09ffa9e3f12ddbf59fbe76b74ed6cd0de984b2a04adb14247979aabd13de08b5a5a08b37918ac247aefc599cb0e234527bc118f855ffccf6397e1 WHIRLPOOL af8d2a3d523cece5b42b57836d58048c180bddc00b8846cc4887d2a88b022f2b49e09aa27f32407b34e99a0a3842c82f75e34219f53d5b4b9a6749d047dbf718
-DIST spl-0.6.5.7.tar.gz 558570 SHA256 dc8690e407183eeb7a6af0e7692d6e0a1cd323d51dd1aa492522c421b1924ea0 SHA512 d84d7b088af44c231e7d3f9dfc613acbd55c4c98e8cd8fc04f56194481c46dfd61d49f2f18f4152ce86202e4c4f96de823535754b5412ddd67eef9a403790764 WHIRLPOOL 0591ac89b14096fd5cdcbff2be5fbfd5bdd63fc8313dff182a7dd5d8c4d7ac6be066b68a791812eb2098a48510bc9f322d94c6dbc2a2e5f764cfa264ec206676
-DIST spl-0.6.5.8.tar.gz 553270 SHA256 2d22117106782222d2b7da88cc657b7b9c44d281b1cc74d60761e52d33ab1155 SHA512 4078bcc96c112f12129918583400d927d7dd56686c470dd9cb8fc6ba641dcb5afb044c95de02ac397909bb90f4c50d0aada91177ffed810883b5889610d8b0b4 WHIRLPOOL 57b42a93d74348352e367f7d0e08189cd1d443e74c711d8147c35e1bc4264df1a742e231b381ffcc32aaa755cb732c7e062653145fb929872b6835caa2afda27
-DIST spl-0.6.5.9.tar.gz 594271 SHA256 d9ccd24786bb5a8616748a93a3c0b1270aa891175e2f5d726195b416f5c03b9c SHA512 356db95fcc93eb4ee298efc1ac25d38743572c539fc10b2d1533af861b4fd60804e61c3fb9f9bbad3d7a51cf123113b5b0bcbd49eba1bad7b1d8823d206022e8 WHIRLPOOL 6565a4939efaeba0cff75496ce9e8ea84b55da97fe47457ca33bcaf07aaa93a27dd410a9264b29539e65475029c0f0c612bc93b9fee4f97c7d6db9c92aab6a34
-DIST spl-0.7.0.tar.gz 608150 SHA256 567f461435f99f862efb1b740ed0876b52a2a539aafad6e5372a84a06a5da4d3 SHA512 a01798fad4f46788cf91d97699837526d5a33e35dcd46247a9e00747d3d439b949113eb42c8d9fe9cbc4a7b1ee645a5ac09eb764db82a2a07eaddbbb9605d11c WHIRLPOOL 7087089423c3515945af9de27879b8f009cf39ee3840400bde2aebd967bfe2be41d513ca6368774ad06d1871c81c3abd50f442d5ea9602da456cbe6a3e8cecd4
-DIST spl-0.7.1.tar.gz 547932 SHA256 e6a83dc50bc83a5ce6f20238da16fb941ab6090c419be8af8fc9223210f637fd SHA512 1edd0d21f6bc24c3c1295a3e1002ccc03954b1a8657f34050ca9992aac33eb2caa4356c92c74b1c1767ce69f67f3463bcab749b411b2676b5ed16c6ca838e0fe WHIRLPOOL 8facc1c8bc10481a09b92d16f7c4e3c6612749d55014c28444d0b62382940c84857f2f4c165b45f55aa917172a562dcc2897bc8bc5b8045793e9ebe96345fe5e
-DIST spl-0.7.2.tar.gz 547903 SHA256 c22e410c661a29acfa16caee21b82f8bb166f5b6611ec56431cd9c172ab4729e SHA512 89aef037306b29d6fde8543f2cd0ef300e3a71620a10695f57646154a6122c02a8f8907221a93ee32344c2a07a54cde4635710318dd8d67b1904b64729c3ee40 WHIRLPOOL 4240467e6188bd499511a5a16e063b912b221dc74cb9c325ba0119e9bff91c18625c6039978023920e97163af01f42210ca17e156bc6afc7f314ac8833efec20
DIST spl-0.7.3.tar.gz 548434 SHA256 cd8b8624163577bdec1d1d214c942c5771f183432a04d35c00fc6e7f12fa836b SHA512 22d081449e699147f3bcd9791c89709196bb08cf3cd17cdd6fe2472fd9fb5011d6ea52e2c9c95be89d5cc46704b38a4ac57821584e1691b7bb8b0a705a6d78a1 WHIRLPOOL fc02411fd3eb393ea990ff12852cff430aeaf93d8e99dff4037c3437b795e82d7489b6454307448c44dde0e4b66e34c2d0b086354e35544b0f69b085bbb4b47d
+++ /dev/null
-From 050cd84e628e5d827a0b345cda12b97253fccd37 Mon Sep 17 00:00:00 2001
-From: Brian Behlendorf <behlendorf1@llnl.gov>
-Date: Mon, 7 Jan 2013 14:09:09 -0800
-Subject: [PATCH] Linux compat 3.7.1, on_each_cpu()
-
-Some kernels require that we include the 'linux/irqflags.h'
-header for the SPL_AC_3ARGS_ON_EACH_CPU check. Otherwise,
-the functions local_irq_enable()/local_irq_disable() will not
-be defined and the prototype will be misdetected as the four
-argument version.
-
-This change actually include 'linux/interrupt.h' which in turn
-includes 'linux/irqflags.h' to be as generic as possible.
-
-Additionally, passing NULL as the function can result in a
-gcc error because the on_each_cpu() macro executes it
-unconditionally. To make the test more robust we pass the
-dummy function on_each_cpu_func().
-
-Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Closes #204
----
- config/spl-build.m4 | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/config/spl-build.m4 b/config/spl-build.m4
-index f710d8e..6e4afed 100644
---- a/config/spl-build.m4
-+++ b/config/spl-build.m4
-@@ -1312,9 +1312,12 @@ dnl #
- AC_DEFUN([SPL_AC_3ARGS_ON_EACH_CPU], [
- AC_MSG_CHECKING([whether on_each_cpu() wants 3 args])
- SPL_LINUX_TRY_COMPILE([
-+ #include <linux/interrupt.h>
- #include <linux/smp.h>
-+
-+ void on_each_cpu_func(void *data) { return; }
- ],[
-- on_each_cpu(NULL, NULL, 0);
-+ on_each_cpu(on_each_cpu_func, NULL, 0);
- ],[
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_3ARGS_ON_EACH_CPU, 1,
---
-1.7.10
-
+++ /dev/null
-From d4899f4747fd03be748fd1a589b9db5786fa1375 Mon Sep 17 00:00:00 2001
-From: Brian Behlendorf <behlendorf1@llnl.gov>
-Date: Fri, 11 Jan 2013 14:29:32 -0800
-Subject: [PATCH] kmem-cache: Fix slab ageing soft lockup
-
-Commit a10287e00d13c4c4dbbff14f42b00b03da363fcb slightly reworked
-the slab ageing code such that it is no longer dependent on the
-Linux delayed work queue interfaces.
-
-This was good for portability and performance, but it requires us
-to use the on_each_cpu() function to execute the spl_magazine_age()
-function. That means that the function is now executing in interrupt
-context whereas before it was scheduled in normal process context.
-And that means we need to be slightly more careful about the locking
-in the interrupt handler.
-
-With the reworked code it's possible that we'll be holding the
-skc->skc_lock and be interrupted to handle the spl_magazine_age()
-IRQ. This will result in a deadlock and soft lockup errors unless
-we're careful to detect the contention and avoid taking the lock in
-the interupt handler. So that's what this patch does.
-
-Alternately, (and slightly more conventionally) we could have used
-spin_lock_irqsave() to prevent this race entirely but I'd perfer to
-avoid disabling interrupts as much as possible due to performance
-concerns. There is absolutely no penalty for us not aging objects
-out of the magazine due to contention.
-
-Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Signed-off-by: Prakash Surya <surya1@llnl.gov>
-Closes zfsonlinux/zfs#1193
----
- module/spl/spl-kmem.c | 94 +++++++++++++++++++++++++++----------------------
- 1 file changed, 51 insertions(+), 43 deletions(-)
-
-diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c
-index bc08a55..cc5961e 100644
---- a/module/spl/spl-kmem.c
-+++ b/module/spl/spl-kmem.c
-@@ -827,8 +827,7 @@ char *kvasprintf(gfp_t gfp, const char *fmt, va_list ap)
- struct rw_semaphore spl_kmem_cache_sem; /* Cache list lock */
- taskq_t *spl_kmem_cache_taskq; /* Task queue for ageing / reclaim */
-
--static int spl_cache_flush(spl_kmem_cache_t *skc,
-- spl_kmem_magazine_t *skm, int flush);
-+static void spl_cache_shrink(spl_kmem_cache_t *skc, void *obj);
-
- SPL_SHRINKER_CALLBACK_FWD_DECLARE(spl_kmem_cache_generic_shrinker);
- SPL_SHRINKER_DECLARE(spl_kmem_cache_shrinker,
-@@ -1244,6 +1243,38 @@ static int spl_cache_flush(spl_kmem_cache_t *skc,
- SRETURN(0);
- }
-
-+/*
-+ * Release objects from the per-cpu magazine back to their slab. The flush
-+ * argument contains the max number of entries to remove from the magazine.
-+ */
-+static void
-+__spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush)
-+{
-+ int i, count = MIN(flush, skm->skm_avail);
-+ SENTRY;
-+
-+ ASSERT(skc->skc_magic == SKC_MAGIC);
-+ ASSERT(skm->skm_magic == SKM_MAGIC);
-+ ASSERT(spin_is_locked(&skc->skc_lock));
-+
-+ for (i = 0; i < count; i++)
-+ spl_cache_shrink(skc, skm->skm_objs[i]);
-+
-+ skm->skm_avail -= count;
-+ memmove(skm->skm_objs, &(skm->skm_objs[count]),
-+ sizeof(void *) * skm->skm_avail);
-+
-+ SEXIT;
-+}
-+
-+static void
-+spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush)
-+{
-+ spin_lock(&skc->skc_lock);
-+ __spl_cache_flush(skc, skm, flush);
-+ spin_unlock(&skc->skc_lock);
-+}
-+
- static void
- spl_magazine_age(void *data)
- {
-@@ -1252,10 +1283,23 @@ static int spl_cache_flush(spl_kmem_cache_t *skc,
-
- ASSERT(skm->skm_magic == SKM_MAGIC);
- ASSERT(skm->skm_cpu == smp_processor_id());
-+ ASSERT(irqs_disabled());
-+
-+ /* There are no available objects or they are too young to age out */
-+ if ((skm->skm_avail == 0) ||
-+ time_before(jiffies, skm->skm_age + skc->skc_delay * HZ))
-+ return;
-
-- if (skm->skm_avail > 0)
-- if (time_after(jiffies, skm->skm_age + skc->skc_delay * HZ))
-- (void) spl_cache_flush(skc, skm, skm->skm_refill);
-+ /*
-+ * Because we're executing in interrupt context we may have
-+ * interrupted the holder of this lock. To avoid a potential
-+ * deadlock return if the lock is contended.
-+ */
-+ if (!spin_trylock(&skc->skc_lock))
-+ return;
-+
-+ __spl_cache_flush(skc, skm, skm->skm_refill);
-+ spin_unlock(&skc->skc_lock);
- }
-
- /*
-@@ -1451,7 +1495,7 @@ static int spl_cache_flush(spl_kmem_cache_t *skc,
-
- for_each_online_cpu(i) {
- skm = skc->skc_mag[i];
-- (void)spl_cache_flush(skc, skm, skm->skm_avail);
-+ spl_cache_flush(skc, skm, skm->skm_avail);
- spl_magazine_free(skm);
- }
-
-@@ -1932,42 +1976,6 @@ static int spl_cache_flush(spl_kmem_cache_t *skc,
- }
-
- /*
-- * Release a batch of objects from a per-cpu magazine back to their
-- * respective slabs. This occurs when we exceed the magazine size,
-- * are under memory pressure, when the cache is idle, or during
-- * cache cleanup. The flush argument contains the number of entries
-- * to remove from the magazine.
-- */
--static int
--spl_cache_flush(spl_kmem_cache_t *skc, spl_kmem_magazine_t *skm, int flush)
--{
-- int i, count = MIN(flush, skm->skm_avail);
-- SENTRY;
--
-- ASSERT(skc->skc_magic == SKC_MAGIC);
-- ASSERT(skm->skm_magic == SKM_MAGIC);
--
-- /*
-- * XXX: Currently we simply return objects from the magazine to
-- * the slabs in fifo order. The ideal thing to do from a memory
-- * fragmentation standpoint is to cheaply determine the set of
-- * objects in the magazine which will result in the largest
-- * number of free slabs if released from the magazine.
-- */
-- spin_lock(&skc->skc_lock);
-- for (i = 0; i < count; i++)
-- spl_cache_shrink(skc, skm->skm_objs[i]);
--
-- skm->skm_avail -= count;
-- memmove(skm->skm_objs, &(skm->skm_objs[count]),
-- sizeof(void *) * skm->skm_avail);
--
-- spin_unlock(&skc->skc_lock);
--
-- SRETURN(count);
--}
--
--/*
- * Allocate an object from the per-cpu magazine, or if the magazine
- * is empty directly allocate from a slab and repopulate the magazine.
- */
-@@ -2053,7 +2061,7 @@ static int spl_cache_flush(spl_kmem_cache_t *skc,
-
- /* Per-CPU cache full, flush it to make space */
- if (unlikely(skm->skm_avail >= skm->skm_size))
-- (void)spl_cache_flush(skc, skm, skm->skm_refill);
-+ spl_cache_flush(skc, skm, skm->skm_refill);
-
- /* Available space in cache, use it */
- skm->skm_objs[skm->skm_avail++] = obj;
---
-1.7.10
-
+++ /dev/null
-From dd3678fc29d75286b57e705454bbd7e60e1b44e0 Mon Sep 17 00:00:00 2001
-From: Brian Behlendorf <behlendorf1@llnl.gov>
-Date: Tue, 5 Feb 2013 09:35:43 -0800
-Subject: [PATCH] Fix atomic64_* autoconf checks
-
-The SPL_AC_ATOMIC_SPINLOCK, SPL_AC_TYPE_ATOMIC64_CMPXCHG, and
-SPL_AC_TYPE_ATOMIC64_XCHG were all directly including the
-'asm/atomic.h' header. As of Linux 3.4 this header was removed
-which results in a build failure.
-
-The right thing to do is include 'linux/atomic.h' however we
-can't safely do this because it doesn't exist in 2.6.26 kernels.
-Therefore, we include 'linux/fs.h' which in turn includes the
-correct atomic header regardless of the kernel version.
-
-When these incorrect APIs are used in ZFS the following build
-failure results.
-
- arc.c:791:80: warning: '__ret' may be used uninitialized
- in this function [-Wuninitialized]
- arc.c:791:1875: error: call to '__cmpxchg_wrong_size'
- declared with attribute error: Bad argument size for cmpxchg
-
-Since this is all Linux 2.6.24 compatibility code there's
-an argument to be made that it should be removed because
-kernels this old are not supported. However, because we're
-so close to a release I'm going to leave it in place for now.
-
-Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Closes zfsonlinux/zfs#814
-Closes zfsonlinux/zfs#1254
----
- config/spl-build.m4 | 7 +++----
- 1 file changed, 3 insertions(+), 4 deletions(-)
-
-diff --git a/config/spl-build.m4 b/config/spl-build.m4
-index e9695de..8518404 100644
---- a/config/spl-build.m4
-+++ b/config/spl-build.m4
-@@ -777,7 +777,7 @@ AC_DEFUN([SPL_AC_ATOMIC_SPINLOCK], [
- [enable_atomic_spinlocks=check])
-
- SPL_LINUX_TRY_COMPILE([
-- #include <asm/atomic.h>
-+ #include <linux/fs.h>
- ],[
- atomic64_t *ptr __attribute__ ((unused));
- ],[
-@@ -820,8 +820,7 @@ dnl #
- AC_DEFUN([SPL_AC_TYPE_ATOMIC64_CMPXCHG],
- [AC_MSG_CHECKING([whether kernel defines atomic64_cmpxchg])
- SPL_LINUX_TRY_COMPILE([
-- #include <asm/atomic.h>
-- #include <asm/system.h>
-+ #include <linux/fs.h>
- ],[
- atomic64_cmpxchg((atomic64_t *)NULL, 0, 0);
- ],[
-@@ -840,7 +839,7 @@ dnl #
- AC_DEFUN([SPL_AC_TYPE_ATOMIC64_XCHG],
- [AC_MSG_CHECKING([whether kernel defines atomic64_xchg])
- SPL_LINUX_TRY_COMPILE([
-- #include <asm/atomic.h>
-+ #include <linux/fs.h>
- ],[
- atomic64_xchg((atomic64_t *)NULL, 0);
- ],[
---
-1.7.10
-
+++ /dev/null
-From a0625691b39468d04eb716919e237f96a3987b48 Mon Sep 17 00:00:00 2001
-From: Richard Yao <ryao@cs.stonybrook.edu>
-Date: Tue, 5 Feb 2013 16:42:29 -0500
-Subject: [PATCH] Fix HAVE_MUTEX_OWNER_TASK_STRUCT autotools check on PPC64
-
-The HAVE_MUTEX_OWNER_TASK_STRUCT fails on PPC64 with the following
-error:
-
-error: 'current' undeclared (first use in this function)
-
-We include linux/sched.h to ensure that current is available.
-
-Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu>
-Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
----
- config/spl-build.m4 | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/config/spl-build.m4 b/config/spl-build.m4
-index 8518404..4cb7e1d 100644
---- a/config/spl-build.m4
-+++ b/config/spl-build.m4
-@@ -1269,6 +1269,7 @@ AC_DEFUN([SPL_AC_MUTEX_OWNER_TASK_STRUCT], [
- EXTRA_KCFLAGS="-Werror"
- SPL_LINUX_TRY_COMPILE([
- #include <linux/mutex.h>
-+ #include <linux/sched.h>
- ],[
- struct mutex mtx __attribute__ ((unused));
- mtx.owner = current;
---
-1.7.10
-
+++ /dev/null
-diff --git a/config/spl-build.m4 b/config/spl-build.m4
-index 3dcc05e..6a8e658 100644
---- a/config/spl-build.m4
-+++ b/config/spl-build.m4
-@@ -64,6 +64,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
- SPL_AC_USER_PATH_DIR
- SPL_AC_SET_FS_PWD
- SPL_AC_2ARGS_SET_FS_PWD
-+ SPL_AC_SET_FS_PWD_WITH_CONST
- SPL_AC_2ARGS_VFS_UNLINK
- SPL_AC_4ARGS_VFS_RENAME
- SPL_AC_VFS_FSYNC
-@@ -88,6 +89,8 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
- SPL_AC_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE
- SPL_AC_SHRINK_CONTROL_STRUCT
- SPL_AC_RWSEM_SPINLOCK_IS_RAW
-+ SPL_AC_SCHED_RT_HEADER
-+ SPL_AC_2ARGS_VFS_GETATTR
- ])
-
- AC_DEFUN([SPL_AC_MODULE_SYMVERS], [
-@@ -1684,12 +1687,55 @@ AC_DEFUN([SPL_AC_2ARGS_SET_FS_PWD],
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_2ARGS_SET_FS_PWD, 1,
- [set_fs_pwd() wants 2 args])
-+ HAVE_2ARGS_SET_FS_PWD=yes
- ],[
- AC_MSG_RESULT(no)
- ])
- ])
-
- dnl #
-+dnl # 3.9 API change
-+dnl # set_fs_pwd takes const struct path *
-+dnl #
-+AC_DEFUN([SPL_AC_SET_FS_PWD_WITH_CONST],
-+if test "x$HAVE_2ARGS_SET_FS_PWD" = xyes; then
-+ tmp_flags="$EXTRA_KCFLAGS"
-+ EXTRA_KCFLAGS="-Werror"
-+ [AC_MSG_CHECKING([whether set_fs_pwd() requires const struct path *])
-+ SPL_LINUX_TRY_COMPILE([
-+ #include <linux/spinlock.h>
-+ #include <linux/fs_struct.h>
-+ #include <linux/path.h>
-+ void (*const set_fs_pwd_func)
-+ (struct fs_struct *, const struct path *)
-+ = set_fs_pwd;
-+ ],[
-+ return 0;
-+ ],[
-+ AC_MSG_RESULT(yes)
-+ AC_DEFINE(HAVE_SET_FS_PWD_WITH_CONST, 1,
-+ [set_fs_pwd() needs const path *])
-+ ],[
-+ SPL_LINUX_TRY_COMPILE([
-+ #include <linux/spinlock.h>
-+ #include <linux/fs_struct.h>
-+ #include <linux/path.h>
-+ void (*const set_fs_pwd_func)
-+ (struct fs_struct *, struct path *)
-+ = set_fs_pwd;
-+ ],[
-+ return 0;
-+ ],[
-+ AC_MSG_RESULT(no)
-+ ],[
-+ AC_MSG_ERROR(unknown)
-+ ])
-+ ])
-+ EXTRA_KCFLAGS="$tmp_flags"
-+fi
-+])
-+
-+dnl #
- dnl # SLES API change, never adopted in mainline,
- dnl # Third 'struct vfsmount *' argument removed.
- dnl #
-@@ -2217,3 +2263,53 @@ AC_DEFUN([SPL_AC_RWSEM_SPINLOCK_IS_RAW], [
- ])
- EXTRA_KCFLAGS="$tmp_flags"
- ])
-+
-+dnl #
-+dnl # 3.9 API change,
-+dnl # Moved things from linux/sched.h to linux/sched/rt.h
-+dnl #
-+AC_DEFUN([SPL_AC_SCHED_RT_HEADER],
-+ [AC_MSG_CHECKING([whether header linux/sched/rt.h exists])
-+ SPL_LINUX_TRY_COMPILE([
-+ #include <linux/sched.h>
-+ #include <linux/sched/rt.h>
-+ ],[
-+ return 0;
-+ ],[
-+ AC_DEFINE(HAVE_SCHED_RT_HEADER, 1, [linux/sched/rt.h exists])
-+ AC_MSG_RESULT(yes)
-+ ],[
-+ AC_MSG_RESULT(no)
-+ ])
-+])
-+
-+dnl #
-+dnl # 3.9 API change,
-+dnl # vfs_getattr() uses 2 args
-+dnl # It takes struct path * instead of struct vfsmount * and struct dentry *
-+dnl #
-+AC_DEFUN([SPL_AC_2ARGS_VFS_GETATTR], [
-+ AC_MSG_CHECKING([whether vfs_getattr() wants])
-+ SPL_LINUX_TRY_COMPILE([
-+ #include <linux/fs.h>
-+ ],[
-+ vfs_getattr((struct path *) NULL,
-+ (struct kstat *)NULL);
-+ ],[
-+ AC_MSG_RESULT(2 args)
-+ AC_DEFINE(HAVE_2ARGS_VFS_GETATTR, 1,
-+ [vfs_getattr wants 2 args])
-+ ],[
-+ SPL_LINUX_TRY_COMPILE([
-+ #include <linux/fs.h>
-+ ],[
-+ vfs_getattr((struct vfsmount *)NULL,
-+ (struct dentry *)NULL,
-+ (struct kstat *)NULL);
-+ ],[
-+ AC_MSG_RESULT(3 args)
-+ ],[
-+ AC_MSG_ERROR(unknown)
-+ ])
-+ ])
-+])
-diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h
-index 7c4da67..b4778b7 100644
---- a/include/sys/sysmacros.h
-+++ b/include/sys/sysmacros.h
-@@ -26,12 +26,17 @@
- #define _SPL_SYSMACROS_H
-
- #include <linux/module.h>
-+#include <linux/sched.h>
- #include <linux/cpumask.h>
- #include <sys/debug.h>
- #include <sys/varargs.h>
- #include <sys/zone.h>
- #include <sys/signal.h>
-
-+#ifdef HAVE_SCHED_RT_HEADER
-+#include <linux/sched/rt.h>
-+#endif
-+
- #ifndef _KERNEL
- #define _KERNEL __KERNEL__
- #endif
-diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c
-index e3538b5..f9c1114 100644
---- a/module/spl/spl-kmem.c
-+++ b/module/spl/spl-kmem.c
-@@ -404,7 +404,8 @@ kmem_del_init(spinlock_t *lock, struct hlist_head *table, int bits, const void *
- spin_lock_irqsave(lock, flags);
-
- head = &table[hash_ptr(addr, bits)];
-- hlist_for_each_entry_rcu(p, node, head, kd_hlist) {
-+ hlist_for_each_rcu(node, head) {
-+ p = list_entry_rcu(node, struct kmem_debug, kd_hlist);
- if (p->kd_addr == addr) {
- hlist_del_init(&p->kd_hlist);
- list_del_init(&p->kd_list);
-diff --git a/module/spl/spl-tsd.c b/module/spl/spl-tsd.c
-index d7749cf..6e5605b 100644
---- a/module/spl/spl-tsd.c
-+++ b/module/spl/spl-tsd.c
-@@ -113,7 +113,8 @@ tsd_hash_search(tsd_hash_table_t *table, uint_t key, pid_t pid)
- hash = hash_long((ulong_t)key * (ulong_t)pid, table->ht_bits);
- bin = &table->ht_bins[hash];
- spin_lock(&bin->hb_lock);
-- hlist_for_each_entry(entry, node, &bin->hb_head, he_list) {
-+ hlist_for_each(node, &bin->hb_head) {
-+ entry = list_entry(node, tsd_hash_entry_t, he_list);
- if ((entry->he_key == key) && (entry->he_pid == pid)) {
- spin_unlock(&bin->hb_lock);
- SRETURN(entry);
-diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c
-index 4d571c6..dac452c 100644
---- a/module/spl/spl-vnode.c
-+++ b/module/spl/spl-vnode.c
-@@ -175,7 +175,11 @@ vn_open(const char *path, uio_seg_t seg, int flags, int mode,
- if (IS_ERR(fp))
- SRETURN(-PTR_ERR(fp));
-
-- rc = vfs_getattr(fp->f_vfsmnt, fp->f_dentry, &stat);
-+#ifdef HAVE_2ARGS_VFS_GETATTR
-+ rc = vfs_getattr(&fp->f_path, &stat);
-+#else
-+ rc = vfs_getattr(fp->f_path.mnt, fp->f_dentry, &stat);
-+#endif
- if (rc) {
- filp_close(fp, 0);
- SRETURN(-rc);
-@@ -602,7 +606,11 @@ vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4)
-
- fp = vp->v_file;
-
-- rc = vfs_getattr(fp->f_vfsmnt, fp->f_dentry, &stat);
-+#ifdef HAVE_2ARGS_VFS_GETATTR
-+ rc = vfs_getattr(&fp->f_path, &stat);
-+#else
-+ rc = vfs_getattr(fp->f_path.mnt, fp->f_dentry, &stat);
-+#endif
- if (rc)
- SRETURN(-rc);
-
-@@ -754,7 +762,12 @@ vn_getf(int fd)
- if (vp == NULL)
- SGOTO(out_fget, rc);
-
-- if (vfs_getattr(lfp->f_vfsmnt, lfp->f_dentry, &stat))
-+#ifdef HAVE_2ARGS_VFS_GETATTR
-+ rc = vfs_getattr(&lfp->f_path, &stat);
-+#else
-+ rc = vfs_getattr(lfp->f_path.mnt, lfp->f_dentry, &stat);
-+#endif
-+ if (rc)
- SGOTO(out_vnode, rc);
-
- mutex_enter(&vp->v_lock);
-@@ -827,7 +840,11 @@ EXPORT_SYMBOL(releasef);
- # ifdef HAVE_2ARGS_SET_FS_PWD
- /* Used from 2.6.25 - 2.6.31+ */
- void
-+# ifdef HAVE_SET_FS_PWD_WITH_CONST
-+set_fs_pwd(struct fs_struct *fs, const struct path *path)
-+# else
- set_fs_pwd(struct fs_struct *fs, struct path *path)
-+# endif
- {
- struct path old_pwd;
-
+++ /dev/null
-From 58a382c73ad3393d7591421950624e75d3c4aea1 Mon Sep 17 00:00:00 2001
-From: Richard Yao <ryao@cs.stonybrook.edu>
-Date: Thu, 21 Mar 2013 13:21:11 -0400
-Subject: [PATCH] Do not call cond_resched() in spl_slab_reclaim()
-
-Calling cond_resched() after each object is freed and then after each
-slab is freed can cause slabs of objects to live for excessive periods
-of time following reclaimation. This interferes with the kernel's own
-memory management when called from kswapd and can cause direct reclaim
-to occur in response to memory pressure that should have been resolved.
-
-Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu>
----
- module/spl/spl-kmem.c | 3 ---
- 1 file changed, 3 deletions(-)
-
-diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c
-index f9c1114..a0ca2d2 100644
---- a/module/spl/spl-kmem.c
-+++ b/module/spl/spl-kmem.c
-@@ -1112,14 +1112,11 @@ char *kvasprintf(gfp_t gfp, const char *fmt, va_list ap)
-
- if (skc->skc_flags & KMC_OFFSLAB)
- kv_free(skc, sko->sko_addr, size);
--
-- cond_resched();
- }
-
- list_for_each_entry_safe(sks, m, &sks_list, sks_list) {
- ASSERT(sks->sks_magic == SKS_MAGIC);
- kv_free(skc, sks, skc->skc_slab_size);
-- cond_resched();
- }
-
- SEXIT;
---
-1.8.1.5
-
+++ /dev/null
-From f47f028ae6f039c13d3138e2ee1c0056a3a3f789 Mon Sep 17 00:00:00 2001
-From: Richard Yao <ryao@cs.stonybrook.edu>
-Date: Mon, 11 Mar 2013 21:16:36 -0400
-Subject: [PATCH] Simplify hostid logic
-
-There is plenty of compatibility code for a hw_hostid
-that isn't used by anything. At the same time, there are apparently
-issues with the current hostid logic. coredumb in #zfsonlinux on
-freenode reported that Fedora 17 changes its hostid on every boot, which
-required force importing his pool. A suggestion by wca was to adopt
-FreeBSD's behavior, where it treats hostid as zero if /etc/hostid does
-not exist
-
-Adopting FreeBSD's behavior permits us to eliminate plenty of code,
-including a userland helper that invokes the system's hostid as a
-fallback.
-
-Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu>
----
- include/sys/sysmacros.h | 1 -
- include/sys/systeminfo.h | 3 +--
- module/spl/spl-generic.c | 55 ++++++------------------------------------------
- module/spl/spl-proc.c | 11 ----------
- 4 files changed, 7 insertions(+), 63 deletions(-)
-
-diff --git a/include/sys/sysmacros.h b/include/sys/sysmacros.h
-index 7c4da67..4dd2685 100644
---- a/include/sys/sysmacros.h
-+++ b/include/sys/sysmacros.h
-@@ -138,7 +138,6 @@
- /* Missing globals */
- extern char spl_version[32];
- extern unsigned long spl_hostid;
--extern char hw_serial[11];
-
- /* Missing misc functions */
- extern int highbit(unsigned long i);
-diff --git a/include/sys/systeminfo.h b/include/sys/systeminfo.h
-index e22a085..a4c1984 100644
---- a/include/sys/systeminfo.h
-+++ b/include/sys/systeminfo.h
-@@ -25,6 +25,5 @@
- #ifndef _SPL_SYSTEMINFO_H
- #define _SPL_SYSTEMINFO_H
-
--#define HW_INVALID_HOSTID 0xFFFFFFFF /* an invalid hostid */
- #define HW_HOSTID_LEN 11 /* minimum buffer size needed */
- /* to hold a decimal or hex */
-diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c
-index 3cef489..b8e2ed1 100644
---- a/module/spl/spl-generic.c
-+++ b/module/spl/spl-generic.c
-@@ -52,14 +52,11 @@
- char spl_version[32] = "SPL v" SPL_META_VERSION "-" SPL_META_RELEASE;
- EXPORT_SYMBOL(spl_version);
-
--unsigned long spl_hostid = HW_INVALID_HOSTID;
-+unsigned long spl_hostid = 0;
- EXPORT_SYMBOL(spl_hostid);
- module_param(spl_hostid, ulong, 0644);
- MODULE_PARM_DESC(spl_hostid, "The system hostid.");
-
--char hw_serial[HW_HOSTID_LEN] = "<none>";
--EXPORT_SYMBOL(hw_serial);
--
- proc_t p0 = { 0 };
- EXPORT_SYMBOL(p0);
-
-@@ -467,7 +464,7 @@ struct new_utsname *__utsname(void)
- int result;
- uint64_t size;
- struct _buf *file;
-- unsigned long hostid = 0;
-+ uint32_t hostid = 0;
-
- file = kobj_open_file(spl_hostid_path);
-
-@@ -511,45 +508,10 @@ struct new_utsname *__utsname(void)
- return 0;
- }
-
--#define GET_HOSTID_CMD \
-- "exec 0</dev/null " \
-- " 1>/proc/sys/kernel/spl/hostid " \
-- " 2>/dev/null; " \
-- "hostid"
--
--static int
--hostid_exec(void)
--{
-- char *argv[] = { "/bin/sh",
-- "-c",
-- GET_HOSTID_CMD,
-- NULL };
-- char *envp[] = { "HOME=/",
-- "TERM=linux",
-- "PATH=/sbin:/usr/sbin:/bin:/usr/bin",
-- NULL };
-- int rc;
--
-- /* Doing address resolution in the kernel is tricky and just
-- * not a good idea in general. So to set the proper 'hw_serial'
-- * use the usermodehelper support to ask '/bin/sh' to run
-- * '/usr/bin/hostid' and redirect the result to /proc/sys/spl/hostid
-- * for us to use. It's a horrific solution but it will do for now.
-- */
-- rc = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC);
-- if (rc)
-- printk("SPL: Failed user helper '%s %s %s', rc = %d\n",
-- argv[0], argv[1], argv[2], rc);
--
-- return rc;
--}
--
- uint32_t
- zone_get_hostid(void *zone)
- {
- static int first = 1;
-- unsigned long hostid;
-- int rc;
-
- /* Only the global zone is supported */
- ASSERT(zone == NULL);
-@@ -559,21 +521,16 @@ struct new_utsname *__utsname(void)
-
- /*
- * Get the hostid if it was not passed as a module parameter.
-- * Try reading the /etc/hostid file directly, and then fall
-- * back to calling the /usr/bin/hostid utility.
-+ * Try reading the /etc/hostid file directly.
- */
-- if ((spl_hostid == HW_INVALID_HOSTID) &&
-- (rc = hostid_read()) && (rc = hostid_exec()))
-- return HW_INVALID_HOSTID;
-+ if (hostid_read())
-+ spl_hostid = 0;
-
- printk(KERN_NOTICE "SPL: using hostid 0x%08x\n",
- (unsigned int) spl_hostid);
- }
-
-- if (ddi_strtoul(hw_serial, NULL, HW_HOSTID_LEN-1, &hostid) != 0)
-- return HW_INVALID_HOSTID;
--
-- return (uint32_t)hostid;
-+ return spl_hostid;
- }
- EXPORT_SYMBOL(zone_get_hostid);
-
-diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c
-index cd4fa1b..1113cf2 100644
---- a/module/spl/spl-proc.c
-+++ b/module/spl/spl-proc.c
-@@ -506,9 +506,6 @@ enum {
- if (str == end)
- SRETURN(-EINVAL);
-
-- (void) snprintf(hw_serial, HW_HOSTID_LEN, "%lu", spl_hostid);
-- hw_serial[HW_HOSTID_LEN - 1] = '\0';
-- *ppos += *lenp;
- } else {
- len = snprintf(str, sizeof(str), "%lx", spl_hostid);
- if (*ppos >= len)
-@@ -1051,14 +1048,6 @@ enum {
- .mode = 0644,
- .proc_handler = &proc_dohostid,
- },
-- {
-- CTL_NAME (CTL_HW_SERIAL)
-- .procname = "hw_serial",
-- .data = hw_serial,
-- .maxlen = sizeof(hw_serial),
-- .mode = 0444,
-- .proc_handler = &proc_dostring,
-- },
- #ifndef HAVE_KALLSYMS_LOOKUP_NAME
- {
- CTL_NAME (CTL_KALLSYMS)
---
-1.8.1.5
-
+++ /dev/null
-From 991857cac5929fa149820722b8e8cd90f874670c Mon Sep 17 00:00:00 2001
-From: Matthew Thode <mthode@mthode.org>
-Date: Fri, 21 Jun 2013 14:55:07 -0400
-Subject: [PATCH] Copy spl.release.in to kernel dir
-
-Required when compiling ZFS in the kernel.
-
-Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Closes #253
----
- copy-builtin | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/copy-builtin b/copy-builtin
-index 3277270..cd98b7a 100755
---- a/copy-builtin
-+++ b/copy-builtin
-@@ -33,6 +33,7 @@ rm -rf "$KERNEL_DIR/include/spl" "$KERNEL_DIR/spl"
- cp --recursive include "$KERNEL_DIR/include/spl"
- cp --recursive module "$KERNEL_DIR/spl"
- cp spl_config.h "$KERNEL_DIR/"
-+cp spl.release.in "$KERNEL_DIR/"
-
- adjust_obj_paths()
- {
---
-1.8.1.6
-
+++ /dev/null
-diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c
-index cd4fa1b..3cac8a1 100644
---- a/module/spl/spl-proc.c
-+++ b/module/spl/spl-proc.c
-@@ -37,6 +37,12 @@
-
- #define SS_DEBUG_SUBSYS SS_PROC
-
-+#ifdef CONSTIFY_PLUGIN
-+typedef struct ctl_table __no_const spl_ctl_table;
-+#else
-+typedef struct ctl_table spl_ctl_table;
-+#endif
-+
- #ifdef DEBUG_KMEM
- static unsigned long table_min = 0;
- static unsigned long table_max = ~0;
-@@ -323,7 +329,7 @@ enum {
- SPL_PROC_HANDLER(proc_console_max_delay_cs)
- {
- int rc, max_delay_cs;
-- struct ctl_table dummy = *table;
-+ spl_ctl_table dummy = *table;
- long d;
- SENTRY;
-
-@@ -355,7 +361,7 @@ enum {
- SPL_PROC_HANDLER(proc_console_min_delay_cs)
- {
- int rc, min_delay_cs;
-- struct ctl_table dummy = *table;
-+ spl_ctl_table dummy = *table;
- long d;
- SENTRY;
-
-@@ -387,7 +393,7 @@ enum {
- SPL_PROC_HANDLER(proc_console_backoff)
- {
- int rc, backoff;
-- struct ctl_table dummy = *table;
-+ spl_ctl_table dummy = *table;
- SENTRY;
-
- dummy.data = &backoff;
-@@ -417,7 +423,7 @@ enum {
- {
- int rc = 0;
- unsigned long min = 0, max = ~0, val;
-- struct ctl_table dummy = *table;
-+ spl_ctl_table dummy = *table;
- SENTRY;
-
- dummy.data = &val;
-@@ -444,7 +450,7 @@ enum {
- {
- int rc = 0;
- unsigned long min = 0, max = ~0, val = 0, mask;
-- struct ctl_table dummy = *table;
-+ spl_ctl_table dummy = *table;
- spl_kmem_cache_t *skc;
- SENTRY;
-
---
+++ /dev/null
-From ab59be7bc752481db64df07c821e2ae6bf2ae71b Mon Sep 17 00:00:00 2001
-From: Brian Behlendorf <behlendorf1@llnl.gov>
-Date: Wed, 1 May 2013 16:20:28 -0700
-Subject: [PATCH] Fix delay()
-
-Somewhat amazingly it went unnoticed that the delay() function
-doesn't actually cause the task to block. Since the task state
-is never changed from TASK_RUNNING before schedule_timeout() the
-scheduler allows to task to continue running without any delay.
-Using schedule_timeout_interruptible() resolves the issue by
-correctly setting TASK_UNINTERRUPTIBLE.
-
-Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
----
- include/sys/timer.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/include/sys/timer.h b/include/sys/timer.h
-index 13ef404..2542510 100644
---- a/include/sys/timer.h
-+++ b/include/sys/timer.h
-@@ -35,7 +35,7 @@
- #define ddi_get_lbolt() ((clock_t)jiffies)
- #define ddi_get_lbolt64() ((int64_t)get_jiffies_64())
-
--#define delay(ticks) schedule_timeout((long)(ticks))
-+#define delay(ticks) schedule_timeout_uninterruptible(ticks)
-
- #define SEC_TO_TICK(sec) ((sec) * HZ)
- #define MSEC_TO_TICK(ms) msecs_to_jiffies(ms)
---
-1.8.1.6
-
+++ /dev/null
-diff --git a/config/spl-build.m4 b/config/spl-build.m4
-index 8a8e3ba..da179e3 100644
---- a/config/spl-build.m4
-+++ b/config/spl-build.m4
-@@ -33,6 +33,8 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
- SPL_AC_TASK_CURR
- SPL_AC_CTL_UNNUMBERED
- SPL_AC_CTL_NAME
-+ SPL_AC_VMALLOC_INFO
-+ SPL_AC_PDE_DATA
- SPL_AC_FLS64
- SPL_AC_DEVICE_CREATE
- SPL_AC_5ARGS_DEVICE_CREATE
-@@ -1358,6 +1360,43 @@ AC_DEFUN([SPL_AC_GET_VMALLOC_INFO],
- ])
-
- dnl #
-+dnl # 3.10 API change,
-+dnl # struct vmalloc_info is now declared in linux/vmalloc.h
-+dnl #
-+AC_DEFUN([SPL_AC_VMALLOC_INFO], [
-+ AC_MSG_CHECKING([whether struct vmalloc_info is declared])
-+ SPL_LINUX_TRY_COMPILE([
-+ #include <linux/vmalloc.h>
-+ struct vmalloc_info { void *a; };
-+ ],[
-+ return 0;
-+ ],[
-+ AC_MSG_RESULT(no)
-+ ],[
-+ AC_MSG_RESULT(yes)
-+ AC_DEFINE(HAVE_VMALLOC_INFO, 1, [yes])
-+ ])
-+])
-+
-+dnl #
-+dnl # 3.10 API change,
-+dnl # PDE is replaced by PDE_DATA
-+dnl #
-+AC_DEFUN([SPL_AC_PDE_DATA], [
-+ AC_MSG_CHECKING([whether PDE_DATA() is available])
-+ SPL_LINUX_TRY_COMPILE_SYMBOL([
-+ #include <linux/proc_fs.h>
-+ ], [
-+ PDE_DATA(NULL);
-+ ], [PDE_DATA], [], [
-+ AC_MSG_RESULT(yes)
-+ AC_DEFINE(HAVE_PDE_DATA, 1, [yes])
-+ ],[
-+ AC_MSG_RESULT(no)
-+ ])
-+])
-+
-+dnl #
- dnl # 2.6.17 API change
- dnl # The helper functions first_online_pgdat(), next_online_pgdat(), and
- dnl # next_zone() are introduced to simplify for_each_zone(). These symbols
-diff --git a/include/linux/proc_compat.h b/include/linux/proc_compat.h
-index 434ffa3..7b044e7 100644
---- a/include/linux/proc_compat.h
-+++ b/include/linux/proc_compat.h
-@@ -43,9 +43,6 @@
- #endif
-
- extern struct proc_dir_entry *proc_spl_kstat;
--struct proc_dir_entry *proc_dir_entry_find(struct proc_dir_entry *root,
-- const char *str);
--int proc_dir_entries(struct proc_dir_entry *root);
-
- int spl_proc_init(void);
- void spl_proc_fini(void);
-diff --git a/include/sys/kstat.h b/include/sys/kstat.h
-index 9275c1e..da3c589 100644
---- a/include/sys/kstat.h
-+++ b/include/sys/kstat.h
-@@ -83,6 +83,13 @@ struct kstat_s;
- typedef int kid_t; /* unique kstat id */
- typedef int kstat_update_t(struct kstat_s *, int); /* dynamic update cb */
-
-+typedef struct kstat_module {
-+ char ksm_name[KSTAT_STRLEN+1]; /* module name */
-+ struct list_head ksm_module_list; /* module linkage */
-+ struct list_head ksm_kstat_list; /* list of kstat entries */
-+ struct proc_dir_entry *ksm_proc; /* proc entry */
-+} kstat_module_t;
-+
- typedef struct kstat_s {
- int ks_magic; /* magic value */
- kid_t ks_kid; /* unique kstat ID */
-@@ -102,6 +109,7 @@ typedef struct kstat_s {
- void *ks_private; /* private data */
- kmutex_t ks_lock; /* kstat data lock */
- struct list_head ks_list; /* kstat linkage */
-+ kstat_module_t *ks_owner; /* kstat module linkage */
- } kstat_t;
-
- typedef struct kstat_named_s {
-diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h
-index 9c52d28..34aea2b 100644
---- a/include/sys/vmsystm.h
-+++ b/include/sys/vmsystm.h
-@@ -74,10 +74,12 @@ extern size_t vmem_size(vmem_t *vmp, int typemask);
- #ifndef HAVE_GET_VMALLOC_INFO
- #ifdef CONFIG_MMU
-
-+#ifndef HAVE_VMALLOC_INFO
- struct vmalloc_info {
- unsigned long used;
- unsigned long largest_chunk;
- };
-+#endif
-
- typedef void (*get_vmalloc_info_t)(struct vmalloc_info *);
- extern get_vmalloc_info_t get_vmalloc_info_fn;
-diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c
-index b7e4b94..4e900c0 100644
---- a/module/spl/spl-kstat.c
-+++ b/module/spl/spl-kstat.c
-@@ -33,9 +33,12 @@
- #endif
-
- #define SS_DEBUG_SUBSYS SS_KSTAT
-+#ifndef HAVE_PDE_DATA
-+#define PDE_DATA(x) (PDE(x)->data)
-+#endif
-
--static spinlock_t kstat_lock;
--static struct list_head kstat_list;
-+static kmutex_t kstat_module_lock;
-+static struct list_head kstat_module_list;
- static kid_t kstat_id;
-
- static void
-@@ -348,6 +351,47 @@ static struct seq_operations kstat_seq_ops = {
- .stop = kstat_seq_stop,
- };
-
-+static kstat_module_t *
-+kstat_find_module(char *name)
-+{
-+ kstat_module_t *module;
-+
-+ list_for_each_entry(module, &kstat_module_list, ksm_module_list)
-+ if (strncmp(name, module->ksm_name, KSTAT_STRLEN) == 0)
-+ return (module);
-+
-+ return (NULL);
-+}
-+
-+static kstat_module_t *
-+kstat_create_module(char *name)
-+{
-+ kstat_module_t *module;
-+ struct proc_dir_entry *pde;
-+
-+ pde = proc_mkdir(name, proc_spl_kstat);
-+ if (pde == NULL)
-+ return (NULL);
-+
-+ module = kmem_alloc(sizeof (kstat_module_t), KM_SLEEP);
-+ module->ksm_proc = pde;
-+ strlcpy(module->ksm_name, name, KSTAT_STRLEN+1);
-+ INIT_LIST_HEAD(&module->ksm_kstat_list);
-+ list_add_tail(&module->ksm_module_list, &kstat_module_list);
-+
-+ return (module);
-+
-+}
-+
-+static void
-+kstat_delete_module(kstat_module_t *module)
-+{
-+ ASSERT(list_empty(&module->ksm_kstat_list));
-+ remove_proc_entry(module->ksm_name, proc_spl_kstat);
-+ list_del(&module->ksm_module_list);
-+ kmem_free(module, sizeof(kstat_module_t));
-+}
-+
- static int
- proc_kstat_open(struct inode *inode, struct file *filp)
- {
-@@ -359,7 +403,7 @@ proc_kstat_open(struct inode *inode, struct file *filp)
- return rc;
-
- f = filp->private_data;
-- f->private = PDE(inode)->data;
-+ f->private = PDE_DATA(inode);
-
- return rc;
- }
-@@ -390,10 +434,10 @@ __kstat_create(const char *ks_module, int ks_instance, const char *ks_name,
- if (ksp == NULL)
- return ksp;
-
-- spin_lock(&kstat_lock);
-+ mutex_enter(&kstat_module_lock);
- ksp->ks_kid = kstat_id;
- kstat_id++;
-- spin_unlock(&kstat_lock);
-+ mutex_exit(&kstat_module_lock);
-
- ksp->ks_magic = KS_MAGIC;
- mutex_init(&ksp->ks_lock, NULL, MUTEX_DEFAULT, NULL);
-@@ -456,71 +500,64 @@ EXPORT_SYMBOL(__kstat_create);
- void
- __kstat_install(kstat_t *ksp)
- {
-- struct proc_dir_entry *de_module, *de_name;
-+ kstat_module_t *module;
- kstat_t *tmp;
-- int rc = 0;
-- SENTRY;
--
-- spin_lock(&kstat_lock);
-
-- /* Item may only be added to the list once */
-- list_for_each_entry(tmp, &kstat_list, ks_list) {
-- if (tmp == ksp) {
-- spin_unlock(&kstat_lock);
-- SGOTO(out, rc = -EEXIST);
-- }
-- }
-+ ASSERT(ksp);
-
-- list_add_tail(&ksp->ks_list, &kstat_list);
-- spin_unlock(&kstat_lock);
-+ mutex_enter(&kstat_module_lock);
-
-- de_module = proc_dir_entry_find(proc_spl_kstat, ksp->ks_module);
-- if (de_module == NULL) {
-- de_module = proc_mkdir(ksp->ks_module, proc_spl_kstat);
-- if (de_module == NULL)
-- SGOTO(out, rc = -EUNATCH);
-+ module = kstat_find_module(ksp->ks_module);
-+ if (module == NULL) {
-+ module = kstat_create_module(ksp->ks_module);
-+ if (module == NULL)
-+ goto out;
- }
-
-- de_name = create_proc_entry(ksp->ks_name, 0444, de_module);
-- if (de_name == NULL)
-- SGOTO(out, rc = -EUNATCH);
-+ /*
-+ * Only one entry by this name per-module, on failure the module
-+ * shouldn't be deleted because we know it has at least one entry.
-+ */
-+ list_for_each_entry(tmp, &module->ksm_kstat_list, ks_list)
-+ if (strncmp(tmp->ks_name, ksp->ks_name, KSTAT_STRLEN) == 0)
-+ goto out;
-+
-+ list_add_tail(&ksp->ks_list, &module->ksm_kstat_list);
-
- mutex_enter(&ksp->ks_lock);
-- ksp->ks_proc = de_name;
-- de_name->proc_fops = &proc_kstat_operations;
-- de_name->data = (void *)ksp;
-+ ksp->ks_owner = module;
-+ ksp->ks_proc = proc_create_data(ksp->ks_name, 0444,
-+ module->ksm_proc, &proc_kstat_operations, (void *)ksp);
-+ if (ksp->ks_proc == NULL) {
-+ list_del_init(&ksp->ks_list);
-+ if (list_empty(&module->ksm_kstat_list))
-+ kstat_delete_module(module);
-+ }
- mutex_exit(&ksp->ks_lock);
- out:
-- if (rc) {
-- spin_lock(&kstat_lock);
-- list_del_init(&ksp->ks_list);
-- spin_unlock(&kstat_lock);
-- }
--
-- SEXIT;
-+ mutex_exit(&kstat_module_lock);
- }
- EXPORT_SYMBOL(__kstat_install);
-
- void
- __kstat_delete(kstat_t *ksp)
- {
-- struct proc_dir_entry *de_module;
-+ kstat_module_t *module = ksp->ks_owner;
-
-- spin_lock(&kstat_lock);
-- list_del_init(&ksp->ks_list);
-- spin_unlock(&kstat_lock);
-+ mutex_enter(&kstat_module_lock);
-+ list_del_init(&ksp->ks_list);
-+ mutex_exit(&kstat_module_lock);
-
-- if (ksp->ks_proc) {
-- de_module = ksp->ks_proc->parent;
-- remove_proc_entry(ksp->ks_name, de_module);
-+ if (ksp->ks_proc) {
-+ remove_proc_entry(ksp->ks_name, module->ksm_proc);
-
-- /* Remove top level module directory if it's empty */
-- if (proc_dir_entries(de_module) == 0)
-- remove_proc_entry(de_module->name, de_module->parent);
-+ /* Remove top level module directory if it's empty */
-+ if (list_empty(&module->ksm_kstat_list))
-+ kstat_delete_module(module);
- }
-
- if (!(ksp->ks_flags & KSTAT_FLAG_VIRTUAL))
-- kmem_free(ksp->ks_data, ksp->ks_data_size);
-+ kmem_free(ksp->ks_data, ksp->ks_data_size);
-
- mutex_destroy(&ksp->ks_lock);
- kmem_free(ksp, sizeof(*ksp));
-@@ -533,8 +570,8 @@ int
- spl_kstat_init(void)
- {
- SENTRY;
-- spin_lock_init(&kstat_lock);
-- INIT_LIST_HEAD(&kstat_list);
-+ mutex_init(&kstat_module_lock, NULL, MUTEX_DEFAULT, NULL);
-+ INIT_LIST_HEAD(&kstat_module_list);
- kstat_id = 0;
- SRETURN(0);
- }
-@@ -543,7 +580,8 @@ void
- spl_kstat_fini(void)
- {
- SENTRY;
-- ASSERT(list_empty(&kstat_list));
-+ ASSERT(list_empty(&kstat_module_list));
-+ mutex_destroy(&kstat_module_lock);
- SEXIT;
- }
-
-diff --git a/module/spl/spl-proc.c b/module/spl/spl-proc.c
-index cd4fa1b..b8379d0 100644
---- a/module/spl/spl-proc.c
-+++ b/module/spl/spl-proc.c
-@@ -1120,39 +1120,6 @@ static struct ctl_table spl_root[] = {
- { 0 }
- };
-
--static int
--proc_dir_entry_match(int len, const char *name, struct proc_dir_entry *de)
--{
-- if (de->namelen != len)
-- return 0;
--
-- return !memcmp(name, de->name, len);
--}
--
--struct proc_dir_entry *
--proc_dir_entry_find(struct proc_dir_entry *root, const char *str)
--{
-- struct proc_dir_entry *de;
--
-- for (de = root->subdir; de; de = de->next)
-- if (proc_dir_entry_match(strlen(str), str, de))
-- return de;
--
-- return NULL;
--}
--
--int
--proc_dir_entries(struct proc_dir_entry *root)
--{
-- struct proc_dir_entry *de;
-- int i = 0;
--
-- for (de = root->subdir; de; de = de->next)
-- i++;
--
-- return i;
--}
--
- int
- spl_proc_init(void)
- {
-@@ -1174,11 +1141,11 @@ spl_proc_init(void)
- if (proc_spl_kmem == NULL)
- SGOTO(out, rc = -EUNATCH);
-
-- proc_spl_kmem_slab = create_proc_entry("slab", 0444, proc_spl_kmem);
-+ proc_spl_kmem_slab = proc_create_data("slab", 0444,
-+ proc_spl_kmem, &proc_slab_operations, NULL);
- if (proc_spl_kmem_slab == NULL)
- SGOTO(out, rc = -EUNATCH);
-
-- proc_spl_kmem_slab->proc_fops = &proc_slab_operations;
- #endif /* DEBUG_KMEM */
-
- proc_spl_kstat = proc_mkdir("kstat", proc_spl);
-diff --git a/module/splat/splat-atomic.c b/module/splat/splat-atomic.c
-index df3b38f..f702196 100644
---- a/module/splat/splat-atomic.c
-+++ b/module/splat/splat-atomic.c
-@@ -26,6 +26,7 @@
-
- #include <sys/atomic.h>
- #include <sys/thread.h>
-+#include <linux/slab.h>
- #include "splat-internal.h"
-
- #define SPLAT_ATOMIC_NAME "atomic"
-diff --git a/module/splat/splat-thread.c b/module/splat/splat-thread.c
-index a1e70db..e55acd0 100644
---- a/module/splat/splat-thread.c
-+++ b/module/splat/splat-thread.c
-@@ -26,6 +26,7 @@
-
- #include <sys/thread.h>
- #include <sys/random.h>
-+#include <linux/slab.h>
- #include "splat-internal.h"
-
- #define SPLAT_THREAD_NAME "thread"
-diff --git a/module/splat/splat-time.c b/module/splat/splat-time.c
-index ca60c45..cd513c9 100644
---- a/module/splat/splat-time.c
-+++ b/module/splat/splat-time.c
-@@ -25,6 +25,7 @@
- \*****************************************************************************/
-
- #include <sys/time.h>
-+#include <linux/slab.h>
- #include "splat-internal.h"
-
- #define SPLAT_TIME_NAME "time"
<email>fearedbliss@gentoo.org</email>
<name>Jonathan Vasquez</name>
</maintainer>
- <use>
- <flag name="debug-log">Enable additional diagnostics</flag>
- </use>
<upstream>
<remote-id type="github">zfsonlinux/spl</remote-id>
</upstream>
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-AUTOTOOLS_AUTORECONF="1"
-
-inherit flag-o-matic linux-info linux-mod autotools-utils
-
-if [[ ${PV} == "9999" ]] ; then
- inherit git-2
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
-else
- inherit eutils versionator
- MY_PV=$(replace_version_separator 3 '-')
- SRC_URI="https://github.com/zfsonlinux/${PN}/archive/${PN}-${MY_PV}.tar.gz"
- S="${WORKDIR}/${PN}-${PN}-${MY_PV}"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-DESCRIPTION="The Solaris Porting Layer is a Linux kernel module which provides many of the Solaris kernel APIs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="custom-cflags debug debug-log"
-RESTRICT="test"
-
-COMMON_DEPEND="dev-lang/perl
- virtual/awk"
-
-DEPEND="${COMMON_DEPEND}"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-devel/spl"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="
- !DEBUG_LOCK_ALLOC
- !GRKERNSEC_HIDESYM
- MODULES
- KALLSYMS
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- kernel_is ge 2 6 26 || die "Linux 2.6.26 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 3 8 || die "Linux 3.8 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Workaround for hard coded path
- sed -i "s|/sbin/lsmod|/bin/lsmod|" scripts/check.sh || die
-
- if [ ${PV} != "9999" ]
- then
- # Fix on_each_cpu autotools to work correctly
- epatch "${FILESDIR}/${P}-fix-on_each_cpu-autotools-check.patch"
-
- # Fix soft lockup regression
- epatch "${FILESDIR}/${P}-fix-soft-lockup.patch"
-
- # Fix x86 build failures on Linux 3.4 and later, bug #450646
- epatch "${FILESDIR}/${PN}-0.6.0_rc14-fix-atomic64-checks.patch"
-
- # Fix autotools check that fails on ~ppc64
- epatch "${FILESDIR}/${PN}-0.6.0_rc14-fix-mutex-owner-check.patch"
- fi
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=all
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- $(use_enable debug)
- $(use_enable debug-log)
- )
- autotools-utils_src_configure
-}
-
-src_test() {
- if [[ ! -e /proc/modules ]]
- then
- die "Missing /proc/modules"
- elif [[ $UID -ne 0 ]]
- then
- ewarn "Cannot run make check tests with FEATURES=userpriv."
- ewarn "Skipping make check tests."
- elif grep -q '^spl ' /proc/modules
- then
- ewarn "Cannot run make check tests with module spl loaded."
- ewarn "Skipping make check tests."
- else
- autotools-utils_src_test
- fi
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-AUTOTOOLS_AUTORECONF="1"
-
-inherit flag-o-matic linux-info linux-mod autotools-utils
-
-if [[ ${PV} == "9999" ]] ; then
- inherit git-2
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
-else
- inherit eutils versionator
- MY_PV=$(replace_version_separator 3 '-')
- SRC_URI="https://github.com/zfsonlinux/${PN}/archive/${PN}-${MY_PV}.tar.gz"
- S="${WORKDIR}/${PN}-${PN}-${MY_PV}"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-DESCRIPTION="The Solaris Porting Layer is a Linux kernel module which provides many of the Solaris kernel APIs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="custom-cflags debug debug-log"
-RESTRICT="test"
-
-COMMON_DEPEND="dev-lang/perl
- virtual/awk"
-
-DEPEND="${COMMON_DEPEND}"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-devel/spl"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="
- !DEBUG_LOCK_ALLOC
- !GRKERNSEC_HIDESYM
- MODULES
- KALLSYMS
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- kernel_is ge 2 6 26 || die "Linux 2.6.26 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 3 9 || die "Linux 3.9 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Workaround for hard coded path
- sed -i "s|/sbin/lsmod|/bin/lsmod|" scripts/check.sh || die
-
- if [ ${PV} != "9999" ]
- then
- # Fix x86 build failures on Linux 3.4 and later, bug #450646
- epatch "${FILESDIR}/${P}-fix-atomic64-checks.patch"
-
- # Fix autotools check that fails on ~ppc64
- epatch "${FILESDIR}/${P}-fix-mutex-owner-check.patch"
-
- # Linux 3.9 Support
- epatch "${FILESDIR}/${P}-linux-3.9-compat.patch"
-
- # Free memory under load quickly
- epatch "${FILESDIR}/${P}-no-cond_resched.patch"
- fi
-
- # splat is unnecessary unless we are debugging
- use debug || { sed -e 's/^subdir-m += splat$//' -i "${S}/module/Makefile.in" || die ; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=all
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- $(use_enable debug)
- $(use_enable debug-log)
- )
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install
- dodoc AUTHORS DISCLAIMER README.markdown
-
- # Provide /usr/src/spl symlink for lustre
- dosym "$(basename $(echo "${ED}/usr/src/spl-"*))/${KV_FULL}" /usr/src/spl
-}
-
-src_test() {
- if [[ ! -e /proc/modules ]]
- then
- die "Missing /proc/modules"
- elif [[ $UID -ne 0 ]]
- then
- ewarn "Cannot run make check tests with FEATURES=userpriv."
- ewarn "Skipping make check tests."
- elif grep -q '^spl ' /proc/modules
- then
- ewarn "Cannot run make check tests with module spl loaded."
- ewarn "Skipping make check tests."
- else
- autotools-utils_src_test
- fi
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-AUTOTOOLS_AUTORECONF="1"
-
-inherit flag-o-matic linux-info linux-mod autotools-utils
-
-if [[ ${PV} == "9999" ]] ; then
- inherit git-2
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
-else
- inherit eutils versionator
- MY_PV=$(replace_version_separator 3 '-')
- SRC_URI="https://github.com/zfsonlinux/${PN}/archive/${PN}-${MY_PV}.tar.gz"
- S="${WORKDIR}/${PN}-${PN}-${MY_PV}"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-DESCRIPTION="The Solaris Porting Layer is a Linux kernel module which provides many of the Solaris kernel APIs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="custom-cflags debug debug-log"
-RESTRICT="test"
-
-COMMON_DEPEND="dev-lang/perl
- virtual/awk"
-
-DEPEND="${COMMON_DEPEND}"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-devel/spl"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="
- !DEBUG_LOCK_ALLOC
- !GRKERNSEC_HIDESYM
- MODULES
- KALLSYMS
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- !UIDGID_STRICT_TYPE_CHECKS
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- kernel_is ge 2 6 26 || die "Linux 2.6.26 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 3 10 || die "Linux 3.10 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Workaround for hard coded path
- sed -i "s|/sbin/lsmod|/bin/lsmod|" scripts/check.sh || die
-
- if [ ${PV} != "9999" ]
- then
- # Be more like FreeBSD and Illumos when handling hostids
- epatch "${FILESDIR}/${PN}-0.6.0_rc14-simplify-hostid-logic.patch"
-
- # Block tasks properly
- epatch "${FILESDIR}/${PN}-0.6.1-fix-delay.patch"
-
- # Linux 3.10 Compatibility
- epatch "${FILESDIR}/${PN}-0.6.1-linux-3.10-compat.patch"
-
- # Fix kernel builtin support
- epatch "${FILESDIR}/${PN}-0.6.1-builtin-fix.patch"
-
- # Support recent hardened kernels
- if kernel_is ge 3 8
- then
- epatch "${FILESDIR}/${PN}-0.6.1-constify-ctl_table.patch"
- fi
- fi
-
- # splat is unnecessary unless we are debugging
- use debug || { sed -e 's/^subdir-m += splat$//' -i "${S}/module/Makefile.in" || die ; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=all
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- $(use_enable debug)
- $(use_enable debug-log)
- )
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install
- dodoc AUTHORS DISCLAIMER README.markdown
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/spl" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/spl"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/spl"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/spl" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-AUTOTOOLS_AUTORECONF="1"
-
-inherit flag-o-matic linux-info linux-mod autotools-utils
-
-if [[ ${PV} == "9999" ]] ; then
- inherit git-2
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
-else
- inherit eutils versionator
- MY_PV=$(replace_version_separator 3 '-')
- SRC_URI="https://github.com/zfsonlinux/${PN}/archive/${PN}-${MY_PV}.tar.gz
- https://dev.gentoo.org/~ryao/dist/${PN}-${MY_PV}-p4.tar.xz"
- S="${WORKDIR}/${PN}-${PN}-${MY_PV}"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-DESCRIPTION="The Solaris Porting Layer is a Linux kernel module which provides many of the Solaris kernel APIs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="custom-cflags debug debug-log"
-RESTRICT="test"
-
-COMMON_DEPEND="dev-lang/perl
- virtual/awk"
-
-DEPEND="${COMMON_DEPEND}"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-devel/spl"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="
- !DEBUG_LOCK_ALLOC
- !GRKERNSEC_HIDESYM
- MODULES
- KALLSYMS
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- kernel_is ge 2 6 26 || die "Linux 2.6.26 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 3 14 || die "Linux 3.14 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Workaround for hard coded path
- sed -i "s|/sbin/lsmod|/bin/lsmod|" scripts/check.sh || die
-
- if [ ${PV} != "9999" ]
- then
- # Apply patch set
- EPATCH_SUFFIX="patch" \
- EPATCH_FORCE="yes" \
- epatch "${WORKDIR}/${PN}-${MY_PV}-patches"
- fi
-
- # splat is unnecessary unless we are debugging
- use debug || { sed -e 's/^subdir-m += splat$//' -i "${S}/module/Makefile.in" || die ; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=all
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- $(use_enable debug)
- $(use_enable debug-log)
- )
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install
- dodoc AUTHORS DISCLAIMER README.markdown
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/spl" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/spl"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/spl"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/spl" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-}
+++ /dev/null
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-AUTOTOOLS_AUTORECONF="1"
-
-inherit flag-o-matic linux-info linux-mod autotools-utils
-
-if [[ ${PV} == "9999" ]] ; then
- inherit git-2
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
-else
- inherit eutils versionator
- SRC_URI="https://github.com/zfsonlinux/${PN}/archive/${P}.tar.gz
- https://dev.gentoo.org/~ryao/dist/${P}-patches-${PR}.tar.xz"
- S="${WORKDIR}/${PN}-${P}"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-DESCRIPTION="The Solaris Porting Layer is a Linux kernel module which provides many of the Solaris kernel APIs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="custom-cflags debug debug-log"
-RESTRICT="debug? ( strip ) test"
-
-COMMON_DEPEND="dev-lang/perl
- virtual/awk"
-
-DEPEND="${COMMON_DEPEND}"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-devel/spl"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="
- !DEBUG_LOCK_ALLOC
- !GRKERNSEC_HIDESYM
- MODULES
- KALLSYMS
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- !PAX_SIZE_OVERFLOW
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- kernel_is ge 2 6 26 || die "Linux 2.6.26 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 3 17 || die "Linux 3.17 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Workaround for hard coded path
- sed -i "s|/sbin/lsmod|/bin/lsmod|" "${S}/scripts/check.sh" || \
- die "Cannot patch check.sh"
-
- if [ ${PV} != "9999" ]
- then
- # Apply patch set
- EPATCH_SUFFIX="patch" \
- EPATCH_FORCE="yes" \
- epatch "${WORKDIR}/${P}-patches"
- fi
-
- # splat is unnecessary unless we are debugging
- use debug || { sed -e 's/^subdir-m += splat$//' -i "${S}/module/Makefile.in" || die ; }
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=all
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- $(use_enable debug)
- $(use_enable debug-log)
- )
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
- dodoc AUTHORS DISCLAIMER README.markdown
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/spl" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/spl"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/spl"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/spl" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-}
+++ /dev/null
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-AUTOTOOLS_AUTORECONF="1"
-
-inherit flag-o-matic linux-info linux-mod autotools-utils
-
-if [[ ${PV} == "9999" ]] ; then
- inherit git-2
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
-else
- inherit eutils versionator
- SRC_URI="https://github.com/zfsonlinux/${PN}/archive/${P}.tar.gz"
- S="${WORKDIR}/${PN}-${P}"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-DESCRIPTION="The Solaris Porting Layer is a Linux kernel module which provides many of the Solaris kernel APIs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="custom-cflags debug debug-log"
-RESTRICT="debug? ( strip ) test"
-
-COMMON_DEPEND="dev-lang/perl
- virtual/awk"
-
-DEPEND="${COMMON_DEPEND}"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-devel/spl"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="
- !DEBUG_LOCK_ALLOC
- !GRKERNSEC_HIDESYM
- MODULES
- KALLSYMS
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- !PAX_SIZE_OVERFLOW
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 1 || die "Linux 4.1 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Workaround for hard coded path
- sed -i "s|/sbin/lsmod|/bin/lsmod|" "${S}/scripts/check.sh" || \
- die "Cannot patch check.sh"
-
- # splat is unnecessary unless we are debugging
- use debug || { sed -e 's/^subdir-m += splat$//' -i "${S}/module/Makefile.in" || die ; }
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=all
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- $(use_enable debug)
- )
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
- dodoc AUTHORS DISCLAIMER README.markdown
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/spl" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/spl"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/spl"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/spl" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-if [[ ${PV} == "9999" ]] ; then
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/${P}.tar.gz"
- KEYWORDS=" ~amd64"
-fi
-
-inherit flag-o-matic linux-info linux-mod autotools-utils
-
-DESCRIPTION="The Solaris Porting Layer is a Linux kernel module which provides many of the Solaris kernel APIs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="custom-cflags debug"
-RESTRICT="debug? ( strip ) test"
-
-COMMON_DEPEND="dev-lang/perl
- virtual/awk"
-
-DEPEND="${COMMON_DEPEND}"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-devel/spl"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-DOCS=( AUTHORS DISCLAIMER )
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="
- !DEBUG_LOCK_ALLOC
- MODULES
- KALLSYMS
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- !PAX_SIZE_OVERFLOW
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 12 || die "Linux 4.12 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Workaround for hard coded path
- sed -i "s|/sbin/lsmod|/bin/lsmod|" "${S}/scripts/check.sh" || \
- die "Cannot patch check.sh"
-
- # splat is unnecessary unless we are debugging
- use debug || { sed -e 's/^subdir-m += splat$//' -i "${S}/module/Makefile.in" || die ; }
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=all
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- $(use_enable debug)
- )
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/spl" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/spl"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/spl"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/spl" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-}
inherit flag-o-matic linux-info linux-mod autotools-utils
-DESCRIPTION="The Solaris Porting Layer is a Linux kernel module which provides many of the Solaris kernel APIs"
+DESCRIPTION="The Solaris Porting Layer provides many of the Solaris kernel APIs"
HOMEPAGE="http://zfsonlinux.org/"
LICENSE="GPL-2"
+++ /dev/null
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-AUTOTOOLS_AUTORECONF="1"
-
-inherit flag-o-matic linux-info linux-mod autotools-utils
-
-if [[ ${PV} == "9999" ]] ; then
- inherit git-2
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
-else
- inherit eutils versionator
- SRC_URI="https://github.com/zfsonlinux/${PN}/archive/${P}.tar.gz"
- S="${WORKDIR}/${PN}-${P}"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-DESCRIPTION="The Solaris Porting Layer is a Linux kernel module which provides many of the Solaris kernel APIs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="custom-cflags debug"
-RESTRICT="debug? ( strip ) test"
-
-COMMON_DEPEND="dev-lang/perl
- virtual/awk"
-
-DEPEND="${COMMON_DEPEND}"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-devel/spl"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="
- !DEBUG_LOCK_ALLOC
- !GRKERNSEC_HIDESYM
- MODULES
- KALLSYMS
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- !PAX_SIZE_OVERFLOW
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 3 || die "Linux 4.3 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Workaround for hard coded path
- sed -i "s|/sbin/lsmod|/bin/lsmod|" "${S}/scripts/check.sh" || \
- die "Cannot patch check.sh"
-
- # splat is unnecessary unless we are debugging
- use debug || { sed -e 's/^subdir-m += splat$//' -i "${S}/module/Makefile.in" || die ; }
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=all
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- $(use_enable debug)
- )
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
- dodoc AUTHORS DISCLAIMER README.markdown
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/spl" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/spl"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/spl"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/spl" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-}
+++ /dev/null
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-if [[ ${PV} == "9999" ]] ; then
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/${P}.tar.gz
- https://dev.gentoo.org/~ryao/dist/${P}-patches-p0.tar.xz"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-inherit flag-o-matic linux-info linux-mod autotools-utils
-
-DESCRIPTION="The Solaris Porting Layer is a Linux kernel module which provides many of the Solaris kernel APIs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="custom-cflags debug"
-RESTRICT="debug? ( strip ) test"
-
-COMMON_DEPEND="dev-lang/perl
- virtual/awk"
-
-DEPEND="${COMMON_DEPEND}"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-devel/spl"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-DOCS=( AUTHORS DISCLAIMER )
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="
- !DEBUG_LOCK_ALLOC
- !GRKERNSEC_RANDSTRUCT
- KALLSYMS
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 4 || die "Linux 4.4 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- if [ ${PV} != "9999" ]
- then
- # Apply patch set
- EPATCH_SUFFIX="patch" \
- EPATCH_FORCE="yes" \
- epatch "${WORKDIR}/${P}-patches"
- fi
-
- # Workaround for hard coded path
- sed -i "s|/sbin/lsmod|/bin/lsmod|" "${S}/scripts/check.sh" || \
- die "Cannot patch check.sh"
-
- # splat is unnecessary unless we are debugging
- use debug || { sed -e 's/^subdir-m += splat$//' -i "${S}/module/Makefile.in" || die ; }
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=all
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- $(use_enable debug)
- )
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/spl" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/spl"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/spl"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/spl" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-}
+++ /dev/null
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-if [[ ${PV} == "9999" ]] ; then
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/${P}.tar.gz"
- KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
-fi
-
-inherit flag-o-matic linux-info linux-mod autotools-utils
-
-DESCRIPTION="The Solaris Porting Layer is a Linux kernel module which provides many of the Solaris kernel APIs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="custom-cflags debug"
-RESTRICT="debug? ( strip ) test"
-
-COMMON_DEPEND="dev-lang/perl
- virtual/awk"
-
-DEPEND="${COMMON_DEPEND}"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-devel/spl"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-DOCS=( AUTHORS DISCLAIMER )
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="
- !DEBUG_LOCK_ALLOC
- MODULES
- KALLSYMS
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- !PAX_SIZE_OVERFLOW
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 3 || die "Linux 4.3 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Workaround for hard coded path
- sed -i "s|/sbin/lsmod|/bin/lsmod|" "${S}/scripts/check.sh" || \
- die "Cannot patch check.sh"
-
- # splat is unnecessary unless we are debugging
- use debug || { sed -e 's/^subdir-m += splat$//' -i "${S}/module/Makefile.in" || die ; }
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=all
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- $(use_enable debug)
- )
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/spl" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/spl"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/spl"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/spl" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-}
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
inherit flag-o-matic linux-info linux-mod autotools-utils
-DESCRIPTION="The Solaris Porting Layer is a Linux kernel module which provides many of the Solaris kernel APIs"
+DESCRIPTION="The Solaris Porting Layer provides many of the Solaris kernel APIs"
HOMEPAGE="http://zfsonlinux.org/"
LICENSE="GPL-2"
+++ /dev/null
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-if [[ ${PV} == "9999" ]] ; then
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/${P}.tar.gz"
- KEYWORDS=" ~amd64"
-fi
-
-inherit flag-o-matic linux-info linux-mod autotools-utils
-
-DESCRIPTION="The Solaris Porting Layer is a Linux kernel module which provides many of the Solaris kernel APIs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="custom-cflags debug"
-RESTRICT="debug? ( strip ) test"
-
-COMMON_DEPEND="dev-lang/perl
- virtual/awk"
-
-DEPEND="${COMMON_DEPEND}"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-devel/spl"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-DOCS=( AUTHORS DISCLAIMER )
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="
- !DEBUG_LOCK_ALLOC
- MODULES
- KALLSYMS
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- !PAX_SIZE_OVERFLOW
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 3 || die "Linux 4.3 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Workaround for hard coded path
- sed -i "s|/sbin/lsmod|/bin/lsmod|" "${S}/scripts/check.sh" || \
- die "Cannot patch check.sh"
-
- # splat is unnecessary unless we are debugging
- use debug || { sed -e 's/^subdir-m += splat$//' -i "${S}/module/Makefile.in" || die ; }
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=all
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- $(use_enable debug)
- )
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/spl" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/spl"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/spl"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/spl" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-}
+++ /dev/null
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-if [[ ${PV} == "9999" ]] ; then
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/${P}.tar.gz"
- KEYWORDS=" ~amd64"
-fi
-
-inherit flag-o-matic linux-info linux-mod autotools-utils
-
-DESCRIPTION="The Solaris Porting Layer is a Linux kernel module which provides many of the Solaris kernel APIs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="custom-cflags debug"
-RESTRICT="debug? ( strip ) test"
-
-COMMON_DEPEND="dev-lang/perl
- virtual/awk"
-
-DEPEND="${COMMON_DEPEND}"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-devel/spl"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-DOCS=( AUTHORS DISCLAIMER )
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="
- !DEBUG_LOCK_ALLOC
- MODULES
- KALLSYMS
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- !PAX_SIZE_OVERFLOW
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 5 || die "Linux 4.5 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Workaround for hard coded path
- sed -i "s|/sbin/lsmod|/bin/lsmod|" "${S}/scripts/check.sh" || \
- die "Cannot patch check.sh"
-
- # splat is unnecessary unless we are debugging
- use debug || { sed -e 's/^subdir-m += splat$//' -i "${S}/module/Makefile.in" || die ; }
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=all
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- $(use_enable debug)
- )
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/spl" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/spl"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/spl"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/spl" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-}
+++ /dev/null
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-if [[ ${PV} == "9999" ]] ; then
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/${P}.tar.gz"
- KEYWORDS=" ~amd64"
-fi
-
-inherit flag-o-matic linux-info linux-mod autotools-utils
-
-DESCRIPTION="The Solaris Porting Layer is a Linux kernel module which provides many of the Solaris kernel APIs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="custom-cflags debug"
-RESTRICT="debug? ( strip ) test"
-
-COMMON_DEPEND="dev-lang/perl
- virtual/awk"
-
-DEPEND="${COMMON_DEPEND}"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-devel/spl"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-DOCS=( AUTHORS DISCLAIMER )
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="
- !DEBUG_LOCK_ALLOC
- MODULES
- KALLSYMS
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- !PAX_SIZE_OVERFLOW
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 6 || die "Linux 4.6 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Workaround for hard coded path
- sed -i "s|/sbin/lsmod|/bin/lsmod|" "${S}/scripts/check.sh" || \
- die "Cannot patch check.sh"
-
- # splat is unnecessary unless we are debugging
- use debug || { sed -e 's/^subdir-m += splat$//' -i "${S}/module/Makefile.in" || die ; }
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=all
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- $(use_enable debug)
- )
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/spl" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/spl"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/spl"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/spl" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-}
+++ /dev/null
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-if [[ ${PV} == "9999" ]] ; then
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/${P}.tar.gz"
- KEYWORDS=" ~amd64"
-fi
-
-inherit flag-o-matic linux-info linux-mod autotools-utils
-
-DESCRIPTION="The Solaris Porting Layer is a Linux kernel module which provides many of the Solaris kernel APIs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="custom-cflags debug"
-RESTRICT="debug? ( strip ) test"
-
-COMMON_DEPEND="dev-lang/perl
- virtual/awk"
-
-DEPEND="${COMMON_DEPEND}"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-devel/spl"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-DOCS=( AUTHORS DISCLAIMER )
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="
- !DEBUG_LOCK_ALLOC
- MODULES
- KALLSYMS
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- !PAX_SIZE_OVERFLOW
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 8 || die "Linux 4.8 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Workaround for hard coded path
- sed -i "s|/sbin/lsmod|/bin/lsmod|" "${S}/scripts/check.sh" || \
- die "Cannot patch check.sh"
-
- # splat is unnecessary unless we are debugging
- use debug || { sed -e 's/^subdir-m += splat$//' -i "${S}/module/Makefile.in" || die ; }
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=all
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- $(use_enable debug)
- )
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/spl" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/spl"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/spl"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/spl" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-if [[ ${PV} == "9999" ]] ; then
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/${P}.tar.gz"
- KEYWORDS=" ~amd64"
-fi
-
-inherit flag-o-matic linux-info linux-mod autotools-utils
-
-DESCRIPTION="The Solaris Porting Layer is a Linux kernel module which provides many of the Solaris kernel APIs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="custom-cflags debug"
-RESTRICT="debug? ( strip ) test"
-
-COMMON_DEPEND="dev-lang/perl
- virtual/awk"
-
-DEPEND="${COMMON_DEPEND}"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-devel/spl"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-DOCS=( AUTHORS DISCLAIMER )
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="
- !DEBUG_LOCK_ALLOC
- MODULES
- KALLSYMS
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- !PAX_SIZE_OVERFLOW
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 10 || die "Linux 4.10 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Workaround for hard coded path
- sed -i "s|/sbin/lsmod|/bin/lsmod|" "${S}/scripts/check.sh" || \
- die "Cannot patch check.sh"
-
- # splat is unnecessary unless we are debugging
- use debug || { sed -e 's/^subdir-m += splat$//' -i "${S}/module/Makefile.in" || die ; }
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=all
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- $(use_enable debug)
- )
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/spl" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/spl"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/spl"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/spl" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-if [[ ${PV} == "9999" ]] ; then
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/${P}.tar.gz"
- KEYWORDS=" ~amd64"
-fi
-
-inherit flag-o-matic linux-info linux-mod autotools-utils
-
-DESCRIPTION="The Solaris Porting Layer is a Linux kernel module which provides many of the Solaris kernel APIs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="custom-cflags debug"
-RESTRICT="debug? ( strip ) test"
-
-COMMON_DEPEND="dev-lang/perl
- virtual/awk"
-
-DEPEND="${COMMON_DEPEND}"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-devel/spl"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-DOCS=( AUTHORS DISCLAIMER )
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="
- !DEBUG_LOCK_ALLOC
- MODULES
- KALLSYMS
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- !PAX_SIZE_OVERFLOW
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 12 || die "Linux 4.12 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Workaround for hard coded path
- sed -i "s|/sbin/lsmod|/bin/lsmod|" "${S}/scripts/check.sh" || \
- die "Cannot patch check.sh"
-
- # splat is unnecessary unless we are debugging
- use debug || { sed -e 's/^subdir-m += splat$//' -i "${S}/module/Makefile.in" || die ; }
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=all
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- $(use_enable debug)
- )
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/spl" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/spl"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/spl"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/spl" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-if [[ ${PV} == "9999" ]] ; then
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/${P}.tar.gz"
- KEYWORDS=" ~amd64"
-fi
-
-inherit flag-o-matic linux-info linux-mod autotools-utils
-
-DESCRIPTION="The Solaris Porting Layer is a Linux kernel module which provides many of the Solaris kernel APIs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="custom-cflags debug"
-RESTRICT="debug? ( strip ) test"
-
-COMMON_DEPEND="dev-lang/perl
- virtual/awk"
-
-DEPEND="${COMMON_DEPEND}"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-devel/spl"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-DOCS=( AUTHORS DISCLAIMER )
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="
- !DEBUG_LOCK_ALLOC
- MODULES
- KALLSYMS
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- !PAX_SIZE_OVERFLOW
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 12 || die "Linux 4.12 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Workaround for hard coded path
- sed -i "s|/sbin/lsmod|/bin/lsmod|" "${S}/scripts/check.sh" || \
- die "Cannot patch check.sh"
-
- # splat is unnecessary unless we are debugging
- use debug || { sed -e 's/^subdir-m += splat$//' -i "${S}/module/Makefile.in" || die ; }
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=all
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- $(use_enable debug)
- )
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/spl" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/spl"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/spl"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/spl" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-}
+++ /dev/null
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-if [[ ${PV} == "9999" ]] ; then
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/${P}.tar.gz"
- KEYWORDS=" ~amd64"
-fi
-
-inherit flag-o-matic linux-info linux-mod autotools-utils
-
-DESCRIPTION="The Solaris Porting Layer is a Linux kernel module which provides many of the Solaris kernel APIs"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="custom-cflags debug"
-RESTRICT="debug? ( strip ) test"
-
-COMMON_DEPEND="dev-lang/perl
- virtual/awk"
-
-DEPEND="${COMMON_DEPEND}"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-devel/spl"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-DOCS=( AUTHORS DISCLAIMER )
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="
- !DEBUG_LOCK_ALLOC
- MODULES
- KALLSYMS
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- !PAX_SIZE_OVERFLOW
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 13 || die "Linux 4.13 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Workaround for hard coded path
- sed -i "s|/sbin/lsmod|/bin/lsmod|" "${S}/scripts/check.sh" || \
- die "Cannot patch check.sh"
-
- # splat is unnecessary unless we are debugging
- use debug || { sed -e 's/^subdir-m += splat$//' -i "${S}/module/Makefile.in" || die ; }
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=all
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- $(use_enable debug)
- )
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/spl" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/spl"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/spl"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/spl" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-}
inherit flag-o-matic linux-info linux-mod autotools-utils
-DESCRIPTION="The Solaris Porting Layer is a Linux kernel module which provides many of the Solaris kernel APIs"
+DESCRIPTION="The Solaris Porting Layer provides many of the Solaris kernel APIs"
HOMEPAGE="http://zfsonlinux.org/"
LICENSE="GPL-2"
inherit flag-o-matic linux-info linux-mod autotools-utils
-DESCRIPTION="The Solaris Porting Layer is a Linux kernel module which provides many of the Solaris kernel APIs"
+DESCRIPTION="The Solaris Porting Layer provides many of the Solaris kernel APIs"
HOMEPAGE="http://zfsonlinux.org/"
LICENSE="GPL-2"