summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Yao <ryao@gentoo.org>2013-03-28 22:19:26 +0000
committerRichard Yao <ryao@gentoo.org>2013-03-28 22:19:26 +0000
commit1016241061673ebadee71a2a8a0ac19bc300eff0 (patch)
tree20380bdcf017b67d3046543e4acb7889acb8d2c6 /sys-kernel/spl
parentStable for ia64, wrt bug #463110 (diff)
downloadhistorical-1016241061673ebadee71a2a8a0ac19bc300eff0.tar.gz
historical-1016241061673ebadee71a2a8a0ac19bc300eff0.tar.bz2
historical-1016241061673ebadee71a2a8a0ac19bc300eff0.zip
Version bump to 0.6.1; Simplify hostid logic
Package-Manager: portage-2.2.0_alpha169/cvs/Linux x86_64 Manifest-Sign-Key: 0xBEE84C64
Diffstat (limited to 'sys-kernel/spl')
-rw-r--r--sys-kernel/spl/ChangeLog9
-rw-r--r--sys-kernel/spl/Manifest33
-rw-r--r--sys-kernel/spl/files/spl-0.6.0_rc14-simplify-hostid-logic.patch181
-rw-r--r--sys-kernel/spl/spl-0.6.1.ebuild112
-rw-r--r--sys-kernel/spl/spl-9999.ebuild38
5 files changed, 332 insertions, 41 deletions
diff --git a/sys-kernel/spl/ChangeLog b/sys-kernel/spl/ChangeLog
index dc419f612977..5b372ff7afdf 100644
--- a/sys-kernel/spl/ChangeLog
+++ b/sys-kernel/spl/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-kernel/spl
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/ChangeLog,v 1.50 2013/03/23 23:48:08 ryao Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/ChangeLog,v 1.51 2013/03/28 22:19:21 ryao Exp $
+
+*spl-0.6.1 (28 Mar 2013)
+
+ 28 Mar 2013; Richard Yao <ryao@gentoo.org>
+ +files/spl-0.6.0_rc14-simplify-hostid-logic.patch, +spl-0.6.1.ebuild,
+ spl-9999.ebuild:
+ Version bump to 0.6.1; Simplify hostid logic
*spl-0.6.0_rc14-r3 (23 Mar 2013)
diff --git a/sys-kernel/spl/Manifest b/sys-kernel/spl/Manifest
index f8898f51c4bc..15877b338786 100644
--- a/sys-kernel/spl/Manifest
+++ b/sys-kernel/spl/Manifest
@@ -11,34 +11,37 @@ AUX spl-0.6.0_rc14-fix-atomic64-checks.patch 2327 SHA256 f3254d8c739ddd013ab9961
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.0_rc9-alias-km-sleep-with-km-pushpage.patch 2071 SHA256 d34d56201046c6464141c50c815a956e200260c4b17a057af2dde6fdb5fcf949 SHA512 8decd4a803b85b46b5c241eeb0dd7b44e0491a972b08094d763a20d5ef21624ff0bbe79e56098600702f78f506e842c8bbfc3bc94067b86531399b0ba0b4285e WHIRLPOOL 5fbe166099b10e1281e5d824e25acd7f4467766d865e6c297dd8b503906b12bc63221babb0fb6e9fade65679a8637489cec16ac3e6e14d54457c9cda858db9db
DIST spl-0.6.0-rc10.tar.gz 523189 SHA256 b25a748b18522f38b495f3577905ccd296f2782d1180140a05bd1efa19113ea0 SHA512 c5a01c9d42afcc3c4069b771fed2cbdc20d621994d2709a06057d93aeecc1b15c442cf5bce4cced90ecf7ac841f610e0b55b678e2bde8b853aeefac4402baf19 WHIRLPOOL 961edac42c35b1ecf65748eb2fc9876ed8cf1207307eedaba41a381e519589859ad5bbe468f7b94d563ec954e10c47237b4540f63a7ea211bbf9d92158f06b11
DIST spl-0.6.0-rc11.tar.gz 521190 SHA256 0f39edfb87c444781080e6f60acbd1094e3113cfc85a23d4e997fe0d53ce3a2f SHA512 d85dd2b10f98028ebc77069e63fd54241d7e8290cf81856cfb82648279e736ce108bc02b21993a87b8e8a046c3a3f37c0a3ede4cd32a4fa6be032316b47c5add WHIRLPOOL d49b863321173fa8effdaa338df4b8171e8db54f11b5f789a618ffa6abbdfcba721d2d38c59bac77786fb2d64096ed1e8f65a42f7ad2ab37a581d5e2493c05cb
DIST spl-0.6.0-rc12.tar.gz 546842 SHA256 5352ecfa3bed7807bf4b154121c7f6349d986fea44125bd171240985ef28c898 SHA512 d71db7cc6e8ddec13f90a089a60d9b024f16576ed47b5458b88b7a8efad833b95219d9802c57edf76bfa77e65fd523e31aa768a37f8cd4036c828e7e4cf0534d WHIRLPOOL c6adccbcb9e7c30bead63b94168fc6348cd25ce3348e9e8191797b4100481fb727633760692c8aebb263062b393ae843aeb97718d106ac611e6664d1c5d475b3
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
EBUILD spl-0.6.0_rc10.ebuild 2746 SHA256 92d76a7bf8be6356597221e8bd5c5dee2e0a9670c35a7c624feb5bc749ad973d SHA512 694cf23208b81394946281d33b401d70eda2f489802252dbfa1a47dd715f62953ec74d4c7e54805fc0962ac9804237ea6073ac3804a738220d24abd7e5232c54 WHIRLPOOL 1a514e1c3b5580d73b844d958d317048b165d06feb6d405135e6b41b959356ced744b30234f07910b9a1e7e19974c4e00aa75c11c39b89920bc16a755c3d597d
EBUILD spl-0.6.0_rc11-r2.ebuild 2647 SHA256 77558d01484f4568f159c3be4b868c6440cdd7827498c272f3b35566be8bd71e SHA512 2b3d3a31cf2ecfcb95cc1a347c2cf99029138b784d96e91736549a607a37e0852e1de2100289c57049d71349555567846423c451ec8f371f2bc52c6d036b8bbd WHIRLPOOL 1b70e0eda287a57d1a0e91a3452bb7a9dd8f3fec67943d89c92c83168fdb3bec88d6ccb3681a7cedc473219f01d3097db03c2b722b4f59724423e13d5161eec6
EBUILD spl-0.6.0_rc12-r1.ebuild 2709 SHA256 bec0ff7d02fa56f0d641fbd0e16691c89abd81ab4dbaabbe2f44608a2bf5eb35 SHA512 b0748d36f6455b5154c77a0e4f916e5832718adb9a9dd92a0df80eac49105c635e776ddd1b9590b4a93c60ccb0458601d648462ccb98565a8c25e1874c156aa2 WHIRLPOOL 1126c0b938ef2b47fe5f822285d34ffa99f267e983e90ac013b03309ffc86bef6e3615e2a3d3ee4d2d9f24a073e202c9a3b5bbfc6151b1f09105ae479174449b
EBUILD spl-0.6.0_rc13-r2.ebuild 2718 SHA256 28e3a08db5130f7878257d2b8b5ee1ffaab1d707fd3fdbfce504c79f192f952e SHA512 413a61ca08dc462f58705039625ffa107901f489eacb0c944750a53d47117008839a795c445ce24f8188eb2dd8a58dd21d681220c10b19c66e5d2a7dcc2c3348 WHIRLPOOL 08c17a3631206304b62eddabc6502c0d98f25cb8c5bc09417329e1d0168ab9dca8a5b294a0013e8cbf3e557d9ff2acdff691fac8863e5b30eccdbd504987e072
EBUILD spl-0.6.0_rc14-r3.ebuild 2991 SHA256 3b755a97de3143d8ce3347ca40564814aacd03ae228552fe458b716ad8b86fe1 SHA512 5799473298b5cc8f6cf9880bd738b35f61a5b6dccf9af673e31ff4dfbd8ad56eb07424f0ced3b954201b2e5b5c3a9461c249f8a1e6a62d024610b7e67dd18f89 WHIRLPOOL 563bbb2cbb3818eee5ff349d10e08f52a478e790bc37e7286728e51f3cab9f19591fd0135db8d9c506b09cd20fd2f63ffbf9b49cc18ec8274a786d4fcc2aab51
-EBUILD spl-9999.ebuild 2983 SHA256 4f5ed3b28daba66d91c75bc7f131572616ba929ab6cc96c63db01c8020975b5a SHA512 226662639e035313e6341ea46e317f28f3a4ccd6bf0b88329d38d3a31f59b15c818b9354c3d2fe52edc226da58d6dfddc8779d37dcc51d869e60c7309364695a WHIRLPOOL 5c067a078e16c14f52784c32bf8dc7586361b1bd592597c9bf7913f6ad62088a5da94c2025e6d2f430d2dc005ffa4344a630081b8c7df2116508cdee59eb97dc
-MISC ChangeLog 9819 SHA256 d5c4c97486c34f2aba1015a55d2d17ccbc77d74dd83461cacfbb43f7ab281e20 SHA512 b96cb76732c4bfc0ac02349a8faba6c8f72da5f358e2a96193721ca0f9e6027588cb11556f1120f51faec67b9fb19bf34a1da533169d1b482162e6b2aca7bc72 WHIRLPOOL b7356dcdef40ed854cccc1ac31d3e653b4bcd227f6476e6e8496bd3ad14b20bd810cdd616151b131755ba26413a1842662ba4b120d762249f41ff1804ec7c400
+EBUILD spl-0.6.1.ebuild 2855 SHA256 879e03a0dd19e584c220f5b080e3df4db6b1239dc05713688a66ff08a6b8ca09 SHA512 5555fd60dcda74416b42571ed572e7eab6ce01c38659d1c6c5768cdfbafa5ba259ff23c715959b61ff2b2e188d17b19ec8aa8a2a4f455cfb11997c8ea26e3606 WHIRLPOOL cf1d34e8cc10dd0f29ec802383ecf20631e71e49573d3beb7c0e5d761416ccc636d831e21fe6081d040a4b54fd122e2675aa9f166fa51aa455697cc5b0a5b34f
+EBUILD spl-9999.ebuild 2855 SHA256 3d70186fe2cb3fc5057a97ca9cd3d3f9f934ae8b3c11a7e28953570617bda6e6 SHA512 0ab3f9b729c84e065925f6cbe118f42ee2c65412d43ffb3e75f9568648317cb39742f457522caae79a8adfd36b4c0638abc99025b71e957d07697c1a5c176897 WHIRLPOOL 631b5a4d412c65c3ed8e6ac38a69d8447f468d810940e461a93653d08f0dc8c3a9341cd9e7e3b86fc1541de2d8a8aa8d89f9b77e72ab69475a723265d8fb8fe2
+MISC ChangeLog 10029 SHA256 facc3198033681af2cc11f49e873a7752f3c7898d47b0d82a35fe139f10ea8f9 SHA512 63895016f1fe0eb4f086b6ef31558bd90211c1f74866bd07f11ac64f5ef0c3f078d5850633f56bcd4e994093841bbb85fcc99c499d429f248bd3a0c08bfa6dc3 WHIRLPOOL 57b8a0cfe6729ff4b1ed67e1cce6db4796f4fcf525c9b4cee76a0e8e8a19787591e5742a06802409227b0621117397ff77ad58d16b1dd713c254a36fdf420486
MISC metadata.xml 305 SHA256 1379ed630ee72009790f82073e4777a26ca612e0c023825f4a2648266422672e SHA512 ec56bad42e58b3979698fe6607ca1854b018d2292f02f79f6cda070cfe1489b31d9738cfe886597edaca36dbe839a8d909c78f8e4c47b1764b1a0d586df75d33 WHIRLPOOL 11016324ed29ddb27d0c67488e24d15d8d34881a20d21d2807accad014feb4e5b29ceb8d72134f7d8c58d5f83b91c157290c51ea883a5f8007499e73d02acbcd
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
-iQIcBAEBCAAGBQJRTj8lAAoJECDuEZm+6ExkJm4QAKsNR6apJ5IkZAFNPvUZPt5j
-YnujWD7AGWb0H5E+gReCO+UUhLK6riimm1AbBCxObQYw2WXfEkqKMnlqRB0d0iH0
-H7XMlTQ0ksopscFtLT6FjHyNpthRSrcCu8lWqY4kbpXM4+Zn5NWXmmnK9zLIEAg/
-+J97nnXKbMnhX4ojjFwsQqGuWQtWed2mO8nlmmrySv7TJvHlZtVpiVfm1EEoSeja
-ithl4lhBKBXpPbyo91ixeiTn6DRRUD1EyN1wRq5CQmUsooYtdiV/7yRpsQGCA//1
-WiJLtKXTWUn/SvJB+ielHY3FTvJpHmp5+rGeyeWVIYNwcxbRB6VHuozMY8KKc7YX
-i72167zpuF48/039fMGqibNv1LSjZiFsqpGm9h7myXfxtgxib4I1e3K7TZHmShyd
-aK73Y9phyGCyO5LxhCh/mkyeaOmq70ICH3ecXba6YqTA9YdEhjKYYqpZu2NFhLh2
-q0aZ06QAPU76MkKy2vy3IGkG5AI5lOf5zmDdzJAr+T/oVxBOjM2Nj+Ti8pVHBiGn
-T3Dd7u1nxcQA/tBo8keKfewkM8jVumcNqULmVRTxnSyQ1CXg5ax0m7AC8I9NptHA
-kXfa4BQZsT1AR6x3KPll/TGz8pT8fjWaTg6HfaQJh1Zti0GZEotqpS3Z7GismY9y
-iYGwcKjttUiDaLJdybsq
-=pk0X
+iQIcBAEBCAAGBQJRVMHXAAoJECDuEZm+6Exkvq0P+gPSnJAiVBelVkfnkru6FE99
+SxFtVC3n8KDU5RnJfn2uleAlGDEGWkOPzMoLxzfKb1IOhHa90NBvdr2raeeKIPFT
+HN2H2Bghe1DWp0+zCqyM9f4EsyBi1jdoqMzan6oGlnqrAEtGveOeGlW9svFkfpFp
+ozli36HzFGfGXYjW4TijFhNC/3vg9mxo6VYFNLTNe3Ui1uPveFr/FQwOKmbbgD0x
+OAcxlME3lRbwxNwTsiigH8Io9PAYKeoA4wm3l/veYMSAQ4vOO2SKECNb8M+d8SQg
+tzcV8Qrav8C0ykFy9jX7fpVHNZ/05koFWcEpok3G7QoY5+uIZjjV+QY/Eqx60HmL
+NRP0zPlIwM8QpMEFvlejo/0Qki/AhZU5RhStGrTZWXtLddXlaQjKWSryu8MCQVkM
+5WeDeBvnSYES5sx/KoDi0KtMD3Mqw+86bNeaibaDO0eb2o7Fpz1dU9sb1s2Dg5+9
+DdAzceeTbldlfeY7Xx1wmj3wE0+UzFLI/OINRmDyH9Hj1jFSoVKDJQJD9ueCMijQ
+iM4Veqp8ofQGvkk/+9uaKO5rT+WDGwwm4onBMjmtXNVEH7jpBWt9Znh/v+3YTyXy
+1bwyO5lx6/BujQw8zFIJlpj+IjBK3mpEjz0z2qq9XkNnEDp3Id/BTetVmqoxfQ3V
+5/iaCwDQ84k8XX2HU1mw
+=cEWt
-----END PGP SIGNATURE-----
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/spl-0.6.1.ebuild b/sys-kernel/spl/spl-0.6.1.ebuild
new file mode 100644
index 000000000000..8838513bfbd8
--- /dev/null
+++ b/sys-kernel/spl/spl-0.6.1.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/spl-0.6.1.ebuild,v 1.1 2013/03/28 22:19:21 ryao Exp $
+
+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="git://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"
+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="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
+ # Be more like FreeBSD and Illumos when handling hostids
+ epatch "${FILESDIR}/${PN}-0.6.0_rc14-simplify-hostid-logic.patch"
+ fi
+
+ # splat is unnecessary unless we are debugging
+ use debug || sed -e 's/^subdir-m += splat$//' -i "${S}/module/Makefile.in"
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ use custom-cflags || strip-flags
+ filter-ldflags -Wl,*
+
+ set_arch_to_kernel
+ local myeconfargs=(
+ --bindir="${EPREFIX}/bin"
+ --sbindir="${EPREFIX}/sbin"
+ --with-config=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
+}
+
+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
index 2230fa05a75a..48cf572ed074 100644
--- a/sys-kernel/spl/spl-9999.ebuild
+++ b/sys-kernel/spl/spl-9999.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/spl-9999.ebuild,v 1.33 2013/03/23 23:48:08 ryao Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/spl-9999.ebuild,v 1.34 2013/03/28 22:19:21 ryao Exp $
EAPI="4"
AUTOTOOLS_AUTORECONF="1"
@@ -62,17 +62,8 @@ src_prepare() {
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"
+ # Be more like FreeBSD and Illumos when handling hostids
+ epatch "${FILESDIR}/${PN}-0.6.0_rc14-simplify-hostid-logic.patch"
fi
# splat is unnecessary unless we are debugging
@@ -106,19 +97,16 @@ src_install() {
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
+pkg_postinst() {
+ linux-mod_pkg_postinst
+
+ # Remove old modules
+ if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/spl" ]
then
- ewarn "Cannot run make check tests with module spl loaded."
- ewarn "Skipping make check tests."
- else
- autotools-utils_src_test
+ 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
}