summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Yao <ryao@gentoo.org>2013-11-21 16:21:29 +0000
committerRichard Yao <ryao@gentoo.org>2013-11-21 16:21:29 +0000
commit95b7cefc875b336605c289dbd7096a076ea0ccd7 (patch)
tree5029e0c6c6e7cb3ff53b281c032c6d97eed33db6 /sys-fs/zfs
parentVersion bump - bug #491832 (diff)
downloadhistorical-95b7cefc875b336605c289dbd7096a076ea0ccd7.tar.gz
historical-95b7cefc875b336605c289dbd7096a076ea0ccd7.tar.bz2
historical-95b7cefc875b336605c289dbd7096a076ea0ccd7.zip
Python 3 support; Fix memory leak in libzfs; Import updated bash completion script from Ubuntu (with silent sudo functionality commented out)
Package-Manager: portage-2.2.7/cvs/Linux x86_64 Manifest-Sign-Key: 0xBEE84C64
Diffstat (limited to 'sys-fs/zfs')
-rw-r--r--sys-fs/zfs/ChangeLog9
-rw-r--r--sys-fs/zfs/Manifest33
-rw-r--r--sys-fs/zfs/files/bash-completion-r1391
-rw-r--r--sys-fs/zfs/zfs-0.6.2-r3.ebuild152
-rw-r--r--sys-fs/zfs/zfs-9999.ebuild21
5 files changed, 584 insertions, 22 deletions
diff --git a/sys-fs/zfs/ChangeLog b/sys-fs/zfs/ChangeLog
index a1ead7a30ca3..92e76d999375 100644
--- a/sys-fs/zfs/ChangeLog
+++ b/sys-fs/zfs/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-fs/zfs
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/zfs/ChangeLog,v 1.76 2013/10/18 16:26:04 ryao Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/zfs/ChangeLog,v 1.77 2013/11/21 16:21:23 ryao Exp $
+
+*zfs-0.6.2-r3 (21 Nov 2013)
+
+ 21 Nov 2013; Richard Yao <ryao@gentoo.org> +files/bash-completion-r1,
+ +zfs-0.6.2-r3.ebuild, zfs-9999.ebuild:
+ Python 3 support; Fix memory leak in libzfs; Import updated bash completion
+ script from Ubuntu (with silent sudo functionality commented out)
*zfs-0.6.2-r2 (18 Oct 2013)
diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest
index d7377976fd20..70aabdcd1fbb 100644
--- a/sys-fs/zfs/Manifest
+++ b/sys-fs/zfs/Manifest
@@ -2,6 +2,7 @@
Hash: SHA256
AUX bash-completion 6203 SHA256 15e742477fad0104871fc055b6ce9bf803540070e47fa515ea7ca3c1a401f831 SHA512 e7ccb7179c4c455c496daab192099d7553674b9505801e25a2ea8c67a1b4de15d68ac99b2c3347c1f3454f88ede7694f08da61c5d061f0577bb1594ca4a90f12 WHIRLPOOL 79dfdc9c80a707f6bb39bea51ec451c16b821886ce3e84c73a249313d991cf8019f0647b0fe439754fc1ad08cb294bf4c245955fdc4af30286a8afd61dba21ba
+AUX bash-completion-r1 11310 SHA256 b60214f70ffffb62ffe489cbfabd2e069d14ed2a391fac0e36f914238394b540 SHA512 03be521e2c646196766d5fd049f241cb97f290abf0409881ea6ba709934984deda402c8513009e62a5787e0648023b55c040e5f99baef27709e81c3bc9c8f56e WHIRLPOOL b09558e80a96993c52915093c1c3f8488d0ef9294d2e401546c21998222f377e211ff368e18e8ba3b1dea7554a467cc3e32c882a1d872719d82f5e2c1ccd5848
AUX zfs-0.6.0_rc14-fix-libzpool-function-relocations.patch 1159 SHA256 bd40a60408772cfe789bd0f055906cd2aebf43761adb2cb19ca6219c92c5f996 SHA512 aba0ee09e0070ee7472ffeb0274fdac1870e6a11390c110e9febd7240eb8465351355ce6b735d3f0a6ce2ce5bd167a4239ececc3dae33899df3b4f72c162f037 WHIRLPOOL 72635866ef46b592d257071d4902d36b95855850e40de0b6a6afc6ad416460ebdc5b2ece67d011a052895ab6ae9135d77622f7fb15f4cc0f3a6b96df6c2581d2
AUX zfs-0.6.1-avoid-zdb-abort.patch 844 SHA256 651ece4a40b842c00d393d3f969435f733a987cc420f9a300ed2bd1c78e94dba SHA512 d976e0a829ddad680449d0a4d89a7130fb113668bf6766e3004df47a14620e26910e3d0f7cc2f8d5a7cef4a7ba3794ed36624d63ee6c577585d80964e931becf WHIRLPOOL fa47408a8116d5b72f322bbe878f2275febfca613e8718406ed566be23a4a8715113be66c1694c4272f6fc5c26aae78dbd2de31c095aa0cf95dbc7d13d276d4c
AUX zfs-0.6.1-fix-gcc-4.8-warning.patch 1432 SHA256 2a2fb2a0b4960e7c616f4bb27a2a1ddf6dfcef30eb6b22ead20d70fe58055c1e SHA512 6063ad756aac5df4b850fb79630696f0616e3a906463bdce147b07383ed1cba47a60e02eac3cc2888fb92f9915e6ff8e28ca36c4e3d11cc9e65391c68a79d972 WHIRLPOOL 4d0432ca6468d44de7a870e03d20497eeb39b1e373d843862a695622b9d69e8eff6f3d52471b7756f80c9392ae12a797b6665c4d27f73710f67f0ee1aaafcbad
@@ -18,6 +19,7 @@ DIST zfs-0.6.1.tar.gz 1535521 SHA256 42ed127f74af0ecafc14800a5d2b766655f5ea82109
DIST zfs-0.6.2.tar.gz 1558656 SHA256 91b844bf7a42df22d7533e8004289270b7859b8fcbca3bff8087a79b131318b4 SHA512 008f9decdea3e92f6d74f5369ec9df5776b15efbb9f2bc01012999b71e1f2bc5b46b310a329b60545907dcc78773ec79eb6d21aca49d911f33299fd0a36e1a4b WHIRLPOOL 587279866b6ffa2bfebc91f00cb28de85f7f186426a0292f44c6cde7ca3a51c1911fc0ee431c25c3ee0866174522f90ce04b54de4aa3dc0829ba3a719e47af58
DIST zfs-kmod-0.6.2-p0.tar.xz 8244 SHA256 84456e1d52c6d44cc377d131ee34c042c289d00f74e7a9b521d8ef82bdfcf369 SHA512 ff29830e44aeb537d82d2c34070a245271b51013131f9191d03ab35eff2b86559c4bdadd3cf21f7aa7bec07c3556ef712db9cca2beedd1288036c29d750567e2 WHIRLPOOL 62b9a920a832f5715a24c2a0cdc914a5e77700b0e8723df868b1bf8b8a7ecec6f7df14cb294dfb4f4f219cc8253615c594b609a117b57b576e1796b8042bfdc5
DIST zfs-kmod-0.6.2-p1.tar.xz 15988 SHA256 0d5ee6d53f6ba694937a9c1f009a0c18519e56cfcd328e5a42a0486f967608e5 SHA512 77b4f167073fa1be2501889f6795972a370c90b58dca121c95c38d98b37fa092ad043e5ab447e677f2207da7119b9fd2c940990bec83118edf18daff2eccaa16 WHIRLPOOL 730347f5d6c7449f309f6b53cdbcbb77b94c35385cebdb5a953f851f01d26c87d615b8ef673a7346f8351e01237833e18ed2fc7cca78bb200e7537222b3e46e2
+DIST zfs-kmod-0.6.2-p2.tar.xz 28636 SHA256 12882463a38a5a57cf2bb3c14c5783f9511f6dc7b163a47575f2f3dcc24f26f6 SHA512 5792660ae8f5013d12e70d608e9cffa92a8c4089a88a5e78728ee88204b3f970d452d5b0b3874e02be49ebbc139e07139be7b5a86ca40bc8b23cb11a7198a9a8 WHIRLPOOL 0e4c57b363cdd3d736efbd1355567b18e22439bd3b20ef40b27f6b97ad4570c7cc99a11b196ac25359d1966c1a70e178f4fd1687b60450f148ccda47b07282a9
EBUILD zfs-0.6.0_rc10-r4.ebuild 2425 SHA256 43d49734f34c11cf4bb7f52ed60238f472a9d44f8571ecf5da5e3d0de866cbe3 SHA512 922b9e5a920da0cee6a3f02d55cfa2462f9f7d9d7783930075c642bebe981d3cbeaa7d510bff8867afdc63c9c089e598828688317c3d603f5580dc802c543a77 WHIRLPOOL f7451202156bef5884c7cf25e61bade72f4c1213e7aa95d1b455257bf421ca4e07a8130d4a9dad409def546f4c422ffd370d7b442a2561f2a60e7ad7d5c05894
EBUILD zfs-0.6.0_rc11-r3.ebuild 2425 SHA256 91c81e66eb4cb7362810bc748d1cb05b2d515e6cf670fd9547761997bba71064 SHA512 1708af9529f0a7cc72c2d4f27ff7176d14842a5d7b5761ed9176fada6816a6f2d686c5997708f41a5ad634237aa5ecb68374045ad869848127a1ad0cdf2db93d WHIRLPOOL 86ef757aa5aac1d24eeb38d16eb87f5a4e34db02bdb3df74f5e884126fc90be2b4bb36c5cb5954908afa45d1d53d6c4857aed2c04e14f378c962586d458eb8f0
EBUILD zfs-0.6.0_rc12-r3.ebuild 2425 SHA256 7ae28e9025453f623fdfddccbaba6d4f56448da1837df30fd4102babe853ae3c SHA512 d33c48ab59528413ffdba58aaaed0022d19a33cd402731c32ddf89ec043fb1552d57cc5a74d2c4efdc9bc2aa25140846c3ee1c80cf3b9d9f098cb54816d0e3ae WHIRLPOOL 59634e47aa9824b1397ea374433309928a71074d1cc7b415ff1fd125696cc8404e15e1f59091ec74acdab749a2a48b86cd0c3ff053dc70a12c6998b21c789eff
@@ -26,24 +28,25 @@ EBUILD zfs-0.6.0_rc14-r1.ebuild 2898 SHA256 94eec2441edd8094dad6bb73a576198fcb5c
EBUILD zfs-0.6.1-r4.ebuild 3733 SHA256 26dfaf61978ca7a74adf0cd5de815b348bf3a39fb553745bccdacbe0049af86a SHA512 6eba565e81c829c0c062f6b43795c3f937a012d794f164171b9f5a86a12d77f4c11bc8a0152a8151dd59175e584416e9cc02bb0b7b451e6864312d01cc324a4f WHIRLPOOL 5ae5fc47488e9724f4517c6e17508844ed13680491682aa301a4f944bae9bb95d870191ff5b751049193a5ca46939709b302a68d95cf8661d5bc4c305cf6cd14
EBUILD zfs-0.6.2-r1.ebuild 3631 SHA256 9bea1a040b039ade4e3ab44fe5e0b0b728f6ec13311c2718abed7ba973f5917b SHA512 7693d1edd1163ea287f68ca49627c9d78b6ba88e03b4e498e7f9605b302d00b410f50c173dce7a3004928f15f392da418bc4ff0a392631f2393a6d890564c13f WHIRLPOOL 81eac75ca255dfcb807bd86e53c7be403e6a8684889bd20f6807747816ee51863476d55141773f7a3bf45daf3f22fcf1fa5e899506863d5c4c58b10a5b72fb28
EBUILD zfs-0.6.2-r2.ebuild 3631 SHA256 5c6f38f3bc0e4756b3452fe4c8c5dedfa55aced582547957cf1c75c4a1e6d42d SHA512 682a9fff1585d08707ca84be6b752fd4cd4040e97f584e2889deab7818d963bb37e4a7e9d04a6f3b6de865e0bd79bbb7bddc9b95dd1e0808138092bf68351f7a WHIRLPOOL d4875050fe7b8aa141bb43a2b5050ac6ce5410c620cdec43312b916fb0369e2869e8922b1ec32c7607bd9671515b91f20a5d560c99b3a03847d438c4cdbf261e
+EBUILD zfs-0.6.2-r3.ebuild 3656 SHA256 5543601ace162014dc0d0e0f13c14a1cec79a91565ce184194f2eaea810c51fe SHA512 f20795c021e9e7e4857a728c2be9d3fbef336e31b680534ef7c26aba432253e0a1366d4f7a374527bfee85dadd2de9e53dcb8d95545332cf22606ec6639b9ea6 WHIRLPOOL 5bd8e4a38b6460f2d6824a4e7d9f17cfdb1d366a6494a9d38cbc428f47a69da1ed6e4d43d5459a373839e8a11264af77ba3b621562048e01090999d82de7f876
EBUILD zfs-0.6.2.ebuild 3392 SHA256 18fcdc47bdbefdbc086b6fd6db8ca48d21560b1fa9ef0c1c3e5e64fc70802832 SHA512 a6405759c13611573dc04efa373bf9c1d33804dcb0977a598b0da775616b741e64d5ad25ab31a857117058b453ed7f3f617c92d27510506e323aeacfb9c64c75 WHIRLPOOL c19a40880679bda65244bfacc96ee3153b05903917d1f6dcfbb1d0bbc93e16a2307c37fbb4585b3d758fd187d0a5d419fbc9974d2198e1e476bc314e2e4b8cc3
-EBUILD zfs-9999.ebuild 3414 SHA256 dd4978bcea7d2b1c302e47e65334e86e33a838cfb31577866c5ad24a76e04a7c SHA512 6eb001d7396df336690c9917e735045a8b12913fa337474ad915da9f987c5a8b16e77e23efd54a9f189e9257c004ac73d24ce758c8d75db6458488d94508fb9c WHIRLPOOL 0da253e105a37664dee8c58ae771d38d103ca7e560ac4e7828b01d8acccc6fbad1726d8e15005f0848dee70922231f4826a6aa44994214f8090cca58c6ceee13
-MISC ChangeLog 15039 SHA256 5f6c174d0c758ac20c195633fa1b0b6b3c76caa058db9cca0cc7eeee5b9e7708 SHA512 d6f25772ccd3e9a6036a4eb1d046936e24e78a421fad205f4ae915d18030e3a472d10473c34dc07b6ebb657d19240da36423abfe78400e8ea4fe436dd125c419 WHIRLPOOL 90d4604c89737a9872dca515580b5b536c51b6eaf327a79aa387a34e7157e2fad19d139867048c431105a71cdab822107d1eccf8f0e50c5cb4a9bcd9574a90e9
+EBUILD zfs-9999.ebuild 3662 SHA256 39d7531849f345a64862eaf12170edec0bce5c0a50de05ce3c9f3199cd39fd68 SHA512 e9d930f35b6c46b521c80eb2d8edd0645068ae267c01c98ad625c7783fd99fff377ed16bfb7cc2f70bae1da618161042c82e541099c03c44728582164fd53ca9 WHIRLPOOL 5a7bc3a00848bac382c60447ae6e7087ce4495b44ba11d99a63996f33647398dac7f520f609040edc9bf574ecc40d3b4c6eb0fd0a0d2f942444903002f629cf6
+MISC ChangeLog 15328 SHA256 74f1a720d2a82def4bb9951b8c5825ab9fe1daae9666c24a43893ca862b7bae6 SHA512 45449418f1a0136952efd46a563faed310b9f80a798479cd22cd52762c948a10a8214ca86205b78d29260f020f6c8e46ca70f897950bb08ce604109c8efff6eb WHIRLPOOL d5d804252dc43a6379e2c0889c6f684fad0cfd1c245bc76f6e47dfef2bc49ec7252fda7ad9e399df2328a698f2eefaa7225d2887227bd9a56b2694753dc07f07
MISC metadata.xml 546 SHA256 980db453ce3112b91daa26f61bbc8eec61d12d0998d0bf76a1308aecad499c42 SHA512 33e25501a30e8cb8e890c1dbf98f5d5264a7958f7d710d37d4ee36efbb318d0db23533fefd51ca419cdc6f72416c1d0cc4fd3b1e68a157dca14890d54f411df6 WHIRLPOOL c96639028769b95ba23db8e8e20d71f5894b1ecebd6d3e62effc610d48e2c55797fa3536dea6e654185f288dd8edb6a2a063829598703f0f0ca61aa02f995314
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
-iQIcBAEBCAAGBQJSYWDkAAoJECDuEZm+6ExkBNkQAJOZnZOcj35vKxa5JjqhTyI2
-IkVIoN34kO/MXXzjsWpOUgpYVFDkGeeimhfIP8Wlo4dcDtUtVGTUDf/OSpry2rTA
-cizJchYpWBe9e3en/xlb8h+ZKtC33MFaBrn4gyvaFJXPvQKjZhQ/P3nR6jv4Otil
-AtySwuZMLPIu/RHohjSsoS5t2FuD5etaHLIrSfbVgltVxfy3kIEMffBi0DeaeYwd
-tJJKq9MU/9vh0g+jYp2GYvlqBQLepWhD3v+gYQW1dPZVZmxNJVXboXC8wWY0wHyR
-AHdKV7nTHg1GyyKgrt75f2iI91lL36/xvqaCWqmnVYzsWEpD24pvLTUZpLQ2GB3a
-HGWc/mziUYA9gJa0tqvYx6faXEUI8MW5RnH58AZkbQq5XkIJ6lge8BDPPYVXVcqj
-fol10+N4MRt2s0oszrAnE3u0RuJ1Sivq21R/b69v3T/AOvQr5GCngV8h/rSI5urp
-y6nvFP//wvA1b7yC6l4TLjzbgbYflfpOPHPRAO1A7zcAv8DXSS4sOfMgcwOlSoeJ
-oVfADMNZ6EoHtQQmMs+Wc51dBY8H3WOL7m4wJJS+Y0puf3u5LFZ4bZ6L/gzUzbh3
-PaXmjD0vrJgH/lQu5NZ8rZCIZWGWwYGvqH0A5W8vM4nAcElevW3Qg+Msg9UJls5V
-jej5dmCoqAGQODovK5of
-=rUKC
+iQIcBAEBCAAGBQJSjjMZAAoJECDuEZm+6ExkldcQAI35qwmG5kgfB7o3geSbkaKH
+7PEwZyoWn3rEevPCbGbWaJ6SG5l2fjBBbm4xS2e0enNcO9iVFn9WMexoG/KBX/8f
+fjl0gW5GjEuTHy8JgpM7mM/f+2YtV8lf4V9gdoBBZXlN2u2y7wiewTDBecLMAfDC
+Xi7vApVT0ARTpzOHsalIFDTzOl+wRNuCvSleJYVISNf3A642IVXpL1oPMsyQg4Wj
+waprx+8IH0WAcTaGzVcARSc9bjo0/FXoDxyCwnij+7QvX5+fo7ZoTopKuSpaZyx8
+VK79reFpqe4UxDgpVs7xXqBffEkHxf1g2rzpePLYMHTT6pio2h8yNxORO84gnyuB
+NK2G8tRyvAMR4QA17TyCs/YcYFdlCz7C5yH1EpBTSIHfI/yqQKxIWMCeA+wpLqjm
+osGFAhFbMLUs1T1nTNaACmirherjouGrqR2pEYT1bSZDgfWLeJx/1ILI2Q8w+ifV
+n+mD5B11YcQPCRU1DRuBzYZfz4WXPGvyPnXAlccKMm6/1CNaDmmc/UxjY2z2fG7Y
+R1l+07pz4cqfnTmz+GxadveFkNPTFpBRrg8auAC0fbUfWD0xE4DfNrkbWuLUXZMZ
+4+ZS8wCwjXipBCuUd8CIgaIv6lB3y231qm4v/RJXOSJNZcfmuiDboTDXLaWx6ISj
+l0VC7l9TG4JO8wOXu+N7
+=Ccy7
-----END PGP SIGNATURE-----
diff --git a/sys-fs/zfs/files/bash-completion-r1 b/sys-fs/zfs/files/bash-completion-r1
new file mode 100644
index 000000000000..b1aded368e85
--- /dev/null
+++ b/sys-fs/zfs/files/bash-completion-r1
@@ -0,0 +1,391 @@
+# Copyright (c) 2013, Aneurin Price <aneurin.price@gmail.com>
+
+# Permission is hereby granted, free of charge, to any person
+# obtaining a copy of this software and associated documentation
+# files (the "Software"), to deal in the Software without
+# restriction, including without limitation the rights to use,
+# copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following
+# conditions:
+
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+# OTHER DEALINGS IN THE SOFTWARE.
+
+#if [[ -w /dev/zfs ]]; then
+ __ZFS_CMD="zfs"
+ __ZPOOL_CMD="zpool"
+#else
+# __ZFS_CMD="sudo zfs"
+# __ZPOOL_CMD="sudo zpool"
+#fi
+
+__zfs_get_commands()
+{
+ $__ZFS_CMD 2>&1 | awk '/^\t[a-z]/ {print $1}' | cut -f1 -d '|' | uniq
+}
+
+__zfs_get_properties()
+{
+ $__ZFS_CMD get 2>&1 | awk '$2 == "YES" || $2 == "NO" {print $1}'; echo all name space
+}
+
+__zfs_get_editable_properties()
+{
+ $__ZFS_CMD get 2>&1 | awk '$2 == "YES" {print $1"="}'
+}
+
+__zfs_get_inheritable_properties()
+{
+ $__ZFS_CMD get 2>&1 | awk '$3 == "YES" {print $1}'
+}
+
+__zfs_list_datasets()
+{
+ $__ZFS_CMD list -H -o name -t filesystem,volume
+}
+
+__zfs_list_filesystems()
+{
+ $__ZFS_CMD list -H -o name -t filesystem
+}
+
+__zfs_match_snapshot()
+{
+ local base_dataset=${cur%@*}
+ if [[ $base_dataset != $cur ]]
+ then
+ $__ZFS_CMD list -H -o name -t snapshot -d 1 $base_dataset
+ else
+ $__ZFS_CMD list -H -o name -t filesystem,volume | awk '{print $1"@"}'
+ fi
+}
+
+__zfs_match_explicit_snapshot()
+{
+ local base_dataset=${cur%@*}
+ if [[ $base_dataset != $cur ]]
+ then
+ $__ZFS_CMD list -H -o name -t snapshot -d 1 $base_dataset
+ fi
+}
+
+__zfs_match_multiple_snapshots()
+{
+ local existing_opts=$(expr "$cur" : '\(.*\)[%,]')
+ if [[ $existing_opts ]]
+ then
+ local base_dataset=${cur%@*}
+ if [[ $base_dataset != $cur ]]
+ then
+ local cur=${cur##*,}
+ if [[ $cur =~ ^%|%.*% ]]
+ then
+ # correct range syntax is start%end
+ return 1
+ fi
+ local range_start=$(expr "$cur" : '\(.*%\)')
+ $__ZFS_CMD list -H -o name -t snapshot -d 1 $base_dataset | sed 's$.*@$'$range_start'$g'
+ fi
+ else
+ __zfs_match_explicit_snapshot; __zfs_list_datasets
+ fi
+}
+
+__zfs_list_volumes()
+{
+ $__ZFS_CMD list -H -o name -t volume
+}
+
+__zfs_argument_chosen()
+{
+ local word property
+ for word in $(seq $((COMP_CWORD-1)) -1 2)
+ do
+ local prev="${COMP_WORDS[$word]}"
+ if [[ ${COMP_WORDS[$word-1]} != -[tos] ]]
+ then
+ if [[ "$prev" == [^,]*,* ]] || [[ "$prev" == *[@:]* ]]
+ then
+ return 0
+ fi
+ for property in $@
+ do
+ if [[ $prev == "$property" ]]
+ then
+ return 0
+ fi
+ done
+ fi
+ done
+ return 1
+}
+
+__zfs_complete_ordered_arguments()
+{
+ local list1=$1
+ local list2=$2
+ local cur=$3
+ local extra=$4
+ if __zfs_argument_chosen $list1
+ then
+ COMPREPLY=($(compgen -W "$list2 $extra" -- "$cur"))
+ else
+ COMPREPLY=($(compgen -W "$list1 $extra" -- "$cur"))
+ fi
+}
+
+__zfs_complete_multiple_options()
+{
+ local options=$1
+ local cur=$2
+
+ COMPREPLY=($(compgen -W "$options" -- "${cur##*,}"))
+ local existing_opts=$(expr "$cur" : '\(.*,\)')
+ if [[ $existing_opts ]]
+ then
+ COMPREPLY=( "${COMPREPLY[@]/#/${existing_opts}}" )
+ fi
+}
+
+__zfs_complete_switch()
+{
+ local options=$1
+ if [[ ${cur:0:1} == - ]]
+ then
+ COMPREPLY=($(compgen -W "-{$options}" -- "$cur"))
+ return 0
+ else
+ return 1
+ fi
+}
+
+__zfs_complete()
+{
+ local cur prev cmd cmds
+ COMPREPLY=()
+ # Don't split on colon
+ _get_comp_words_by_ref -n : -c cur -p prev -w COMP_WORDS -i COMP_CWORD
+ cmd="${COMP_WORDS[1]}"
+
+ if [[ ${prev##*/} == zfs ]]
+ then
+ cmds=$(__zfs_get_commands)
+ COMPREPLY=($(compgen -W "$cmds -?" -- "$cur"))
+ return 0
+ fi
+
+ case "${cmd}" in
+ clone)
+ case "${prev}" in
+ -o)
+ COMPREPLY=($(compgen -W "$(__zfs_get_editable_properties)" -- "$cur"))
+ ;;
+ *)
+ if ! __zfs_complete_switch "o,p"
+ then
+ if __zfs_argument_chosen
+ then
+ COMPREPLY=($(compgen -W "$(__zfs_list_datasets)" -- "$cur"))
+ else
+ COMPREPLY=($(compgen -W "$(__zfs_match_snapshot)" -- "$cur"))
+ fi
+ fi
+ ;;
+ esac
+ ;;
+ get)
+ case "${prev}" in
+ -d)
+ COMPREPLY=($(compgen -W "" -- "$cur"))
+ ;;
+ -t)
+ __zfs_complete_multiple_options "filesystem volume snapshot all" "$cur"
+ ;;
+ -s)
+ __zfs_complete_multiple_options "local default inherited temporary none" "$cur"
+ ;;
+ -o)
+ __zfs_complete_multiple_options "name property value source received all" "$cur"
+ ;;
+ *)
+ if ! __zfs_complete_switch "H,r,p,d,o,t,s"
+ then
+ if __zfs_argument_chosen $(__zfs_get_properties)
+ then
+ COMPREPLY=($(compgen -W "$(__zfs_match_explicit_snapshot) $(__zfs_list_datasets)" -- "$cur"))
+ else
+ __zfs_complete_multiple_options "$(__zfs_get_properties)" "$cur"
+ fi
+ fi
+ ;;
+ esac
+ ;;
+ inherit)
+ if ! __zfs_complete_switch "r"
+ then
+ __zfs_complete_ordered_arguments "$(__zfs_get_inheritable_properties)" "$(__zfs_match_explicit_snapshot) $(__zfs_list_datasets)" $cur
+ fi
+ ;;
+ list)
+ case "${prev}" in
+ -d)
+ COMPREPLY=($(compgen -W "" -- "$cur"))
+ ;;
+ -t)
+ __zfs_complete_multiple_options "filesystem volume snapshot all" "$cur"
+ ;;
+ -o)
+ __zfs_complete_multiple_options "$(__zfs_get_properties)" "$cur"
+ ;;
+ -s|-S)
+ COMPREPLY=($(compgen -W "$(__zfs_get_properties)" -- "$cur"))
+ ;;
+ *)
+ if ! __zfs_complete_switch "H,r,d,o,t,s,S"
+ then
+ COMPREPLY=($(compgen -W "$(__zfs_match_explicit_snapshot) $(__zfs_list_datasets)" -- "$cur"))
+ fi
+ ;;
+ esac
+ ;;
+ promote)
+ COMPREPLY=($(compgen -W "$(__zfs_list_filesystems)" -- "$cur"))
+ ;;
+ rollback)
+ if ! __zfs_complete_switch "r,R,f"
+ then
+ COMPREPLY=($(compgen -W "$(__zfs_match_snapshot)" -- "$cur"))
+ fi
+ ;;
+ send)
+ if ! __zfs_complete_switch "d,n,P,p,R,v,i,I"
+ then
+ COMPREPLY=($(compgen -W "$(__zfs_match_snapshot)" -- "$cur"))
+ fi
+ ;;
+ snapshot)
+ case "${prev}" in
+ -o)
+ COMPREPLY=($(compgen -W "$(__zfs_get_editable_properties)" -- "$cur"))
+ ;;
+ *)
+ if ! __zfs_complete_switch "o,r"
+ then
+ COMPREPLY=($(compgen -W "$(__zfs_list_datasets | awk '{print $1"@"}')" -- "$cur"))
+ fi
+ ;;
+ esac
+ ;;
+ set)
+ __zfs_complete_ordered_arguments "$(__zfs_get_editable_properties)" "$(__zfs_match_explicit_snapshot) $(__zfs_list_datasets)" $cur
+ ;;
+ upgrade)
+ case "${prev}" in
+ -a|-V|-v)
+ COMPREPLY=($(compgen -W "" -- "$cur"))
+ ;;
+ *)
+ if ! __zfs_complete_switch "a,V,v,r"
+ then
+ COMPREPLY=($(compgen -W "$(__zfs_list_filesystems)" -- "$cur"))
+ fi
+ ;;
+ esac
+ ;;
+ destroy)
+ if ! __zfs_complete_switch "d,f,n,p,R,r,v"
+ then
+ __zfs_complete_multiple_options "$(__zfs_match_multiple_snapshots)" $cur
+ fi
+ ;;
+ *)
+ COMPREPLY=($(compgen -W "$(__zfs_match_explicit_snapshot) $(__zfs_list_datasets)" -- "$cur"))
+ ;;
+ esac
+ __ltrim_colon_completions "$cur"
+ return 0
+}
+
+__zpool_get_commands()
+{
+ $__ZPOOL_CMD 2>&1 | awk '/^\t[a-z]/ {print $1}' | uniq
+}
+
+__zpool_get_properties()
+{
+ $__ZPOOL_CMD get 2>&1 | awk '$2 == "YES" || $2 == "NO" {print $1}'; echo all
+}
+
+__zpool_get_editable_properties()
+{
+ $__ZPOOL_CMD get 2>&1 | awk '$2 == "YES" {print $1"="}'
+}
+
+__zpool_list_pools()
+{
+ $__ZPOOL_CMD list -H -o name
+}
+
+__zpool_complete()
+{
+ local cur prev cmd cmds
+ COMPREPLY=()
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
+ cmd="${COMP_WORDS[1]}"
+
+ if [[ ${prev##*/} == zpool ]]
+ then
+ cmds=$(__zpool_get_commands)
+ COMPREPLY=($(compgen -W "$cmds" -- "$cur"))
+ return 0
+ fi
+
+ case "${cmd}" in
+ get)
+ __zfs_complete_ordered_arguments "$(__zpool_get_properties)" "$(__zpool_list_pools)" $cur
+ return 0
+ ;;
+ import)
+ if [[ $prev == -d ]]
+ then
+ _filedir -d
+ else
+ COMPREPLY=($(compgen -W "$(__zpool_list_pools) -d" -- "$cur"))
+ fi
+ return 0
+ ;;
+ set)
+ __zfs_complete_ordered_arguments "$(__zpool_get_editable_properties)" "$(__zpool_list_pools)" $cur
+ return 0
+ ;;
+ add|attach|clear|create|detach|offline|online|remove|replace)
+ local pools="$(__zpool_list_pools)"
+ if __zfs_argument_chosen $pools
+ then
+ _filedir
+ else
+ COMPREPLY=($(compgen -W "$pools" -- "$cur"))
+ fi
+ return 0
+ ;;
+ *)
+ COMPREPLY=($(compgen -W "$(__zpool_list_pools)" -- "$cur"))
+ return 0
+ ;;
+ esac
+
+}
+
+complete -F __zfs_complete zfs
+complete -F __zpool_complete zpool
diff --git a/sys-fs/zfs/zfs-0.6.2-r3.ebuild b/sys-fs/zfs/zfs-0.6.2-r3.ebuild
new file mode 100644
index 000000000000..7ab914bedff3
--- /dev/null
+++ b/sys-fs/zfs/zfs-0.6.2-r3.ebuild
@@ -0,0 +1,152 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/zfs/zfs-0.6.2-r3.ebuild,v 1.1 2013/11/21 16:21:23 ryao Exp $
+
+EAPI="5"
+PYTHON_COMPAT=( python{2_6,2_7,3_1,3_2,3_3} )
+
+inherit python-r1
+
+AT_M4DIR="config"
+AUTOTOOLS_AUTORECONF="1"
+AUTOTOOLS_IN_SOURCE_BUILD="1"
+
+if [ ${PV} == "9999" ] ; then
+ inherit git-2 linux-mod
+ EGIT_REPO_URI="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
+ http://dev.gentoo.org/~ryao/dist/${PN}-kmod-${MY_PV}-p2.tar.xz"
+ S="${WORKDIR}/${PN}-${PN}-${MY_PV}"
+ KEYWORDS="~amd64"
+fi
+
+inherit bash-completion-r1 flag-o-matic toolchain-funcs autotools-utils udev systemd
+
+DESCRIPTION="Userland utilities for ZFS Linux kernel module"
+HOMEPAGE="http://zfsonlinux.org/"
+
+LICENSE="BSD-2 CDDL bash-completion? ( MIT )"
+SLOT="0"
+IUSE="bash-completion custom-cflags kernel-builtin +rootfs selinux test-suite static-libs"
+RESTRICT="test"
+
+COMMON_DEPEND="
+ selinux? ( sys-libs/libselinux )
+ sys-apps/util-linux[static-libs?]
+ sys-libs/zlib[static-libs(+)?]
+ virtual/awk
+"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig
+"
+
+RDEPEND="${COMMON_DEPEND}
+ !=sys-apps/grep-2.13*
+ !kernel-builtin? ( =sys-fs/zfs-kmod-${PV}* )
+ !sys-fs/zfs-fuse
+ !prefix? ( virtual/udev )
+ test-suite? (
+ sys-apps/util-linux
+ sys-devel/bc
+ sys-block/parted
+ sys-fs/lsscsi
+ sys-fs/mdadm
+ sys-process/procps
+ virtual/modutils
+ )
+ rootfs? (
+ app-arch/cpio
+ app-misc/pax-utils
+ !<sys-boot/grub-2.00-r2:2
+ )
+"
+
+pkg_setup() {
+ :
+}
+
+src_prepare() {
+ if [ ${PV} != "9999" ]
+ then
+ # Apply patch set
+ EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" \
+ epatch "${WORKDIR}/${PN}-kmod-${MY_PV}-patches"
+ fi
+
+ # Update paths
+ sed -e "s|/sbin/lsmod|/bin/lsmod|" \
+ -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
+ -e "s|/sbin/parted|/usr/sbin/parted|" \
+ -i scripts/common.sh.in
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ use custom-cflags || strip-flags
+ local myeconfargs=(
+ --bindir="${EPREFIX}/bin"
+ --sbindir="${EPREFIX}/sbin"
+ --with-config=user
+ --with-linux="${KV_DIR}"
+ --with-linux-obj="${KV_OUT_DIR}"
+ --with-udevdir="$(udev_get_udevdir)"
+ --with-blkid
+ $(use_with selinux)
+ )
+ autotools-utils_src_configure
+
+ # prepare systemd unit and helper script
+ cat "${FILESDIR}/zfs.service.in" | \
+ sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
+ -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
+ > "${T}/zfs.service" || die
+ cat "${FILESDIR}/zfs-init.sh.in" | \
+ sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
+ -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
+ > "${T}/zfs-init.sh" || die
+}
+
+src_install() {
+ autotools-utils_src_install
+ gen_usr_ldscript -a uutil nvpair zpool zfs
+ rm -rf "${ED}usr/lib/dracut"
+ use test-suite || rm -rf "${ED}usr/share/zfs"
+
+ use bash-completion && newbashcomp "${FILESDIR}/bash-completion-r1" zfs
+
+ exeinto /usr/libexec
+ doexe "${T}/zfs-init.sh"
+ systemd_dounit "${T}/zfs.service"
+}
+
+pkg_postinst() {
+
+ if ! use kernel-builtin && [ ${PV} = "9999" ]
+ then
+ einfo "Adding ${P} to the module database to ensure that the"
+ einfo "kernel modules and userland utilities stay in sync."
+ update_moduledb
+ fi
+
+ [ -e "${EROOT}/etc/runlevels/boot/zfs" ] \
+ || ewarn 'You should add zfs to the boot runlevel.'
+
+ if [ -e "${EROOT}/etc/runlevels/shutdown/zfs-shutdown" ]
+ then
+ einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
+ rm "${EROOT}/etc/runlevels/shutdown/zfs-shutdown"
+ fi
+
+}
+
+pkg_postrm() {
+ if ! use kernel-builtin && [ ${PV} = "9999" ]
+ then
+ remove_moduledb
+ fi
+}
diff --git a/sys-fs/zfs/zfs-9999.ebuild b/sys-fs/zfs/zfs-9999.ebuild
index 388cff5586e4..8f01f1e119eb 100644
--- a/sys-fs/zfs/zfs-9999.ebuild
+++ b/sys-fs/zfs/zfs-9999.ebuild
@@ -1,11 +1,11 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/zfs/zfs-9999.ebuild,v 1.49 2013/10/11 23:17:02 ryao Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/zfs/zfs-9999.ebuild,v 1.50 2013/11/21 16:21:23 ryao Exp $
EAPI="5"
-PYTHON_COMPAT=( python{2_6,2_7} )
+PYTHON_COMPAT=( python{2_6,2_7,3_1,3_2,3_3} )
-inherit python-single-r1
+inherit python-r1
AT_M4DIR="config"
AUTOTOOLS_AUTORECONF="1"
@@ -17,7 +17,8 @@ if [ ${PV} == "9999" ] ; then
else
inherit eutils versionator
MY_PV=$(replace_version_separator 3 '-')
- SRC_URI="https://github.com/zfsonlinux/${PN}/archive/${PN}-${MY_PV}.tar.gz"
+ SRC_URI="https://github.com/zfsonlinux/${PN}/archive/${PN}-${MY_PV}.tar.gz
+ http://dev.gentoo.org/~ryao/dist/${PN}-kmod-${MY_PV}-p2.tar.xz"
S="${WORKDIR}/${PN}-${PN}-${MY_PV}"
KEYWORDS="~amd64"
fi
@@ -27,7 +28,7 @@ inherit bash-completion-r1 flag-o-matic toolchain-funcs autotools-utils udev sys
DESCRIPTION="Userland utilities for ZFS Linux kernel module"
HOMEPAGE="http://zfsonlinux.org/"
-LICENSE="BSD-2 CDDL MIT"
+LICENSE="BSD-2 CDDL bash-completion? ( MIT )"
SLOT="0"
IUSE="bash-completion custom-cflags kernel-builtin +rootfs selinux test-suite static-libs"
RESTRICT="test"
@@ -68,6 +69,14 @@ pkg_setup() {
}
src_prepare() {
+ if [ ${PV} != "9999" ]
+ then
+ # Apply patch set
+ EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" \
+ epatch "${WORKDIR}/${PN}-kmod-${MY_PV}-patches"
+ fi
+
# Update paths
sed -e "s|/sbin/lsmod|/bin/lsmod|" \
-e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
@@ -108,7 +117,7 @@ src_install() {
rm -rf "${ED}usr/lib/dracut"
use test-suite || rm -rf "${ED}usr/share/zfs"
- use bash-completion && newbashcomp "${FILESDIR}/bash-completion" zfs
+ use bash-completion && newbashcomp "${FILESDIR}/bash-completion-r1" zfs
exeinto /usr/libexec
doexe "${T}/zfs-init.sh"