diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-kernel/spl |
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-kernel/spl')
33 files changed, 3678 insertions, 0 deletions
diff --git a/sys-kernel/spl/Manifest b/sys-kernel/spl/Manifest new file mode 100644 index 000000000000..5f0dc6c8bbe6 --- /dev/null +++ b/sys-kernel/spl/Manifest @@ -0,0 +1,55 @@ +AUX spl-0.6.0_rc13-fix-on_each_cpu-autotools-check.patch 1508 SHA256 1ef61882e689ed1182b0e77a3b27ba108f18fccff7311462d9c8aef29dfa9056 SHA512 b9bf99b52f3135cb5ae017409ad773e7741536ed6c7181cccb8d97aa627a000417b24971818894dbfa0158a81f4a1be7a9627896b69d4f13988a99f1a39c0bfe WHIRLPOOL 9356a518a1d4a661c4a706347d00b2ec2873198fab379d5a644dde0fc4749f43a9ee542bcf65884de25b97a0e75668a2bd741ce4878ac80c398346eef4b55884 +AUX spl-0.6.0_rc13-fix-soft-lockup.patch 6154 SHA256 85173dcdd261f6aebee9e04098201c58164a74ba01d4a8775d6fb3c7c197c69c SHA512 bbc4d30be0f4425cc1f6076f1ed8d572a8255052f194ad47bde7a9b837689786dcf131326d50f8d4e23d8f0bbf79ce438c273fa33f7c98cdf0bb94c4673c4a0d WHIRLPOOL c4a7efb0858a92da466a69db14f4559188a7f731da7eeaf4f17470a17acb60d81da41c22b6801116d23eb71e4c449097f2ce2af386fd6c3aa915ef7718f49dae +AUX spl-0.6.0_rc14-fix-atomic64-checks.patch 2327 SHA256 f3254d8c739ddd013ab99619e11263b5591058012cc9da0c066f60da7d3d52ad SHA512 90e2874904600ad191eb594b9ace2ab85c01943b1c5e190fc89b0b91e322aa30a4a32ecd8a407c14b9f1a103676c9956ce03ae5b7ebbd4ee7b962e86b7565245 WHIRLPOOL 59fb9f8544b1e7698e130985f3b95ad0ff419f8abffc705216f6236ac042b16a1bb7dafda586fed51d6fe2761b10e584f675a03b06a89ca503f6e92e9af87f58 +AUX spl-0.6.0_rc14-fix-mutex-owner-check.patch 997 SHA256 7060f161cca637085f0f102a497e26246474bb7239506f7e66cd38b524c711ab SHA512 82b40b9cb92ec3be6b3d22865f807b1925cc273af4bbe798391ce59db044ff0a4b1db48a16c407eee9be48a7c5a92014cb3c2417c1c8783dc2339c3763b5ee44 WHIRLPOOL 3b6deb69e815695ed3fd4100dad27235646563269138cd1abe94084bdd7f5465789c1ee70ed2bc4a8ece5612342c86f57a148571d3b3de5d4a7472d67e8dd4a2 +AUX spl-0.6.0_rc14-linux-3.9-compat.patch 6437 SHA256 830181596f6f1248f304185d6a9016439a09123a08c2d275c7a204ad7240648e SHA512 ea728aa00dfff1e0cf7a433547700a8a435a7eb5a0f3761ab9e133441ccc24aa867df952f00002aba4b587397722b04c015eae82a7e9b523253b09a0ff4cccce WHIRLPOOL 5cb867433c18ca6fb1d1a5a63ef5e875277af53135293b1032dca161488ca66063d5f3783a08e12efe7d4c10dc25970190ab0f29d18f4774db7dca273101576f +AUX spl-0.6.0_rc14-no-cond_resched.patch 1212 SHA256 d561310b6941104190c65dd8864250c3405338cb752e41d8220797c81d4a7ab2 SHA512 a68afca7da8948a73e00a774c226797451dfaf071be0fe0d18382681390640d680c49c2ee306a1c71b2b412b0766f7724cb9c14d9cbbd954ec77e4f37151e68a WHIRLPOOL 6928505289ef7a4324eede4d2de9464ad687cc3bb0767e164951a100927744817c243b058059f00934974ad4be10d38b8995ecb02a27785ca8e85627130765b8 +AUX spl-0.6.0_rc14-simplify-hostid-logic.patch 5604 SHA256 1d8c48e5f9a0df8dc2691f2e861f304fd003ae03e5b47fd0221632a584317188 SHA512 279c9616ac6311cc51a0f052eabd873418e6d599c3ce22d02e777ad0df0f416bf27b04d1f37a094878ad20070a2cc8a1c9b52ac23f74416c05a7c5a565cf0c20 WHIRLPOOL 3763272378ca15e523546637d697c2ea151b17a1714a1e966324dd1b418ac8fe412221d36f680a4de2015efdee75774824db3e5c7371cd3a00155624c517b054 +AUX spl-0.6.1-builtin-fix.patch 742 SHA256 32e7f741a73f6c644fd691a72db927d90ee9f5a4a1398b7da8a08c535ca9a042 SHA512 c40ff6a8cdef34aa3ae595042ba421b7a56a2d620595b1994de8b7c19153d0fa0af54cdb8bb183300111e2be799389b8d4eb4cc31849f3010ca218ea26c67865 WHIRLPOOL 67b14ae3278cce4a55ff2d58b129448902d9d41179cd0ac7b625bfacd957a27ed102bcf2979390bf360022696b6f64113353e3508aefada441eb02d1f5b6cae7 +AUX spl-0.6.1-constify-ctl_table.patch 1545 SHA256 46e53c4d52a94c982419933210f8d8248b0a7c2c8f5ba0fa2085a21942cd0fe4 SHA512 4406463a71081bd0e47c4867f63b58eed5913c46fcdcf4d55b391c6aac2dfc4f27a90c0a2bc9a1a3c46d2397cf2cba115d6d8e792f17914c70e6f4ba96e3a1ae WHIRLPOOL 7c9c77b5c53b118ae8320c0d7e9791ce2b40dbee4e951a244d0f359b3527049f8fd5b761f4e75b9b61d76451627b0a730df7a89cc5b0ae165cdb0580fadd1ce0 +AUX spl-0.6.1-fix-delay.patch 1159 SHA256 0cda36204ca959eab3f5ffbf898830c15c5378be6347121834bee1672f137354 SHA512 2a2481f620c0db033530c6ad69f54b42bb3a0c8e25f47683a4f04f8fb3b26764538a4940e50fd78299e628c69b342f8c46d19eb5a0403ef9ca53caf6016819fe WHIRLPOOL c3584a0da3d80c1954fe5b84690f06a7aeb882cbe047acab6fac30bd637cc23865ef227f8af09dc5a83a93a7101550a83ab375ebde45637a85172a05b147261a +AUX spl-0.6.1-linux-3.10-compat.patch 11835 SHA256 8e6cc3ecf7e8cb662148d3af2771949ee80726fcf3de2c543a9031b109222dce SHA512 5632532c8361d8bbe2776c8d28c5825925a61f844af6016970058644f3707990f48508b4f041039eee7b0b5ac0af0edb51c6dcca883671865568da9d0bfb7206 WHIRLPOOL 06d20aa7320a554fb48a602a9ea560efe1998b03f9509a4d86c6975df69f15b64081ea57226b5fba4ce059915151eb88c67f50051524e9e3108f47787afffce8 +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 +EBUILD spl-0.6.0_rc13-r2.ebuild 2640 SHA256 5618eb9e561d7e9de3d1cd859ad88783de706184d88c3f57c4f2969d53e72327 SHA512 40bf49e792a9f3d7bf2e35c4dd5c6ed6840f03fc2b72b9514fd7058d7cd794211a5bb4ab41c6639be7ac7159ad8749d91ac7c1b146359d7fef16d371648d3998 WHIRLPOOL 17c7d32ca672058c05bcce093647f892018be641b1047b95fb3c07873f5483ca1f28510e09f71737bee43e822de2d95192aa3d958350b6c75e05be7fa4f5e1a5 +EBUILD spl-0.6.0_rc14-r3.ebuild 2926 SHA256 de564fb1f3ddfed9f02c603239697f255e500c314efc9309ae1028ac33f92b3b SHA512 a72dbf022c93656063efcfbe78ba8c1fffc55cbd13d1535bd97de1fd22591c93b52edd6ac5b71ab549c502596a7024f21359f4b3227480f87719546b7fa1c787 WHIRLPOOL fa03c2276f77e18d4bcaffcfdb2cf455c3fb2e27018d2497f7e8489e6b0a284a7db39db7c34158d95610e13facdb1762a6ab7dadf01432ab03de4eb7d794c730 +EBUILD spl-0.6.1-r3.ebuild 3093 SHA256 695f1f44b15d038dcb7a76ac57314381f622af8d72bffea9520034c8da0498da SHA512 322eb4cc68c360636f4b2db76697180a9d0ec8afe31f9a6fd00a5ff21817ae49ffa42c1eb73e7e175f8745a489ee5a843a71def1a8d234104331865552f53ad5 WHIRLPOOL 8fefec7b6553136a5cf4a8f8df22ab837085c76400d2b4a1aaaf8888d05c52605b8b440b22d52359c151f7397e593a4cc343e11bf770f656848f82f0e922fbdd +EBUILD spl-0.6.2-r5.ebuild 2729 SHA256 5e17c20fec94efb4134d09c5eefefdba47f86b84b5d965bf7c2cf41b0da4da9d SHA512 16d98df88cefbe3146a49c452e32a94093344d0585c195d771b1b63da4adf6ff7c7df5f76999638fbbbc5cb7b851a2ce1e605e288e034ffbde05cb37063d3c26 WHIRLPOOL 5d4451eccf90c0817947411facf99c775d9d1e3e72647f37903748aec9b7b42a6f215530a922d9573fe1884299537b49441407e3501376c7513057e5a963192f +EBUILD spl-0.6.3-r1.ebuild 3040 SHA256 f8ddc586c8107f3b522f219b2f9269831217a1eefdeb0acaf8647dc32e77cc46 SHA512 dd2ebd265f436534fde8873af724d196993ffb080c6ddacd0455010fcf1bad2d2fae9c3b976cae33dfc8acef9af2f07cb14562551964ff6ec8329fc54bdd52ea WHIRLPOOL 3bea884cafd2663a73895eeb7707734add3a27d9017ec69894e86958f20d15e7d2810bfba05e128ca7ead2add78434b464a86263a9a37e5cbf2b86b86fc89795 +EBUILD spl-0.6.4.2.ebuild 2811 SHA256 6b04b3d5049e2d4502cef30ac0bdeb1adcdb849fe9a868091ff98b18f614a1fe SHA512 9c5cf319206f6114ec18adec969558e36ee2aa4deb478775c6c091ac3c645414a0b58cde4a805e56b92c775aae942920a6d901806470f48279a5827ea45e6930 WHIRLPOOL 9ece85b09cd95b44c1c7eb6c4ee9b7af5f7f832746445f2f652844fe3e412cc7d286e9e5c0a66fc2a42d36e256daec2e007d9bae170748340e7b22c9c7fd21dc +EBUILD spl-0.6.5.10.ebuild 2717 SHA256 e7587d6d038cc443e1a9b551b94e23018dff427c903bafe635e64505169fef06 SHA512 13cea0c1dfe684bebb4783dc0c655278a7a9903402a738c05238de66c131edf328834070adfc8d303949560f8d62eff07a5d9f321bdda45c002bcc64dd5d3431 WHIRLPOOL a4d74dadc6ebc4c768a350f27365b6c7fce5172df7743c81c64f8716074d3159efc2e71040e828feceb0554a8d226c47638ab56b406be7f867864b7a3d6c83fd +EBUILD spl-0.6.5.11.ebuild 2717 SHA256 e7587d6d038cc443e1a9b551b94e23018dff427c903bafe635e64505169fef06 SHA512 13cea0c1dfe684bebb4783dc0c655278a7a9903402a738c05238de66c131edf328834070adfc8d303949560f8d62eff07a5d9f321bdda45c002bcc64dd5d3431 WHIRLPOOL a4d74dadc6ebc4c768a350f27365b6c7fce5172df7743c81c64f8716074d3159efc2e71040e828feceb0554a8d226c47638ab56b406be7f867864b7a3d6c83fd +EBUILD spl-0.6.5.2.ebuild 2801 SHA256 be2e708b0bc6f78706254fafb5e6b28b108273a447f389085c58eae2a8a94828 SHA512 5c61d3c433e0f979d01611d465058395a0b33578bdb35553353946d91ec0634ee2abdea9166d85e687e00dd07477912881e3329f8b63b75521b24a22b51cb7c5 WHIRLPOOL a1a2f285e1bf780c932141d5666b513850679a34055f518cfceb7c9309d1f734e0c83e5f65b748df111983e2148dcd80390bbe8bf9c0cb4f09a5891938d29ae0 +EBUILD spl-0.6.5.3-r1.ebuild 2932 SHA256 742fcc066a6649e05a8320f18c21f07b0962103bbe1611011c82332fe607a61c SHA512 d7651e16a8c33b56fac28c40cc7ea9d53f975dba4da1af820c678c4531940a9a0eb1159dd017deb3c52676e0b0f3669e670a067fd87a76e9b98a345c9a10045d WHIRLPOOL ddaab11b311934d15222c1400757e17fb17370e69980725d7757d84453b0af6dda8a9e072424f7db4df761275e66458e59300da8a3b457af192020b337289ff6 +EBUILD spl-0.6.5.3.ebuild 2731 SHA256 3d5b803bea8409f09a99c21e97193e85e473a8e0da3b943550c3d99c6ac6badc SHA512 e4e8547992095143da2f3c7027fc8798293b6b9119188af7b6ac724941446e58ea6094506a67eb36f434a014a0a2b313e6e81205da5d445ab49b0103d796b233 WHIRLPOOL 225d7a30a939d8237ad82600e2295f5abc1c5aec82327285761a2038a1327cf15208daa18958cb2ad46a81688d30ff867e20097b59df41b4555be1cc2825dfbe +EBUILD spl-0.6.5.4-r1.ebuild 2938 SHA256 1bec23d12beedf7ff3a09dbc3c653d64adccfab12e4b0ad6a1ab2242ec772aa8 SHA512 6ad88c61234a963318e6b0a9db5009788ac9a829dbcfda5e18c807a19e12b5a8ead15a0b1d501fd4db1f3dfd2227390302f8a7d84fddaa5e214cfe62a3c29b0c WHIRLPOOL 9fc47d6066d498d400cd547d91ad3eef8f895cbadea7c6f096176bb91f7c2da960313ba2a742080d3b5743c1f9b9e9759930e7cdb6345a0885c994e8cbc26fe0 +EBUILD spl-0.6.5.4.ebuild 2715 SHA256 b83d7c9fc2da663f4c51badf4f6a266187b4d089c13825c6c60ac22f357cda16 SHA512 2e01e409044ac381365609abe8f218b8ab92cf24e39d9e0de9cf9deb0368c18e34384b31b9b766e2dbe711c14054968e40d7d568c340b66e6f6e8b0233076428 WHIRLPOOL 6469c5aed67f9d5e9e781b8e3a3569725b1d8d5fe605843a1b73d31d32180f5f83197b08589851bffbcaefe9c8cb227563fd79a9c0bca09373722c41edc586b3 +EBUILD spl-0.6.5.6.ebuild 2715 SHA256 3173a1c0168df300395681819e527280637051735000b2b617abd0c92f9c65af SHA512 1c99c953467b3a0928755688f9fb79765d3aa6a5e554c97be4a96f9cc5315930696a333e7a5e4e77db4e090fe13538b83d7fbb69265ab7fff04991b2899b1aa4 WHIRLPOOL b617d0a738bcef907b762a569a6b3f97c0a4a7659c8578d86fe9c6cb9215e41fdc18e47993b4294d85c5575ebf75ea245e07f1eae8d2d92d1f5971975ef773a8 +EBUILD spl-0.6.5.7.ebuild 2715 SHA256 0532097b0c93dc8db95e4afa2f31d1e4c24e2ff09fa396f61f889ac6c5c6e486 SHA512 cb1aabd8912bf6de3256ef0ac233df8004a6d60a39514b72def60255038a410fe8650368ae052fd8cb9f341d69fa6393e9a85b4c4350bf1bf16fe5ebce0cd38a WHIRLPOOL 39f4f29f235dce68edc47ac9201f6dd4499f729ca1fbf36d66332ca0cc72502d79c2faeef5a13eef37312988f0f046eca820ec09208576edac7826120571edf2 +EBUILD spl-0.6.5.8.ebuild 2715 SHA256 afa48d61c8b4883842eff08472462e3cdcda4f1cdaba2265cb2fa352bb5b3208 SHA512 af7c083979f27633fd33dd60cae7c7b4a7b3efe7bf0bf19edf4a7ba699772e82b1c7d00bb25d2c8c4f7681fe652657a831718f0f8a66ac984a55634fb467817e WHIRLPOOL a5775589727d4bad3778ec69215d4523438d7c71627b711020e08fc6ffd60d685a535ce102ac1c787999d4c7cd17795a1011a492d7124095f956268436cee66c +EBUILD spl-0.6.5.9.ebuild 2717 SHA256 56ff526b677d27d476a7b3ab32f98a708fa695b46ce2ef04ce1eaee558b4f6e7 SHA512 eba48ac715d2ef1928236e7774688de46538afc640fe30b4650dde7c33b3e54f627429c0578b54cb87926b14b2c27cf1e489d74c83cf80e696c39ad5762bea70 WHIRLPOOL d330e15185f39380d0fa6fdf02acb5d7cfcf049402fc55b7bbab5ba0ec1aeea56818875516f76bd359aef602bd6852aff70010899763cb2ee68f78373ed57378 +EBUILD spl-0.7.0.ebuild 2717 SHA256 e7587d6d038cc443e1a9b551b94e23018dff427c903bafe635e64505169fef06 SHA512 13cea0c1dfe684bebb4783dc0c655278a7a9903402a738c05238de66c131edf328834070adfc8d303949560f8d62eff07a5d9f321bdda45c002bcc64dd5d3431 WHIRLPOOL a4d74dadc6ebc4c768a350f27365b6c7fce5172df7743c81c64f8716074d3159efc2e71040e828feceb0554a8d226c47638ab56b406be7f867864b7a3d6c83fd +EBUILD spl-0.7.1.ebuild 2717 SHA256 e7587d6d038cc443e1a9b551b94e23018dff427c903bafe635e64505169fef06 SHA512 13cea0c1dfe684bebb4783dc0c655278a7a9903402a738c05238de66c131edf328834070adfc8d303949560f8d62eff07a5d9f321bdda45c002bcc64dd5d3431 WHIRLPOOL a4d74dadc6ebc4c768a350f27365b6c7fce5172df7743c81c64f8716074d3159efc2e71040e828feceb0554a8d226c47638ab56b406be7f867864b7a3d6c83fd +EBUILD spl-9999.ebuild 2750 SHA256 f9688965b5634b4230068f29bb968ee5e14b10d192920d65ebb3a65c636f86b3 SHA512 c78c84038509c2547291f86fdf567a5f9365388df20bd37054547c431a552f546904b7412ae91405d52e896dcacba4018e6751330183fa74146c7cdab824b5e2 WHIRLPOOL 35723403c05f0b57199e4edf91c99361997e90b1afa156ae71fe6c222f7ae5f627ecb47e13acecbc28b004a72141016721c2f1cc15c40eb9c8375e7313f0d12e +MISC ChangeLog 10748 SHA256 7f43e2292109f0e78d4fba1100efdc8f542599774a29e6ce896801dc7677df67 SHA512 b36e5641e1be62a579edc449c882675f4570c0443d0eee4daedad3a494fd814f8dfcbc736cfbd315555e1a9603d5cb95a3fba8e844753c72c2613038fd0428ad WHIRLPOOL d088e4b5ffc56327d4e289dd6331acb90912d3ebd0c02c6a63c50345be650346faa973646bd912a953f4f388368ccd3e5241a14230da7c9f3c1e92ae5bb90abf +MISC ChangeLog-2015 16325 SHA256 c81ebdd34dcab30fe1b238f412debae6dfe1997ba55b486029321d6bcad7d9fd SHA512 3b265e5b9fdd79eac7946d7f7be229478960491e4467763e56ac4f5b9cd82855f164173bf32c73fb4b1ac4bd8446d68f86a73a40a6210876dfe88ab53d333e31 WHIRLPOOL 98c9f57885cad957a671985fbb469a329599f1ac4b8ae407765917574e412143b1ee8df3fb73e21b73d1394fe5a5da3f0cc252c6b5b8fb8302056207c12d1ae7 +MISC metadata.xml 513 SHA256 ad1644b1d5d04829193792cdc514b02a13bcd76e05a5c43d755ba463f857fe4f SHA512 6a8f7273eda76e5b2f5a96b772ff6a56b7248279b4efea9375d958c2a849d64e6213a7ebb452947c5e4076a4f8e3c612258c6a6ba01007b3d04a51b815fd5c73 WHIRLPOOL 847ae2aa8adbba49dd8a71a19491686c3dff298e990a7d2608e5be0370dbe7cf6381427527ff1ab0f2dd4710e940ded79df522935ba10035d313a9a843e5ed53 diff --git a/sys-kernel/spl/files/spl-0.6.0_rc13-fix-on_each_cpu-autotools-check.patch b/sys-kernel/spl/files/spl-0.6.0_rc13-fix-on_each_cpu-autotools-check.patch new file mode 100644 index 000000000000..e8eaa385c642 --- /dev/null +++ b/sys-kernel/spl/files/spl-0.6.0_rc13-fix-on_each_cpu-autotools-check.patch @@ -0,0 +1,46 @@ +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 + diff --git a/sys-kernel/spl/files/spl-0.6.0_rc13-fix-soft-lockup.patch b/sys-kernel/spl/files/spl-0.6.0_rc13-fix-soft-lockup.patch new file mode 100644 index 000000000000..99227feb04a2 --- /dev/null +++ b/sys-kernel/spl/files/spl-0.6.0_rc13-fix-soft-lockup.patch @@ -0,0 +1,179 @@ +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 + diff --git a/sys-kernel/spl/files/spl-0.6.0_rc14-fix-atomic64-checks.patch b/sys-kernel/spl/files/spl-0.6.0_rc14-fix-atomic64-checks.patch new file mode 100644 index 000000000000..9ac8a4308dd6 --- /dev/null +++ b/sys-kernel/spl/files/spl-0.6.0_rc14-fix-atomic64-checks.patch @@ -0,0 +1,70 @@ +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 + diff --git a/sys-kernel/spl/files/spl-0.6.0_rc14-fix-mutex-owner-check.patch b/sys-kernel/spl/files/spl-0.6.0_rc14-fix-mutex-owner-check.patch new file mode 100644 index 000000000000..ee7314d3cf32 --- /dev/null +++ b/sys-kernel/spl/files/spl-0.6.0_rc14-fix-mutex-owner-check.patch @@ -0,0 +1,33 @@ +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 + diff --git a/sys-kernel/spl/files/spl-0.6.0_rc14-linux-3.9-compat.patch b/sys-kernel/spl/files/spl-0.6.0_rc14-linux-3.9-compat.patch new file mode 100644 index 000000000000..5f9a4c698803 --- /dev/null +++ b/sys-kernel/spl/files/spl-0.6.0_rc14-linux-3.9-compat.patch @@ -0,0 +1,237 @@ +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; + diff --git a/sys-kernel/spl/files/spl-0.6.0_rc14-no-cond_resched.patch b/sys-kernel/spl/files/spl-0.6.0_rc14-no-cond_resched.patch new file mode 100644 index 000000000000..9f1d692d0371 --- /dev/null +++ b/sys-kernel/spl/files/spl-0.6.0_rc14-no-cond_resched.patch @@ -0,0 +1,38 @@ +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 + diff --git a/sys-kernel/spl/files/spl-0.6.0_rc14-simplify-hostid-logic.patch b/sys-kernel/spl/files/spl-0.6.0_rc14-simplify-hostid-logic.patch new file mode 100644 index 000000000000..3d5199fb4eb6 --- /dev/null +++ b/sys-kernel/spl/files/spl-0.6.0_rc14-simplify-hostid-logic.patch @@ -0,0 +1,181 @@ +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 + diff --git a/sys-kernel/spl/files/spl-0.6.1-builtin-fix.patch b/sys-kernel/spl/files/spl-0.6.1-builtin-fix.patch new file mode 100644 index 000000000000..6be0c6d06ffe --- /dev/null +++ b/sys-kernel/spl/files/spl-0.6.1-builtin-fix.patch @@ -0,0 +1,28 @@ +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 + diff --git a/sys-kernel/spl/files/spl-0.6.1-constify-ctl_table.patch b/sys-kernel/spl/files/spl-0.6.1-constify-ctl_table.patch new file mode 100644 index 000000000000..e17cbad4ce81 --- /dev/null +++ b/sys-kernel/spl/files/spl-0.6.1-constify-ctl_table.patch @@ -0,0 +1,63 @@ +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; + +-- diff --git a/sys-kernel/spl/files/spl-0.6.1-fix-delay.patch b/sys-kernel/spl/files/spl-0.6.1-fix-delay.patch new file mode 100644 index 000000000000..42f1f59c7299 --- /dev/null +++ b/sys-kernel/spl/files/spl-0.6.1-fix-delay.patch @@ -0,0 +1,33 @@ +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 + diff --git a/sys-kernel/spl/files/spl-0.6.1-linux-3.10-compat.patch b/sys-kernel/spl/files/spl-0.6.1-linux-3.10-compat.patch new file mode 100644 index 000000000000..aac1c926bbb4 --- /dev/null +++ b/sys-kernel/spl/files/spl-0.6.1-linux-3.10-compat.patch @@ -0,0 +1,426 @@ +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" diff --git a/sys-kernel/spl/metadata.xml b/sys-kernel/spl/metadata.xml new file mode 100644 index 000000000000..758e445e8e26 --- /dev/null +++ b/sys-kernel/spl/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>ryao@gentoo.org</email> + <name>Richard Yao</name> + </maintainer> + <maintainer type="person"> + <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> +</pkgmetadata> diff --git a/sys-kernel/spl/spl-0.6.0_rc13-r2.ebuild b/sys-kernel/spl/spl-0.6.0_rc13-r2.ebuild new file mode 100644 index 000000000000..0f727fa171fa --- /dev/null +++ b/sys-kernel/spl/spl-0.6.0_rc13-r2.ebuild @@ -0,0 +1,113 @@ +# 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 +} diff --git a/sys-kernel/spl/spl-0.6.0_rc14-r3.ebuild b/sys-kernel/spl/spl-0.6.0_rc14-r3.ebuild new file mode 100644 index 000000000000..c18cad215004 --- /dev/null +++ b/sys-kernel/spl/spl-0.6.0_rc14-r3.ebuild @@ -0,0 +1,124 @@ +# 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 +} diff --git a/sys-kernel/spl/spl-0.6.1-r3.ebuild b/sys-kernel/spl/spl-0.6.1-r3.ebuild new file mode 100644 index 000000000000..cae6622f754d --- /dev/null +++ b/sys-kernel/spl/spl-0.6.1-r3.ebuild @@ -0,0 +1,125 @@ +# 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 +} diff --git a/sys-kernel/spl/spl-0.6.2-r5.ebuild b/sys-kernel/spl/spl-0.6.2-r5.ebuild new file mode 100644 index 000000000000..5a152da27c55 --- /dev/null +++ b/sys-kernel/spl/spl-0.6.2-r5.ebuild @@ -0,0 +1,112 @@ +# 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 +} diff --git a/sys-kernel/spl/spl-0.6.3-r1.ebuild b/sys-kernel/spl/spl-0.6.3-r1.ebuild new file mode 100644 index 000000000000..645d48179d8f --- /dev/null +++ b/sys-kernel/spl/spl-0.6.3-r1.ebuild @@ -0,0 +1,123 @@ +# 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 +} diff --git a/sys-kernel/spl/spl-0.6.4.2.ebuild b/sys-kernel/spl/spl-0.6.4.2.ebuild new file mode 100644 index 000000000000..246a8c052365 --- /dev/null +++ b/sys-kernel/spl/spl-0.6.4.2.ebuild @@ -0,0 +1,113 @@ +# 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 +} diff --git a/sys-kernel/spl/spl-0.6.5.10.ebuild b/sys-kernel/spl/spl-0.6.5.10.ebuild new file mode 100644 index 000000000000..1a3984b06ec7 --- /dev/null +++ b/sys-kernel/spl/spl-0.6.5.10.ebuild @@ -0,0 +1,110 @@ +# 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 +} diff --git a/sys-kernel/spl/spl-0.6.5.11.ebuild b/sys-kernel/spl/spl-0.6.5.11.ebuild new file mode 100644 index 000000000000..1a3984b06ec7 --- /dev/null +++ b/sys-kernel/spl/spl-0.6.5.11.ebuild @@ -0,0 +1,110 @@ +# 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 +} diff --git a/sys-kernel/spl/spl-0.6.5.2.ebuild b/sys-kernel/spl/spl-0.6.5.2.ebuild new file mode 100644 index 000000000000..a365223f4c3f --- /dev/null +++ b/sys-kernel/spl/spl-0.6.5.2.ebuild @@ -0,0 +1,113 @@ +# 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 +} diff --git a/sys-kernel/spl/spl-0.6.5.3-r1.ebuild b/sys-kernel/spl/spl-0.6.5.3-r1.ebuild new file mode 100644 index 000000000000..cefedbe27d4f --- /dev/null +++ b/sys-kernel/spl/spl-0.6.5.3-r1.ebuild @@ -0,0 +1,119 @@ +# 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 +} diff --git a/sys-kernel/spl/spl-0.6.5.3.ebuild b/sys-kernel/spl/spl-0.6.5.3.ebuild new file mode 100644 index 000000000000..3863709af2b8 --- /dev/null +++ b/sys-kernel/spl/spl-0.6.5.3.ebuild @@ -0,0 +1,110 @@ +# 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 +} diff --git a/sys-kernel/spl/spl-0.6.5.4-r1.ebuild b/sys-kernel/spl/spl-0.6.5.4-r1.ebuild new file mode 100644 index 000000000000..5563bd29c255 --- /dev/null +++ b/sys-kernel/spl/spl-0.6.5.4-r1.ebuild @@ -0,0 +1,119 @@ +# 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-p${PR#r}.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 +} diff --git a/sys-kernel/spl/spl-0.6.5.4.ebuild b/sys-kernel/spl/spl-0.6.5.4.ebuild new file mode 100644 index 000000000000..03153ad984c8 --- /dev/null +++ b/sys-kernel/spl/spl-0.6.5.4.ebuild @@ -0,0 +1,110 @@ +# 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 +} diff --git a/sys-kernel/spl/spl-0.6.5.6.ebuild b/sys-kernel/spl/spl-0.6.5.6.ebuild new file mode 100644 index 000000000000..e9b4054db990 --- /dev/null +++ b/sys-kernel/spl/spl-0.6.5.6.ebuild @@ -0,0 +1,110 @@ +# 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 +} diff --git a/sys-kernel/spl/spl-0.6.5.7.ebuild b/sys-kernel/spl/spl-0.6.5.7.ebuild new file mode 100644 index 000000000000..d596d575af31 --- /dev/null +++ b/sys-kernel/spl/spl-0.6.5.7.ebuild @@ -0,0 +1,110 @@ +# 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 +} diff --git a/sys-kernel/spl/spl-0.6.5.8.ebuild b/sys-kernel/spl/spl-0.6.5.8.ebuild new file mode 100644 index 000000000000..a8e210883ead --- /dev/null +++ b/sys-kernel/spl/spl-0.6.5.8.ebuild @@ -0,0 +1,110 @@ +# 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 +} diff --git a/sys-kernel/spl/spl-0.6.5.9.ebuild b/sys-kernel/spl/spl-0.6.5.9.ebuild new file mode 100644 index 000000000000..30a56d6506ce --- /dev/null +++ b/sys-kernel/spl/spl-0.6.5.9.ebuild @@ -0,0 +1,110 @@ +# 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 +} diff --git a/sys-kernel/spl/spl-0.7.0.ebuild b/sys-kernel/spl/spl-0.7.0.ebuild new file mode 100644 index 000000000000..1a3984b06ec7 --- /dev/null +++ b/sys-kernel/spl/spl-0.7.0.ebuild @@ -0,0 +1,110 @@ +# 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 +} diff --git a/sys-kernel/spl/spl-0.7.1.ebuild b/sys-kernel/spl/spl-0.7.1.ebuild new file mode 100644 index 000000000000..1a3984b06ec7 --- /dev/null +++ b/sys-kernel/spl/spl-0.7.1.ebuild @@ -0,0 +1,110 @@ +# 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 +} diff --git a/sys-kernel/spl/spl-9999.ebuild b/sys-kernel/spl/spl-9999.ebuild new file mode 100644 index 000000000000..074b776b6d04 --- /dev/null +++ b/sys-kernel/spl/spl-9999.ebuild @@ -0,0 +1,110 @@ +# 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 ~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 README.markdown ) + +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 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 +} |